aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:11:52 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:12:04 +0000
commit25180730194bec25f915f32ab846ea583fb1493f (patch)
tree9a73e0336ecf21e085d99d6a651c5547b9eb99f8
parent6e3e7b9ca0548430aaa5e2555d6e02c64625fa3f (diff)
Rename PySide2 to PySide6
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt12
-rw-r--r--LICENSE.COMMERCIAL2
-rw-r--r--README.md26
-rw-r--r--README.pyside2.md88
-rw-r--r--README.pyside6.md88
-rw-r--r--build_history/blacklist.txt2
-rw-r--r--build_scripts/config.py4
-rw-r--r--build_scripts/main.py8
-rw-r--r--build_scripts/platforms/unix.py4
-rw-r--r--build_scripts/platforms/windows_desktop.py8
-rw-r--r--build_scripts/setup_runner.py2
-rw-r--r--build_scripts/versions.py4
-rw-r--r--build_scripts/wheel_override.py4
-rw-r--r--build_scripts/wheel_utils.py4
-rw-r--r--coin_build_instructions.py2
-rw-r--r--examples/3d/simple3d.py10
-rw-r--r--examples/axcontainer/axviewer.py8
-rw-r--r--examples/charts/audio.py10
-rw-r--r--examples/charts/callout.py10
-rw-r--r--examples/charts/chartthemes/README.md2
-rw-r--r--examples/charts/chartthemes/main.py10
-rw-r--r--examples/charts/chartthemes/ui_themewidget.py6
-rw-r--r--examples/charts/donutbreakdown.py10
-rw-r--r--examples/charts/legend.py10
-rw-r--r--examples/charts/lineandbar.py10
-rw-r--r--examples/charts/linechart.py10
-rw-r--r--examples/charts/logvalueaxis.py10
-rw-r--r--examples/charts/memoryusage.py8
-rw-r--r--examples/charts/modeldata.py10
-rw-r--r--examples/charts/nesteddonuts.py10
-rw-r--r--examples/charts/percentbarchart.py10
-rw-r--r--examples/charts/piechart.py10
-rw-r--r--examples/charts/qmlpolarchart/qmlpolarchart.py8
-rw-r--r--examples/charts/temperaturerecords.py10
-rw-r--r--examples/corelib/threads/mandelbrot.py8
-rw-r--r--examples/corelib/tools/regexp.py4
-rw-r--r--examples/corelib/tools/settingseditor/settingseditor.py8
-rw-r--r--examples/datavisualization/bars3d.py10
-rw-r--r--examples/declarative/extending/chapter1-basics/basics.py10
-rw-r--r--examples/declarative/extending/chapter2-methods/methods.py10
-rw-r--r--examples/declarative/extending/chapter3-bindings/bindings.py10
-rw-r--r--examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py10
-rw-r--r--examples/declarative/extending/chapter5-listproperties/listproperties.py10
-rw-r--r--examples/declarative/scrolling.py6
-rw-r--r--examples/declarative/signals/pytoqml1/main.py6
-rw-r--r--examples/declarative/signals/qmltopy1/main.py6
-rw-r--r--examples/declarative/signals/qmltopy2/main.py6
-rw-r--r--examples/declarative/signals/qmltopy3/main.py6
-rw-r--r--examples/declarative/signals/qmltopy4/main.py6
-rw-r--r--examples/declarative/textproperties/main.py8
-rw-r--r--examples/declarative/usingmodel.py6
-rw-r--r--examples/external/matplotlib/widget_3dplot.py6
-rw-r--r--examples/external/opencv/webcam_pattern_detection.py6
-rw-r--r--examples/external/scikit/staining_colors_separation.py6
-rw-r--r--examples/installer_test/hello.py4
-rw-r--r--examples/macextras/macpasteboardmime.py4
-rw-r--r--examples/multimedia/audiooutput.py8
-rw-r--r--examples/multimedia/camera.py20
-rw-r--r--examples/multimedia/player.py12
-rw-r--r--examples/network/blockingfortuneclient.py10
-rw-r--r--examples/network/fortuneclient.py4
-rw-r--r--examples/network/fortuneserver.py4
-rw-r--r--examples/network/threadedfortuneserver.py8
-rw-r--r--examples/opengl/contextinfo.py12
-rw-r--r--examples/opengl/hellogl2.py12
-rw-r--r--examples/opengl/textures/textures.py4
-rw-r--r--examples/opengl/textures/textures_rc.py2
-rw-r--r--examples/quick/customitems/painteditem/painteditem.py10
-rw-r--r--examples/remoteobjects/modelview/modelviewclient.py8
-rw-r--r--examples/remoteobjects/modelview/modelviewserver.py10
-rw-r--r--examples/samplebinding/CMakeLists.txt2
-rw-r--r--examples/samplebinding/README.md4
-rw-r--r--examples/scriptableapplication/CMakeLists.txt8
-rw-r--r--examples/scriptableapplication/README.md4
-rw-r--r--examples/sql/books/bookdelegate.py8
-rw-r--r--examples/sql/books/bookwindow.py8
-rw-r--r--examples/sql/books/createdb.py2
-rw-r--r--examples/sql/books/main.py2
-rw-r--r--examples/sql/books/rc_books.py2
-rw-r--r--examples/sql/books/ui_bookwindow.py6
-rw-r--r--examples/texttospeech/texttospeech.py10
-rw-r--r--examples/tutorial/t1.py4
-rw-r--r--examples/tutorial/t10.py4
-rw-r--r--examples/tutorial/t11.py4
-rw-r--r--examples/tutorial/t12.py4
-rw-r--r--examples/tutorial/t13.py4
-rw-r--r--examples/tutorial/t14.py4
-rw-r--r--examples/tutorial/t2.py4
-rw-r--r--examples/tutorial/t3.py4
-rw-r--r--examples/tutorial/t4.py4
-rw-r--r--examples/tutorial/t5.py4
-rw-r--r--examples/tutorial/t6.py4
-rw-r--r--examples/tutorial/t7.py4
-rw-r--r--examples/tutorial/t8.py4
-rw-r--r--examples/tutorial/t9.py4
-rw-r--r--examples/uiloader/uiloader.py6
-rw-r--r--examples/utils/pyside_config.py12
-rw-r--r--examples/webchannel/standalone/core.py2
-rw-r--r--examples/webchannel/standalone/dialog.py4
-rw-r--r--examples/webchannel/standalone/main.py12
-rw-r--r--examples/webchannel/standalone/ui_dialog.py6
-rw-r--r--examples/webchannel/standalone/websocketclientwrapper.py2
-rw-r--r--examples/webchannel/standalone/websockettransport.py4
-rw-r--r--examples/webenginequick/quicknanobrowser.py10
-rw-r--r--examples/webenginewidgets/simplebrowser.py12
-rw-r--r--examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py10
-rw-r--r--examples/webenginewidgets/tabbedbrowser/browsertabwidget.py8
-rw-r--r--examples/webenginewidgets/tabbedbrowser/downloadwidget.py12
-rw-r--r--examples/webenginewidgets/tabbedbrowser/findtoolbar.py10
-rw-r--r--examples/webenginewidgets/tabbedbrowser/historywindow.py4
-rw-r--r--examples/webenginewidgets/tabbedbrowser/main.py14
-rw-r--r--examples/webenginewidgets/tabbedbrowser/webengineview.py4
-rw-r--r--examples/widgetbinding/dialog.py2
-rw-r--r--examples/widgetbinding/main.py2
-rw-r--r--examples/widgetbinding/wigglywidget.py6
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.py2
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles_rc.py2
-rw-r--r--examples/widgets/animation/appchooser/appchooser.py2
-rw-r--r--examples/widgets/animation/appchooser/appchooser_rc.py2
-rw-r--r--examples/widgets/animation/easing/easing.py4
-rw-r--r--examples/widgets/animation/easing/easing_rc.py2
-rw-r--r--examples/widgets/animation/easing/ui_form.py6
-rw-r--r--examples/widgets/animation/states/states.py2
-rw-r--r--examples/widgets/animation/states/states_rc.py2
-rw-r--r--examples/widgets/codeeditor/codeeditor.py6
-rw-r--r--examples/widgets/codeeditor/main.py4
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.py2
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard_rc.py2
-rw-r--r--examples/widgets/dialogs/extension.py4
-rw-r--r--examples/widgets/dialogs/findfiles.py4
-rw-r--r--examples/widgets/dialogs/standarddialogs.py4
-rw-r--r--examples/widgets/dialogs/trivialwizard.py4
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.py8
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext_rc.py2
-rw-r--r--examples/widgets/effects/lighting.py2
-rw-r--r--examples/widgets/gallery/main.py6
-rw-r--r--examples/widgets/gallery/widgetgallery.py6
-rw-r--r--examples/widgets/graphicsview/anchorlayout.py2
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.py4
-rw-r--r--examples/widgets/graphicsview/collidingmice/mice_rc.py2
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.py2
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene_rc.py2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py2
-rw-r--r--examples/widgets/graphicsview/elasticnodes.py2
-rw-r--r--examples/widgets/itemviews/addressbook/adddialogwidget.py6
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.py8
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.py6
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.py6
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.py2
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel.py6
-rw-r--r--examples/widgets/itemviews/fetchmore.py2
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.py4
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.py6
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.py4
-rw-r--r--examples/widgets/layouts/basiclayouts.py4
-rw-r--r--examples/widgets/layouts/dynamiclayouts.py6
-rw-r--r--examples/widgets/layouts/flowlayout.py6
-rw-r--r--examples/widgets/mainwindows/application/application.py2
-rw-r--r--examples/widgets/mainwindows/application/application_rc.py2
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.py10
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py2
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.py8
-rw-r--r--examples/widgets/mainwindows/mdi/mdi_rc.py2
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.py8
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing_rc.py2
-rw-r--r--examples/widgets/painting/concentriccircles.py8
-rw-r--r--examples/widgets/richtext/orderform.py4
-rw-r--r--examples/widgets/richtext/syntaxhighlighter.py4
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py8
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py2
-rw-r--r--examples/widgets/richtext/textobject/textobject.py4
-rw-r--r--examples/widgets/state-machine/eventtrans.py4
-rw-r--r--examples/widgets/state-machine/factstates.py4
-rw-r--r--examples/widgets/state-machine/pingpong.py4
-rw-r--r--examples/widgets/state-machine/rogue.py6
-rw-r--r--examples/widgets/state-machine/trafficlight.py6
-rw-r--r--examples/widgets/state-machine/twowaybutton.py4
-rw-r--r--examples/widgets/systray/main.py2
-rw-r--r--examples/widgets/systray/rc_systray.py2
-rw-r--r--examples/widgets/systray/window.py6
-rw-r--r--examples/widgets/threads/thread_signals.py4
-rw-r--r--examples/widgets/tutorials/addressbook/part1.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part2.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part3.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part4.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part5.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part6.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part7.py2
-rw-r--r--examples/widgets/widgets/tetrix.py4
-rw-r--r--examples/xml/dombookmarks/dombookmarks.py4
-rw-r--r--keyword-errors.lst86
-rw-r--r--sources/cmake_helpers/helpers.cmake2
-rw-r--r--sources/pyside-tools/CMakeLists.txt2
-rw-r--r--[-rwxr-xr-x]sources/pyside-tools/pyside_tool.py6
-rw-r--r--sources/pyside2/CMakeLists.txt266
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt106
-rw-r--r--sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt57
-rw-r--r--sources/pyside2/PySide2/Qt3DAnimation/typesystem_3danimation.xml83
-rw-r--r--sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt54
-rw-r--r--sources/pyside2/PySide2/Qt3DCore/typesystem_3dcore.xml109
-rw-r--r--sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt78
-rw-r--r--sources/pyside2/PySide2/Qt3DExtras/typesystem_3dextras.xml87
-rw-r--r--sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt51
-rw-r--r--sources/pyside2/PySide2/Qt3DInput/typesystem_3dinput.xml90
-rw-r--r--sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt32
-rw-r--r--sources/pyside2/PySide2/Qt3DLogic/typesystem_3dlogic.xml49
-rw-r--r--sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt140
-rw-r--r--sources/pyside2/PySide2/Qt3DRender/typesystem_3drender.xml256
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt44
-rw-r--r--sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml69
-rw-r--r--sources/pyside2/PySide2/QtCharts/CMakeLists.txt85
-rw-r--r--sources/pyside2/PySide2/QtCharts/typesystem_charts.xml272
-rw-r--r--sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt31
-rw-r--r--sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml71
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt208
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core.xml.in45
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml3022
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_mac.xml57
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_win.xml82
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_x11.xml61
-rw-r--r--sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt65
-rw-r--r--sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml422
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt234
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui.xml.in46
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml2864
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_mac.xml50
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_win.xml42
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_x11.xml42
-rw-r--r--sources/pyside2/PySide2/QtHelp/CMakeLists.txt60
-rw-r--r--sources/pyside2/PySide2/QtHelp/typesystem_help.xml71
-rw-r--r--sources/pyside2/PySide2/QtLocation/CMakeLists.txt75
-rw-r--r--sources/pyside2/PySide2/QtLocation/typesystem_location.xml116
-rw-r--r--sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt33
-rw-r--r--sources/pyside2/PySide2/QtMacExtras/typesystem_macextras.xml55
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt130
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia.xml45
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml372
-rw-r--r--sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_forward_declarations.xml45
-rw-r--r--sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt42
-rw-r--r--sources/pyside2/PySide2/QtMultimediaWidgets/typesystem_multimediawidgets.xml52
-rw-r--r--sources/pyside2/PySide2/QtNetwork/CMakeLists.txt107
-rw-r--r--sources/pyside2/PySide2/QtNetwork/typesystem_network.xml311
-rw-r--r--sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt59
-rw-r--r--sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml173
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt74
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml404
-rw-r--r--sources/pyside2/PySide2/QtOpenGLWidgets/CMakeLists.txt34
-rw-r--r--sources/pyside2/PySide2/QtOpenGLWidgets/typesystem_openglwidgets.xml50
-rw-r--r--sources/pyside2/PySide2/QtPositioning/CMakeLists.txt50
-rw-r--r--sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml80
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt43
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml.in45
-rw-r--r--sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml123
-rw-r--r--sources/pyside2/PySide2/QtQml/CMakeLists.txt63
-rw-r--r--sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp732
-rw-r--r--sources/pyside2/PySide2/QtQml/typesystem_qml.xml246
-rw-r--r--sources/pyside2/PySide2/QtQuick/CMakeLists.txt83
-rw-r--r--sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp211
-rw-r--r--sources/pyside2/PySide2/QtQuick/typesystem_quick.xml168
-rw-r--r--sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt41
-rw-r--r--sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml47
-rw-r--r--sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt43
-rw-r--r--sources/pyside2/PySide2/QtQuickWidgets/typesystem_quickwidgets.xml54
-rw-r--r--sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt45
-rw-r--r--sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml75
-rw-r--r--sources/pyside2/PySide2/QtScxml/CMakeLists.txt55
-rw-r--r--sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml86
-rw-r--r--sources/pyside2/PySide2/QtSensors/CMakeLists.txt100
-rw-r--r--sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml127
-rw-r--r--sources/pyside2/PySide2/QtSerialPort/CMakeLists.txt31
-rw-r--r--sources/pyside2/PySide2/QtSerialPort/typesystem_serialport.xml56
-rw-r--r--sources/pyside2/PySide2/QtSql/CMakeLists.txt49
-rw-r--r--sources/pyside2/PySide2/QtSql/typesystem_sql.xml194
-rw-r--r--sources/pyside2/PySide2/QtSvg/CMakeLists.txt31
-rw-r--r--sources/pyside2/PySide2/QtSvg/typesystem_svg.xml61
-rw-r--r--sources/pyside2/PySide2/QtSvgWidgets/CMakeLists.txt39
-rw-r--r--sources/pyside2/PySide2/QtSvgWidgets/typesystem_svgwidgets.xml60
-rw-r--r--sources/pyside2/PySide2/QtTest/CMakeLists.txt40
-rw-r--r--sources/pyside2/PySide2/QtTest/typesystem_test.xml168
-rw-r--r--sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt30
-rw-r--r--sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml53
-rw-r--r--sources/pyside2/PySide2/QtUiTools/CMakeLists.txt42
-rw-r--r--sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml157
-rw-r--r--sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt28
-rw-r--r--sources/pyside2/PySide2/QtWebChannel/typesystem_webchannel.xml55
-rw-r--r--sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt27
-rw-r--r--sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml45
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt41
-rw-r--r--sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml75
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt55
-rw-r--r--sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml130
-rw-r--r--sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt36
-rw-r--r--sources/pyside2/PySide2/QtWebSockets/typesystem_websockets.xml78
-rw-r--r--sources/pyside2/PySide2/QtWidgets/CMakeLists.txt225
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets.xml.in46
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml3326
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml55
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_win.xml42
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_x11.xml42
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt48
-rw-r--r--sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml66
-rw-r--r--sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt33
-rw-r--r--sources/pyside2/PySide2/QtX11Extras/typesystem_x11extras.xml49
-rw-r--r--sources/pyside2/PySide2/QtXml/CMakeLists.txt41
-rw-r--r--sources/pyside2/PySide2/QtXml/typesystem_xml.xml215
-rw-r--r--sources/pyside2/PySide2/__init__.py.in108
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp1879
-rw-r--r--sources/pyside2/PySide2/glue/qtuitools.cpp238
-rw-r--r--sources/pyside2/PySide2/support/deprecated.py80
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py324
-rw-r--r--sources/pyside2/PySide2/templates/gui_common.xml307
-rw-r--r--sources/pyside2/cmake/Macros/PySideModules.cmake253
-rw-r--r--sources/pyside2/doc/CMakeLists.txt188
-rw-r--r--sources/pyside2/doc/api.rst90
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py105
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py52
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp60
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp74
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py43
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py54
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp147
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/dropevents/window.py65
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/myscrollarea.cpp112
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp71
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp64
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp68
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py87
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py53
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp90
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py489
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/timers/timers.cpp88
-rw-r--r--sources/pyside2/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py66
-rwxr-xr-xsources/pyside2/doc/codesnippets/examples/dbus/example-client.py100
-rwxr-xr-xsources/pyside2/doc/codesnippets/examples/dbus/example-server.py119
-rw-r--r--sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.py119
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h113
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.py357
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py253
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.py366
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py360
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.py366
-rw-r--r--sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp120
-rw-r--r--sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.py247
-rw-r--r--sources/pyside2/doc/codesnippets/snippets/customstyle/main.cpp61
-rw-r--r--sources/pyside2/doc/conf.py.in190
-rw-r--r--sources/pyside2/doc/considerations.rst149
-rw-r--r--sources/pyside2/doc/deployment-briefcase.rst199
-rw-r--r--sources/pyside2/doc/deployment-cxfreeze.rst130
-rw-r--r--sources/pyside2/doc/deployment-fbs.rst97
-rw-r--r--sources/pyside2/doc/deployment-pyinstaller.rst145
-rw-r--r--sources/pyside2/doc/examples/index.rst14
-rw-r--r--sources/pyside2/doc/extras/QtCore.ClassInfo.rst23
-rw-r--r--sources/pyside2/doc/extras/QtCore.Property.rst62
-rw-r--r--sources/pyside2/doc/extras/QtCore.QEnum.rst92
-rw-r--r--sources/pyside2/doc/extras/QtCore.Signal.rst39
-rw-r--r--sources/pyside2/doc/extras/QtCore.Slot.rst39
-rw-r--r--sources/pyside2/doc/extras/QtCore.rst5
-rw-r--r--sources/pyside2/doc/extras/QtGui.rst7
-rw-r--r--sources/pyside2/doc/extras/QtHelp.rst5
-rw-r--r--sources/pyside2/doc/extras/QtMultimedia.rst7
-rw-r--r--sources/pyside2/doc/extras/QtNetwork.rst5
-rw-r--r--sources/pyside2/doc/extras/QtOpenGL.rst14
-rw-r--r--sources/pyside2/doc/extras/QtQml.QmlElement.rst28
-rw-r--r--sources/pyside2/doc/extras/QtQml.qmlRegisterSingletonType.rst44
-rw-r--r--sources/pyside2/doc/extras/QtQml.qmlRegisterType.rst41
-rw-r--r--sources/pyside2/doc/extras/QtQml.qmlRegisterUncreatableType.rst36
-rw-r--r--sources/pyside2/doc/extras/QtScript.rst21
-rw-r--r--sources/pyside2/doc/extras/QtScriptTools.rst5
-rw-r--r--sources/pyside2/doc/extras/QtSql.rst5
-rw-r--r--sources/pyside2/doc/extras/QtSvg.rst5
-rw-r--r--sources/pyside2/doc/extras/QtTest.rst7
-rw-r--r--sources/pyside2/doc/extras/QtUiTools.loadUiType.rst36
-rw-r--r--sources/pyside2/doc/extras/QtUiTools.rst9
-rw-r--r--sources/pyside2/doc/extras/QtXml.rst5
-rw-r--r--sources/pyside2/doc/extras/QtXmlPatterns.rst12
-rw-r--r--sources/pyside2/doc/faq.rst37
-rw-r--r--sources/pyside2/doc/gettingstarted-linux.rst96
-rw-r--r--sources/pyside2/doc/gettingstarted-macOS.rst95
-rw-r--r--sources/pyside2/doc/gettingstarted-windows.rst97
-rw-r--r--sources/pyside2/doc/gettingstarted.rst218
-rw-r--r--sources/pyside2/doc/index.rst104
-rw-r--r--sources/pyside2/doc/inheritance_diagram.py372
-rw-r--r--sources/pyside2/doc/modules.rst97
-rw-r--r--sources/pyside2/doc/pyside-config.qdocconf.in19
-rw-r--r--sources/pyside2/doc/pyside-examples/examples.qdoc37
-rw-r--r--sources/pyside2/doc/pyside-examples/pyside-classwizard.qdoc39
-rw-r--r--sources/pyside2/doc/pyside-examples/pyside-stardelegate.qdoc39
-rw-r--r--sources/pyside2/doc/quickstart.rst118
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/clickablebutton.rst90
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/dialog.rst145
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/qml.rst67
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/qrcfiles.rst169
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/uifiles.rst187
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/widgets.rst45
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/widgetstyling.py95
-rw-r--r--sources/pyside2/doc/tutorials/basictutorial/widgetstyling.rst169
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize2/main.py78
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main.py88
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py69
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main.py90
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_widget.py80
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py69
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/table_model.py88
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main.py90
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_widget.py91
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py69
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/table_model.py88
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main.py92
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_widget.py131
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py70
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/table_model.py88
-rw-r--r--sources/pyside2/doc/tutorials/expenses/expenses.rst314
-rw-r--r--sources/pyside2/doc/tutorials/expenses/main.py207
-rw-r--r--sources/pyside2/doc/tutorials/expenses/main_snake_prop.py210
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/01-expenses.py59
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py71
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py78
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py90
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py118
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py138
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py165
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py178
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py185
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py207
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter1/createdb.py131
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter1/main.py59
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.py134
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter2/createdb.py131
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter2/main.py63
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate-old.py134
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate.py133
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py138
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/chapter3.rst121
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/createdb.py131
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/main-old.py52
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/main.py53
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/hello_world_ex.py76
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/index.rst194
-rw-r--r--sources/pyside2/doc/tutorials/qmlapp/main.py82
-rw-r--r--sources/pyside2/doc/tutorials/qmlapp/qmlapplication.rst132
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/main.py113
-rw-r--r--sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst111
-rw-r--r--sources/pyside2/doc/tutorials/qmlsqlintegration/main.py85
-rw-r--r--sources/pyside2/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst225
-rw-r--r--sources/pyside2/doc/tutorials/qmlsqlintegration/sqlDialog.py146
-rw-r--r--sources/pyside2/libpyside/CMakeLists.txt210
-rw-r--r--sources/pyside2/libpyside/PySide2Config-spec.cmake.in16
-rw-r--r--sources/pyside2/libpyside/PySide2Config.cmake.in5
-rw-r--r--sources/pyside2/libpyside/class_property.cpp158
-rw-r--r--sources/pyside2/libpyside/dynamicqmetaobject.cpp588
-rw-r--r--sources/pyside2/libpyside/feature_select.cpp766
-rw-r--r--sources/pyside2/libpyside/globalreceiverv2.cpp348
-rw-r--r--sources/pyside2/libpyside/pyside.cpp616
-rw-r--r--sources/pyside2/libpyside/pyside2.pc.in15
-rw-r--r--sources/pyside2/libpyside/pysideclassinfo.cpp207
-rw-r--r--sources/pyside2/libpyside/pysidemetafunction.cpp231
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp634
-rw-r--r--sources/pyside2/libpyside/pysidesignal.cpp1040
-rw-r--r--sources/pyside2/libpyside/pysideslot.cpp199
-rw-r--r--sources/pyside2/plugins/CMakeLists.txt41
-rw-r--r--sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py161
-rw-r--r--sources/pyside2/tests/QtCharts/qcharts_test.py69
-rw-r--r--sources/pyside2/tests/QtCore/attr_cache_py3k.py73
-rw-r--r--sources/pyside2/tests/QtCore/blocking_signals_test.py148
-rw-r--r--sources/pyside2/tests/QtCore/bug_1019.py67
-rw-r--r--sources/pyside2/tests/QtCore/bug_1063.py64
-rw-r--r--sources/pyside2/tests/QtCore/bug_1069.py58
-rw-r--r--sources/pyside2/tests/QtCore/bug_1313.py82
-rw-r--r--sources/pyside2/tests/QtCore/bug_278_test.py58
-rw-r--r--sources/pyside2/tests/QtCore/bug_332.py53
-rw-r--r--sources/pyside2/tests/QtCore/bug_408.py62
-rw-r--r--sources/pyside2/tests/QtCore/bug_428.py52
-rw-r--r--sources/pyside2/tests/QtCore/bug_462.py79
-rw-r--r--sources/pyside2/tests/QtCore/bug_505.py56
-rw-r--r--sources/pyside2/tests/QtCore/bug_515.py54
-rw-r--r--sources/pyside2/tests/QtCore/bug_606.py68
-rw-r--r--sources/pyside2/tests/QtCore/bug_656.py45
-rw-r--r--sources/pyside2/tests/QtCore/bug_686.py123
-rw-r--r--sources/pyside2/tests/QtCore/bug_699.py52
-rw-r--r--sources/pyside2/tests/QtCore/bug_706.py61
-rw-r--r--sources/pyside2/tests/QtCore/bug_820.py103
-rw-r--r--sources/pyside2/tests/QtCore/bug_826.py64
-rw-r--r--sources/pyside2/tests/QtCore/bug_829.py72
-rw-r--r--sources/pyside2/tests/QtCore/bug_835.py100
-rw-r--r--sources/pyside2/tests/QtCore/bug_920.py59
-rw-r--r--sources/pyside2/tests/QtCore/bug_927.py58
-rw-r--r--sources/pyside2/tests/QtCore/bug_931.py55
-rw-r--r--sources/pyside2/tests/QtCore/bug_938.py50
-rw-r--r--sources/pyside2/tests/QtCore/bug_953.py54
-rw-r--r--sources/pyside2/tests/QtCore/bug_987.py49
-rw-r--r--sources/pyside2/tests/QtCore/bug_994.py60
-rw-r--r--sources/pyside2/tests/QtCore/bug_PYSIDE-164.py75
-rw-r--r--sources/pyside2/tests/QtCore/bug_PYSIDE-42.py52
-rw-r--r--sources/pyside2/tests/QtCore/child_event_test.py86
-rw-r--r--sources/pyside2/tests/QtCore/classinfo_test.py111
-rw-r--r--sources/pyside2/tests/QtCore/deepcopy_test.py117
-rw-r--r--sources/pyside2/tests/QtCore/deletelater_test.py56
-rw-r--r--sources/pyside2/tests/QtCore/destroysignal_test.py62
-rw-r--r--sources/pyside2/tests/QtCore/duck_punching_test.py105
-rw-r--r--sources/pyside2/tests/QtCore/emoji_string_test.py85
-rw-r--r--sources/pyside2/tests/QtCore/hash_test.py93
-rw-r--r--sources/pyside2/tests/QtCore/inherits_test.py50
-rw-r--r--sources/pyside2/tests/QtCore/max_signals.py68
-rw-r--r--sources/pyside2/tests/QtCore/missing_symbols_test.py50
-rw-r--r--sources/pyside2/tests/QtCore/mockclass_test.py62
-rw-r--r--sources/pyside2/tests/QtCore/multiple_feature_test.py141
-rw-r--r--sources/pyside2/tests/QtCore/python_conversion.py100
-rw-r--r--sources/pyside2/tests/QtCore/qabs_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/qabstractitemmodel_test.py74
-rw-r--r--sources/pyside2/tests/QtCore/qanimationgroup_test.py60
-rw-r--r--sources/pyside2/tests/QtCore/qbitarray_test.py154
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py65
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py93
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_operator_test.py116
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_test.py279
-rw-r--r--sources/pyside2/tests/QtCore/qcalendar_test.py53
-rw-r--r--sources/pyside2/tests/QtCore/qcbor_test.py80
-rw-r--r--sources/pyside2/tests/QtCore/qcollator_test.py66
-rw-r--r--sources/pyside2/tests/QtCore/qcommandlineparser_test.py61
-rw-r--r--sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py55
-rw-r--r--sources/pyside2/tests/QtCore/qcoreapplication_test.py46
-rw-r--r--sources/pyside2/tests/QtCore/qdatastream_test.py324
-rw-r--r--sources/pyside2/tests/QtCore/qdate_test.py68
-rw-r--r--sources/pyside2/tests/QtCore/qdatetime_test.py57
-rw-r--r--sources/pyside2/tests/QtCore/qeasingcurve_test.py60
-rw-r--r--sources/pyside2/tests/QtCore/qenum_test.py243
-rw-r--r--sources/pyside2/tests/QtCore/qevent_test.py59
-rw-r--r--sources/pyside2/tests/QtCore/qfile_test.py87
-rw-r--r--sources/pyside2/tests/QtCore/qfileinfo_test.py48
-rw-r--r--sources/pyside2/tests/QtCore/qfileread_test.py87
-rw-r--r--sources/pyside2/tests/QtCore/qflags_test.py128
-rw-r--r--sources/pyside2/tests/QtCore/qhandle_test.py51
-rw-r--r--sources/pyside2/tests/QtCore/qinstallmsghandler_test.py86
-rw-r--r--sources/pyside2/tests/QtCore/qjsondocument_test.py57
-rw-r--r--sources/pyside2/tests/QtCore/qlinef_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/qlocale_test.py74
-rw-r--r--sources/pyside2/tests/QtCore/qlockfile_test.py62
-rw-r--r--sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py51
-rw-r--r--sources/pyside2/tests/QtCore/qmetaobject_test.py96
-rw-r--r--sources/pyside2/tests/QtCore/qmimedatabase_test.py84
-rw-r--r--sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py83
-rw-r--r--sources/pyside2/tests/QtCore/qobject_children_segfault_test.py62
-rw-r--r--sources/pyside2/tests/QtCore/qobject_connect_notify_test.py111
-rw-r--r--sources/pyside2/tests/QtCore/qobject_destructor.py53
-rw-r--r--sources/pyside2/tests/QtCore/qobject_event_filter_test.py148
-rw-r--r--sources/pyside2/tests/QtCore/qobject_inherits_test.py131
-rw-r--r--sources/pyside2/tests/QtCore/qobject_objectproperty_test.py65
-rw-r--r--sources/pyside2/tests/QtCore/qobject_parent_test.py292
-rw-r--r--sources/pyside2/tests/QtCore/qobject_property_test.py75
-rw-r--r--sources/pyside2/tests/QtCore/qobject_protected_methods_test.py73
-rw-r--r--sources/pyside2/tests/QtCore/qobject_test.py88
-rw-r--r--sources/pyside2/tests/QtCore/qobject_timer_event_test.py79
-rw-r--r--sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py74
-rw-r--r--sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py47
-rw-r--r--sources/pyside2/tests/QtCore/qpoint_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/qprocess_test.py63
-rw-r--r--sources/pyside2/tests/QtCore/qproperty_decorator.py71
-rw-r--r--sources/pyside2/tests/QtCore/qrandomgenerator_test.py55
-rw-r--r--sources/pyside2/tests/QtCore/qrect_test.py147
-rw-r--r--sources/pyside2/tests/QtCore/qregularexpression_test.py64
-rw-r--r--sources/pyside2/tests/QtCore/qresource_test.py77
-rw-r--r--sources/pyside2/tests/QtCore/qsettings_test.py115
-rw-r--r--sources/pyside2/tests/QtCore/qsize_test.py61
-rw-r--r--sources/pyside2/tests/QtCore/qslot_object_test.py78
-rw-r--r--sources/pyside2/tests/QtCore/qsocketnotifier_test.py64
-rw-r--r--sources/pyside2/tests/QtCore/qsrand_test.py50
-rw-r--r--sources/pyside2/tests/QtCore/qstandardpaths_test.py55
-rw-r--r--sources/pyside2/tests/QtCore/qstorageinfo_test.py49
-rw-r--r--sources/pyside2/tests/QtCore/qstring_test.py57
-rw-r--r--sources/pyside2/tests/QtCore/qsysinfo_test.py49
-rw-r--r--sources/pyside2/tests/QtCore/qtextstream_test.py111
-rw-r--r--sources/pyside2/tests/QtCore/qthread_prod_cons_test.py142
-rw-r--r--sources/pyside2/tests/QtCore/qthread_signal_test.py97
-rw-r--r--sources/pyside2/tests/QtCore/qthread_test.py115
-rw-r--r--sources/pyside2/tests/QtCore/qtimer_singleshot_test.py112
-rw-r--r--sources/pyside2/tests/QtCore/qtimer_timeout_test.py92
-rw-r--r--sources/pyside2/tests/QtCore/qtimezone_test.py49
-rw-r--r--sources/pyside2/tests/QtCore/qtnamespace_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/qurl_test.py169
-rw-r--r--sources/pyside2/tests/QtCore/qurlquery_test.py62
-rw-r--r--sources/pyside2/tests/QtCore/quuid_test.py52
-rw-r--r--sources/pyside2/tests/QtCore/qversionnumber_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/repr_test.py111
-rw-r--r--sources/pyside2/tests/QtCore/resources_mc.py3571
-rw-r--r--sources/pyside2/tests/QtCore/setprop_on_ctor_test.py48
-rw-r--r--sources/pyside2/tests/QtCore/snake_prop_feature_test.py123
-rw-r--r--sources/pyside2/tests/QtCore/staticMetaObject_test.py57
-rw-r--r--sources/pyside2/tests/QtCore/static_method_test.py89
-rw-r--r--sources/pyside2/tests/QtCore/thread_signals_test.py65
-rw-r--r--sources/pyside2/tests/QtCore/tr_noop_test.py81
-rw-r--r--sources/pyside2/tests/QtCore/translation_test.py90
-rw-r--r--sources/pyside2/tests/QtCore/unaryoperator_test.py73
-rw-r--r--sources/pyside2/tests/QtCore/unicode_test.py68
-rw-r--r--sources/pyside2/tests/QtCore/versioninfo_test.py55
-rw-r--r--sources/pyside2/tests/QtDataVisualization/datavisualization_test.py92
-rw-r--r--sources/pyside2/tests/QtGui/bug_1091.py47
-rw-r--r--sources/pyside2/tests/QtGui/bug_300_test.py52
-rw-r--r--sources/pyside2/tests/QtGui/bug_367.py56
-rw-r--r--sources/pyside2/tests/QtGui/bug_480.py59
-rw-r--r--sources/pyside2/tests/QtGui/bug_606.py60
-rw-r--r--sources/pyside2/tests/QtGui/bug_617.py57
-rw-r--r--sources/pyside2/tests/QtGui/bug_652.py65
-rw-r--r--sources/pyside2/tests/QtGui/bug_660.py61
-rw-r--r--sources/pyside2/tests/QtGui/bug_716.py44
-rw-r--r--sources/pyside2/tests/QtGui/bug_740.py47
-rw-r--r--sources/pyside2/tests/QtGui/bug_743.py49
-rw-r--r--sources/pyside2/tests/QtGui/bug_991.py50
-rw-r--r--sources/pyside2/tests/QtGui/bug_PYSIDE-344.py70
-rw-r--r--sources/pyside2/tests/QtGui/bug_PYSIDE-41.py78
-rw-r--r--sources/pyside2/tests/QtGui/deepcopy_test.py151
-rw-r--r--sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py65
-rw-r--r--sources/pyside2/tests/QtGui/qcolor_reduce_test.py66
-rw-r--r--sources/pyside2/tests/QtGui/qcolor_test.py129
-rw-r--r--sources/pyside2/tests/QtGui/qcursor_test.py51
-rw-r--r--sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py68
-rw-r--r--sources/pyside2/tests/QtGui/qdesktopservices_test.py49
-rw-r--r--sources/pyside2/tests/QtGui/qfontmetrics_test.py233
-rw-r--r--sources/pyside2/tests/QtGui/qguiapplication_test.py46
-rw-r--r--sources/pyside2/tests/QtGui/qicon_test.py50
-rw-r--r--sources/pyside2/tests/QtGui/qitemselection_test.py53
-rw-r--r--sources/pyside2/tests/QtGui/qkeysequence_test.py54
-rw-r--r--sources/pyside2/tests/QtGui/qpainter_test.py117
-rw-r--r--sources/pyside2/tests/QtGui/qpdfwriter_test.py54
-rw-r--r--sources/pyside2/tests/QtGui/qpixelformat_test.py56
-rw-r--r--sources/pyside2/tests/QtGui/qpixmap_test.py90
-rw-r--r--sources/pyside2/tests/QtGui/qpixmapcache_test.py79
-rw-r--r--sources/pyside2/tests/QtGui/qpolygonf_test.py66
-rw-r--r--sources/pyside2/tests/QtGui/qradialgradient_test.py63
-rw-r--r--sources/pyside2/tests/QtGui/qrasterwindow_test.py92
-rw-r--r--sources/pyside2/tests/QtGui/qregion_test.py54
-rw-r--r--sources/pyside2/tests/QtGui/qstylehints_test.py48
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocument_functions.py50
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py64
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py54
-rw-r--r--sources/pyside2/tests/QtGui/qtextline_test.py56
-rw-r--r--sources/pyside2/tests/QtGui/qtransform_test.py108
-rw-r--r--sources/pyside2/tests/QtGui/repr_test.py114
-rw-r--r--sources/pyside2/tests/QtGui/timed_app_and_patching_test.py66
-rw-r--r--sources/pyside2/tests/QtHelp/help_test.py47
-rw-r--r--sources/pyside2/tests/QtHelp/helpsearchengine_test.py50
-rw-r--r--sources/pyside2/tests/QtLocation/location.py49
-rw-r--r--sources/pyside2/tests/QtMultimedia/audio_test.py78
-rw-r--r--sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py65
-rw-r--r--sources/pyside2/tests/QtNetwork/accessManager_test.py77
-rw-r--r--sources/pyside2/tests/QtNetwork/bug_1084.py51
-rw-r--r--sources/pyside2/tests/QtNetwork/bug_446.py83
-rw-r--r--sources/pyside2/tests/QtNetwork/dnslookup_test.py65
-rw-r--r--sources/pyside2/tests/QtNetwork/qipv6address_test.py56
-rw-r--r--sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py51
-rw-r--r--sources/pyside2/tests/QtNetwork/tcpserver_test.py58
-rw-r--r--sources/pyside2/tests/QtNetwork/udpsocket_test.py85
-rw-r--r--sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py98
-rw-r--r--sources/pyside2/tests/QtOpenGL/qopenglwindow_test.py111
-rw-r--r--sources/pyside2/tests/QtPositioning/positioning.py51
-rw-r--r--sources/pyside2/tests/QtPrintSupport/bug_500.py49
-rw-r--r--sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py87
-rw-r--r--sources/pyside2/tests/QtQml/bug_1029.py64
-rw-r--r--sources/pyside2/tests/QtQml/bug_451.py105
-rw-r--r--sources/pyside2/tests/QtQml/bug_456.py77
-rw-r--r--sources/pyside2/tests/QtQml/bug_557.py50
-rw-r--r--sources/pyside2/tests/QtQml/bug_726.py78
-rw-r--r--sources/pyside2/tests/QtQml/bug_814.py80
-rw-r--r--sources/pyside2/tests/QtQml/bug_825.py88
-rw-r--r--sources/pyside2/tests/QtQml/bug_847.py93
-rw-r--r--sources/pyside2/tests/QtQml/bug_915.py64
-rw-r--r--sources/pyside2/tests/QtQml/bug_926.py75
-rw-r--r--sources/pyside2/tests/QtQml/bug_951.py68
-rw-r--r--sources/pyside2/tests/QtQml/bug_995.py52
-rw-r--r--sources/pyside2/tests/QtQml/bug_997.py59
-rw-r--r--sources/pyside2/tests/QtQml/connect_python_qml.py72
-rw-r--r--sources/pyside2/tests/QtQml/javascript_exceptions.py110
-rw-r--r--sources/pyside2/tests/QtQml/listproperty.py81
-rw-r--r--sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py102
-rw-r--r--sources/pyside2/tests/QtQml/qqmlnetwork_test.py78
-rw-r--r--sources/pyside2/tests/QtQml/qquickitem_grabToImage.py88
-rw-r--r--sources/pyside2/tests/QtQml/qquickview_test.py98
-rw-r--r--sources/pyside2/tests/QtQml/registersingletontype.py86
-rw-r--r--sources/pyside2/tests/QtQml/registertype.py125
-rw-r--r--sources/pyside2/tests/QtQml/registeruncreatabletype.py80
-rw-r--r--sources/pyside2/tests/QtQml/signal_arguments.py77
-rw-r--r--sources/pyside2/tests/QtScxml/test_dynamic.py58
-rw-r--r--sources/pyside2/tests/QtSensors/sensors.py63
-rw-r--r--sources/pyside2/tests/QtSerialPort/serial.py95
-rw-r--r--sources/pyside2/tests/QtSql/bug_1013.py66
-rw-r--r--sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py105
-rw-r--r--sources/pyside2/tests/QtSql/qvarianttype_test.py61
-rw-r--r--sources/pyside2/tests/QtSvg/qsvggenerator_test.py70
-rw-r--r--sources/pyside2/tests/QtSvg/qsvgrenderer_test.py60
-rw-r--r--sources/pyside2/tests/QtSvgWidgets/qsvgwidget_test.py64
-rw-r--r--sources/pyside2/tests/QtTest/click_test.py61
-rw-r--r--sources/pyside2/tests/QtTest/eventfilter_test.py81
-rw-r--r--sources/pyside2/tests/QtTest/qvalidator_test.py140
-rw-r--r--sources/pyside2/tests/QtTest/touchevent_test.py83
-rw-r--r--sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py69
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_1060.py54
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_360.py70
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_376.py53
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_392.py84
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_426.py55
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_552.py57
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_797.py49
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_909.py57
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_913.py57
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_958.py59
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_965.py55
-rw-r--r--sources/pyside2/tests/QtUiTools/loadUiType_test.py75
-rw-r--r--sources/pyside2/tests/QtUiTools/ui_test.py47
-rw-r--r--sources/pyside2/tests/QtUiTools/uiloader_test.py79
-rw-r--r--sources/pyside2/tests/QtWebEngine/web_engine_initialize.py52
-rw-r--r--sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py97
-rw-r--r--sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py86
-rw-r--r--sources/pyside2/tests/QtWidgets/action_clear.py80
-rw-r--r--sources/pyside2/tests/QtWidgets/add_action_test.py78
-rw-r--r--sources/pyside2/tests/QtWidgets/api2_test.py94
-rw-r--r--sources/pyside2/tests/QtWidgets/application_test.py65
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1002.py53
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1006.py116
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1048.py44
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1077.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_172.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_243.py50
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_307.py60
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_324.py65
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_338.py60
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_389.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_400.py61
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_429.py46
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_430.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_433.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_467.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_493.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_512.py57
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_525.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_546.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_547.py91
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_549.py50
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_569.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_575.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_576.py68
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_585.py59
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_589.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_635.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_640.py46
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_653.py52
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_662.py63
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_667.py59
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_668.py59
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_674.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_675.py51
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_688.py123
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_693.py66
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_696.py60
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_711.py61
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_722.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_728.py59
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_736.py53
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_750.py60
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_778.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_785.py63
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_793.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_811.py66
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_834.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_836.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_844.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_854.py75
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_860.py68
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_862.py97
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_871.py77
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_879.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_919.py72
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_921.py85
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_941.py52
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_964.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_967.py53
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_972.py74
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_979.py45
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_988.py53
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_998.py45
-rw-r--r--sources/pyside2/tests/QtWidgets/customproxywidget_test.py68
-rw-r--r--sources/pyside2/tests/QtWidgets/event_filter_test.py72
-rw-r--r--sources/pyside2/tests/QtWidgets/grandparent_method_test.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/hashabletype_test.py52
-rw-r--r--sources/pyside2/tests/QtWidgets/keep_reference_test.py109
-rw-r--r--sources/pyside2/tests/QtWidgets/missing_symbols_test.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/paint_event_test.py104
-rw-r--r--sources/pyside2/tests/QtWidgets/parent_method_test.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/private_mangle_test.py128
-rw-r--r--sources/pyside2/tests/QtWidgets/python_properties_test.py52
-rw-r--r--sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py80
-rw-r--r--sources/pyside2/tests/QtWidgets/qaction_test.py76
-rw-r--r--sources/pyside2/tests/QtWidgets/qapp_issue_585.py76
-rw-r--r--sources/pyside2/tests/QtWidgets/qapp_test.py52
-rw-r--r--sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/qapplication_test.py46
-rw-r--r--sources/pyside2/tests/QtWidgets/qbrush_test.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/qcolormap_test.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/qdynamic_signal.py61
-rw-r--r--sources/pyside2/tests/QtWidgets/qfontdialog_test.py56
-rw-r--r--sources/pyside2/tests/QtWidgets/qformlayout_test.py91
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py69
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py82
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py64
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py224
-rw-r--r--sources/pyside2/tests/QtWidgets/qimage_test.py309
-rw-r--r--sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py53
-rw-r--r--sources/pyside2/tests/QtWidgets/qlabel_test.py88
-rw-r--r--sources/pyside2/tests/QtWidgets/qlayout_ref_test.py185
-rw-r--r--sources/pyside2/tests/QtWidgets/qlayout_test.py145
-rw-r--r--sources/pyside2/tests/QtWidgets/qlcdnumber_test.py50
-rw-r--r--sources/pyside2/tests/QtWidgets/qlistwidget_test.py94
-rw-r--r--sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py62
-rw-r--r--sources/pyside2/tests/QtWidgets/qmainwindow_test.py118
-rw-r--r--sources/pyside2/tests/QtWidgets/qmenu_test.py92
-rw-r--r--sources/pyside2/tests/QtWidgets/qmenuadd_test.py58
-rw-r--r--sources/pyside2/tests/QtWidgets/qobject_mi_test.py76
-rw-r--r--sources/pyside2/tests/QtWidgets/qpen_test.py79
-rw-r--r--sources/pyside2/tests/QtWidgets/qpicture_test.py71
-rw-r--r--sources/pyside2/tests/QtWidgets/qpixmap_constructor.py285
-rw-r--r--sources/pyside2/tests/QtWidgets/qpushbutton_test.py75
-rw-r--r--sources/pyside2/tests/QtWidgets/qshortcut_test.py83
-rw-r--r--sources/pyside2/tests/QtWidgets/qsplitter_test.py51
-rw-r--r--sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py106
-rw-r--r--sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py67
-rw-r--r--sources/pyside2/tests/QtWidgets/qstyle_test.py98
-rw-r--r--sources/pyside2/tests/QtWidgets/qtableview_test.py50
-rw-r--r--sources/pyside2/tests/QtWidgets/qtabwidget_test.py62
-rw-r--r--sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py69
-rw-r--r--sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py72
-rw-r--r--sources/pyside2/tests/QtWidgets/qtextedit_test.py67
-rw-r--r--sources/pyside2/tests/QtWidgets/qtoolbar_test.py69
-rw-r--r--sources/pyside2/tests/QtWidgets/qtoolbox_test.py65
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreeview_test.py102
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreewidget_test.py70
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreewidgetitem_test.py74
-rw-r--r--sources/pyside2/tests/QtWidgets/qvariant_test.py83
-rw-r--r--sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py67
-rw-r--r--sources/pyside2/tests/QtWidgets/qwidget_test.py80
-rw-r--r--sources/pyside2/tests/QtWidgets/reference_count_test.py102
-rw-r--r--sources/pyside2/tests/QtWidgets/signature_test.py94
-rw-r--r--sources/pyside2/tests/QtWidgets/standardpixmap_test.py49
-rw-r--r--sources/pyside2/tests/QtWidgets/test_module_template.py48
-rw-r--r--sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py103
-rw-r--r--sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py83
-rw-r--r--sources/pyside2/tests/QtWidgets/wrong_return_test.py62
-rw-r--r--sources/pyside2/tests/QtXml/qdomdocument_test.py104
-rw-r--r--sources/pyside2/tests/init_paths.py104
-rw-r--r--sources/pyside2/tests/mac/qmacstyle_test.py54
-rw-r--r--sources/pyside2/tests/manually/bug_841.py79
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt173
-rw-r--r--sources/pyside2/tests/pysidetest/all_modules_load_test.py51
-rw-r--r--sources/pyside2/tests/pysidetest/constructor_properties_test.py70
-rw-r--r--sources/pyside2/tests/pysidetest/decoratedslot_test.py74
-rw-r--r--sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py105
-rw-r--r--sources/pyside2/tests/pysidetest/embedding_test.py80
-rw-r--r--sources/pyside2/tests/pysidetest/iterable_test.py91
-rw-r--r--sources/pyside2/tests/pysidetest/list_signal_test.py58
-rw-r--r--sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py223
-rw-r--r--sources/pyside2/tests/pysidetest/modelview_test.py105
-rw-r--r--sources/pyside2/tests/pysidetest/new_inherited_functions_test.py198
-rw-r--r--sources/pyside2/tests/pysidetest/notify_id.py83
-rw-r--r--sources/pyside2/tests/pysidetest/properties_test.py132
-rw-r--r--sources/pyside2/tests/pysidetest/property_python_test.py231
-rw-r--r--sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py88
-rw-r--r--sources/pyside2/tests/pysidetest/qvariant_test.py51
-rw-r--r--sources/pyside2/tests/pysidetest/signal_slot_warning.py76
-rw-r--r--sources/pyside2/tests/pysidetest/signal_tp_descr_get_test.py87
-rw-r--r--sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py114
-rw-r--r--sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py102
-rw-r--r--sources/pyside2/tests/pysidetest/typedef_signal_test.py60
-rw-r--r--sources/pyside2/tests/pysidetest/version_test.py54
-rw-r--r--sources/pyside2/tests/registry/existence_test.py253
-rw-r--r--sources/pyside2/tests/registry/init_platform.py255
-rw-r--r--sources/pyside2/tests/registry/util.py181
-rw-r--r--sources/pyside2/tests/signals/args_dont_match_test.py57
-rw-r--r--sources/pyside2/tests/signals/bug_189.py60
-rw-r--r--sources/pyside2/tests/signals/bug_311.py77
-rw-r--r--sources/pyside2/tests/signals/bug_312.py85
-rw-r--r--sources/pyside2/tests/signals/bug_319.py70
-rw-r--r--sources/pyside2/tests/signals/bug_79.py76
-rw-r--r--sources/pyside2/tests/signals/decorators_test.py111
-rw-r--r--sources/pyside2/tests/signals/disconnect_test.py92
-rw-r--r--sources/pyside2/tests/signals/invalid_callback_test.py62
-rw-r--r--sources/pyside2/tests/signals/lambda_gui_test.py79
-rw-r--r--sources/pyside2/tests/signals/lambda_test.py98
-rw-r--r--sources/pyside2/tests/signals/leaking_signal_test.py51
-rw-r--r--sources/pyside2/tests/signals/multiple_connections_gui_test.py95
-rw-r--r--sources/pyside2/tests/signals/multiple_connections_test.py109
-rw-r--r--sources/pyside2/tests/signals/pysignal_test.py221
-rw-r--r--sources/pyside2/tests/signals/qobject_destroyed_test.py56
-rw-r--r--sources/pyside2/tests/signals/qobject_receivers_test.py83
-rw-r--r--sources/pyside2/tests/signals/qobject_sender_test.py127
-rw-r--r--sources/pyside2/tests/signals/ref01_test.py62
-rw-r--r--sources/pyside2/tests/signals/ref02_test.py82
-rw-r--r--sources/pyside2/tests/signals/ref03_test.py64
-rw-r--r--sources/pyside2/tests/signals/ref04_test.py91
-rw-r--r--sources/pyside2/tests/signals/ref05_test.py81
-rw-r--r--sources/pyside2/tests/signals/ref06_test.py84
-rw-r--r--sources/pyside2/tests/signals/segfault_proxyparent_test.py92
-rw-r--r--sources/pyside2/tests/signals/self_connect_test.py71
-rw-r--r--sources/pyside2/tests/signals/short_circuit_test.py97
-rw-r--r--sources/pyside2/tests/signals/signal2signal_connect_test.py142
-rw-r--r--sources/pyside2/tests/signals/signal_across_threads.py106
-rw-r--r--sources/pyside2/tests/signals/signal_autoconnect_test.py65
-rw-r--r--sources/pyside2/tests/signals/signal_connectiontype_support_test.py61
-rw-r--r--sources/pyside2/tests/signals/signal_emission_gui_test.py148
-rw-r--r--sources/pyside2/tests/signals/signal_emission_test.py158
-rw-r--r--sources/pyside2/tests/signals/signal_enum_test.py80
-rw-r--r--sources/pyside2/tests/signals/signal_func_test.py55
-rw-r--r--sources/pyside2/tests/signals/signal_manager_refcount_test.py59
-rw-r--r--sources/pyside2/tests/signals/signal_number_limit_test.py97
-rw-r--r--sources/pyside2/tests/signals/signal_object_test.py121
-rw-r--r--sources/pyside2/tests/signals/signal_signature_test.py121
-rw-r--r--sources/pyside2/tests/signals/signal_with_primitive_type_test.py65
-rw-r--r--sources/pyside2/tests/signals/slot_reference_count_test.py87
-rw-r--r--sources/pyside2/tests/signals/static_metaobject_test.py92
-rw-r--r--sources/pyside2/tests/support/voidptr_test.py71
-rwxr-xr-xsources/pyside2/tests/tools/list-class-hierarchy.py116
-rw-r--r--sources/pyside2/tests/util/helper/timedqapplication.py49
-rw-r--r--sources/pyside2/tests/util/helper/usesqapplication.py51
-rw-r--r--sources/pyside2/tests/util/helper/usesqcoreapplication.py59
-rw-r--r--sources/pyside2/tests/util/helper/usesqguiapplication.py49
-rw-r--r--sources/pyside2/tests/util/pyqt_diff.py64
-rw-r--r--sources/pyside6/.gitattributes (renamed from sources/pyside2/.gitattributes)0
-rw-r--r--sources/pyside6/.gitignore (renamed from sources/pyside2/.gitignore)0
-rw-r--r--sources/pyside6/CMakeLists.txt266
-rw-r--r--sources/pyside6/COPYING (renamed from sources/pyside2/COPYING)0
-rw-r--r--sources/pyside6/PySide6/CMakeLists.txt106
-rw-r--r--sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt57
-rw-r--r--sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml83
-rw-r--r--sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt54
-rw-r--r--sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml109
-rw-r--r--sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt78
-rw-r--r--sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml87
-rw-r--r--sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt51
-rw-r--r--sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml90
-rw-r--r--sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt32
-rw-r--r--sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml49
-rw-r--r--sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt140
-rw-r--r--sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml256
-rw-r--r--sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt44
-rw-r--r--sources/pyside6/PySide6/QtAxContainer/QtAxContainer_global.post.h.in (renamed from sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml69
-rw-r--r--sources/pyside6/PySide6/QtCharts/CMakeLists.txt85
-rw-r--r--sources/pyside6/PySide6/QtCharts/typesystem_charts.xml272
-rw-r--r--sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt31
-rw-r--r--sources/pyside6/PySide6/QtConcurrent/curr_errors.txt (renamed from sources/pyside2/PySide2/QtConcurrent/curr_errors.txt)0
-rw-r--r--sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml71
-rw-r--r--sources/pyside6/PySide6/QtCore/CMakeLists.txt208
-rw-r--r--sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in (renamed from sources/pyside2/PySide2/QtCore/QtCore_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.cpp (renamed from sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp)0
-rw-r--r--sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.h (renamed from sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.h)0
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core.xml.in45
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml3022
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_mac.xml57
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_win.xml82
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_x11.xml61
-rw-r--r--sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt65
-rw-r--r--sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml422
-rw-r--r--sources/pyside6/PySide6/QtGui/CMakeLists.txt234
-rw-r--r--sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in (renamed from sources/pyside2/PySide2/QtGui/QtGui_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui.xml.in46
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml2864
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_mac.xml50
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml42
-rw-r--r--sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml42
-rw-r--r--sources/pyside6/PySide6/QtHelp/CMakeLists.txt60
-rw-r--r--sources/pyside6/PySide6/QtHelp/typesystem_help.xml71
-rw-r--r--sources/pyside6/PySide6/QtLocation/CMakeLists.txt75
-rw-r--r--sources/pyside6/PySide6/QtLocation/typesystem_location.xml116
-rw-r--r--sources/pyside6/PySide6/QtMacExtras/CMakeLists.txt33
-rw-r--r--sources/pyside6/PySide6/QtMacExtras/typesystem_macextras.xml55
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt130
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml45
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_common.xml372
-rw-r--r--sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_forward_declarations.xml45
-rw-r--r--sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt42
-rw-r--r--sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml52
-rw-r--r--sources/pyside6/PySide6/QtNetwork/CMakeLists.txt107
-rw-r--r--sources/pyside6/PySide6/QtNetwork/typesystem_network.xml311
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt59
-rw-r--r--sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml173
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt74
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml404
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml (renamed from sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml)0
-rw-r--r--sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt34
-rw-r--r--sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml50
-rw-r--r--sources/pyside6/PySide6/QtPositioning/CMakeLists.txt50
-rw-r--r--sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml80
-rw-r--r--sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt43
-rw-r--r--sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml.in45
-rw-r--r--sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport_common.xml123
-rw-r--r--sources/pyside6/PySide6/QtQml/CMakeLists.txt63
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp732
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlregistertype.h (renamed from sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h)0
-rw-r--r--sources/pyside6/PySide6/QtQml/typesystem_qml.xml246
-rw-r--r--sources/pyside6/PySide6/QtQuick/CMakeLists.txt83
-rw-r--r--sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp211
-rw-r--r--sources/pyside6/PySide6/QtQuick/pysidequickregistertype.h (renamed from sources/pyside2/PySide2/QtQuick/pysidequickregistertype.h)0
-rw-r--r--sources/pyside6/PySide6/QtQuick/typesystem_quick.xml168
-rw-r--r--sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt41
-rw-r--r--sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml47
-rw-r--r--sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt43
-rw-r--r--sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml54
-rw-r--r--sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt45
-rw-r--r--sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml75
-rw-r--r--sources/pyside6/PySide6/QtScxml/CMakeLists.txt55
-rw-r--r--sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml86
-rw-r--r--sources/pyside6/PySide6/QtSensors/CMakeLists.txt100
-rw-r--r--sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml127
-rw-r--r--sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt31
-rw-r--r--sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml56
-rw-r--r--sources/pyside6/PySide6/QtSql/CMakeLists.txt49
-rw-r--r--sources/pyside6/PySide6/QtSql/QtSql_global.pre.h.in (renamed from sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtSql/typesystem_sql.xml194
-rw-r--r--sources/pyside6/PySide6/QtSvg/CMakeLists.txt31
-rw-r--r--sources/pyside6/PySide6/QtSvg/typesystem_svg.xml61
-rw-r--r--sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt39
-rw-r--r--sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml60
-rw-r--r--sources/pyside6/PySide6/QtTest/CMakeLists.txt40
-rw-r--r--sources/pyside6/PySide6/QtTest/QtTest_global.post.h.in (renamed from sources/pyside2/PySide2/QtTest/QtTest_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtTest/QtTest_global.pre.h.in (renamed from sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtTest/typesystem_test.xml168
-rw-r--r--sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt30
-rw-r--r--sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml53
-rw-r--r--sources/pyside6/PySide6/QtUiTools/CMakeLists.txt42
-rw-r--r--sources/pyside6/PySide6/QtUiTools/glue/plugins.h (renamed from sources/pyside2/PySide2/QtUiTools/glue/plugins.h)0
-rw-r--r--sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml157
-rw-r--r--sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt28
-rw-r--r--sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml55
-rw-r--r--sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt27
-rw-r--r--sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml45
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt41
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml75
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt55
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml130
-rw-r--r--sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt36
-rw-r--r--sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml78
-rw-r--r--sources/pyside6/PySide6/QtWidgets/CMakeLists.txt225
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml.in46
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml3326
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets_mac.xml55
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets_win.xml42
-rw-r--r--sources/pyside6/PySide6/QtWidgets/typesystem_widgets_x11.xml42
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt48
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in (renamed from sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml66
-rw-r--r--sources/pyside6/PySide6/QtX11Extras/CMakeLists.txt33
-rw-r--r--sources/pyside6/PySide6/QtX11Extras/QtX11Extras_global.post.h.in (renamed from sources/pyside2/PySide2/QtX11Extras/QtX11Extras_global.post.h.in)0
-rw-r--r--sources/pyside6/PySide6/QtX11Extras/typesystem_x11extras.xml49
-rw-r--r--sources/pyside6/PySide6/QtXml/CMakeLists.txt41
-rw-r--r--sources/pyside6/PySide6/QtXml/typesystem_xml.xml215
-rw-r--r--sources/pyside6/PySide6/__init__.py.in108
-rw-r--r--sources/pyside6/PySide6/_config.py.in (renamed from sources/pyside2/PySide2/_config.py.in)0
-rw-r--r--sources/pyside6/PySide6/global.h.in (renamed from sources/pyside2/PySide2/global.h.in)0
-rw-r--r--sources/pyside6/PySide6/glue/qtcharts.cpp (renamed from sources/pyside2/PySide2/glue/qtcharts.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp1879
-rw-r--r--sources/pyside6/PySide6/glue/qtdatavisualization.cpp (renamed from sources/pyside2/PySide2/glue/qtdatavisualization.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp (renamed from sources/pyside2/PySide2/glue/qtgui.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtmultimedia.cpp (renamed from sources/pyside2/PySide2/glue/qtmultimedia.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtnetwork.cpp (renamed from sources/pyside2/PySide2/glue/qtnetwork.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtopengl.cpp (renamed from sources/pyside2/PySide2/glue/qtopengl.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtprintsupport.cpp (renamed from sources/pyside2/PySide2/glue/qtprintsupport.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtqml.cpp (renamed from sources/pyside2/PySide2/glue/qtqml.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtquick.cpp (renamed from sources/pyside2/PySide2/glue/qtquick.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtscript.cpp (renamed from sources/pyside2/PySide2/glue/qtscript.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtuitools.cpp238
-rw-r--r--sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp (renamed from sources/pyside2/PySide2/glue/qtwebenginewidgets.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp (renamed from sources/pyside2/PySide2/glue/qtwebkitwidgets.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtwidgets.cpp (renamed from sources/pyside2/PySide2/glue/qtwidgets.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtxml.cpp (renamed from sources/pyside2/PySide2/glue/qtxml.cpp)0
-rw-r--r--sources/pyside6/PySide6/glue/qtxmlpatterns.cpp (renamed from sources/pyside2/PySide2/glue/qtxmlpatterns.cpp)0
-rw-r--r--sources/pyside6/PySide6/licensecomment.txt (renamed from sources/pyside2/PySide2/licensecomment.txt)0
-rw-r--r--sources/pyside6/PySide6/py.typed.in (renamed from sources/pyside2/PySide2/py.typed.in)0
-rw-r--r--sources/pyside6/PySide6/pysideqtesttouch.h (renamed from sources/pyside2/PySide2/pysideqtesttouch.h)0
-rw-r--r--sources/pyside6/PySide6/pysidewtypes.h (renamed from sources/pyside2/PySide2/pysidewtypes.h)0
-rw-r--r--sources/pyside6/PySide6/qpytextobject.cpp (renamed from sources/pyside2/PySide2/qpytextobject.cpp)0
-rw-r--r--sources/pyside6/PySide6/qpytextobject.h (renamed from sources/pyside2/PySide2/qpytextobject.h)0
-rw-r--r--sources/pyside6/PySide6/qt.conf.in (renamed from sources/pyside2/PySide2/qt.conf.in)0
-rw-r--r--sources/pyside6/PySide6/qtcorehelper.h (renamed from sources/pyside2/PySide2/qtcorehelper.h)0
-rw-r--r--sources/pyside6/PySide6/support/__init__.py (renamed from sources/pyside2/PySide2/support/__init__.py)0
-rw-r--r--sources/pyside6/PySide6/support/deprecated.py80
-rw-r--r--sources/pyside6/PySide6/support/generate_pyi.py324
-rw-r--r--sources/pyside6/PySide6/templates/core_common.xml (renamed from sources/pyside2/PySide2/templates/core_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/datavisualization_common.xml (renamed from sources/pyside2/PySide2/templates/datavisualization_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/gui_common.xml307
-rw-r--r--sources/pyside6/PySide6/templates/opengl_common.xml (renamed from sources/pyside2/PySide2/templates/opengl_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/openglfunctions_common.xml (renamed from sources/pyside2/PySide2/templates/openglfunctions_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/webkitwidgets_common.xml (renamed from sources/pyside2/PySide2/templates/webkitwidgets_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/widgets_common.xml (renamed from sources/pyside2/PySide2/templates/widgets_common.xml)0
-rw-r--r--sources/pyside6/PySide6/templates/xml_common.xml (renamed from sources/pyside2/PySide2/templates/xml_common.xml)0
-rw-r--r--sources/pyside6/cmake/Macros/FindQt5Extra.cmake (renamed from sources/pyside2/cmake/Macros/FindQt5Extra.cmake)0
-rw-r--r--sources/pyside6/cmake/Macros/PySideModules.cmake253
-rw-r--r--sources/pyside6/cmake/Macros/icecc.cmake (renamed from sources/pyside2/cmake/Macros/icecc.cmake)0
-rw-r--r--sources/pyside6/cmake_uninstall.cmake (renamed from sources/pyside2/cmake_uninstall.cmake)0
-rw-r--r--sources/pyside6/doc/CMakeLists.txt188
-rw-r--r--sources/pyside6/doc/_templates/layout.html (renamed from sources/pyside2/doc/_templates/layout.html)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/domainindex.html (renamed from sources/pyside2/doc/_themes/pysidedocs/domainindex.html)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/searchbox.html (renamed from sources/pyside2/doc/_themes/pysidedocs/searchbox.html)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/bg_header.png)bin36012 -> 36012 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg (renamed from sources/pyside2/doc/_themes/pysidedocs/static/bg_topo.jpg)bin14237 -> 14237 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/fakebar.png)bin101 -> 101 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg (renamed from sources/pyside2/doc/_themes/pysidedocs/static/logo_python.jpg)bin2660 -> 2660 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/logo_qt.png)bin1936 -> 1936 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/minus.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/minus.png)bin199 -> 199 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/plus.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/plus.png)bin199 -> 199 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/pyside.css (renamed from sources/pyside2/doc/_themes/pysidedocs/static/pyside.css)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/pysidelogo.png)bin4936 -> 4936 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png (renamed from sources/pyside2/doc/_themes/pysidedocs/static/relbar_bg.png)bin130 -> 130 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/theme.conf (renamed from sources/pyside2/doc/_themes/pysidedocs/theme.conf)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/domainindex.html (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/domainindex.html)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/fakebar.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/fakebar.png)bin101 -> 101 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg)bin2660 -> 2660 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_qt.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_qt.png)bin1936 -> 1936 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/minus.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/minus.png)bin199 -> 199 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/plus.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/plus.png)bin199 -> 199 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pyside.css)0
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png)bin4936 -> 4936 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png)bin130 -> 130 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/theme.conf (renamed from sources/pyside2/doc/_themes/pysidedocs_qthelp/theme.conf)0
-rw-r--r--sources/pyside6/doc/additionaldocs.lst (renamed from sources/pyside2/doc/additionaldocs.lst)0
-rw-r--r--sources/pyside6/doc/api.rst90
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/alphachannel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/audio/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/audio/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png)bin15518 -> 15518 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py105
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py52
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp60
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp74
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py43
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py54
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images/file.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images/file.png)bin313 -> 313 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dropactions/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/dropactions/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/droparea.cpp147
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/dropevents/window.py65
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/droprectangle/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/droprectangle/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/image/image.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/image/image.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/inherited-slot/button.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/inherited-slot/button.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/itemselection/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/itemselection/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass1.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass1.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass2.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass2.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass3.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass3.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/myscrollarea.cpp112
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp71
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/ntfsp.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/ntfsp.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyID.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyID.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/doc.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/doc.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/indented.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/indented.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/items.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/items.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/picture/picture.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp64
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp68
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/delegate.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/delegate.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/view.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/view.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png)bin27926 -> 27926 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py87
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png)bin437 -> 437 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png)bin440 -> 440 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png)bin437 -> 437 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png)bin440 -> 440 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py53
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/myform.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/myform.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/separations/finalwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/separations/finalwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/separations/screenwidget.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/separations/screenwidget.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/separations/viewer.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/separations/viewer.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp90
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/simpleparse/handler.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/simpleparse/handler.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py489
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/styles/styles.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/styles/styles.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png)bin16291 -> 16291 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png)bin5490 -> 5490 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png)bin16291 -> 16291 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/threads/threads.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/threads/threads.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/timers/timers.cpp88
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/transform/main.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/model.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/model.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/window.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/window.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/tux.png (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/tux.png)bin12191 -> 12191 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py66
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h (renamed from sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dbus/example-client.py100
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dbus/example-server.py119
-rw-r--r--sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp (renamed from sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml (renamed from sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.py (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.py)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/background.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/background.png)bin22578 -> 22578 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/banner.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/banner.png)bin3947 -> 3947 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png)bin1619 -> 1619 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png)bin1619 -> 1619 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png)bin1619 -> 1619 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png)bin14516 -> 14516 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png)bin14912 -> 14912 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/extension/finddialog.py119
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png)bin1810 -> 1810 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png)bin34998 -> 34998 bytes
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp (renamed from sources/pyside2/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp (renamed from sources/pyside2/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider-example.qml (renamed from sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider-example.qml)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider.cpp (renamed from sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp (renamed from sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp (renamed from sources/pyside2/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.h113
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.py357
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py253
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/mainwindow.py366
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py360
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/menus/mainwindow.py366
-rw-r--r--sources/pyside6/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp (renamed from sources/pyside2/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/quick/plugins/plugins.qml (renamed from sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp120
-rw-r--r--sources/pyside6/doc/codesnippets/examples/richtext/textobject/svgtextobject.h (renamed from sources/pyside2/doc/codesnippets/examples/richtext/textobject/svgtextobject.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/widgets/groupbox/window.cpp (renamed from sources/pyside2/doc/codesnippets/examples/widgets/groupbox/window.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp (renamed from sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp)0
-rw-r--r--sources/pyside6/doc/codesnippets/examples/widgets/spinboxes/window.py247
-rw-r--r--sources/pyside6/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h (renamed from sources/pyside2/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h)0
-rw-r--r--sources/pyside6/doc/codesnippets/snippets/customstyle/main.cpp61
-rw-r--r--sources/pyside6/doc/conf.py.in190
-rw-r--r--sources/pyside6/doc/considerations.rst149
-rw-r--r--sources/pyside6/doc/contents.rst (renamed from sources/pyside2/doc/contents.rst)0
-rw-r--r--sources/pyside6/doc/deployment-briefcase.rst199
-rw-r--r--sources/pyside6/doc/deployment-cxfreeze.rst130
-rw-r--r--sources/pyside6/doc/deployment-fbs.rst97
-rw-r--r--sources/pyside6/doc/deployment-pyinstaller.rst145
-rw-r--r--sources/pyside6/doc/deployment.rst (renamed from sources/pyside2/doc/deployment.rst)0
-rw-r--r--sources/pyside6/doc/examples/images/tabbedbrowser.png (renamed from sources/pyside2/doc/examples/images/tabbedbrowser.png)bin37147 -> 37147 bytes
-rw-r--r--sources/pyside6/doc/examples/index.rst14
-rw-r--r--sources/pyside6/doc/examples/tabbedbrowser.rst (renamed from sources/pyside2/doc/examples/tabbedbrowser.rst)0
-rw-r--r--sources/pyside6/doc/extras/QtCore.ClassInfo.rst23
-rw-r--r--sources/pyside6/doc/extras/QtCore.Property.rst62
-rw-r--r--sources/pyside6/doc/extras/QtCore.QEnum.rst92
-rw-r--r--sources/pyside6/doc/extras/QtCore.Signal.rst39
-rw-r--r--sources/pyside6/doc/extras/QtCore.Slot.rst39
-rw-r--r--sources/pyside6/doc/extras/QtCore.rst5
-rw-r--r--sources/pyside6/doc/extras/QtGui.rst7
-rw-r--r--sources/pyside6/doc/extras/QtHelp.rst5
-rw-r--r--sources/pyside6/doc/extras/QtMultimedia.rst7
-rw-r--r--sources/pyside6/doc/extras/QtNetwork.rst5
-rw-r--r--sources/pyside6/doc/extras/QtOpenGL.rst14
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlElement.rst28
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst44
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst41
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst36
-rw-r--r--sources/pyside6/doc/extras/QtScript.rst21
-rw-r--r--sources/pyside6/doc/extras/QtScriptTools.rst5
-rw-r--r--sources/pyside6/doc/extras/QtSql.rst5
-rw-r--r--sources/pyside6/doc/extras/QtSvg.rst5
-rw-r--r--sources/pyside6/doc/extras/QtTest.rst7
-rw-r--r--sources/pyside6/doc/extras/QtUiTools.loadUiType.rst36
-rw-r--r--sources/pyside6/doc/extras/QtUiTools.rst9
-rw-r--r--sources/pyside6/doc/extras/QtXml.rst5
-rw-r--r--sources/pyside6/doc/extras/QtXmlPatterns.rst12
-rw-r--r--sources/pyside6/doc/faq.rst37
-rw-r--r--sources/pyside6/doc/gettingstarted-linux.rst96
-rw-r--r--sources/pyside6/doc/gettingstarted-macOS.rst95
-rw-r--r--sources/pyside6/doc/gettingstarted-windows.rst97
-rw-r--r--sources/pyside6/doc/gettingstarted.rst218
-rw-r--r--sources/pyside6/doc/index.rst104
-rw-r--r--sources/pyside6/doc/inheritance_diagram.py372
-rw-r--r--sources/pyside6/doc/modules.rst97
-rw-r--r--sources/pyside6/doc/pyside-config.qdocconf.in19
-rw-r--r--sources/pyside6/doc/pyside-examples/examples.qdoc37
-rw-r--r--sources/pyside6/doc/pyside-examples/images/pysideexample-classwizard.png (renamed from sources/pyside2/doc/pyside-examples/images/pysideexample-classwizard.png)bin57931 -> 57931 bytes
-rw-r--r--sources/pyside6/doc/pyside-examples/images/pysideexample-stardelegate.png (renamed from sources/pyside2/doc/pyside-examples/images/pysideexample-stardelegate.png)bin22482 -> 22482 bytes
-rw-r--r--sources/pyside6/doc/pyside-examples/images/screenshot_hello.png (renamed from sources/pyside2/doc/pyside-examples/images/screenshot_hello.png)bin21193 -> 21193 bytes
-rw-r--r--sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc39
-rw-r--r--sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc39
-rw-r--r--sources/pyside6/doc/pysideinclude.py (renamed from sources/pyside2/doc/pysideinclude.py)0
-rw-r--r--sources/pyside6/doc/qtattributionsscannertorst.py (renamed from sources/pyside2/doc/qtattributionsscannertorst.py)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-examples.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qt3dextras.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qt3dextras.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtcharts.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtcharts.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtconcurrent.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtconcurrent.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtcore.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtcore.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtgui.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtgui.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qthelp.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qthelp.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtlocation.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtmacextras.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtnetwork.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtnetwork.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtopengl.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtopengl.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtpositioning.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtprintsupport.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtprintsupport.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtqml.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtqml.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtscxml.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtsensors.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtsensors.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtsql.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtsql.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtsvg.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtsvg.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qttest.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qttest.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qttexttospeech.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtuitools.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwebchannel.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtwebchannel.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwebsockets.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtwebsockets.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwidgets.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtwidgets.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtwinextras.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtx11extras.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtxml.qdocconf.in (renamed from sources/pyside2/doc/qtmodules/pyside-qtxml.qdocconf.in)0
-rw-r--r--sources/pyside6/doc/quickstart.rst118
-rw-r--r--sources/pyside6/doc/src/README.md (renamed from sources/pyside2/doc/src/README.md)0
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst90
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/dialog.rst145
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons.png)bin3202 -> 3202 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons/forward.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons/forward.png)bin1113 -> 1113 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons/pause.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons/pause.png)bin1001 -> 1001 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons/play.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons/play.png)bin970 -> 970 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons/previous.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons/previous.png)bin1050 -> 1050 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons/stop.png (renamed from sources/pyside2/doc/tutorials/basictutorial/icons/stop.png)bin1064 -> 1064 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/player-new.png (renamed from sources/pyside2/doc/tutorials/basictutorial/player-new.png)bin7818 -> 7818 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/player.png (renamed from sources/pyside2/doc/tutorials/basictutorial/player.png)bin5835 -> 5835 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/qml.rst67
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst169
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/style.qss (renamed from sources/pyside2/doc/tutorials/basictutorial/style.qss)0
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/uifiles.rst187
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgets.rst45
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png (renamed from sources/pyside2/doc/tutorials/basictutorial/widgetstyling-no.png)bin26444 -> 26444 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png (renamed from sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-no.png)bin3834 -> 3834 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png (renamed from sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-yes.png)bin4743 -> 4743 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png (renamed from sources/pyside2/doc/tutorials/basictutorial/widgetstyling-yes.png)bin32311 -> 32311 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py95
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst169
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_chart.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/add_chart.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/add_mainwindow.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/add_tableview.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/all_hour.csv (renamed from sources/pyside2/doc/tutorials/datavisualize/all_hour.csv)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2 (renamed from sources/pyside2/doc/tutorials/datavisualize/datavisualize.tar.bz2)bin6086 -> 6086 bytes
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py (renamed from sources/pyside2/doc/tutorials/datavisualize/datavisualize1/main.py)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py78
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py88
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py69
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py90
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py80
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py69
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py88
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py90
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py91
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py69
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py88
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py92
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py131
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py70
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py88
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/filter_data.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/filter_data.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/images/QMainWindow-layout.png (renamed from sources/pyside2/doc/tutorials/datavisualize/images/QMainWindow-layout.png)bin17272 -> 17272 bytes
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png (renamed from sources/pyside2/doc/tutorials/datavisualize/images/datavisualization_app.png)bin40458 -> 40458 bytes
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/index.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/index.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/plot_datapoints.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/read_data.rst (renamed from sources/pyside2/doc/tutorials/datavisualize/read_data.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/expenses/expenses.rst314
-rw-r--r--sources/pyside6/doc/tutorials/expenses/expenses_tool.png (renamed from sources/pyside2/doc/tutorials/expenses/expenses_tool.png)bin47826 -> 47826 bytes
-rw-r--r--sources/pyside6/doc/tutorials/expenses/main.py207
-rw-r--r--sources/pyside6/doc/tutorials/expenses/main_snake_prop.py210
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py59
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py71
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py78
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py90
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py118
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py138
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py165
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py178
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py185
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py207
-rw-r--r--sources/pyside6/doc/tutorials/index.rst (renamed from sources/pyside2/doc/tutorials/index.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst (renamed from sources/pyside2/doc/tutorials/portingguide/chapter1/chapter1.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py131
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/images/chapter1_books.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter1/images/chapter1_books.png)bin25391 -> 25391 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h (renamed from sources/pyside2/doc/tutorials/portingguide/chapter1/initdb.h)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/main.py59
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.cpp)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.h)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py134
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/chapter2.rst)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py131
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books.png)bin34658 -> 34658 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png)bin44122 -> 44122 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/images/star.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter2/images/star.png)bin782 -> 782 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/main.py63
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py134
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py133
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/books.qrc (renamed from sources/pyside2/doc/tutorials/portingguide/chapter3/books.qrc)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp (renamed from sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.cpp)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py138
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.ui (renamed from sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.ui)0
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst121
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py131
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/images/chapter3-books.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter3/images/chapter3-books.png)bin34624 -> 34624 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/images/star.png (renamed from sources/pyside2/doc/tutorials/portingguide/chapter3/images/star.png)bin782 -> 782 bytes
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py52
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/main.py53
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py76
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/index.rst194
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/logo.png (renamed from sources/pyside2/doc/tutorials/qmlapp/logo.png)bin6208 -> 6208 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/main.py82
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/newpyproject.png (renamed from sources/pyside2/doc/tutorials/qmlapp/newpyproject.png)bin16091 -> 16091 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/projectsmode.png (renamed from sources/pyside2/doc/tutorials/qmlapp/projectsmode.png)bin8848 -> 8848 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/pyprojname.png (renamed from sources/pyside2/doc/tutorials/qmlapp/pyprojname.png)bin8068 -> 8068 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/pyprojxplor.png (renamed from sources/pyside2/doc/tutorials/qmlapp/pyprojxplor.png)bin10062 -> 10062 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/qmlapplication.png (renamed from sources/pyside2/doc/tutorials/qmlapp/qmlapplication.png)bin10950 -> 10950 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst132
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/view.qml (renamed from sources/pyside2/doc/tutorials/qmlapp/view.qml)0
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/main.py113
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst111
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/qtquickcontrols2.conf (renamed from sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf)0
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/style.qrc (renamed from sources/pyside2/doc/tutorials/qmlintegration/style.qrc)0
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/textproperties_default.png (renamed from sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png)bin19347 -> 19347 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/textproperties_material.png (renamed from sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png)bin21170 -> 21170 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/view.qml (renamed from sources/pyside2/doc/tutorials/qmlintegration/view.qml)0
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml (renamed from sources/pyside2/doc/tutorials/qmlsqlintegration/chat.qml)0
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/example_list_view.png (renamed from sources/pyside2/doc/tutorials/qmlsqlintegration/example_list_view.png)bin6954 -> 6954 bytes
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/main.py85
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst225
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py146
-rw-r--r--sources/pyside6/doc/typesystem_doc.xml.in (renamed from sources/pyside2/doc/typesystem_doc.xml.in)0
-rw-r--r--sources/pyside6/doc/videos.rst (renamed from sources/pyside2/doc/videos.rst)0
-rw-r--r--sources/pyside6/libpyside/CMakeLists.txt210
-rw-r--r--sources/pyside6/libpyside/PySide6Config-spec.cmake.in16
-rw-r--r--sources/pyside6/libpyside/PySide6Config.cmake.in5
-rw-r--r--sources/pyside6/libpyside/PySide6ConfigVersion.cmake.in (renamed from sources/pyside2/libpyside/PySide2ConfigVersion.cmake.in)0
-rw-r--r--sources/pyside6/libpyside/class_property.cpp158
-rw-r--r--sources/pyside6/libpyside/class_property.h (renamed from sources/pyside2/libpyside/class_property.h)0
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject.cpp588
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject.h (renamed from sources/pyside2/libpyside/dynamicqmetaobject.h)0
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject_p.h (renamed from sources/pyside2/libpyside/dynamicqmetaobject_p.h)0
-rw-r--r--sources/pyside6/libpyside/feature_select.cpp766
-rw-r--r--sources/pyside6/libpyside/feature_select.h (renamed from sources/pyside2/libpyside/feature_select.h)0
-rw-r--r--sources/pyside6/libpyside/globalreceiverv2.cpp348
-rw-r--r--sources/pyside6/libpyside/globalreceiverv2.h (renamed from sources/pyside2/libpyside/globalreceiverv2.h)0
-rw-r--r--sources/pyside6/libpyside/pyside.cpp616
-rw-r--r--sources/pyside6/libpyside/pyside.h (renamed from sources/pyside2/libpyside/pyside.h)0
-rw-r--r--sources/pyside6/libpyside/pyside6.pc.in15
-rw-r--r--sources/pyside6/libpyside/pyside_p.h (renamed from sources/pyside2/libpyside/pyside_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysideclassinfo.cpp207
-rw-r--r--sources/pyside6/libpyside/pysideclassinfo.h (renamed from sources/pyside2/libpyside/pysideclassinfo.h)0
-rw-r--r--sources/pyside6/libpyside/pysideclassinfo_p.h (renamed from sources/pyside2/libpyside/pysideclassinfo_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysidemacros.h (renamed from sources/pyside2/libpyside/pysidemacros.h)0
-rw-r--r--sources/pyside6/libpyside/pysidemetafunction.cpp231
-rw-r--r--sources/pyside6/libpyside/pysidemetafunction.h (renamed from sources/pyside2/libpyside/pysidemetafunction.h)0
-rw-r--r--sources/pyside6/libpyside/pysidemetafunction_p.h (renamed from sources/pyside2/libpyside/pysidemetafunction_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysideproperty.cpp634
-rw-r--r--sources/pyside6/libpyside/pysideproperty.h (renamed from sources/pyside2/libpyside/pysideproperty.h)0
-rw-r--r--sources/pyside6/libpyside/pysideproperty_p.h (renamed from sources/pyside2/libpyside/pysideproperty_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysideqenum.cpp (renamed from sources/pyside2/libpyside/pysideqenum.cpp)0
-rw-r--r--sources/pyside6/libpyside/pysideqenum.h (renamed from sources/pyside2/libpyside/pysideqenum.h)0
-rw-r--r--sources/pyside6/libpyside/pysideqflags.cpp (renamed from sources/pyside2/libpyside/pysideqflags.cpp)0
-rw-r--r--sources/pyside6/libpyside/pysideqflags.h (renamed from sources/pyside2/libpyside/pysideqflags.h)0
-rw-r--r--sources/pyside6/libpyside/pysidesignal.cpp1040
-rw-r--r--sources/pyside6/libpyside/pysidesignal.h (renamed from sources/pyside2/libpyside/pysidesignal.h)0
-rw-r--r--sources/pyside6/libpyside/pysidesignal_p.h (renamed from sources/pyside2/libpyside/pysidesignal_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysideslot.cpp199
-rw-r--r--sources/pyside6/libpyside/pysideslot_p.h (renamed from sources/pyside2/libpyside/pysideslot_p.h)0
-rw-r--r--sources/pyside6/libpyside/pysidestaticstrings.cpp (renamed from sources/pyside2/libpyside/pysidestaticstrings.cpp)0
-rw-r--r--sources/pyside6/libpyside/pysidestaticstrings.h (renamed from sources/pyside2/libpyside/pysidestaticstrings.h)0
-rw-r--r--sources/pyside6/libpyside/pysideweakref.cpp (renamed from sources/pyside2/libpyside/pysideweakref.cpp)0
-rw-r--r--sources/pyside6/libpyside/pysideweakref.h (renamed from sources/pyside2/libpyside/pysideweakref.h)0
-rw-r--r--sources/pyside6/libpyside/signalmanager.cpp (renamed from sources/pyside2/libpyside/signalmanager.cpp)0
-rw-r--r--sources/pyside6/libpyside/signalmanager.h (renamed from sources/pyside2/libpyside/signalmanager.h)0
-rw-r--r--sources/pyside6/plugins/CMakeLists.txt41
-rw-r--r--sources/pyside6/plugins/customwidget.cpp (renamed from sources/pyside2/plugins/customwidget.cpp)0
-rw-r--r--sources/pyside6/plugins/customwidget.h (renamed from sources/pyside2/plugins/customwidget.h)0
-rw-r--r--sources/pyside6/plugins/customwidgets.cpp (renamed from sources/pyside2/plugins/customwidgets.cpp)0
-rw-r--r--sources/pyside6/plugins/customwidgets.h (renamed from sources/pyside2/plugins/customwidgets.h)0
-rw-r--r--sources/pyside6/pyside_version.py (renamed from sources/pyside2/pyside_version.py)0
-rw-r--r--sources/pyside6/tests/CMakeLists.txt (renamed from sources/pyside2/tests/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DAnimation/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DAnimation/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DCore/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DCore/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DExtras/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DExtras/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py161
-rw-r--r--sources/pyside6/tests/Qt3DInput/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DInput/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DLogic/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DLogic/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DQuick/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DQuick/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/Qt3DRender/CMakeLists.txt (renamed from sources/pyside2/tests/Qt3DRender/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtAxContainer/CMakeLists.txt (renamed from sources/pyside2/tests/QtAxContainer/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtCharts/CMakeLists.txt (renamed from sources/pyside2/tests/QtCharts/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtCharts/qcharts_test.py69
-rw-r--r--sources/pyside6/tests/QtConcurrent/CMakeLists.txt (renamed from sources/pyside2/tests/QtConcurrent/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtCore/CMakeLists.txt (renamed from sources/pyside2/tests/QtCore/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtCore/attr_cache_py3k.py73
-rw-r--r--sources/pyside6/tests/QtCore/blocking_signals_test.py148
-rw-r--r--sources/pyside6/tests/QtCore/bug_1019.py67
-rw-r--r--sources/pyside6/tests/QtCore/bug_1063.py64
-rw-r--r--sources/pyside6/tests/QtCore/bug_1069.py58
-rw-r--r--sources/pyside6/tests/QtCore/bug_1313.py82
-rw-r--r--sources/pyside6/tests/QtCore/bug_278_test.py58
-rw-r--r--sources/pyside6/tests/QtCore/bug_332.py53
-rw-r--r--sources/pyside6/tests/QtCore/bug_408.py62
-rw-r--r--sources/pyside6/tests/QtCore/bug_428.py52
-rw-r--r--sources/pyside6/tests/QtCore/bug_462.py79
-rw-r--r--sources/pyside6/tests/QtCore/bug_505.py56
-rw-r--r--sources/pyside6/tests/QtCore/bug_515.py54
-rw-r--r--sources/pyside6/tests/QtCore/bug_606.py68
-rw-r--r--sources/pyside6/tests/QtCore/bug_656.py45
-rw-r--r--sources/pyside6/tests/QtCore/bug_686.py123
-rw-r--r--sources/pyside6/tests/QtCore/bug_699.py52
-rw-r--r--sources/pyside6/tests/QtCore/bug_706.py61
-rw-r--r--sources/pyside6/tests/QtCore/bug_820.py103
-rw-r--r--sources/pyside6/tests/QtCore/bug_826.py64
-rw-r--r--sources/pyside6/tests/QtCore/bug_829.py72
-rw-r--r--sources/pyside6/tests/QtCore/bug_835.py100
-rw-r--r--sources/pyside6/tests/QtCore/bug_920.py59
-rw-r--r--sources/pyside6/tests/QtCore/bug_927.py58
-rw-r--r--sources/pyside6/tests/QtCore/bug_931.py55
-rw-r--r--sources/pyside6/tests/QtCore/bug_938.py50
-rw-r--r--sources/pyside6/tests/QtCore/bug_953.py54
-rw-r--r--sources/pyside6/tests/QtCore/bug_987.py49
-rw-r--r--sources/pyside6/tests/QtCore/bug_994.py60
-rw-r--r--sources/pyside6/tests/QtCore/bug_PYSIDE-164.py75
-rw-r--r--sources/pyside6/tests/QtCore/bug_PYSIDE-42.py52
-rw-r--r--sources/pyside6/tests/QtCore/child_event_test.py86
-rw-r--r--sources/pyside6/tests/QtCore/classinfo_test.py111
-rw-r--r--sources/pyside6/tests/QtCore/deepcopy_test.py117
-rw-r--r--sources/pyside6/tests/QtCore/deletelater_test.py56
-rw-r--r--sources/pyside6/tests/QtCore/destroysignal_test.py62
-rw-r--r--sources/pyside6/tests/QtCore/duck_punching_test.py105
-rw-r--r--sources/pyside6/tests/QtCore/emoji_string_test.py85
-rw-r--r--sources/pyside6/tests/QtCore/hash_test.py93
-rw-r--r--sources/pyside6/tests/QtCore/inherits_test.py50
-rw-r--r--sources/pyside6/tests/QtCore/max_signals.py68
-rw-r--r--sources/pyside6/tests/QtCore/missing_symbols_test.py50
-rw-r--r--sources/pyside6/tests/QtCore/mockclass_test.py62
-rw-r--r--sources/pyside6/tests/QtCore/multiple_feature_test.py141
-rw-r--r--sources/pyside6/tests/QtCore/python_conversion.py100
-rw-r--r--sources/pyside6/tests/QtCore/qabs_test.py54
-rw-r--r--sources/pyside6/tests/QtCore/qabstractitemmodel_test.py74
-rw-r--r--sources/pyside6/tests/QtCore/qanimationgroup_test.py60
-rw-r--r--sources/pyside6/tests/QtCore/qbitarray_test.py154
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_concatenation_operator_test.py65
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py93
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_operator_test.py116
-rw-r--r--sources/pyside6/tests/QtCore/qbytearray_test.py279
-rw-r--r--sources/pyside6/tests/QtCore/qcalendar_test.py53
-rw-r--r--sources/pyside6/tests/QtCore/qcbor_test.py80
-rw-r--r--sources/pyside6/tests/QtCore/qcollator_test.py66
-rw-r--r--sources/pyside6/tests/QtCore/qcommandlineparser_test.py61
-rw-r--r--sources/pyside6/tests/QtCore/qcoreapplication_instance_test.py55
-rw-r--r--sources/pyside6/tests/QtCore/qcoreapplication_test.py46
-rw-r--r--sources/pyside6/tests/QtCore/qdatastream_test.py324
-rw-r--r--sources/pyside6/tests/QtCore/qdate_test.py68
-rw-r--r--sources/pyside6/tests/QtCore/qdatetime_test.py57
-rw-r--r--sources/pyside6/tests/QtCore/qeasingcurve_test.py60
-rw-r--r--sources/pyside6/tests/QtCore/qenum_test.py243
-rw-r--r--sources/pyside6/tests/QtCore/qevent_test.py59
-rw-r--r--sources/pyside6/tests/QtCore/qfile_test.py87
-rw-r--r--sources/pyside6/tests/QtCore/qfileinfo_test.py48
-rw-r--r--sources/pyside6/tests/QtCore/qfileread_test.py87
-rw-r--r--sources/pyside6/tests/QtCore/qflags_test.py128
-rw-r--r--sources/pyside6/tests/QtCore/qhandle_test.py51
-rw-r--r--sources/pyside6/tests/QtCore/qinstallmsghandler_test.py86
-rw-r--r--sources/pyside6/tests/QtCore/qjsondocument_test.py57
-rw-r--r--sources/pyside6/tests/QtCore/qlinef_test.py54
-rw-r--r--sources/pyside6/tests/QtCore/qlocale_test.py74
-rw-r--r--sources/pyside6/tests/QtCore/qlockfile_test.py62
-rw-r--r--sources/pyside6/tests/QtCore/qmessageauthenticationcode_test.py51
-rw-r--r--sources/pyside6/tests/QtCore/qmetaobject_test.py96
-rw-r--r--sources/pyside6/tests/QtCore/qmimedatabase_test.py84
-rw-r--r--sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py83
-rw-r--r--sources/pyside6/tests/QtCore/qobject_children_segfault_test.py62
-rw-r--r--sources/pyside6/tests/QtCore/qobject_connect_notify_test.py111
-rw-r--r--sources/pyside6/tests/QtCore/qobject_destructor.py53
-rw-r--r--sources/pyside6/tests/QtCore/qobject_event_filter_test.py148
-rw-r--r--sources/pyside6/tests/QtCore/qobject_inherits_test.py131
-rw-r--r--sources/pyside6/tests/QtCore/qobject_objectproperty_test.py65
-rw-r--r--sources/pyside6/tests/QtCore/qobject_parent_test.py292
-rw-r--r--sources/pyside6/tests/QtCore/qobject_property_test.py75
-rw-r--r--sources/pyside6/tests/QtCore/qobject_protected_methods_test.py73
-rw-r--r--sources/pyside6/tests/QtCore/qobject_test.py88
-rw-r--r--sources/pyside6/tests/QtCore/qobject_timer_event_test.py79
-rw-r--r--sources/pyside6/tests/QtCore/qobject_tr_as_instance_test.py74
-rw-r--r--sources/pyside6/tests/QtCore/qoperatingsystemversion_test.py47
-rw-r--r--sources/pyside6/tests/QtCore/qpoint_test.py54
-rw-r--r--sources/pyside6/tests/QtCore/qprocess_test.py63
-rw-r--r--sources/pyside6/tests/QtCore/qproperty_decorator.py71
-rw-r--r--sources/pyside6/tests/QtCore/qrandomgenerator_test.py55
-rw-r--r--sources/pyside6/tests/QtCore/qrect_test.py147
-rw-r--r--sources/pyside6/tests/QtCore/qregularexpression_test.py64
-rw-r--r--sources/pyside6/tests/QtCore/qresource_test.py77
-rw-r--r--sources/pyside6/tests/QtCore/qsettings_test.ini (renamed from sources/pyside2/tests/QtCore/qsettings_test.ini)0
-rw-r--r--sources/pyside6/tests/QtCore/qsettings_test.py115
-rw-r--r--sources/pyside6/tests/QtCore/qsize_test.py61
-rw-r--r--sources/pyside6/tests/QtCore/qslot_object_test.py78
-rw-r--r--sources/pyside6/tests/QtCore/qsocketnotifier_test.py64
-rw-r--r--sources/pyside6/tests/QtCore/qsrand_test.py50
-rw-r--r--sources/pyside6/tests/QtCore/qstandardpaths_test.py55
-rw-r--r--sources/pyside6/tests/QtCore/qstorageinfo_test.py49
-rw-r--r--sources/pyside6/tests/QtCore/qstring_test.py57
-rw-r--r--sources/pyside6/tests/QtCore/qsysinfo_test.py49
-rw-r--r--sources/pyside6/tests/QtCore/qtextstream_test.py111
-rw-r--r--sources/pyside6/tests/QtCore/qthread_prod_cons_test.py142
-rw-r--r--sources/pyside6/tests/QtCore/qthread_signal_test.py97
-rw-r--r--sources/pyside6/tests/QtCore/qthread_test.py115
-rw-r--r--sources/pyside6/tests/QtCore/qtimer_singleshot_test.py112
-rw-r--r--sources/pyside6/tests/QtCore/qtimer_timeout_test.py92
-rw-r--r--sources/pyside6/tests/QtCore/qtimezone_test.py49
-rw-r--r--sources/pyside6/tests/QtCore/qtnamespace_test.py54
-rw-r--r--sources/pyside6/tests/QtCore/quoteEnUS.txt (renamed from sources/pyside2/tests/QtCore/quoteEnUS.txt)0
-rw-r--r--sources/pyside6/tests/QtCore/qurl_test.py169
-rw-r--r--sources/pyside6/tests/QtCore/qurlquery_test.py62
-rw-r--r--sources/pyside6/tests/QtCore/quuid_test.py52
-rw-r--r--sources/pyside6/tests/QtCore/qversionnumber_test.py54
-rw-r--r--sources/pyside6/tests/QtCore/repr_test.py111
-rw-r--r--sources/pyside6/tests/QtCore/resources.qrc (renamed from sources/pyside2/tests/QtCore/resources.qrc)0
-rw-r--r--sources/pyside6/tests/QtCore/resources_mc.py3571
-rw-r--r--sources/pyside6/tests/QtCore/sample.png (renamed from sources/pyside2/tests/QtCore/sample.png)bin55944 -> 55944 bytes
-rw-r--r--sources/pyside6/tests/QtCore/setprop_on_ctor_test.py48
-rw-r--r--sources/pyside6/tests/QtCore/snake_prop_feature_test.py123
-rw-r--r--sources/pyside6/tests/QtCore/staticMetaObject_test.py57
-rw-r--r--sources/pyside6/tests/QtCore/static_method_test.py89
-rw-r--r--sources/pyside6/tests/QtCore/thread_signals_test.py65
-rw-r--r--sources/pyside6/tests/QtCore/tr_noop_test.py81
-rw-r--r--sources/pyside6/tests/QtCore/translation_test.py90
-rw-r--r--sources/pyside6/tests/QtCore/translations/trans_latin.qm (renamed from sources/pyside2/tests/QtCore/translations/trans_latin.qm)bin125 -> 125 bytes
-rw-r--r--sources/pyside6/tests/QtCore/translations/trans_latin.ts (renamed from sources/pyside2/tests/QtCore/translations/trans_latin.ts)0
-rw-r--r--sources/pyside6/tests/QtCore/translations/trans_russian.qm (renamed from sources/pyside2/tests/QtCore/translations/trans_russian.qm)bin114 -> 114 bytes
-rw-r--r--sources/pyside6/tests/QtCore/translations/trans_russian.ts (renamed from sources/pyside2/tests/QtCore/translations/trans_russian.ts)0
-rw-r--r--sources/pyside6/tests/QtCore/unaryoperator_test.py73
-rw-r--r--sources/pyside6/tests/QtCore/unicode_test.py68
-rw-r--r--sources/pyside6/tests/QtCore/versioninfo_test.py55
-rw-r--r--sources/pyside6/tests/QtDataVisualization/CMakeLists.txt (renamed from sources/pyside2/tests/QtDataVisualization/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtDataVisualization/datavisualization_test.py92
-rw-r--r--sources/pyside6/tests/QtDesigner/CMakeLists.txt (renamed from sources/pyside2/tests/QtDesigner/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtGui/CMakeLists.txt (renamed from sources/pyside2/tests/QtGui/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtGui/bug_1091.py47
-rw-r--r--sources/pyside6/tests/QtGui/bug_300_test.py52
-rw-r--r--sources/pyside6/tests/QtGui/bug_367.py56
-rw-r--r--sources/pyside6/tests/QtGui/bug_480.py59
-rw-r--r--sources/pyside6/tests/QtGui/bug_606.py60
-rw-r--r--sources/pyside6/tests/QtGui/bug_617.py57
-rw-r--r--sources/pyside6/tests/QtGui/bug_652.py65
-rw-r--r--sources/pyside6/tests/QtGui/bug_660.py61
-rw-r--r--sources/pyside6/tests/QtGui/bug_716.py44
-rw-r--r--sources/pyside6/tests/QtGui/bug_740.py47
-rw-r--r--sources/pyside6/tests/QtGui/bug_743.py49
-rw-r--r--sources/pyside6/tests/QtGui/bug_991.py50
-rw-r--r--sources/pyside6/tests/QtGui/bug_PYSIDE-344.py70
-rw-r--r--sources/pyside6/tests/QtGui/bug_PYSIDE-41.py78
-rw-r--r--sources/pyside6/tests/QtGui/deepcopy_test.py151
-rw-r--r--sources/pyside6/tests/QtGui/float_to_int_implicit_conversion_test.py65
-rw-r--r--sources/pyside6/tests/QtGui/pyside_reload_test.py (renamed from sources/pyside2/tests/QtGui/pyside_reload_test.py)0
-rw-r--r--sources/pyside6/tests/QtGui/qcolor_reduce_test.py66
-rw-r--r--sources/pyside6/tests/QtGui/qcolor_test.py129
-rw-r--r--sources/pyside6/tests/QtGui/qcursor_test.py51
-rw-r--r--sources/pyside6/tests/QtGui/qdatastream_gui_operators_test.py68
-rw-r--r--sources/pyside6/tests/QtGui/qdesktopservices_test.py49
-rw-r--r--sources/pyside6/tests/QtGui/qfontmetrics_test.py233
-rw-r--r--sources/pyside6/tests/QtGui/qguiapplication_test.py46
-rw-r--r--sources/pyside6/tests/QtGui/qicon_test.py50
-rw-r--r--sources/pyside6/tests/QtGui/qitemselection_test.py53
-rw-r--r--sources/pyside6/tests/QtGui/qkeysequence_test.py54
-rw-r--r--sources/pyside6/tests/QtGui/qpainter_test.py117
-rw-r--r--sources/pyside6/tests/QtGui/qpdfwriter_test.py54
-rw-r--r--sources/pyside6/tests/QtGui/qpixelformat_test.py56
-rw-r--r--sources/pyside6/tests/QtGui/qpixmap_test.py90
-rw-r--r--sources/pyside6/tests/QtGui/qpixmapcache_test.py79
-rw-r--r--sources/pyside6/tests/QtGui/qpolygonf_test.py66
-rw-r--r--sources/pyside6/tests/QtGui/qradialgradient_test.py63
-rw-r--r--sources/pyside6/tests/QtGui/qrasterwindow_test.py92
-rw-r--r--sources/pyside6/tests/QtGui/qregion_test.py54
-rw-r--r--sources/pyside6/tests/QtGui/qstylehints_test.py48
-rw-r--r--sources/pyside6/tests/QtGui/qtextdocument_functions.py50
-rw-r--r--sources/pyside6/tests/QtGui/qtextdocument_undoredo_test.py64
-rw-r--r--sources/pyside6/tests/QtGui/qtextdocumentwriter_test.py54
-rw-r--r--sources/pyside6/tests/QtGui/qtextline_test.py56
-rw-r--r--sources/pyside6/tests/QtGui/qtransform_test.py108
-rw-r--r--sources/pyside6/tests/QtGui/repr_test.py114
-rw-r--r--sources/pyside6/tests/QtGui/sample.png (renamed from sources/pyside2/tests/QtGui/sample.png)bin55944 -> 55944 bytes
-rw-r--r--sources/pyside6/tests/QtGui/timed_app_and_patching_test.py66
-rw-r--r--sources/pyside6/tests/QtHelp/CMakeLists.txt (renamed from sources/pyside2/tests/QtHelp/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtHelp/help_test.py47
-rw-r--r--sources/pyside6/tests/QtHelp/helpsearchengine_test.py50
-rw-r--r--sources/pyside6/tests/QtLocation/CMakeLists.txt (renamed from sources/pyside2/tests/QtLocation/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtLocation/location.py49
-rw-r--r--sources/pyside6/tests/QtMacExtras/CMakeLists.txt (renamed from sources/pyside2/tests/QtMacExtras/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtMultimedia/CMakeLists.txt (renamed from sources/pyside2/tests/QtMultimedia/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtMultimedia/audio_test.py78
-rw-r--r--sources/pyside6/tests/QtMultimediaWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtMultimediaWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py65
-rw-r--r--sources/pyside6/tests/QtNetwork/CMakeLists.txt (renamed from sources/pyside2/tests/QtNetwork/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtNetwork/accessManager_test.py77
-rw-r--r--sources/pyside6/tests/QtNetwork/bug_1084.py51
-rw-r--r--sources/pyside6/tests/QtNetwork/bug_446.py83
-rw-r--r--sources/pyside6/tests/QtNetwork/dnslookup_test.py65
-rw-r--r--sources/pyside6/tests/QtNetwork/qipv6address_test.py56
-rw-r--r--sources/pyside6/tests/QtNetwork/qpassworddigestor_test.py51
-rw-r--r--sources/pyside6/tests/QtNetwork/tcpserver_test.py58
-rw-r--r--sources/pyside6/tests/QtNetwork/udpsocket_test.py85
-rw-r--r--sources/pyside6/tests/QtOpenGL/CMakeLists.txt (renamed from sources/pyside2/tests/QtOpenGL/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py98
-rw-r--r--sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py111
-rw-r--r--sources/pyside6/tests/QtOpenGLFunctions/CMakeLists.txt (renamed from sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtOpenGLWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtOpenGLWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtPositioning/CMakeLists.txt (renamed from sources/pyside2/tests/QtPositioning/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtPositioning/positioning.py51
-rw-r--r--sources/pyside6/tests/QtPrintSupport/CMakeLists.txt (renamed from sources/pyside2/tests/QtPrintSupport/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtPrintSupport/bug_500.py49
-rw-r--r--sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py87
-rw-r--r--sources/pyside6/tests/QtQml/CMakeLists.txt (renamed from sources/pyside2/tests/QtQml/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_1029.py64
-rw-r--r--sources/pyside6/tests/QtQml/bug_1029.qml (renamed from sources/pyside2/tests/QtQml/bug_1029.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_451.py105
-rw-r--r--sources/pyside6/tests/QtQml/bug_451.qml (renamed from sources/pyside2/tests/QtQml/bug_451.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_456.py77
-rw-r--r--sources/pyside6/tests/QtQml/bug_456.qml (renamed from sources/pyside2/tests/QtQml/bug_456.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_557.py50
-rw-r--r--sources/pyside6/tests/QtQml/bug_726.py78
-rw-r--r--sources/pyside6/tests/QtQml/bug_726.qml (renamed from sources/pyside2/tests/QtQml/bug_726.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_814.py80
-rw-r--r--sources/pyside6/tests/QtQml/bug_814.qml (renamed from sources/pyside2/tests/QtQml/bug_814.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_825.py88
-rw-r--r--sources/pyside6/tests/QtQml/bug_825.qml (renamed from sources/pyside2/tests/QtQml/bug_825.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_847.py93
-rw-r--r--sources/pyside6/tests/QtQml/bug_847.qml (renamed from sources/pyside2/tests/QtQml/bug_847.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_915.py64
-rw-r--r--sources/pyside6/tests/QtQml/bug_926.py75
-rw-r--r--sources/pyside6/tests/QtQml/bug_926.qml (renamed from sources/pyside2/tests/QtQml/bug_926.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_951.py68
-rw-r--r--sources/pyside6/tests/QtQml/bug_951.qml (renamed from sources/pyside2/tests/QtQml/bug_951.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_995.py52
-rw-r--r--sources/pyside6/tests/QtQml/bug_995.qml (renamed from sources/pyside2/tests/QtQml/bug_995.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/bug_997.py59
-rw-r--r--sources/pyside6/tests/QtQml/bug_997.qml (renamed from sources/pyside2/tests/QtQml/bug_997.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/connect_python_qml.py72
-rw-r--r--sources/pyside6/tests/QtQml/connect_python_qml.qml (renamed from sources/pyside2/tests/QtQml/connect_python_qml.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/hw.qml (renamed from sources/pyside2/tests/QtQml/hw.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/javascript_exceptions.py110
-rw-r--r--sources/pyside6/tests/QtQml/javascript_exceptions.qml (renamed from sources/pyside2/tests/QtQml/javascript_exceptions.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/listproperty.py81
-rw-r--r--sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.py102
-rw-r--r--sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.qml (renamed from sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile_component.qml (renamed from sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile_component.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/qqmlnetwork_test.py78
-rw-r--r--sources/pyside6/tests/QtQml/qquickitem_grabToImage.py88
-rw-r--r--sources/pyside6/tests/QtQml/qquickitem_grabToImage.qml (renamed from sources/pyside2/tests/QtQml/qquickitem_grabToImage.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/qquickview_test.py98
-rw-r--r--sources/pyside6/tests/QtQml/registersingletontype.py86
-rw-r--r--sources/pyside6/tests/QtQml/registersingletontype.qml (renamed from sources/pyside2/tests/QtQml/registersingletontype.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/registertype.py125
-rw-r--r--sources/pyside6/tests/QtQml/registertype.qml (renamed from sources/pyside2/tests/QtQml/registertype.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/registeruncreatable.qml (renamed from sources/pyside2/tests/QtQml/registeruncreatable.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/registeruncreatabletype.py80
-rw-r--r--sources/pyside6/tests/QtQml/signal_arguments.py77
-rw-r--r--sources/pyside6/tests/QtQml/signal_arguments.qml (renamed from sources/pyside2/tests/QtQml/signal_arguments.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/view.qml (renamed from sources/pyside2/tests/QtQml/view.qml)0
-rw-r--r--sources/pyside6/tests/QtQml/viewmodel.qml (renamed from sources/pyside2/tests/QtQml/viewmodel.qml)0
-rw-r--r--sources/pyside6/tests/QtQuick/CMakeLists.txt (renamed from sources/pyside2/tests/QtQuick/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtQuickControls2/CMakeLists.txt (renamed from sources/pyside2/tests/QtQuickControls2/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtQuickWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtQuickWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtRemoteObjects/CMakeLists.txt (renamed from sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtScxml/CMakeLists.txt (renamed from sources/pyside2/tests/QtScxml/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtScxml/test_dynamic.py58
-rw-r--r--sources/pyside6/tests/QtScxml/trafficlight.scxml (renamed from sources/pyside2/tests/QtScxml/trafficlight.scxml)0
-rw-r--r--sources/pyside6/tests/QtSensors/CMakeLists.txt (renamed from sources/pyside2/tests/QtSensors/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtSensors/sensors.py63
-rw-r--r--sources/pyside6/tests/QtSerialPort/CMakeLists.txt (renamed from sources/pyside2/tests/QtSerialPort/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtSerialPort/serial.py95
-rw-r--r--sources/pyside6/tests/QtSql/CMakeLists.txt (renamed from sources/pyside2/tests/QtSql/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtSql/bug_1013.py66
-rw-r--r--sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py105
-rw-r--r--sources/pyside6/tests/QtSql/qvarianttype_test.py61
-rw-r--r--sources/pyside6/tests/QtSvg/CMakeLists.txt (renamed from sources/pyside2/tests/QtSvg/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtSvg/qsvggenerator_test.py70
-rw-r--r--sources/pyside6/tests/QtSvg/qsvgrenderer_test.py60
-rw-r--r--sources/pyside6/tests/QtSvg/tiger.svg (renamed from sources/pyside2/tests/QtSvg/tiger.svg)0
-rw-r--r--sources/pyside6/tests/QtSvgWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtSvgWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtSvgWidgets/qsvgwidget_test.py64
-rw-r--r--sources/pyside6/tests/QtTest/CMakeLists.txt (renamed from sources/pyside2/tests/QtTest/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtTest/click_test.py61
-rw-r--r--sources/pyside6/tests/QtTest/eventfilter_test.py81
-rw-r--r--sources/pyside6/tests/QtTest/qvalidator_test.py140
-rw-r--r--sources/pyside6/tests/QtTest/touchevent_test.py83
-rw-r--r--sources/pyside6/tests/QtTextToSpeech/CMakeLists.txt (renamed from sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtTextToSpeech/qtexttospeech_test.py69
-rw-r--r--sources/pyside6/tests/QtUiTools/CMakeLists.txt (renamed from sources/pyside2/tests/QtUiTools/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtUiTools/action.ui (renamed from sources/pyside2/tests/QtUiTools/action.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_1060.py54
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_1060.ui (renamed from sources/pyside2/tests/QtUiTools/bug_1060.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_360.py70
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_376.py53
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_392.py84
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_426.py55
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_426.ui (renamed from sources/pyside2/tests/QtUiTools/bug_426.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_552.py57
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_552.ui (renamed from sources/pyside2/tests/QtUiTools/bug_552.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_797.py49
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_909.py57
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_909.ui (renamed from sources/pyside2/tests/QtUiTools/bug_909.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_913.py57
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_913.ui (renamed from sources/pyside2/tests/QtUiTools/bug_913.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_958.py59
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_958.ui (renamed from sources/pyside2/tests/QtUiTools/bug_958.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_965.py55
-rw-r--r--sources/pyside6/tests/QtUiTools/bug_965.ui (renamed from sources/pyside2/tests/QtUiTools/bug_965.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/loadUiType_test.py75
-rw-r--r--sources/pyside6/tests/QtUiTools/minimal.ui (renamed from sources/pyside2/tests/QtUiTools/minimal.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/pycustomwidget.ui (renamed from sources/pyside2/tests/QtUiTools/pycustomwidget.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/pycustomwidget2.ui (renamed from sources/pyside2/tests/QtUiTools/pycustomwidget2.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/test.ui (renamed from sources/pyside2/tests/QtUiTools/test.ui)0
-rw-r--r--sources/pyside6/tests/QtUiTools/ui_test.py47
-rw-r--r--sources/pyside6/tests/QtUiTools/uiloader_test.py79
-rw-r--r--sources/pyside6/tests/QtWebChannel/CMakeLists.txt (renamed from sources/pyside2/tests/QtWebChannel/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWebEngine/CMakeLists.txt (renamed from sources/pyside2/tests/QtWebEngine/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWebEngine/web_engine_initialize.py52
-rw-r--r--sources/pyside6/tests/QtWebEngineCore/CMakeLists.txt (renamed from sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py97
-rw-r--r--sources/pyside6/tests/QtWebEngineWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWebEngineWidgets/fox.html (renamed from sources/pyside2/tests/QtWebEngineWidgets/fox.html)0
-rw-r--r--sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py86
-rw-r--r--sources/pyside6/tests/QtWebSockets/CMakeLists.txt (renamed from sources/pyside2/tests/QtWebSockets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWidgets/CMakeLists.txt (renamed from sources/pyside2/tests/QtWidgets/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtWidgets/action_clear.py80
-rw-r--r--sources/pyside6/tests/QtWidgets/add_action_test.py78
-rw-r--r--sources/pyside6/tests/QtWidgets/api2_test.py94
-rw-r--r--sources/pyside6/tests/QtWidgets/application_test.py65
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_1002.py53
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_1006.py116
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_1048.py44
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_1077.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_172.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_243.py50
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_307.py60
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_324.py65
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_338.py60
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_389.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_400.py61
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_429.py46
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_430.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_433.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_467.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_493.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_512.py57
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_525.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_546.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_547.py91
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_549.py50
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_569.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_575.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_576.py68
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_585.py59
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_589.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_635.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_640.py46
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_653.py52
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_662.py63
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_667.py59
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_668.py59
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_674.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_675.py51
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_688.py123
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_693.py66
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_696.py60
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_711.py61
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_722.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_728.py59
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_736.py53
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_750.py60
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_778.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_785.py63
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_793.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_811.py66
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_834.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_836.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_844.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_854.py75
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_860.py68
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_862.py97
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_871.py77
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_879.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_919.py72
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_921.py85
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_941.py52
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_964.py54
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_967.py53
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_972.py74
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_979.py45
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_988.py53
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_998.py45
-rw-r--r--sources/pyside6/tests/QtWidgets/customproxywidget_test.py68
-rw-r--r--sources/pyside6/tests/QtWidgets/event_filter_test.py72
-rw-r--r--sources/pyside6/tests/QtWidgets/grandparent_method_test.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/hashabletype_test.py52
-rw-r--r--sources/pyside6/tests/QtWidgets/import_test.py (renamed from sources/pyside2/tests/QtWidgets/import_test.py)0
-rw-r--r--sources/pyside6/tests/QtWidgets/keep_reference_test.py109
-rw-r--r--sources/pyside6/tests/QtWidgets/missing_symbols_test.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/paint_event_test.py104
-rw-r--r--sources/pyside6/tests/QtWidgets/parent_method_test.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/private_mangle_test.py128
-rw-r--r--sources/pyside6/tests/QtWidgets/python_properties_test.py52
-rw-r--r--sources/pyside6/tests/QtWidgets/qabstracttextdocumentlayout_test.py80
-rw-r--r--sources/pyside6/tests/QtWidgets/qaction_test.py76
-rw-r--r--sources/pyside6/tests/QtWidgets/qapp_issue_585.py76
-rw-r--r--sources/pyside6/tests/QtWidgets/qapp_test.py52
-rw-r--r--sources/pyside6/tests/QtWidgets/qapplication_exit_segfault_test.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/qapplication_test.py46
-rw-r--r--sources/pyside6/tests/QtWidgets/qbrush_test.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/qcolormap_test.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/qdynamic_signal.py61
-rw-r--r--sources/pyside6/tests/QtWidgets/qfontdialog_test.py56
-rw-r--r--sources/pyside6/tests/QtWidgets/qformlayout_test.py91
-rw-r--r--sources/pyside6/tests/QtWidgets/qgraphicsitem_isblocked_test.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/qgraphicsitem_test.py69
-rw-r--r--sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py82
-rw-r--r--sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py64
-rw-r--r--sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py224
-rw-r--r--sources/pyside6/tests/QtWidgets/qimage_test.py309
-rw-r--r--sources/pyside6/tests/QtWidgets/qinputdialog_get_test.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/qkeysequenceedit_test.py53
-rw-r--r--sources/pyside6/tests/QtWidgets/qlabel_test.py88
-rw-r--r--sources/pyside6/tests/QtWidgets/qlayout_ref_test.py185
-rw-r--r--sources/pyside6/tests/QtWidgets/qlayout_test.py145
-rw-r--r--sources/pyside6/tests/QtWidgets/qlcdnumber_test.py50
-rw-r--r--sources/pyside6/tests/QtWidgets/qlistwidget_test.py94
-rw-r--r--sources/pyside6/tests/QtWidgets/qlistwidgetitem_test.py62
-rw-r--r--sources/pyside6/tests/QtWidgets/qmainwindow_test.py118
-rw-r--r--sources/pyside6/tests/QtWidgets/qmenu_test.py92
-rw-r--r--sources/pyside6/tests/QtWidgets/qmenuadd_test.py58
-rw-r--r--sources/pyside6/tests/QtWidgets/qobject_mi_test.py76
-rw-r--r--sources/pyside6/tests/QtWidgets/qpen_test.py79
-rw-r--r--sources/pyside6/tests/QtWidgets/qpicture_test.py71
-rw-r--r--sources/pyside6/tests/QtWidgets/qpixmap_constructor.py285
-rw-r--r--sources/pyside6/tests/QtWidgets/qpushbutton_test.py75
-rw-r--r--sources/pyside6/tests/QtWidgets/qshortcut_test.py83
-rw-r--r--sources/pyside6/tests/QtWidgets/qsplitter_test.py51
-rw-r--r--sources/pyside6/tests/QtWidgets/qstandarditemmodel_test.py106
-rw-r--r--sources/pyside6/tests/QtWidgets/qstring_qkeysequence_test.py67
-rw-r--r--sources/pyside6/tests/QtWidgets/qstyle_test.py98
-rw-r--r--sources/pyside6/tests/QtWidgets/qtableview_test.py50
-rw-r--r--sources/pyside6/tests/QtWidgets/qtabwidget_test.py62
-rw-r--r--sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py69
-rw-r--r--sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py72
-rw-r--r--sources/pyside6/tests/QtWidgets/qtextedit_test.py67
-rw-r--r--sources/pyside6/tests/QtWidgets/qtoolbar_test.py69
-rw-r--r--sources/pyside6/tests/QtWidgets/qtoolbox_test.py65
-rw-r--r--sources/pyside6/tests/QtWidgets/qtreeview_test.py102
-rw-r--r--sources/pyside6/tests/QtWidgets/qtreewidget_test.py70
-rw-r--r--sources/pyside6/tests/QtWidgets/qtreewidgetitem_test.py74
-rw-r--r--sources/pyside6/tests/QtWidgets/qvariant_test.py83
-rw-r--r--sources/pyside6/tests/QtWidgets/qwidget_setlayout_test.py67
-rw-r--r--sources/pyside6/tests/QtWidgets/qwidget_test.py80
-rw-r--r--sources/pyside6/tests/QtWidgets/reference_count_test.py102
-rw-r--r--sources/pyside6/tests/QtWidgets/sample.png (renamed from sources/pyside2/tests/QtWidgets/sample.png)bin55944 -> 55944 bytes
-rw-r--r--sources/pyside6/tests/QtWidgets/signature_test.py94
-rw-r--r--sources/pyside6/tests/QtWidgets/standardpixmap_test.py49
-rw-r--r--sources/pyside6/tests/QtWidgets/test_module_template.py48
-rw-r--r--sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py103
-rw-r--r--sources/pyside6/tests/QtWidgets/virtual_pure_override_test.py83
-rw-r--r--sources/pyside6/tests/QtWidgets/wrong_return_test.py62
-rw-r--r--sources/pyside6/tests/QtWinExtras/CMakeLists.txt (renamed from sources/pyside2/tests/QtWinExtras/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtX11Extras/CMakeLists.txt (renamed from sources/pyside2/tests/QtX11Extras/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtXml/CMakeLists.txt (renamed from sources/pyside2/tests/QtXml/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/QtXml/qdomdocument_test.py104
-rw-r--r--sources/pyside6/tests/init_paths.py104
-rw-r--r--sources/pyside6/tests/mac/CMakeLists.txt (renamed from sources/pyside2/tests/mac/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/mac/qmacstyle_test.py54
-rw-r--r--sources/pyside6/tests/manually/README.txt (renamed from sources/pyside2/tests/manually/README.txt)0
-rw-r--r--sources/pyside6/tests/manually/bug_841.py79
-rw-r--r--sources/pyside6/tests/pysidetest/CMakeLists.txt173
-rw-r--r--sources/pyside6/tests/pysidetest/all_modules_load_test.py51
-rw-r--r--sources/pyside6/tests/pysidetest/bug_1016.py (renamed from sources/pyside2/tests/pysidetest/bug_1016.py)0
-rw-r--r--sources/pyside6/tests/pysidetest/constructor_properties_test.py70
-rw-r--r--sources/pyside6/tests/pysidetest/curr_errors.txt (renamed from sources/pyside2/tests/pysidetest/curr_errors.txt)0
-rw-r--r--sources/pyside6/tests/pysidetest/decoratedslot_test.py74
-rw-r--r--sources/pyside6/tests/pysidetest/delegatecreateseditor_test.py105
-rw-r--r--sources/pyside6/tests/pysidetest/embedding_test.py80
-rw-r--r--sources/pyside6/tests/pysidetest/enum_test.py (renamed from sources/pyside2/tests/pysidetest/enum_test.py)0
-rw-r--r--sources/pyside6/tests/pysidetest/flagstest.cpp (renamed from sources/pyside2/tests/pysidetest/flagstest.cpp)0
-rw-r--r--sources/pyside6/tests/pysidetest/flagstest.h (renamed from sources/pyside2/tests/pysidetest/flagstest.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/hiddenobject.cpp (renamed from sources/pyside2/tests/pysidetest/hiddenobject.cpp)0
-rw-r--r--sources/pyside6/tests/pysidetest/hiddenobject.h (renamed from sources/pyside2/tests/pysidetest/hiddenobject.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/homonymoussignalandmethod_test.py (renamed from sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py)0
-rw-r--r--sources/pyside6/tests/pysidetest/iterable_test.py91
-rw-r--r--sources/pyside6/tests/pysidetest/list_signal_test.py58
-rw-r--r--sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py223
-rw-r--r--sources/pyside6/tests/pysidetest/modelview_test.py105
-rw-r--r--sources/pyside6/tests/pysidetest/new_inherited_functions_test.py198
-rw-r--r--sources/pyside6/tests/pysidetest/notify_id.py83
-rw-r--r--sources/pyside6/tests/pysidetest/properties_test.py132
-rw-r--r--sources/pyside6/tests/pysidetest/property_python_test.py231
-rw-r--r--sources/pyside6/tests/pysidetest/pysidetest_global.h (renamed from sources/pyside2/tests/pysidetest/pysidetest_global.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/pysidetest_macros.h (renamed from sources/pyside2/tests/pysidetest/pysidetest_macros.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/qapp_like_a_macro_test.py88
-rw-r--r--sources/pyside6/tests/pysidetest/qvariant_test.py51
-rw-r--r--sources/pyside6/tests/pysidetest/repr_test.py (renamed from sources/pyside2/tests/pysidetest/repr_test.py)0
-rw-r--r--sources/pyside6/tests/pysidetest/signal_slot_warning.py76
-rw-r--r--sources/pyside6/tests/pysidetest/signal_tp_descr_get_test.py87
-rw-r--r--sources/pyside6/tests/pysidetest/signalandnamespace_test.py (renamed from sources/pyside2/tests/pysidetest/signalandnamespace_test.py)0
-rw-r--r--sources/pyside6/tests/pysidetest/signalemissionfrompython_test.py114
-rw-r--r--sources/pyside6/tests/pysidetest/signalwithdefaultvalue_test.py102
-rw-r--r--sources/pyside6/tests/pysidetest/symbols.filter (renamed from sources/pyside2/tests/pysidetest/symbols.filter)0
-rw-r--r--sources/pyside6/tests/pysidetest/testobject.cpp (renamed from sources/pyside2/tests/pysidetest/testobject.cpp)0
-rw-r--r--sources/pyside6/tests/pysidetest/testobject.h (renamed from sources/pyside2/tests/pysidetest/testobject.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/testview.cpp (renamed from sources/pyside2/tests/pysidetest/testview.cpp)0
-rw-r--r--sources/pyside6/tests/pysidetest/testview.h (renamed from sources/pyside2/tests/pysidetest/testview.h)0
-rw-r--r--sources/pyside6/tests/pysidetest/typedef_signal_test.py60
-rw-r--r--sources/pyside6/tests/pysidetest/typesystem_pysidetest.xml (renamed from sources/pyside2/tests/pysidetest/typesystem_pysidetest.xml)0
-rw-r--r--sources/pyside6/tests/pysidetest/version_test.py54
-rw-r--r--sources/pyside6/tests/registry/CMakeLists.txt (renamed from sources/pyside2/tests/registry/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/registry/existence_test.py253
-rw-r--r--sources/pyside6/tests/registry/exists_darwin_5_14_2_ci.py (renamed from sources/pyside2/tests/registry/exists_darwin_5_14_2_ci.py)0
-rw-r--r--sources/pyside6/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py (renamed from sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py)0
-rw-r--r--sources/pyside6/tests/registry/exists_win32_5_14_2_ci.py (renamed from sources/pyside2/tests/registry/exists_win32_5_14_2_ci.py)0
-rw-r--r--sources/pyside6/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py (renamed from sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py)0
-rw-r--r--sources/pyside6/tests/registry/init_platform.py255
-rw-r--r--sources/pyside6/tests/registry/scrape_testresults.py (renamed from sources/pyside2/tests/registry/scrape_testresults.py)0
-rw-r--r--sources/pyside6/tests/registry/util.py181
-rwxr-xr-xsources/pyside6/tests/run_test.sh (renamed from sources/pyside2/tests/run_test.sh)0
-rw-r--r--sources/pyside6/tests/signals/CMakeLists.txt (renamed from sources/pyside2/tests/signals/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/signals/args_dont_match_test.py57
-rw-r--r--sources/pyside6/tests/signals/bug_189.py60
-rw-r--r--sources/pyside6/tests/signals/bug_311.py77
-rw-r--r--sources/pyside6/tests/signals/bug_312.py85
-rw-r--r--sources/pyside6/tests/signals/bug_319.py70
-rw-r--r--sources/pyside6/tests/signals/bug_79.py76
-rw-r--r--sources/pyside6/tests/signals/decorators_test.py111
-rw-r--r--sources/pyside6/tests/signals/disconnect_test.py92
-rw-r--r--sources/pyside6/tests/signals/invalid_callback_test.py62
-rw-r--r--sources/pyside6/tests/signals/lambda_gui_test.py79
-rw-r--r--sources/pyside6/tests/signals/lambda_test.py98
-rw-r--r--sources/pyside6/tests/signals/leaking_signal_test.py51
-rw-r--r--sources/pyside6/tests/signals/multiple_connections_gui_test.py95
-rw-r--r--sources/pyside6/tests/signals/multiple_connections_test.py109
-rw-r--r--sources/pyside6/tests/signals/pysignal_test.py221
-rw-r--r--sources/pyside6/tests/signals/qobject_destroyed_test.py56
-rw-r--r--sources/pyside6/tests/signals/qobject_receivers_test.py83
-rw-r--r--sources/pyside6/tests/signals/qobject_sender_test.py127
-rw-r--r--sources/pyside6/tests/signals/ref01_test.py62
-rw-r--r--sources/pyside6/tests/signals/ref02_test.py82
-rw-r--r--sources/pyside6/tests/signals/ref03_test.py64
-rw-r--r--sources/pyside6/tests/signals/ref04_test.py91
-rw-r--r--sources/pyside6/tests/signals/ref05_test.py81
-rw-r--r--sources/pyside6/tests/signals/ref06_test.py84
-rw-r--r--sources/pyside6/tests/signals/segfault_proxyparent_test.py92
-rw-r--r--sources/pyside6/tests/signals/self_connect_test.py71
-rw-r--r--sources/pyside6/tests/signals/short_circuit_test.py97
-rw-r--r--sources/pyside6/tests/signals/signal2signal_connect_test.py142
-rw-r--r--sources/pyside6/tests/signals/signal_across_threads.py106
-rw-r--r--sources/pyside6/tests/signals/signal_autoconnect_test.py65
-rw-r--r--sources/pyside6/tests/signals/signal_connectiontype_support_test.py61
-rw-r--r--sources/pyside6/tests/signals/signal_emission_gui_test.py148
-rw-r--r--sources/pyside6/tests/signals/signal_emission_test.py158
-rw-r--r--sources/pyside6/tests/signals/signal_enum_test.py80
-rw-r--r--sources/pyside6/tests/signals/signal_func_test.py55
-rw-r--r--sources/pyside6/tests/signals/signal_manager_refcount_test.py59
-rw-r--r--sources/pyside6/tests/signals/signal_number_limit_test.py97
-rw-r--r--sources/pyside6/tests/signals/signal_object_test.py121
-rw-r--r--sources/pyside6/tests/signals/signal_signature_test.py121
-rw-r--r--sources/pyside6/tests/signals/signal_with_primitive_type_test.py65
-rw-r--r--sources/pyside6/tests/signals/slot_reference_count_test.py87
-rw-r--r--sources/pyside6/tests/signals/static_metaobject_test.py92
-rw-r--r--sources/pyside6/tests/support/CMakeLists.txt (renamed from sources/pyside2/tests/support/CMakeLists.txt)0
-rw-r--r--sources/pyside6/tests/support/voidptr_test.py71
-rw-r--r--sources/pyside6/tests/tools/list-class-hierarchy.py116
-rw-r--r--sources/pyside6/tests/util/color.py (renamed from sources/pyside2/tests/util/color.py)0
-rw-r--r--sources/pyside6/tests/util/helper/__init__.py (renamed from sources/pyside2/tests/util/helper/__init__.py)0
-rw-r--r--sources/pyside6/tests/util/helper/basicpyslotcase.py (renamed from sources/pyside2/tests/util/helper/basicpyslotcase.py)0
-rw-r--r--sources/pyside6/tests/util/helper/docmodifier.py (renamed from sources/pyside2/tests/util/helper/docmodifier.py)0
-rw-r--r--sources/pyside6/tests/util/helper/helper.py (renamed from sources/pyside2/tests/util/helper/helper.py)0
-rw-r--r--sources/pyside6/tests/util/helper/helper.pyproject (renamed from sources/pyside2/tests/util/helper/helper.pyproject)0
-rw-r--r--sources/pyside6/tests/util/helper/timedqapplication.py49
-rw-r--r--sources/pyside6/tests/util/helper/usesqapplication.py51
-rw-r--r--sources/pyside6/tests/util/helper/usesqcoreapplication.py59
-rw-r--r--sources/pyside6/tests/util/helper/usesqguiapplication.py49
-rw-r--r--sources/pyside6/tests/util/httpd.py (renamed from sources/pyside2/tests/util/httpd.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtAssistant.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtAssistant.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtCore.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtCore.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtDesigner.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtDesigner.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtGui.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtGui.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtHelp.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtHelp.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtNetwork.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtNetwork.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtScript.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtScript.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtSql.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtSql.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtSvg.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtSvg.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtTest.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtTest.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtXml.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtXml.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/QtXmlPatterns.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/QtXmlPatterns.py)0
-rw-r--r--sources/pyside6/tests/util/module_wrapper/PySide/__init__.py (renamed from sources/pyside2/tests/util/module_wrapper/PySide/__init__.py)0
-rw-r--r--sources/pyside6/tests/util/processtimer.py (renamed from sources/pyside2/tests/util/processtimer.py)0
-rw-r--r--sources/pyside6/tests/util/pyqt_diff.py64
-rw-r--r--sources/pyside6/tests/util/pyqtcheck.py (renamed from sources/pyside2/tests/util/pyqtcheck.py)0
-rwxr-xr-xsources/pyside6/tests/util/rename_imports.sh (renamed from sources/pyside2/tests/util/rename_imports.sh)0
-rw-r--r--sources/pyside6/tests/util/test_processtimer.py (renamed from sources/pyside2/tests/util/test_processtimer.py)0
-rw-r--r--sources/pyside6/tests/util/use_pyqt4.sh (renamed from sources/pyside2/tests/util/use_pyqt4.sh)0
-rw-r--r--sources/pyside6/tests/util/use_pyside.sh (renamed from sources/pyside2/tests/util/use_pyside.sh)0
-rw-r--r--sources/pyside6/tests/util/valgrind-python.supp (renamed from sources/pyside2/tests/util/valgrind-python.supp)0
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetatype.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp2
-rw-r--r--sources/shiboken6/ApiExtractor/typesystemparser.cpp2
-rw-r--r--sources/shiboken6/data/Shiboken6Config-spec.cmake.in2
-rw-r--r--sources/shiboken6/doc/considerations.rst4
-rw-r--r--sources/shiboken6/doc/examples/samplebinding.rst2
-rw-r--r--sources/shiboken6/doc/gettingstarted.rst4
-rw-r--r--sources/shiboken6/doc/index.rst2
-rw-r--r--sources/shiboken6/doc/typesystem.rst4
-rw-r--r--sources/shiboken6/doc/typesystem_manipulating_objects.rst8
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp2
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp4
-rw-r--r--sources/shiboken6/libshiboken/embed/embedding_generator.py2
-rw-r--r--sources/shiboken6/libshiboken/embed/signature_bootstrap.py2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature.cpp2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_doc.rst20
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_extend.cpp2
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_helper.cpp4
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py10
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py8
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py2
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py44
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py110
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py8
-rw-r--r--testing/command.py6
-rw-r--r--testing/wheel_tester.py2
-rw-r--r--tools/create_changelog.py22
-rw-r--r--tools/debug_windows.py10
-rw-r--r--tools/dump_metaobject.py2
-rw-r--r--tools/metaobject_dump.py2
-rw-r--r--tools/missing_bindings-requirements.txt2
-rw-r--r--tools/missing_bindings.py12
-rw-r--r--tools/qtpy2cpp_lib/formatter.py4
-rw-r--r--tools/qtpy2cpp_lib/test_baseline/uic.py6
2575 files changed, 84262 insertions, 84262 deletions
diff --git a/.gitignore b/.gitignore
index c4bc8c8f8..a1ee1e425 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-## PySide2
+## PySide6
/pyside*_build
/pyside*_install
/PySide
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b18250bf..65172b351 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,22 +3,22 @@ cmake_policy(VERSION 3.16)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
-project(pyside2_super_project)
+project(pyside6_super_project)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-source builds are not allowed.")
endif()
-# Used to prevent overriding message function in both shiboken6 and pyside2.
-set(is_pyside2_superproject_build 1)
+# Used to prevent overriding message function in both shiboken6 and pyside6.
+set(is_pyside6_superproject_build 1)
add_subdirectory(sources/shiboken6)
# Semi-hack to include exported shiboken variables.
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/shiboken6/data")
-add_subdirectory(sources/pyside2)
+add_subdirectory(sources/pyside6)
add_subdirectory(sources/pyside-tools)
-# Semi-hack to include exported pyside2 variables.
-list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside2/libpyside")
+# Semi-hack to include exported pyside6 variables.
+list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside6/libpyside")
diff --git a/LICENSE.COMMERCIAL b/LICENSE.COMMERCIAL
index 5dcd1f6fc..9854ef9a9 100644
--- a/LICENSE.COMMERCIAL
+++ b/LICENSE.COMMERCIAL
@@ -895,7 +895,7 @@ object code form only (“Redistributables”) under this Agreement:
- The Licensed Software's QML (“Qt Quick”) launcher tool (“qmlscene” or
“qmlviewer”)
- The Licensed Software's installer framework
-- Qt for Python (PySide2)
+- Qt for Python (PySide6)
2. Parts of the Licensed Software that are not permitted for distribution
include, but are not limited to:
diff --git a/README.md b/README.md
index 298ffe237..36a05cb30 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Qt For Python
-Qt For Python is the [Python Qt bindings project](http://wiki.qt.io/PySide2),
+Qt For Python is the [Python Qt bindings project](http://wiki.qt.io/PySide6),
providing access to the complete Qt framework as well as to generator tools for
rapidly generating bindings for any C++ libraries.
Shiboken is the generator used to build the bindings.
-See README.pyside2.md and README.shiboken6.md for details.
+See README.pyside6.md and README.shiboken6.md for details.
## Building
@@ -21,7 +21,7 @@ The same setup.py script is used to build all the components of the project:
* shiboken6 (the supporting Python module)
* shiboken6-generator (the bindings generation executable)
- * PySide2
+ * PySide6
Preferably, a Qt (build) environment should be used to automatically pick up
the associated `qmake`, but optionally one can specify the location of `qmake`
@@ -38,10 +38,10 @@ be built:
* `--build-type=shiboken6`, build/package only the python module
* `--build-type=shiboken6-generator`, build/package the generator executable
- * `--build-type=pyside2`, build/package the PySide2 bindings.
+ * `--build-type=pyside6`, build/package the PySide6 bindings.
* `--build-type=all`, the implicit default to build all of the above
-When building PySide2, optionally, one can specify the location of the
+When building PySide6, optionally, one can specify the location of the
shiboken6 cmake config path if it is not on the current PATH with:
* `--shiboken-config-dir=/path/to/shiboken/cmake/config/dir`
@@ -55,18 +55,18 @@ directory path that contains the OpenSSL shared libraries `libeay32.dll` and
* `--openssl=C:\OpenSSL-Win64\bin`
-This will make sure that the libraries are copied into the PySide2 package and
+This will make sure that the libraries are copied into the PySide6 package and
are found by the QtNetwork module.
## Building Additional Options
On Linux and macOS you can use the option `--standalone` to embed Qt libraries
-into the PySide2 package. The option does not affect Windows, because it is
-used implicitly, i.e. all relevant DLLs have to be copied into the PySide2
+into the PySide6 package. The option does not affect Windows, because it is
+used implicitly, i.e. all relevant DLLs have to be copied into the PySide6
package anyway, because there is no proper rpath support on the platform.
You can use the option `--rpath=/path/to/lib/path` to specify which rpath
-values should be embedded into the PySide2 modules and shared libraries. This
+values should be embedded into the PySide6 modules and shared libraries. This
overrides the automatically generated values when the option is not specified.
You can use the option `--only-package` if you want to create more binary
@@ -75,13 +75,13 @@ every time:
e.g.:
-* First, we create a bdist_wheel from a full PySide2 build:
+* First, we create a bdist_wheel from a full PySide6 build:
```
python setup.py bdist_wheel --qmake=c:\Qt\5.12\bin\qmake.exe
--cmake=c:\tools\cmake\bin\cmake.exe
--openssl=c:\libs\OpenSSL32bit\bin
```
-* Then, we create a bdist_egg reusing the PySide2 build with option
+* Then, we create a bdist_egg reusing the PySide6 build with option
`--only-package`:
```
python setup.py bdist_egg --only-package
@@ -91,7 +91,7 @@ e.g.:
```
You can use the option `--qt-conf-prefix` to pass a path relative to the
-PySide2 installed package, which will be embedded into an auto-generated
+PySide6 installed package, which will be embedded into an auto-generated
`qt.conf` registered in the Qt resource system. This path will serve as the
PrefixPath for QLibraryInfo, thus allowing to choose where Qt plugins should be
loaded from. This option overrides the usual prefix chosen by `--standalone`
@@ -172,7 +172,7 @@ OpenSSL.
On Linux, official Qt builds will try to pick up the system OpenSSL library.
> **Note**: this means that Qt packages that directly link to the OpenSSL
-> shared libraries, are not currently compatible with standalone PySide2
+> shared libraries, are not currently compatible with standalone PySide6
> packages.
#### macOS SDK:
diff --git a/README.pyside2.md b/README.pyside2.md
deleted file mode 100644
index 0133c4c5e..000000000
--- a/README.pyside2.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# PySide2
-
-### Introduction
-
-PySide2 is the official Python module from the
-[Qt for Python project](http://wiki.qt.io/Qt_for_Python),
-which provides access to the complete Qt 5.12+ framework.
-
-The Qt for Python project is developed in the open, with all facilities you'd expect
-from any modern OSS project such as all code in a git repository and an open
-design process. We welcome any contribution conforming to the
-[Qt Contribution Agreement](https://www.qt.io/contributionagreement/).
-
-### Installation
-
-Since the release of the [Technical Preview](https://blog.qt.io/blog/2018/06/13/qt-python-5-11-released/)
-it is possible to install via `pip`, both from Qt's servers
-and [PyPi](https://pypi.org/project/PySide2/):
-
-```
-pip install PySide2
-```
-
-#### Dependencies
-
-PySide2 versions following 5.12 use a C++ parser based on
-[Clang](http://clang.org/). The Clang library (C-bindings), version 6.0 or
-higher is required for building. Prebuilt versions of it can be downloaded from
-[download.qt.io](http://download.qt.io/development_releases/prebuilt/libclang/).
-
-After unpacking the archive, set the environment variable *LLVM_INSTALL_DIR* to
-point to the folder containing the *include* and *lib* directories of Clang:
-
-```
-7z x .../libclang-release_100-linux-Rhel7.2-gcc5.3-x86_64-clazy.7z
-export LLVM_INSTALL_DIR=$PWD/libclang
-```
-
-On Windows:
-
-```
-7z x .../libclang-release_100-windows-vs2015_64-clazy.7z
-SET LLVM_INSTALL_DIR=%CD%\libclang
-```
-
-### Building from source
-
-For building PySide2 from scratch, please read about
-[getting started](https://wiki.qt.io/Qt_for_Python/GettingStarted).
-This process will include getting the code:
-
-```
-git clone https://code.qt.io/pyside/pyside-setup
-cd pyside-setup
-git branch --track 5.14 origin/5.15
-git checkout 5.15
-```
-
-then install the dependencies, and following the instructions per platform.
-A common build command will look like:
-
-```
-python setup.py install --qmake=path/to/qmake/ --parallel=8 --build-tests
-```
-
-You can obtain more information about the options to build PySide and Shiboken
-in [our wiki](https://wiki.qt.io/Qt_for_Python/).
-
-### Documentation and Bugs
-
-You can find more information about the PySide2 module API in the
-[official Qt for Python documentation](https://doc.qt.io/qtforpython/).
-
-If you come across any issue, please file a bug report at our
-[JIRA tracker](https://bugreports.qt.io/projects/PYSIDE) following
-our [guidelines](https://wiki.qt.io/Qt_for_Python/Reporting_Bugs).
-
-### Community
-
-Check *#qt-pyside*, our official IRC channel on FreeNode, or contact us via our
-[mailing list](http://lists.qt-project.org/mailman/listinfo/pyside).
-
-### Licensing
-
-PySide2 is available under both Open Source (LGPLv3/GPLv2) and commercial
-license. Using PyPi is the recommended installation source, because the
-content of the wheels is valid for both cases. For more information, refer to
-the [Qt Licensing page](https://www.qt.io/licensing/).
diff --git a/README.pyside6.md b/README.pyside6.md
new file mode 100644
index 000000000..4a854ebcc
--- /dev/null
+++ b/README.pyside6.md
@@ -0,0 +1,88 @@
+# PySide6
+
+### Introduction
+
+PySide6 is the official Python module from the
+[Qt for Python project](http://wiki.qt.io/Qt_for_Python),
+which provides access to the complete Qt 5.12+ framework.
+
+The Qt for Python project is developed in the open, with all facilities you'd expect
+from any modern OSS project such as all code in a git repository and an open
+design process. We welcome any contribution conforming to the
+[Qt Contribution Agreement](https://www.qt.io/contributionagreement/).
+
+### Installation
+
+Since the release of the [Technical Preview](https://blog.qt.io/blog/2018/06/13/qt-python-5-11-released/)
+it is possible to install via `pip`, both from Qt's servers
+and [PyPi](https://pypi.org/project/PySide6/):
+
+```
+pip install PySide6
+```
+
+#### Dependencies
+
+PySide6 versions following 5.12 use a C++ parser based on
+[Clang](http://clang.org/). The Clang library (C-bindings), version 6.0 or
+higher is required for building. Prebuilt versions of it can be downloaded from
+[download.qt.io](http://download.qt.io/development_releases/prebuilt/libclang/).
+
+After unpacking the archive, set the environment variable *LLVM_INSTALL_DIR* to
+point to the folder containing the *include* and *lib* directories of Clang:
+
+```
+7z x .../libclang-release_100-linux-Rhel7.2-gcc5.3-x86_64-clazy.7z
+export LLVM_INSTALL_DIR=$PWD/libclang
+```
+
+On Windows:
+
+```
+7z x .../libclang-release_100-windows-vs2015_64-clazy.7z
+SET LLVM_INSTALL_DIR=%CD%\libclang
+```
+
+### Building from source
+
+For building PySide6 from scratch, please read about
+[getting started](https://wiki.qt.io/Qt_for_Python/GettingStarted).
+This process will include getting the code:
+
+```
+git clone https://code.qt.io/pyside/pyside-setup
+cd pyside-setup
+git branch --track 5.14 origin/5.15
+git checkout 5.15
+```
+
+then install the dependencies, and following the instructions per platform.
+A common build command will look like:
+
+```
+python setup.py install --qmake=path/to/qmake/ --parallel=8 --build-tests
+```
+
+You can obtain more information about the options to build PySide and Shiboken
+in [our wiki](https://wiki.qt.io/Qt_for_Python/).
+
+### Documentation and Bugs
+
+You can find more information about the PySide6 module API in the
+[official Qt for Python documentation](https://doc.qt.io/qtforpython/).
+
+If you come across any issue, please file a bug report at our
+[JIRA tracker](https://bugreports.qt.io/projects/PYSIDE) following
+our [guidelines](https://wiki.qt.io/Qt_for_Python/Reporting_Bugs).
+
+### Community
+
+Check *#qt-pyside*, our official IRC channel on FreeNode, or contact us via our
+[mailing list](http://lists.qt-project.org/mailman/listinfo/pyside).
+
+### Licensing
+
+PySide6 is available under both Open Source (LGPLv3/GPLv2) and commercial
+license. Using PyPi is the recommended installation source, because the
+content of the wheels is valid for both cases. For more information, refer to
+the [Qt Licensing page](https://www.qt.io/licensing/).
diff --git a/build_history/blacklist.txt b/build_history/blacklist.txt
index 9b63f9784..eaa9a829d 100644
--- a/build_history/blacklist.txt
+++ b/build_history/blacklist.txt
@@ -58,7 +58,7 @@
linux
darwin
win32
-# AttributeError: 'PySide2.QtQuick.QQuickItem' object has no attribute 'simpleFunction'
+# AttributeError: 'PySide6.QtQuick.QQuickItem' object has no attribute 'simpleFunction'
[QtQml::bug_451]
py2
py3
diff --git a/build_scripts/config.py b/build_scripts/config.py
index 2e96efa7a..eb632fe3f 100644
--- a/build_scripts/config.py
+++ b/build_scripts/config.py
@@ -58,11 +58,11 @@ class Config(object):
self.invocation_type = None
# The type of the top-level build.
- # all - build shiboken6 module, shiboken6-generator and PySide2
+ # all - build shiboken6 module, shiboken6-generator and PySide6
# modules
# shiboken6 - build only shiboken6 module
# shiboken6-generator - build only the shiboken6-generator
- # pyside2 - build only PySide2 modules
+ # pyside6 - build only PySide6 modules
self.build_type = None
# The internal build type, used for internal invocations of
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 99fdd286c..a1a697e3b 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -419,7 +419,7 @@ class PysideInstallLib(_install_lib):
def install(self):
"""
Installs files from build/xxx directory into final
- site-packages/PySide2 directory.
+ site-packages/PySide6 directory.
"""
if os.path.isdir(self.build_dir):
@@ -1115,7 +1115,7 @@ class PysideBuild(_build, DistUtilsCommandMixin):
pyside_libs.extend(executables)
- # Update rpath in PySide2 libs
+ # Update rpath in PySide6 libs
for srcname in pyside_libs:
srcpath = os.path.join(package_path, srcname)
if os.path.isdir(srcpath) or os.path.islink(srcpath):
@@ -1156,7 +1156,7 @@ class PysideRstDocs(Command, DistUtilsCommandMixin):
raise DistutilsSetupError("Sphinx not found - aborting")
self.html_dir = "html"
- # creating directories html/pyside2/shiboken6
+ # creating directories html/pyside6/shiboken6
try:
if not os.path.isdir(self.html_dir):
os.mkdir(self.html_dir)
@@ -1169,7 +1169,7 @@ class PysideRstDocs(Command, DistUtilsCommandMixin):
os.mkdir(out_shiboken)
self.out_dir = out_shiboken
# We know that on the shiboken step, we already created the
- # 'pyside2' directory
+ # 'pyside6' directory
elif self.name == PYSIDE:
self.out_dir = os.path.join(self.html_dir, PYSIDE)
except:
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index 482f2b82c..d92680a7b 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -175,14 +175,14 @@ def prepare_packages_posix(self, vars):
"{st_build_dir}/{st_package_name}/glue",
vars=vars)
- # <source>/pyside2/{st_package_name}/support/* ->
+ # <source>/pyside6/{st_package_name}/support/* ->
# <setup>/{st_package_name}/support/*
copydir(
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}/support",
"{st_build_dir}/{st_package_name}/support",
vars=vars)
- # <source>/pyside2/{st_package_name}/*.pyi ->
+ # <source>/pyside6/{st_package_name}/*.pyi ->
# <setup>/{st_package_name}/*.pyi
copydir(
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}",
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index 2f58c0cc9..058636d84 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -140,7 +140,7 @@ def prepare_packages_win32(self, vars):
vars=vars)
if config.is_internal_pyside_build():
- # <build>/pyside2/{st_package_name}/*.pdb ->
+ # <build>/pyside6/{st_package_name}/*.pdb ->
# <setup>/{st_package_name}
copydir(
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}",
@@ -186,14 +186,14 @@ def prepare_packages_win32(self, vars):
"{st_build_dir}/{st_package_name}/glue",
vars=vars)
- # <source>/pyside2/{st_package_name}/support/* ->
+ # <source>/pyside6/{st_package_name}/support/* ->
# <setup>/{st_package_name}/support/*
copydir(
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}/support",
"{st_build_dir}/{st_package_name}/support",
vars=vars)
- # <source>/pyside2/{st_package_name}/*.pyi ->
+ # <source>/pyside6/{st_package_name}/*.pyi ->
# <setup>/{st_package_name}/*.pyi
copydir(
"{build_dir}/{PYSIDE}/{st_package_name}",
@@ -367,7 +367,7 @@ def copy_qt_artifacts(self, copy_pdbs, vars):
# In debug_and_release case, choosing which files to copy
# is more difficult. We want to copy only the files that
- # match the PySide2 build type. So if PySide2 is built in
+ # match the PySide6 build type. So if PySide6 is built in
# debug mode, we want to copy only Qt debug libraries
# (ending with "d.dll"). Or vice versa. The problem is that
# some libraries have "d" as the last character of the
diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
index 3b6c6e117..df62083ba 100644
--- a/build_scripts/setup_runner.py
+++ b/build_scripts/setup_runner.py
@@ -129,7 +129,7 @@ class SetupRunner(object):
raise RuntimeError("Invalid '{}' option given to --build-type. "
.format(config.build_type))
- # Build everything: shiboken6, shiboken6-generator and PySide2.
+ # Build everything: shiboken6, shiboken6-generator and PySide6.
help_requested = '--help' in self.sub_argv or '-h' in self.sub_argv
if help_requested:
self.add_setup_internal_invocation(config.pyside_option_name)
diff --git a/build_scripts/versions.py b/build_scripts/versions.py
index ff340d479..f7312ebb4 100644
--- a/build_scripts/versions.py
+++ b/build_scripts/versions.py
@@ -38,6 +38,6 @@
#############################################################################
-PYSIDE = 'pyside2'
-PYSIDE_MODULE = 'PySide2'
+PYSIDE = 'pyside6'
+PYSIDE_MODULE = 'PySide6'
SHIBOKEN = 'shiboken6'
diff --git a/build_scripts/wheel_override.py b/build_scripts/wheel_override.py
index 0a631911b..6ade67bf6 100644
--- a/build_scripts/wheel_override.py
+++ b/build_scripts/wheel_override.py
@@ -100,8 +100,8 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
# Slightly modified version of wheel's wheel_dist_name
# method, to add the Qt version as well.
# Example:
- # PySide2-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
- # The PySide2 version is "5.6".
+ # PySide6-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
+ # The PySide6 version is "5.6".
# The Qt version built against is "5.6.4".
wheel_version = "{}-{}".format(self._package_version, get_qt_version())
components = (_safer_name(self.distribution.get_name()), wheel_version)
diff --git a/build_scripts/wheel_utils.py b/build_scripts/wheel_utils.py
index 0b15c1a89..e4cd1bcfa 100644
--- a/build_scripts/wheel_utils.py
+++ b/build_scripts/wheel_utils.py
@@ -79,7 +79,7 @@ def get_qt_version():
@memoize
def get_package_version():
- """ Returns the version string for the PySide2 package. """
+ """ Returns the version string for the PySide6 package. """
setup_script_dir = os.getcwd()
pyside_version_py = os.path.join(
setup_script_dir, "sources", PYSIDE, "pyside_version.py")
@@ -112,7 +112,7 @@ def macos_qt_min_deployment_target():
@memoize
def macos_pyside_min_deployment_target():
"""
- Compute and validate PySide2 MACOSX_DEPLOYMENT_TARGET value.
+ Compute and validate PySide6 MACOSX_DEPLOYMENT_TARGET value.
Candidate sources that are considered:
- setup.py provided value
- maximum value between minimum deployment target of the
diff --git a/coin_build_instructions.py b/coin_build_instructions.py
index 4f006612f..b89bf850e 100644
--- a/coin_build_instructions.py
+++ b/coin_build_instructions.py
@@ -94,7 +94,7 @@ def is_snapshot_build():
"""
setup_script_dir = get_current_script_path()
pyside_version_py = os.path.join(
- setup_script_dir, "sources", "pyside2", "pyside_version.py")
+ setup_script_dir, "sources", "pyside6", "pyside_version.py")
d = get_python_dict(pyside_version_py)
release_version_type = d['release_version_type']
diff --git a/examples/3d/simple3d.py b/examples/3d/simple3d.py
index cea662a95..3c6ff3bf6 100644
--- a/examples/3d/simple3d.py
+++ b/examples/3d/simple3d.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the qt3d/simple-cpp example from Qt v5.x"""
+"""PySide6 port of the qt3d/simple-cpp example from Qt v5.x"""
import sys
-from PySide2.QtCore import(Property, QObject, QPropertyAnimation, Signal)
-from PySide2.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
-from PySide2.Qt3DCore import (Qt3DCore)
-from PySide2.Qt3DExtras import (Qt3DExtras)
+from PySide6.QtCore import(Property, QObject, QPropertyAnimation, Signal)
+from PySide6.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
+from PySide6.Qt3DCore import (Qt3DCore)
+from PySide6.Qt3DExtras import (Qt3DExtras)
class OrbitTransformController(QObject):
def __init__(self, parent):
diff --git a/examples/axcontainer/axviewer.py b/examples/axcontainer/axviewer.py
index 50e50ee1c..2bd32ef0b 100644
--- a/examples/axcontainer/axviewer.py
+++ b/examples/axcontainer/axviewer.py
@@ -39,12 +39,12 @@
##
#############################################################################
-"""PySide2 Active Qt Viewer example"""
+"""PySide6 Active Qt Viewer example"""
import sys
-from PySide2.QtAxContainer import QAxSelect, QAxWidget
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QDialog,
+from PySide6.QtAxContainer import QAxSelect, QAxWidget
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QDialog,
QMainWindow, QMessageBox, QToolBar)
class MainWindow(QMainWindow):
diff --git a/examples/charts/audio.py b/examples/charts/audio.py
index f899ac4c8..6d7b4895a 100644
--- a/examples/charts/audio.py
+++ b/examples/charts/audio.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the charts/audio example from Qt v5.x"""
+"""PySide6 port of the charts/audio example from Qt v5.x"""
import sys
-from PySide2.QtCharts import QtCharts
-from PySide2.QtCore import QPointF
-from PySide2.QtMultimedia import (QAudioDeviceInfo, QAudioFormat,
+from PySide6.QtCharts import QtCharts
+from PySide6.QtCore import QPointF
+from PySide6.QtMultimedia import (QAudioDeviceInfo, QAudioFormat,
QAudioInput)
-from PySide2.QtWidgets import QApplication, QMainWindow, QMessageBox
+from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox
sampleCount = 2000
resolution = 4
diff --git a/examples/charts/callout.py b/examples/charts/callout.py
index 54e8eaf24..666b2aae5 100644
--- a/examples/charts/callout.py
+++ b/examples/charts/callout.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the Callout example from Qt v5.x"""
+"""PySide6 port of the Callout example from Qt v5.x"""
import sys
-from PySide2.QtWidgets import (QApplication, QGraphicsScene,
+from PySide6.QtWidgets import (QApplication, QGraphicsScene,
QGraphicsView, QGraphicsSimpleTextItem, QGraphicsItem)
-from PySide2.QtCore import Qt, QPointF, QRectF, QRect
-from PySide2.QtCharts import QtCharts
-from PySide2.QtGui import QPainter, QFont, QFontMetrics, QPainterPath, QColor
+from PySide6.QtCore import Qt, QPointF, QRectF, QRect
+from PySide6.QtCharts import QtCharts
+from PySide6.QtGui import QPainter, QFont, QFontMetrics, QPainterPath, QColor
class Callout(QGraphicsItem):
diff --git a/examples/charts/chartthemes/README.md b/examples/charts/chartthemes/README.md
index e11fa93c5..806e391d2 100644
--- a/examples/charts/chartthemes/README.md
+++ b/examples/charts/chartthemes/README.md
@@ -3,7 +3,7 @@
To generated the file `ui_themewidget.py`, the following
command need to be executed:
-`pyside2-uic themewidget.ui > ui_themewidget.py`
+`pyside6-uic themewidget.ui > ui_themewidget.py`
Also, if you modify the UI file, then you would need
to run the previous command again.
diff --git a/examples/charts/chartthemes/main.py b/examples/charts/chartthemes/main.py
index e18e92cf2..423806490 100644
--- a/examples/charts/chartthemes/main.py
+++ b/examples/charts/chartthemes/main.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Chart Themes example from Qt v5.x"""
+"""PySide6 port of the Chart Themes example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPointF, Qt
-from PySide2.QtGui import QColor, QPainter, QPalette
-from PySide2.QtWidgets import (QApplication, QMainWindow, QSizePolicy,
+from PySide6.QtCore import QPointF, Qt
+from PySide6.QtGui import QColor, QPainter, QPalette
+from PySide6.QtWidgets import (QApplication, QMainWindow, QSizePolicy,
QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
from ui_themewidget import Ui_ThemeWidgetForm as ui
diff --git a/examples/charts/chartthemes/ui_themewidget.py b/examples/charts/chartthemes/ui_themewidget.py
index bf6703963..d2fdf55bc 100644
--- a/examples/charts/chartthemes/ui_themewidget.py
+++ b/examples/charts/chartthemes/ui_themewidget.py
@@ -8,10 +8,10 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
-from PySide2.QtWidgets import *
+from PySide6.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide6.QtWidgets import *
class Ui_ThemeWidgetForm(object):
def setupUi(self, ThemeWidgetForm):
diff --git a/examples/charts/donutbreakdown.py b/examples/charts/donutbreakdown.py
index 712bea577..cde318087 100644
--- a/examples/charts/donutbreakdown.py
+++ b/examples/charts/donutbreakdown.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Donut Chart Breakdown example from Qt v5.x"""
+"""PySide6 port of the Donut Chart Breakdown example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QColor, QFont, QPainter
-from PySide2.QtWidgets import QApplication, QMainWindow
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QColor, QFont, QPainter
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCharts import QtCharts
class MainSlice(QtCharts.QPieSlice):
def __init__(self, breakdown_series, parent=None):
diff --git a/examples/charts/legend.py b/examples/charts/legend.py
index 47099e729..b833ccedd 100644
--- a/examples/charts/legend.py
+++ b/examples/charts/legend.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Legend example from Qt v5.x"""
+"""PySide6 port of the Legend example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QRectF
-from PySide2.QtGui import QBrush, QColor, QPainter, QPen
-from PySide2.QtWidgets import (QApplication, QDoubleSpinBox,
+from PySide6.QtCore import Qt, QRectF
+from PySide6.QtGui import QBrush, QColor, QPainter, QPen
+from PySide6.QtWidgets import (QApplication, QDoubleSpinBox,
QFormLayout, QGridLayout, QGroupBox, QPushButton, QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
class MainWidget(QWidget):
def __init__(self, parent=None):
diff --git a/examples/charts/lineandbar.py b/examples/charts/lineandbar.py
index 0a29aa786..e06298e63 100644
--- a/examples/charts/lineandbar.py
+++ b/examples/charts/lineandbar.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the line/bar example from Qt v5.x"""
+"""PySide6 port of the line/bar example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPoint, Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QPoint, Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/linechart.py b/examples/charts/linechart.py
index 98d17b35c..7a3e15f60 100644
--- a/examples/charts/linechart.py
+++ b/examples/charts/linechart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the linechart example from Qt v5.x"""
+"""PySide6 port of the linechart example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPointF
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QPointF
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/logvalueaxis.py b/examples/charts/logvalueaxis.py
index 7fb5604cd..37558ecb7 100644
--- a/examples/charts/logvalueaxis.py
+++ b/examples/charts/logvalueaxis.py
@@ -38,15 +38,15 @@
##
#############################################################################
-"""PySide2 port of the Logarithmic Axis Example from Qt v5.x"""
+"""PySide6 port of the Logarithmic Axis Example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QPointF
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt, QPointF
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/memoryusage.py b/examples/charts/memoryusage.py
index 4954b9cd7..9d7a99311 100644
--- a/examples/charts/memoryusage.py
+++ b/examples/charts/memoryusage.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 Charts example: Simple memory usage viewer"""
+"""PySide6 Charts example: Simple memory usage viewer"""
import os
import sys
-from PySide2.QtCore import QProcess
-from PySide2.QtWidgets import QApplication, QMainWindow
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QProcess
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCharts import QtCharts
def runProcess(command, arguments):
process = QProcess()
diff --git a/examples/charts/modeldata.py b/examples/charts/modeldata.py
index aa53e74ba..739b73d63 100644
--- a/examples/charts/modeldata.py
+++ b/examples/charts/modeldata.py
@@ -39,16 +39,16 @@
##
#############################################################################
-"""PySide2 port of the Model Data example from Qt v5.x"""
+"""PySide6 port of the Model Data example from Qt v5.x"""
import sys
from random import randrange
-from PySide2.QtCore import QAbstractTableModel, QModelIndex, QRect, Qt
-from PySide2.QtGui import QColor, QPainter
-from PySide2.QtWidgets import (QApplication, QGridLayout, QHeaderView,
+from PySide6.QtCore import QAbstractTableModel, QModelIndex, QRect, Qt
+from PySide6.QtGui import QColor, QPainter
+from PySide6.QtWidgets import (QApplication, QGridLayout, QHeaderView,
QTableView, QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
class CustomTableModel(QAbstractTableModel):
def __init__(self):
diff --git a/examples/charts/nesteddonuts.py b/examples/charts/nesteddonuts.py
index 77bbabfc7..09c77d022 100644
--- a/examples/charts/nesteddonuts.py
+++ b/examples/charts/nesteddonuts.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the Nested Donuts example from Qt v5.x"""
+"""PySide6 port of the Nested Donuts example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QApplication, QGridLayout, QWidget
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QApplication, QGridLayout, QWidget
+from PySide6.QtCharts import QtCharts
from random import randrange
from functools import partial
diff --git a/examples/charts/percentbarchart.py b/examples/charts/percentbarchart.py
index 256070e7f..a70cae7cf 100644
--- a/examples/charts/percentbarchart.py
+++ b/examples/charts/percentbarchart.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the Percent Bar Chart example from Qt v5.x"""
+"""PySide6 port of the Percent Bar Chart example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QMainWindow, QApplication)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QMainWindow, QApplication)
+from PySide6.QtCharts import QtCharts
class MainWindow(QMainWindow):
def __init__(self):
diff --git a/examples/charts/piechart.py b/examples/charts/piechart.py
index 820da8b91..e1131d96e 100644
--- a/examples/charts/piechart.py
+++ b/examples/charts/piechart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the Pie Chart Example from Qt v5.x"""
+"""PySide6 port of the Pie Chart Example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter, QPen
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter, QPen
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/qmlpolarchart/qmlpolarchart.py b/examples/charts/qmlpolarchart/qmlpolarchart.py
index 4398169b0..006a801f1 100644
--- a/examples/charts/qmlpolarchart/qmlpolarchart.py
+++ b/examples/charts/qmlpolarchart/qmlpolarchart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the QML Polar Chart Example from Qt v5.x"""
+"""PySide6 port of the QML Polar Chart Example from Qt v5.x"""
import sys
import os
-from PySide2.QtQuick import QQuickView
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtWidgets import QApplication, QMainWindow
+from PySide6.QtQuick import QQuickView
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtWidgets import QApplication, QMainWindow
if __name__ == '__main__':
diff --git a/examples/charts/temperaturerecords.py b/examples/charts/temperaturerecords.py
index dfd4dd67c..9c2cad1df 100644
--- a/examples/charts/temperaturerecords.py
+++ b/examples/charts/temperaturerecords.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the Temperature Records example from Qt v5.x"""
+"""PySide6 port of the Temperature Records example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class MainWindow(QMainWindow):
diff --git a/examples/corelib/threads/mandelbrot.py b/examples/corelib/threads/mandelbrot.py
index c0ca70d68..2d82cd65a 100644
--- a/examples/corelib/threads/mandelbrot.py
+++ b/examples/corelib/threads/mandelbrot.py
@@ -40,12 +40,12 @@
##
#############################################################################
-"""PySide2 port of the corelib/threads/mandelbrot example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the corelib/threads/mandelbrot example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import (Signal, QMutex, QMutexLocker, QPoint, QSize, Qt,
+from PySide6.QtCore import (Signal, QMutex, QMutexLocker, QPoint, QSize, Qt,
QThread, QWaitCondition)
-from PySide2.QtGui import QColor, QImage, QPainter, QPixmap, qRgb
-from PySide2.QtWidgets import QApplication, QWidget
+from PySide6.QtGui import QColor, QImage, QPainter, QPixmap, qRgb
+from PySide6.QtWidgets import QApplication, QWidget
DefaultCenterX = -0.647011
diff --git a/examples/corelib/tools/regexp.py b/examples/corelib/tools/regexp.py
index 3a953329a..48c03309e 100644
--- a/examples/corelib/tools/regexp.py
+++ b/examples/corelib/tools/regexp.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/tools/regexp example from Qt v5.x"""
+"""PySide6 port of the widgets/tools/regexp example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class RegExpDialog(QtWidgets.QDialog):
diff --git a/examples/corelib/tools/settingseditor/settingseditor.py b/examples/corelib/tools/settingseditor/settingseditor.py
index 121d7cb0e..9e2a2a2d8 100644
--- a/examples/corelib/tools/settingseditor/settingseditor.py
+++ b/examples/corelib/tools/settingseditor/settingseditor.py
@@ -41,15 +41,15 @@
##
#############################################################################
-"""PySide2 port of the widgets/tools/settingseditor example from Qt v5.x"""
+"""PySide6 port of the widgets/tools/settingseditor example from Qt v5.x"""
import sys
-from PySide2.QtCore import (QByteArray, QDate, QDateTime, QDir, QEvent, QPoint,
+from PySide6.QtCore import (QByteArray, QDate, QDateTime, QDir, QEvent, QPoint,
QRect, QRegularExpression, QSettings, QSize, QTime, QTimer, Qt)
-from PySide2.QtGui import (QAction, QColor, QIcon, QIntValidator,
+from PySide6.QtGui import (QAction, QColor, QIcon, QIntValidator,
QDoubleValidator, QRegularExpressionValidator, QValidator)
-from PySide2.QtWidgets import (QAbstractItemView, QApplication,
+from PySide6.QtWidgets import (QAbstractItemView, QApplication,
QCheckBox, QComboBox, QFileDialog, QDialog, QDialogButtonBox, QGridLayout,
QGroupBox, QHeaderView, QInputDialog, QItemDelegate, QLabel, QLineEdit,
QMainWindow, QMessageBox, QStyle, QSpinBox, QStyleOptionViewItem,
diff --git a/examples/datavisualization/bars3d.py b/examples/datavisualization/bars3d.py
index d0a69a802..759983341 100644
--- a/examples/datavisualization/bars3d.py
+++ b/examples/datavisualization/bars3d.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 QtDataVisualization example"""
+"""PySide6 QtDataVisualization example"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtWidgets import QApplication, QSizePolicy, QMainWindow, QWidget
-from PySide2.QtDataVisualization import QtDataVisualization
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtWidgets import QApplication, QSizePolicy, QMainWindow, QWidget
+from PySide6.QtDataVisualization import QtDataVisualization
def dataToBarDataRow(data):
return list(QtDataVisualization.QBarDataItem(d) for d in data)
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
index a604a05bc..c14669908 100644
--- a/examples/declarative/extending/chapter1-basics/basics.py
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter1-basics example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter1-basics example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter2-methods/methods.py b/examples/declarative/extending/chapter2-methods/methods.py
index 819d4514a..b10cab324 100644
--- a/examples/declarative/extending/chapter2-methods/methods.py
+++ b/examples/declarative/extending/chapter2-methods/methods.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter2-methods example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter2-methods example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter3-bindings/bindings.py b/examples/declarative/extending/chapter3-bindings/bindings.py
index 62e19c955..2c1546927 100644
--- a/examples/declarative/extending/chapter3-bindings/bindings.py
+++ b/examples/declarative/extending/chapter3-bindings/bindings.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter3-bindings example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter3-bindings example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
index b07aad59b..63c4e4959 100644
--- a/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
+++ b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter4-customPropertyTypes example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter4-customPropertyTypes example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
+from PySide6.QtCore import Property, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
class PieSlice (QQuickPaintedItem):
diff --git a/examples/declarative/extending/chapter5-listproperties/listproperties.py b/examples/declarative/extending/chapter5-listproperties/listproperties.py
index dd3e5c65c..466b3aca1 100644
--- a/examples/declarative/extending/chapter5-listproperties/listproperties.py
+++ b/examples/declarative/extending/chapter5-listproperties/listproperties.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType, ListProperty
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
+from PySide6.QtCore import Property, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType, ListProperty
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
class PieSlice (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/scrolling.py b/examples/declarative/scrolling.py
index f4b740e02..63f79a45b 100644
--- a/examples/declarative/scrolling.py
+++ b/examples/declarative/scrolling.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
# This example uses a QML file to show a scrolling list containing
# all the items listed in dataList.
diff --git a/examples/declarative/signals/pytoqml1/main.py b/examples/declarative/signals/pytoqml1/main.py
index b57809392..c210d7182 100644
--- a/examples/declarative/signals/pytoqml1/main.py
+++ b/examples/declarative/signals/pytoqml1/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QTimer, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QTimer, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
if __name__ == '__main__':
app = QGuiApplication(sys.argv)
diff --git a/examples/declarative/signals/qmltopy1/main.py b/examples/declarative/signals/qmltopy1/main.py
index a2adfef29..2875cc6cc 100644
--- a/examples/declarative/signals/qmltopy1/main.py
+++ b/examples/declarative/signals/qmltopy1/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class Console(QObject):
"""Output stuff on the console."""
diff --git a/examples/declarative/signals/qmltopy2/main.py b/examples/declarative/signals/qmltopy2/main.py
index 0fc6a2225..c0c6a25ef 100644
--- a/examples/declarative/signals/qmltopy2/main.py
+++ b/examples/declarative/signals/qmltopy2/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class RotateValue(QObject):
def __init__(self):
diff --git a/examples/declarative/signals/qmltopy3/main.py b/examples/declarative/signals/qmltopy3/main.py
index 0ba50fae8..ada78cc30 100644
--- a/examples/declarative/signals/qmltopy3/main.py
+++ b/examples/declarative/signals/qmltopy3/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
def sayThis(s):
print(s)
diff --git a/examples/declarative/signals/qmltopy4/main.py b/examples/declarative/signals/qmltopy4/main.py
index 278f3526f..865d157f7 100644
--- a/examples/declarative/signals/qmltopy4/main.py
+++ b/examples/declarative/signals/qmltopy4/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
def sayThis(s):
print(s)
diff --git a/examples/declarative/textproperties/main.py b/examples/declarative/textproperties/main.py
index 2f9b987d0..3d9944bc8 100644
--- a/examples/declarative/textproperties/main.py
+++ b/examples/declarative/textproperties/main.py
@@ -41,10 +41,10 @@
import sys
from os.path import abspath, dirname, join
-from PySide2.QtCore import QObject, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlApplicationEngine
-from PySide2.QtQuickControls2 import QQuickStyle
+from PySide6.QtCore import QObject, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtQuickControls2 import QQuickStyle
class Bridge(QObject):
diff --git a/examples/declarative/usingmodel.py b/examples/declarative/usingmodel.py
index 3d5e8be32..a32945a25 100644
--- a/examples/declarative/usingmodel.py
+++ b/examples/declarative/usingmodel.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QAbstractListModel, Qt, QUrl, QByteArray
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QAbstractListModel, Qt, QUrl, QByteArray
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class PersonModel (QAbstractListModel):
MyRole = Qt.UserRole + 1
diff --git a/examples/external/matplotlib/widget_3dplot.py b/examples/external/matplotlib/widget_3dplot.py
index 6f47da31b..874e7e439 100644
--- a/examples/external/matplotlib/widget_3dplot.py
+++ b/examples/external/matplotlib/widget_3dplot.py
@@ -44,9 +44,9 @@ import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
from mpl_toolkits.mplot3d import axes3d
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import (QApplication, QComboBox, QHBoxLayout,
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout,
QHeaderView, QLabel, QMainWindow, QSlider,
QTableWidget, QTableWidgetItem, QVBoxLayout,
QWidget)
diff --git a/examples/external/opencv/webcam_pattern_detection.py b/examples/external/opencv/webcam_pattern_detection.py
index 664ba2111..4325fc810 100644
--- a/examples/external/opencv/webcam_pattern_detection.py
+++ b/examples/external/opencv/webcam_pattern_detection.py
@@ -43,9 +43,9 @@ import sys
import time
import cv2
-from PySide2.QtCore import Qt, QThread, Signal, Slot
-from PySide2.QtGui import QAction, QImage, QKeySequence, QPixmap
-from PySide2.QtWidgets import (QApplication, QComboBox, QGroupBox,
+from PySide6.QtCore import Qt, QThread, Signal, Slot
+from PySide6.QtGui import QAction, QImage, QKeySequence, QPixmap
+from PySide6.QtWidgets import (QApplication, QComboBox, QGroupBox,
QHBoxLayout, QLabel, QMainWindow, QPushButton,
QSizePolicy, QVBoxLayout, QWidget)
diff --git a/examples/external/scikit/staining_colors_separation.py b/examples/external/scikit/staining_colors_separation.py
index d21453927..4395aba13 100644
--- a/examples/external/scikit/staining_colors_separation.py
+++ b/examples/external/scikit/staining_colors_separation.py
@@ -44,9 +44,9 @@ import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.figure import Figure
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSizePolicy,
QVBoxLayout, QWidget)
from skimage import data
diff --git a/examples/installer_test/hello.py b/examples/installer_test/hello.py
index c03fe1311..7a8811158 100644
--- a/examples/installer_test/hello.py
+++ b/examples/installer_test/hello.py
@@ -57,9 +57,9 @@ import random
import platform
import time
-from PySide2.QtWidgets import (QApplication, QLabel, QPushButton,
+from PySide6.QtWidgets import (QApplication, QLabel, QPushButton,
QVBoxLayout, QWidget)
-from PySide2.QtCore import Slot, Qt, QTimer
+from PySide6.QtCore import Slot, Qt, QTimer
class MyWidget(QWidget):
def __init__(self):
diff --git a/examples/macextras/macpasteboardmime.py b/examples/macextras/macpasteboardmime.py
index c8513395b..3da05a313 100644
--- a/examples/macextras/macpasteboardmime.py
+++ b/examples/macextras/macpasteboardmime.py
@@ -40,10 +40,10 @@
############################################################################
import sys
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
try:
- from PySide2 import QtMacExtras
+ from PySide6 import QtMacExtras
except ImportError:
app = QtWidgets.QApplication(sys.argv)
messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "QtMacExtras macpasteboardmime",
diff --git a/examples/multimedia/audiooutput.py b/examples/multimedia/audiooutput.py
index c6c7b9f93..44c0f6910 100644
--- a/examples/multimedia/audiooutput.py
+++ b/examples/multimedia/audiooutput.py
@@ -40,15 +40,15 @@
##
#############################################################################
-"""PySide2 port of the multimedia/audiooutput example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the multimedia/audiooutput example from Qt v5.x, originating from PyQt"""
from math import pi, sin
from struct import pack
-from PySide2.QtCore import QByteArray, QIODevice, Qt, QTimer, qWarning
-from PySide2.QtMultimedia import (QAudio, QAudioDeviceInfo, QAudioFormat,
+from PySide6.QtCore import QByteArray, QIODevice, Qt, QTimer, qWarning
+from PySide6.QtMultimedia import (QAudio, QAudioDeviceInfo, QAudioFormat,
QAudioOutput)
-from PySide2.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
+from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSlider, QVBoxLayout, QWidget)
diff --git a/examples/multimedia/camera.py b/examples/multimedia/camera.py
index 644b5340c..e8e95b7ee 100644
--- a/examples/multimedia/camera.py
+++ b/examples/multimedia/camera.py
@@ -39,16 +39,16 @@
##
#############################################################################
-"""PySide2 Multimedia Camera Example"""
+"""PySide6 Multimedia Camera Example"""
import os, sys
-from PySide2.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QAction, QGuiApplication, QDesktopServices, QIcon
-from PySide2.QtGui import QImage, QPixmap
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
+from PySide6.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QAction, QGuiApplication, QDesktopServices, QIcon
+from PySide6.QtGui import QImage, QPixmap
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QTabWidget, QToolBar, QVBoxLayout, QWidget)
-from PySide2.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
-from PySide2.QtMultimediaWidgets import QCameraViewfinder
+from PySide6.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
+from PySide6.QtMultimediaWidgets import QCameraViewfinder
class ImageView(QWidget):
def __init__(self, previewImage, fileName):
@@ -125,18 +125,18 @@ class MainWindow(QMainWindow):
if self.camera.status() != QCamera.UnavailableStatus:
name = self.cameraInfo.description()
- self.setWindowTitle("PySide2 Camera Example (" + name + ")")
+ self.setWindowTitle("PySide6 Camera Example (" + name + ")")
self.statusBar().showMessage("Starting: '" + name + "'", 5000)
self.camera.start()
else:
- self.setWindowTitle("PySide2 Camera Example")
+ self.setWindowTitle("PySide6 Camera Example")
self.takePictureAction.setEnabled(False)
self.statusBar().showMessage("Camera unavailable", 5000)
def nextImageFileName(self):
picturesLocation = QStandardPaths.writableLocation(QStandardPaths.PicturesLocation)
dateString = QDate.currentDate().toString("yyyyMMdd")
- pattern = picturesLocation + "/pyside2_camera_" + dateString + "_{:03d}.jpg"
+ pattern = picturesLocation + "/pyside6_camera_" + dateString + "_{:03d}.jpg"
n = 1
while True:
result = pattern.format(n)
diff --git a/examples/multimedia/player.py b/examples/multimedia/player.py
index 762d26b7e..bffcb3906 100644
--- a/examples/multimedia/player.py
+++ b/examples/multimedia/player.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 Multimedia player example"""
+"""PySide6 Multimedia player example"""
import sys
-from PySide2.QtCore import QStandardPaths, Qt
-from PySide2.QtGui import QAction, QIcon, QKeySequence
-from PySide2.QtWidgets import (QApplication, QDialog, QFileDialog,
+from PySide6.QtCore import QStandardPaths, Qt
+from PySide6.QtGui import QAction, QIcon, QKeySequence
+from PySide6.QtWidgets import (QApplication, QDialog, QFileDialog,
QMainWindow, QSlider, QStyle, QToolBar)
-from PySide2.QtMultimedia import QMediaPlayer, QMediaPlaylist
-from PySide2.QtMultimediaWidgets import QVideoWidget
+from PySide6.QtMultimedia import QMediaPlayer, QMediaPlaylist
+from PySide6.QtMultimediaWidgets import QVideoWidget
class MainWindow(QMainWindow):
diff --git a/examples/network/blockingfortuneclient.py b/examples/network/blockingfortuneclient.py
index 028c05c8f..4ee0ce622 100644
--- a/examples/network/blockingfortuneclient.py
+++ b/examples/network/blockingfortuneclient.py
@@ -40,14 +40,14 @@
##
#############################################################################
-"""PySide2 port of the network/blockingfortunclient example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the network/blockingfortunclient example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import (Signal, QDataStream, QMutex, QMutexLocker,
+from PySide6.QtCore import (Signal, QDataStream, QMutex, QMutexLocker,
QThread, QWaitCondition)
-from PySide2.QtGui import QIntValidator
-from PySide2.QtWidgets import (QApplication, QDialogButtonBox, QGridLayout,
+from PySide6.QtGui import QIntValidator
+from PySide6.QtWidgets import (QApplication, QDialogButtonBox, QGridLayout,
QLabel, QLineEdit, QMessageBox, QPushButton, QWidget)
-from PySide2.QtNetwork import (QAbstractSocket, QHostAddress, QNetworkInterface,
+from PySide6.QtNetwork import (QAbstractSocket, QHostAddress, QNetworkInterface,
QTcpSocket)
diff --git a/examples/network/fortuneclient.py b/examples/network/fortuneclient.py
index ee4bc5670..99ca41b0e 100644
--- a/examples/network/fortuneclient.py
+++ b/examples/network/fortuneclient.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the network/fortuneclient example from Qt v5.x"""
+"""PySide6 port of the network/fortuneclient example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork
+from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork
class Client(QtWidgets.QDialog):
diff --git a/examples/network/fortuneserver.py b/examples/network/fortuneserver.py
index 790e9df68..7b8f05a32 100644
--- a/examples/network/fortuneserver.py
+++ b/examples/network/fortuneserver.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the network/fortuneserver example from Qt v5.x"""
+"""PySide6 port of the network/fortuneserver example from Qt v5.x"""
import random
-from PySide2 import QtCore, QtWidgets, QtNetwork
+from PySide6 import QtCore, QtWidgets, QtNetwork
class Server(QtWidgets.QDialog):
diff --git a/examples/network/threadedfortuneserver.py b/examples/network/threadedfortuneserver.py
index c16c77a27..839a2a57e 100644
--- a/examples/network/threadedfortuneserver.py
+++ b/examples/network/threadedfortuneserver.py
@@ -40,15 +40,15 @@
##
#############################################################################
-"""PySide2 port of the network/threadedfortuneserver example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the network/threadedfortuneserver example from Qt v5.x, originating from PyQt"""
import random
-from PySide2.QtCore import (Signal, QByteArray, QDataStream, QIODevice,
+from PySide6.QtCore import (Signal, QByteArray, QDataStream, QIODevice,
QThread, Qt)
-from PySide2.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
+from PySide6.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
QMessageBox, QPushButton, QVBoxLayout)
-from PySide2.QtNetwork import (QHostAddress, QNetworkInterface, QTcpServer,
+from PySide6.QtNetwork import (QHostAddress, QNetworkInterface, QTcpServer,
QTcpSocket)
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
index fce400e70..0a686d388 100644
--- a/examples/opengl/contextinfo.py
+++ b/examples/opengl/contextinfo.py
@@ -39,7 +39,7 @@
##
#############################################################################
-"""PySide2 port of the opengl/contextinfo example from Qt v5.x"""
+"""PySide6 port of the opengl/contextinfo example from Qt v5.x"""
from argparse import ArgumentParser, RawTextHelpFormatter
import numpy
@@ -47,13 +47,13 @@ import sys
from textwrap import dedent
-from PySide2.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
-from PySide2.QtGui import (QMatrix4x4, QOpenGLContext, QSurfaceFormat, QWindow)
-from PySide2.QtOpenGL import (QOpenGLBuffer, QOpenGLShader,
+from PySide6.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
+from PySide6.QtGui import (QMatrix4x4, QOpenGLContext, QSurfaceFormat, QWindow)
+from PySide6.QtOpenGL import (QOpenGLBuffer, QOpenGLShader,
QOpenGLShaderProgram, QOpenGLVertexArrayObject)
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
QWidget)
-from PySide2.support import VoidPtr
+from PySide6.support import VoidPtr
try:
from OpenGL import GL
except ImportError:
diff --git a/examples/opengl/hellogl2.py b/examples/opengl/hellogl2.py
index fd5d79be3..bcffdf3c9 100644
--- a/examples/opengl/hellogl2.py
+++ b/examples/opengl/hellogl2.py
@@ -40,20 +40,20 @@
##
############################################################################
-"""PySide2 port of the opengl/hellogl2 example from Qt v5.x"""
+"""PySide6 port of the opengl/hellogl2 example from Qt v5.x"""
import sys
import math
import numpy
import ctypes
-from PySide2.QtCore import QCoreApplication, Signal, SIGNAL, SLOT, Qt, QSize, QPoint
-from PySide2.QtGui import (QVector3D, QOpenGLFunctions,
+from PySide6.QtCore import QCoreApplication, Signal, SIGNAL, SLOT, Qt, QSize, QPoint
+from PySide6.QtGui import (QVector3D, QOpenGLFunctions,
QMatrix4x4, QOpenGLContext, QSurfaceFormat)
-from PySide2.QtOpenGL import (QOpenGLVertexArrayObject, QOpenGLBuffer,
+from PySide6.QtOpenGL import (QOpenGLVertexArrayObject, QOpenGLBuffer,
QOpenGLShaderProgram, QOpenGLShader)
-from PySide2.QtWidgets import (QApplication, QWidget, QMessageBox, QHBoxLayout,
+from PySide6.QtWidgets import (QApplication, QWidget, QMessageBox, QHBoxLayout,
QSlider)
-from PySide2.QtOpenGLWidgets import QOpenGLWidget
+from PySide6.QtOpenGLWidgets import QOpenGLWidget
from shiboken6 import VoidPtr
diff --git a/examples/opengl/textures/textures.py b/examples/opengl/textures/textures.py
index 9730cf078..e7362da1e 100644
--- a/examples/opengl/textures/textures.py
+++ b/examples/opengl/textures/textures.py
@@ -40,10 +40,10 @@
##
############################################################################
-"""PySide2 port of the opengl/textures example from Qt v5.x"""
+"""PySide6 port of the opengl/textures example from Qt v5.x"""
import sys
-from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+from PySide6 import QtCore, QtGui, QtWidgets, QtOpenGL
try:
from OpenGL.GL import *
diff --git a/examples/opengl/textures/textures_rc.py b/examples/opengl/textures/textures_rc.py
index 1e3923f80..e68b63d69 100644
--- a/examples/opengl/textures/textures_rc.py
+++ b/examples/opengl/textures/textures_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x04\x14\
diff --git a/examples/quick/customitems/painteditem/painteditem.py b/examples/quick/customitems/painteditem/painteditem.py
index e89bf0bac..5476bdbaf 100644
--- a/examples/quick/customitems/painteditem/painteditem.py
+++ b/examples/quick/customitems/painteditem/painteditem.py
@@ -40,11 +40,11 @@
import sys
-from PySide2.QtGui import QPainter, QBrush, QColor
-from PySide2.QtWidgets import QApplication
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtCore import QUrl, Property, Signal, Qt, QPointF
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtGui import QPainter, QBrush, QColor
+from PySide6.QtWidgets import QApplication
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtCore import QUrl, Property, Signal, Qt, QPointF
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class TextBalloon(QQuickPaintedItem):
diff --git a/examples/remoteobjects/modelview/modelviewclient.py b/examples/remoteobjects/modelview/modelviewclient.py
index 378a0516e..264ba3ea4 100644
--- a/examples/remoteobjects/modelview/modelviewclient.py
+++ b/examples/remoteobjects/modelview/modelviewclient.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the remoteobjects/modelviewclient example from Qt v5.x"""
+"""PySide6 port of the remoteobjects/modelviewclient example from Qt v5.x"""
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtWidgets import (QApplication, QTreeView)
-from PySide2.QtRemoteObjects import QRemoteObjectNode
+from PySide6.QtCore import QUrl
+from PySide6.QtWidgets import (QApplication, QTreeView)
+from PySide6.QtRemoteObjects import QRemoteObjectNode
if __name__ == '__main__':
app = QApplication(sys.argv)
diff --git a/examples/remoteobjects/modelview/modelviewserver.py b/examples/remoteobjects/modelview/modelviewserver.py
index 5c0bba518..4098f61e9 100644
--- a/examples/remoteobjects/modelview/modelviewserver.py
+++ b/examples/remoteobjects/modelview/modelviewserver.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the remoteobjects/modelviewserver example from Qt v5.x"""
+"""PySide6 port of the remoteobjects/modelviewserver example from Qt v5.x"""
import sys
-from PySide2.QtCore import (Qt, QByteArray, QModelIndex, QObject, QTimer, QUrl)
-from PySide2.QtGui import (QColor, QStandardItemModel, QStandardItem)
-from PySide2.QtWidgets import (QApplication, QTreeView)
-from PySide2.QtRemoteObjects import QRemoteObjectHost, QRemoteObjectRegistryHost
+from PySide6.QtCore import (Qt, QByteArray, QModelIndex, QObject, QTimer, QUrl)
+from PySide6.QtGui import (QColor, QStandardItemModel, QStandardItem)
+from PySide6.QtWidgets import (QApplication, QTreeView)
+from PySide6.QtRemoteObjects import QRemoteObjectHost, QRemoteObjectRegistryHost
class TimerHandler(QObject):
def __init__(self, model):
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
index fcad47b28..ac29700c4 100644
--- a/examples/samplebinding/CMakeLists.txt
+++ b/examples/samplebinding/CMakeLists.txt
@@ -204,7 +204,7 @@ if(WIN32)
PROPERTIES LINK_FLAGS "${python_additional_link_flags}")
# Compile a list of shiboken shared libraries to be installed, so that
- # the user doesn't have to set the PATH manually to point to the PySide2 package.
+ # the user doesn't have to set the PATH manually to point to the PySide6 package.
foreach(library_path ${shiboken_shared_libraries})
string(REGEX REPLACE ".lib$" ".dll" library_path ${library_path})
file(TO_CMAKE_PATH ${library_path} library_path)
diff --git a/examples/samplebinding/README.md b/examples/samplebinding/README.md
index 93d56f5bd..1334600ab 100644
--- a/examples/samplebinding/README.md
+++ b/examples/samplebinding/README.md
@@ -202,7 +202,7 @@ python virtual environment, that environment's packages will be used for
the python module import process.
In this case, make sure that the bindings were built while the
`virtualenv` was active, so that the build system picks up the correct
-python shared library and PySide2 / shiboken package.
+python shared library and PySide6 / shiboken package.
## Linux Shared Libraries Notes
@@ -232,5 +232,5 @@ In practice this means the only supported configurations are:
This is necessary because all the shared libraries in question have to
link to the same C++ runtime library (`msvcrt.dll` or `msvcrtd.dll`).
To make the example as self-contained as possible, the shared libraries
-in use (`pyside2.dll`, `shiboken6.dll`) are hard-linked into the build
+in use (`pyside6.dll`, `shiboken6.dll`) are hard-linked into the build
folder of the application.
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt
index 63a4afd35..a67025c62 100644
--- a/examples/scriptableapplication/CMakeLists.txt
+++ b/examples/scriptableapplication/CMakeLists.txt
@@ -44,7 +44,7 @@ macro(pyside_config option output_var)
endif()
endmacro()
-# Query for the shiboken6-generator path, PySide2 path, Python path, include paths and linker flags.
+# Query for the shiboken6-generator path, PySide6 path, Python path, include paths and linker flags.
pyside_config(--shiboken-module-path SHIBOKEN_MODULE_PATH)
pyside_config(--shiboken-generator-path SHIBOKEN_GENERATOR_PATH)
pyside_config(--pyside-path PYSIDE_PATH)
@@ -191,8 +191,8 @@ if(WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "${PYTHON_ADDITIONAL_LINK_FLAGS}")
- # Add custom target to hard link PySide2 shared libraries (just like in qmake example), so you
- # don't have to set PATH manually to point to the PySide2 package.
+ # Add custom target to hard link PySide6 shared libraries (just like in qmake example), so you
+ # don't have to set PATH manually to point to the PySide6 package.
set(shared_libraries ${SHIBOKEN_MODULE_SHARED_LIBRARIES} ${PYSIDE_SHARED_LIBRARIES})
foreach(LIBRARY_PATH ${shared_libraries})
string(REGEX REPLACE ".lib$" ".dll" LIBRARY_PATH ${LIBRARY_PATH})
@@ -203,7 +203,7 @@ if(WIN32)
COMMAND mklink /H "${DEST_PATH}" "${SOURCE_PATH}"
DEPENDS ${LIBRARY_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Creating hardlink to PySide2 shared library ${BASE_NAME}")
+ COMMENT "Creating hardlink to PySide6 shared library ${BASE_NAME}")
# Fake target that depends on the previous one, but has special ALL keyword, which means
# it will always be executed.
diff --git a/examples/scriptableapplication/README.md b/examples/scriptableapplication/README.md
index 908cac36b..3d31fba3d 100644
--- a/examples/scriptableapplication/README.md
+++ b/examples/scriptableapplication/README.md
@@ -148,7 +148,7 @@ no clean solution to include symbolic links in the package
## Windows Notes
The build config of the application (Debug or Release) should match
-the PySide2 build config, otherwise the application will not properly
+the PySide6 build config, otherwise the application will not properly
work.
In practice this means the only supported configurations are:
@@ -165,5 +165,5 @@ In practice this means the only supported configurations are:
This is necessary because all the shared libraries in question have to
link to the same C++ runtime library (`msvcrt.dll` or `msvcrtd.dll`).
To make the example as self-contained as possible, the shared libraries
-in use (`pyside2.dll`, `shiboken6.dll`) are hard-linked into the build
+in use (`pyside6.dll`, `shiboken6.dll`) are hard-linked into the build
folder of the application.
diff --git a/examples/sql/books/bookdelegate.py b/examples/sql/books/bookdelegate.py
index f7e219ad6..d44abb5b1 100644
--- a/examples/sql/books/bookdelegate.py
+++ b/examples/sql/books/bookdelegate.py
@@ -39,10 +39,10 @@
#############################################################################
import copy
-from PySide2.QtSql import QSqlRelationalDelegate
-from PySide2.QtWidgets import QSpinBox, QStyle
-from PySide2.QtGui import QPixmap, QPalette
-from PySide2.QtCore import QEvent, QSize, Qt
+from PySide6.QtSql import QSqlRelationalDelegate
+from PySide6.QtWidgets import QSpinBox, QStyle
+from PySide6.QtGui import QPixmap, QPalette
+from PySide6.QtCore import QEvent, QSize, Qt
class BookDelegate(QSqlRelationalDelegate):
diff --git a/examples/sql/books/bookwindow.py b/examples/sql/books/bookwindow.py
index 59cd65840..831a3cd63 100644
--- a/examples/sql/books/bookwindow.py
+++ b/examples/sql/books/bookwindow.py
@@ -38,11 +38,11 @@
##
#############################################################################
-from PySide2.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
+from PySide6.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
QHeaderView, QMainWindow, QMessageBox)
-from PySide2.QtGui import QKeySequence
-from PySide2.QtSql import QSqlRelation, QSqlRelationalTableModel, QSqlTableModel
-from PySide2.QtCore import Qt, Slot
+from PySide6.QtGui import QKeySequence
+from PySide6.QtSql import QSqlRelation, QSqlRelationalTableModel, QSqlTableModel
+from PySide6.QtCore import Qt, Slot
import createdb
from ui_bookwindow import Ui_BookWindow
from bookdelegate import BookDelegate
diff --git a/examples/sql/books/createdb.py b/examples/sql/books/createdb.py
index f8739b4d0..524ee0daf 100644
--- a/examples/sql/books/createdb.py
+++ b/examples/sql/books/createdb.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtSql import QSqlDatabase, QSqlQuery
+from PySide6.QtSql import QSqlDatabase, QSqlQuery
from datetime import date
def add_book(q, title, year, authorId, genreId, rating):
diff --git a/examples/sql/books/main.py b/examples/sql/books/main.py
index 50d2c0d6b..e957869ac 100644
--- a/examples/sql/books/main.py
+++ b/examples/sql/books/main.py
@@ -39,7 +39,7 @@
#############################################################################
import sys
-from PySide2.QtWidgets import QApplication
+from PySide6.QtWidgets import QApplication
from bookwindow import BookWindow
import rc_books
diff --git a/examples/sql/books/rc_books.py b/examples/sql/books/rc_books.py
index 6f2cbbeb6..b5d1d53bb 100644
--- a/examples/sql/books/rc_books.py
+++ b/examples/sql/books/rc_books.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x03\x0e\
diff --git a/examples/sql/books/ui_bookwindow.py b/examples/sql/books/ui_bookwindow.py
index dc532744b..597b339cd 100644
--- a/examples/sql/books/ui_bookwindow.py
+++ b/examples/sql/books/ui_bookwindow.py
@@ -8,12 +8,12 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_BookWindow(object):
def setupUi(self, BookWindow):
diff --git a/examples/texttospeech/texttospeech.py b/examples/texttospeech/texttospeech.py
index f9c32ed1d..b5f2cc84b 100644
--- a/examples/texttospeech/texttospeech.py
+++ b/examples/texttospeech/texttospeech.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 QTextToSpeech example"""
+"""PySide6 QTextToSpeech example"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import (QApplication, QComboBox, QFormLayout,
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import (QApplication, QComboBox, QFormLayout,
QHBoxLayout, QLineEdit, QMainWindow, QPushButton, QSlider, QWidget)
-from PySide2.QtTextToSpeech import QTextToSpeech
+from PySide6.QtTextToSpeech import QTextToSpeech
class MainWindow(QMainWindow):
def __init__(self):
@@ -57,7 +57,7 @@ class MainWindow(QMainWindow):
layout = QFormLayout(centralWidget)
textLayout = QHBoxLayout()
- self.text = QLineEdit('Hello, PySide2')
+ self.text = QLineEdit('Hello, PySide6')
self.text.setClearButtonEnabled(True)
textLayout.addWidget(self.text)
self.sayButton = QPushButton('Say')
diff --git a/examples/tutorial/t1.py b/examples/tutorial/t1.py
index 635fbbdb1..43fea90c4 100644
--- a/examples/tutorial/t1.py
+++ b/examples/tutorial/t1.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 1
+# PySide6 tutorial 1
import sys
-from PySide2 import QtWidgets
+from PySide6 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t10.py b/examples/tutorial/t10.py
index 12847a002..ca7e9d9b7 100644
--- a/examples/tutorial/t10.py
+++ b/examples/tutorial/t10.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 10
+# PySide6 tutorial 10
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t11.py b/examples/tutorial/t11.py
index cc391201b..c3d2e1271 100644
--- a/examples/tutorial/t11.py
+++ b/examples/tutorial/t11.py
@@ -39,12 +39,12 @@
##
#############################################################################
-# PySide2 tutorial 11
+# PySide6 tutorial 11
import sys
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t12.py b/examples/tutorial/t12.py
index 40945290a..290ecc82e 100644
--- a/examples/tutorial/t12.py
+++ b/examples/tutorial/t12.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 12
+# PySide6 tutorial 12
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t13.py b/examples/tutorial/t13.py
index 5198bb459..b54945e25 100644
--- a/examples/tutorial/t13.py
+++ b/examples/tutorial/t13.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 13
+# PySide6 tutorial 13
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t14.py b/examples/tutorial/t14.py
index d86f59166..d558d2e61 100644
--- a/examples/tutorial/t14.py
+++ b/examples/tutorial/t14.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 14
+# PySide6 tutorial 14
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t2.py b/examples/tutorial/t2.py
index 946a27366..d51986f47 100644
--- a/examples/tutorial/t2.py
+++ b/examples/tutorial/t2.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 2
+# PySide6 tutorial 2
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t3.py b/examples/tutorial/t3.py
index 65796ac74..fa96d6ff1 100644
--- a/examples/tutorial/t3.py
+++ b/examples/tutorial/t3.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 3
+# PySide6 tutorial 3
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t4.py b/examples/tutorial/t4.py
index c88943c98..4c30dfcbb 100644
--- a/examples/tutorial/t4.py
+++ b/examples/tutorial/t4.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 4
+# PySide6 tutorial 4
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class MyWidget(QtWidgets.QWidget):
diff --git a/examples/tutorial/t5.py b/examples/tutorial/t5.py
index 4077c0eb2..af36578cd 100644
--- a/examples/tutorial/t5.py
+++ b/examples/tutorial/t5.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 5
+# PySide6 tutorial 5
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class MyWidget(QtWidgets.QWidget):
diff --git a/examples/tutorial/t6.py b/examples/tutorial/t6.py
index 21c4ff311..9094c0ce9 100644
--- a/examples/tutorial/t6.py
+++ b/examples/tutorial/t6.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 6
+# PySide6 tutorial 6
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t7.py b/examples/tutorial/t7.py
index 0e01a75cd..590bd516c 100644
--- a/examples/tutorial/t7.py
+++ b/examples/tutorial/t7.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 7
+# PySide6 tutorial 7
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t8.py b/examples/tutorial/t8.py
index e67268989..3761b4353 100644
--- a/examples/tutorial/t8.py
+++ b/examples/tutorial/t8.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 8
+# PySide6 tutorial 8
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t9.py b/examples/tutorial/t9.py
index ab37f8eb7..ca949c1ac 100644
--- a/examples/tutorial/t9.py
+++ b/examples/tutorial/t9.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 9
+# PySide6 tutorial 9
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/uiloader/uiloader.py b/examples/uiloader/uiloader.py
index 1e6e72d78..21b126bb2 100644
--- a/examples/uiloader/uiloader.py
+++ b/examples/uiloader/uiloader.py
@@ -44,9 +44,9 @@
from argparse import ArgumentParser, RawTextHelpFormatter
import sys
-from PySide2.QtCore import Qt, QFile, QIODevice
-from PySide2.QtWidgets import QApplication, QWidget
-from PySide2.QtUiTools import QUiLoader
+from PySide6.QtCore import Qt, QFile, QIODevice
+from PySide6.QtWidgets import QApplication, QWidget
+from PySide6.QtUiTools import QUiLoader
if __name__ == '__main__':
diff --git a/examples/utils/pyside_config.py b/examples/utils/pyside_config.py
index da71073a0..6382185c5 100644
--- a/examples/utils/pyside_config.py
+++ b/examples/utils/pyside_config.py
@@ -46,8 +46,8 @@ import re
import sys
-PYSIDE = 'pyside2'
-PYSIDE_MODULE = 'PySide2'
+PYSIDE = 'pyside6'
+PYSIDE_MODULE = 'PySide6'
SHIBOKEN = 'shiboken6'
@@ -92,7 +92,7 @@ options.append(("--shiboken-generator-include-path",
options.append(("--pyside-include-path",
lambda: get_package_include_path(Package.PYSIDE_MODULE),
pyside_error,
- "Print PySide2 include paths"))
+ "Print PySide6 include paths"))
options.append(("--python-link-flags-qmake", lambda: python_link_flags_qmake(), python_link_error,
"Print python link flags for qmake"))
@@ -104,7 +104,7 @@ options.append(("--shiboken-module-qmake-lflags",
"Print shiboken6 shared library link flags for qmake"))
options.append(("--pyside-qmake-lflags",
lambda: get_package_qmake_lflags(Package.PYSIDE_MODULE), pyside_error,
- "Print PySide2 shared library link flags for qmake"))
+ "Print PySide6 shared library link flags for qmake"))
options.append(("--shiboken-module-shared-libraries-qmake",
lambda: get_shared_libraries_qmake(Package.SHIBOKEN_MODULE), pyside_libs_error,
@@ -175,7 +175,7 @@ def shared_library_glob_pattern():
def filter_shared_libraries(libs_list):
def predicate(lib_name):
basename = os.path.basename(lib_name)
- if 'shiboken' in basename or 'pyside2' in basename:
+ if 'shiboken' in basename or 'pyside6' in basename:
return True
return False
result = [lib for lib in libs_list if predicate(lib)]
@@ -199,7 +199,7 @@ def link_option(lib):
return link
-# Locate PySide2 via sys.path package path.
+# Locate PySide6 via sys.path package path.
def find_pyside():
return find_package_path(PYSIDE_MODULE)
diff --git a/examples/webchannel/standalone/core.py b/examples/webchannel/standalone/core.py
index 9fb056496..f6c3e8043 100644
--- a/examples/webchannel/standalone/core.py
+++ b/examples/webchannel/standalone/core.py
@@ -40,7 +40,7 @@
#############################################################################
-from PySide2.QtCore import QObject, Signal, Slot
+from PySide6.QtCore import QObject, Signal, Slot
class Core(QObject):
diff --git a/examples/webchannel/standalone/dialog.py b/examples/webchannel/standalone/dialog.py
index 45951deb9..5e8acb908 100644
--- a/examples/webchannel/standalone/dialog.py
+++ b/examples/webchannel/standalone/dialog.py
@@ -40,8 +40,8 @@
#############################################################################
-from PySide2.QtCore import Signal, Slot
-from PySide2.QtWidgets import QDialog
+from PySide6.QtCore import Signal, Slot
+from PySide6.QtWidgets import QDialog
from ui_dialog import Ui_Dialog
diff --git a/examples/webchannel/standalone/main.py b/examples/webchannel/standalone/main.py
index d3119141f..b937b6025 100644
--- a/examples/webchannel/standalone/main.py
+++ b/examples/webchannel/standalone/main.py
@@ -43,12 +43,12 @@
import os
import sys
-from PySide2.QtWidgets import QApplication
-from PySide2.QtGui import QDesktopServices
-from PySide2.QtNetwork import QHostAddress, QSslSocket
-from PySide2.QtCore import (QFile, QFileInfo, QUrl)
-from PySide2.QtWebChannel import QWebChannel
-from PySide2.QtWebSockets import QWebSocketServer
+from PySide6.QtWidgets import QApplication
+from PySide6.QtGui import QDesktopServices
+from PySide6.QtNetwork import QHostAddress, QSslSocket
+from PySide6.QtCore import (QFile, QFileInfo, QUrl)
+from PySide6.QtWebChannel import QWebChannel
+from PySide6.QtWebSockets import QWebSocketServer
from dialog import Dialog
from core import Core
diff --git a/examples/webchannel/standalone/ui_dialog.py b/examples/webchannel/standalone/ui_dialog.py
index 873edba10..7fd2fde97 100644
--- a/examples/webchannel/standalone/ui_dialog.py
+++ b/examples/webchannel/standalone/ui_dialog.py
@@ -8,12 +8,12 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_Dialog(object):
diff --git a/examples/webchannel/standalone/websocketclientwrapper.py b/examples/webchannel/standalone/websocketclientwrapper.py
index 24505b03b..5d4ec4cfe 100644
--- a/examples/webchannel/standalone/websocketclientwrapper.py
+++ b/examples/webchannel/standalone/websocketclientwrapper.py
@@ -39,7 +39,7 @@
##
#############################################################################
-from PySide2.QtCore import QObject, Signal, Slot
+from PySide6.QtCore import QObject, Signal, Slot
from websockettransport import WebSocketTransport
diff --git a/examples/webchannel/standalone/websockettransport.py b/examples/webchannel/standalone/websockettransport.py
index 4e42e7674..401701699 100644
--- a/examples/webchannel/standalone/websockettransport.py
+++ b/examples/webchannel/standalone/websockettransport.py
@@ -39,8 +39,8 @@
##
#############################################################################
-from PySide2.QtWebChannel import QWebChannelAbstractTransport
-from PySide2.QtCore import QByteArray, QJsonDocument, Slot
+from PySide6.QtWebChannel import QWebChannelAbstractTransport
+from PySide6.QtCore import QByteArray, QJsonDocument, Slot
class WebSocketTransport(QWebChannelAbstractTransport):
diff --git a/examples/webenginequick/quicknanobrowser.py b/examples/webenginequick/quicknanobrowser.py
index 24e58eada..1bcb045c1 100644
--- a/examples/webenginequick/quicknanobrowser.py
+++ b/examples/webenginequick/quicknanobrowser.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 WebEngine QtQuick 2 Example"""
+"""PySide6 WebEngine QtQuick 2 Example"""
import os
-from PySide2.QtCore import QUrl
-from PySide2.QtQml import QQmlApplicationEngine
-from PySide2.QtWidgets import QApplication
-from PySide2.QtWebEngine import QtWebEngine
+from PySide6.QtCore import QUrl
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtWidgets import QApplication
+from PySide6.QtWebEngine import QtWebEngine
def main():
app = QApplication([])
diff --git a/examples/webenginewidgets/simplebrowser.py b/examples/webenginewidgets/simplebrowser.py
index 365e69a05..8c5ec0704 100644
--- a/examples/webenginewidgets/simplebrowser.py
+++ b/examples/webenginewidgets/simplebrowser.py
@@ -39,21 +39,21 @@
##
#############################################################################
-"""PySide2 WebEngineWidgets Example"""
+"""PySide6 WebEngineWidgets Example"""
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import (QApplication, QLineEdit,
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import (QApplication, QLineEdit,
QMainWindow, QPushButton, QToolBar)
-from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
- self.setWindowTitle('PySide2 WebEngineWidgets Example')
+ self.setWindowTitle('PySide6 WebEngineWidgets Example')
self.toolBar = QToolBar()
self.addToolBar(self.toolBar)
diff --git a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
index 612c682cb..88ef74367 100644
--- a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
@@ -42,10 +42,10 @@ import json
import os
import warnings
-from PySide2 import QtCore
-from PySide2.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QIcon, QStandardItem, QStandardItemModel
-from PySide2.QtWidgets import QMenu, QMessageBox, QTreeView
+from PySide6 import QtCore
+from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
+from PySide6.QtWidgets import QMenu, QMessageBox, QTreeView
_url_role = Qt.UserRole + 1
@@ -58,7 +58,7 @@ _default_bookmarks = [
['https://doc.qt.io/qtforpython/', 'Documentation'],
['https://bugreports.qt.io/projects/PYSIDE/', 'Bug Reports'],
['https://www.python.org/', 'Python', None],
- ['https://wiki.qt.io/PySide2', 'Qt for Python', None],
+ ['https://wiki.qt.io/PySide6', 'Qt for Python', None],
['Other Bookmarks']
]
diff --git a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
index 093eed6bb..00b7750f7 100644
--- a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
@@ -43,10 +43,10 @@ from functools import partial
from bookmarkwidget import BookmarkWidget
from webengineview import WebEngineView
from historywindow import HistoryWindow
-from PySide2 import QtCore
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtWidgets import QMenu, QTabBar, QTabWidget
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6 import QtCore
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtWidgets import QMenu, QTabBar, QTabWidget
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
class BrowserTabWidget(QTabWidget):
diff --git a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
index 73b8d116b..a773070a1 100644
--- a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
@@ -39,11 +39,11 @@
#############################################################################
import sys
-from PySide2 import QtCore
-from PySide2.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QDesktopServices
-from PySide2.QtWidgets import QMenu, QProgressBar, QStyleFactory
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem
+from PySide6 import QtCore
+from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QDesktopServices
+from PySide6.QtWidgets import QMenu, QProgressBar, QStyleFactory
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem
# A QProgressBar with context menu for displaying downloads in a QStatusBar.
@@ -60,7 +60,7 @@ class DownloadWidget(QProgressBar):
download_item.stateChanged.connect(self._update_tool_tip())
path = download_item.path()
self.setMaximumWidth(300)
- # Shorten 'PySide2-5.11.0a1-5.11.0-cp36-cp36m-linux_x86_64.whl'...
+ # Shorten 'PySide6-5.11.0a1-5.11.0-cp36-cp36m-linux_x86_64.whl'...
description = QFileInfo(path).fileName()
description_length = len(description)
if description_length > 30:
diff --git a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
index 3557c2e31..ec52e9073 100644
--- a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
+++ b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
@@ -38,11 +38,11 @@
##
#############################################################################
-from PySide2 import QtCore
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QIcon, QKeySequence
-from PySide2.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton
-from PySide2.QtWebEngineWidgets import QWebEnginePage
+from PySide6 import QtCore
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QIcon, QKeySequence
+from PySide6.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton
+from PySide6.QtWebEngineWidgets import QWebEnginePage
# A Find tool bar (bottom area)
diff --git a/examples/webenginewidgets/tabbedbrowser/historywindow.py b/examples/webenginewidgets/tabbedbrowser/historywindow.py
index 6ce779743..e0f381962 100644
--- a/examples/webenginewidgets/tabbedbrowser/historywindow.py
+++ b/examples/webenginewidgets/tabbedbrowser/historywindow.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtWidgets import QApplication, QTreeView
+from PySide6.QtWidgets import QApplication, QTreeView
-from PySide2.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl
+from PySide6.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl
class HistoryModel(QAbstractTableModel):
diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py
index 086946bac..388f3b2ec 100644
--- a/examples/webenginewidgets/tabbedbrowser/main.py
+++ b/examples/webenginewidgets/tabbedbrowser/main.py
@@ -39,7 +39,7 @@
##
#############################################################################
-"""PySide2 WebEngineWidgets Example"""
+"""PySide6 WebEngineWidgets Example"""
import sys
from bookmarkwidget import BookmarkWidget
@@ -47,12 +47,12 @@ from browsertabwidget import BrowserTabWidget
from downloadwidget import DownloadWidget
from findtoolbar import FindToolBar
from webengineview import WebEngineView
-from PySide2 import QtCore
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtGui import QAction, QKeySequence, QIcon
-from PySide2.QtWidgets import (QApplication, QDockWidget, QLabel,
+from PySide6 import QtCore
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtGui import QAction, QKeySequence, QIcon
+from PySide6.QtWidgets import (QApplication, QDockWidget, QLabel,
QLineEdit, QMainWindow, QToolBar)
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
main_windows = []
@@ -82,7 +82,7 @@ class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
- self.setWindowTitle('PySide2 tabbed browser Example')
+ self.setWindowTitle('PySide6 tabbed browser Example')
self._tab_widget = BrowserTabWidget(create_main_window_with_browser)
self._tab_widget.enabled_changed.connect(self._enabled_changed)
diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py
index 81b156f93..d7eba1246 100644
--- a/examples/webenginewidgets/tabbedbrowser/webengineview.py
+++ b/examples/webenginewidgets/tabbedbrowser/webengineview.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
-from PySide2 import QtCore
+from PySide6 import QtCore
_web_actions = [QWebEnginePage.Back, QWebEnginePage.Forward,
QWebEnginePage.Reload,
diff --git a/examples/widgetbinding/dialog.py b/examples/widgetbinding/dialog.py
index e52155999..ea5f0530c 100644
--- a/examples/widgetbinding/dialog.py
+++ b/examples/widgetbinding/dialog.py
@@ -48,7 +48,7 @@
##
############################################################################
-from PySide2.QtWidgets import QDialog, QLineEdit, QVBoxLayout
+from PySide6.QtWidgets import QDialog, QLineEdit, QVBoxLayout
# Python binding from the C++ widget
from wiggly import WigglyWidget as WigglyWidgetCPP
diff --git a/examples/widgetbinding/main.py b/examples/widgetbinding/main.py
index 556eb2638..0076e88aa 100644
--- a/examples/widgetbinding/main.py
+++ b/examples/widgetbinding/main.py
@@ -50,7 +50,7 @@
import sys
-from PySide2.QtWidgets import QApplication
+from PySide6.QtWidgets import QApplication
from dialog import Dialog
diff --git a/examples/widgetbinding/wigglywidget.py b/examples/widgetbinding/wigglywidget.py
index 50a061074..5451b2320 100644
--- a/examples/widgetbinding/wigglywidget.py
+++ b/examples/widgetbinding/wigglywidget.py
@@ -48,9 +48,9 @@
##
############################################################################
-from PySide2.QtCore import QBasicTimer
-from PySide2.QtGui import QColor, QFontMetrics, QPainter, QPalette
-from PySide2.QtWidgets import QWidget
+from PySide6.QtCore import QBasicTimer
+from PySide6.QtGui import QColor, QFontMetrics, QPainter, QPalette
+from PySide6.QtWidgets import QWidget
class WigglyWidget(QWidget):
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.py b/examples/widgets/animation/animatedtiles/animatedtiles.py
index b15635185..3ec1b475b 100644
--- a/examples/widgets/animation/animatedtiles/animatedtiles.py
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import animatedtiles_rc
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles_rc.py b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py
index d0819862d..3486fa55c 100644
--- a/examples/widgets/animation/animatedtiles/animatedtiles_rc.py
+++ b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x006\xe2\
diff --git a/examples/widgets/animation/appchooser/appchooser.py b/examples/widgets/animation/appchooser/appchooser.py
index 74e9f1c02..55cd3c1d5 100644
--- a/examples/widgets/animation/appchooser/appchooser.py
+++ b/examples/widgets/animation/appchooser/appchooser.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import appchooser_rc
diff --git a/examples/widgets/animation/appchooser/appchooser_rc.py b/examples/widgets/animation/appchooser/appchooser_rc.py
index c96fe80c6..6f2a5ff36 100644
--- a/examples/widgets/animation/appchooser/appchooser_rc.py
+++ b/examples/widgets/animation/appchooser/appchooser_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x13\x09\
diff --git a/examples/widgets/animation/easing/easing.py b/examples/widgets/animation/easing/easing.py
index d5c733863..647fbeb34 100644
--- a/examples/widgets/animation/easing/easing.py
+++ b/examples/widgets/animation/easing/easing.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import easing_rc
from ui_form import Ui_Form
@@ -83,7 +83,7 @@ class Animation(QtCore.QPropertyAnimation):
else:
super(Animation, self).updateCurrentTime(currentTime)
-# PySide2 doesn't support deriving from more than one wrapped class so we use
+# PySide6 doesn't support deriving from more than one wrapped class so we use
# composition and delegate the property.
class Pixmap(QtCore.QObject):
def __init__(self, pix):
diff --git a/examples/widgets/animation/easing/easing_rc.py b/examples/widgets/animation/easing/easing_rc.py
index 26c31654b..c0f25d729 100644
--- a/examples/widgets/animation/easing/easing_rc.py
+++ b/examples/widgets/animation/easing/easing_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x14\x1d\
diff --git a/examples/widgets/animation/easing/ui_form.py b/examples/widgets/animation/easing/ui_form.py
index c2279c5c5..49aaf2ff0 100644
--- a/examples/widgets/animation/easing/ui_form.py
+++ b/examples/widgets/animation/easing/ui_form.py
@@ -8,10 +8,10 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
-from PySide2.QtWidgets import *
+from PySide6.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide6.QtWidgets import *
class Ui_Form(object):
def setupUi(self, Form):
diff --git a/examples/widgets/animation/states/states.py b/examples/widgets/animation/states/states.py
index 1a859245a..363b5af6c 100644
--- a/examples/widgets/animation/states/states.py
+++ b/examples/widgets/animation/states/states.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import states_rc
diff --git a/examples/widgets/animation/states/states_rc.py b/examples/widgets/animation/states/states_rc.py
index fe8a05c45..9f8241f60 100644
--- a/examples/widgets/animation/states/states_rc.py
+++ b/examples/widgets/animation/states/states_rc.py
@@ -48,7 +48,7 @@
#
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x1b\x48\
diff --git a/examples/widgets/codeeditor/codeeditor.py b/examples/widgets/codeeditor/codeeditor.py
index d83d010d4..acfac42d0 100644
--- a/examples/widgets/codeeditor/codeeditor.py
+++ b/examples/widgets/codeeditor/codeeditor.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtCore import Slot, Qt, QRect, QSize
-from PySide2.QtGui import QColor, QPainter, QTextFormat
-from PySide2.QtWidgets import QPlainTextEdit, QWidget, QTextEdit
+from PySide6.QtCore import Slot, Qt, QRect, QSize
+from PySide6.QtGui import QColor, QPainter, QTextFormat
+from PySide6.QtWidgets import QPlainTextEdit, QWidget, QTextEdit
class LineNumberArea(QWidget):
diff --git a/examples/widgets/codeeditor/main.py b/examples/widgets/codeeditor/main.py
index 14c2e0826..e3d2a9ee9 100644
--- a/examples/widgets/codeeditor/main.py
+++ b/examples/widgets/codeeditor/main.py
@@ -39,10 +39,10 @@
#############################################################################
import sys
-from PySide2.QtWidgets import QApplication
+from PySide6.QtWidgets import QApplication
from codeeditor import CodeEditor
-"""PySide2 port of the widgets/codeeditor example from Qt5"""
+"""PySide6 port of the widgets/codeeditor example from Qt5"""
if __name__ == "__main__":
app = QApplication([])
diff --git a/examples/widgets/dialogs/classwizard/classwizard.py b/examples/widgets/dialogs/classwizard/classwizard.py
index ecc1806be..addc089c6 100644
--- a/examples/widgets/dialogs/classwizard/classwizard.py
+++ b/examples/widgets/dialogs/classwizard/classwizard.py
@@ -39,7 +39,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import classwizard_rc
diff --git a/examples/widgets/dialogs/classwizard/classwizard_rc.py b/examples/widgets/dialogs/classwizard/classwizard_rc.py
index e79a959f1..71889b33a 100644
--- a/examples/widgets/dialogs/classwizard/classwizard_rc.py
+++ b/examples/widgets/dialogs/classwizard/classwizard_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00:@\
diff --git a/examples/widgets/dialogs/extension.py b/examples/widgets/dialogs/extension.py
index 6d560c82a..891e55533 100644
--- a/examples/widgets/dialogs/extension.py
+++ b/examples/widgets/dialogs/extension.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/dialogs/extension example from Qt v5.x"""
+"""PySide6 port of the widgets/dialogs/extension example from Qt v5.x"""
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class FindDialog(QtWidgets.QDialog):
diff --git a/examples/widgets/dialogs/findfiles.py b/examples/widgets/dialogs/findfiles.py
index cf2be86db..5e26f73ad 100644
--- a/examples/widgets/dialogs/findfiles.py
+++ b/examples/widgets/dialogs/findfiles.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/dialogs/findfiles example from Qt v5.x"""
+"""PySide6 port of the widgets/dialogs/findfiles example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class Window(QtWidgets.QDialog):
diff --git a/examples/widgets/dialogs/standarddialogs.py b/examples/widgets/dialogs/standarddialogs.py
index ea1afa4ce..5e0f80c4d 100644
--- a/examples/widgets/dialogs/standarddialogs.py
+++ b/examples/widgets/dialogs/standarddialogs.py
@@ -40,10 +40,10 @@
##
#############################################################################
-"""PySide2 port of the widgets/dialogs/standarddialogs example from Qt v5.x"""
+"""PySide6 port of the widgets/dialogs/standarddialogs example from Qt v5.x"""
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class Dialog(QtWidgets.QDialog):
diff --git a/examples/widgets/dialogs/trivialwizard.py b/examples/widgets/dialogs/trivialwizard.py
index 80a398185..88b8e97b8 100644
--- a/examples/widgets/dialogs/trivialwizard.py
+++ b/examples/widgets/dialogs/trivialwizard.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/dialogs/trivialwizard example from Qt v5.x"""
+"""PySide6 port of the widgets/dialogs/trivialwizard example from Qt v5.x"""
-from PySide2 import QtWidgets
+from PySide6 import QtWidgets
def createIntroPage():
diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext.py b/examples/widgets/draganddrop/draggabletext/draggabletext.py
index 77a40b1a5..480f3f4c6 100644
--- a/examples/widgets/draganddrop/draggabletext/draggabletext.py
+++ b/examples/widgets/draganddrop/draggabletext/draggabletext.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import QFile, QIODevice, QMimeData, QPoint, Qt, QTextStream
-from PySide2.QtGui import QDrag, QPalette, QPixmap
-from PySide2.QtWidgets import QApplication, QFrame, QLabel, QWidget
+from PySide6.QtCore import QFile, QIODevice, QMimeData, QPoint, Qt, QTextStream
+from PySide6.QtGui import QDrag, QPalette, QPixmap
+from PySide6.QtWidgets import QApplication, QFrame, QLabel, QWidget
import draggabletext_rc
diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py b/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py
index c05e317b3..e1d19bd91 100644
--- a/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py
+++ b/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x00\xf7\
diff --git a/examples/widgets/effects/lighting.py b/examples/widgets/effects/lighting.py
index 596db4ed9..6e72754ca 100644
--- a/examples/widgets/effects/lighting.py
+++ b/examples/widgets/effects/lighting.py
@@ -42,7 +42,7 @@
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class Lighting(QtWidgets.QGraphicsView):
diff --git a/examples/widgets/gallery/main.py b/examples/widgets/gallery/main.py
index 11f19201b..cbc499244 100644
--- a/examples/widgets/gallery/main.py
+++ b/examples/widgets/gallery/main.py
@@ -38,12 +38,12 @@
##
#############################################################################
-"""PySide2 port of the widgets/gallery example from Qt v5.15"""
+"""PySide6 port of the widgets/gallery example from Qt v5.15"""
import sys
-from PySide2.QtCore import QCoreApplication, Qt
-from PySide2.QtWidgets import QApplication
+from PySide6.QtCore import QCoreApplication, Qt
+from PySide6.QtWidgets import QApplication
from widgetgallery import WidgetGallery
diff --git a/examples/widgets/gallery/widgetgallery.py b/examples/widgets/gallery/widgetgallery.py
index 9d3faeeff..fd7c3246e 100644
--- a/examples/widgets/gallery/widgetgallery.py
+++ b/examples/widgets/gallery/widgetgallery.py
@@ -40,11 +40,11 @@
import sys
-from PySide2.QtWidgets import *
-from PySide2.QtGui import (QCursor, QDesktopServices, QGuiApplication, QIcon,
+from PySide6.QtWidgets import *
+from PySide6.QtGui import (QCursor, QDesktopServices, QGuiApplication, QIcon,
QKeySequence, QShortcut, QStandardItem,
QStandardItemModel, QScreen, QWindow)
-from PySide2.QtCore import (QDateTime, QDir, QLibraryInfo, QMetaObject,
+from PySide6.QtCore import (QDateTime, QDir, QLibraryInfo, QMetaObject,
QSysInfo, QTextStream, QTimer, Qt, qVersion)
diff --git a/examples/widgets/graphicsview/anchorlayout.py b/examples/widgets/graphicsview/anchorlayout.py
index f7f4edc65..0b1ec0a03 100644
--- a/examples/widgets/graphicsview/anchorlayout.py
+++ b/examples/widgets/graphicsview/anchorlayout.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
def createItem(minimum, preferred, maximum, name):
diff --git a/examples/widgets/graphicsview/collidingmice/collidingmice.py b/examples/widgets/graphicsview/collidingmice/collidingmice.py
index 2203cb381..2d5490b6d 100644
--- a/examples/widgets/graphicsview/collidingmice/collidingmice.py
+++ b/examples/widgets/graphicsview/collidingmice/collidingmice.py
@@ -42,7 +42,7 @@
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import mice_rc
@@ -71,7 +71,7 @@ class Mouse(QtWidgets.QGraphicsItem):
self.setTransform(QtGui.QTransform().rotate(random(360 * 16)))
# In the C++ version of this example, this class is also derived from
- # QObject in order to receive timer events. PySide2 does not support
+ # QObject in order to receive timer events. PySide6 does not support
# deriving from more than one wrapped class so we just create an
# explicit timer instead.
self.timer = QtCore.QTimer()
diff --git a/examples/widgets/graphicsview/collidingmice/mice_rc.py b/examples/widgets/graphicsview/collidingmice/mice_rc.py
index e9042a0d9..d442a36b0 100644
--- a/examples/widgets/graphicsview/collidingmice/mice_rc.py
+++ b/examples/widgets/graphicsview/collidingmice/mice_rc.py
@@ -48,7 +48,7 @@
#
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x0b\xd5\
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.py b/examples/widgets/graphicsview/diagramscene/diagramscene.py
index 079ae4021..af50cd6b2 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.py
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.py
@@ -42,7 +42,7 @@
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import diagramscene_rc
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py
index 8fee5a0d6..da5f0217e 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x00\xf7\
diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
index 8defc6d07..a72c9351b 100644
--- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
+++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import dragdroprobot_rc
diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py
index 23d346301..5b992ffca 100644
--- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py
+++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00:|\
diff --git a/examples/widgets/graphicsview/elasticnodes.py b/examples/widgets/graphicsview/elasticnodes.py
index f5d229b13..1eefdc0bb 100644
--- a/examples/widgets/graphicsview/elasticnodes.py
+++ b/examples/widgets/graphicsview/elasticnodes.py
@@ -43,7 +43,7 @@
import sys
import weakref
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
def random(boundary):
diff --git a/examples/widgets/itemviews/addressbook/adddialogwidget.py b/examples/widgets/itemviews/addressbook/adddialogwidget.py
index 7991039ef..aed3d34a9 100644
--- a/examples/widgets/itemviews/addressbook/adddialogwidget.py
+++ b/examples/widgets/itemviews/addressbook/adddialogwidget.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import (QDialog, QLabel, QTextEdit, QLineEdit,
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import (QDialog, QLabel, QTextEdit, QLineEdit,
QDialogButtonBox, QGridLayout, QVBoxLayout)
class AddDialogWidget(QDialog):
@@ -90,7 +90,7 @@ class AddDialogWidget(QDialog):
if __name__ == "__main__":
import sys
- from PySide2.QtWidgets import QApplication
+ from PySide6.QtWidgets import QApplication
app = QApplication(sys.argv)
diff --git a/examples/widgets/itemviews/addressbook/addressbook.py b/examples/widgets/itemviews/addressbook/addressbook.py
index 35d095287..35dbcc860 100644
--- a/examples/widgets/itemviews/addressbook/addressbook.py
+++ b/examples/widgets/itemviews/addressbook/addressbook.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QMainWindow, QFileDialog, QApplication)
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QMainWindow, QFileDialog, QApplication)
from addresswidget import AddressWidget
@@ -93,10 +93,10 @@ class MainWindow(QMainWindow):
# Quick gotcha:
#
# QFiledialog.getOpenFilename and QFileDialog.get.SaveFileName don't
- # behave in PySide2 as they do in Qt, where they return a QString
+ # behave in PySide6 as they do in Qt, where they return a QString
# containing the filename.
#
- # In PySide2, these functions return a tuple: (filename, filter)
+ # In PySide6, these functions return a tuple: (filename, filter)
def openFile(self):
filename, _ = QFileDialog.getOpenFileName(self)
diff --git a/examples/widgets/itemviews/addressbook/addresswidget.py b/examples/widgets/itemviews/addressbook/addresswidget.py
index d0c1747fb..b3cc6591d 100644
--- a/examples/widgets/itemviews/addressbook/addresswidget.py
+++ b/examples/widgets/itemviews/addressbook/addresswidget.py
@@ -45,9 +45,9 @@ try:
except ImportError:
import pickle
-from PySide2.QtCore import (Qt, Signal, QRegularExpression, QModelIndex,
+from PySide6.QtCore import (Qt, Signal, QRegularExpression, QModelIndex,
QItemSelection, QSortFilterProxyModel)
-from PySide2.QtWidgets import QTabWidget, QMessageBox, QTableView, QAbstractItemView
+from PySide6.QtWidgets import QTabWidget, QMessageBox, QTableView, QAbstractItemView
from tablemodel import TableModel
from newaddresstab import NewAddressTab
@@ -240,7 +240,7 @@ class AddressWidget(QTabWidget):
if __name__ == "__main__":
import sys
- from PySide2.QtWidgets import QApplication
+ from PySide6.QtWidgets import QApplication
app = QApplication(sys.argv)
addressWidget = AddressWidget()
diff --git a/examples/widgets/itemviews/addressbook/newaddresstab.py b/examples/widgets/itemviews/addressbook/newaddresstab.py
index ab54fb8a7..32ed515a0 100644
--- a/examples/widgets/itemviews/addressbook/newaddresstab.py
+++ b/examples/widgets/itemviews/addressbook/newaddresstab.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtCore import (Qt, Signal)
-from PySide2.QtWidgets import (QWidget, QLabel, QPushButton, QVBoxLayout)
+from PySide6.QtCore import (Qt, Signal)
+from PySide6.QtWidgets import (QWidget, QLabel, QPushButton, QVBoxLayout)
from adddialogwidget import AddDialogWidget
@@ -84,7 +84,7 @@ if __name__ == "__main__":
print("Address:" + address)
import sys
- from PySide2.QtWidgets import QApplication
+ from PySide6.QtWidgets import QApplication
app = QApplication(sys.argv)
newAddressTab = NewAddressTab()
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.py b/examples/widgets/itemviews/addressbook/tablemodel.py
index 155f09131..9cf79f208 100644
--- a/examples/widgets/itemviews/addressbook/tablemodel.py
+++ b/examples/widgets/itemviews/addressbook/tablemodel.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2.QtCore import (Qt, QAbstractTableModel, QModelIndex)
+from PySide6.QtCore import (Qt, QAbstractTableModel, QModelIndex)
class TableModel(QAbstractTableModel):
diff --git a/examples/widgets/itemviews/basicsortfiltermodel.py b/examples/widgets/itemviews/basicsortfiltermodel.py
index 00441ffe7..845755cb9 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel.py
+++ b/examples/widgets/itemviews/basicsortfiltermodel.py
@@ -41,10 +41,10 @@
#############################################################################
import sys
-from PySide2.QtCore import (QDate, QDateTime, QRegularExpression,
+from PySide6.QtCore import (QDate, QDateTime, QRegularExpression,
QSortFilterProxyModel, QTime, Qt)
-from PySide2.QtGui import QStandardItemModel
-from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
+from PySide6.QtGui import QStandardItemModel
+from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QLineEdit,
QTreeView, QVBoxLayout, QWidget)
diff --git a/examples/widgets/itemviews/fetchmore.py b/examples/widgets/itemviews/fetchmore.py
index 2b0d8c104..c91874004 100644
--- a/examples/widgets/itemviews/fetchmore.py
+++ b/examples/widgets/itemviews/fetchmore.py
@@ -41,7 +41,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class FileListModel(QtCore.QAbstractListModel):
diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.py b/examples/widgets/itemviews/stardelegate/stardelegate.py
index 86fd99ce6..425a06be5 100644
--- a/examples/widgets/itemviews/stardelegate/stardelegate.py
+++ b/examples/widgets/itemviews/stardelegate/stardelegate.py
@@ -41,7 +41,7 @@
##
#############################################################################
-from PySide2.QtWidgets import QStyledItemDelegate, QStyle
+from PySide6.QtWidgets import QStyledItemDelegate, QStyle
from starrating import StarRating
from stareditor import StarEditor
@@ -139,7 +139,7 @@ class StarDelegate(QStyledItemDelegate):
if __name__ == "__main__":
""" Run the application. """
- from PySide2.QtWidgets import (QApplication, QTableWidget, QTableWidgetItem,
+ from PySide6.QtWidgets import (QApplication, QTableWidget, QTableWidgetItem,
QAbstractItemView)
import sys
diff --git a/examples/widgets/itemviews/stardelegate/stareditor.py b/examples/widgets/itemviews/stardelegate/stareditor.py
index 820aba8bf..f99ab9ca6 100644
--- a/examples/widgets/itemviews/stardelegate/stareditor.py
+++ b/examples/widgets/itemviews/stardelegate/stareditor.py
@@ -41,9 +41,9 @@
##
#############################################################################
-from PySide2.QtWidgets import (QWidget)
-from PySide2.QtGui import (QPainter)
-from PySide2.QtCore import Signal
+from PySide6.QtWidgets import (QWidget)
+from PySide6.QtGui import (QPainter)
+from PySide6.QtCore import Signal
from starrating import StarRating
diff --git a/examples/widgets/itemviews/stardelegate/starrating.py b/examples/widgets/itemviews/stardelegate/starrating.py
index d40b382f4..7e87389c9 100644
--- a/examples/widgets/itemviews/stardelegate/starrating.py
+++ b/examples/widgets/itemviews/stardelegate/starrating.py
@@ -43,8 +43,8 @@
from math import (cos, sin, pi)
-from PySide2.QtGui import (QPainter, QPolygonF)
-from PySide2.QtCore import (QPointF, QSize, Qt)
+from PySide6.QtGui import (QPainter, QPolygonF)
+from PySide6.QtCore import (QPointF, QSize, Qt)
PAINTING_SCALE_FACTOR = 20
diff --git a/examples/widgets/layouts/basiclayouts.py b/examples/widgets/layouts/basiclayouts.py
index 565ce728d..25a9b7760 100644
--- a/examples/widgets/layouts/basiclayouts.py
+++ b/examples/widgets/layouts/basiclayouts.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/layouts/basiclayout example from Qt v5.x"""
+"""PySide6 port of the widgets/layouts/basiclayout example from Qt v5.x"""
-from PySide2 import QtWidgets
+from PySide6 import QtWidgets
class Dialog(QtWidgets.QDialog):
diff --git a/examples/widgets/layouts/dynamiclayouts.py b/examples/widgets/layouts/dynamiclayouts.py
index 5ae7113ee..5d2f2babe 100644
--- a/examples/widgets/layouts/dynamiclayouts.py
+++ b/examples/widgets/layouts/dynamiclayouts.py
@@ -40,10 +40,10 @@
##
#############################################################################
-"""PySide2 port of the widgets/layouts/dynamiclayouts example from Qt v5.x"""
+"""PySide6 port of the widgets/layouts/dynamiclayouts example from Qt v5.x"""
-from PySide2.QtCore import Qt, QSize
-from PySide2.QtWidgets import (QApplication, QDialog, QLayout, QGridLayout,
+from PySide6.QtCore import Qt, QSize
+from PySide6.QtWidgets import (QApplication, QDialog, QLayout, QGridLayout,
QMessageBox, QGroupBox, QSpinBox, QSlider,
QProgressBar, QDial, QDialogButtonBox,
QComboBox, QLabel)
diff --git a/examples/widgets/layouts/flowlayout.py b/examples/widgets/layouts/flowlayout.py
index 970d5ac07..8f4d41480 100644
--- a/examples/widgets/layouts/flowlayout.py
+++ b/examples/widgets/layouts/flowlayout.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the widgets/layouts/flowlayout example from Qt v5.x"""
+"""PySide6 port of the widgets/layouts/flowlayout example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QMargins, QPoint, QRect, QSize
-from PySide2.QtWidgets import (QApplication, QLayout, QPushButton,
+from PySide6.QtCore import Qt, QMargins, QPoint, QRect, QSize
+from PySide6.QtWidgets import (QApplication, QLayout, QPushButton,
QSizePolicy, QWidget)
diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py
index d68e77b41..4fddff5c1 100644
--- a/examples/widgets/mainwindows/application/application.py
+++ b/examples/widgets/mainwindows/application/application.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
import application_rc
diff --git a/examples/widgets/mainwindows/application/application_rc.py b/examples/widgets/mainwindows/application/application_rc.py
index 2a392bea7..ad79e2ead 100644
--- a/examples/widgets/mainwindows/application/application_rc.py
+++ b/examples/widgets/mainwindows/application/application_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x04\xa3\
diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
index 87a818c05..910f0aa73 100644
--- a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
+++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
@@ -40,13 +40,13 @@
##
#############################################################################
-"""PySide2 port of the widgets/mainwindows/dockwidgets example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the widgets/mainwindows/dockwidgets example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import QDate, QFile, Qt, QTextStream
-from PySide2.QtGui import (QAction, QFont, QIcon, QKeySequence,
+from PySide6.QtCore import QDate, QFile, Qt, QTextStream
+from PySide6.QtGui import (QAction, QFont, QIcon, QKeySequence,
QTextCharFormat, QTextCursor, QTextTableFormat)
-from PySide2.QtPrintSupport import QPrintDialog, QPrinter
-from PySide2.QtWidgets import (QApplication, QDialog, QDockWidget,
+from PySide6.QtPrintSupport import QPrintDialog, QPrinter
+from PySide6.QtWidgets import (QApplication, QDialog, QDockWidget,
QFileDialog, QListWidget, QMainWindow, QMessageBox, QTextEdit)
import dockwidgets_rc
diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py
index 35b13db2b..a6052b3b2 100644
--- a/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py
+++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x06\xc4\
diff --git a/examples/widgets/mainwindows/mdi/mdi.py b/examples/widgets/mainwindows/mdi/mdi.py
index 18bbfa5fb..0a71b5296 100644
--- a/examples/widgets/mainwindows/mdi/mdi.py
+++ b/examples/widgets/mainwindows/mdi/mdi.py
@@ -40,12 +40,12 @@
##
#############################################################################
-"""PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper,
+from PySide6.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper,
QSaveFile, QSize, QTextStream, Qt)
-from PySide2.QtGui import QAction, QIcon, QKeySequence
-from PySide2.QtWidgets import (QApplication, QFileDialog, QMainWindow,
+from PySide6.QtGui import QAction, QIcon, QKeySequence
+from PySide6.QtWidgets import (QApplication, QFileDialog, QMainWindow,
QMdiArea, QMessageBox, QTextEdit, QWidget)
import mdi_rc
diff --git a/examples/widgets/mainwindows/mdi/mdi_rc.py b/examples/widgets/mainwindows/mdi/mdi_rc.py
index 2a392bea7..ad79e2ead 100644
--- a/examples/widgets/mainwindows/mdi/mdi_rc.py
+++ b/examples/widgets/mainwindows/mdi/mdi_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x04\xa3\
diff --git a/examples/widgets/painting/basicdrawing/basicdrawing.py b/examples/widgets/painting/basicdrawing/basicdrawing.py
index f92da1bd7..9134ae49e 100644
--- a/examples/widgets/painting/basicdrawing/basicdrawing.py
+++ b/examples/widgets/painting/basicdrawing/basicdrawing.py
@@ -40,12 +40,12 @@
##
#############################################################################
-"""PySide2 port of the widgets/painting/basicdrawing example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the widgets/painting/basicdrawing example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import QPoint, QRect, QSize, Qt, qVersion
-from PySide2.QtGui import (QBrush, QConicalGradient, QLinearGradient, QPainter,
+from PySide6.QtCore import QPoint, QRect, QSize, Qt, qVersion
+from PySide6.QtGui import (QBrush, QConicalGradient, QLinearGradient, QPainter,
QPainterPath, QPalette, QPen, QPixmap, QPolygon, QRadialGradient)
-from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
+from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
QLabel, QSpinBox, QWidget)
import basicdrawing_rc
diff --git a/examples/widgets/painting/basicdrawing/basicdrawing_rc.py b/examples/widgets/painting/basicdrawing/basicdrawing_rc.py
index 3a5480568..19e2b3b7a 100644
--- a/examples/widgets/painting/basicdrawing/basicdrawing_rc.py
+++ b/examples/widgets/painting/basicdrawing/basicdrawing_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x03X\
diff --git a/examples/widgets/painting/concentriccircles.py b/examples/widgets/painting/concentriccircles.py
index ff13292d2..08520b063 100644
--- a/examples/widgets/painting/concentriccircles.py
+++ b/examples/widgets/painting/concentriccircles.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the widgets/painting/concentriccircles example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the widgets/painting/concentriccircles example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import QRect, QRectF, QSize, Qt, QTimer
-from PySide2.QtGui import QColor, QPainter, QPalette, QPen
-from PySide2.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel,
+from PySide6.QtCore import QRect, QRectF, QSize, Qt, QTimer
+from PySide6.QtGui import QColor, QPainter, QPalette, QPen
+from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel,
QSizePolicy, QWidget)
diff --git a/examples/widgets/richtext/orderform.py b/examples/widgets/richtext/orderform.py
index 7c0d273d2..ed7b29d61 100644
--- a/examples/widgets/richtext/orderform.py
+++ b/examples/widgets/richtext/orderform.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/richtext/orderform example from Qt v5.x"""
+"""PySide6 port of the widgets/richtext/orderform example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtPrintSupport
+from PySide6 import QtCore, QtGui, QtWidgets, QtPrintSupport
class MainWindow(QtWidgets.QMainWindow):
diff --git a/examples/widgets/richtext/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter.py
index 576e8baef..52b3d53b8 100644
--- a/examples/widgets/richtext/syntaxhighlighter.py
+++ b/examples/widgets/richtext/syntaxhighlighter.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x"""
+"""PySide6 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class MainWindow(QtWidgets.QMainWindow):
diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
index 089c434e5..6c21a2a06 100644
--- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
+++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
@@ -40,14 +40,14 @@
##
#############################################################################
-"""PySide2 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x"""
+"""PySide6 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x"""
import sys
import re
-from PySide2.QtCore import (QFile, Qt, QTextStream)
-from PySide2.QtGui import (QColor, QFont, QKeySequence, QSyntaxHighlighter,
+from PySide6.QtCore import (QFile, Qt, QTextStream)
+from PySide6.QtGui import (QColor, QFont, QKeySequence, QSyntaxHighlighter,
QTextCharFormat)
-from PySide2.QtWidgets import (QApplication, QFileDialog, QMainWindow,
+from PySide6.QtWidgets import (QApplication, QFileDialog, QMainWindow,
QPlainTextEdit)
import syntaxhighlighter_rc
diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py
index 34fa7d49e..1e53463a4 100644
--- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py
+++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.14.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x06{\
diff --git a/examples/widgets/richtext/textobject/textobject.py b/examples/widgets/richtext/textobject/textobject.py
index b828ea3d0..60abfc19c 100644
--- a/examples/widgets/richtext/textobject/textobject.py
+++ b/examples/widgets/richtext/textobject/textobject.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/richtext/textobject example from Qt v5.x"""
+"""PySide6 port of the widgets/richtext/textobject example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtSvg
+from PySide6 import QtCore, QtGui, QtWidgets, QtSvg
class SvgTextObject(QtCore.QObject, QtGui.QTextObjectInterface):
diff --git a/examples/widgets/state-machine/eventtrans.py b/examples/widgets/state-machine/eventtrans.py
index 183f1178e..3445832a0 100644
--- a/examples/widgets/state-machine/eventtrans.py
+++ b/examples/widgets/state-machine/eventtrans.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
class MainWindow(QMainWindow):
def __init__(self):
diff --git a/examples/widgets/state-machine/factstates.py b/examples/widgets/state-machine/factstates.py
index bd71b204d..64b9613ec 100644
--- a/examples/widgets/state-machine/factstates.py
+++ b/examples/widgets/state-machine/factstates.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
class Factorial(QObject):
xChanged = Signal(int)
diff --git a/examples/widgets/state-machine/pingpong.py b/examples/widgets/state-machine/pingpong.py
index 84c5cab2a..6d64bebc6 100644
--- a/examples/widgets/state-machine/pingpong.py
+++ b/examples/widgets/state-machine/pingpong.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
class PingEvent(QEvent):
def __init__(self):
diff --git a/examples/widgets/state-machine/rogue.py b/examples/widgets/state-machine/rogue.py
index ce5b80596..af37b522b 100644
--- a/examples/widgets/state-machine/rogue.py
+++ b/examples/widgets/state-machine/rogue.py
@@ -40,9 +40,9 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtGui import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtGui import *
+from PySide6.QtCore import *
class MovementTransition(QEventTransition):
def __init__(self, window):
diff --git a/examples/widgets/state-machine/trafficlight.py b/examples/widgets/state-machine/trafficlight.py
index 3be9b457f..4aa8d560e 100644
--- a/examples/widgets/state-machine/trafficlight.py
+++ b/examples/widgets/state-machine/trafficlight.py
@@ -40,9 +40,9 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtGui import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtGui import *
+from PySide6.QtCore import *
class LightWidget(QWidget):
def __init__(self, color):
diff --git a/examples/widgets/state-machine/twowaybutton.py b/examples/widgets/state-machine/twowaybutton.py
index 27ed58e4d..44a011d69 100644
--- a/examples/widgets/state-machine/twowaybutton.py
+++ b/examples/widgets/state-machine/twowaybutton.py
@@ -40,8 +40,8 @@
##
#############################################################################
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
if __name__ == '__main__':
import sys
diff --git a/examples/widgets/systray/main.py b/examples/widgets/systray/main.py
index 4fad002a6..58acbb93b 100644
--- a/examples/widgets/systray/main.py
+++ b/examples/widgets/systray/main.py
@@ -40,7 +40,7 @@
import sys
-from PySide2.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon
+from PySide6.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon
from window import Window
diff --git a/examples/widgets/systray/rc_systray.py b/examples/widgets/systray/rc_systray.py
index 2d59adc74..bc4779646 100644
--- a/examples/widgets/systray/rc_systray.py
+++ b/examples/widgets/systray/rc_systray.py
@@ -3,7 +3,7 @@
# Created by: The Resource Compiler for Qt version 5.15.0
# WARNING! All changes made in this file will be lost!
-from PySide2 import QtCore
+from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00d\xb4\
diff --git a/examples/widgets/systray/window.py b/examples/widgets/systray/window.py
index 634646327..f1b8eec11 100644
--- a/examples/widgets/systray/window.py
+++ b/examples/widgets/systray/window.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QIcon
-from PySide2.QtWidgets import (QCheckBox, QComboBox, QDialog,
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QIcon
+from PySide6.QtWidgets import (QCheckBox, QComboBox, QDialog,
QGridLayout, QGroupBox, QHBoxLayout, QLabel,
QLineEdit, QMenu, QMessageBox, QPushButton,
QSpinBox, QStyle, QSystemTrayIcon, QTextEdit,
diff --git a/examples/widgets/threads/thread_signals.py b/examples/widgets/threads/thread_signals.py
index d63040491..6a3b0ee08 100644
--- a/examples/widgets/threads/thread_signals.py
+++ b/examples/widgets/threads/thread_signals.py
@@ -40,8 +40,8 @@
#############################################################################
import sys
-from PySide2.QtCore import QObject, QThread, Signal, Slot
-from PySide2.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget
+from PySide6.QtCore import QObject, QThread, Signal, Slot
+from PySide6.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget
# Create a basic window with a layout and a button
diff --git a/examples/widgets/tutorials/addressbook/part1.py b/examples/widgets/tutorials/addressbook/part1.py
index 895873036..a8356a7b5 100644
--- a/examples/widgets/tutorials/addressbook/part1.py
+++ b/examples/widgets/tutorials/addressbook/part1.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class AddressBook(QtWidgets.QWidget):
diff --git a/examples/widgets/tutorials/addressbook/part2.py b/examples/widgets/tutorials/addressbook/part2.py
index 6eac33bfc..92254ce1c 100644
--- a/examples/widgets/tutorials/addressbook/part2.py
+++ b/examples/widgets/tutorials/addressbook/part2.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/tutorials/addressbook/part3.py b/examples/widgets/tutorials/addressbook/part3.py
index d425c11d9..c04b8f2b9 100644
--- a/examples/widgets/tutorials/addressbook/part3.py
+++ b/examples/widgets/tutorials/addressbook/part3.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/tutorials/addressbook/part4.py b/examples/widgets/tutorials/addressbook/part4.py
index e4b1d1630..eca0be852 100644
--- a/examples/widgets/tutorials/addressbook/part4.py
+++ b/examples/widgets/tutorials/addressbook/part4.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/tutorials/addressbook/part5.py b/examples/widgets/tutorials/addressbook/part5.py
index cb666ff9f..27eb50a82 100644
--- a/examples/widgets/tutorials/addressbook/part5.py
+++ b/examples/widgets/tutorials/addressbook/part5.py
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/tutorials/addressbook/part6.py b/examples/widgets/tutorials/addressbook/part6.py
index 559cc355f..70103380c 100644
--- a/examples/widgets/tutorials/addressbook/part6.py
+++ b/examples/widgets/tutorials/addressbook/part6.py
@@ -42,7 +42,7 @@
import pickle
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/tutorials/addressbook/part7.py b/examples/widgets/tutorials/addressbook/part7.py
index f32a2a6a8..c6a272636 100644
--- a/examples/widgets/tutorials/addressbook/part7.py
+++ b/examples/widgets/tutorials/addressbook/part7.py
@@ -42,7 +42,7 @@
import pickle
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
class SortedDict(dict):
diff --git a/examples/widgets/widgets/tetrix.py b/examples/widgets/widgets/tetrix.py
index 134eec4e4..69c6d4bff 100644
--- a/examples/widgets/widgets/tetrix.py
+++ b/examples/widgets/widgets/tetrix.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the widgets/widgets/tetrix example from Qt v5.x"""
+"""PySide6 port of the widgets/widgets/tetrix example from Qt v5.x"""
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
NoShape, ZShape, SShape, LineShape, TShape, SquareShape, LShape, MirroredLShape = range(8)
diff --git a/examples/xml/dombookmarks/dombookmarks.py b/examples/xml/dombookmarks/dombookmarks.py
index f645bedce..0a8d01ec4 100644
--- a/examples/xml/dombookmarks/dombookmarks.py
+++ b/examples/xml/dombookmarks/dombookmarks.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the xml/dombookmarks example from Qt v5.x"""
+"""PySide6 port of the xml/dombookmarks example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtXml
+from PySide6 import QtCore, QtGui, QtWidgets, QtXml
class MainWindow(QtWidgets.QMainWindow):
diff --git a/keyword-errors.lst b/keyword-errors.lst
index af8c581a5..3b9ecea99 100644
--- a/keyword-errors.lst
+++ b/keyword-errors.lst
@@ -1,43 +1,43 @@
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QAbstractItemModel.changePersistentIndex', 'arglist': 'from:PySide2.QtCore.QModelIndex,to:PySide2.QtCore.QModelIndex', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QAbstractItemModel.changePersistentIndexList', 'arglist': 'from:QModelIndexList,to:QModelIndexList', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QByteArray.indexOf', 'arglist': 'a:PySide2.QtCore.QByteArray,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QByteArray.lastIndexOf', 'arglist': 'a:PySide2.QtCore.QByteArray,from:int=-1', 'returntype': 'int'}
-KEYWORD {'multi': '1', 'funcname': 'PySide2.QtCore.QByteArrayMatcher.indexIn', 'arglist': 'ba:PySide2.QtCore.QByteArray,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': '0', 'funcname': 'PySide2.QtCore.QByteArrayMatcher.indexIn', 'arglist': 'str:str,len:int,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QItemSelection.indexOf', 'arglist': 't:PySide2.QtCore.QItemSelectionRange,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QItemSelection.lastIndexOf', 'arglist': 't:PySide2.QtCore.QItemSelectionRange,from:int=-1', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QItemSelection.move', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QTextCodec.convertToUnicode', 'arglist': 'in:str,length:int,state:PySide2.QtCore.QTextCodec.ConverterState', 'returntype': 'QString'}
-KEYWORD {'multi': '0', 'funcname': 'PySide2.QtCore.QTextCodec.toUnicode', 'arglist': 'in:str,length:int,state:PySide2.QtCore.QTextCodec.ConverterState=nullptr', 'returntype': 'QString'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QVariantAnimation.interpolated', 'arglist': 'from:QVariant,to:QVariant,progress:double', 'returntype': 'QVariant'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QXmlStreamAttributes.indexOf', 'arglist': 't:PySide2.QtCore.QXmlStreamAttribute,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QXmlStreamAttributes.lastIndexOf', 'arglist': 't:PySide2.QtCore.QXmlStreamAttribute,from:int=-1', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtCore.QXmlStreamAttributes.move', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QAbstractTextDocumentLayout.documentChanged', 'arglist': 'from:int,charsRemoved:int,charsAdded:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QIconEngine.read', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'bool'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QKeySequence.__lshift__', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'PySide2.QtCore.QDataStream'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygon.indexOf', 'arglist': 't:PySide2.QtCore.QPoint,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygon.lastIndexOf', 'arglist': 't:PySide2.QtCore.QPoint,from:int=-1', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygon.move', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygonF.indexOf', 'arglist': 't:PySide2.QtCore.QPointF,from:int=0', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygonF.lastIndexOf', 'arglist': 't:PySide2.QtCore.QPointF,from:int=-1', 'returntype': 'int'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QPolygonF.move', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QQuaternion.rotationTo', 'arglist': 'from:PySide2.QtGui.QVector3D,to:PySide2.QtGui.QVector3D', 'returntype': 'PySide2.QtGui.QQuaternion'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QStandardItem.read', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QStandardItem.__rshift__', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'PySide2.QtCore.QDataStream'}
-KEYWORD {'multi': '4', 'funcname': 'PySide2.QtGui.QTextDocument.find', 'arglist': 'expr:PySide2.QtCore.QRegExp,from:int=0,options:PySide2.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide2.QtGui.QTextCursor'}
-KEYWORD {'multi': '2', 'funcname': 'PySide2.QtGui.QTextDocument.find', 'arglist': 'expr:PySide2.QtCore.QRegularExpression,from:int=0,options:PySide2.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide2.QtGui.QTextCursor'}
-KEYWORD {'multi': '0', 'funcname': 'PySide2.QtGui.QTextDocument.find', 'arglist': 'subString:QString,from:int=0,options:PySide2.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide2.QtGui.QTextCursor'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtGui.QTextDocument.markContentsDirty', 'arglist': 'from:int,length:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QHeaderView.moveSection', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QLayout.replaceWidget', 'arglist': 'from:PySide2.QtWidgets.QWidget,to:PySide2.QtWidgets.QWidget,options:PySide2.QtCore.Qt.FindChildOptions=Qt.FindChildrenRecursively', 'returntype': 'PySide2.QtWidgets.QLayoutItem'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QListWidgetItem.read', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QListWidgetItem.__rshift__', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'PySide2.QtCore.QDataStream'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QPlainTextDocumentLayout.documentChanged', 'arglist': 'from:int,arg__2:int,charsAdded:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QTabBar.moveTab', 'arglist': 'from:int,to:int', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QTableWidgetItem.read', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QTableWidgetItem.__rshift__', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'PySide2.QtCore.QDataStream'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QTreeWidgetItem.read', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': None}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtWidgets.QTreeWidgetItem.__rshift__', 'arglist': 'in:PySide2.QtCore.QDataStream', 'returntype': 'PySide2.QtCore.QDataStream'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtMultimedia.QAudio.convertVolume', 'arglist': 'volume:double,from:PySide2.QtMultimedia.QAudio.VolumeScale,to:PySide2.QtMultimedia.QAudio.VolumeScale', 'returntype': 'double'}
-KEYWORD {'multi': None, 'funcname': 'PySide2.QtMultimedia.QMediaPlaylist.moveMedia', 'arglist': 'from:int,to:int', 'returntype': 'bool'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QAbstractItemModel.changePersistentIndex', 'arglist': 'from:PySide6.QtCore.QModelIndex,to:PySide6.QtCore.QModelIndex', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QAbstractItemModel.changePersistentIndexList', 'arglist': 'from:QModelIndexList,to:QModelIndexList', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QByteArray.indexOf', 'arglist': 'a:PySide6.QtCore.QByteArray,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QByteArray.lastIndexOf', 'arglist': 'a:PySide6.QtCore.QByteArray,from:int=-1', 'returntype': 'int'}
+KEYWORD {'multi': '1', 'funcname': 'PySide6.QtCore.QByteArrayMatcher.indexIn', 'arglist': 'ba:PySide6.QtCore.QByteArray,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': '0', 'funcname': 'PySide6.QtCore.QByteArrayMatcher.indexIn', 'arglist': 'str:str,len:int,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QItemSelection.indexOf', 'arglist': 't:PySide6.QtCore.QItemSelectionRange,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QItemSelection.lastIndexOf', 'arglist': 't:PySide6.QtCore.QItemSelectionRange,from:int=-1', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QItemSelection.move', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QTextCodec.convertToUnicode', 'arglist': 'in:str,length:int,state:PySide6.QtCore.QTextCodec.ConverterState', 'returntype': 'QString'}
+KEYWORD {'multi': '0', 'funcname': 'PySide6.QtCore.QTextCodec.toUnicode', 'arglist': 'in:str,length:int,state:PySide6.QtCore.QTextCodec.ConverterState=nullptr', 'returntype': 'QString'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QVariantAnimation.interpolated', 'arglist': 'from:QVariant,to:QVariant,progress:double', 'returntype': 'QVariant'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QXmlStreamAttributes.indexOf', 'arglist': 't:PySide6.QtCore.QXmlStreamAttribute,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QXmlStreamAttributes.lastIndexOf', 'arglist': 't:PySide6.QtCore.QXmlStreamAttribute,from:int=-1', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtCore.QXmlStreamAttributes.move', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QAbstractTextDocumentLayout.documentChanged', 'arglist': 'from:int,charsRemoved:int,charsAdded:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QIconEngine.read', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'bool'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QKeySequence.__lshift__', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'PySide6.QtCore.QDataStream'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygon.indexOf', 'arglist': 't:PySide6.QtCore.QPoint,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygon.lastIndexOf', 'arglist': 't:PySide6.QtCore.QPoint,from:int=-1', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygon.move', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygonF.indexOf', 'arglist': 't:PySide6.QtCore.QPointF,from:int=0', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygonF.lastIndexOf', 'arglist': 't:PySide6.QtCore.QPointF,from:int=-1', 'returntype': 'int'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QPolygonF.move', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QQuaternion.rotationTo', 'arglist': 'from:PySide6.QtGui.QVector3D,to:PySide6.QtGui.QVector3D', 'returntype': 'PySide6.QtGui.QQuaternion'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QStandardItem.read', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QStandardItem.__rshift__', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'PySide6.QtCore.QDataStream'}
+KEYWORD {'multi': '4', 'funcname': 'PySide6.QtGui.QTextDocument.find', 'arglist': 'expr:PySide6.QtCore.QRegExp,from:int=0,options:PySide6.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide6.QtGui.QTextCursor'}
+KEYWORD {'multi': '2', 'funcname': 'PySide6.QtGui.QTextDocument.find', 'arglist': 'expr:PySide6.QtCore.QRegularExpression,from:int=0,options:PySide6.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide6.QtGui.QTextCursor'}
+KEYWORD {'multi': '0', 'funcname': 'PySide6.QtGui.QTextDocument.find', 'arglist': 'subString:QString,from:int=0,options:PySide6.QtGui.QTextDocument.FindFlags=QTextDocument.FindFlags()', 'returntype': 'PySide6.QtGui.QTextCursor'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtGui.QTextDocument.markContentsDirty', 'arglist': 'from:int,length:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QHeaderView.moveSection', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QLayout.replaceWidget', 'arglist': 'from:PySide6.QtWidgets.QWidget,to:PySide6.QtWidgets.QWidget,options:PySide6.QtCore.Qt.FindChildOptions=Qt.FindChildrenRecursively', 'returntype': 'PySide6.QtWidgets.QLayoutItem'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QListWidgetItem.read', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QListWidgetItem.__rshift__', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'PySide6.QtCore.QDataStream'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QPlainTextDocumentLayout.documentChanged', 'arglist': 'from:int,arg__2:int,charsAdded:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QTabBar.moveTab', 'arglist': 'from:int,to:int', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QTableWidgetItem.read', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QTableWidgetItem.__rshift__', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'PySide6.QtCore.QDataStream'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QTreeWidgetItem.read', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': None}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtWidgets.QTreeWidgetItem.__rshift__', 'arglist': 'in:PySide6.QtCore.QDataStream', 'returntype': 'PySide6.QtCore.QDataStream'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtMultimedia.QAudio.convertVolume', 'arglist': 'volume:double,from:PySide6.QtMultimedia.QAudio.VolumeScale,to:PySide6.QtMultimedia.QAudio.VolumeScale', 'returntype': 'double'}
+KEYWORD {'multi': None, 'funcname': 'PySide6.QtMultimedia.QMediaPlaylist.moveMedia', 'arglist': 'from:int,to:int', 'returntype': 'bool'}
diff --git a/sources/cmake_helpers/helpers.cmake b/sources/cmake_helpers/helpers.cmake
index 2ca9e8228..49a73af2b 100644
--- a/sources/cmake_helpers/helpers.cmake
+++ b/sources/cmake_helpers/helpers.cmake
@@ -86,7 +86,7 @@ macro(use_protected_as_public_hack)
# Clang does produce linker errors when we disable the hack.
# But the ugly workaround in Python is replaced by a shiboken change.
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
- message(STATUS "PySide2 will be generated avoiding the protected hack!")
+ message(STATUS "PySide6 will be generated avoiding the protected hack!")
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
add_definitions(-DAVOID_PROTECTED_HACK)
else()
diff --git a/sources/pyside-tools/CMakeLists.txt b/sources/pyside-tools/CMakeLists.txt
index 0def5a82f..3652a94c1 100644
--- a/sources/pyside-tools/CMakeLists.txt
+++ b/sources/pyside-tools/CMakeLists.txt
@@ -50,7 +50,7 @@ if (EXISTS ${DESIGNER_PATH})
endif()
endif()
-# pyside2-rcc, pyside2-uic, pyside2-designer, shiboken and pyside2-lupdate entrypoints
+# pyside6-rcc, pyside6-uic, pyside6-designer, shiboken and pyside6-lupdate entrypoints
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside_tool.py
DESTINATION bin
PERMISSIONS
diff --git a/sources/pyside-tools/pyside_tool.py b/sources/pyside-tools/pyside_tool.py
index 99a3700f4..15db6c4aa 100755..100644
--- a/sources/pyside-tools/pyside_tool.py
+++ b/sources/pyside-tools/pyside_tool.py
@@ -43,11 +43,11 @@ import os
import subprocess
from subprocess import Popen, PIPE
-import PySide2 as ref_mod
+import PySide6 as ref_mod
def main():
- # This will take care of "pyside2-lupdate" listed as an entrypoint
+ # This will take care of "pyside6-lupdate" listed as an entrypoint
# in setup.py are copied to 'scripts/..'
cmd = os.path.join("..", os.path.basename(sys.argv[0]))
command = [os.path.join(os.path.dirname(os.path.realpath(__file__)), cmd)]
@@ -56,7 +56,7 @@ def main():
def qt_tool_wrapper(qt_tool, args):
- # Taking care of pyside2-uic, pyside2-rcc, and pyside2-designer
+ # Taking care of pyside6-uic, pyside6-rcc, and pyside6-designer
# listed as an entrypoint in setup.py
pyside_dir = os.path.dirname(ref_mod.__file__)
exe = os.path.join(pyside_dir, qt_tool)
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
deleted file mode 100644
index 50ec351fe..000000000
--- a/sources/pyside2/CMakeLists.txt
+++ /dev/null
@@ -1,266 +0,0 @@
-include(cmake/Macros/icecc.cmake) # this must be the first line!
-
-cmake_minimum_required(VERSION 3.16)
-cmake_policy(VERSION 3.16)
-
-# Don't ignore targets that do not exist, inside add_dependencies calls.
-cmake_policy(SET CMP0046 NEW)
-
-set (QT_MAJOR_VERSION 6)
-
-project(pysidebindings)
-
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_helpers/
- ${CMAKE_CURRENT_SOURCE_DIR}/../shiboken6/data/
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macros/
- ${CMAKE_MODULE_PATH})
-include(shiboken_helpers)
-include(helpers)
-
-# Don't display "up-to-date / install" messages when installing, to reduce visual clutter.
-if (QUIET_BUILD)
- set(CMAKE_INSTALL_MESSAGE NEVER)
-endif()
-
-# Override message not to display info messages when doing a quiet build.
-if (QUIET_BUILD AND is_pyside2_superproject_build)
- function(message)
- list(GET ARGV 0 MessageType)
- if (MessageType STREQUAL FATAL_ERROR OR
- MessageType STREQUAL SEND_ERROR OR
- MessageType STREQUAL WARNING OR
- MessageType STREQUAL AUTHOR_WARNING)
- list(REMOVE_AT ARGV 0)
- _message(${MessageType} "${ARGV}")
- endif()
- endfunction()
-endif()
-
-set(PYSIDE_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pyside_version.py")
-set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
- ${PYSIDE_VERSION_FILE_PATH}
-)
-execute_process(
- COMMAND ${PYTHON_EXECUTABLE} "${PYSIDE_VERSION_FILE_PATH}"
- OUTPUT_VARIABLE PYSIDE_VERSION_OUTPUT
- ERROR_VARIABLE PYSIDE_VERSION_OUTPUT_ERROR
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-if (NOT PYSIDE_VERSION_OUTPUT)
- message(FATAL_ERROR "Could not identify PySide2 version. Error: ${PYSIDE_VERSION_OUTPUT_ERROR}")
-endif()
-
-list(GET PYSIDE_VERSION_OUTPUT 0 BINDING_API_MAJOR_VERSION)
-list(GET PYSIDE_VERSION_OUTPUT 1 BINDING_API_MINOR_VERSION)
-list(GET PYSIDE_VERSION_OUTPUT 2 BINDING_API_MICRO_VERSION)
-# a - alpha, b - beta, rc - rc
-list(GET PYSIDE_VERSION_OUTPUT 3 BINDING_API_PRE_RELEASE_VERSION_TYPE)
-# the number of the pre release (alpha1, beta3, rc7, etc.)
-list(GET PYSIDE_VERSION_OUTPUT 4 BINDING_API_PRE_RELEASE_VERSION)
-
-if (WIN32)
- set(PATH_SEP "\;")
-else()
- set(PATH_SEP ":")
-endif()
-
-find_package(Shiboken6 2.0.0 REQUIRED)
-
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "${SHIBOKEN_BUILD_TYPE}" CACHE STRING "Build Type")
-endif()
-
-if (CMAKE_BUILD_TYPE STREQUAL "Release")
- add_definitions("-DNDEBUG")
-endif()
-
-if (SHIBOKEN_PYTHON_LIMITED_API)
- message(STATUS "******************************************************")
- message(STATUS "** PySide2 Limited API enabled.")
- message(STATUS "******************************************************")
-endif()
-
-find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core)
-add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
-
-option(BUILD_TESTS "Build tests." TRUE)
-option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
-set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
-if(CMAKE_HOST_APPLE)
- set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "Deprecated. CMake now finds the proper include dir itself.")
- set(OSX_USE_LIBCPP "OFF" CACHE BOOL "Explicitly link the libc++ standard library (useful for osx deployment targets lower than 10.9.")
- if(OSX_USE_LIBCPP)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
- endif()
-endif()
-
-# Force usage of the C++17 standard
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-# Obtain QT_INCLUDE_DIR from INTERFACE_INCLUDE_DIRECTORIES which returns a list
-# ../install-qt-6/include/QtCore;../install-qt-6/include
-set(QT_INCLUDE_DIR "")
-get_target_property(QT_INCLUDE_DIR_LIST Qt6::Core INTERFACE_INCLUDE_DIRECTORIES)
-foreach(_Q ${QT_INCLUDE_DIR_LIST})
- if(NOT "${_Q}" MATCHES "QtCore$")
- set(QT_INCLUDE_DIR "${_Q}")
- endif()
-endforeach()
-if (QT_INCLUDE_DIR STREQUAL "")
- message(FATAL_ERROR "Unable to obtain the Qt include directory")
-endif()
-
-# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
-get_target_property(QtCore_is_framework Qt${QT_MAJOR_VERSION}::Core FRAMEWORK)
-
-if (QtCore_is_framework)
- # Get the path to the framework dir.
- get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
- message(STATUS "*** QT_FRAMEWORK_INCLUDE_DIR is ${QT_FRAMEWORK_INCLUDE_DIR}")
-
- # QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
- # to the actual include directory, which has include files for non-framework parts of Qt.
- get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
-endif()
-
-set_cmake_cxx_flags()
-
-message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
-
-set(BINDING_NAME PySide2)
-
-set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide2 version" FORCE)
-set(PYSIDE_SO_VERSION ${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION})
-if (BINDING_API_PRE_RELEASE_VERSION_TYPE STREQUAL "")
- set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
- CACHE STRING "PySide2 version [full]" FORCE)
-else()
- set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}~${BINDING_API_PRE_RELEASE_VERSION_TYPE}${BINDING_API_PRE_RELEASE_VERSION}"
- CACHE STRING "PySide2 version [full]" FORCE)
-endif()
-
-compute_config_py_values(BINDING_API_VERSION)
-
-include(PySideModules)
-
-# Set default values for pyside2_global.h
-set (Qt${QT_MAJOR_VERSION}X11Extras_FOUND "0")
-set (Qt${QT_MAJOR_VERSION}Test_FOUND "0")
-set (Qt${QT_MAJOR_VERSION}Widgets_FOUND "0")
-
-collect_essential_modules()
-collect_optional_modules()
-
-# Modules to be built unless specified by -DMODULES on command line
-if (NOT MODULES)
- set(MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}")
-endif()
-
-# This will contain the set of modules for which bindings are not built.
-set(DISABLED_MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}")
-
-remove_skipped_modules()
-
-# Mark all non-collected modules as disabled. This is used for disabling tests
-# that depend on the disabled modules.
-foreach(m ${DISABLED_MODULES})
- set(DISABLE_Qt${m} 1)
-endforeach()
-
-
-string(REGEX MATCHALL "[0-9]+" qt_version_helper "${Qt${QT_MAJOR_VERSION}Core_VERSION}")
-
-list(GET qt_version_helper 0 QT_VERSION_MAJOR)
-list(GET qt_version_helper 1 QT_VERSION_MINOR)
-list(GET qt_version_helper 2 QT_VERSION_PATCH)
-unset(qt_version_helper)
-
-set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
-if(ENABLE_VERSION_SUFFIX)
- set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
-endif()
-
-# no more supported: include(${QT_USE_FILE})
-
-# Configure OS support
-check_os()
-message(STATUS "Detected OS: ${AUTO_OS}")
-
-# Define supported Qt Version
-set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
-
-
-# uninstall target
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-
-# When opening super project, prevent redefinition of uninstall target.
-if (NOT TARGET uninstall)
- add_custom_target(uninstall "${CMAKE_COMMAND}"
- -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-endif()
-
-if (NOT PYTHON_SITE_PACKAGES)
- execute_process(
- COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "if True:
- from distutils import sysconfig
- from os.path import sep
- print(sysconfig.get_python_lib(1, 0, prefix='${CMAKE_INSTALL_PREFIX}').replace(sep, '/'))
- "
- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT PYTHON_SITE_PACKAGES)
- message(FATAL_ERROR "Could not detect Python module installation directory.")
- elseif (APPLE)
- message(STATUS "!!! The generated bindings will be installed on ${PYTHON_SITE_PACKAGES}, is it right!?")
- endif()
-endif()
-
-set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken
- --enable-parent-ctor-heuristic
- --enable-pyside-extensions
- --enable-return-value-heuristic
- --use-isnull-as-nb_nonzero)
-use_protected_as_public_hack()
-
-# Build with Address sanitizer enabled if requested. This may break things, so use at your own risk.
-if (SANITIZE_ADDRESS AND NOT MSVC)
- setup_sanitize_address()
-endif()
-
-#####################################################################
-# Adding sub-directories to build
-#####################################################################
-
-add_subdirectory(libpyside)
-find_package(Qt${QT_MAJOR_VERSION}Designer)
-if(Qt${QT_MAJOR_VERSION}UiTools_FOUND AND Qt${QT_MAJOR_VERSION}Designer_FOUND)
- add_subdirectory(plugins)
-endif()
-
-# project directories
-add_subdirectory(PySide2)
-if (BUILD_TESTS)
- enable_testing()
- add_subdirectory(tests)
-endif ()
-
-find_program(SPHINX_BUILD sphinx-build)
-find_program(DOT_EXEC dot)
-
-if (QT_SRC_DIR AND SPHINX_BUILD AND DOT_EXEC)
- add_subdirectory(doc)
-else ()
- set(DOCS_TARGET_DISABLED_MESSAGE "apidoc generation targets disabled.")
- if (NOT QT_SRC_DIR)
- message(STATUS "QT_SRC_DIR variable not set, ${DOCS_TARGET_DISABLED_MESSAGE}")
- elseif (NOT SPHINX_BUILD)
- message(STATUS "sphinx-build command not found, ${DOCS_TARGET_DISABLED_MESSAGE}")
- elseif (NOT DOT_EXEC)
- message(STATUS "graphviz not found, ${DOCS_TARGET_DISABLED_MESSAGE}")
- else()
- message(STATUS "Unknown issue occurred, ${DOCS_TARGET_DISABLED_MESSAGE}")
- endif()
-endif()
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
deleted file mode 100644
index 0ded09f5d..000000000
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-project(pyside2)
-
-# Configure include based on platform
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
- "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h" @ONLY)
-
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
- "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
- "${CMAKE_CURRENT_BINARY_DIR}/_config.py" @ONLY)
-# typing support for mypy
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/py.typed.in"
- "${CMAKE_CURRENT_BINARY_DIR}/py.typed" @ONLY)
-
-# Use absolute path instead of relative path, to avoid ninja build errors due to
-# duplicate file dependency inconsistency.
-set(pyside_version_relative_path "${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py")
-get_filename_component(pyside_version_path ${pyside_version_relative_path} ABSOLUTE)
-configure_file("${pyside_version_path}"
- "${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py" @ONLY)
-
-# qt.conf needs to be placed next to QtWebEngineProcess so that the executable uses the correct
-# Prefix location leading to an existing icu data file. It is needed on Windows, Linux, and macOS
-# non-framework build. In framework build, instead of using qt.conf, Bundle querying is used.
-if (WIN32 OR (UNIX AND NOT APPLE) OR (APPLE AND NOT QtCore_is_framework))
-
- if (WIN32)
- # On Windows, the QtWebEngineProcess is directly located in the Prefix, due to not using
- # a "Qt" subfolder like on the other platforms.
- set(QT_CONF_PREFIX ".")
- else()
- # On Linux and non-framework macOS, the QtWebEngineProcess is in ./libexec, so prefix is one
- # level higher.
- set(QT_CONF_PREFIX "..")
- endif()
-
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.in"
- "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" @ONLY)
-endif()
-
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/__init__.py"
- "${CMAKE_CURRENT_BINARY_DIR}/support/__init__.py" COPYONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/generate_pyi.py"
- "${CMAKE_CURRENT_BINARY_DIR}/support/generate_pyi.py" COPYONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/deprecated.py"
- "${CMAKE_CURRENT_BINARY_DIR}/support/deprecated.py" COPYONLY)
-
-# now compile all modules.
-file(READ "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h" pyside2_global_contents)
-
-foreach(shortname IN LISTS all_module_shortnames)
- set(name "Qt${QT_MAJOR_VERSION}${shortname}")
- set(_qt_module_name "${name}")
- if ("${shortname}" STREQUAL "OpenGLFunctions")
- set(_qt_module_name "Qt${QT_MAJOR_VERSION}Gui")
- endif()
- HAS_QT_MODULE(${_qt_module_name}_FOUND Qt${shortname})
-
- # Create a module header consisting of pyside2_global.h and the module
- # include. Note: The contents of pyside2_global.h must be copied instead of
- # just #including it since shiboken will otherwise generate an
- # #include <pyside2_global.h> for the the type entries originating from it
- # (cf AbstractMetaBuilderPrivate::setInclude()).
- set(module_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}_global.h")
- set(module_header_content "")
- set(pre_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.pre.h")
- if(EXISTS "${pre_header}")
- file(READ "${pre_header}" pre_header_content)
- set(module_header_content "${pre_header_content}")
- endif()
- set(module_header_content "${module_header_content}\n${pyside2_global_contents}")
- # AxContainer/AxServer from Active Qt do not have module headers
- if(NOT "${shortname}" STREQUAL "AxContainer" AND NOT "${shortname}" STREQUAL "OpenGLFunctions")
- set(module_header_content "${module_header_content}\n#include <Qt${shortname}/Qt${shortname}>")
- endif()
- set(post_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.post.h")
- if(EXISTS "${post_header}")
- file(READ "${post_header}" post_header_content)
- set(module_header_content "${module_header_content}\n${post_header_content}")
- endif()
- file(WRITE ${module_header} "${module_header_content}")
-endforeach()
-
-# install
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
- DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_config.py"
- DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py"
- DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside2_SUFFIX}")
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/core_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/gui_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/widgets_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/datavisualization_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/opengl_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/openglfunctions_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/xml_common.xml
- DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h
- DESTINATION include/${BINDING_NAME}${pyside2_SUFFIX})
diff --git a/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt
deleted file mode 100644
index 970c9102c..000000000
--- a/sources/pyside2/PySide2/Qt3DAnimation/CMakeLists.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-project(Qt3DAnimation)
-
-set(Qt3DAnimation_SRC
-${Qt3DAnimation_GEN_DIR}/qt3danimation_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractanimation_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractanimationclip_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractchannelmapping_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractclipanimator_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractclipblendnode_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qadditiveclipblend_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationaspect_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationcallback_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationclip_wrapper.cpp
-${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_qclipanimator_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qclock_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qkeyframe_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qkeyframeanimation_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qlerpclipblend_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qmorphinganimation_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qmorphtarget_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qskeletonmapping_wrapper.cpp
-${Qt3DAnimation_GEN_DIR}/qt3danimation_qvertexblendanimation_wrapper.cpp
-# module is always needed
-${Qt3DAnimation_GEN_DIR}/qt3danimation_module_wrapper.cpp)
-
-set(Qt3DAnimation_include_dirs
- ${Qt3DAnimation_SOURCE_DIR}
- ${Qt3DAnimation_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIR}
- ${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}
- ${Qt3DCore_GEN_DIR}
- ${Qt3DRender_GEN_DIR}
- ${Qt3DAnimation_GEN_DIR})
-
-set(Qt3DAnimation_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DAnimation_LIBRARIES})
-
-set(Qt3DAnimation_deps Qt3DRender)
-
-create_pyside_module(NAME Qt3DAnimation
- INCLUDE_DIRS Qt3DAnimation_include_dirs
- LIBRARIES Qt3DAnimation_libraries
- DEPS Qt3DAnimation_deps
- TYPESYSTEM_PATH Qt3DAnimation_SOURCE_DIR
- SOURCES Qt3DAnimation_SRC
- TYPESYSTEM_NAME ${Qt3DAnimation_BINARY_DIR}/typesystem_3danimation.xml)
diff --git a/sources/pyside2/PySide2/Qt3DAnimation/typesystem_3danimation.xml b/sources/pyside2/PySide2/Qt3DAnimation/typesystem_3danimation.xml
deleted file mode 100644
index 7f24234c5..000000000
--- a/sources/pyside2/PySide2/Qt3DAnimation/typesystem_3danimation.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DAnimation">
- <load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
- <namespace-type name="Qt3DAnimation">
- <object-type name="QAbstractAnimation">
- <enum-type name="AnimationType"/>
- </object-type>
- <object-type name="QAbstractAnimationClip"/>
- <object-type name="QAbstractChannelMapping"/>
- <object-type name="QAbstractClipAnimator">
- <enum-type name="Loops"/>
- </object-type>
- <object-type name="QAbstractClipBlendNode"/>
- <object-type name="QAdditiveClipBlend"/>
- <object-type name="QAnimationAspect"/>
- <object-type name="QAnimationCallback">
- <enum-type name="Flag"/>
- </object-type>
- <object-type name="QAnimationClip"/>
- <object-type name="QAnimationClipLoader">
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QAnimationController"/>
- <object-type name="QAnimationGroup"/>
- <object-type name="QBlendedClipAnimator"/>
- <object-type name="QClipAnimator"/>
- <object-type name="QClock"/>
- <object-type name="QKeyFrame">
- <enum-type name="InterpolationType"/>
- </object-type>
- <object-type name="QKeyframeAnimation">
- <enum-type name="RepeatMode"/>
- </object-type>
- <object-type name="QLerpClipBlend"/>
- <object-type name="QMorphingAnimation">
- <enum-type name="Method"/>
- </object-type>
- <object-type name="QMorphTarget"/>
- <object-type name="QSkeletonMapping"/>
- <object-type name="QVertexBlendAnimation"/>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt
deleted file mode 100644
index 2fa1ecee3..000000000
--- a/sources/pyside2/PySide2/Qt3DCore/CMakeLists.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-project(Qt3DCore)
-
-set(Qt3DCore_SRC
-${Qt3DCore_GEN_DIR}/qt3dcore_qabstractaspect_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qabstractfrontendnodemanager_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qabstractfunctor_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qabstractskeleton_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qarmature_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qaspectengine_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qaspectjob_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qattribute_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qbackendnode_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_qentity_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qgeometry_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qgeometryview_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qjoint_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qnode_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qnodeid_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qnodeidtypepair_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qskeleton_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qskeletonloader_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_qtransform_wrapper.cpp
-${Qt3DCore_GEN_DIR}/qt3dcore_wrapper.cpp
-# module is always needed
-${Qt3DCore_GEN_DIR}/qt3dcore_module_wrapper.cpp)
-
-set(Qt3DCore_include_dirs
- ${Qt3DCore_SOURCE_DIR}
- ${Qt3DCore_BINARY_DIR}
- ${pyside2_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}3DCore_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtNetwork_GEN_DIR})
-
-set(Qt3DCore_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DCore_LIBRARIES})
-
-set(Qt3DCore_deps QtGui QtNetwork)
-
-create_pyside_module(NAME Qt3DCore
- INCLUDE_DIRS Qt3DCore_include_dirs
- LIBRARIES Qt3DCore_libraries
- DEPS Qt3DCore_deps
- TYPESYSTEM_PATH Qt3DCore_SOURCE_DIR
- SOURCES Qt3DCore_SRC
- TYPESYSTEM_NAME ${Qt3DCore_BINARY_DIR}/typesystem_3dcore.xml)
diff --git a/sources/pyside2/PySide2/Qt3DCore/typesystem_3dcore.xml b/sources/pyside2/PySide2/Qt3DCore/typesystem_3dcore.xml
deleted file mode 100644
index 61b128f73..000000000
--- a/sources/pyside2/PySide2/Qt3DCore/typesystem_3dcore.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DCore">
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
- <namespace-type name="Qt3DCore" generate-using="no">
- <enum-type name="ChangeFlag" flags="ChangeFlags"/>
- <object-type name="QAbstractAspect"/>
- <object-type name="QAbstractFrontEndNodeManager" since="6.0">
- <enum-type name="DirtyNodeFlag" flags="DirtyNodeSet"/>
- </object-type>
- <object-type name="QAbstractFunctor" since="6.0"/>
- <object-type name="QAbstractSkeleton" since="5.10"/>
- <object-type name="QArmature" since="5.10"/>
- <object-type name="QAspectEngine">
- <enum-type name="RunMode" since="5.14"/>
- <modify-function signature="registerAspect(Qt3DCore::QAbstractAspect*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAspectJob"/>
- <object-type name="QBackendNode">
- <enum-type name="Mode"/>
- </object-type>
- <object-type name="QAttribute">
- <enum-type name="AttributeType"/>
- <enum-type name="VertexBaseType"/>
- </object-type>
- <!-- 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">
- <enum-type name="AccessType"/>
- <enum-type name="UsageType"/>
- </object-type>
- <object-type name="QComponent"/>
- <object-type name="QEntity">
- <modify-function signature="addComponent(Qt3DCore::QComponent*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGeometry" since="6.0"/>
- <object-type name="QGeometryView" since="6.0">
- <enum-type name="PrimitiveType"/>
- </object-type>
- <object-type name="QJoint" since="5.10">
- <modify-function signature="addChildJoint(Qt3DCore::QJoint*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <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">
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QTransform">
- <!-- Disambiguate from QtGui/qtransform.h -->
- <include file-name="Qt3DCore/qtransform.h" location="global"/>
- </object-type>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt
deleted file mode 100644
index 2e5c56dcd..000000000
--- a/sources/pyside2/PySide2/Qt3DExtras/CMakeLists.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-project(Qt3DExtras)
-
-set(Qt3DExtras_SRC
-${Qt3DExtras_GEN_DIR}/qt3dextras_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qconegeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qconemesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qcuboidgeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qcuboidmesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qcylindergeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qcylindermesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusemapmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusespecularmapmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qextrudedtextgeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qextrudedtextmesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qfirstpersoncameracontroller_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qforwardrenderer_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qgoochmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qmetalroughmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qmorphphongmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusemapmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusemapalphamaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusespecularmapmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qorbitcameracontroller_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qpervertexcolormaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qphongmaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qphongalphamaterial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qplanegeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qplanemesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qskyboxentity_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qspheregeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qspheremesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qtext2dentity_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qtexturematerial_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qtorusgeometry_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qtorusmesh_wrapper.cpp
-${Qt3DExtras_GEN_DIR}/qt3dextras_qt3dwindow_wrapper.cpp
-# module is always needed
-${Qt3DExtras_GEN_DIR}/qt3dextras_module_wrapper.cpp)
-
-if (Qt${QT_MAJOR_VERSION}3DExtras_VERSION VERSION_EQUAL 5.10.0
- OR Qt${QT_MAJOR_VERSION}3DExtras_VERSION VERSION_GREATER 5.10.0)
- list(APPEND Qt3DExtras_SRC
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractcameracontroller_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractcameracontroller_inputstate_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractspritesheet_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusespecularmaterial_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritegrid_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritesheet_wrapper.cpp
- ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritesheetitem_wrapper.cpp)
-endif()
-
-set(Qt3DExtras_include_dirs
- ${Qt3DExtras_SOURCE_DIR}
- ${Qt3DExtras_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_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}
- ${Qt3DCore_GEN_DIR}
- ${Qt3DRender_GEN_DIR})
-
-set(Qt3DExtras_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DExtras_LIBRARIES})
-
-set(Qt3DExtras_deps Qt3DRender)
-
-create_pyside_module(NAME Qt3DExtras
- INCLUDE_DIRS Qt3DExtras_include_dirs
- LIBRARIES Qt3DExtras_libraries
- DEPS Qt3DExtras_deps
- TYPESYSTEM_PATH Qt3DExtras_SOURCE_DIR
- SOURCES Qt3DExtras_SRC
- TYPESYSTEM_NAME ${Qt3DExtras_BINARY_DIR}/typesystem_3dextras.xml)
diff --git a/sources/pyside2/PySide2/Qt3DExtras/typesystem_3dextras.xml b/sources/pyside2/PySide2/Qt3DExtras/typesystem_3dextras.xml
deleted file mode 100644
index 217aea0a2..000000000
--- a/sources/pyside2/PySide2/Qt3DExtras/typesystem_3dextras.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DExtras">
- <load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
- <namespace-type name="Qt3DExtras">
- <object-type name="QAbstractCameraController" since="5.10">
- <value-type name="InputState"/>
- </object-type>
- <object-type name="QAbstractSpriteSheet" since="5.10"/>
- <object-type name="QConeGeometry"/>
- <object-type name="QConeMesh"/>
- <object-type name="QCuboidGeometry"/>
- <object-type name="QCuboidMesh"/>
- <object-type name="QCylinderGeometry"/>
- <object-type name="QCylinderMesh"/>
- <object-type name="QDiffuseMapMaterial"/>
- <object-type name="QDiffuseSpecularMaterial" since="5.10"/>
- <object-type name="QDiffuseSpecularMapMaterial"/>
- <object-type name="QExtrudedTextGeometry"/>
- <object-type name="QExtrudedTextMesh"/>
- <object-type name="QFirstPersonCameraController"/>
- <object-type name="QForwardRenderer"/>
- <object-type name="QGoochMaterial"/>
- <object-type name="QMetalRoughMaterial"/>
- <object-type name="QMorphPhongMaterial"/>
- <object-type name="QNormalDiffuseMapAlphaMaterial"/>
- <object-type name="QNormalDiffuseMapMaterial"/>
- <object-type name="QNormalDiffuseSpecularMapMaterial"/>
- <object-type name="QOrbitCameraController"/>
- <object-type name="QPerVertexColorMaterial"/>
- <object-type name="QPhongMaterial"/>
- <object-type name="QPhongAlphaMaterial"/>
- <object-type name="QPlaneGeometry"/>
- <object-type name="QPlaneMesh"/>
- <object-type name="QSkyboxEntity"/>
- <object-type name="QSphereGeometry"/>
- <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="QText2DEntity"/>
- <object-type name="QTextureMaterial"/>
- <object-type name="QTorusGeometry"/>
- <object-type name="QTorusMesh"/>
- <object-type name="Qt3DWindow"/>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt
deleted file mode 100644
index 8c87b4332..000000000
--- a/sources/pyside2/PySide2/Qt3DInput/CMakeLists.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-project(Qt3DInput)
-
-set(Qt3DInput_SRC
-${Qt3DInput_GEN_DIR}/qt3dinput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qabstractactioninput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qabstractaxisinput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qabstractphysicaldevice_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qaction_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qactioninput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qanalogaxisinput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qaxis_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qaxisaccumulator_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qaxissetting_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qbuttonaxisinput_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qinputaspect_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qinputchord_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qinputsequence_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qinputsettings_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qkeyboardhandler_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qkeyevent_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qlogicaldevice_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qkeyboarddevice_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qmousedevice_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qmouseevent_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qwheelevent_wrapper.cpp
-${Qt3DInput_GEN_DIR}/qt3dinput_qmousehandler_wrapper.cpp
-# module is always needed
-${Qt3DInput_GEN_DIR}/qt3dinput_module_wrapper.cpp)
-
-set(Qt3DInput_include_dirs
- ${Qt3DInput_SOURCE_DIR}
- ${Qt3DInput_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${Qt3DCore_GEN_DIR})
-
-set(Qt3DInput_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DInput_LIBRARIES})
-
-set(Qt3DInput_deps Qt3DCore)
-
-create_pyside_module(NAME Qt3DInput
- INCLUDE_DIRS Qt3DInput_include_dirs
- LIBRARIES Qt3DInput_libraries
- DEPS Qt3DInput_deps
- TYPESYSTEM_PATH Qt3DInput_SOURCE_DIR
- SOURCES Qt3DInput_SRC
- TYPESYSTEM_NAME ${Qt3DInput_BINARY_DIR}/typesystem_3dinput.xml)
diff --git a/sources/pyside2/PySide2/Qt3DInput/typesystem_3dinput.xml b/sources/pyside2/PySide2/Qt3DInput/typesystem_3dinput.xml
deleted file mode 100644
index a74c3ab93..000000000
--- a/sources/pyside2/PySide2/Qt3DInput/typesystem_3dinput.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DInput">
- <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="QActionInput"/>
- <object-type name="QAnalogAxisInput"/>
- <object-type name="QAxis"/>
- <object-type name="QAxisAccumulator">
- <enum-type name="SourceAxisType"/>
- </object-type>
- <object-type name="QAxisSetting"/>
- <object-type name="QButtonAxisInput"/>
- <object-type name="QInputAspect"/>
- <object-type name="QInputChord"/>
- <!-- On windows this raises the following error:
- type 'Qt3DInput::QInputDeviceIntegration' is specified in typesystem, but not defined.
- This could potentially lead to compilation errors.
- <object-type name="QInputDeviceIntegration"/>
- -->
- <object-type name="QInputSequence"/>
- <object-type name="QInputSettings"/>
- <object-type name="QKeyboardDevice"/>
- <object-type name="QKeyboardHandler"/>
- <object-type name="QKeyEvent"/>
- <object-type name="QLogicalDevice"/>
- <object-type name="QMouseDevice">
- <enum-type name="Axis"/>
- </object-type>
- <object-type name="QMouseEvent">
- <enum-type name="Buttons"/>
- <enum-type name="Modifiers"/>
- </object-type>
- <object-type name="QWheelEvent">
- <enum-type name="Buttons"/>
- <enum-type name="Modifiers"/>
- </object-type>
- <object-type name="QMouseHandler"/>
- <!-- On windows this raise the following error:
- qt3dinput_module_wrapper.cpp.obj : error LNK2019:
- unresolved external symbol "void __cdecl init_Qt3DInput_QPhysicalDeviceCreatedChangeBase(struct _object *)"
- (?init_Qt3DInput_QPhysicalDeviceCreatedChangeBase@@YAXPAU_object@@@Z) referenced in function _PyInit_Qt3DInput
- <object-type name="QPhysicalDeviceCreatedChangeBase"/>
- -->
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt
deleted file mode 100644
index 9197c3542..000000000
--- a/sources/pyside2/PySide2/Qt3DLogic/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-project(Qt3DLogic)
-
-set(Qt3DLogic_SRC
-${Qt3DLogic_GEN_DIR}/qt3dlogic_wrapper.cpp
-${Qt3DLogic_GEN_DIR}/qt3dlogic_qframeaction_wrapper.cpp
-${Qt3DLogic_GEN_DIR}/qt3dlogic_qlogicaspect_wrapper.cpp
-# module is always needed
-${Qt3DLogic_GEN_DIR}/qt3dlogic_module_wrapper.cpp)
-
-set(Qt3DLogic_include_dirs
- ${Qt3DLogic_SOURCE_DIR}
- ${Qt3DLogic_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${Qt3DCore_GEN_DIR})
-
-set(Qt3DLogic_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DLogic_LIBRARIES})
-
-set(Qt3DLogic_deps Qt3DCore)
-
-create_pyside_module(NAME Qt3DLogic
- INCLUDE_DIRS Qt3DLogic_include_dirs
- LIBRARIES Qt3DLogic_libraries
- DEPS Qt3DLogic_deps
- TYPESYSTEM_PATH Qt3DLogic_SOURCE_DIR
- SOURCES Qt3DLogic_SRC
- TYPESYSTEM_NAME ${Qt3DLogic_BINARY_DIR}/typesystem_3dlogic.xml)
diff --git a/sources/pyside2/PySide2/Qt3DLogic/typesystem_3dlogic.xml b/sources/pyside2/PySide2/Qt3DLogic/typesystem_3dlogic.xml
deleted file mode 100644
index 1583f9e29..000000000
--- a/sources/pyside2/PySide2/Qt3DLogic/typesystem_3dlogic.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DLogic">
- <load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
- <namespace-type name="Qt3DLogic">
- <object-type name="QFrameAction"/>
- <object-type name="QLogicAspect"/>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt b/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt
deleted file mode 100644
index 208f4df06..000000000
--- a/sources/pyside2/PySide2/Qt3DRender/CMakeLists.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-project(Qt3DRender)
-
-set(Qt3DRender_SRC
-${Qt3DRender_GEN_DIR}/qt3drender_propertyreaderinterface_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qabstractlight_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qabstractraycaster_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qabstracttexture_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qabstracttextureimage_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qalphacoverage_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qalphatest_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qblendequation_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qblendequationarguments_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qblitframebuffer_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qbuffercapture_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qcamera_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qcameralens_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qcameraselector_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qclearbuffers_wrapper.cpp
-${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_qdepthtest_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qdirectionallight_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qdispatchcompute_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qdithering_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qeffect_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qenvironmentlight_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qfilterkey_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qframegraphnode_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qfrontface_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qfrustumculling_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qgeometryrenderer_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qgraphicsapifilter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlayer_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlayerfilter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetail_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetailboundingsphere_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetailswitch_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qlinewidth_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qmaterial_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qmemorybarrier_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qmesh_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qmultisampleantialiasing_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qnodepthmask_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qnodraw_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qnopicking_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qobjectpicker_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpaintedtextureimage_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qparameter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpickevent_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpickingsettings_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpicklineevent_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpickpointevent_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpicktriangleevent_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpointlight_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpointsize_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qpolygonoffset_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qproximityfilter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qraycaster_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qraycasterhit_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrenderaspect_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendercapabilities_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendercapture_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendercapturereply_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrenderpass_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrenderpassfilter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendersettings_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrenderstate_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrenderstateset_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendersurfaceselector_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendertarget_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendertargetoutput_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qrendertargetselector_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qsceneloader_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qscissortest_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qscreenraycaster_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qseamlesscubemap_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qsetfence_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qshaderdata_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qshaderimage_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qshaderprogram_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qshaderprogrambuilder_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qsharedgltexture_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qsortpolicy_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qspotlight_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qstencilmask_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qstenciloperation_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qstenciloperationarguments_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qstenciltest_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qstenciltestarguments_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtechnique_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtechniquefilter_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture1d_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture1darray_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture2d_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture2darray_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture2dmultisample_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture2dmultisamplearray_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexture3d_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturebuffer_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturecubemap_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturecubemaparray_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturedata_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtextureimage_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtextureimagedata_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtextureimagedatagenerator_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtextureloader_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturerectangle_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qtexturewrapmode_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qviewport_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_qwaitfence_wrapper.cpp
-${Qt3DRender_GEN_DIR}/qt3drender_wrapper.cpp
-# module is always needed
-${Qt3DRender_GEN_DIR}/qt3drender_module_wrapper.cpp)
-
-set(Qt3DRender_include_dirs
- ${Qt3DRender_SOURCE_DIR}
- ${Qt3DRender_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
- ${Qt3DCore_GEN_DIR})
-
-set(Qt3DRender_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}3DRender_LIBRARIES})
-
-set(Qt3DRender_deps Qt3DCore QtOpenGL)
-
-create_pyside_module(NAME Qt3DRender
- INCLUDE_DIRS Qt3DRender_include_dirs
- LIBRARIES Qt3DRender_libraries
- DEPS Qt3DRender_deps
- TYPESYSTEM_PATH Qt3DRender_SOURCE_DIR
- SOURCES Qt3DRender_SRC
- TYPESYSTEM_NAME ${Qt3DRender_BINARY_DIR}/typesystem_3drender.xml)
diff --git a/sources/pyside2/PySide2/Qt3DRender/typesystem_3drender.xml b/sources/pyside2/PySide2/Qt3DRender/typesystem_3drender.xml
deleted file mode 100644
index 92c3f2b07..000000000
--- a/sources/pyside2/PySide2/Qt3DRender/typesystem_3drender.xml
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.Qt3DRender">
- <load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
- <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">
- <enum-type name="RunMode"/>
- <enum-type name="FilterMode"/>
- </object-type>
- <object-type name="QAbstractTexture">
- <enum-type name="CubeMapFace"/>
- <enum-type name="ComparisonFunction"/>
- <enum-type name="ComparisonMode"/>
- <enum-type name="HandleType" since="5.13"/>
- <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="QAlphaCoverage"/>
- <object-type name="QAlphaTest">
- <enum-type name="AlphaFunction"/>
- </object-type>
- <object-type name="QBlendEquation">
- <enum-type name="BlendFunction"/>
- </object-type>
- <object-type name="QBlendEquationArguments">
- <enum-type name="Blending"/>
- </object-type>
- <object-type name="QBlitFramebuffer" since="5.10">
- <enum-type name="InterpolationMethod"/>
- </object-type>
- <object-type name="QBufferCapture"/>
- <object-type name="QCamera">
- <enum-type name="CameraTranslationOption"/>
- </object-type>
- <object-type name="QCameraLens">
- <enum-type name="ProjectionType"/>
- </object-type>
- <object-type name="QCameraSelector"/>
- <object-type name="QClearBuffers">
- <enum-type name="BufferType" flags="BufferTypeFlags"/>
- </object-type>
- <object-type name="QClipPlane"/>
- <object-type name="QColorMask"/>
- <object-type name="QComputeCommand">
- <enum-type name="RunType" since="5.13"/>
- </object-type>
- <object-type name="QCullFace">
- <enum-type name="CullingMode"/>
- </object-type>
- <object-type name="QDepthTest">
- <enum-type name="DepthFunction"/>
- </object-type>
- <object-type name="QDirectionalLight"/>
- <object-type name="QDispatchCompute"/>
- <object-type name="QDithering"/>
- <object-type name="QEffect"/>
- <object-type name="QEnvironmentLight"/>
- <object-type name="QFilterKey"/>
- <object-type name="QFrameGraphNode"/>
- <object-type name="QFrontFace">
- <enum-type name="WindingDirection"/>
- </object-type>
- <object-type name="QFrustumCulling"/>
- <object-type name="QGeometryRenderer">
- <enum-type name="PrimitiveType"/>
- </object-type>
- <object-type name="QGraphicsApiFilter">
- <enum-type name="Api"/>
- <enum-type name="OpenGLProfile"/>
- </object-type>
- <object-type name="QLayer"/>
- <object-type name="QLayerFilter">
- <enum-type name="FilterMode"/>
- </object-type>
- <object-type name="QLevelOfDetail">
- <enum-type name="ThresholdType"/>
- </object-type>
- <object-type name="QLevelOfDetailBoundingSphere"/>
- <object-type name="QLevelOfDetailSwitch"/>
- <object-type name="QLineWidth" since="5.10"/>
- <object-type name="QMaterial"/>
- <object-type name="QMemoryBarrier">
- <enum-type name="Operation" flags="Operations"/>
- </object-type>
- <object-type name="QMesh">
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QMultiSampleAntiAliasing"/>
- <object-type name="QNoDepthMask"/>
- <object-type name="QNoDraw"/>
- <object-type name="QNoPicking" since="5.14"/>
- <object-type name="QObjectPicker"/>
- <object-type name="QPaintedTextureImage"/>
- <object-type name="QParameter"/>
- <object-type name="QPickEvent">
- <enum-type name="Buttons"/>
- <enum-type name="Modifiers"/>
- </object-type>
- <object-type name="QPickLineEvent" since="5.10"/>
- <object-type name="QPickPointEvent" since="5.10"/>
- <object-type name="QPickTriangleEvent"/>
- <object-type name="QPickingSettings">
- <enum-type name="FaceOrientationPickingMode"/>
- <enum-type name="PickMethod"/>
- <enum-type name="PickResultMode"/>
- </object-type>
- <object-type name="QPointLight"/>
- <object-type name="QPointSize">
- <enum-type name="SizeMode"/>
- </object-type>
- <object-type name="QPolygonOffset"/>
- <object-type name="QProximityFilter" since="5.10"/>
- <object-type name="QRayCaster" since="5.11"/>
- <value-type name="QRayCasterHit" since="5.11">
- <enum-type name="HitType"/>
- </value-type>
- <object-type name="QRenderAspect">
- <enum-type name="SubmissionType"/>
- </object-type>
- <object-type name="QRenderCapabilities" since="5.15">
- <enum-type name="API"/>
- <enum-type name="Profile"/>
- </object-type>
- <object-type name="QRenderCapture"/>
- <object-type name="QRenderCaptureReply"/>
- <object-type name="QRenderPass"/>
- <object-type name="QRenderPassFilter"/>
- <object-type name="QRenderSettings">
- <enum-type name="RenderPolicy"/>
- </object-type>
- <object-type name="QRenderState"/>
- <object-type name="QRenderStateSet"/>
- <object-type name="QRenderSurfaceSelector"/>
- <object-type name="QRenderTarget"/>
- <object-type name="QRenderTargetOutput">
- <enum-type name="AttachmentPoint"/>
- </object-type>
- <object-type name="QRenderTargetSelector"/>
- <object-type name="QSceneLoader">
- <enum-type name="Status"/>
- <enum-type name="ComponentType"/>
- </object-type>
- <object-type name="QScissorTest"/>
- <object-type name="QScreenRayCaster" since="5.11"/>
- <object-type name="QSeamlessCubemap"/>
- <object-type name="QSetFence" since="5.13">
- <enum-type name="HandleType"/>
- </object-type>
- <object-type name="QShaderData"/>
- <object-type name="QShaderProgram">
- <enum-type name="Format"/>
- <enum-type name="ShaderType"/>
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QShaderImage" since="5.14">
- <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="QSortPolicy">
- <enum-type name="SortType"/>
- </object-type>
- <object-type name="QSpotLight"/>
- <object-type name="QStencilMask"/>
- <object-type name="QStencilOperation"/>
- <object-type name="QStencilOperationArguments">
- <enum-type name="FaceMode"/>
- <enum-type name="Operation"/>
- </object-type>
- <object-type name="QStencilTest"/>
- <object-type name="QStencilTestArguments">
- <enum-type name="StencilFaceMode"/>
- <enum-type name="StencilFunction"/>
- </object-type>
- <object-type name="QTechnique"/>
- <object-type name="QTechniqueFilter"/>
- <object-type name="QTexture1D"/>
- <object-type name="QTexture1DArray"/>
- <object-type name="QTexture2D"/>
- <object-type name="QTexture2DArray"/>
- <object-type name="QTexture2DMultisample"/>
- <object-type name="QTexture2DMultisampleArray"/>
- <object-type name="QTexture3D"/>
- <object-type name="QTextureBuffer"/>
- <object-type name="QTextureCubeMap"/>
- <object-type name="QTextureCubeMapArray"/>
- <object-type name="QTextureData"/>
- <object-type name="QTextureImage">
- <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="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">
- <enum-type name="HandleType"/>
- </object-type>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt b/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
deleted file mode 100644
index 8f8f5d4d1..000000000
--- a/sources/pyside2/PySide2/QtAxContainer/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-project(QtAxContainer)
-
-set(QtAxContainer_SRC
-${QtAxContainer_GEN_DIR}/qaxbase_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxbaseobject_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxbasewidget_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxobject_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxobjectinterface_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxscript_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxscriptengine_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxscriptmanager_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxselect_wrapper.cpp
-${QtAxContainer_GEN_DIR}/qaxwidget_wrapper.cpp
-# module is always needed
-${QtAxContainer_GEN_DIR}/qtaxcontainer_module_wrapper.cpp)
-
-configure_file("${QtAxContainer_SOURCE_DIR}/QtAxContainer_global.post.h.in"
- "${QtAxContainer_BINARY_DIR}/QtAxContainer_global.post.h" @ONLY)
-
-set(QtAxContainer_include_dirs
- ${QtAxContainer_SOURCE_DIR}
- ${QtAxContainer_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR})
-
-set(QtAxContainer_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}AxContainer_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}AxBase_LIBRARIES})
-
-set(QtAxContainer_deps QtWidgets)
-
-create_pyside_module(NAME QtAxContainer
- INCLUDE_DIRS QtAxContainer_include_dirs
- LIBRARIES QtAxContainer_libraries
- DEPS QtAxContainer_deps
- TYPESYSTEM_PATH QtAxContainer_SOURCE_DIR
- SOURCES QtAxContainer_SRC
- TYPESYSTEM_NAME ${QtAxContainer_BINARY_DIR}/typesystem_axcontainer.xml)
diff --git a/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml b/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
deleted file mode 100644
index 03977fcbf..000000000
--- a/sources/pyside2/PySide2/QtAxContainer/typesystem_axcontainer.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.QtAxContainer">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
- <rejection class="*" function-name="connectNotify"/>
- <rejection class="*" function-name="queryInterface"/>
- <rejection class="*" function-name="qt_metacall"/>
- <rejection class="*" function-name="qt_static_metacall"/>
-
- <object-type name="QAxBase"/>
- <object-type name="QAxBaseObject"/>
- <object-type name="QAxObject"/>
- <object-type name="QAxObjectInterface"/>
- <object-type name="QAxScript">
- <enum-type name="FunctionFlags"/>
- </object-type>
- <object-type name="QAxScriptEngine">
- <enum-type name="State"/>
- </object-type>
- <object-type name="QAxScriptManager">
- <!-- Ax Servers only -->
- <modify-function signature="addObject(QObject*)" remove="all"/>
- </object-type>
- <object-type name="QAxBaseWidget"/>
- <object-type name="QAxSelect">
- <enum-type name="SandboxingLevel"/>
- </object-type>
- <object-type name="QAxWidget"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt b/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
deleted file mode 100644
index f73a28b7d..000000000
--- a/sources/pyside2/PySide2/QtCharts/CMakeLists.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-project(QtCharts)
-
-set(QtCharts_SRC
-${QtCharts_GEN_DIR}/qtcharts_qabstractaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qabstractbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qabstractseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qarealegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qareaseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qbarcategoryaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qbarlegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qbarmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qbarset_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qboxplotlegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qboxplotmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qboxplotseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qboxset_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qcandlesticklegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qcandlestickmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qcandlestickseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qcandlestickset_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qcategoryaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qchart_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qchartview_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qdatetimeaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhbarmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhboxplotmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhcandlestickmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhorizontalbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhorizontalpercentbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhorizontalstackedbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhpiemodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qhxymodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qlegend_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qlegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qlineseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qlogvalueaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpercentbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpielegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpiemodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpieseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpieslice_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qpolarchart_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qscatterseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qsplineseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qstackedbarseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvalueaxis_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvbarmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvboxplotmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvcandlestickmodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvpiemodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qvxymodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qxylegendmarker_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qxymodelmapper_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_qxyseries_wrapper.cpp
-${QtCharts_GEN_DIR}/qtcharts_wrapper.cpp
-# module is always needed
-${QtCharts_GEN_DIR}/qtcharts_module_wrapper.cpp
-)
-
-set(QtCharts_include_dirs ${QtCharts_SOURCE_DIR}
- ${QtCharts_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Charts_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR})
-
-set(QtCharts_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Charts_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
-
-set(QtCharts_deps QtCore QtGui QtWidgets)
-
-create_pyside_module(NAME QtCharts
- INCLUDE_DIRS QtCharts_include_dirs
- LIBRARIES QtCharts_libraries
- DEPS QtCharts_deps
- TYPESYSTEM_PATH QtCharts_SOURCE_DIR
- SOURCES QtCharts_SRC)
diff --git a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml b/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
deleted file mode 100644
index 8ab734704..000000000
--- a/sources/pyside2/PySide2/QtCharts/typesystem_charts.xml
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCharts">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
- <!-- PYSIDE-1101 Removing inherited method to avoid argument conflict
- on the QChart::scroll overload -->
- <rejection class="QGraphicsItem" function-name="scroll"/>
- <namespace-type name="QtCharts">
- <object-type name="QAbstractAxis" since="5.7">
- <enum-type name="AxisType"/>
- </object-type>
- <object-type name="QAbstractBarSeries" since="5.7">
- <enum-type name="LabelsPosition"/>
- <modify-function signature="append(QtCharts::QBarSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="append(QList&lt;QtCharts::QBarSet*&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insert(int,QtCharts::QBarSet*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="take(QtCharts::QBarSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAbstractSeries" since="5.7">
- <enum-type name="SeriesType"/>
- </object-type>
- <object-type name="QAreaLegendMarker" since="5.7"/>
- <object-type name="QAreaSeries" since="5.7">
- <modify-function signature="setUpperSeries(QtCharts::QLineSeries*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setLowerSeries(QtCharts::QLineSeries*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QBarCategoryAxis" since="5.7"/>
- <object-type name="QBarLegendMarker" since="5.7"/>
- <object-type name="QBarModelMapper" since="5.7"/>
- <object-type name="QBarSeries" since="5.7"/>
- <object-type name="QBarSet" since="5.7"/>
- <object-type name="QBoxPlotLegendMarker" since="5.7"/>
- <object-type name="QBoxPlotModelMapper" since="5.7"/>
- <object-type name="QBoxPlotSeries" since="5.7">
- <modify-function signature="append(QtCharts::QBoxSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="append(QList&lt;QtCharts::QBoxSet*&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insert(int,QtCharts::QBoxSet*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="take(QtCharts::QBoxSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QBoxSet" since="5.7">
- <enum-type name="ValuePositions"/>
- </object-type>
- <object-type name="QCandlestickLegendMarker" since="5.7"/>
- <object-type name="QCandlestickModelMapper" since="5.7"/>
- <object-type name="QCandlestickSeries" since="5.7">
- <modify-function signature="append(QtCharts::QCandlestickSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="append(QList&lt;QtCharts::QCandlestickSet*&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insert(int,QtCharts::QCandlestickSet*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="take(QtCharts::QCandlestickSet*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QCandlestickSet" since="5.7"/>
- <object-type name="QCategoryAxis" since="5.7">
- <enum-type name="AxisLabelsPosition"/>
- </object-type>
- <object-type name="QChart" since="5.7">
- <enum-type name="ChartType"/>
- <enum-type name="ChartTheme"/>
- <enum-type name="AnimationOption" flags="AnimationOptions"/>
- <modify-function signature="addAxis(QtCharts::QAbstractAxis*,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addSeries(QtCharts::QAbstractSeries*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisX(QtCharts::QAbstractAxis*,QtCharts::QAbstractSeries*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisY(QtCharts::QAbstractAxis*,QtCharts::QAbstractSeries*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeAxis(QtCharts::QAbstractAxis*)">
- <inject-code file="../glue/qtcharts.cpp" snippet="qchart-releaseownership"/>
- </modify-function>
- <modify-function signature="removeSeries(QtCharts::QAbstractSeries*)">
- <inject-code file="../glue/qtcharts.cpp" snippet="qchart-releaseownership"/>
- </modify-function>
- </object-type>
- <object-type name="QChartView" since="5.7">
- <enum-type name="RubberBand" flags="RubberBands"/>
- <modify-function signature="QChartView(QtCharts::QChart*,QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setChart(QtCharts::QChart*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QDateTimeAxis" since="5.7"/>
- <object-type name="QHBarModelMapper" since="5.7"/>
- <object-type name="QHBoxPlotModelMapper" since="5.7"/>
- <object-type name="QHCandlestickModelMapper" since="5.7"/>
- <object-type name="QHorizontalBarSeries" since="5.7"/>
- <object-type name="QHorizontalPercentBarSeries" since="5.7"/>
- <object-type name="QHorizontalStackedBarSeries" since="5.7"/>
- <object-type name="QHPieModelMapper" since="5.7"/>
- <object-type name="QHXYModelMapper" since="5.7"/>
- <object-type name="QLegend" since="5.7">
- <enum-type name="MarkerShape"/>
- </object-type>
- <object-type name="QLegendMarker" since="5.7">
- <enum-type name="LegendMarkerType"/>
- </object-type>
- <object-type name="QLineSeries" since="5.7"/>
- <object-type name="QLogValueAxis" since="5.7"/>
- <object-type name="QPercentBarSeries" since="5.7"/>
- <object-type name="QPieLegendMarker" since="5.7"/>
- <object-type name="QPieModelMapper" since="5.7"/>
- <object-type name="QPieSlice" since="5.7">
- <enum-type name="LabelPosition"/>
- </object-type>
- <object-type name="QPieSeries" since="5.7">
- <modify-function signature="append(QtCharts::QPieSlice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="append(QList&lt;QtCharts::QPieSlice*&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insert(int,QtCharts::QPieSlice*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="take(QtCharts::QPieSlice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QPolarChart" since="5.7">
- <enum-type name="PolarOrientation" flags="PolarOrientations"/>
- <modify-function signature="addAxis(QtCharts::QAbstractAxis*,QtCharts::QPolarChart::PolarOrientation)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!-- Compile error assigning default flags value -->
- <modify-function signature="axes(QFlags&lt;QtCharts::QPolarChart::PolarOrientation&gt;,QtCharts::QAbstractSeries*)const" remove="all"/>
- </object-type>
- <object-type name="QScatterSeries" since="5.7">
- <enum-type name="MarkerShape"/>
- </object-type>
- <object-type name="QSplineSeries" since="5.7"/>
- <object-type name="QStackedBarSeries" since="5.7"/>
- <object-type name="QValueAxis" since="5.7">
- <enum-type name="TickType"/>
- </object-type>
- <object-type name="QVBarModelMapper" since="5.7"/>
- <object-type name="QVBoxPlotModelMapper" since="5.7"/>
- <object-type name="QVCandlestickModelMapper" since="5.7"/>
- <object-type name="QVPieModelMapper" since="5.7"/>
- <object-type name="QVXYModelMapper" since="5.7"/>
- <object-type name="QXYLegendMarker" since="5.7"/>
- <object-type name="QXYModelMapper" since="5.7"/>
- <object-type name="QXYSeries" since="5.7"/>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt b/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
deleted file mode 100644
index a6e8cd202..000000000
--- a/sources/pyside2/PySide2/QtConcurrent/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-project(QtConcurrent)
-
-set(QtConcurrent_SRC
-${QtConcurrent_GEN_DIR}/qtconcurrent_wrapper.cpp
-${QtConcurrent_GEN_DIR}/qfuturevoid_wrapper.cpp
-${QtConcurrent_GEN_DIR}/qfutureqstring_wrapper.cpp
-${QtConcurrent_GEN_DIR}/qfuturewatchervoid_wrapper.cpp
-${QtConcurrent_GEN_DIR}/qfuturewatcherqstring_wrapper.cpp
-# module is always needed
-${QtConcurrent_GEN_DIR}/qtconcurrent_module_wrapper.cpp
-)
-
-set(QtConcurrent_include_dirs ${QtConcurrent_SOURCE_DIR}
- ${QtConcurrent_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Concurrent_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtConcurrent_libraries pyside2
- ${QtConcurrent_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtConcurrent_deps QtCore)
-
-create_pyside_module(NAME QtConcurrent
- INCLUDE_DIRS QtConcurrent_include_dirs
- LIBRARIES QtConcurrent_libraries
- DEPS QtConcurrent_deps
- TYPESYSTEM_PATH QtConcurrent_SOURCE_DIR
- SOURCES QtConcurrent_SRC)
diff --git a/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml b/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml
deleted file mode 100644
index ea34150cd..000000000
--- a/sources/pyside2/PySide2/QtConcurrent/typesystem_concurrent.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtConcurrent">
- <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="ReduceOption" flags="ReduceOptions"/>
- <enum-type name="ThreadFunctionResult"/>
- <extra-includes>
- <include file-name="qtconcurrentreducekernel.h" location="global"/>
- <include file-name="qtconcurrentthreadengine.h" location="global"/>
- </extra-includes>
- </namespace-type>
-
- <typedef-type name="QFutureVoid" source="QFuture&lt;void&gt;" disable-wrapper="yes">
- <include file-name="QtCore/qfuture.h" location="global"/>
- <modify-function signature="isResultReadyAt(int) const" remove="all"/>
- </typedef-type>
- <typedef-type name="QFutureQString" source="QFuture&lt;QString&gt;" disable-wrapper="yes">
- <include file-name="QtCore/qfuture.h" location="global"/>
- </typedef-type>
- <typedef-type name="QFutureWatcherVoid" source="QFutureWatcher&lt;void&gt;">
- <include file-name="QtCore/qfuturewatcher.h" location="global"/>
- </typedef-type>
- <typedef-type name="QFutureWatcherQString" source="QFutureWatcher&lt;QString&gt;">
- <include file-name="QtCore/qfuturewatcher.h" location="global"/>
- </typedef-type>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
deleted file mode 100644
index 31c1db0ee..000000000
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ /dev/null
@@ -1,208 +0,0 @@
-project(QtCore)
-
-set(QtCore_gluecode "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp")
-
-if(ENABLE_WIN)
- set(SPECIFIC_OS_FILES
- ${QtCore_GEN_DIR}/qwineventnotifier_wrapper.cpp
- )
-else()
- set(SPECIFIC_OS_FILES "")
-endif()
-
-set(QtCore_SRC
-${QtCore_GEN_DIR}/qabstractanimation_wrapper.cpp
-${QtCore_GEN_DIR}/qabstracteventdispatcher_timerinfo_wrapper.cpp
-${QtCore_GEN_DIR}/qabstracteventdispatcher_wrapper.cpp
-${QtCore_GEN_DIR}/qabstractitemmodel_wrapper.cpp
-${QtCore_GEN_DIR}/qabstractlistmodel_wrapper.cpp
-${QtCore_GEN_DIR}/qabstractnativeeventfilter_wrapper.cpp
-${QtCore_GEN_DIR}/qabstractproxymodel_wrapper.cpp
-${QtCore_GEN_DIR}/qabstracttablemodel_wrapper.cpp
-${QtCore_GEN_DIR}/qanimationgroup_wrapper.cpp
-${QtCore_GEN_DIR}/qbasicmutex_wrapper.cpp
-${QtCore_GEN_DIR}/qbasictimer_wrapper.cpp
-${QtCore_GEN_DIR}/qbitarray_wrapper.cpp
-${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_yearmonthday_wrapper.cpp
-${QtCore_GEN_DIR}/qcborarray_wrapper.cpp
-${QtCore_GEN_DIR}/qcborerror_wrapper.cpp
-${QtCore_GEN_DIR}/qcbormap_wrapper.cpp
-${QtCore_GEN_DIR}/qcborparsererror_wrapper.cpp
-${QtCore_GEN_DIR}/qcborstreamreader_wrapper.cpp
-${QtCore_GEN_DIR}/qcborstreamwriter_wrapper.cpp
-${QtCore_GEN_DIR}/qcborstringresultbytearray_wrapper.cpp
-${QtCore_GEN_DIR}/qcborstringresultstring_wrapper.cpp
-${QtCore_GEN_DIR}/qcborvalue_wrapper.cpp
-${QtCore_GEN_DIR}/qchildevent_wrapper.cpp
-${QtCore_GEN_DIR}/qcollator_wrapper.cpp
-${QtCore_GEN_DIR}/qcollatorsortkey_wrapper.cpp
-${QtCore_GEN_DIR}/qcommandlineoption_wrapper.cpp
-${QtCore_GEN_DIR}/qcommandlineparser_wrapper.cpp
-${QtCore_GEN_DIR}/qconcatenatetablesproxymodel_wrapper.cpp
-${QtCore_GEN_DIR}/qcoreapplication_wrapper.cpp
-${QtCore_GEN_DIR}/qcryptographichash_wrapper.cpp
-${QtCore_GEN_DIR}/qdatastream_wrapper.cpp
-${QtCore_GEN_DIR}/qdate_wrapper.cpp
-${QtCore_GEN_DIR}/qdatetime_wrapper.cpp
-${QtCore_GEN_DIR}/qdeadlinetimer_wrapper.cpp
-${QtCore_GEN_DIR}/qdir_wrapper.cpp
-${QtCore_GEN_DIR}/qdiriterator_wrapper.cpp
-${QtCore_GEN_DIR}/qdynamicpropertychangeevent_wrapper.cpp
-${QtCore_GEN_DIR}/qeasingcurve_wrapper.cpp
-${QtCore_GEN_DIR}/qelapsedtimer_wrapper.cpp
-${QtCore_GEN_DIR}/qevent_wrapper.cpp
-${QtCore_GEN_DIR}/qeventloop_wrapper.cpp
-${QtCore_GEN_DIR}/qfactoryinterface_wrapper.cpp
-${QtCore_GEN_DIR}/qfile_wrapper.cpp
-${QtCore_GEN_DIR}/qfiledevice_wrapper.cpp
-${QtCore_GEN_DIR}/qfileinfo_wrapper.cpp
-${QtCore_GEN_DIR}/qfileselector_wrapper.cpp
-${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}/qidentityproxymodel_wrapper.cpp
-${QtCore_GEN_DIR}/qiodevice_wrapper.cpp
-${QtCore_GEN_DIR}/qiodevicebase_wrapper.cpp
-${QtCore_GEN_DIR}/qitemselection_wrapper.cpp
-${QtCore_GEN_DIR}/qitemselectionmodel_wrapper.cpp
-${QtCore_GEN_DIR}/qitemselectionrange_wrapper.cpp
-${QtCore_GEN_DIR}/qjsonarray_wrapper.cpp
-${QtCore_GEN_DIR}/qjsondocument_wrapper.cpp
-${QtCore_GEN_DIR}/qjsonparseerror_wrapper.cpp
-${QtCore_GEN_DIR}/qjsonvalue_wrapper.cpp
-${QtCore_GEN_DIR}/qlibraryinfo_wrapper.cpp
-${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}/qmargins_wrapper.cpp
-${QtCore_GEN_DIR}/qmarginsf_wrapper.cpp
-${QtCore_GEN_DIR}/qmessageauthenticationcode_wrapper.cpp
-${QtCore_GEN_DIR}/qmessagelogcontext_wrapper.cpp
-${QtCore_GEN_DIR}/qmetaclassinfo_wrapper.cpp
-${QtCore_GEN_DIR}/qmetaenum_wrapper.cpp
-${QtCore_GEN_DIR}/qmetamethod_wrapper.cpp
-${QtCore_GEN_DIR}/qmetaobject_connection_wrapper.cpp
-${QtCore_GEN_DIR}/qmetaobject_wrapper.cpp
-${QtCore_GEN_DIR}/qmetaproperty_wrapper.cpp
-${QtCore_GEN_DIR}/qmimedata_wrapper.cpp
-${QtCore_GEN_DIR}/qmimedatabase_wrapper.cpp
-${QtCore_GEN_DIR}/qmimetype_wrapper.cpp
-${QtCore_GEN_DIR}/qmodelindex_wrapper.cpp
-${QtCore_GEN_DIR}/qmutex_wrapper.cpp
-${QtCore_GEN_DIR}/qobject_wrapper.cpp
-${QtCore_GEN_DIR}/qoperatingsystemversion_wrapper.cpp
-${QtCore_GEN_DIR}/qparallelanimationgroup_wrapper.cpp
-${QtCore_GEN_DIR}/qpauseanimation_wrapper.cpp
-${QtCore_GEN_DIR}/qpersistentmodelindex_wrapper.cpp
-${QtCore_GEN_DIR}/qpluginloader_wrapper.cpp
-${QtCore_GEN_DIR}/qpoint_wrapper.cpp
-${QtCore_GEN_DIR}/qpointf_wrapper.cpp
-${QtCore_GEN_DIR}/qprocess_wrapper.cpp
-${QtCore_GEN_DIR}/qprocessenvironment_wrapper.cpp
-${QtCore_GEN_DIR}/qpropertyanimation_wrapper.cpp
-${QtCore_GEN_DIR}/qrandomgenerator64_wrapper.cpp
-${QtCore_GEN_DIR}/qrandomgenerator_wrapper.cpp
-${QtCore_GEN_DIR}/qreadlocker_wrapper.cpp
-${QtCore_GEN_DIR}/qreadwritelock_wrapper.cpp
-${QtCore_GEN_DIR}/qrect_wrapper.cpp
-${QtCore_GEN_DIR}/qrectf_wrapper.cpp
-${QtCore_GEN_DIR}/qrecursivemutex_wrapper.cpp
-${QtCore_GEN_DIR}/qregularexpression_wrapper.cpp
-${QtCore_GEN_DIR}/qregularexpressionmatch_wrapper.cpp
-${QtCore_GEN_DIR}/qregularexpressionmatchiterator_wrapper.cpp
-${QtCore_GEN_DIR}/qresource_wrapper.cpp
-${QtCore_GEN_DIR}/qrunnable_wrapper.cpp
-${QtCore_GEN_DIR}/qsavefile_wrapper.cpp
-${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}/qsignalblocker_wrapper.cpp
-${QtCore_GEN_DIR}/qsignalmapper_wrapper.cpp
-${QtCore_GEN_DIR}/qsize_wrapper.cpp
-${QtCore_GEN_DIR}/qsizef_wrapper.cpp
-${QtCore_GEN_DIR}/qsocketdescriptor_wrapper.cpp
-${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}/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_qmutexlocker_wrapper.cpp
-${QtCore_GEN_DIR}/qtemporarydir_wrapper.cpp
-${QtCore_GEN_DIR}/qtemporaryfile_wrapper.cpp
-${QtCore_GEN_DIR}/qtextboundaryfinder_wrapper.cpp
-${QtCore_GEN_DIR}/qtextstream_wrapper.cpp
-${QtCore_GEN_DIR}/qtextstreammanipulator_wrapper.cpp
-${QtCore_GEN_DIR}/qthread_wrapper.cpp
-${QtCore_GEN_DIR}/qthreadpool_wrapper.cpp
-${QtCore_GEN_DIR}/qtime_wrapper.cpp
-${QtCore_GEN_DIR}/qtimeline_wrapper.cpp
-${QtCore_GEN_DIR}/qtimer_wrapper.cpp
-${QtCore_GEN_DIR}/qtimerevent_wrapper.cpp
-${QtCore_GEN_DIR}/qtimezone_offsetdata_wrapper.cpp
-${QtCore_GEN_DIR}/qtimezone_wrapper.cpp
-${QtCore_GEN_DIR}/qtranslator_wrapper.cpp
-${QtCore_GEN_DIR}/qtransposeproxymodel_wrapper.cpp
-${QtCore_GEN_DIR}/qurl_wrapper.cpp
-${QtCore_GEN_DIR}/qurlquery_wrapper.cpp
-${QtCore_GEN_DIR}/quuid_wrapper.cpp
-${QtCore_GEN_DIR}/qvariantanimation_wrapper.cpp
-${QtCore_GEN_DIR}/qversionnumber_wrapper.cpp
-${QtCore_GEN_DIR}/qwaitcondition_wrapper.cpp
-${QtCore_GEN_DIR}/qwritelocker_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamattribute_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamattributes_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamentitydeclaration_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamentityresolver_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamnamespacedeclaration_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamnotationdeclaration_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamreader_wrapper.cpp
-${QtCore_GEN_DIR}/qxmlstreamwriter_wrapper.cpp
-
-${SPECIFIC_OS_FILES}
-# module is always needed
-${QtCore_GEN_DIR}/qtcore_module_wrapper.cpp
-)
-
-configure_file("${QtCore_SOURCE_DIR}/QtCore_global.post.h.in"
- "${QtCore_BINARY_DIR}/QtCore_global.post.h" @ONLY)
-
-set(QtCore_glue_sources
- "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp"
- "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.h"
-)
-
-configure_file("${QtCore_SOURCE_DIR}/typesystem_core.xml.in"
- "${QtCore_BINARY_DIR}/typesystem_core.xml" @ONLY)
-
-set(QtCore_include_dirs ${QtCore_SOURCE_DIR}
- ${QtCore_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${pyside2_SOURCE_DIR}
- ${libpyside_SOURCE_DIR}
- )
-set(QtCore_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-
-create_pyside_module(NAME QtCore
- INCLUDE_DIRS QtCore_include_dirs
- LIBRARIES QtCore_libraries
- TYPESYSTEM_PATH QtCore_SOURCE_DIR
- SOURCES QtCore_SRC
- STATIC_SOURCES QtCore_gluecode
- TYPESYSTEM_NAME ${QtCore_BINARY_DIR}/typesystem_core.xml
- GLUE_SOURCES QtCore_glue_sources
- )
-
-install(FILES ${pyside2_SOURCE_DIR}/qtcorehelper.h DESTINATION include/PySide2/QtCore/)
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core.xml.in b/sources/pyside2/PySide2/QtCore/typesystem_core.xml.in
deleted file mode 100644
index 8be5bba4e..000000000
--- a/sources/pyside2/PySide2/QtCore/typesystem_core.xml.in
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCore">
- <load-typesystem name="QtCore/typesystem_core_@AUTO_OS@.xml" generate="yes"/>
- <load-typesystem name="QtCore/typesystem_core_common.xml" generate="yes"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
deleted file mode 100644
index 0c24511a3..000000000
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ /dev/null
@@ -1,3022 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCore">
- <load-typesystem name="templates/core_common.xml" generate="no"/>
-
- <custom-type name="str"/>
- <custom-type name="PyBytes"/>
- <custom-type name="PyByteArray"/>
- <custom-type name="PyCallable"/>
- <custom-type name="PyObject"/>
- <custom-type name="PySequence"/>
- <custom-type name="PyTypeObject"/>
- <custom-type name="PyUnicode"/>
- <custom-type name="list of QAbstractAnimation"/>
-<!--
- <function signature="qChecksum(QByteArrayView data, Qt::ChecksumType)"/>
--->
- <function signature="qFastCos(qreal)" since="4.6"/>
- <function signature="qFastSin(qreal)" since="4.6"/>
- <function signature="qFuzzyCompare(double,double)"/>
- <function signature="qFuzzyIsNull(double)" since="4.6"/>
- <function signature="qIsFinite(double)"/>
- <function signature="qIsInf(double)"/>
- <function signature="qIsNaN(double)"/>
- <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;)"/>
-
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="include-pyside"/>
-
-
- <add-function signature="qDebug(const char*)">
- <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
- </add-function>
- <add-function signature="qCritical(const char*)">
- <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
- </add-function>
- <add-function signature="qFatal(const char*)">
- <inject-code file="../glue/qtcore.cpp" snippet="qfatal"/>
- </add-function>
- <add-function signature="qWarning(const char*)">
- <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
- </add-function>
-
- <!-- TODO: We do not support void* or const void* as arg -->
- <rejection class="QMetaObject" function-name="activate"/>
- <rejection class="QMetaObject" function-name="metacall"/>
- <rejection class="QMetaObject" function-name="static_metacall"/>
- <!-- TODO: Support to addGuard(QObject**) -->
- <rejection class="QMetaObject" function-name="addGuard"/>
- <rejection class="QMetaObject" function-name="changeGuard"/>
- <rejection class="QMetaObject" function-name="removeGuard"/>
-
- <rejection class="QAlgorithmsPrivate"/>
- <rejection class="QJsonPrivate"/>
- <rejection class="QTextStreamFunctions"/>
- <rejection class="QtGlobalStatic"/>
- <rejection class="QtMetaTypePrivate"/>
- <rejection class="QtPrivate"/>
- <rejection class="QtSharedPointer"/>
- <rejection class="QtStringBuilder"/>
- <rejection class="std"/>
-
- <rejection class="QByteArray" field-name="MaxSize"/>
- <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="trUtf8"/>
- <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="*" argument-type="QByteArrayDataPtr"/>
- <rejection class="*" argument-type="^qfloat16&amp;?$"/>
- <rejection class="*" argument-type="QHashData"/>
- <rejection class="*" argument-type="QHashData::Node*"/>
- <rejection class="*" argument-type="QLatin1String"/>
- <rejection class="*" argument-type="QLinkedListData*"/>
- <rejection class="*" argument-type="QListData::ArrayCompatibleLayout"/>
- <rejection class="*" argument-type="QListData::Data*"/>
- <rejection class="*" argument-type="QListData::NotArrayCompatibleLayout"/>
- <rejection class="*" argument-type="QList::Node*"/>
- <rejection class="*" argument-type="QTSMFI"/>
- <rejection class="*" argument-type="QTSMFC"/>
- <rejection class="*" argument-type="QMutexData*"/>
- <rejection class="*" argument-type="QObjectUserData*"/>
- <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"/>
-
- <primitive-type name="qint8"/>
- <primitive-type name="qint16"/>
- <primitive-type name="qint32"/>
- <primitive-type name="quint8"/>
- <primitive-type name="quint16"/>
- <primitive-type name="quint32"/>
- <primitive-type name="quint64"/>
- <primitive-type name="double"/>
- <primitive-type name="qreal"/>
- <primitive-type name="float"/>
- <primitive-type name="qint64"/>
- <primitive-type name="unsigned long long"/>
- <primitive-type name="long long"/>
- <primitive-type name="qlonglong" target-lang-api-name="PyLong"/>
- <primitive-type name="qulonglong" target-lang-api-name="PyLong"/>
- <primitive-type name="qsizetype" target-lang-api-name="PyLong"/>
- <primitive-type name="size_t" target-lang-api-name="PyLong"/>
- <primitive-type name="short"/>
- <primitive-type name="signed short"/>
- <primitive-type name="signed short int"/>
- <primitive-type name="ushort" target-lang-api-name="PyInt"/>
- <primitive-type name="unsigned short int"/>
- <primitive-type name="unsigned short"/>
- <primitive-type name="char"/>
- <primitive-type name="signed char"/>
- <primitive-type name="uchar"/>
- <primitive-type name="unsigned char"/>
- <primitive-type name="int"/>
- <primitive-type name="signed int"/>
- <primitive-type name="uint"/>
- <primitive-type name="ulong"/>
- <primitive-type name="unsigned int"/>
- <primitive-type name="signed long"/>
- <primitive-type name="signed long int"/>
- <primitive-type name="long"/>
- <primitive-type name="unsigned long int"/>
- <primitive-type name="unsigned long">
- <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
- <include file-name="signalmanager.h" location="global"/>
- </primitive-type>
-
- <primitive-type name="bool" target-lang-api-name="PyBool">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pybool"/>
- <target-to-native>
- <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <!-- Qt5: add the new pointer-ish types -->
- <primitive-type name="qintptr" target-lang-api-name="PyLong">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
- <target-to-native>
- <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
- <primitive-type name="quintptr" target-lang-api-name="PyLong">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong-quintptr"/>
- <target-to-native>
- <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong-quintptr"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
- <primitive-type name="qptrdiff" target-lang-api-name="PyLong">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
- <target-to-native>
- <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="pystring-check"/>
-
- <primitive-type name="QString" target-lang-api-name="PyUnicode">
- <include file-name="QString" location="global"/>
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode"/>
- <target-to-native>
- <add-conversion type="PyUnicode" file="../glue/qtcore.cpp" snippet="conversion-pyunicode"/>
- <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <primitive-type name="QStringView" target-lang-api-name="PyUnicode" view-on="QString">
- <include file-name="QStringView" location="global"/>
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode"/>
- </conversion-rule>
- </primitive-type>
-
- <primitive-type name="QChar">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/>
- <target-to-native>
- <add-conversion type="PyString" check="Shiboken::String::checkChar(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring-char"/>
- <add-conversion type="PyInt" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
- <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <primitive-type name="QVariant" target-lang-api-name="PyObject">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant"/>
- <target-to-native>
- <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
- <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="QString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qstring"/>
- <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"/>
- <!-- Using PyLong instead of PyInt to support Python2 and 3-->
- <add-conversion type="PyInt" check="PyInt_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
- <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-pyint"/>
- <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"/>
- <add-conversion type="PyObject" file="../glue/qtcore.cpp" snippet="conversion-pyobject"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariant-conversion"/>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariantmap-check"/>
- <primitive-type name="QStringList">
- <include file-name="QStringList" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion">
- <replace from="%INTYPE_0" to="QString"/>
- </insert-template>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion">
- <replace from="%OUTTYPE_0" to="QString"/>
- </insert-template>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <value-type name="QCborError" since="5.12">
- <enum-type name="Code"/>
- <include file-name="qcborcommon.h" location="global"/>
- </value-type>
-
- <value-type name="QCborParserError" since="5.12">
- <include file-name="qcborvalue.h" location="global"/>
- </value-type>
-
- <value-type name="QCborValue" since="5.12">
- <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"/>
-
- <object-type name="QCborStreamReader" since="5.12">
- <enum-type name="StringResultCode"/>
- <enum-type name="Type"/>
- <include file-name="qcborstream.h" location="global"/>
- <value-type name="StringResult" generate="no"/>
- <!-- 64bit (qsizetype = long long) -->
- <modify-function signature="readStringChunk(char*,qsizetype)" remove="all"/>
- <!-- 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">
- <include file-name="qcborstream.h" location="global"/>
- </object-type>
-
- <primitive-type name="QJsonObject">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-qjsonobject"/>
- <target-to-native>
- <add-conversion type="PyDict" file="../glue/qtcore.cpp" snippet="conversion-qjsonobject-pydict"/>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <primitive-type name="QModelIndexList">
- <include file-name="qabstractitemmodel.h" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion">
- <replace from="%INTYPE_0" to="QModelIndex"/>
- </insert-template>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion">
- <replace from="%OUTTYPE_0" to="QModelIndex"/>
- </insert-template>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <container-type name="QSet" type="set">
- <include file-name="QSet" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <!-- FIXME: Which one is it going to be? -->
- <container-type name="QList" type="list">
- <include file-name="QList" location="global"/>
- <declare-function signature="append(T)" return-type="void"/>
- <declare-function signature="insert(qsizetype,T)" return-type="void"/>
- <declare-function signature="prepend(T)" return-type="void"/>
- <declare-function signature="push_back(T)" return-type="void"/>
- <declare-function signature="push_front(T)" return-type="void"/>
- <declare-function signature="removeAll(T)" return-type="void"/>
- <declare-function signature="removeOne(T)" return-type="void"/>
- <!-- operator << needs to be declared in inheriting class -->
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <container-type name="QStack" type="stack">
- <include file-name="QStack" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <container-type name="QQueue" type="queue">
- <include file-name="QQueue" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cpplist_to_pylist_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cpplist_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <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="cppmap_to_pymap_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmap_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
- <container-type name="QMap" type="map">
- <include file-name="QMap" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cppmap_to_pymap_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmap_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
- <container-type name="QMultiMap" type="multi-map">
- <include file-name="QMultiMap" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cppmap_to_pymap_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PyDict">
- <insert-template name="pydict_to_cppmap_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <container-type name="QPair" type="pair">
- <include file-name="QPair" location="global"/>
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-qpair"/>
- <target-to-native>
- <add-conversion type="PySequence" file="../glue/qtcore.cpp" snippet="conversion-qpair-pysequence"/>
- </target-to-native>
- </conversion-rule>
- </container-type>
-
- <rejection class="*" function-name="d_func"/>
- <rejection class="*" function-name="data_ptr"/>
- <rejection class="*" function-name="detach"/>
- <rejection class="*" function-name="isDetached"/>
- <rejection class="*" field-name="d_ptr"/>
- <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"/>
- <rejection class="Qt" function-name="qt_getEnumMetaObject"/>
- <rejection class="Qt" function-name="qt_getEnumName"/>
-
- <namespace-type name="Qt">
- <enum-type name="AlignmentFlag" flags="Alignment"/>
- <enum-type name="AnchorPoint" since="4.6"/>
- <enum-type name="ApplicationAttribute"/>
- <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
- <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="CheckState"/>
- <enum-type name="ClipOperation"/>
- <enum-type name="ConnectionType"/>
- <enum-type name="ContextMenuPolicy"/>
- <enum-type name="CoordinateSystem" since="4.6"/>
- <enum-type name="Corner"/>
- <enum-type name="CursorShape"/>
- <enum-type name="DateFormat"/>
- <enum-type name="DayOfWeek"/>
- <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="EventPriority"/>
- <enum-type name="FillRule"/>
- <enum-type name="FindChildOption" flags="FindChildOptions" since="5.0"/>
- <enum-type name="FocusPolicy"/>
- <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="GlobalColor"/>
- <enum-type name="HighDpiScaleFactorRoundingPolicy" since="5.14"/>
- <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="ItemFlag" flags="ItemFlags"/>
- <enum-type name="ItemSelectionMode"/>
- <enum-type name="ItemSelectionOperation" since="5.5"/>
- <enum-type name="Key"/>
- <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="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="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="ScrollBarPolicy"/>
- <enum-type name="ScrollPhase" since="5.2"/>
- <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="TextElideMode"/>
- <enum-type name="TextFlag"/>
- <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="TimeSpec"/>
- <enum-type name="ToolBarArea" flags="ToolBarAreas"/>
- <enum-type name="ToolBarAreaSizes"/>
- <enum-type name="ToolButtonStyle"/>
- <enum-type name="TouchPointState" flags="TouchPointStates" since="4.6"/>
- <enum-type name="TransformationMode"/>
- <enum-type name="UIEffect"/>
- <enum-type name="WhiteSpaceMode"/>
- <enum-type name="WidgetAttribute"/>
- <enum-type name="WindowFrameSection"/>
- <enum-type name="WindowModality"/>
- <enum-type name="WindowState" flags="WindowStates"/>
- <enum-type name="WindowType" flags="WindowFlags"/>
- <enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>
-
- </namespace-type>
-
- <add-function signature="QEnum(PyObject*)" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qenum"/>
- </add-function>
- <add-function signature="QFlag(PyObject*)" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qflag"/>
- </add-function>
-
- <add-function signature="__init_feature__()">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-init-feature"/>
- </add-function>
-
- <add-function signature="qAbs(double)" return-type="double">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qabs"/>
- </add-function>
-
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-postroutine"/>
- <add-function signature="qAddPostRoutine(PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-addpostroutine"/>
- </add-function>
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-qaddpostroutine"/>
-
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-version"/>
-
- <!-- WARNING: There is an issue when adding this code to an external file -->
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-module-shutdown"/>
- <add-function signature="__moduleShutdown()">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
- </add-function>
-
- <!--signal/slot-->
- <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"/>
- <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">
- <enum-type name="ForeverConstant"/>
- </value-type>
-
- <value-type name="QElapsedTimer" since="4.7">
- <enum-type name="ClockType" since="4.7"/>
- </value-type>
-
- <object-type name="QAbstractTableModel" polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%1)">
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- </object-type>
- <value-type name="QLine" hash-function="PySide::hash">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iiii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qline-hash"/>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="iiii"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
- <value-type name="QLineF">
- <enum-type name="IntersectionType"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="dddd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <modify-function signature="intersects(const QLineF &amp;,QPointF*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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"/>
- <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.
- </inject-documentation>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qresource-data"/>
- </modify-function>
-
- <modify-function signature="unregisterResource(const uchar*,const QString&amp;)" rename="unregisterResourceData">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
- </modify-function>
- <modify-function signature="registerResource(const uchar*,const QString&amp;)" rename="registerResourceData">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
- </modify-function>
- </object-type>
-
- <object-type name="QBasicTimer"/>
- <value-type name="QByteArrayMatcher"/>
- <value-type name="QCalendar" since="5.14">
- <value-type name="YearMonthDay"/>
- <enum-type name="System"/>
- </value-type>
- <value-type name="QDate" hash-function="PySide::hash" >
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyDate"/>
- </insert-template>
- </inject-code>
- <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"/>
- </target-to-native>
- </conversion-rule>
- <extra-includes>
- <include file-name="datetime.h" location="global"/>
- </extra-includes>
- <add-function signature="__repr__" return-type="PyObject">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="toPython()" return-type="PyObject">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-topython"/>
- </add-function>
- <modify-function signature="getDate(int*,int*,int*)const" >
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(year, month, day)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/>
- </modify-function>
- <modify-function signature="weekNumber(int*)const" >
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <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">
- <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>
- <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"/>
- </target-to-native>
- </conversion-rule>
- <extra-includes>
- <include file-name="datetime.h" location="global"/>
- </extra-includes>
- <!-- Somewhat internal constructor used to pickle QDateTime -->
- <add-function signature="QDateTime(int,int,int,int,int,int,int,int)">
- <modify-argument index="8">
- <replace-default-expression with="Qt::LocalTime"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-1"/>
- </add-function>
- <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>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i, %i, %i, %i, %i, %i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iiiiiiii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="toPython()" return-type="PyObject">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-topython"/>
- </add-function>
- </value-type>
- <value-type name="QDir">
- <enum-type name="Filter" flags="Filters"/>
- <enum-type name="SortFlag" flags="SortFlags"/>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="s"/>
- <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.path())"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QPoint" hash-function="PySide::hash">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="ii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </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">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="ii"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!--### Functions removed because they return references to Python imutable objects -->
- <modify-function signature="rx()" remove="all"/>
- <modify-function signature="ry()" remove="all"/>
- <!--### -->
- </value-type>
- <value-type name="QPointF">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="dd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!--### Functions removed because they return references to Python imutable objects -->
- <modify-function signature="rx()" remove="all"/>
- <modify-function signature="ry()" remove="all"/>
- <!--### -->
- </value-type>
- <value-type name="QRect" hash-function="PySide::hash">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iiii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
- </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">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code class="target">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getRect(int*,int*,int*,int*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code class="target">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- </value-type>
- <value-type name="QRectF">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!--
- FIXME These functions return qreal. Will convert to double (format
- string) mess things up in other architectures?
- -->
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <modify-function signature="getCoords(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code class="target">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getRect(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code class="target">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- </value-type>
- <value-type name="QSize" hash-function="PySide::hash">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="ii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </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">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="ii"/>
- <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!--### Functions removed because they return references to Python imutable objects -->
- <modify-function signature="rheight()" remove="all"/>
- <modify-function signature="rwidth()" remove="all"/>
- <!--### -->
- </value-type>
- <value-type name="QSizeF">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="dd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!--### Functions removed because they return references to Python imutable objects -->
- <modify-function signature="rheight()" remove="all"/>
- <modify-function signature="rwidth()" remove="all"/>
- <!--### -->
- </value-type>
-
- <value-type name="QTime" hash-function="PySide::hash">
- <inject-code class="native" position="beginning">
- <insert-template name="pydatetime_importandcheck_function">
- <replace from="$DATETIMETYPE" to="PyTime"/>
- </insert-template>
- </inject-code>
- <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"/>
- </target-to-native>
- </conversion-rule>
-
- <extra-includes>
- <include file-name="datetime.h" location="global"/>
- </extra-includes>
-
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iiii"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="toPython()" return-type="PyObject">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtime-topython"/>
- </add-function>
- </value-type>
- <value-type name="QPersistentModelIndex" hash-function="qHash">
- <modify-function signature="internalPointer()const">
- <inject-code class="target" position="beginning">
- <insert-template name="return_internal_pointer" />
- </inject-code>
- </modify-function>
- <modify-function signature="operator const QModelIndex&amp;()const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <value-type name="QTimeZone">
- <enum-type name="TimeType"/>
- <enum-type name="NameType"/>
- <value-type name="OffsetData"/>
- </value-type>
-
- <value-type name="QUuid">
- <enum-type name="StringFormat" since="5.11"/>
- <enum-type name="Variant"/>
- <enum-type name="Version"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="'%s'"/>
- <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="s"/>
- <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMimeType" since="5.0"/>
- <object-type name="QMimeDatabase" since="5.0">
- <enum-type name="MatchMode"/>
- </object-type>
-
- <value-type name="QLocale">
- <enum-type name="Country"/>
- <enum-type name="DataSizeFormat" flags="DataSizeFormats" since="5.10"/>
- <enum-type name="FloatingPointPrecisionOption" since="5.7"/>
- <enum-type name="FormatType"/>
- <enum-type name="Language"/>
- <enum-type name="MeasurementSystem"/>
- <enum-type name="NumberOption" flags="NumberOptions"/>
- <enum-type name="Script" since="4.8" revision="4800"/>
- <enum-type name="CurrencySymbolFormat" since="4.8" revision="4800"/>
- <enum-type name="QuotationStyle" since="4.8" revision="4800"/>
- <!--### All those C++ number types have the same representation in Python -->
- <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"/>
- <!--### -->
- <extra-includes>
- <include file-name="QDate" location="global"/>
- </extra-includes>
- <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-argument index="2">
- <rename to="format"/>
- </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">
- <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="toULongLong(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="return">
- <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="toDouble(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(float, bool ok)"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,bool*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toFloat(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(float, bool ok)"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,bool*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toInt(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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="toLongLong(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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="toShort(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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="toUShort(QString,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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>
- </value-type>
- <value-type name="QBitArray" hash-function="qHash" >
- <add-function signature="__len__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-len"/>
- </add-function>
- <add-function signature="__getitem__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-getitem"/>
- </add-function>
- <add-function signature="__setitem__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-setitem"/>
- </add-function>
- </value-type>
- <object-type name="QLockFile">
- <enum-type name="LockError"/>
- <modify-function signature="isLocked()const" allow-thread="yes"/>
- <modify-function signature="lock()" allow-thread="yes"/>
- <modify-function signature="removeStaleLockFile()" allow-thread="yes"/>
- <modify-function signature="tryLock(int)" allow-thread="yes"/>
- <modify-function signature="unlock()" allow-thread="yes"/>
- </object-type>
- <object-type name="QMessageAuthenticationCode"/>
- <object-type name="QSignalBlocker"/>
- <value-type name="QStorageInfo"/>
- <!-- QReadWriteLock does not have a copy ctor! -->
- <object-type name="QReadWriteLock">
- <enum-type name="RecursionMode"/>
- <modify-function signature="lockForRead()" allow-thread="yes"/>
- <modify-function signature="tryLockForRead(int)" allow-thread="yes"/>
- <modify-function signature="lockForWrite()" allow-thread="yes"/>
- <modify-function signature="tryLockForWrite(int)" allow-thread="yes"/>
- </object-type>
- <object-type name="QReadLocker">
- <modify-function signature="QReadLocker(QReadWriteLock*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="relock()" allow-thread="yes"/>
- <add-function signature="__enter__()"/>
- <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
- <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
- </add-function>
- </object-type>
- <object-type name="QWriteLocker">
- <modify-function signature="QWriteLocker(QReadWriteLock*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="relock()" allow-thread="yes"/>
- <add-function signature="__enter__()"/>
- <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
- <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
- </add-function>
- </object-type>
- <object-type name="QDirIterator">
- <enum-type name="IteratorFlag" flags="IteratorFlags"/>
- </object-type>
- <object-type name="QThread">
- <inject-code file="../glue/qtcore.cpp" class="native" position="beginning" snippet="qthread_pthread_cleanup"/>
- <enum-type name="Priority"/>
- <modify-function signature="currentThreadId()" remove="all"/>
- <modify-function signature="run()" allow-thread="yes">
- <inject-code file="../glue/qtcore.cpp" class="native" position="beginning"
- snippet="qthread_pthread_cleanup_install"/>
- <inject-code file="../glue/qtcore.cpp" class="native" position="end"
- snippet="qthread_pthread_cleanup_uninstall"/>
- </modify-function>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="msleep(unsigned long)" allow-thread="yes"/>
- <modify-function signature="sleep(unsigned long)" allow-thread="yes"/>
- <modify-function signature="usleep(unsigned long)" allow-thread="yes"/>
- <modify-function signature="wait(QDeadlineTimer)" allow-thread="yes"/>
- <modify-function signature="wait(unsigned long)" allow-thread="yes"/>
- <modify-function signature="yieldCurrentThread()" allow-thread="yes"/>
- <modify-function signature="start(QThread::Priority)" allow-thread="yes">
- <modify-argument index="1">
- <rename to="priority"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="exit(int)" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QAbstractItemModel">
- <enum-type name="CheckIndexOption" flags="CheckIndexOptions" since="5.11"/>
- <enum-type name="LayoutChangeHint"/>
- <!-- This function was replaced by a added function -->
- <modify-function signature="createIndex(int,int,const void*)const" remove="all"/>
- <!-- This function is the same as createIndex(int, int, int)const -->
- <modify-function signature="createIndex(int,int,quintptr)const">
- <modify-argument index="3">
- <replace-default-expression with="0"/>
- </modify-argument>
- </modify-function>
- <add-function signature="createIndex(int,int,PyObject*)const" return-type="QModelIndex">
- <modify-argument index="1">
- <rename to="row"/>
- </modify-argument>
- <modify-argument index="2">
- <rename to="column"/>
- </modify-argument>
- <modify-argument index="3">
- <rename to="ptr"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qabstractitemmodel-createindex"/>
- <inject-documentation mode="append" format="target">
- Creates a model index for the given row and column with the internal pointer ptr.
- When using a QSortFilterProxyModel, its indexes have their own internal pointer.
- It is not advisable to access this internal pointer outside of the model.
- Use the data() function instead.
- This function provides a consistent interface that model subclasses must use to create model indexes.
-
- .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference
- incremented during the QModelIndex life time. So it is necessary to keep the object used
- on ptr argument alive during the whole process.
- Do not destroy the object if you are not sure about that.
- </inject-documentation>
- </add-function>
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
- <modify-function signature="mimeData(QModelIndexList)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="data(const QModelIndex&amp;,int)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- </modify-argument>
- </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"/>
- <modify-function signature="layoutChanged(const QList&lt;QPersistentModelIndex&gt;&amp;,QAbstractItemModel::LayoutChangeHint)" allow-thread="yes"/>
- <modify-function signature="beginResetModel()" allow-thread="yes"/>
- <modify-function signature="endResetModel()" allow-thread="yes"/>
- </object-type>
- <value-type name="QItemSelection">
- <include file-name="QList" location="global"/>
- <!-- Expose operator==, != inherited from QList, which the parser does
- not see due to the TMP expression of the return type. -->
- <add-function signature="operator==(const QItemSelection&amp;)" return-type="bool"/>
- <add-function signature="operator!=(const QItemSelection&amp;)" return-type="bool"/>
- </value-type>
-
- <object-type name="QItemSelectionModel">
- <extra-includes>
- <include file-name="QItemSelection" location="global"/>
- </extra-includes>
- <enum-type name="SelectionFlag" flags="SelectionFlags"/>
- </object-type>
-
- <value-type name="QItemSelectionRange">
- </value-type>
- <object-type name="QAbstractProxyModel" polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%1)">
- <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="QSortFilterProxyModel">
- <extra-includes>
- <include file-name="QItemSelection" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <modify-function signature="setSourceModel(QAbstractItemModel*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QIdentityProxyModel"/>
- <object-type name="QTransposeProxyModel" since="5.13"/>
- <!-- QObject is created manually -->
- <object-type name="QObject">
- <extra-includes>
- <include file-name="QThread" location="global"/>
- <include file-name="QCoreApplication" location="global"/>
- <include file-name="signalmanager.h" location="local"/>
- </extra-includes>
- <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>
-
- <modify-function signature="deleteLater()">
- <modify-argument index="this">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- <!-- Invalidate-after-use stuff -->
- <modify-function signature="childEvent(QChildEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="customEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="event(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="eventFilter(QObject*,QEvent*)">
- <modify-argument index="2" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="timerEvent(QTimerEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <!-- End of Invalidate-after-use fix -->
- <modify-function signature="parent()const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setParent(QObject*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
- <modify-argument index="4">
- <rename to="type"/>
- </modify-argument>
- <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>
- <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-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)" return-type="bool" static="yes">
- <modify-argument index="4">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4"/>
- </add-function>
- <!-- static version -->
- <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType)" return-type="bool">
- <modify-argument index="3">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
- <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)" return-type="bool">
- <modify-argument index="4">
- <rename to="type"/>
- <replace-default-expression with="Qt::AutoConnection"/>
- </modify-argument>
- <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">
- <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">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-2"/>
- </add-function>
-
-
- <inject-code class="native" file="../glue/qtcore.cpp" snippet="qobject-findchild-1"/>
- <add-function signature="findChild(PyTypeObject*,const QString&amp;)" return-type="PyObject*">
- <inject-documentation format="target" mode="append">
- To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child:
-
- ::
-
- ...
- parent = QWidget()
- ...
- # The first argument must be the child type
- child1 = parent.findChild(QPushButton, "child_button")
- child2 = parent.findChild(QWidget, "child_widget")
-
- </inject-documentation>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchild-2"/>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <replace-default-expression with="QString()"/>
- </modify-argument>
- </add-function>
- <add-function signature="findChildren(PyTypeObject*,const QString&amp;)" return-type="PySequence*" >
- <inject-documentation format="target" mode="append">
- Like the method *findChild*, the first parameter should be the child's type.
- </inject-documentation>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <replace-default-expression with="QString()"/>
- </modify-argument>
- </add-function>
- <add-function signature="findChildren(PyTypeObject*,const QRegularExpression&amp;)" return-type="PySequence*" >
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </add-function>
-
- <add-function signature="tr(const char*,const char*,int)" return-type="QString">
- <modify-argument index="2">
- <replace-default-expression with="0"/>
- </modify-argument>
- <modify-argument index="3">
- <replace-default-expression with="-1"/>
- </modify-argument>
-
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-tr"/>
- </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"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="sender()const" allow-thread="yes">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
-
- <!-- This is not supported due the lack of information durring the call with no arguments, this can cause a memory leak -->
- <modify-function signature="disconnect(const char*,const QObject*,const char*)const">
- <modify-argument index="1">
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="2">
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="3">
- <remove-default-expression />
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAbstractListModel" polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%1)">
- <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="QUrl" hash-function="PySide::hash">
- <!-- Qt5: lots of changes -->
- <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/>
- <!-- note: above duplication of attribute is not by default XML compliant! -->
- <enum-type name="UrlFormattingOption"/>
- <enum-type name="UserInputResolutionOption" flags="UserInputResolutionOptions"/>
- <enum-type name="ParsingMode"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="'%s'"/>
- <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="s"/>
- <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
- <value-type name="QRegularExpression">
- <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions" since="6.0"/>
- <enum-type name="MatchOption" flags="MatchOptions"/>
- <enum-type name="MatchType"/>
- <enum-type name="PatternOption" flags="PatternOptions"/>
- </value-type>
- <value-type name="QRegularExpressionMatch"/>
- <value-type name="QRegularExpressionMatchIterator"/>
-
- <value-type name="QFileInfo">
- <extra-includes>
- <include file-name="QDateTime" location="global"/>
- <include file-name="QDir" location="global"/>
- </extra-includes>
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="s"/>
- <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.filePath())"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
- <value-type name="QByteArray" hash-function="qHash">
- <enum-type name="Base64Option" flags="Base64Options" since="5.2"/>
- <enum-type name="Base64DecodingStatus" since="5.15"/>
- <value-type name="FromBase64Result" since="5.15"/>
- <conversion-rule>
- <target-to-native>
- <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
- <add-conversion type="PyBytes" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytes"/>
- <add-conversion type="PyByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytearray"/>
- <add-conversion type="PyString" check="Shiboken::String::check(%in) &amp;&amp; !PyUnicode_Check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pystring"/>
- </target-to-native>
- </conversion-rule>
-
- <extra-includes>
- <!-- qt5: this is a pre-defined macro <include file-name="QNoImplicitBoolCast" location="global"/> -->
- </extra-includes>
-
- <!-- ### These overloads must be removed accept strings with \x00 in their contents -->
- <modify-function signature="append(const char*)" remove="all"/>
- <modify-function signature="prepend(const char*)" remove="all"/>
- <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator==(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator>(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator>=(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator&lt;=(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator!=(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator+=(const char*)" remove="all"/>
- <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator+(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
- <add-function signature="operator+(PyBytes,QByteArray)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-1"/>
- </add-function>
- <add-function signature="operator+(PyByteArray, QByteArray)" return-type="QByteArray">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-2"/>
- </add-function>
- <add-function signature="operator+(PyByteArray)" return-type="QByteArray">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-3"/>
- </add-function>
- <add-function signature="operator+=(PyByteArray)" return-type="QByteArray">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplusequal"/>
- </add-function>
- <add-function signature="operator==(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorequalequal"/>
- </add-function>
- <add-function signature="operator!=(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatornotequal"/>
- </add-function>
- <add-function signature="operator&gt;(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreater"/>
- </add-function>
- <add-function signature="operator&gt;=(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreaterequal"/>
- </add-function>
- <add-function signature="operator&lt;(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlower"/>
- </add-function>
- <add-function signature="operator&lt;=(PyUnicode)">
- <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlowerequal"/>
- </add-function>
- <!-- ### -->
-
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-repr"/>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="N"/>
- <replace from="%REDUCE_ARGS" to="PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size())"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QByteArray(PyByteArray)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-2"/>
- </add-function>
- <add-function signature="QByteArray(PyBytes)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-3"/>
- </add-function>
- <!-- buffer protocol -->
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-bufferprotocol"/>
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qbytearray-py3"/>
-
- <modify-function signature="data()">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-data"/>
- </modify-function>
-
- <!-- removed functions -->
- <!--### Functions removed because they return STL-like iterators -->
- <modify-function signature="begin()" remove="all"/>
- <modify-function signature="begin()const" remove="all"/>
- <modify-function signature="constBegin()const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <modify-function signature="constEnd()const" remove="all"/>
- <modify-function signature="end()" remove="all"/>
- <modify-function signature="end()const" remove="all"/>
- <!--### -->
-
- <!--### Functions removed because they provide useless overloads from Python point of view -->
- <modify-function signature="number(uint,int)" remove="all"/>
- <modify-function signature="number(qulonglong,int)" remove="all"/>
- <modify-function signature="operator+=(const char*)" remove="all"/>
- <modify-function signature="operator+(char,QByteArray)" remove="all"/>
- <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
- <!-- Those types have the same representation in Python, an overload
- would be useless and cause overflow errors. -->
- <modify-function signature="setNum(uint,int)" remove="all"/>
- <modify-function signature="setNum(ushort,int)" remove="all"/>
- <modify-function signature="setNum(float,char,int)" remove="all"/>
- <modify-function signature="setNum(short,int)" remove="all"/>
- <modify-function signature="setNum(long,int)" remove="all"/>
- <modify-function signature="setNum(ulong,int)" remove="all"/>
- <modify-function signature="setNum(qulonglong,int)" remove="all"/>
- <modify-function signature="number(uint,int)" remove="all"/>
- <modify-function signature="number(long,int)" remove="all"/>
- <modify-function signature="number(ulong,int)" remove="all"/>
- <modify-function signature="number(qulonglong,int)" remove="all"/>
-
- <!--### -->
-
- <modify-function signature="operator const char*()const" remove="all"/>
- <modify-function signature="operator const void*()const" remove="all"/>
-
- <!--### STL compatibility functions not supported by PySide -->
- <modify-function signature="push_back(char)" remove="all"/>
- <modify-function signature="push_back(const QByteArray&amp;)" remove="all"/>
- <modify-function signature="push_back(const char*)" remove="all"/>
- <modify-function signature="push_front(char)" remove="all"/>
- <modify-function signature="push_front(const QByteArray&amp;)" remove="all"/>
- <modify-function signature="push_front(const char*)" remove="all"/>
- <!--### -->
-
- <modify-function signature="toLong(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toLongLong(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toShort(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toUInt(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toULong(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toULongLong(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toInt(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toUShort(bool*,int)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*,arg"/>
- </inject-code>
- </modify-function>
- <!-- QByteArray(const char *) do the job of this constructor -->
- <modify-function signature="toDouble(bool*)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="toFloat(bool*)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
- <add-function signature="__str__" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-str"/>
- </add-function>
- <add-function signature="__len__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-len"/>
- </add-function>
- <add-function signature="__getitem__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-getitem"/>
- </add-function>
- <add-function signature="__mgetitem__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-mgetitem"/>
- </add-function>
- <add-function signature="__setitem__">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-setitem"/>
- </add-function>
- <add-function signature="__msetitem__">
- <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">
- <conversion-rule>
- <native-to-target file="../glue/qtcore.cpp" snippet="return-pybytes"/>
- </conversion-rule>
- </primitive-type>
-
- <value-type name="QTextBoundaryFinder">
- <enum-type name="BoundaryReason" flags="BoundaryReasons"/>
- <enum-type name="BoundaryType"/>
- <!-- There's no QChar in PySide -->
- <modify-function signature="QTextBoundaryFinder(QTextBoundaryFinder::BoundaryType,const QChar*,qsizetype,unsigned char*,qsizetype)" remove="all"/>
- </value-type>
- <object-type name="QXmlStreamEntityResolver"/>
-
- <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
- <object-type name="QAbstractNativeEventFilter">
- <!-- see QWidget::nativeEvent(), QWindow::nativeEvent() -->
- <modify-function signature="nativeEventFilter(const QByteArray&amp;,void*,qintptr*)">
- <modify-argument index="3">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion_variables"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion"/>
- </conversion-rule>
- </modify-argument>
- <inject-code position="end">
- <insert-template name="return_native_eventfilter"/>
- </inject-code>
- </modify-function>
- </object-type>
-
- <object-type name="QEventLoop">
- <enum-type name="ProcessEventsFlag" flags="ProcessEventsFlags"/>
- <modify-function signature="exec(QFlags&lt;QEventLoop::ProcessEventsFlag>)" rename="exec_" allow-thread="yes"/>
- <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">
- <enum-type name="FileError"/>
- <enum-type name="FileTime" since="5.10"/>
- <enum-type name="MemoryMapFlag" flags="MemoryMapFlags"/>
- <enum-type name="Permission" flags="Permissions"/>
- <enum-type name="FileHandleFlag" flags="FileHandleFlags"/>
- <extra-includes>
- <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
- </extra-includes>
- <modify-function signature="unmap(uchar*)">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-unmap"/>
- </modify-function>
- <modify-function signature="map(qint64,qint64,QFlags&lt;QFileDevice::MemoryMapFlag&gt;)">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-map"/>
- </modify-function>
- <modify-function signature="flush()" allow-thread="yes"/>
- </object-type>
- <object-type name="QFile">
- <modify-function signature="open(QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" allow-thread="yes"/>
- <modify-function signature="open(int,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;,QFlags&lt;QFileDevice::FileHandleFlag&gt;)" allow-thread="yes"/>
- <modify-function signature="copy(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="copy(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="link(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="link(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="remove()" allow-thread="yes"/>
- <modify-function signature="remove(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="rename(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="rename(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
- </object-type>
- <object-type name="QSaveFile"/>
- <object-type name="QFileSelector"/>
-
- <object-type name="QIODevice">
- <modify-function signature="open(QFlags&lt;QIODeviceBase::OpenModeFlag>)" allow-thread="yes"/>
- <modify-function signature="close()" allow-thread="yes"/>
- <modify-function signature="seek(qint64)" allow-thread="yes"/>
- <modify-function signature="readAll()" allow-thread="yes"/>
- <modify-function signature="peek(qint64)" allow-thread="yes"/>
- <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 -->
- <modify-function signature="read(char*,qint64)" remove="all"/>
- <!-- ### readLine(qint64) do the job -->
- <modify-function signature="readLine(char*,qint64)" remove="all"/>
- <!-- ### write(str) do the job -->
- <modify-function signature="write(const char*,qint64)" remove="all"/>
- <modify-function signature="write(const char*)" remove="all"/>
- <modify-function signature="getChar(char*)">
- <modify-argument index="1">
- <remove-argument />
- <remove-default-expression />
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_char*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="readData(char*,qint64)">
- <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
- </modify-function>
- <modify-function signature="readLineData(char*,qint64)">
- <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
- </modify-function>
- </object-type>
- <value-type name="QIODeviceBase" since="6.0">
- <enum-type name="OpenModeFlag" flags="OpenMode"/>
- </value-type>
- <object-type name="QCryptographicHash">
- <enum-type name="Algorithm"/>
- <modify-function signature="addData(const char*,qsizetype)">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qcryptographichash-adddata"/>
- </modify-function>
- </object-type>
- <value-type name="QOperatingSystemVersion" since="5.9">
- <enum-type name="OSType"/>
- </value-type>
- <object-type name="QLibraryInfo">
- <enum-type name="LibraryPath"/>
- <modify-function signature="build()">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qlibraryinfo_build"/>
- </modify-function>
- </object-type>
- <namespace-type name="QtCoreHelper" visible="no">
- <object-type name="QMutexLocker" copyable="no">
- <!-- 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
- QMutexLocker inside a QThread::run.
- The reason of having this change is due to the new way of handling the GIL
- in the Qt calls on the whole PySide2 module, that started on 5.14.2-->
- <modify-function signature="QMutexLocker(QMutex*)" allow-thread="yes">
- <modify-argument index="1">
- <reference-count action="set" variable-name="mutex()const0"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QMutexLocker(QRecursiveMutex*)" allow-thread="yes">
- <modify-argument index="1">
- <reference-count action="set" variable-name="recursiveMutex()const0"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="relock()" allow-thread="yes"/>
- <modify-function signature="mutex()const">
- <modify-argument index="return">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="recursiveMutex()const">
- <modify-argument index="return">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <add-function signature="__enter__()"/>
- <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
- <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
- </add-function>
- </object-type>
- </namespace-type>
-
- <!-- Qt5 addition -->
- <object-type name="QBasicMutex">
- <modify-function signature="lock()" allow-thread="yes"/>
- <modify-function signature="tryLock()" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QMutex">
- <modify-function signature="lock()" allow-thread="yes"/>
- <modify-function signature="tryLock(int)" allow-thread="yes"/>
- </object-type>
- <object-type name="QRecursiveMutex" since="5.14">
- <modify-function signature="lock()" allow-thread="yes"/>
- <modify-function signature="tryLock(int)" allow-thread="yes"/>
- </object-type>
- <object-type name="QRandomGenerator" since="5.10">
- <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">
- <modify-function signature="global()" rename="global_"/>
- <modify-function signature="operator()()" remove="all"/>
- </object-type>
- <object-type name="QSemaphore">
- <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"/>
-
- <value-type name="QSocketDescriptor" since="5.15">
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsocketdescriptor"/>
- </value-type>
- <object-type name="QSocketNotifier">
- <enum-type name="Type"/>
- <add-function signature="QSocketNotifier(PyObject*, QSocketNotifier::Type, QObject*)">
- <modify-argument index="3">
- <replace-default-expression with="0"/>
- <rename to="parent"/>
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qsocketnotifier"/>
- </add-function>
- </object-type>
-
- <object-type name="QTemporaryFile">
- <extra-includes>
- <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
- </extra-includes>
- <modify-function signature="createNativeFile(QFile&amp;)" allow-thread="yes"/>
- <modify-function signature="createNativeFile(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="open()" allow-thread="yes"/>
- </object-type>
- <object-type name="QTemporaryDir"/>
- <object-type name="QMimeData">
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- <include file-name="QUrl" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QTimeLine">
- <enum-type name="Direction"/>
- <enum-type name="State"/>
- </object-type>
- <object-type name="QTranslator">
- <modify-function signature="load(const uchar*,int,QString)" allow-thread="yes">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <inject-code file="../glue/qtcore.cpp" snippet="qtranslator-load"/>
- </modify-function>
- </object-type>
- <object-type name="QWaitCondition">
- <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"/>
- <modify-function signature="wait(QReadWriteLock*,unsigned long)" allow-thread="yes"/>
- </object-type>
- <object-type name="QFileSystemWatcher">
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QBuffer">
- <!-- ### setData(QByteArray) do the job -->
- <modify-function signature="setData(const char*,int)" remove="all"/>
- <!-- Disambiguate from Qt3DRender/qbuffer.h -->
- <include file-name="QtCore/qbuffer.h" location="global"/>
- </object-type>
- <object-type name="QTimer">
- <modify-function signature="singleShot(int,const QObject*,const char*)">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
- </modify-function>
- <add-function signature="singleShot(int,PyCallable*)" static="yes">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-2"/>
- </add-function>
- </object-type>
- <object-type name="QProcess">
- <enum-type name="ExitStatus"/>
- <enum-type name="InputChannelMode"/>
- <enum-type name="ProcessChannel"/>
- <enum-type name="ProcessChannelMode"/>
- <enum-type name="ProcessError"/>
- <enum-type name="ProcessState"/>
-
- <modify-function signature="waitForStarted(int)" allow-thread="yes"/>
- <modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
- <modify-function signature="waitForFinished(int)" allow-thread="yes"/>
- <modify-function signature="readAllStandardOutput()" allow-thread="yes"/>
- <modify-function signature="readAllStandardError()" allow-thread="yes"/>
- <modify-function signature="execute(QString,QStringList)" allow-thread="yes"/>
- <modify-function signature="startDetached(QString,QStringList,QString,qint64*)">
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, pid)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
- </modify-function>
- </object-type>
- <object-type name="QSignalMapper"/>
-
- <object-type name="QCollatorSortKey" since="5.2"/>
- <object-type name="QCollator" since="5.2"/>
-
- <object-type name="QCommandLineOption" since="5.2">
- <enum-type name="Flag" flags="Flags" since="5.8"/>
- </object-type>
- <object-type name="QCommandLineParser" since="5.2">
- <enum-type name="OptionsAfterPositionalArgumentsMode" since="5.6"/>
- <enum-type name="SingleDashWordOptionMode"/>
- </object-type>
-
- <object-type name="QCoreApplication">
- <!--Qt5: gone <enum-type name="Encoding"/> -->
- <enum-type identified-by-value="ApplicationFlags" since="4.8" revision="4800"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- <include file-name="QTranslator" 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)">
- <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
- </add-function>
- <add-function signature="QCoreApplication()">
- <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
- </add-function>
- <!-- Addition for qApp.
- To be fixed: This function deletes a little too much ATM that is missing later
- when creating a new qApp. -->
- <add-function signature="shutdown()">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
- </add-function>
-
- <!-- blocking functions -->
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;,int)" allow-thread="yes"/>
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;)" allow-thread="yes"/>
- <modify-function signature="sendEvent(QObject*,QEvent*)" allow-thread="yes"/>
- <modify-function signature="sendPostedEvents(QObject*,int)" allow-thread="yes"/>
- <modify-function signature="instance()">
- <inject-code class="target" file="../glue/qtcore.cpp" snippet="qcoreapplication-instance"/>
- </modify-function>
-
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes">
- <modify-argument index="2" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="QCoreApplication(int &amp;,char **,int)" access="private"/>
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qcoreapplication-init"/>
- <modify-function signature="postEvent(QObject*,QEvent*,int)">
- <modify-argument index="2">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QSettings">
- <enum-type name="Format"/>
- <enum-type name="Scope"/>
- <enum-type name="Status"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- <!-- PYSIDE-1010:
- We remove the original implementation of value() to include the optional parameter -->
- <modify-function signature="value(const QString&amp;,const QVariant&amp;)const" remove="all"/>
- <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = 0, PyObject* @type@ = 0)" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qsettings-value"/>
- </add-function>
- </object-type>
- <object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None">
- <enum-type name="Type"/>
- </object-type>
- <object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&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="QDataStream" stream="yes">
- <enum-type name="FloatingPointPrecision" since="4.6"/>
- <enum-type name="Status"/>
- <enum-type name="Version"/>
- <enum-type name="ByteOrder"/>
- <extra-includes>
- <include file-name="QtCore/QtCore" location="global"/>
- </extra-includes>
-
- <!-- ### Replaced by write<TYPE> methods -->
- <modify-function signature="operator&gt;&gt;(qint8&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(bool&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(quint8&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(qint16&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(quint16&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(qint32&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(quint32&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(qint64&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(quint64&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(char*&amp;)" remove="all"/>
- <!-- ### -->
-
- <!-- ### Replaced by read<TYPE> methods -->
- <modify-function signature="operator&lt;&lt;(qint8)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(bool)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(quint8)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(qint16)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(quint16)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(qint32)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(quint32)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(qint64)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(quint64)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(double)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
- <!-- ### -->
- <add-function signature="operator&lt;&lt;(const QString&amp;)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeQString(const QString&amp;)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="readQString()" return-type="QString">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="writeQChar(const QChar&amp;)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="readQChar()" return-type="QChar">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="writeQStringList(const QStringList&amp;)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="readQStringList()" return-type="QStringList">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="writeQVariant(const QVariant&amp;)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <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-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)">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata"/>
- </modify-function>
-
- <!-- Extra functions for primitive type handling -->
- <add-function signature="readBool()" return-type="bool">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readInt8()" return-type="qint8">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readUInt8()" return-type="quint8">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readUInt16()" return-type="quint16">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readInt16()" return-type="qint16">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readInt32()" return-type="qint32">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readUInt32()" return-type="quint32">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readInt64()" return-type="qint64">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readUInt64()" return-type="quint64">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readFloat()" return-type="float">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readDouble()" return-type="qreal">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
- <add-function signature="readString()" return-type="QString">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
- </add-function>
-
- <add-function signature="writeBool(bool)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeInt8(qint8)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeUInt8(quint8)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeUInt16(quint16)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeInt16(qint16)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeInt32(qint32)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeUInt32(quint32)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeInt64(qint64)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeUInt64(quint64)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeFloat(float)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeDouble(qreal)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
- <add-function signature="writeString(QString)">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
- </add-function>
-
- <!-- ### deprecated method -->
- <modify-function signature="readBytes(char*&amp;,uint&amp;)" remove="all"/>
- <modify-function signature="writeBytes(const char*,uint)" remove="all"/>
- </object-type>
-
- <value-type name="QTextStreamManipulator" default-constructor="QTextStreamManipulator(0, 0)">
- <modify-function signature="exec(QTextStream &amp;)" rename="exec_"/>
- </value-type>
- <object-type name="QTextStream" stream="yes">
- <enum-type name="FieldAlignment"/>
- <enum-type name="NumberFlag" flags="NumberFlags"/>
- <enum-type name="RealNumberNotation"/>
- <enum-type name="Status"/>
- <!-- 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"/>
- <!-- Removed because we use the non-const version -->
- <modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
-
- <!-- Removed because it expect QString to be mutable -->
- <modify-function signature="setString(QString*,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
-
- <modify-function signature="operator&lt;&lt;(const void*)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(qlonglong)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(qulonglong)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(short)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(int)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(unsigned int)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(unsigned short)" remove="all"/>
- <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
-
- <modify-function signature="operator&gt;&gt;(char*)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(char&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(qlonglong&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(qulonglong&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(long&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(int&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(short&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(unsigned long&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(unsigned int&amp;)" remove="all"/>
- <modify-function signature="operator&gt;&gt;(unsigned short&amp;)" remove="all"/>
- <!-- Removed because it expect QChar to be mutable -->
- <modify-function signature="operator&gt;&gt;(QChar&amp;)" remove="all"/>
- <!-- Removed because it expect QString to be mutable -->
- <modify-function signature="operator&gt;&gt;(QString&amp;)" remove="all"/>
-
- <modify-function signature="string()const">
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="return-qstring-ref"/>
- </modify-function>
-
- <modify-function signature="flush()" allow-thread="yes"/>
- <modify-function signature="read(qint64)" allow-thread="yes"/>
- <modify-function signature="readLine(qint64)" allow-thread="yes"/>
- <modify-function signature="readAll()" allow-thread="yes"/>
- </object-type>
- <object-type name="QStandardPaths" since="5.0">
- <enum-type name="StandardLocation"/>
- <enum-type name="LocateOption" flags="LocateOptions"/>
- </object-type>
- <object-type name="QSystemSemaphore">
- <enum-type name="AccessMode"/>
- <enum-type name="SystemSemaphoreError"/>
- </object-type>
-
- <object-type name="QThreadPool">
- <modify-function signature="clear()" allow-thread="yes"/>
- <modify-function signature="activeThreadCount()const" allow-thread="yes"/>
- <modify-function signature="releaseThread()" allow-thread="yes"/>
- <modify-function signature="reserveThread()" allow-thread="yes"/>
- <modify-function signature="setMaxThreadCount(int)" allow-thread="yes"/>
- <modify-function signature="waitForDone(int)" allow-thread="yes"/>
- <modify-function signature="start(QRunnable*,int)" allow-thread="yes">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="tryStart(QRunnable*)" allow-thread="yes">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="tryTake(QRunnable*)" allow-thread="yes"/>
-
- <modify-function signature="globalInstance()" >
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="releaseownership"/>
- </modify-function>
- </object-type>
- <value-type name="QXmlStreamAttribute"/>
- <value-type name="QXmlStreamAttributes">
- <modify-function signature="push_back(QXmlStreamAttribute)" remove="all"/>
- <modify-function signature="pop_back()" remove="all"/>
- <modify-function signature="push_front(QXmlStreamAttribute)" remove="all"/>
- <modify-function signature="pop_front()" remove="all"/>
- <modify-function signature="toList()const" remove="all"/>
- <!-- Remove methods from QList -->
- <modify-function signature="value(qsizetype,const QXmlStreamAttribute&amp;) const" remove="all"/>
- <modify-function signature="fromList(const QList&lt;QXmlStreamAttribute&gt; &amp;)" remove="all"/>
- <modify-function signature="operator+=(QVector&lt;QXmlStreamAttribute&gt;)" remove="all"/>
- <!-- Expose operator==, != inherited from QList, which the parser does
- not see due to the TMP expression of the return type. -->
- <add-function signature="operator==(const QXmlStreamAttributes&amp;)" return-type="bool"/>
- <add-function signature="operator!=(const QXmlStreamAttributes&amp;)" return-type="bool"/>
- </value-type>
- <value-type name="QXmlStreamNamespaceDeclaration"/>
- <value-type name="QXmlStreamNotationDeclaration"/>
- <value-type name="QXmlStreamEntityDeclaration"/>
- <object-type name="QXmlStreamReader">
- <enum-type name="Error"/>
- <enum-type name="TokenType"/>
- <enum-type name="ReadElementTextBehaviour" since="4.6"/>
- </object-type>
- <object-type name="QXmlStreamWriter">
- <!-- Removed because it expect QString to be mutable -->
- <modify-function signature="QXmlStreamWriter(QString*)" remove="all"/>
- </object-type>
- <value-type name="QModelIndex" hash-function="qHash">
- <modify-function signature="internalPointer()const">
- <inject-code class="target" position="beginning">
- <insert-template name="return_internal_pointer" />
- </inject-code>
- </modify-function>
- <modify-function signature="model()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <object-type name="QFutureInterfaceBase">
- <enum-type name="State"/>
- </object-type>
- <value-type name="QFuture" generate="no">
- <include file-name="QtCore/qfuture.h" location="global"/>
- <modify-function signature="waitForFinished()" allow-thread="yes"/>
- </value-type>
- <object-type name="QFutureWatcherBase" generate="no">
- <modify-function signature="futureInterface()" remove="all"/>
- <modify-function signature="futureInterface() const" remove="all"/>
- </object-type>
- <object-type name="QFutureWatcher" generate="no">
- <include file-name="QtCore/qfuturewatcher.h" location="global"/>
- </object-type>
-
- <value-type name="QGenericArgument">
- <include file-name="qobjectdefs.h" location="global"/>
- </value-type>
-
- <value-type name="QGenericReturnArgument">
- <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>
-
- <value-type name="QMetaMethod">
- <enum-type name="Access"/>
- <enum-type name="MethodType"/>
- <!-- This isn't part of Qt public API -->
- <modify-function signature="attributes()const" remove="all"/>
- <modify-function signature="getParameterTypes(int*)const" remove="all"/>
- </value-type>
- <object-type name="QMetaObject">
- <enum-type name="Call"/>
- <include file-name="qobjectdefs.h" location="global"/>
- <!-- This isn't part of Qt public API -->
- <modify-function signature="connect(const QObject*,int,const QObject*,int,int,int*)" remove="all"/>
- <object-type name="Connection">
- <include file-name="qobjectdefs.h" location="global"/>
- </object-type>
- <modify-function signature="^invokeMethod\(" allow-thread="yes"/>
- </object-type>
- <value-type name="QMetaProperty" >
- <!-- This isn't part of Qt public API -->
- <modify-function signature="enclosingMetaObject()const" remove="all"/>
- </value-type>
- <value-type name="QMetaClassInfo">
- <!-- This isn't part of Qt public API -->
- <modify-function signature="enclosingMetaObject()const" remove="all"/>
- </value-type>
-
- <value-type name="QMetaEnum">
- <modify-function signature="keyToValue(const char*,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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="keysToValue(const char*,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,bool*"/>
- </inject-code>
- </modify-function>
- <!-- This isn't part of Qt public API -->
- <modify-function signature="enclosingMetaObject()const" remove="all"/>
- </value-type>
-
- <!-- From Qt4.6 -->
- <object-type name="QAbstractAnimation" since="4.6">
- <enum-type name="DeletionPolicy"/>
- <enum-type name="Direction"/>
- <enum-type name="State"/>
- </object-type>
-
- <object-type name="QAnimationGroup" since="4.6">
- <modify-function signature="addAnimation(QAbstractAnimation*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertAnimation(int,QAbstractAnimation*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="removeAnimation(QAbstractAnimation*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="takeAnimation(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="clear()" >
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qanimationgroup-clear"/>
- </modify-function>
- </object-type>
-
- <!-- We will use inject code to implement the function below -->
- <rejection class="QEasingCurve" function-name="setCustomType"/>
- <rejection class="QEasingCurve" function-name="customType"/>
- <value-type name="QEasingCurve" since="4.6">
- <extra-includes>
- <include file-name="pysideweakref.h" location="global"/>
- <include file-name="glue/qeasingcurve_glue.h" location="local"/>
- </extra-includes>
- <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve"/>
- <enum-type name="Type"/>
- <add-function signature="setCustomType(PyObject*)">
- <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-setcustomtype"/>
- </add-function>
- <add-function signature="customType()" return-type="PyObject">
- <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-customtype"/>
- </add-function>
- </value-type>
-
- <value-type name="QJsonArray">
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- </value-type>
-
- <value-type name="QJsonDocument">
- <enum-type name="DataValidation"/>
- <enum-type name="JsonFormat"/>
- </value-type>
-
- <rejection class="QJsonDocument" field-name="BinaryFormatTag"/>
-
- <value-type name="QJsonParseError">
- <enum-type name="ParseError"/>
- </value-type>
-
- <value-type name="QJsonValue">
- <enum-type name="Type"/>
- <extra-includes>
- <include file-name="QVariant" location="global"/>
- <include file-name="QJsonArray" location="global"/>
- <include file-name="QJsonObject" location="global"/>
- </extra-includes>
- </value-type>
-
- <value-type name="QMargins" since="4.6"/>
- <value-type name="QMarginsF" since="5.3"/>
-
- <object-type name="QParallelAnimationGroup" since="4.6"/>
-
- <object-type name="QPauseAnimation" since="4.6"/>
-
- <value-type name="QProcessEnvironment" since="4.6"/>
-
- <object-type name="QPropertyAnimation" since="4.6"/>
-
- <object-type name="QSequentialAnimationGroup" since="4.6"/>
-
- <object-type name="QVariantAnimation" since="4.6"/>
-
- <value-type name="QVersionNumber" since="5.6">
- <modify-function signature="fromString(const QString &amp;,int*)">
- <modify-argument index="2">
- <remove-argument/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <!-- From Qt4.6 ^^^ -->
-
- <add-function signature="SIGNAL(const char*)" return-type="str">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-signal"/>
- </add-function>
-
- <add-function signature="SLOT(const char*)" return-type="str">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-slot"/>
- </add-function>
-
- <add-function signature="QT_TR_NOOP(PyObject)" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QT_TR_NOOP_UTF8(PyObject)" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QT_TRANSLATE_NOOP(PyObject,PyObject)" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QT_TRANSLATE_NOOP3(PyObject,PyObject,PyObject)" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QT_TRANSLATE_NOOP_UTF8(PyObject)" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
- </inject-code>
- </add-function>
-
- <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-registerresourcedata"/>
- <add-function signature="qRegisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qregisterresourcedata"/>
- </add-function>
- <add-function signature="qUnregisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qunregisterresourcedata"/>
- </add-function>
-
- <object-type name="QFactoryInterface"/>
- <object-type name="QRunnable"/>
-
- <object-type name="QPluginLoader"/>
- <object-type name="QStringListModel"/>
-
- <suppress-warning text="Unable to decide type of property: 'QLibrary::LoadHints' in class 'QPluginLoader'"/>
- <suppress-warning text="enum '_ISalnum' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'Qt::Initialization' does not have a type entry or is not an enum"/>
- <suppress-warning text="visibility of function '*' modified in class '*'"/>
- <suppress-warning text="hiding of function '*' in class '*'"/>
- <suppress-warning text="namespace '*' does not have a type entry"/>
- <suppress-warning text="Shadowing: QObject::parent()const and QAbstractItemModel::parent() const"/>
- <suppress-warning text="namespace '*' for enum 'QtMsgType' is not declared"/>
- <suppress-warning text="horribly broken type 'imaxdiv_t'"/>
- <suppress-warning text="horribly broken type '__off64_t'"/>
- <suppress-warning text="horribly broken type 'div_t'"/>
- <suppress-warning text="horribly broken type 'fd_set*'"/>
- <suppress-warning text="horribly broken type 'ldiv_t'"/>
- <suppress-warning text="horribly broken type 'lldiv_t'"/>
- <suppress-warning text="signal '*' in class '*' is overloaded."/>
- <suppress-warning text="enum 'enum_3' does not have a type entry or is not an enum"/>
- <suppress-warning text="Shadowing: QFile::fileName() const and QTemporaryFile::fileName() const"/>
- <suppress-warning text="unhandled enum value: ~0u in Qt::GestureType"/>
- <suppress-warning text="unhandled enum value: (sizeof(void*)&lt;&lt;3) in QSysInfo::Sizes"/>
- <suppress-warning text="unmatched enum ~0u"/>
- <suppress-warning text="unmatched enum (sizeof(void*)&lt;&lt;3)"/>
- <suppress-warning text="^signature 'setCustomType(float)' for function modification in 'QEasingCurve' not found.*$"/>
- <suppress-warning text="enum 'enum_4' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'enum_5' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'FP_NORMAL' does not have a type entry or is not an enum"/>
- <suppress-warning text="Shadowing: *"/>
- <!-- QCborStreamReader: Suppress warnings about 32/64bit signatures not found depending on qsizetype -->
- <suppress-warning text="^signature 'readStringChunk\(char.*in 'QCborStreamReader' not found.*$"/>
-
- <!-- this enum is defined on Qt global header but only used in QtGui module -->
- <suppress-warning text="enum 'PM_MessageBoxHeight' does not have a type entry or is not an enum"/>
-
- <!-- this function only exists on Windows -->
- <suppress-warning text="^signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.*"/>
-
- <!-- this is necessary to avoid warning on other modules -->
- <suppress-warning text="^signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found.*"/>
- <suppress-warning text="^signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found.*"/>
-
- <!-- This enum is intenaly used -->
- <suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum"/>
-
- <!-- TODO: this need be removed -->
- <suppress-warning text="^skipping function '.*', unmatched return type '.*$"/>
- <suppress-warning text="^skipping function '.*', unmatched type '.*$"/>
-
- <suppress-warning text="enum 'q_static_assert_result39' does not have a type entry or is not an enum"/>
- <suppress-warning text="horribly broken type ''"/>
- <suppress-warning text="Pure virtual method 'QTextCodec::convertFromUnicode(const QChar*,int,QTextCodec::ConverterState*)const' must be implement but was completely removed on type system."/>
-
- <!-- Qt5.5: No idea how to get rid of the following five enums, which are moved elsewhere since 5.5: -->
- <suppress-warning text="enum 'QLocale::MeasurementSystem' is specified in typesystem, but not declared"/>
- <suppress-warning text="enum 'QState::RestorePolicy' is specified in typesystem, but not declared"/>
- <!-- <suppress-warning text="enum 'QLocale::FormatType' is specified in typesystem, but not declared"/> -->
- <suppress-warning text="enum 'QAbstractAnimation::DeletionPolicy' is specified in typesystem, but not declared"/>
- <!-- <suppress-warning text="enum 'QAbstractAnimation::State' is specified in typesystem, but not declared"/> -->
- <!-- Qt5.5: we also suppress these warnings, instead of adding wrong enums -->
- <suppress-warning text="enum 'InterfaceType' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'TextBoundaryType' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'RelationFlag' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'Role' does not have a type entry or is not an enum"/>
-
- <!-- Anonymous enum in qtbase/src/corelib/global/qtypeinfo.h -->
- <suppress-warning text="Anonymous enum (Q_COMPLEX_TYPE, ... , Q_RELOCATABLE_TYPE) does not have a type entry"/>
-
- <!-- Another anonymous enum / value pair in in qtbase/src/corelib/kernel/qcoreapplication.h -->
- <suppress-warning text="no matching enum 'QT_VERSION'"/>
- <suppress-warning text="unhandled enum value: QT_VERSION in QCoreApplication::ApplicationFlags from header 'qcoreapplication.h'"/>
- <suppress-warning text="unmatched enum QT_VERSION from header 'qcoreapplication.h'"/>
-
- <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'const QSysInfo::WinVersion'"/>
- <suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
-
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_mac.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_mac.xml
deleted file mode 100644
index 6e1a55557..000000000
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_mac.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCore">
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
- <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
- <object-type name="QAbstractEventDispatcher">
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
- <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
- <object-type name="TimerInfo"/>
- </object-type>
- <object-type name="QSysInfo">
- <enum-type name="Endian"/>
- <enum-type name="Sizes"/>
- <enum-type name="MacVersion" since="5.5"/>
- </object-type>
- <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'QSysInfo::WinVersion'"/>
- <suppress-warning text="enum 'QSysInfo::WinVersion' does not have a type entry or is not an enum"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_win.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_win.xml
deleted file mode 100644
index 6a0e1087e..000000000
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_win.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCore">
- <extra-includes>
- <include file-name="windows.h" location="global"/>
- </extra-includes>
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
- <primitive-type name="HWND">
- <!-- Qt5: Add this include there to insert ti in the global qtcore header (needed by qprocess_wrapper) -->
- <include file-name="wtypes.h" location="global"/>
- <conversion-rule>
- <native-to-target>
- return PyCapsule_New(%in, nullptr, nullptr);
- </native-to-target>
- <target-to-native>
- <add-conversion type="PyNone">
- %out = 0;
- </add-conversion>
- <add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
- %out = (%OUTTYPE)PyCapsule_GetPointer(%in, nullptr);
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
- <inject-code class="native" position="beginning">
- <insert-template name="checkPyCapsuleOrPyCObject_func"/>
- </inject-code>
-
- <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
- <object-type name="QWinEventNotifier"/>
- <object-type name="QAbstractEventDispatcher">
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
- <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
- <object-type name="TimerInfo"/>
- </object-type>
- <object-type name="QSysInfo">
- <enum-type name="Endian"/>
- <enum-type name="Sizes"/>
- <enum-type name="WinVersion" since="5.5"/>
- </object-type>
- <suppress-warning text="skipping field 'QSysInfo::MacintoshVersion' with unmatched type 'QSysInfo::MacVersion'"/>
- <suppress-warning text="enum 'QSysInfo::MacVersion' does not have a type entry or is not an enum"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_x11.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_x11.xml
deleted file mode 100644
index 88cbf7638..000000000
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_x11.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtCore">
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
- <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
- <!-- Qt5: XXX move this to QtGui <include file-name="QTextDocument" location="global"/> -->
- </primitive-type>
- <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
- <object-type name="QAbstractEventDispatcher">
- <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
- <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
- <object-type name="TimerInfo"/>
- </object-type>
- <object-type name="QSysInfo">
- <enum-type name="Endian"/>
- <enum-type name="Sizes"/>
- </object-type>
- <suppress-warning text="skipping field 'QSysInfo::MacintoshVersion' with unmatched type 'QSysInfo::MacVersion'"/>
- <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'QSysInfo::MacVersion'"/>
- <suppress-warning text="enum 'QSysInfo::MacVersion' does not have a type entry or is not an enum"/>
- <suppress-warning text="enum 'QSysInfo::WinVersion' does not have a type entry or is not an enum"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt b/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
deleted file mode 100644
index 46868fe35..000000000
--- a/sources/pyside2/PySide2/QtDataVisualization/CMakeLists.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-project(QtDataVisualization)
-
-set(QtDataVisualization_SRC
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3daxis_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcategory3daxis_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qlogvalue3daxisformatter_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxis_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxisformatter_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dseries_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstractdataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbar3dseries_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataitem_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3ditem_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dlabel_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dvolume_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qheightmapsurfacedataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelbardataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelscatterdataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelsurfacedataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatter3dseries_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataitem_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurface3dseries_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataitem_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataproxy_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dbars_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dcamera_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dlight_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dobject_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscatter_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscene_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dsurface_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dgraph_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dinputhandler_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dinputhandler_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_qtouch3dinputhandler_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dtheme_wrapper.cpp
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_wrapper.cpp
-# module is always needed
-${QtDataVisualization_GEN_DIR}/qtdatavisualization_module_wrapper.cpp
-)
-
-set(QtDataVisualization_include_dirs ${QtDataVisualization_SOURCE_DIR}
- ${QtDataVisualization_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}DataVisualization_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR})
-
-set(QtDataVisualization_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}DataVisualization_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
-
-set(QtDataVisualization_deps QtCore QtGui)
-
-create_pyside_module(NAME QtDataVisualization
- INCLUDE_DIRS QtDataVisualization_include_dirs
- LIBRARIES QtDataVisualization_libraries
- DEPS QtDataVisualization_deps
- TYPESYSTEM_PATH QtDataVisualization_SOURCE_DIR
- SOURCES QtDataVisualization_SRC)
diff --git a/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml b/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml
deleted file mode 100644
index f10aeea3e..000000000
--- a/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml
+++ /dev/null
@@ -1,422 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtDataVisualization">
-
- <load-typesystem name="templates/datavisualization_common.xml" generate="no" />
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no" />
- <namespace-type name="QtDataVisualization">
- <primitive-type name="QBarDataArray">
- <include file-name="qbardataproxy.h" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cppqlistofptrtoqvectors_to_py_conversion">
- <replace from="%INTYPE_0" to="QtDataVisualization::QBarDataItem"/>
- </insert-template>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="py_to_cppqlistofptrtoqvectors_conversion">
- <replace from="%OUTTYPE_0" to="QtDataVisualization::QBarDataItem"/>
- </insert-template>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
- <primitive-type name="QSurfaceDataArray">
- <include file-name="qsurfacedataproxy.h" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cppqlistofptrtoqvectors_to_py_conversion">
- <replace from="%INTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/>
- </insert-template>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="py_to_cppqlistofptrtoqvectors_conversion">
- <replace from="%OUTTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/>
- </insert-template>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
- </primitive-type>
-
- <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"/>
- <object-type name="QValue3DAxisFormatter">
- <modify-function signature="populateCopy(QtDataVisualization::QValue3DAxisFormatter&amp;)const">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </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(QtDataVisualization::QBarDataProxy*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <value-type name="QBarDataItem"/>
- <object-type name="QBarDataProxy">
- <modify-function signature="resetArray(QtDataVisualization::QBarDataArray*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="resetArray(QtDataVisualization::QBarDataArray*,const QStringList&amp;,const QStringList&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRows(const QtDataVisualization::QBarDataArray&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRows(const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRows(int, const QtDataVisualization::QBarDataArray&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRows(int, const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRows(int, const QtDataVisualization::QBarDataArray&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRows(int, const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QCustom3DItem"/>
- <object-type name="QCustom3DLabel"/>
- <object-type name="QCustom3DVolume"/>
- <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(QtDataVisualization::QScatterDataProxy*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <value-type name="QScatterDataItem"/>
- <object-type name="QScatterDataProxy">
- <modify-function signature="resetArray(QVector&lt;QtDataVisualization::QScatterDataItem&gt;*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addItem(const QtDataVisualization::QScatterDataItem&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addItems(const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItem(int, const QtDataVisualization::QScatterDataItem&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItems(int, const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItem(int, const QtDataVisualization::QScatterDataItem&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItems(int, const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QSurface3DSeries">
- <enum-type name="DrawFlag" flags="DrawFlags"/>
- <modify-function signature="QSurface3DSeries(QtDataVisualization::QSurfaceDataProxy*,QObject*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setDataProxy(QtDataVisualization::QSurfaceDataProxy*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <value-type name="QSurfaceDataItem"/>
- <object-type name="QSurfaceDataProxy">
- <modify-function signature="addRow(QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="resetArray(QtDataVisualization::QSurfaceDataArray*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="Q3DBars">
- <modify-function signature="addAxis(QtDataVisualization::QAbstract3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QCategory3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setRowAxis(QtDataVisualization::QCategory3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="Q3DCamera">
- <enum-type name="CameraPreset"/>
- </object-type>
- <object-type name="Q3DLight"/>
- <object-type name="Q3DObject"/>
- <object-type name="Q3DScatter">
- <modify-function signature="addAxis(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisY(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisZ(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisY(QtDataVisualization::QValue3DAxis*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAxisZ(QtDataVisualization::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="SelectionFlag" flags="SelectionFlags"/>
- <enum-type name="ShadowQuality"/>
- <modify-function signature="addCustomItem(QtDataVisualization::QCustom3DItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addInputHandler(QtDataVisualization::QAbstract3DInputHandler*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addTheme(QtDataVisualization::Q3DTheme*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="releaseCustomItem(QtDataVisualization::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(QtDataVisualization::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(QtDataVisualization::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(QtDataVisualization::QAbstract3DInputHandler*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setActiveTheme(QtDataVisualization::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>
- <extra-includes>
- <include file-name="qutils.h" location="global"/>
- </extra-includes>
- </namespace-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
deleted file mode 100644
index 7885af343..000000000
--- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt
+++ /dev/null
@@ -1,234 +0,0 @@
-project(QtGui)
-
-qt_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h")
-
-set(QtGui_DROPPED_ENTRIES)
-
-set(QtGui_SRC
-${QtGui_GEN_DIR}/qabstractfileiconprovider_wrapper.cpp
-${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
-${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp
-${QtGui_GEN_DIR}/qabstracttextdocumentlayout_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessible_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibleeditabletextinterface_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibleevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibleobject_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessiblestatechangeevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletablecellinterface_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletablemodelchangeevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextcursorevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextinsertevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextinterface_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextremoveevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextselectionevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessibletextupdateevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessiblevaluechangeevent_wrapper.cpp
-${QtGui_GEN_DIR}/qaccessiblevalueinterface_wrapper.cpp
-${QtGui_GEN_DIR}/qaction_wrapper.cpp
-${QtGui_GEN_DIR}/qactionevent_wrapper.cpp
-${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}/qclipboard_wrapper.cpp
-${QtGui_GEN_DIR}/qcloseevent_wrapper.cpp
-${QtGui_GEN_DIR}/qcolor_wrapper.cpp
-${QtGui_GEN_DIR}/qcolorspace_wrapper.cpp
-${QtGui_GEN_DIR}/qcolorconstants_wrapper.cpp
-${QtGui_GEN_DIR}/qcolorconstants_svg_wrapper.cpp
-${QtGui_GEN_DIR}/qconicalgradient_wrapper.cpp
-${QtGui_GEN_DIR}/qcontextmenuevent_wrapper.cpp
-${QtGui_GEN_DIR}/qcursor_wrapper.cpp
-${QtGui_GEN_DIR}/qdesktopservices_wrapper.cpp
-${QtGui_GEN_DIR}/qdoublevalidator_wrapper.cpp
-${QtGui_GEN_DIR}/qdrag_wrapper.cpp
-${QtGui_GEN_DIR}/qdragenterevent_wrapper.cpp
-${QtGui_GEN_DIR}/qdragleaveevent_wrapper.cpp
-${QtGui_GEN_DIR}/qdragmoveevent_wrapper.cpp
-${QtGui_GEN_DIR}/qdropevent_wrapper.cpp
-${QtGui_GEN_DIR}/qenterevent_wrapper.cpp
-${QtGui_GEN_DIR}/qeventpoint_wrapper.cpp
-${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}/qfontdatabase_wrapper.cpp
-${QtGui_GEN_DIR}/qfontinfo_wrapper.cpp
-${QtGui_GEN_DIR}/qfontmetrics_wrapper.cpp
-${QtGui_GEN_DIR}/qfontmetricsf_wrapper.cpp
-${QtGui_GEN_DIR}/qgradient_wrapper.cpp
-${QtGui_GEN_DIR}/qguiapplication_wrapper.cpp
-${QtGui_GEN_DIR}/qhelpevent_wrapper.cpp
-${QtGui_GEN_DIR}/qhideevent_wrapper.cpp
-${QtGui_GEN_DIR}/qhoverevent_wrapper.cpp
-${QtGui_GEN_DIR}/qicon_wrapper.cpp
-${QtGui_GEN_DIR}/qicondragevent_wrapper.cpp
-${QtGui_GEN_DIR}/qiconengine_scaledpixmapargument_wrapper.cpp
-${QtGui_GEN_DIR}/qiconengine_wrapper.cpp
-${QtGui_GEN_DIR}/qimage_wrapper.cpp
-${QtGui_GEN_DIR}/qimageiohandler_wrapper.cpp
-${QtGui_GEN_DIR}/qimagereader_wrapper.cpp
-${QtGui_GEN_DIR}/qimagewriter_wrapper.cpp
-${QtGui_GEN_DIR}/qinputdevice_wrapper.cpp
-${QtGui_GEN_DIR}/qinputevent_wrapper.cpp
-${QtGui_GEN_DIR}/qinputmethod_wrapper.cpp
-${QtGui_GEN_DIR}/qinputmethodevent_attribute_wrapper.cpp
-${QtGui_GEN_DIR}/qinputmethodevent_wrapper.cpp
-${QtGui_GEN_DIR}/qinputmethodqueryevent_wrapper.cpp
-${QtGui_GEN_DIR}/qintvalidator_wrapper.cpp
-${QtGui_GEN_DIR}/qkeycombination_wrapper.cpp
-${QtGui_GEN_DIR}/qkeyevent_wrapper.cpp
-${QtGui_GEN_DIR}/qkeysequence_wrapper.cpp
-${QtGui_GEN_DIR}/qlineargradient_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix2x2_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix2x3_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix2x4_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix3x2_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix3x3_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix3x4_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix4x2_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix4x3_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix4x4_wrapper.cpp
-${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}/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}/qpagesize_wrapper.cpp
-${QtGui_GEN_DIR}/qpaintdevice_wrapper.cpp
-${QtGui_GEN_DIR}/qpaintdevicewindow_wrapper.cpp
-${QtGui_GEN_DIR}/qpaintengine_wrapper.cpp
-${QtGui_GEN_DIR}/qpaintenginestate_wrapper.cpp
-${QtGui_GEN_DIR}/qpainter_pixmapfragment_wrapper.cpp
-${QtGui_GEN_DIR}/qpainter_wrapper.cpp
-${QtGui_GEN_DIR}/qpainterpath_element_wrapper.cpp
-${QtGui_GEN_DIR}/qpainterpath_wrapper.cpp
-${QtGui_GEN_DIR}/qpainterpathstroker_wrapper.cpp
-${QtGui_GEN_DIR}/qpaintevent_wrapper.cpp
-${QtGui_GEN_DIR}/qpalette_wrapper.cpp
-${QtGui_GEN_DIR}/qpdfwriter_wrapper.cpp
-${QtGui_GEN_DIR}/qpen_wrapper.cpp
-${QtGui_GEN_DIR}/qpicture_wrapper.cpp
-${QtGui_GEN_DIR}/qpixmap_wrapper.cpp
-${QtGui_GEN_DIR}/qpixmapcache_key_wrapper.cpp
-${QtGui_GEN_DIR}/qpixmapcache_wrapper.cpp
-${QtGui_GEN_DIR}/qpixelformat_wrapper.cpp
-${QtGui_GEN_DIR}/qpointerevent_wrapper.cpp
-${QtGui_GEN_DIR}/qpointingdevice_wrapper.cpp
-${QtGui_GEN_DIR}/qpointingdeviceuniqueid_wrapper.cpp
-${QtGui_GEN_DIR}/qpolygon_wrapper.cpp
-${QtGui_GEN_DIR}/qpolygonf_wrapper.cpp
-${QtGui_GEN_DIR}/qpytextobject_wrapper.cpp
-${QtGui_GEN_DIR}/qquaternion_wrapper.cpp
-${QtGui_GEN_DIR}/qradialgradient_wrapper.cpp
-${QtGui_GEN_DIR}/qregularexpressionvalidator_wrapper.cpp
-${QtGui_GEN_DIR}/qregion_wrapper.cpp
-${QtGui_GEN_DIR}/qresizeevent_wrapper.cpp
-${QtGui_GEN_DIR}/qsessionmanager_wrapper.cpp
-${QtGui_GEN_DIR}/qshortcutevent_wrapper.cpp
-${QtGui_GEN_DIR}/qshowevent_wrapper.cpp
-${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_GEN_DIR}/qscrollevent_wrapper.cpp
-${QtGui_GEN_DIR}/qscrollprepareevent_wrapper.cpp
-${QtGui_GEN_DIR}/qstatictext_wrapper.cpp
-${QtGui_GEN_DIR}/qstylehints_wrapper.cpp
-${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
-${QtGui_GEN_DIR}/qtextblockuserdata_wrapper.cpp
-${QtGui_GEN_DIR}/qtextcharformat_wrapper.cpp
-${QtGui_GEN_DIR}/qtextcursor_wrapper.cpp
-${QtGui_GEN_DIR}/qtextdocument_wrapper.cpp
-${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
-${QtGui_GEN_DIR}/qtextinlineobject_wrapper.cpp
-${QtGui_GEN_DIR}/qtextitem_wrapper.cpp
-${QtGui_GEN_DIR}/qtextlayout_formatrange_wrapper.cpp
-${QtGui_GEN_DIR}/qtextlayout_wrapper.cpp
-${QtGui_GEN_DIR}/qtextlength_wrapper.cpp
-${QtGui_GEN_DIR}/qtextline_wrapper.cpp
-${QtGui_GEN_DIR}/qtextlist_wrapper.cpp
-${QtGui_GEN_DIR}/qtextlistformat_wrapper.cpp
-${QtGui_GEN_DIR}/qtextobject_wrapper.cpp
-${QtGui_GEN_DIR}/qtextobjectinterface_wrapper.cpp
-${QtGui_GEN_DIR}/qtextoption_tab_wrapper.cpp
-${QtGui_GEN_DIR}/qtextoption_wrapper.cpp
-${QtGui_GEN_DIR}/qtexttable_wrapper.cpp
-${QtGui_GEN_DIR}/qtexttablecell_wrapper.cpp
-${QtGui_GEN_DIR}/qtexttablecellformat_wrapper.cpp
-${QtGui_GEN_DIR}/qtexttableformat_wrapper.cpp
-${QtGui_GEN_DIR}/qtoolbarchangeevent_wrapper.cpp
-${QtGui_GEN_DIR}/qtouchevent_wrapper.cpp
-${QtGui_GEN_DIR}/qtransform_wrapper.cpp
-${QtGui_GEN_DIR}/qt_wrapper.cpp
-${QtGui_GEN_DIR}/qundocommand_wrapper.cpp
-${QtGui_GEN_DIR}/qundogroup_wrapper.cpp
-${QtGui_GEN_DIR}/qundostack_wrapper.cpp
-${QtGui_GEN_DIR}/qvalidator_wrapper.cpp
-${QtGui_GEN_DIR}/qvector2d_wrapper.cpp
-${QtGui_GEN_DIR}/qvector3d_wrapper.cpp
-${QtGui_GEN_DIR}/qvector4d_wrapper.cpp
-${QtGui_GEN_DIR}/qwhatsthisclickedevent_wrapper.cpp
-${QtGui_GEN_DIR}/qwheelevent_wrapper.cpp
-${QtGui_GEN_DIR}/qwindow_wrapper.cpp
-${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp
-# module is always needed
-${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp
-)
-
-configure_file("${QtGui_SOURCE_DIR}/typesystem_gui.xml.in"
- "${QtGui_BINARY_DIR}/typesystem_gui.xml" @ONLY)
-
-configure_file("${QtGui_SOURCE_DIR}/QtGui_global.post.h.in"
- "${QtGui_BINARY_DIR}/QtGui_global.post.h" @ONLY)
-
-set(QtGui_include_dirs ${QtGui_SOURCE_DIR}
- ${QtGui_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtGui_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
-set(QtGui_deps QtCore)
-
-create_pyside_module(NAME QtGui
- INCLUDE_DIRS QtGui_include_dirs
- LIBRARIES QtGui_libraries
- DEPS QtGui_deps
- TYPESYSTEM_PATH QtGui_SOURCE_DIR
- SOURCES QtGui_SRC
- STATIC_SOURCES QPYTEXTOBJECT_MOC
- TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
- DROPPED_ENTRIES QtGui_DROPPED_ENTRIES)
-
-install(FILES ${pyside2_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide2/QtGui/)
-
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui.xml.in b/sources/pyside2/PySide2/QtGui/typesystem_gui.xml.in
deleted file mode 100644
index dfd5a9c5b..000000000
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui.xml.in
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtGui">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtGui/typesystem_gui_@AUTO_OS@.xml" generate="yes"/>
- <load-typesystem name="QtGui/typesystem_gui_common.xml" generate="yes"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
deleted file mode 100644
index e9c94e5ae..000000000
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ /dev/null
@@ -1,2864 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtGui">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="templates/core_common.xml" generate="no"/>
- <load-typesystem name="templates/gui_common.xml" generate="no"/>
- <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
-
-
- <rejection class="^Q.*$" argument-type="^QPlatform.*$"/>
- <function signature="qAlpha(uint)"/>
- <function signature="qBlue(uint)"/>
- <function signature="qGray(int,int,int)"/>
- <function signature="qGray(uint)"/>
- <function signature="qGreen(uint)"/>
- <function signature="qIsGray(uint)"/>
- <function signature="qRed(uint)"/>
- <function signature="qRgb(int,int,int)"/>
- <function signature="qRgba(int,int,int,int)"/>
- <function signature="qFuzzyCompare(QMatrix,QMatrix)"/>
- <function signature="qFuzzyCompare(QTransform,QTransform)"/>
- <function signature="qFuzzyCompare(QQuaternion,QQuaternion)"/>
- <function signature="qFuzzyCompare(QMatrix4x4,QMatrix4x4)"/>
- <function signature="qFuzzyCompare(QVector2D,QVector2D)"/>
- <function signature="qFuzzyCompare(QVector3D,QVector3D)"/>
- <function signature="qFuzzyCompare(QVector4D,QVector4D)"/>
- <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 ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
- <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
- <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,
- besides the fact they are accessible by ordinary event methods.
- -->
-
- <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"/>
-
- <!-- For Qt::mightBeRichText(QString), Qt::convertFromPlainText(QString,Qt::WhiteSpaceMode)
- Match on files from '/QtGui/' (shadow build) or '/gui/' (developer build)
- or '/QtGui.framework' (macOS) -->
- <namespace-type name="Qt" files="^.*/(gui|QtGui)[/.].*\.h$" extends="PySide2.QtCore"/>
-
- <primitive-type name="WId" 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>
-
- <object-type name="QAbstractFileIconProvider" since="6.0">
- <enum-type name="IconType"/>
- <enum-type name="Option" flags="Options"/>
- </object-type>
-
- <value-type name="QAccessible">
- <value-type name="State"/>
- <enum-type name="Event"/>
- <enum-type name="Role"/>
- <enum-type name="Text"/>
- <enum-type name="RelationFlag" flags="Relation"/>
- <enum-type name="InterfaceType"/>
- <enum-type name="TextBoundaryType"/>
- </value-type>
-
- <object-type name="QAccessibleEditableTextInterface"/>
- <object-type name="QAccessibleInterface"/>
- <object-type name="QAccessibleObject"/>
- <object-type name="QAccessibleTableCellInterface"/>
- <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">
- <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="QAction">
- <enum-type name="ActionEvent"/>
- <enum-type name="MenuRole"/>
- <enum-type name="Priority" since="4.6"/>
- <modify-function signature="setMenu(QMenu*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="triggered(bool)" allow-thread="yes"/>
- </object-type>
- <object-type name="QActionGroup">
- <enum-type name="ExclusionPolicy" since="5.14"/>
- <modify-function signature="addAction(QAction*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeAction(QAction*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QShortcut">
- <add-function signature="QShortcut(QKeySequence&amp;,QObject*,PyCallable*,Qt::ShortcutContext)">
- <modify-argument index="4">
- <replace-default-expression with="Qt::WindowShortcut"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qshortcut-1"/>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qshortcut-2"/>
- </add-function>
- </object-type>
-
- <value-type name="QTransform">
- <enum-type name="TransformationType"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f, %f, %f, %f, %f, %f, %f"/>
- <replace from="%REPR_ARGS"
- to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="ddddddddd"/>
- <replace from="%REDUCE_ARGS"
- to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <modify-function signature="map(qreal,qreal,qreal*,qreal*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <!-- ### This is just an overload to "map(qreal,qreal,qreal*,qreal*)const" and can be discarded in Python -->
- <modify-function signature="map(int,int,int*,int*)const" remove="all"/>
- <!-- ### -->
-
- <modify-function signature="inverted(bool*)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
- <add-function signature="quadToQuad(QPolygonF&amp;,QPolygonF&amp;)" return-type="PyObject*" static="true">
- <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtoquad"/>
- </add-function>
- <add-function signature="quadToSquare(QPolygonF &amp;)" return-type="PyObject*" static="true">
- <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtosquare"/>
- </add-function>
-
- <add-function signature="squareToQuad(QPolygonF &amp;)" return-type="PyObject*" static="true">
- <inject-code file="../glue/qtgui.cpp" snippet="qtransform-squaretoquad"/>
- </add-function>
- <!-- Disambiguate from Qt3DCore/qtransform.h -->
- <include file-name="QtGui/qtransform.h" location="global"/>
- </value-type>
-
- <value-type name="QStaticText">
- <enum-type name="PerformanceHint"/>
- </value-type>
- <value-type name="QTextFragment"/>
- <value-type name="QBitmap" >
- <modify-function signature="fromData(QSize,const uchar*,QImage::Format)">
- <modify-argument index="2">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code file="../glue/qtgui.cpp" snippet="qbitmap-fromdata"/>
- </modify-function>
- </value-type>
- <value-type name="QTextInlineObject"/>
- <value-type name="QTextDocumentFragment"/>
- <value-type name="QTextOption">
- <enum-type name="Flag" flags="Flags"/>
- <enum-type name="TabType"/>
- <enum-type name="WrapMode"/>
- <value-type name="Tab"/>
- </value-type>
- <value-type name="QTextLine" >
- <enum-type name="CursorPosition"/>
- <enum-type name="Edge"/>
- <modify-function signature="cursorToX(int*,QTextLine::Edge)const" remove="all"/>
- <modify-function signature="cursorToX(int,QTextLine::Edge)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qtextline-cursortox"/>
- </modify-function>
- <modify-function signature="xToCursor(qreal,QTextLine::CursorPosition)const">
- <modify-argument index="2">
- <rename to="edge"/>
- </modify-argument>
- </modify-function>
- </value-type>
- <value-type name="QTextTableFormat"/>
- <value-type name="QTextImageFormat"/>
- <value-type name="QTextFrameFormat" >
- <enum-type name="BorderStyle"/>
- <enum-type name="Position"/>
- </value-type>
- <value-type name="QTextLength">
- <enum-type name="Type"/>
- </value-type>
- <value-type name="QPainterPath">
- <enum-type name="ElementType"/>
- <value-type name="Element">
- <include file-name="QPainterPath" location="global"/>
- </value-type>
- </value-type>
- <value-type name="QPalette">
- <enum-type name="ColorGroup"/>
- <enum-type name="ColorRole"/>
- </value-type>
- <object-type name="QInputMethod">
- <enum-type name="Action"/>
- </object-type>
- <value-type name="QKeyCombination"/>
- <value-type name="QKeySequence">
- <enum-type name="SequenceFormat"/>
- <enum-type name="SequenceMatch"/>
- <enum-type name="StandardKey"/>
-
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="qkeysequence_repr"/>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="iiii"/>
- <replace from="%REDUCE_ARGS" to="(*%CPPSELF)[0], (*%CPPSELF)[1], (*%CPPSELF)[2], (*%CPPSELF)[3]"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <modify-function signature="operator[](uint)const" remove="all"/>
- <add-function signature="__getitem__">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qkeysequence-getitem"/>
- </add-function>
-
- <!-- ### Not necessary due the PySide QVariant conversion rules -->
- <modify-function signature="operator QVariant()const" remove="all"/>
- </value-type>
- <value-type name="QPicture" >
- <modify-function signature="load(QIODevice*)" allow-thread="yes"/>
- <modify-function signature="load(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="save(QIODevice*)" allow-thread="yes"/>
- <modify-function signature="save(const QString&amp;)" allow-thread="yes"/>
- <!-- See bug 759 -->
- <modify-function signature="data()const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code file="../glue/qtgui.cpp" snippet="qpicture-data"/>
- </modify-function>
- <modify-function signature="setData(const char*,uint)">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- <conversion-rule class="target">
- <insert-template name="const_char_pybuffer"/>
- </conversion-rule>
- <conversion-rule class="native">
- <insert-template name="pybuffer_const_char"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="uint_remove"/>
- </conversion-rule>
- </modify-argument>
- </modify-function>
- </value-type>
- <value-type name="QRegion" >
- <enum-type name="RegionType"/>
- <!-- ### This operator does not make sense in Python. -->
- <modify-function signature="operator&amp;=(QRegion)" remove="all"/>
- <modify-function signature="operator&amp;=(QRect)" remove="all"/>
- <!-- ### -->
- </value-type>
-
- <value-type name="QTextBlock">
- <value-type name="iterator" >
- <include file-name="QTextBlock" location="global"/>
- <!-- ### These operators where removed because they don't make sense in Python.
- The iterator methods (__iter__, next) replace this functionality. -->
- <modify-function signature="operator++()" remove="all"/>
- <modify-function signature="operator--()" remove="all"/>
- <!-- ### -->
- <add-function signature="__iter__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__iter__"/>
- </inject-code>
- </add-function>
- <add-function signature="__next__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__next__">
- <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
- <add-function signature="__iter__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__iter_parent__">
- <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
- </insert-template>
- </inject-code>
- </add-function>
- <modify-function signature="setUserData(QTextBlockUserData*)">
- <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-setuserdata"/>
- </modify-function>
- <modify-function signature="userData()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-userdata"/>
- </modify-function>
- </value-type>
- <value-type name="QTextBlockFormat">
- <enum-type name="LineHeightTypes" since="4.8" revision="4800"/>
- <enum-type name="MarkerType" since="5.14"/>
- </value-type>
- <value-type name="QTextTableCellFormat"/>
- <value-type name="QTextCharFormat" >
- <enum-type name="FontPropertiesInheritanceBehavior"/>
- <enum-type name="UnderlineStyle"/>
- <enum-type name="VerticalAlignment"/>
- </value-type>
- <value-type name="QTextFormat" >
- <enum-type name="FormatType"/>
- <enum-type name="ObjectTypes"/>
- <enum-type name="PageBreakFlag" flags="PageBreakFlags"/>
- <enum-type name="Property"/>
- </value-type>
- <value-type name="QTextListFormat">
- <enum-type name="Style"/>
- </value-type>
- <value-type name="QPolygon">
- <extra-includes>
- <include file-name="QTransform" location="global"/>
- </extra-includes>
- <!-- Expose operator==, != inherited from QList, which the parser does
- not see due to the TMP expression of the return type. -->
- <add-function signature="operator==(const QPolygon&amp;)" return-type="bool"/>
- <add-function signature="operator!=(const QPolygon&amp;)" return-type="bool"/>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpolygon-reduce">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="N"/>
- <replace from="%REDUCE_ARGS" to="points"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!-- ### "QPolygon(int, const int*)" is an internal constructor. -->
- <modify-function signature="QPolygon(int,const int*)" remove="all"/>
- <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
- <modify-function signature="operator+=(QVector&lt;QPoint&gt;)" remove="all"/>
- <add-function signature="operator&lt;&lt;(QPoint)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
- </add-function>
- <add-function signature="operator&lt;&lt;(QVector&lt;QPoint&gt;)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
- </add-function>
- <!-- ### -->
- </value-type>
- <value-type name="QPolygonF">
- <extra-includes>
- <include file-name="QTransform" location="global"/>
- </extra-includes>
- <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
- <modify-function signature="operator+=(QVector&lt;QPointF&gt;)" remove="all"/>
- <!-- ### See bug 776 -->
- <modify-function signature="operator&lt;&lt;(QPointF)" remove="all"/>
- <!-- ### See bug 777 -->
- <modify-function signature="operator&lt;&lt;(QVector&lt;QPointF&gt;)" remove="all"/>
- <!-- ### -->
- </value-type>
- <value-type name="QIcon" >
- <enum-type name="Mode"/>
- <enum-type name="State"/>
- <modify-function signature="QIcon(QIconEngine*)">
- <modify-argument index="1">
- <no-null-pointer/>
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <value-type name="QPixmap" >
- <!--<conversion-rule>-->
- <!--<target-to-native replace="no">-->
- <!--<add-conversion type="QVariant" check="%CHECKTYPE[QVariant](%in)">-->
- <!--QVariant in = %CONVERTTOCPP[QVariant](%in);-->
- <!--%out = in.value&lt;%OUTTYPE&gt;();-->
- <!--</add-conversion>-->
- <!--</target-to-native>-->
- <!--</conversion-rule>-->
- <add-function signature="QPixmap(const QImage&amp;)">
- <modify-argument index="1">
- <rename to="image"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpixmap"/>
- </add-function>
- <modify-function signature="QPixmap(const char*const[])">
- <modify-argument index="1">
- <replace-type modified-type="PySequence"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="load_xpm"/>
- </inject-code>
- </modify-function>
-
- <!-- ### Operator ! doesn't make sense in Python. -->
- <modify-function signature="operator!()const" remove="all"/>
-
- <modify-function signature="loadFromData(const uchar*,uint,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
- <inject-documentation format="target" mode="append">
- This method must be used with an QPixmap object, not the class:
-
- ::
-
- # Wrong
- pixmap = QPixmap.loadFromData(...)
-
- # Right
- pixmap = QPixmap().loadFromData(...)
-
- </inject-documentation>
- <modify-argument index="1">
- <replace-type modified-type="PyBytes"/>
- <conversion-rule class="native">
- <insert-template name="pybytes_const_uchar"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="pybytes_uint"/>
- </conversion-rule>
- </modify-argument>
- </modify-function>
- </value-type>
- <value-type name="QTextCursor" >
- <extra-includes>
- <include file-name="QTextBlock" location="global"/>
- <include file-name="QTextDocumentFragment" location="global"/>
- </extra-includes>
- <enum-type name="MoveMode"/>
- <enum-type name="MoveOperation"/>
- <enum-type name="SelectionType"/>
- <modify-function signature="selectedTableCells(int*,int*,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- <inject-code class="native" position="end">
- <insert-template name="fix_native_return_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="currentFrame()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTable(int,int,const QTextTableFormat &amp;)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTable(int,int)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <value-type name="QConicalGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::ConicalGradient"/>
- <value-type name="QFontInfo"/>
- <value-type name="QRadialGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::RadialGradient"/>
- <value-type name="QFont" >
- <enum-type name="Capitalization"/>
- <enum-type name="SpacingType"/>
- <enum-type name="Stretch"/>
- <enum-type name="Style"/>
- <enum-type name="StyleHint"/>
- <enum-type name="StyleStrategy"/>
- <enum-type name="Weight"/>
- <enum-type name="HintingPreference" since="4.8" revision="4800"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- <modify-function signature="setStyleHint(QFont::StyleHint,QFont::StyleStrategy)">
- <modify-argument index="2">
- <rename to="strategy"/>
- </modify-argument>
- </modify-function>
- </value-type>
- <value-type name="QTextTableCell" >
- <extra-includes>
- <include file-name="QTextCursor" location="global"/>
- </extra-includes>
- </value-type> <!--
- <function signature="QImageCleanupFunction(void*)">
- <extra-includes>
- <include file-name="QImage" location="global"/>
- </extra-includes>
- </function> -->
- <primitive-type name="QImageCleanupFunction"/>
- <value-type name="QImage">
- <enum-type name="Format"/>
- <enum-type name="InvertMode"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
-
- <modify-function signature="load(const QString&amp;, const char*)" allow-thread="yes"/>
- <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
- <modify-function signature="save(const QString&amp;,const char*,int)const" allow-thread="yes"/>
- <modify-function signature="save(QIODevice*,const char*,int)const" allow-thread="yes"/>
-
- <modify-function signature="QImage(uchar*,int,int,qsizetype,QImage::Format,QImageCleanupFunction,void*)">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code>
- <insert-template name="qimage_buffer_constructor">
- <replace from="%ARGS" to="%2, %3, %4, %5"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="QImage(uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)">
- <modify-argument index="1">
- <replace-type modified-type="PyBuffer"/>
- </modify-argument>
- <inject-code>
- <insert-template name="qimage_buffer_constructor">
- <replace from="%ARGS" to="%2, %3, %4"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <add-function signature="QImage(QString&amp;,int,int,int,QImage::Format)">
- <inject-code>
- <insert-template name="qimage_buffer_constructor">
- <replace from="%ARGS" to="%2, %3, %4, %5"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QImage(QString&amp;,int,int,QImage::Format)">
- <inject-code>
- <insert-template name="qimage_buffer_constructor">
- <replace from="%ARGS" to="%2, %3, %4"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!-- The non-const versions are already used -->
- <modify-function signature="QImage(const uchar*,int,int,qsizetype,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
- <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
- <!-- ### -->
-
- <modify-function signature="QImage(const char*const[])">
- <modify-argument index="1">
- <replace-type modified-type="PySequence"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="load_xpm"/>
- </inject-code>
- </modify-function>
- <!-- ### There is already an fromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
- <modify-function signature="fromData(const uchar*,int,const char*)" remove="all"/>
- <!-- ### There is already an loadFromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
- <modify-function signature="loadFromData(const uchar*,int,const char*)" remove="all"/>
-
- <modify-function signature="constBits()const" since="4.7">
- <inject-code file="../glue/qtgui.cpp" snippet="qimage-constbits"/>
- </modify-function>
- <modify-function signature="bits()">
- <inject-code file="../glue/qtgui.cpp" snippet="qimage-bits"/>
- </modify-function>
- <modify-function signature="constScanLine(int)const" since="4.7">
- <inject-code file="../glue/qtgui.cpp" snippet="qimage-constscanline"/>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="scanLine(int)">
- <inject-code file="../glue/qtgui.cpp" snippet="qimage-scanline"/>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- </modify-function>
- <!--
- Only the non-const version of bits() and scanLine() is exported to Python
- If the user don't want to detach the QImage data he must use constBits or constScanLine
- as Python doesn't have the concept of constness.
- -->
- <modify-function signature="bits()const" remove="all"/>
- <modify-function signature="scanLine(int)const" remove="all"/>
-
- <modify-function signature="invertPixels(QImage::InvertMode)">
- <modify-argument index="1">
- <rename to="mode"/>
- </modify-argument>
- </modify-function>
- </value-type>
- <value-type name="QCursor" >
- <extra-includes>
- <include file-name="QPixmap" location="global"/>
- <include file-name="Qt" location="global"/>
- </extra-includes>
- </value-type>
- <value-type name="QFontDatabase" >
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- </extra-includes>
- <enum-type name="SystemFont"/>
- <enum-type name="WritingSystem"/>
- </value-type>
- <value-type name="QPen">
- <extra-includes>
- <include file-name="QBrush" location="global"/>
- </extra-includes>
- </value-type>
- <value-type name="QBrush">
- <extra-includes>
- <include file-name="QPixmap" location="global"/>
- </extra-includes>
- </value-type>
-
- <value-type name="QColor">
- <enum-type name="NameFormat"/>
- <enum-type name="Spec"/>
- <extra-includes>
- <include file-name="QVariant" location="global"/>
- </extra-includes>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="qcolor_repr"/>
- </inject-code>
- </add-function>
- <add-function signature="__str__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="qcolor_repr"/>
- </inject-code>
- </add-function>
- <add-function signature="__setstate__(PyObject*)" return-type="PyObject">
- <inject-code file="../glue/qtgui.cpp" snippet="qcolor-setstate"/>
- </add-function>
- <add-function signature="__reduce__" return-type="PyObject">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-reduce"/>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-totuple"/>
- </add-function>
- <!-- ### "QColor(QColor::Spec)" is an internal method. -->
- <modify-function signature="QColor(QColor::Spec)" remove="all"/>
- <!-- ### Constructor removed because we already have an overload using QString. -->
- <modify-function signature="QColor(const char*)" remove="all"/>
- <!-- ### -->
- <add-function signature="QColor(QVariant)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor"/>
- </add-function>
- <!-- get* methods. Inject code -->
- <modify-function signature="getCmyk(int*,int*,int*,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
-
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getCmykF(float*,float*,float*,float*,float*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
-
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*,number*">
- <replace from="$TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getHsl(int*,int*,int*,int*)const" since="4.6">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getHslF(float*,float*,float*,float*)const" since="4.6">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getHsv(int*,int*,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getHsvF(float*,float*,float*,float*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getRgb(int*,int*,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getRgbF(float*,float*,float*,float*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject*"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </modify-function>
- </value-type>
-
- <namespace-type name="QColorConstants" since="5.14">
- <extra-includes>
- <include file-name="QColor" location="global"/>
- </extra-includes>
- <namespace-type name="Svg" since="5.14">
- <extra-includes>
- <include file-name="QColor" location="global"/>
- </extra-includes>
- </namespace-type>
- </namespace-type>
-
- <value-type name="QColorSpace" since="5.14">
- <enum-type name="NamedColorSpace"/>
- <enum-type name="Primaries"/>
- <enum-type name="TransferFunction"/>
- </value-type>
-
- <value-type name="QFontMetricsF" >
-
- <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
- <modify-argument index="1">
- <replace-type modified-type="char"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="QFontCharFix"/>
- </inject-code>
- </modify-function>
-
- <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
- <modify-argument index="1">
- <replace-type modified-type="char"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="QFontCharFix"/>
- </inject-code>
- </modify-function>
-
- <modify-function signature="boundingRect(QRectF,int,QString,int,int*)const">
- <modify-argument index="5">
- <replace-type modified-type="PyObject"/>
- <array/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-boundingrect"/>
- </modify-function>
-
- <modify-function signature="size(int,QString,int,int*)const">
- <modify-argument index="4">
- <replace-type modified-type="PyObject"/>
- <array/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-size"/>
- </modify-function>
- </value-type>
- <value-type name="QFontMetrics" >
-
- <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
- <modify-argument index="1">
- <replace-type modified-type="char"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="QFontCharFix"/>
- </inject-code>
- </modify-function>
-
- <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
- <modify-argument index="1">
- <replace-type modified-type="char"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="QFontCharFix"/>
- </inject-code>
- </modify-function>
-
- <modify-function signature="boundingRect(int,int,int,int,int,QString,int,int*)const">
- <modify-argument index="8">
- <replace-type modified-type="PyObject"/>
- <array/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-1"/>
- </modify-function>
-
- <modify-function signature="boundingRect(QRect,int,QString,int,int*)const">
- <modify-argument index="5">
- <replace-type modified-type="PyObject"/>
- <array/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-2"/>
- </modify-function>
-
- <modify-function signature="size(int,QString,int,int*)const">
- <modify-argument index="4">
- <replace-type modified-type="PyObject"/>
- <array/>
- </modify-argument>
- <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">
- <enum-type name="CoordinateMode"/>
- <enum-type name="InterpolationMode"/>
- <enum-type name="Preset" since="5.12"/>
- <enum-type name="Spread"/>
- <enum-type name="Type"/>
- </value-type>
- <value-type name="QLinearGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::LinearGradient"/>
- <object-type name="QPaintDevice">
- <enum-type name="PaintDeviceMetric"/>
- </object-type>
- <object-type name="QPagedPaintDevice">
- <enum-type name="PageSize"/>
- <enum-type name="PdfVersion" since="5.10"/>
- </object-type>
- <object-type name="QAbstractTextDocumentLayout">
- <value-type name="PaintContext" >
- <include file-name="QAbstractTextDocumentLayout" location="global"/>
- </value-type>
- <value-type name="Selection"/>
- <modify-function signature="setPaintDevice(QPaintDevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="draw(QPainter*,QAbstractTextDocumentLayout::PaintContext)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawInlineObject(QPainter*,QRectF,QTextInlineObject,int,QTextFormat)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="update(const QRectF &amp;)" allow-thread="yes"/>
- </object-type>
- <object-type name="QPyTextObject"/>
-
- <object-type name="QDesktopServices" since="4.2">
- <modify-function signature="openUrl(const QUrl&amp;)" allow-thread="yes"/>
- </object-type>
- <object-type name="QDoubleValidator">
- <enum-type name="Notation"/>
- </object-type>
- <object-type name="QIconEngine">
- <object-type name="ScaledPixmapArgument"/>
- <enum-type name="IconEngineHook"/>
- <modify-function signature="paint(QPainter*,QRect,QIcon::Mode,QIcon::State)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="read(QDataStream&amp;)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="write(QDataStream&amp;)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <!-- ### This makes little sense in Python. Could be reassessed later. -->
- <modify-function signature="virtual_hook(int,void*)" remove="all"/>
- </object-type>
- <object-type name="QImageWriter">
- <enum-type name="ImageWriterError"/>
- <modify-function signature="setDevice(QIODevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="write(const QImage&amp;)" allow-thread="yes"/>
- </object-type>
- <object-type name="QIntValidator"/>
-
- <object-type name="QPainterPathStroker" copyable="false"/>
- <object-type name="QPixmapCache">
- <value-type name="Key"/>
- <add-function signature="find(QPixmapCache::Key&amp;)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpixmapcache-find"/>
- </add-function>
- <add-function signature="find(const QString&amp;)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpixmapcache-find"/>
- </add-function>
- </object-type>
-
- <object-type name="QRegularExpressionValidator"/>
-
- <object-type name="QStandardItem">
- <enum-type name="ItemType"/>
- <modify-function signature="operator&lt;(QStandardItem)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="read(QDataStream&amp;)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="write(QDataStream&amp;)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
-
- <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="appendRow(QStandardItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="appendRows(const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRows(int,const QList&lt;QStandardItem*&gt; &amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setChild(int,int,QStandardItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-1"/>
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setChild(int,QStandardItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-2"/>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="takeChild(int,int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="clone()const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <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*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setDocument(QTextDocument*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="document()const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QTextBlockGroup"/>
- <object-type name="QTextBlockUserData"/>
- <object-type name="QTextItem">
- <enum-type name="RenderFlag" flags="RenderFlags"/>
- </object-type>
- <object-type name="QTextList"/>
- <object-type name="QTextObject"/>
- <object-type name="QTextObjectInterface" >
- <modify-function signature="drawObject(QPainter*,QRectF,QTextDocument*,int,QTextFormat)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
-
- <object-type name="QValidator">
- <enum-type name="State"/>
- <modify-function signature="fixup(QString &amp;)const">
- <modify-argument index="return">
- <replace-type modified-type="QString"/>
- </modify-argument>
- <inject-code class="native" position="end">
- <insert-template name="return_QString_native"/>
- </inject-code>
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qstring-return"/>
- </modify-function>
- <modify-function signature="validate(QString &amp;,int &amp;)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- <conversion-rule class="native">
- <insert-template name="validator_conversionrule"/>
- </conversion-rule>
- </modify-argument>
- <inject-code class="target" position="end">
- <insert-template name="return_tuple_QValidator_QString_int"/>
- </inject-code>
- </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">
- <enum-type name="Reason"/>
- </object-type>
-
- <value-type name="QEventPoint" since="6.0">
- <enum-type name="State"/>
- </value-type>
- <object-type name="QDragEnterEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragEnter"/>
- <object-type name="QDragLeaveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragLeave"/>
- <object-type name="QDragMoveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragMove"/>
- <object-type name="QDropEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Drop">
- <modify-function signature="source()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-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="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="QInputMethodEvent" copyable="no" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethod">
- <!-- only declare this if ndef QT_NO_INPUTMETHOD -->
- <enum-type name="AttributeType"/>
- <value-type name="Attribute">
- <include file-name="QInputMethodEvent" location="global"/>
- </value-type>
- <!-- endif ndef QT_NO_INPUTMETHOD -->
- </object-type>
- <object-type name="QInputMethodQueryEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethodQuery"/>
-
- <object-type name="QMoveEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Move"/>
- <object-type name="QNativeGestureEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::NativeGesture"/>
- <object-type name="QResizeEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Resize"/>
- <object-type name="QShortcutEvent" copyable = "false" polymorphic-id-expression="%1-&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="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"/>
- <!-- 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="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">
- <add-function signature="operator!=(QKeySequence::StandardKey)">
- <inject-code class="target" file="../glue/qtgui.cpp" snippet="qkeyevent-operatornotequal"/>
- </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="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">
- <enum-type name="ScrollState"/>
- </object-type>
- <object-type name="QPointerEvent" copyable= "false" since="6.0"/>
- <object-type name="QScrollPrepareEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ScrollPrepare"/>
-
- <object-type name="QTextFrame" >
- <extra-includes>
- <include file-name="QTextCursor" location="global"/>
- </extra-includes>
- <value-type name="iterator" >
- <include file-name="QTextFrame" location="global"/>
- <!-- ### These operators where removed because they don't make sense in Python.
- Instead iterator methods (__iter__, next) should be implemented.
- See bug 688 -->
- <modify-function signature="operator++()" remove="all"/>
- <modify-function signature="operator--()" remove="all"/>
- <!-- ### -->
- <add-function signature="__iter__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__iter__"/>
- </inject-code>
- </add-function>
- <add-function signature="__next__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__next__">
- <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
- <add-function signature="__iter__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__iter_parent__">
- <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
- </insert-template>
- </inject-code>
- </add-function>
- </object-type>
- <object-type name="QImageIOHandler">
- <extra-includes>
- <include file-name="QRect" location="global"/>
- </extra-includes>
- <enum-type name="ImageOption"/>
- <enum-type name="Transformation" flags="Transformations" since="5.5"/>
- <modify-function signature="setDevice(QIODevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QImageReader">
- <extra-includes>
- <include file-name="QColor" location="global"/>
- <include file-name="QRect" location="global"/>
- <include file-name="QSize" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QImage" location="global"/>
- </extra-includes>
- <enum-type name="ImageReaderError"/>
- <!-- ### This method does not make sense in Python.
- Update: perhaps it does, but no one is missing it. -->
- <modify-function signature="read(QImage*)" remove="all"/>
- <modify-function signature="read()" allow-thread="yes"/>
- <modify-function signature="setDevice(QIODevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QMovie">
- <extra-includes>
- <include file-name="QColor" location="global"/>
- <include file-name="QImage" location="global"/>
- <include file-name="QPixmap" location="global"/>
- <include file-name="QRect" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <enum-type name="CacheMode"/>
- <enum-type name="MovieState"/>
- <!-- ### "cacheMode()" is an internal method. -->
- <modify-function signature="setDevice(QIODevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QDrag">
- <extra-includes>
- <include file-name="QPoint" location="global"/>
- <include file-name="QPixmap" location="global"/>
- </extra-includes>
- <modify-function signature="QDrag(QObject*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="source()const">
- <modify-argument index="return">
- <define-ownership owner="target"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="target()const">
- <modify-argument index="return">
- <define-ownership owner="target"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setMimeData(QMimeData*)">
- <modify-argument index="1">
- <!-- TODO: maybe this is not the best solution -->
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;)" rename="exec_" allow-thread="yes"/>
- <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;,Qt::DropAction)" rename="exec_" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%1)">
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <modify-function signature="takeItem(int,int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeHorizontalHeaderItem(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeVerticalHeaderItem(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="verticalHeaderItem(int)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="horizontalHeaderItem(int)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="invisibleRootItem()const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="item(int,int)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="itemFromIndex(const QModelIndex&amp;)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="itemPrototype()const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt;&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="appendRow(QStandardItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertRow(int,QStandardItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setHorizontalHeaderItem(int,QStandardItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setItem(int,int,QStandardItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-1"/>
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItem(int,QStandardItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-2"/>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemPrototype(const QStandardItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setVerticalHeaderItem(int,QStandardItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setverticalheaderitem"/>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="takeColumn(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="takeRow(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="findItems(const QString&amp;,QFlags&lt;Qt::MatchFlag&gt;,int)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt;&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt;&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt;&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="clear()">
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-clear"/>
- </modify-function>
- </object-type>
- <object-type name="QClipboard">
- <extra-includes>
- <include file-name="QImage" location="global"/>
- <include file-name="QPixmap" location="global"/>
- </extra-includes>
- <enum-type name="Mode"/>
- <modify-function signature="setMimeData(QMimeData*,QClipboard::Mode)" allow-thread="yes">
- <modify-argument index="1">
- <!-- TODO: maybe this is not the best solution -->
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="text(QString&amp;,QClipboard::Mode)const">
- <modify-argument index="2">
- <replace-default-expression with="QClipboard::Clipboard"/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, subtype)"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/>
- </modify-function>
- </object-type>
- <object-type name="QPaintEngineState">
- <extra-includes>
- <include file-name="QPainterPath" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QTextLayout">
- <extra-includes>
- <include file-name="QTextOption" location="global"/>
- </extra-includes>
- <enum-type name="CursorMode"/>
- <value-type name="FormatRange">
- <include file-name="QTextLayout" location="global"/>
- </value-type>
- </object-type>
- <object-type name="QTextDocument">
- <extra-includes>
- <include file-name="QTextBlock" location="global"/>
- <include file-name="QTextFormat" location="global"/>
- <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="MetaInformation"/>
- <enum-type name="ResourceType"/>
- <enum-type name="Stacks" since="4.7"/>
- <modify-function signature="setDocumentLayout(QAbstractTextDocumentLayout*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="object(int)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="objectForFormat(const QTextFormat&amp;)const">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="createObject(const QTextFormat&amp;)">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
- </object-type>
- <object-type name="QTextDocumentWriter" since="4.5"/>
- <object-type name="QTextTable">
- <extra-includes>
- <include file-name="QTextCursor" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QPaintEngine">
- <enum-type name="DirtyFlag" flags="DirtyFlags"/>
- <enum-type name="PaintEngineFeature" flags="PaintEngineFeatures"/>
- <enum-type name="PolygonDrawMode"/>
- <enum-type name="Type"/>
- <modify-function signature="begin(QPaintDevice*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="updateState(QPaintEngineState)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawTextItem(QPointF,QTextItem)">
- <modify-argument index="2" invalidate-after-use="yes"/>
- </modify-function>
- <extra-includes>
- <include file-name="QVarLengthArray" location="global"/>
- </extra-includes>
- <!-- ### "setPaintDevice(QPaintDevice*)" is an internal method. -->
- <modify-function signature="setPaintDevice(QPaintDevice*)" remove="all"/>
- </object-type>
- <object-type name="QPainter">
- <extra-includes>
- <include file-name="QPainterPath" location="global"/>
- <include file-name="QPixmap" location="global"/>
- </extra-includes>
- <enum-type name="CompositionMode"/>
- <enum-type name="PixmapFragmentHint" flags="PixmapFragmentHints" since="4.7"/>
- <enum-type name="RenderHint" flags="RenderHints"/>
- <value-type name="PixmapFragment" since="4.7">
- <include file-name="QPainter" location="global"/>
- </value-type>
-
- <!-- ### "drawText(...)" is an internal method. -->
- <modify-function signature="drawText(const QPointF&amp;,const QString&amp;,int,int)" remove="all"/>
-
-
- <modify-function signature="drawConvexPolygon(const QPoint*,int)" remove="all"/>
- <add-function signature="drawConvexPolygon(QVector&lt;QPoint>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <modify-function signature="drawConvexPolygon(const QPointF*,int)" remove="all"/>
- <add-function signature="drawConvexPolygon(QVector&lt;QPointF>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <!-- ### Overloads using QVector<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"/>
- <!-- ### -->
- <modify-function signature="drawPoints(const QPoint*,int)" remove="all"/>
- <add-function signature="drawPoints(QVector&lt;QPoint>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <modify-function signature="drawPoints(const QPointF*,int)" remove="all"/>
- <add-function signature="drawPoints(QVector&lt;QPointF>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <modify-function signature="drawPolygon(const QPoint*,int,Qt::FillRule)" remove="all"/>
- <add-function signature="drawPolygon(QVector&lt;QPoint>,Qt::FillRule)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
- </add-function>
- <modify-function signature="drawPolygon(const QPointF*,int,Qt::FillRule)" remove="all"/>
- <add-function signature="drawPolygon(QVector&lt;QPointF>,Qt::FillRule)">
- <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
- </add-function>
- <modify-function signature="drawPolyline(const QPoint*,int)" remove="all"/>
- <add-function signature="drawPolyline(QVector&lt;QPoint>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <!-- PYSIDE-1366: Preferably use the QPolygon overloads first to avoid
- a costly sequence type check on QPolygon. -->
- <modify-function signature="drawPolyline(const QPointF*,int)" remove="all"/>
- <modify-function signature="drawPolyline(const QPolygon&amp;)" overload-number="0"/>
- <modify-function signature="drawPolyline(const QPolygonF&amp;)" overload-number="1"/>
- <add-function signature="drawPolyline(QVector&lt;QPointF>)">
- <inject-code>
- <insert-template name="qpainter_drawlist"/>
- </inject-code>
- </add-function>
- <modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;,const QPoint&amp;)">
- <modify-argument index="3">
- <rename to="pos"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QPainter(QPaintDevice*)">
- <modify-argument index="1">
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="begin(QPaintDevice*)">
- <modify-argument index="1">
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="drawText(QRectF,int,QString,QRectF*)">
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="QRectF"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,QRectF*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="drawText(QRect,int,QString,QRect*)">
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="QRect"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,QRect*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="drawText(int,int,int,int,int,QString,QRect*)">
- <modify-argument index="7">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,QRect*"/>
- </inject-code>
- </modify-function>
- </object-type>
-
- <value-type name="QGenericMatrix" generate="no"/>
- <value-type name="QMatrix2x2" since="4.6">
- <modify-function signature="QMatrix2x2(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="4"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="4"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix2x2(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="4"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="4"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix2x3" since="4.6">
- <modify-function signature="QMatrix2x3(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="6"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix2x3(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix2x4" since="4.6">
- <modify-function signature="QMatrix2x4(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="8"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix2x4(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix3x2" since="4.6">
- <modify-function signature="QMatrix3x2(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="6"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix3x2(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="6"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix3x3" since="4.6">
- <modify-function signature="QMatrix3x3(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="9"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="9"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix3x3(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="9"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="9"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix3x4" since="4.6">
- <modify-function signature="QMatrix3x4(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="12"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix3x4(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix4x2" since="4.6">
- <modify-function signature="QMatrix4x2(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="8"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix4x2(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="8"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix4x3" since="4.6">
- <modify-function signature="QMatrix4x3(const float*)" remove="all"/>
- <modify-function signature="copyDataTo(float*) const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="12"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="QMatrix4x3(PySequence*)">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_constructor">
- <replace from="%SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="data()" return-type="float">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="12"/>
- </insert-template>
- </inject-code>
- </add-function>
- </value-type>
-
- <value-type name="QMatrix4x4" since="4.6">
- <enum-type name="Flag" flags="Flags" since="6.0"/>
-
- <!-- Qt5: HAIRY TRICK ALERT ahead!
- Qt5 partially replaced 'qreal' by float.
- That had the side effect that all matrix types did not work any longer.
-
- Reason (I guess):
-
- The signature "QList<qreal>" is needed by the __reduce__ methods,
- but created by some other object used elsewhere.
- After the matrix type was changed, "QList<float>" was created nowhere.
-
- I don't know an explicit way to produce the right conversion function, so what I did
- was to create a dummy function and immediately delete it again.
- This has the desired effect of creating the implicitly needed "QList<float>"
- conversion, although the dummy function goes away.
-
- Q: Do you know a better solution?
- -->
- <add-function signature="__dummy(const QList&lt;float &gt; &amp;)"/>
- <modify-function signature="__dummy(const QList&lt;float &gt; &amp;)" remove="all"/>
- <!-- that was the trick ^^^^^^^^^^^^^^^^^^^^^^ -->
-
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code_matrix">
- <replace from="%MATRIX_SIZE" to="16"/>
- <replace from="%MATRIX_TYPE" to="float"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code_matrix">
- <replace from="%MATRIX_TYPE" to="float"/>
- <replace from="%MATRIX_SIZE" to="16"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <!-- ### "QMatrix4x4(const float*,int,int)" is an internal constructor. -->
- <modify-function signature="QMatrix4x4(const float*,int,int)" remove="all"/>
-
- <modify-function signature="QMatrix4x4(const float*)">
- <modify-argument index="1">
- <replace-type modified-type="PySequence"/>
- <array/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4"/>
- </modify-function>
- <modify-function signature="data()">
- <inject-code class="target" position="beginning">
- <insert-template name="matrix_data_function">
- <replace from="%MATRIX_SIZE" to="16"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="copyDataTo(float*)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTupleObject*"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4-copydatato"/>
- </modify-function>
-
- <modify-function signature="inverted(bool*)const">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
-
- <!-- ### "constData() const" and "data() const" are unnecessary in Python and their function is performed by "data()". -->
- <modify-function signature="data()const" remove="all"/>
- <modify-function signature="constData()const" remove="all"/>
- <!-- ### -->
- <modify-function signature="operator()(int,int)const" remove="all"/>
- <modify-function signature="operator()(int,int)" remove="all"/>
- <add-function signature="__mgetitem__" return-type="PyObject*">
- <inject-code file="../glue/qtgui.cpp" snippet="qmatrix4x4-mgetitem"/>
- </add-function>
- </value-type>
-
- _______ end of matrix block _______ -->
-
- <value-type name="QQuaternion" since="4.6">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
- </insert-template>
- </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"/>
- </value-type>
-
- <object-type name="QTouchEvent" since="4.6"/>
-
- <object-type name="QInputDevice">
- <enum-type name="Capability" flags="Capabilities"/>
- <enum-type name="DeviceType" flags="DeviceTypes"/>
- </object-type>
-
- <value-type name="QVector2D" since="4.6">
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="dd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- </value-type>
- <value-type name="QVector3D" since="4.6">
- <extra-includes>
- <include file-name="QMatrix4x4" location="global"/>
- </extra-includes>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="ddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="ddd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- </value-type>
- <value-type name="QVector4D" since="4.6">
- <extra-includes>
- <include file-name="QMatrix4x4" location="global"/>
- </extra-includes>
- <add-function signature="__repr__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="repr_code">
- <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
- <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="__reduce__" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="reduce_code">
- <replace from="%REDUCE_FORMAT" to="dddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
- </insert-template>
- </inject-code>
- </add-function>
-
- <add-function signature="toTuple" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="to_tuple">
- <replace from="%TT_FORMAT" to="dddd"/>
- <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
- </insert-template>
- </inject-code>
- </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>
- <enum-type name="RestartHint"/>
- <!-- ### -->
- </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">
- <enum-type name="SurfaceClass"/>
- <enum-type name="SurfaceType"/>
- </object-type>
- <rejection class="QSurface" field-name="m_reserved"/>
- <value-type name="QSurfaceFormat">
- <enum-type name="ColorSpace" since="5.10"/>
- <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"/>
- <primitive-type name="QPlatformSurface">
- <extra-includes>
- <include file-name="QtGui/qpa/qplatformsurface.h" location="global"/>
- </extra-includes>
- </primitive-type>
-
- <object-type name="QWindow" delete-in-main-thread="true">
- <enum-type name="AncestorMode"/>
- <enum-type name="Visibility"/>
- <modify-function signature="raise()" rename="raise_"/>
- <!-- see QWidget::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
- <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
- <modify-argument index="3">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion_variables"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion"/>
- </conversion-rule>
- </modify-argument>
- <inject-code position="end">
- <insert-template name="return_native_eventfilter"/>
- </inject-code>
- </modify-function>
- <modify-function signature="fromWinId(WId)">
- <modify-argument index="1">
- <replace-type modified-type="long"/>
- </modify-argument>
- <inject-code file="../glue/qtgui.cpp" snippet="qwindow-fromWinId"/>
- </modify-function>
- <modify-function signature="show()" allow-thread="yes"/>
- <modify-function signature="showFullScreen()" allow-thread="yes"/>
- <modify-function signature="showMaximized()" allow-thread="yes"/>
- <modify-function signature="showMinimized()" allow-thread="yes"/>
- <modify-function signature="showNormal()" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QGuiApplication">
- <extra-includes>
- <include file-name="QBasicTimer" location="global"/>
- <include file-name="QFont" location="global"/>
- <include file-name="QFontMetrics" location="global"/>
- <include file-name="QPalette" location="global"/>
- <include file-name="QIcon" location="global"/>
- <include file-name="QLocale" location="global"/>
- </extra-includes>
- <modify-function signature="QGuiApplication(int&amp;,char**,int)" access="private"/>
- <add-function signature="QGuiApplication(QStringList)">
- <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-1"/>
- </add-function>
- <add-function signature="QGuiApplication()">
- <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-2"/>
- </add-function>
- <inject-code class="native" position="beginning" file="../glue/qtgui.cpp" snippet="qguiapplication-init"/>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
-
- </object-type>
-
- <object-type name="QOpenGLContext">
- <enum-type name="OpenGLModuleType"/>
- </object-type>
- <object-type name="QOpenGLContextGroup" since="5.0"/>
- <!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function
- <object-type name="QOpenGLPaintDevice" since="5.0"/>
- -->
- <object-type name="QOpenGLExtraFunctions" since="5.6">
- <!-- Exlusions due to compile errors -->
- <modify-function signature="glEndTransformFeedback()" remove="all"/>
- <modify-function signature="glPauseTransformFeedback()" remove="all"/>
- <modify-function signature="glResumeTransformFeedback()" remove="all"/>
- <modify-function signature="^glClearBuffer.*\(.*\*.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDebugMessageControl(unsigned int,unsigned int,unsigned int,int,const unsigned int*,unsigned char)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDeleteProgramPipelines(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDeleteQueries(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDeleteSamplers(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDeleteVertexArrays(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glDrawBuffers(int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGenProgramPipelines(int,unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGenQueries(int,unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGenSamplers(int,unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGenTransformFeedbacks(int,unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGenVertexArrays(int,unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetActiveUniformBlockiv(unsigned int,unsigned int,unsigned int,int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetActiveUniformsiv(unsigned int,int,const unsigned int*,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetFramebufferParameteriv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetIntegeri_v(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetInternalformativ(unsigned int,unsigned int,unsigned int,int,int*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetMultisamplefv(unsigned int,unsigned int,float*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetProgramInterfaceiv(unsigned int,unsigned int,unsigned int,int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetProgramPipelineiv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetProgramResourceiv(unsigned int,unsigned int,unsigned int,int,const unsigned int*,int,int*,int*)">
- <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(unsigned int,unsigned int,unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetQueryiv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetSamplerParameterfv(unsigned int,unsigned int,float*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetSamplerParameteriv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetTexLevelParameteriv(unsigned int,int,unsigned int,int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetTexLevelParameterfv(unsigned int,int,unsigned int,float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetUniformuiv(unsigned int,int,unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetVertexAttribIiv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetVertexAttribIuiv(unsigned int,unsigned int,unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glInvalidateFramebuffer(unsigned int,int,const unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glInvalidateSubFramebuffer(unsigned int,int,const unsigned int*,int,int,int,int)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform1fv(unsigned int,int,int,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform1iv(unsigned int,int,int,const int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform1uiv(unsigned int,int,int,const unsigned int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform2fv(unsigned int,int,int,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform2iv(unsigned int,int,int,const int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform2uiv(unsigned int,int,int,const unsigned int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform3fv(unsigned int,int,int,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform3iv(unsigned int,int,int,const int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform3uiv(unsigned int,int,int,const unsigned int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform4fv(unsigned int,int,int,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform4iv(unsigned int,int,int,const int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniform4uiv(unsigned int,int,int,const unsigned int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix2fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix2x3fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix2x4fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix3fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix3x2fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix3x4fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix4fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix4x2fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glProgramUniformMatrix4x3fv(unsigned int,int,int,unsigned char,const float*)">
- <modify-argument index="5"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glSamplerParameterI?u?[fi]v\(.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glTexParameterI?u?[fi]v\(.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniform1uiv(int,int,const unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniform2uiv(int,int,const unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniform3uiv(int,int,const unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniform4uiv(int,int,const unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix2x3fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix2x4fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix3x2fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix3x4fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix4x2fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glUniformMatrix4x3fv(int,int,unsigned char,const float*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glVertexAttribI4iv(unsigned int,const int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glVertexAttribI4uiv(unsigned int,const unsigned int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetStringi(unsigned int,unsigned int)">
- <modify-argument index="return">
- <replace-type modified-type="QString"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstring-return"/>
- </modify-function>
- </object-type>
- <object-type name="QOpenGLFunctions" since="5.0">
- <enum-type name="OpenGLFeature" flags="OpenGLFeatures"/>
- <modify-function signature="glGetAttachedShaders(unsigned int,int,int*,unsigned int*)">
- <modify-argument index="3"><array/></modify-argument>
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetBufferParameteriv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetFloatv(unsigned int,float*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetFramebufferAttachmentParameteriv(unsigned int,unsigned int,unsigned int,int*)">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetIntegerv(unsigned int,int*)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetProgramiv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetRenderbufferParameteriv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetShaderiv(unsigned int,unsigned int,int*)">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetShaderPrecisionFormat(unsigned int,unsigned int,int*,int*)">
- <modify-argument index="3"><array/></modify-argument>
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glDelete.*s\(.*$">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glGen[A-Z].*s\(.*$">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^gl(Get)?TexParameterI?u?[fi]v\(.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glUniformMatrix\dfv\(.*$">
- <modify-argument index="4"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^gl(Get)?Uniform\d?.v\(.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glVertexAttrib\dfv\(.*$">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="^glGetVertexAttrib[fi]v\(.*$">
- <modify-argument index="3"><array/></modify-argument>
- </modify-function>
- <modify-function signature="glGetString(unsigned int)">
- <modify-argument index="return">
- <replace-type modified-type="QString"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="glGetString_return_QString"/>
- </inject-code>
- </modify-function>
- <modify-function signature="glShaderBinary(int,const unsigned int*,unsigned int,const void *,int)">
- <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_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"/>
- -->
- <value-type name="QPageLayout">
- <enum-type name="Mode"/>
- <enum-type name="Orientation"/>
- <enum-type name="Unit"/>
- </value-type>
- <value-type name="QPageSize">
- <enum-type name="PageSizeId"/>
- <enum-type name="Unit"/>
- <enum-type name="SizeMatchPolicy"/>
- </value-type>
- <object-type name="QPaintDeviceWindow"/>
- <value-type name="QPixelFormat">
- <enum-type name="AlphaUsage"/>
- <enum-type name="AlphaPosition"/>
- <enum-type name="AlphaPremultiplied"/>
- <enum-type name="ByteOrder"/>
- <enum-type name="ColorModel"/>
- <enum-type name="TypeInterpretation"/>
- <enum-type name="YUVLayout"/>
- </value-type>
- <object-type name="QPdfWriter"/>
- <object-type name="QPointingDevice" since="6.0">
- <enum-type name="PointerType" flags="PointerTypes"/>
- <enum-type name="GrabTransition"/>
- </object-type>
- <value-type name="QPointingDeviceUniqueId"/>
- <value-type name="QRawFont">
- <enum-type name="AntialiasingType"/>
- <enum-type name="LayoutFlag" flags="LayoutFlags"/>
- <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int)const" remove="all"/>
- <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int,QFlags&lt;QRawFont::LayoutFlag&gt;)const" remove="all"/>
- <modify-function signature="glyphIndexesForChars(const QChar*,int,quint32*,int*)const" remove="all"/>
- <modify-function signature="loadFromData(const QByteArray&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
- <modify-function signature="loadFromFile(const QString&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
- </value-type>
- <object-type name="QRasterWindow"/>
- <object-type name="QScreen">
- <modify-function signature="grabWindow(WId,int,int,int,int)">
- <modify-argument index="1">
- <replace-type modified-type="long"/>
- </modify-argument>
- <inject-code file="../glue/qtgui.cpp" snippet="qscreen-grabWindow"/>
- </modify-function>
- </object-type>
- <object-type name="QStyleHints"/>
-
- <object-type name="QUndoCommand">
- <modify-function signature="mergeWith(const QUndoCommand*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QUndoGroup">
- <modify-function signature="addStack(QUndoStack*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeStack(QUndoStack*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QUndoStack">
- <modify-function signature="createUndoAction(QObject*,const QString&amp;)const">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="createRedoAction(QObject*,const QString&amp;)const">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="push(QUndoCommand*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_mac.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_mac.xml
deleted file mode 100644
index 8b071a18b..000000000
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_mac.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtGui">
- <rejection class="*" function-name="qt_mac_set_cursor"/>
- <rejection class="*" function-name="macMenu"/>
-
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
-
- <suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared"/>
- <suppress-warning text="type 'QGtkStyle' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_win.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_win.xml
deleted file mode 100644
index 6386cbd25..000000000
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_win.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtGui"/>
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_x11.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_x11.xml
deleted file mode 100644
index 6386cbd25..000000000
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_x11.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtGui"/>
diff --git a/sources/pyside2/PySide2/QtHelp/CMakeLists.txt b/sources/pyside2/PySide2/QtHelp/CMakeLists.txt
deleted file mode 100644
index 267703f6e..000000000
--- a/sources/pyside2/PySide2/QtHelp/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-project(QtHelp)
-
-set(QtHelp_SRC
-${QtHelp_GEN_DIR}/qhelpcontentitem_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpcontentmodel_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpcontentwidget_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpenginecore_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpengine_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpindexmodel_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpindexwidget_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpsearchengine_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpsearchquerywidget_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpsearchquery_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpsearchresult_wrapper.cpp
-${QtHelp_GEN_DIR}/qhelpsearchresultwidget_wrapper.cpp
-# module is always needed
-${QtHelp_GEN_DIR}/qthelp_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_EQUAL 5.13.0
- OR Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_GREATER 5.13.0)
- list(APPEND QtHelp_SRC
- ${QtHelp_GEN_DIR}/qcompressedhelpinfo_wrapper.cpp
- ${QtHelp_GEN_DIR}/qhelpfilterdata_wrapper.cpp
- ${QtHelp_GEN_DIR}/qhelpfilterengine_wrapper.cpp)
-endif()
-
-if (Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_EQUAL 5.15.0
- OR Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_GREATER 5.15.0)
- list(APPEND QtHelp_SRC
- ${QtHelp_GEN_DIR}/qhelpfiltersettingswidget_wrapper.cpp
- ${QtHelp_GEN_DIR}/qhelplink_wrapper.cpp)
-endif()
-
-
-set(QtHelp_include_dirs ${QtHelp_SOURCE_DIR}
- ${QtHelp_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Help_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtHelp_libraries pyside2
- ${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)
-
-create_pyside_module(NAME QtHelp
- INCLUDE_DIRS QtHelp_include_dirs
- LIBRARIES QtHelp_libraries
- DEPS QtHelp_deps
- TYPESYSTEM_PATH QtHelp_SOURCE_DIR
- SOURCES QtHelp_SRC)
diff --git a/sources/pyside2/PySide2/QtHelp/typesystem_help.xml b/sources/pyside2/PySide2/QtHelp/typesystem_help.xml
deleted file mode 100644
index 76013d1ac..000000000
--- a/sources/pyside2/PySide2/QtHelp/typesystem_help.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.QtHelp">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
- <value-type name="QCompressedHelpInfo" since="5.13"/>
- <value-type name="QHelpContentItem">
- <modify-function signature="parent()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- </value-type>
- <object-type name="QHelpContentModel" polymorphic-id-expression="qobject_cast&lt;QHelpContentModel*&gt;(%1)"/>
- <object-type name="QHelpContentWidget"/>
- <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"/>
- <object-type name="QHelpIndexModel"/>
- <object-type name="QHelpIndexWidget"/>
- <value-type name="QHelpLink" since="5.15"/>
- <object-type name="QHelpSearchEngine"/>
- <value-type name="QHelpSearchQuery">
- <enum-type name="FieldName"/>
- </value-type>
- <object-type name="QHelpSearchQueryWidget"/>
- <object-type name="QHelpSearchResult"/>
- <object-type name="QHelpSearchResultWidget"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtLocation/CMakeLists.txt b/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
deleted file mode 100644
index fa21310b7..000000000
--- a/sources/pyside2/PySide2/QtLocation/CMakeLists.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-project(QtLocation)
-
-set(QtLocation_OPTIONAL_SRC )
-set(QtLocation_DROPPED_ENTRIES )
-
-set(QtLocation_SRC
-${QtLocation_GEN_DIR}/qgeocodereply_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeomaneuver_wrapper.cpp
-${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}/qplace_wrapper.cpp
-${QtLocation_GEN_DIR}/qplacecontentreply_wrapper.cpp
-${QtLocation_GEN_DIR}/qplacedetailsreply_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceicon_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceidreply_wrapper.cpp
-${QtLocation_GEN_DIR}/qplacemanager_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceuser_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeocodingmanager_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeocodingmanagerengine_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeorouterequest_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeoroutingmanager_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeoroutingmanagerengine_wrapper.cpp
-${QtLocation_GEN_DIR}/qgeoserviceproviderfactory_wrapper.cpp
-${QtLocation_GEN_DIR}/qplaceattribute_wrapper.cpp
-${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
-${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
-${QtLocation_GEN_DIR}/qplacesearchsuggestionreply_wrapper.cpp
-${QtLocation_GEN_DIR}/qplacesupplier_wrapper.cpp
-# module is always needed
-${QtLocation_GEN_DIR}/qtlocation_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}Location_VERSION VERSION_EQUAL 5.11.0
- OR Qt${QT_MAJOR_VERSION}Location_VERSION VERSION_GREATER 5.11.0)
- list(APPEND QtLocation_SRC
- ${QtLocation_GEN_DIR}/qgeoserviceproviderfactoryv2_wrapper.cpp)
-endif()
-
-set(QtLocation_include_dirs ${QtLocation_SOURCE_DIR}
- ${QtLocation_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Location_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtPositioning_GEN_DIR})
-
-set(QtLocation_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Location_LIBRARIES})
-
-set(QtLocation_deps QtCore QtPositioning)
-
-create_pyside_module(NAME QtLocation
- INCLUDE_DIRS QtLocation_include_dirs
- LIBRARIES QtLocation_libraries
- DEPS QtLocation_deps
- TYPESYSTEM_PATH QtLocation_SOURCE_DIR
- SOURCES QtLocation_SRC
- DROPPED_ENTRIES QtLocation_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtLocation/typesystem_location.xml b/sources/pyside2/PySide2/QtLocation/typesystem_location.xml
deleted file mode 100644
index 2d39e6549..000000000
--- a/sources/pyside2/PySide2/QtLocation/typesystem_location.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtLocation">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtPositioning/typesystem_positioning.xml" generate="no"/>
- <object-type name="QGeoCodeReply">
- <enum-type name="Error"/>
- </object-type>
- <value-type name="QGeoManeuver">
- <enum-type name="InstructionDirection"/>
- </value-type>
- <value-type name="QGeoRoute"/>
- <object-type name="QGeoRouteReply">
- <enum-type name="Error"/>
- </object-type>
- <value-type name="QGeoRouteSegment"/>
- <object-type name="QGeoServiceProvider">
- <enum-type name="Error"/>
- <enum-type name="RoutingFeature" flags="RoutingFeatures"/>
- <enum-type name="GeocodingFeature" flags="GeocodingFeatures"/>
- <enum-type name="MappingFeature" flags="MappingFeatures"/>
- <enum-type name="PlacesFeature" flags="PlacesFeatures"/>
- <enum-type name="NavigationFeature" flags="NavigationFeatures"/>
- </object-type>
- <value-type name="QPlace"/>
- <object-type name="QPlaceContentReply"/>
- <object-type name="QPlaceDetailsReply"/>
- <value-type name="QPlaceIcon"/>
- <object-type name="QPlaceIdReply">
- <enum-type name="OperationType"/>
- </object-type>
- <object-type name="QPlaceManager"/>
- <value-type name="QPlaceUser"/>
- <object-type name="QGeoCodingManager"/>
- <object-type name="QGeoCodingManagerEngine"/>
- <object-type name="QGeoRouteRequest">
- <enum-type name="TravelMode" flags="TravelModes"/>
- <enum-type name="FeatureType" flags="FeatureTypes"/>
- <enum-type name="FeatureWeight" flags="FeatureWeights"/>
- <enum-type name="RouteOptimization" flags="RouteOptimizations"/>
- <enum-type name="SegmentDetail" flags="SegmentDetails"/>
- <enum-type name="ManeuverDetail" flags="ManeuverDetails"/>
- </object-type>
- <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"/>
- </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"/>
- <object-type name="QPlaceProposedSearchResult"/>
- <value-type name="QPlaceRatings"/>
- <object-type name="QPlaceReply">
- <enum-type name="Error"/>
- <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"/>
- </object-type>
- <object-type name="QPlaceSearchResult">
- <enum-type name="SearchResultType"/>
- </object-type>
- <object-type name="QPlaceSearchSuggestionReply"/>
- <value-type name="QPlaceSupplier"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt b/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt
deleted file mode 100644
index 6e3d0f25c..000000000
--- a/sources/pyside2/PySide2/QtMacExtras/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-project(QtMacExtras)
-
-set(QtMacExtras_SRC
-${QtMacExtras_GEN_DIR}/qmacpasteboardmime_wrapper.cpp
-${QtMacExtras_GEN_DIR}/qmactoolbar_wrapper.cpp
-${QtMacExtras_GEN_DIR}/qmactoolbaritem_wrapper.cpp
-
-# module is always needed
-${QtMacExtras_GEN_DIR}/qtmacextras_module_wrapper.cpp
-)
-
-set(QtMacExtras_include_dirs ${QtMacExtras_SOURCE_DIR}
- ${QtMacExtras_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}MacExtras_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${libpyside_SOURCE_DIR})
-
-set(QtMacExtras_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}MacExtras_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
-
-set(QtMacExtras_deps QtCore QtGui)
-
-create_pyside_module(NAME QtMacExtras
- INCLUDE_DIRS QtMacExtras_include_dirs
- LIBRARIES QtMacExtras_libraries
- DEPS QtMacExtras_deps
- TYPESYSTEM_PATH QtMacExtras_SOURCE_DIR
- SOURCES QtMacExtras_SRC)
diff --git a/sources/pyside2/PySide2/QtMacExtras/typesystem_macextras.xml b/sources/pyside2/PySide2/QtMacExtras/typesystem_macextras.xml
deleted file mode 100644
index d62ce48b8..000000000
--- a/sources/pyside2/PySide2/QtMacExtras/typesystem_macextras.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtMacExtras">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
-
- <function signature="qRegisterDraggedTypes(QStringList)" since="5.2"/>
-
- <object-type name="QMacPasteboardMime" since="5.2">
- <enum-type name="QMacPasteboardMimeType"/>
- </object-type>
- <object-type name="QMacToolBar" since="5.3"/>
- <object-type name="QMacToolBarItem" since="5.3">
- <enum-type name="StandardItem"/>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt b/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt
deleted file mode 100644
index 64e6a3a4e..000000000
--- a/sources/pyside2/PySide2/QtMultimedia/CMakeLists.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-project(QtMultimedia)
-
-set(QtMultimedia_SRC
-${QtMultimedia_GEN_DIR}/qabstractaudiodeviceinfo_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qabstractaudioinput_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qabstractaudiooutput_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qabstractvideobuffer_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qabstractvideofilter_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qabstractvideosurface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiobuffer_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiodecoder_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiodecodercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiodeviceinfo_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioencodersettingscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioencodersettings_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioformat_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioinputselectorcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioinput_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiooutputselectorcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiooutput_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudioprobe_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiorecorder_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudiorolecontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qaudio_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameracapturebufferformatcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameracapturedestinationcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameracontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraexposurecontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraexposure_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerafeedbackcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerafocus_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraflashcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerafocuscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerafocuszone_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamera_frameraterange_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraimagecapturecontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraimagecapture_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraimageprocessing_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraimageprocessingcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerainfocontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerainfo_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameralockscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraviewfindersettingscontrol2_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraviewfindersettingscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcameraviewfindersettings_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamera_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qcamerazoomcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qimageencodercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qimageencodersettings_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaaudioprobecontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaavailabilitycontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediabindableinterface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediacontainercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediacontent_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediacontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediagaplessplaybackcontrol_wrapper.cpp
-# Causes compile errors: ${QtMultimedia_GEN_DIR}/qmediametadata_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmedianetworkaccesscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaobject_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaplayercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaplayer_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaplaylist_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediarecordercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediarecorder_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaresource_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservice_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservicecamerainfointerface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservicedefaultdeviceinterface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservicefeaturesinterface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaserviceproviderhint_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservicesupporteddevicesinterface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediaservicesupportedformatsinterface_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediastreamscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediatimeinterval_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediatimerange_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmediavideoprobecontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmetadatareadercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmetadatawritercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qmultimedia_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qradiodatacontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qradiodata_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qradiotunercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qradiotuner_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qsoundeffect_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qsound_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideodeviceselectorcontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideoencodersettingscontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideoencodersettings_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideofilterrunnable_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideoframe_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideoprobe_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideorenderercontrol_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideosurfaceformat_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qvideowindowcontrol_wrapper.cpp
-
-# module is always needed
-${QtMultimedia_GEN_DIR}/qtmultimedia_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}Multimedia_VERSION VERSION_EQUAL 5.11.0
- OR Qt${QT_MAJOR_VERSION}Multimedia_VERSION VERSION_GREATER 5.11.0)
- list(APPEND QtMultimedia_SRC
- ${QtMultimedia_GEN_DIR}/qcustomaudiorolecontrol_wrapper.cpp)
-endif()
-
-set(QtMultimedia_include_dirs ${QtMultimedia_SOURCE_DIR}
- ${QtMultimedia_BINARY_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}Multimedia_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtNetwork_GEN_DIR})
-
-set(QtMultimedia_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- )
-set(QtMultimedia_deps QtCore QtGui QtNetwork)
-
-create_pyside_module(NAME QtMultimedia
- INCLUDE_DIRS QtMultimedia_include_dirs
- LIBRARIES QtMultimedia_libraries
- DEPS QtMultimedia_deps
- TYPESYSTEM_PATH QtMultimedia_SOURCE_DIR
- SOURCES QtMultimedia_SRC)
diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia.xml
deleted file mode 100644
index 323c50ba8..000000000
--- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtMultimedia">
- <load-typesystem name="QtMultimedia/typesystem_multimedia_common.xml" generate="yes"/>
- <load-typesystem name="QtMultimedia/typesystem_multimedia_forward_declarations.xml" generate="yes"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml
deleted file mode 100644
index 0c1012136..000000000
--- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_common.xml
+++ /dev/null
@@ -1,372 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtMultimedia">
- <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="Role" since="5.6"/>
- <enum-type name="State"/>
- <enum-type name="VolumeScale" since="5.8"/>
- </namespace-type>
-
- <value-type name="QVideoSurfaceFormat">
- <enum-type name="Direction"/>
- <enum-type name="YCbCrColorSpace"/>
- </value-type>
- <object-type name="QAbstractVideoBuffer">
- <enum-type name="HandleType"/>
- <enum-type name="MapMode"/>
- <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)" remove="all"/>
- <!-- TODO: discuss a way to have this working with the virtual method.
- <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,int*,int*"/>
- </inject-code>
- </modify-function>
- -->
- <!-- TODO: PYSIDE-354, arrays are not supported -->
- <modify-function signature="mapPlanes(QAbstractVideoBuffer::MapMode,int*,int[4],uchar*[4])" remove="all"/>
- </object-type>
- <object-type name="QAbstractVideoSurface">
- <enum-type name="Error"/>
- </object-type>
- <object-type name="QAbstractVideoFilter">
- <modify-function signature="createFilterRunnable()">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <value-type name="QVideoFrame">
- <enum-type name="FieldType"/>
- <enum-type name="PixelFormat"/>
- <modify-function signature="bits()">
- <inject-code file="../glue/qtmultimedia.cpp" snippet="qvideoframe-bits"/>
- </modify-function>
- <modify-function signature="bits(int)" remove="all"/>
- <modify-function signature="bits(int)const" remove="all"/>
- </value-type>
-
- <value-type name="QAudioBuffer"/>
- <object-type name="QAudioDecoder">
- <enum-type name="Error"/>
- <enum-type name="State"/>
- </object-type>
- <value-type name="QAudioFormat">
- <enum-type name="Endian"/>
- <enum-type name="SampleType"/>
- </value-type>
- <value-type name="QAudioDeviceInfo"/>
- <object-type name="QAbstractAudioDeviceInfo"/>
-
- <object-type name="QAbstractAudioOutput">
- <modify-function signature="start()">
- <modify-argument index="return">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="start(QIODevice*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QAbstractAudioInput">
- <modify-function signature="start()">
- <modify-argument index="return">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="start(QIODevice*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QAudioDecoderControl"/>
- <object-type name="QAudioProbe"/>
- <value-type name="QAudioEncoderSettings"/>
- <object-type name="QAudioEncoderSettingsControl">
- <modify-function signature="supportedSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
- </object-type>
-
- <object-type name="QAudioInput">
- <modify-function signature="start()">
- <modify-argument index="return">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="start(QIODevice*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAudioInputSelectorControl"/>
-
- <object-type name="QAudioOutput">
- <modify-function signature="start()">
- <modify-argument index="return">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="start(QIODevice*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAudioOutputSelectorControl"/>
- <object-type name="QAudioRecorder"/>
- <object-type name="QAudioRoleControl"/>
-
- <object-type name="QCamera">
- <value-type name="FrameRateRange"/>
- <enum-type name="CaptureMode" flags="CaptureModes"/>
- <enum-type name="Error"/>
- <enum-type name="LockChangeReason"/>
- <enum-type name="LockStatus"/>
- <enum-type name="LockType" flags="LockTypes"/>
- <enum-type name="Position"/>
- <enum-type name="State"/>
- <enum-type name="Status"/>
- <modify-function signature="setViewfinder(QVideoWidget*)">
- <modify-argument index="1">
- <replace-type modified-type="QObject*"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
- </modify-function>
- <modify-function signature="setViewfinder(QGraphicsVideoItem*)">
- <modify-argument index="1">
- <replace-type modified-type="QObject*"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
- </modify-function>
- </object-type>
- <object-type name="QCameraCaptureBufferFormatControl"/>
- <object-type name="QCameraCaptureDestinationControl"/>
- <object-type name="QCameraControl">
- <enum-type name="PropertyChangeType"/>
- </object-type>
- <object-type name="QCameraExposure">
- <enum-type name="FlashMode" flags="FlashModes"/>
- <enum-type name="ExposureMode"/>
- <enum-type name="MeteringMode"/>
- <modify-function signature="supportedApertures(bool*)const" remove="all"/>
- <modify-function signature="supportedIsoSensitivities(bool*)const" remove="all"/>
- <modify-function signature="supportedShutterSpeeds(bool*)const" remove="all"/>
- </object-type>
- <object-type name="QCameraExposureControl">
- <enum-type name="ExposureParameter"/>
- <modify-function signature="supportedParameterRange(QCameraExposureControl::ExposureParameter,bool*)const" remove="all"/>
- </object-type>
- <object-type name="QCameraFeedbackControl">
- <enum-type name="EventType"/>
- </object-type>
- <value-type name="QCameraFocusZone">
- <enum-type name="FocusZoneStatus"/>
- </value-type>
- <object-type name="QCameraFocus">
- <enum-type name="FocusMode" flags="FocusModes"/>
- <enum-type name="FocusPointMode"/>
- </object-type>
- <object-type name="QCameraFlashControl"/>
- <object-type name="QCameraFocusControl"/>
- <value-type name="QCameraInfo"/>
- <object-type name="QCameraInfoControl"/>
- <object-type name="QCameraImageCapture">
- <enum-type name="CaptureDestination" flags="CaptureDestinations"/>
- <enum-type name="DriveMode"/>
- <enum-type name="Error"/>
- <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
- </object-type>
- <object-type name="QCameraImageCaptureControl"/>
- <object-type name="QCameraImageProcessing">
- <enum-type name="WhiteBalanceMode"/>
- <enum-type name="ColorFilter"/>
- </object-type>
- <object-type name="QCameraImageProcessingControl">
- <enum-type name="ProcessingParameter"/>
- </object-type>
- <object-type name="QCameraLocksControl"/>
- <value-type name="QCameraViewfinderSettings"/>
- <object-type name="QCameraViewfinderSettingsControl">
- <enum-type name="ViewfinderParameter"/>
- </object-type>
- <object-type name="QCameraViewfinderSettingsControl2"/>
- <object-type name="QCameraZoomControl"/>
-
- <value-type name="QImageEncoderSettings"/>
- <object-type name="QImageEncoderControl">
- <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
- </object-type>
-
- <object-type name="QMediaAudioProbeControl"/>
- <object-type name="QMediaAvailabilityControl"/>
- <object-type name="QMediaBindableInterface"/>
- <object-type name="QMediaContainerControl"/>
- <value-type name="QMediaContent"/>
- <object-type name="QMediaGaplessPlaybackControl"/>
- <object-type name="QMediaControl"/>
- <object-type name="QCustomAudioRoleControl" since="5.11"/>
- <object-type name="QMediaNetworkAccessControl"/>
- <!-- Causes compile errors
- <namespace-type name="QMediaMetaData"/>
- -->
- <object-type name="QMediaObject"/>
- <object-type name="QMediaPlayer">
- <enum-type name="State"/>
- <enum-type name="MediaStatus"/>
- <enum-type name="Flag" flags="Flags"/>
- <enum-type name="Error"/>
- <modify-function signature="setVideoOutput(QVideoWidget*)">
- <modify-argument index="1">
- <replace-type modified-type="QObject*"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
- </modify-function>
- <modify-function signature="setVideoOutput(QGraphicsVideoItem*)">
- <modify-argument index="1">
- <replace-type modified-type="QObject*"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
- </modify-function>
- </object-type>
- <object-type name="QMediaPlayerControl"/>
- <object-type name="QMediaPlaylist">
- <enum-type name="PlaybackMode"/>
- <enum-type name="Error"/>
- </object-type>
- <object-type name="QMediaRecorder">
- <enum-type name="Error"/>
- <enum-type name="State"/>
- <enum-type name="Status"/>
- <modify-function signature="supportedAudioSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
- <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
- <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
- </object-type>
- <object-type name="QMediaRecorderControl"/>
- <value-type name="QMediaResource"/>
- <object-type name="QMediaService"/>
- <interface-type name="QMediaServiceCameraInfoInterface"/>
- <interface-type name="QMediaServiceDefaultDeviceInterface"/>
- <interface-type name="QMediaServiceFeaturesInterface"/>
- <value-type name="QMediaServiceProviderHint">
- <enum-type name="Type"/>
- <enum-type name="Feature" flags="Features"/>
- </value-type>
- <interface-type name="QMediaServiceSupportedDevicesInterface"/>
- <interface-type name="QMediaServiceSupportedFormatsInterface"/>
- <object-type name="QMediaStreamsControl">
- <enum-type name="StreamType"/>
- </object-type>
- <value-type name="QMediaTimeInterval"/>
- <value-type name="QMediaTimeRange"/>
- <object-type name="QMediaVideoProbeControl"/>
-
- <object-type name="QMetaDataReaderControl"/>
- <object-type name="QMetaDataWriterControl"/>
-
- <namespace-type name="QMultimedia">
- <enum-type name="SupportEstimate"/>
- <enum-type name="EncodingQuality"/>
- <enum-type name="EncodingMode"/>
- <enum-type name="AvailabilityStatus"/>
- </namespace-type>
-
- <object-type name="QRadioData">
- <enum-type name="Error"/>
- <enum-type name="ProgramType"/>
- </object-type>
- <object-type name="QRadioDataControl"/>
- <object-type name="QRadioTuner">
- <enum-type name="Band"/>
- <enum-type name="Error"/>
- <enum-type name="SearchMode"/>
- <enum-type name="State"/>
- <enum-type name="StereoMode"/>
- </object-type>
- <object-type name="QRadioTunerControl"/>
- <object-type name="QSound">
- <enum-type name="Loop"/>
- </object-type>
- <object-type name="QSoundEffect">
- <enum-type name="Loop"/>
- <enum-type name="Status"/>
- </object-type>
-
- <object-type name="QVideoDeviceSelectorControl"/>
- <value-type name="QVideoEncoderSettings"/>
- <object-type name="QVideoEncoderSettingsControl">
- <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
- <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
- </object-type>
- <object-type name="QVideoFilterRunnable">
- <enum-type name="RunFlag" flags="RunFlags"/>
- </object-type>
- <object-type name="QVideoProbe"/>
- <object-type name="QVideoRendererControl"/>
- <object-type name="QVideoWindowControl"/>
-
- <suppress-warning text="Final class 'QMediaObject' set to non-final, as it is extended by other classes"/>
- <suppress-warning text="Pure virtual method 'QAbstractVideoBuffer::map(QAbstractVideoBuffer::MapMode,int*,int*)' must be implement but was completely removed on type system."/>
- <suppress-warning text="Pure virtual method 'QImageEncoderControl::supportedResolutions(QImageEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
- <suppress-warning text="Pure virtual method 'QCameraExposureControl::supportedParameterRange(QCameraExposureControl::ExposureParameter,bool*)const' must be implement but was completely removed on type system."/>
- <suppress-warning text="Pure virtual method 'QVideoEncoderSettingsControl::supportedFrameRates(QVideoEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
- <suppress-warning text="Pure virtual method 'QVideoEncoderSettingsControl::supportedResolutions(QVideoEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
- <suppress-warning text="Pure virtual method 'QAudioEncoderSettingsControl::supportedSampleRates(QAudioEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_forward_declarations.xml b/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_forward_declarations.xml
deleted file mode 100644
index 733e9b262..000000000
--- a/sources/pyside2/PySide2/QtMultimedia/typesystem_multimedia_forward_declarations.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtMultimedia">
- <custom-type name="QVideoWidget"/>
- <custom-type name="QGraphicsVideoItem"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt
deleted file mode 100644
index 052db6c42..000000000
--- a/sources/pyside2/PySide2/QtMultimediaWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-project(QtMultimediaWidgets)
-
-set(QtMultimediaWidgets_SRC
-${QtMultimediaWidgets_GEN_DIR}/qcameraviewfinder_wrapper.cpp
-${QtMultimediaWidgets_GEN_DIR}/qgraphicsvideoitem_wrapper.cpp
-${QtMultimediaWidgets_GEN_DIR}/qvideowidget_wrapper.cpp
-${QtMultimediaWidgets_GEN_DIR}/qvideowidgetcontrol_wrapper.cpp
-# module is always needed
-${QtMultimediaWidgets_GEN_DIR}/qtmultimediawidgets_module_wrapper.cpp
-)
-
-set(QtMultimediaWidgets_include_dirs ${QtMultimediaWidgets_SOURCE_DIR}
- ${QtMultimediaWidgets_BINARY_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}Multimedia_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}MultimediaWidgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtMultimedia_GEN_DIR})
-
-set(QtMultimediaWidgets_libraries pyside2
- ${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})
-
-set(QtMultimediaWidgets_deps QtCore QtGui QtNetwork QtWidgets QtMultimedia)
-
-create_pyside_module(NAME QtMultimediaWidgets
- INCLUDE_DIRS QtMultimediaWidgets_include_dirs
- LIBRARIES QtMultimediaWidgets_libraries
- DEPS QtMultimediaWidgets_deps
- TYPESYSTEM_PATH QtMultimediaWidgets_SOURCE_DIR
- SOURCES QtMultimediaWidgets_SRC)
diff --git a/sources/pyside2/PySide2/QtMultimediaWidgets/typesystem_multimediawidgets.xml b/sources/pyside2/PySide2/QtMultimediaWidgets/typesystem_multimediawidgets.xml
deleted file mode 100644
index 690220528..000000000
--- a/sources/pyside2/PySide2/QtMultimediaWidgets/typesystem_multimediawidgets.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtMultimediaWidgets">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
- <load-typesystem name="QtMultimedia/typesystem_multimedia_common.xml" generate="no"/>
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
- <object-type name="QCameraViewfinder"/>
- <object-type name="QGraphicsVideoItem"/>
- <object-type name="QVideoWidget"/>
- <object-type name="QVideoWidgetControl"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
deleted file mode 100644
index 0f56db57c..000000000
--- a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-project(QtNetwork)
-
-set(QtNetwork_DROPPED_ENTRIES )
-
-set(QtNetwork_SRC
-${QtNetwork_GEN_DIR}/qabstractnetworkcache_wrapper.cpp
-${QtNetwork_GEN_DIR}/qabstractsocket_wrapper.cpp
-${QtNetwork_GEN_DIR}/qauthenticator_wrapper.cpp
-${QtNetwork_GEN_DIR}/qdnsdomainnamerecord_wrapper.cpp
-${QtNetwork_GEN_DIR}/qdnshostaddressrecord_wrapper.cpp
-${QtNetwork_GEN_DIR}/qdnslookup_wrapper.cpp
-${QtNetwork_GEN_DIR}/qdnsmailexchangerecord_wrapper.cpp
-${QtNetwork_GEN_DIR}/qdnsservicerecord_wrapper.cpp
-${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}/qhttpmultipart_wrapper.cpp
-${QtNetwork_GEN_DIR}/qhttppart_wrapper.cpp
-${QtNetwork_GEN_DIR}/qipv6address_wrapper.cpp
-${QtNetwork_GEN_DIR}/qlocalserver_wrapper.cpp
-${QtNetwork_GEN_DIR}/qlocalsocket_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkaccessmanager_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkaddressentry_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkcachemetadata_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkcookie_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkcookiejar_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkdatagram_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkdiskcache_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkinterface_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkproxy_wrapper.cpp
-${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}/qpassworddigestor_wrapper.cpp
-${QtNetwork_GEN_DIR}/qssl_wrapper.cpp
-${QtNetwork_GEN_DIR}/qsslcertificate_wrapper.cpp
-${QtNetwork_GEN_DIR}/qsslcertificateextension_wrapper.cpp
-${QtNetwork_GEN_DIR}/qtcpserver_wrapper.cpp
-${QtNetwork_GEN_DIR}/qtcpsocket_wrapper.cpp
-${QtNetwork_GEN_DIR}/qudpsocket_wrapper.cpp
-# module is always needed
-${QtNetwork_GEN_DIR}/qtnetwork_module_wrapper.cpp
-)
-
-get_property(QtNetwork_disabled_features TARGET Qt${QT_MAJOR_VERSION}::Network
- PROPERTY QT_DISABLED_PUBLIC_FEATURES)
-
-if("ssl" IN_LIST QtNetwork_disabled_features)
- list(APPEND QtNetwork_DROPPED_ENTRIES QOcspResponse QSslCipher
- QSslConfiguration QSslDiffieHellmanParameters QSslError
- QSslKey QSslPreSharedKeyAuthenticator QSslSocket)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping SSL classes")
-else()
- # Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
- # check_qt_class(QtNetwork QSslEllipticCurve QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
- list(APPEND QtNetwork_SRC
- ${QtNetwork_GEN_DIR}/qsslcipher_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsslconfiguration_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qssldiffiehellmanparameters_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsslerror_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsslkey_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsslpresharedkeyauthenticator_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qocspresponse_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SSL classes")
-endif()
-
-if("dtls" IN_LIST QtNetwork_disabled_features)
- list(APPEND QtNetwork_DROPPED_ENTRIES QDtls)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping DTLS classes")
-else()
- list(APPEND QtNetwork_SRC
- ${QtNetwork_GEN_DIR}/qdtls_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding DTLS classes")
-endif()
-
-if("sctp" IN_LIST QtNetwork_disabled_features)
- list(APPEND QtNetwork_DROPPED_ENTRIES QSctpServer QSctpSocket)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping SCTP classes")
-else()
- list(APPEND QtNetwork_SRC
- ${QtNetwork_GEN_DIR}/qsctpserver_wrapper.cpp
- ${QtNetwork_GEN_DIR}/qsctpsocket_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SCTP classes")
-endif()
-
-set(QtNetwork_include_dirs ${QtNetwork_SOURCE_DIR}
- ${QtNetwork_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtNetwork_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES})
-
-set(QtNetwork_deps QtCore)
-
-create_pyside_module(NAME QtNetwork
- INCLUDE_DIRS QtNetwork_include_dirs
- LIBRARIES QtNetwork_libraries
- DEPS QtNetwork_deps
- TYPESYSTEM_PATH QtNetwork_SOURCE_DIR
- SOURCES QtNetwork_SRC
- DROPPED_ENTRIES QtNetwork_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
deleted file mode 100644
index fab2d01bb..000000000
--- a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtNetwork">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
-
- <rejection class="dtlsopenssl"/>
-
- <enum-type name="QDtlsError" since="5.12"/>
- <enum-type name="QOcspCertificateStatus" since="5.13"/>
- <enum-type name="QOcspRevocationReason" since="5.13"/>
-
- <namespace-type name="QPasswordDigestor" since="5.12">
- <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="AlternativeNameEntryType"/>
- <enum-type name="EncodingFormat"/>
- <enum-type name="KeyAlgorithm"/>
- <enum-type name="KeyType"/>
- <enum-type name="SslOption" flags="SslOptions"/>
- <enum-type name="SslProtocol"/>
- <extra-includes>
- <include file-name="qssl.h" location="global"/>
- </extra-includes>
- </namespace-type>
-
- <rejection class="QIPv6Address" field-name="c"/>
- <rejection class="dtlsopenssl"/>
-
- <object-type name="QAbstractSocket">
- <enum-type name="BindFlag" flags="BindMode"/>
- <enum-type name="NetworkLayerProtocol"/>
- <enum-type name="PauseMode" flags="PauseModes"/>
- <enum-type name="SocketError"/>
- <enum-type name="SocketOption" since="4.6"/>
- <enum-type name="SocketState"/>
- <enum-type name="SocketType"/>
- <modify-function signature="connectToHost(const QString&amp;,quint16,QFlags&lt;QIODeviceBase::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes"/>
- <modify-function signature="connectToHost(const QHostAddress&amp;,quint16,QFlags&lt;QIODeviceBase::OpenModeFlag>)" allow-thread="yes"/>
- <modify-function signature="disconnectFromHost()" allow-thread="yes"/>
- <modify-function signature="waitForConnected(int)" allow-thread="yes"/>
- <modify-function signature="waitForDisconnected(int)" allow-thread="yes"/>
- </object-type>
-
- <value-type name="QDnsDomainNameRecord"/>
- <value-type name="QDnsHostAddressRecord"/>
- <object-type name="QDnsLookup">
- <enum-type name="Error"/>
- <enum-type name="Type"/>
- </object-type>
- <value-type name="QDnsMailExchangeRecord"/>
- <value-type name="QDnsServiceRecord"/>
- <value-type name="QDnsTextRecord"/>
-
- <object-type name="QDtls" since="5.12">
- <enum-type name="HandshakeState"/>
- </object-type>
-
- <value-type name="QHstsPolicy" since="5.9">
- <enum-type name="PolicyFlag" flags="PolicyFlags"/>
- </value-type>
- <object-type name="QHttpMultiPart">
- <enum-type name="ContentType"/>
- </object-type>
- <value-type name="QHttpPart" since="5.9"/>
- <object-type name="QTcpServer">
- <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
- <!-- FIXME removing default expression means user will always have to pass a value, but he wouldn't have to -->
- <modify-argument index="1">
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="2">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, timeOut)"/>
- </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"/>
- <object-type name="QTcpSocket"/>
- <object-type name="QUdpSocket">
- <modify-function signature="readDatagram(char*,qint64,QHostAddress*,quint16*)" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="3">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <modify-argument index="4">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(data, address, port)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qudpsocket-readdatagram"/>
- </modify-function>
- <modify-function signature="writeDatagram(const QByteArray&amp;,const QHostAddress&amp;,quint16)" allow-thread="yes"/>
- <!-- ### writeDatagram(QByteArray, ...) does the trick -->
- <modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,quint16)" remove="all"/>
- <!-- ### -->
- </object-type>
-
- <object-type name="QLocalServer">
- <enum-type name="SocketOption" flags="SocketOptions"/>
- <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
- <!-- FIXME -->
- <modify-argument index="1">
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="2">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <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>
-
- </modify-function>
- </object-type>
- <object-type name="QLocalSocket">
- <enum-type name="LocalSocketError"/>
- <enum-type name="LocalSocketState"/>
- </object-type>
- <object-type name="QNetworkAccessManager">
- <enum-type name="Operation"/>
- <modify-function signature="createRequest(QNetworkAccessManager::Operation,const QNetworkRequest&amp;,QIODevice*)">
- <modify-argument index="3" invalidate-after-use="yes"/>
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="get(const QNetworkRequest&amp;)" allow-thread="yes"/>
- <modify-function signature="post(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
- <modify-function signature="post(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
- <modify-function signature="put(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
- <modify-function signature="put(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
- <modify-function signature="sendCustomRequest(const QNetworkRequest &amp;,const QByteArray &amp;,QIODevice*)" allow-thread="yes" since="4.7"/>
- <modify-function signature="setCookieJar(QNetworkCookieJar*)">
- <modify-argument index="1">
- <define-ownership class="target" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QNetworkCookieJar"/>
- <value-type name="QNetworkDatagram" since="5.8"/>
- <object-type name="QNetworkReply">
- <enum-type name="NetworkError"/>
- </object-type>
-
- <value-type name="QHostAddress" hash-function="qHash">
- <enum-type name="ConversionModeFlag" flags="ConversionMode" since="5.8"/>
- <enum-type name="SpecialAddress"/>
- <!-- ### QHostAddress(QIPv6Address) does this -->
- <modify-function signature="QHostAddress(const quint8*)" remove="all"/>
- <!-- ### -->
- <modify-function signature="setAddress(const quint8*)" remove="all"/>
- </value-type>
-
- <value-type name="QHostInfo">
- <enum-type name="HostInfoError"/>
- <modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/>
- </value-type>
-
- <value-type name="QNetworkAddressEntry">
- <enum-type name="DnsEligibilityStatus" since="5.11"/>
- </value-type>
-
- <value-type name="QNetworkInterface">
- <enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
- <enum-type name="InterfaceType" since="5.11"/>
- </value-type>
-
- <value-type name="QNetworkProxy">
- <enum-type name="Capability" flags="Capabilities"/>
- <enum-type name="ProxyType"/>
- </value-type>
-
- <object-type name="QNetworkProxyFactory"/>
- <value-type name="QNetworkProxyQuery">
- <enum-type name="QueryType"/>
- </value-type>
-
- <value-type name="QIPv6Address">
- <add-function signature="__len__">
- <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-len"/>
- </add-function>
- <add-function signature="__getitem__">
- <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-getitem"/>
- </add-function>
- <add-function signature="__setitem__">
- <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-setitem"/>
- </add-function>
- </value-type>
-
- <value-type name="QAuthenticator"/>
- <value-type name="QNetworkCookie">
- <enum-type name="RawForm"/>
- <extra-includes>
- <include file-name="QDateTime" location="global"/>
- </extra-includes>
- </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="CacheLoadControl"/>
- <enum-type name="KnownHeaders"/>
- <enum-type name="RedirectPolicy" since="5.9"/>
- <enum-type name="TransferTimeoutConstant" since="5.15"/>
- </value-type>
-
- <object-type name="QAbstractNetworkCache"/>
- <object-type name="QNetworkDiskCache"/>
- <value-type name="QNetworkCacheMetaData"/>
-
- <object-type name="QSctpServer"/>
- <object-type name="QSctpSocket"/>
-
- <!-- 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="SubjectInfo"/>
- </value-type>
-
- <value-type name="QSslCertificateExtension"/>
-
- <value-type name="QSslCipher"/>
-
- <value-type name="QSslConfiguration">
- <enum-type name="NextProtocolNegotiationStatus"/>
- </value-type>
-
- <value-type name="QSslDiffieHellmanParameters" since="5.8">
- <enum-type name="Error"/>
- </value-type>
-
- <!-- Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
- <object-type name="QSslEllipticCurve"/>
- -->
-
- <value-type name="QSslError">
- <enum-type name="SslError"/>
- </value-type>
-
- <value-type name="QSslKey"/>
- <object-type name="QSslSocket">
- <enum-type name="SslMode"/>
- <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"/>
- </object-type>
-
- <value-type name="QSslPreSharedKeyAuthenticator"/>
-
- <!-- The above entries may be present in the system or not. Keep this section organized. -->
-</typesystem>
-
diff --git a/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
deleted file mode 100644
index 79df5af4a..000000000
--- a/sources/pyside2/PySide2/QtOpenGL/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-project(QtOpenGL)
-
-set(QtOpenGL_DROPPED_ENTRIES)
-
-set(QtOpenGL_SRC
-${QtOpenGL_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopengldebuglogger_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopengldebugmessage_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglframebufferobjectformat_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglpixeltransferoptions_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglshaderprogram_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopengltexture_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopengltextureblitter_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglversionprofile_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglvertexarrayobject_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglvertexarrayobject_binder_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglwindow_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglbuffer_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglshader_wrapper.cpp
-${QtOpenGL_GEN_DIR}/qopenglframebufferobject_wrapper.cpp
-# module is always needed
-${QtOpenGL_GEN_DIR}/qtopengl_module_wrapper.cpp
-)
-
-get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
- PROPERTY QT_ENABLED_PUBLIC_FEATURES)
-
-if("opengles2" IN_LIST QtGui_enabled_features)
- list(APPEND QtOpenGL_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
- message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
-else()
- list(APPEND QtOpenGL_SRC
- ${QtOpenGL_GEN_DIR}/qopengltimemonitor_wrapper.cpp
- ${QtOpenGL_GEN_DIR}/qopengltimerquery_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}OpenGL: Adding Desktop OpenGL classes")
-endif()
-
-set(QtOpenGL_include_dirs ${QtOpenGL_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
- )
-set(QtOpenGL_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES})
-set(QtOpenGL_deps QtGui)
-
-create_pyside_module(NAME QtOpenGL
- INCLUDE_DIRS QtOpenGL_include_dirs
- LIBRARIES QtOpenGL_libraries
- DEPS QtOpenGL_deps
- TYPESYSTEM_PATH QtOpenGL_SOURCE_DIR
- SOURCES QtOpenGL_SRC
- DROPPED_ENTRIES QtOpenGL_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml
deleted file mode 100644
index c04929cc4..000000000
--- a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtOpenGL">
- <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" />
-
- <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\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
- <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
-
- <object-type name="QOpenGLBuffer" since="5.0">
- <enum-type name="Access"/>
- <enum-type name="RangeAccessFlag" flags="RangeAccessFlags"/>
- <enum-type name="Type"/>
- <enum-type name="UsagePattern"/>
- </object-type>
- <object-type name="QOpenGLDebugLogger" since="5.1">
- <enum-type name="LoggingMode"/>
- </object-type>
- <value-type name="QOpenGLDebugMessage" since="5.1">
- <enum-type name="Source" flags="Sources"/>
- <enum-type name="Type" flags="Types"/>
- <enum-type name="Severity" flags="Severities"/>
- </value-type>
- <object-type name="QOpenGLFramebufferObject" since="5.0">
- <enum-type name="Attachment"/>
- <enum-type name="FramebufferRestorePolicy" since="5.7"/>
- </object-type>
- <value-type name="QOpenGLFramebufferObjectFormat"/>
- <object-type name="QAbstractOpenGLFunctions" since="5.1"/>
- <value-type name="QOpenGLPixelTransferOptions"/>
- <object-type name="QOpenGLShader" since="5.0">
- <enum-type name="ShaderTypeBit" flags="ShaderType"/>
- </object-type>
- <object-type name="QOpenGLShaderProgram" since="5.0">
- <modify-function signature="setAttributeArray(int,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setAttributeArray(const char*,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setAttributeArray(int,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setAttributeValue(int,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setAttributeValue(const char*,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setUniformValueArray(int,const float*,int,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setUniformValueArray(int,const int*,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setUniformValueArray(int,const unsigned int*,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 int*,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <modify-function signature="setUniformValueArray(const char*,const unsigned int*,int)">
- <modify-argument index="2"><array/></modify-argument>
- </modify-function>
- <!-- Add explicit signatures for the setUniformValue functions -->
- <modify-function signature="^setUniformValue\(const char\*,(float|int|uint)\)$" remove="all"/>
- <!-- No need for a signature for GLuint, since Qt (internally) calls the same function: glUniform1i -->
- <add-function signature="setUniformValue1f(const char*, float)" return-type="void">
- <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
- </add-function>
- <add-function signature="setUniformValue1i(const char*, int)" return-type="void">
- <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
- </add-function>
- <add-function signature="setUniformValue1f(int, float)" return-type="void">
- <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
- </add-function>
- <add-function signature="setUniformValue1i(int, int)" return-type="void">
- <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
- </add-function>
- </object-type>
- <object-type name="QOpenGLTexture" since="5.2">
- <enum-type name="BindingTarget"/>
- <enum-type name="CoordinateDirection"/>
- <enum-type name="ComparisonFunction"/>
- <enum-type name="ComparisonMode"/>
- <enum-type name="CubeMapFace"/>
- <enum-type name="DepthStencilMode"/>
- <enum-type name="Feature" flags="Features"/>
- <enum-type name="Filter"/>
- <enum-type name="MipMapGeneration"/>
- <enum-type name="PixelFormat"/>
- <enum-type name="PixelType"/>
- <enum-type name="SwizzleComponent"/>
- <enum-type name="SwizzleValue"/>
- <enum-type name="Target"/>
- <enum-type name="TextureFormat"/>
- <enum-type name="TextureFormatClass"/>
- <enum-type name="TextureUnitReset"/>
- <enum-type name="WrapMode"/>
- <modify-function signature="borderColor(unsigned int*)const" remove="all"/>
- <modify-function signature="borderColor(int*)const" remove="all"/>
- <modify-function signature="borderColor(float*)const" remove="all"/>
- </object-type>
- <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">
- <enum-type name="UpdateBehavior"/>
- </object-type>
- <value-type name="QOpenGLVersionProfile" since="5.1"/>
- <object-type name="QOpenGLVertexArrayObject">
- <object-type name="Binder"/>
- </object-type>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
deleted file mode 100644
index 7e795989f..000000000
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-project(QtOpenGLFunctions)
-
-get_property(QtOpenGLFunctions_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
- PROPERTY QT_ENABLED_PUBLIC_FEATURES)
-
-set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_wrapper.cpp)
-
-get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
- PROPERTY QT_ENABLED_PUBLIC_FEATURES)
-
-if("opengles2" IN_LIST QtGui_enabled_features)
- list(APPEND QtOpenGLFunctions_SRC
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)")
-else()
- list(APPEND QtOpenGLFunctions_SRC
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_1_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_2_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_3_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_4_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_5_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_0_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_1_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_0_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_1_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Adding Desktop OpenGL classes")
-endif()
-
-configure_file("${QtOpenGLFunctions_SOURCE_DIR}/QtOpenGLFunctions_global.post.h.in"
- "${QtOpenGLFunctions_BINARY_DIR}/QtOpenGLFunctions_global.post.h" @ONLY)
-
-set(QtOpenGLFunctions_include_dirs ${QtOpenGLFunctions_SOURCE_DIR}
- ${QtOpenGLFunctions_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtOpenGL_GEN_DIR}
- )
-
-set(QtOpenGLFunctions_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES})
-
-set(QtOpenGLFunctions_deps QtGui QtOpenGL)
-
-create_pyside_module(NAME QtOpenGLFunctions
- INCLUDE_DIRS QtOpenGLFunctions_include_dirs
- LIBRARIES QtOpenGLFunctions_libraries
- DEPS QtOpenGLFunctions_deps
- TYPESYSTEM_PATH QtOpenGLFunctions_SOURCE_DIR
- SOURCES QtOpenGLFunctions_SRC
- TYPESYSTEM_NAME ${QtOpenGLFunctions_BINARY_DIR}/typesystem_openglfunctions.xml
- DROPPED_ENTRIES QtOpenGLFunctions_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml
deleted file mode 100644
index f749d1d7c..000000000
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml
+++ /dev/null
@@ -1,404 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtOpenGLFunctions">
- <load-typesystem name="QtOpenGL/typesystem_opengl.xml" generate="no"/>
- <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
-
- <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\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
- <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
- <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
- <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
- <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
- <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+ ?\*$"/>
-
- <object-type name="QOpenGLFunctions_1_0" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_1_1" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_1_2" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_1_3" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_1_4" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_1_5" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_2_0" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- </object-type>
- <object-type name="QOpenGLFunctions_2_1" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- </object-type>
- <object-type name="QOpenGLFunctions_3_0" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- </object-type>
- <object-type name="QOpenGLFunctions_3_1" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- </object-type>
- <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- </object-type>
- <object-type name="QOpenGLFunctions_3_2_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- </object-type>
- <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- </object-type>
- <object-type name="QOpenGLFunctions_3_3_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- </object-type>
- <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_0;
- </object-type>
- <object-type name="QOpenGLFunctions_4_0_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- </object-type>
- <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications4_0;
- </object-type>
- <object-type name="QOpenGLFunctions_4_1_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications_va;
- </object-type>
- <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- </object-type>
- <object-type name="QOpenGLFunctions_4_2_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications_va;
- </object-type>
- <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications4_3;
- </object-type>
- <object-type name="QOpenGLFunctions_4_3_Core" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_3;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications_va;
- </object-type>
- <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications4_3;
- &openglfunctions_modifications4_4;
- &openglfunctions_modifications4_4_core;
- </object-type>
- <object-type name="QOpenGLFunctions_4_4_Core" since="5.5">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications_va;
- &openglfunctions_modifications4_3;
- &openglfunctions_modifications4_4;
- &openglfunctions_modifications4_4_core;
- </object-type>
- <object-type name="QOpenGLFunctions_4_5_Compatibility" since="5.5">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_0_compat;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_1_compat;
- &openglfunctions_modifications1_2_compat;
- &openglfunctions_modifications1_3_compat;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications1_4_compat;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_0_compat;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications3_3a;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications4_3;
- &openglfunctions_modifications4_4;
- &openglfunctions_modifications4_4_core;
- &openglfunctions_modifications4_5;
- </object-type>
- <object-type name="QOpenGLFunctions_4_5_Core" since="5.5">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- &openglfunctions_modifications1_4;
- &openglfunctions_modifications2_0;
- &openglfunctions_modifications2_1;
- &openglfunctions_modifications3_0;
- &openglfunctions_modifications3_3;
- &openglfunctions_modifications4_0;
- &openglfunctions_modifications4_1;
- &openglfunctions_modifications4_3;
- &openglfunctions_modifications4_4;
- &openglfunctions_modifications4_4_core;
- &openglfunctions_modifications4_5;
- &openglfunctions_modifications_va;
- </object-type>
- <object-type name="QOpenGLFunctions_ES2" since="5.1">
- &openglfunctions_modifications1_0;
- &openglfunctions_modifications1_1;
- </object-type>
- <suppress-warning text="^There's no user provided way.*QOpenGLFunctions_\d_\d.*::glIndex.*$"/>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtOpenGLWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLWidgets/CMakeLists.txt
deleted file mode 100644
index 694bd7f3a..000000000
--- a/sources/pyside2/PySide2/QtOpenGLWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-project(QtOpenGLWidgets)
-
-set(QtOpenGLWidgets_SRC
-${QtOpenGLWidgets_GEN_DIR}/qopenglwidget_wrapper.cpp
-# module is always needed
-${QtOpenGLWidgets_GEN_DIR}/qtopenglwidgets_module_wrapper.cpp
-)
-
-set(QtOpenGLWidgets_include_dirs ${QtOpenGLWidgets_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}Widgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtOpenGLWidgets_GEN_DIR})
-
-set(QtOpenGLWidgets_libraries pyside2
- ${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)
-
-create_pyside_module(NAME QtOpenGLWidgets
- INCLUDE_DIRS QtOpenGLWidgets_include_dirs
- LIBRARIES QtOpenGLWidgets_libraries
- DEPS QtOpenGLWidgets_deps
- TYPESYSTEM_PATH QtOpenGLWidgets_SOURCE_DIR
- SOURCES QtOpenGLWidgets_SRC)
diff --git a/sources/pyside2/PySide2/QtOpenGLWidgets/typesystem_openglwidgets.xml b/sources/pyside2/PySide2/QtOpenGLWidgets/typesystem_openglwidgets.xml
deleted file mode 100644
index 983fc37fc..000000000
--- a/sources/pyside2/PySide2/QtOpenGLWidgets/typesystem_openglwidgets.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtOpenGLWidgets">
- <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"/>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt b/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
deleted file mode 100644
index 321478c3e..000000000
--- a/sources/pyside2/PySide2/QtPositioning/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-project(QtPositioning)
-
-set(QtPositioning_OPTIONAL_SRC )
-set(QtPositioning_DROPPED_ENTRIES )
-
-set(QtPositioning_SRC
-${QtPositioning_GEN_DIR}/qgeoaddress_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeoareamonitorinfo_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeoareamonitorsource_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeolocation_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeocircle_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeocoordinate_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeopath_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeopositioninfo_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeopositioninfosource_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeopositioninfosourcefactory_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeorectangle_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeosatelliteinfo_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeosatelliteinfosource_wrapper.cpp
-${QtPositioning_GEN_DIR}/qgeoshape_wrapper.cpp
-${QtPositioning_GEN_DIR}/qnmeapositioninfosource_wrapper.cpp
-# module is always needed
-${QtPositioning_GEN_DIR}/qtpositioning_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}Positioning_VERSION VERSION_EQUAL 5.10.0
- OR Qt${QT_MAJOR_VERSION}Positioning_VERSION VERSION_GREATER 5.10.0)
- list(APPEND QtPositioning_SRC
- ${QtPositioning_GEN_DIR}/qgeopolygon_wrapper.cpp)
-endif()
-
-set(QtPositioning_include_dirs ${QtPositioning_SOURCE_DIR}
- ${QtPositioning_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Positioning_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtPositioning_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Positioning_LIBRARIES})
-
-set(QtPositioning_deps QtCore)
-
-create_pyside_module(NAME QtPositioning
- INCLUDE_DIRS QtPositioning_include_dirs
- LIBRARIES QtPositioning_libraries
- DEPS QtPositioning_deps
- TYPESYSTEM_PATH QtPositioning_SOURCE_DIR
- SOURCES QtPositioning_SRC
- DROPPED_ENTRIES QtPositioning_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml b/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml
deleted file mode 100644
index 5a7208950..000000000
--- a/sources/pyside2/PySide2/QtPositioning/typesystem_positioning.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtPositioning">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <value-type name="QGeoAddress"/>
- <value-type name="QGeoAreaMonitorInfo"/>
- <object-type name="QGeoAreaMonitorSource">
- <enum-type name="Error"/>
- <enum-type name="AreaMonitorFeature" flags="AreaMonitorFeatures"/>
- </object-type>
- <value-type name="QGeoLocation"/>
- <value-type name="QGeoCircle"/>
- <value-type name="QGeoCoordinate">
- <enum-type name="CoordinateType"/>
- <enum-type name="CoordinateFormat"/>
- </value-type>
- <value-type name="QGeoPath"/>
- <value-type name="QGeoPolygon" since="5.10"/>
- <value-type name="QGeoPositionInfo">
- <enum-type name="Attribute"/>
- </value-type>
- <object-type name="QGeoPositionInfoSource">
- <enum-type name="Error"/>
- <enum-type name="PositioningMethod" flags="PositioningMethods"/>
- </object-type>
- <object-type name="QGeoPositionInfoSourceFactory"/>
- <value-type name="QGeoRectangle"/>
- <value-type name="QGeoSatelliteInfo">
- <enum-type name="Attribute"/>
- <enum-type name="SatelliteSystem"/>
- </value-type>
- <object-type name="QGeoSatelliteInfoSource">
- <enum-type name="Error"/>
- </object-type>
- <value-type name="QGeoShape">
- <enum-type name="ShapeType"/>
- </value-type>
- <object-type name="QNmeaPositionInfoSource">
- <enum-type name="UpdateMode"/>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt b/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt
deleted file mode 100644
index fd39797da..000000000
--- a/sources/pyside2/PySide2/QtPrintSupport/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-project(QtPrintSupport)
-
-set(QtPrintSupport_SRC
-${QtPrintSupport_GEN_DIR}/qabstractprintdialog_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qpagesetupdialog_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprintdialog_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprintengine_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprinter_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprinterinfo_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprintpreviewdialog_wrapper.cpp
-${QtPrintSupport_GEN_DIR}/qprintpreviewwidget_wrapper.cpp
-# module is always needed
-${QtPrintSupport_GEN_DIR}/qtprintsupport_module_wrapper.cpp
-)
-
-configure_file("${QtPrintSupport_SOURCE_DIR}/typesystem_printsupport.xml.in"
- "${QtPrintSupport_BINARY_DIR}/typesystem_printsupport.xml" @ONLY)
-
-set(QtPrintSupport_include_dirs ${QtPrintSupport_SOURCE_DIR}
- ${QtPrintSupport_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
-set(QtPrintSupport_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
- )
-set(QtPrintSupport_deps QtWidgets)
-create_pyside_module(NAME QtPrintSupport
- INCLUDE_DIRS QtPrintSupport_include_dirs
- LIBRARIES QtPrintSupport_libraries
- DEPS QtPrintSupport_deps
- TYPESYSTEM_PATH QtPrintSupport_SOURCE_DIR
- SOURCES QtPrintSupport_SRC
- TYPESYSTEM_NAME ${QtPrintSupport_BINARY_DIR}/typesystem_printsupport.xml)
diff --git a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml.in b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml.in
deleted file mode 100644
index ff078d19a..000000000
--- a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport.xml.in
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtPrintSupport">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
- <load-typesystem name="QtPrintSupport/typesystem_printsupport_common.xml" generate="yes"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml b/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml
deleted file mode 100644
index f51edf67a..000000000
--- a/sources/pyside2/PySide2/QtPrintSupport/typesystem_printsupport_common.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtPrintSupport">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
- <object-type name="QPageSetupDialog">
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QAbstractPrintDialog">
- <enum-type name="PrintDialogOption" flags="PrintDialogOptions"/>
- <enum-type name="PrintRange"/>
- </object-type>
-
- <object-type name="QPrintDialog">
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- </object-type>
- <object-type name="QPrintEngine">
- <enum-type name="PrintEnginePropertyKey"/>
- </object-type>
- <value-type name="QPrinterInfo"/>
- <rejection class="QPrinter" function-name="printerSelectionOption"/>
- <rejection class="QPrinter" function-name="setPrinterSelectionOption"/>
-
- <object-type name="QPrinter" >
- <enum-type name="ColorMode"/>
- <enum-type name="DuplexMode"/>
- <enum-type name="OutputFormat"/>
- <enum-type name="PageOrder"/>
- <enum-type name="PaperSource"/>
- <enum-type name="PrintRange"/>
- <enum-type name="PrinterMode"/>
- <enum-type name="PrinterState"/>
- <enum-type name="Unit"/>
- <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*,args">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="setEngines(QPrintEngine*,QPaintEngine*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <extra-includes>
- <include file-name="QPrinterInfo" location="global"/>
- </extra-includes>
- <!-- fixme: Check if this is still required in Qt 6:
- bool QPagedPaintDevice::setPageSize(QPageSize)
- void QPagedPaintDevice::setPageSize(QPagedPaintDevice::PageSize) -->
- <add-function signature="setPageSize(const QPageSize&amp;)" return-type="bool">
- <inject-code file="../glue/qtprintsupport.cpp" snippet="setpagesize" />
- </add-function>
- </object-type>
-
- <object-type name="QPrintPreviewDialog"/>
- <object-type name="QPrintPreviewWidget">
- <enum-type name="ViewMode"/>
- <enum-type name="ZoomMode"/>
- <modify-function signature="print()" rename="print_"/>
- </object-type>
-
-</typesystem>
-
diff --git a/sources/pyside2/PySide2/QtQml/CMakeLists.txt b/sources/pyside2/PySide2/QtQml/CMakeLists.txt
deleted file mode 100644
index 3c5dd43fc..000000000
--- a/sources/pyside2/PySide2/QtQml/CMakeLists.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-project(QtQml)
-
-set(QtQml_registerType "${QtQml_SOURCE_DIR}/pysideqmlregistertype.cpp")
-
-set(QtQml_SRC
-${QtQml_GEN_DIR}/qjsengine_wrapper.cpp
-${QtQml_GEN_DIR}/qjsvalue_wrapper.cpp
-${QtQml_GEN_DIR}/qjsvalueiterator_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlabstracturlinterceptor_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlapplicationengine_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlcomponent_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlcontext_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlerror_wrapper.cpp
-${QtQml_GEN_DIR}/qqmldebuggingenabler_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlengine_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlexpression_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlextensioninterface_wrapper.cpp
-${QtQml_GEN_DIR}/qqmltypesextensioninterface_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlextensionplugin_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlfile_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlfileselector_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlimageproviderbase_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlincubator_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlincubationcontroller_wrapper.cpp
-#${QtQml_GEN_DIR}/qqmllistproperty_wrapper.cpp
-${QtQml_GEN_DIR}/qqmllistreference_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlparserstatus_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlproperty_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlpropertymap_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlpropertyvaluesource_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlscriptstring_wrapper.cpp
-${QtQml_GEN_DIR}/qqmlnetworkaccessmanagerfactory_wrapper.cpp
-${QtQml_GEN_DIR}/qtqml_wrapper.cpp
-# module is always needed
-${QtQml_GEN_DIR}/qtqml_module_wrapper.cpp
-)
-
-set(QtQml_include_dirs ${QtQml_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}Qml_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtGui_GEN_DIR}
- ${QtCore_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtQml_GEN_DIR})
-
-set(QtQml_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES})
-
-set(QtQml_deps QtGui QtNetwork)
-
-create_pyside_module(NAME QtQml
- INCLUDE_DIRS QtQml_include_dirs
- LIBRARIES QtQml_libraries
- DEPS QtQml_deps
- TYPESYSTEM_PATH QtQml_SOURCE_DIR
- SOURCES QtQml_SRC
- STATIC_SOURCES QtQml_registerType)
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
deleted file mode 100644
index 3a3c0d27e..000000000
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
+++ /dev/null
@@ -1,732 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "pysideqmlregistertype.h"
-
-#include <limits>
-
-// shiboken
-#include <shiboken.h>
-#include <signature.h>
-
-// pyside
-#include <pyside.h>
-#include <pyside_p.h>
-#include <pysideproperty.h>
-
-// auto generated headers
-#include "pyside2_qtcore_python.h"
-#include "pyside2_qtqml_python.h"
-
-#include <QtQml/QJSValue>
-
-// Forward declarations.
-static void propListMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call,
- void **args);
-
-// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr.
-static QMutex nextQmlElementMutex;
-
-static void createInto(void *memory, void *type)
-{
- QMutexLocker locker(&nextQmlElementMutex);
- PySide::setNextQObjectMemoryAddr(memory);
- Shiboken::GilState state;
- PyObject *obj = PyObject_CallObject(reinterpret_cast<PyObject *>(type), 0);
- if (!obj || PyErr_Occurred())
- PyErr_Print();
- PySide::setNextQObjectMemoryAddr(0);
-}
-
-int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
- int versionMinor, const char *qmlName, const char *noCreationReason,
- bool creatable)
-{
- using namespace Shiboken;
-
- static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
- assert(qobjectType);
-
- PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
- if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
- PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
- qobjectType->tp_name, pyObjType->tp_name);
- return -1;
- }
-
- const QMetaObject *metaObject = PySide::retrieveMetaObject(pyObjType);
- Q_ASSERT(metaObject);
-
- QQmlPrivate::RegisterType type;
-
- // Allow registering Qt Quick items.
- bool registered = false;
-#ifdef PYSIDE_QML_SUPPORT
- QuickRegisterItemFunction quickRegisterItemFunction = getQuickRegisterItemFunction();
- if (quickRegisterItemFunction) {
- registered =
- quickRegisterItemFunction(pyObj, uri, versionMajor, versionMinor,
- qmlName, creatable, noCreationReason, &type);
- }
-#endif
-
- // Register as simple QObject rather than Qt Quick item.
- if (!registered) {
- // Incref the type object, don't worry about decref'ing it because
- // there's no way to unregister a QML type.
- Py_INCREF(pyObj);
-
- type.structVersion = 0;
-
- // FIXME: Fix this to assign new type ids each time.
- type.typeId = QMetaType(QMetaType::QObjectStar);
- type.listId = QMetaType::fromType<QQmlListProperty<QObject> >();
- type.attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<QObject>();
- type.attachedPropertiesMetaObject = QQmlPrivate::attachedPropertiesMetaObject<QObject>();
-
- type.parserStatusCast =
- QQmlPrivate::StaticCastSelector<QObject, QQmlParserStatus>::cast();
- type.valueSourceCast =
- QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueSource>::cast();
- type.valueInterceptorCast =
- QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueInterceptor>::cast();
-
- int objectSize = static_cast<int>(PySide::getSizeOfQObject(
- reinterpret_cast<SbkObjectType *>(pyObj)));
- type.objectSize = objectSize;
- type.create = creatable ? createInto : nullptr;
- type.noCreationReason = noCreationReason;
- type.userdata = pyObj;
- type.uri = uri;
- type.version = QTypeRevision::fromVersion(versionMajor, versionMinor);
- type.elementName = qmlName;
-
- type.extensionObjectCreate = 0;
- type.extensionMetaObject = 0;
- type.customParser = 0;
- }
- type.metaObject = metaObject; // Snapshot may have changed.
-
- int qmlTypeId = QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type);
- if (qmlTypeId == -1) {
- PyErr_Format(PyExc_TypeError, "QML meta type registration of \"%s\" failed.",
- qmlName);
- }
- return qmlTypeId;
-}
-
-int PySide::qmlRegisterSingletonType(PyObject *pyObj, const char *uri, int versionMajor,
- int versionMinor, const char *qmlName, PyObject *callback,
- bool isQObject, bool hasCallback)
-{
- using namespace Shiboken;
-
- if (hasCallback) {
- if (!PyCallable_Check(callback)) {
- PyErr_Format(PyExc_TypeError, "Invalid callback specified.");
- return -1;
- }
-
- AutoDecRef funcCode(PyObject_GetAttrString(callback, "__code__"));
- AutoDecRef argCount(PyObject_GetAttrString(funcCode, "co_argcount"));
-
- int count = PyInt_AsLong(argCount);
-
- if (count != 1) {
- PyErr_Format(PyExc_TypeError, "Callback has a bad parameter count.");
- return -1;
- }
-
- // Make sure the callback never gets deallocated
- Py_INCREF(callback);
- }
-
- const QMetaObject *metaObject = nullptr;
-
- if (isQObject) {
- static PyTypeObject *qobjectType = Conversions::getPythonTypeObject("QObject*");
- assert(qobjectType);
-
- PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
- if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
- PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
- qobjectType->tp_name, pyObjType->tp_name);
- return -1;
- }
-
- // If we don't have a callback we'll need the pyObj to stay allocated indefinitely
- if (!hasCallback)
- Py_INCREF(pyObj);
-
- metaObject = PySide::retrieveMetaObject(pyObjType);
- Q_ASSERT(metaObject);
- }
-
- QQmlPrivate::RegisterSingletonType type;
- type.structVersion = 0;
-
- type.uri = uri;
- type.version = QTypeRevision::fromVersion(versionMajor, versionMinor);
- type.typeName = qmlName;
- type.instanceMetaObject = metaObject;
-
- if (isQObject) {
- // FIXME: Fix this to assign new type ids each time.
- type.typeId = QMetaType(QMetaType::QObjectStar);
-
- type.qObjectApi =
- [callback, pyObj, hasCallback](QQmlEngine *engine, QJSEngine *) -> QObject * {
- AutoDecRef args(PyTuple_New(hasCallback ? 1 : 0));
-
- if (hasCallback) {
- PyTuple_SET_ITEM(args, 0, Conversions::pointerToPython(
- (SbkObjectType *)SbkPySide2_QtQmlTypes[SBK_QQMLENGINE_IDX],
- engine));
- }
-
- AutoDecRef retVal(PyObject_CallObject(hasCallback ? callback : pyObj, args));
-
- SbkObjectType *qobjectType = (SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX];
-
- // Make sure the callback returns something we can convert, else the entire application will crash.
- if (retVal.isNull() ||
- Conversions::isPythonToCppPointerConvertible(qobjectType, retVal) == nullptr) {
- PyErr_Format(PyExc_TypeError, "Callback returns invalid value.");
- return nullptr;
- }
-
- QObject *obj = nullptr;
- Conversions::pythonToCppPointer(qobjectType, retVal, &obj);
-
- if (obj != nullptr)
- Py_INCREF(retVal);
-
- return obj;
- };
- } else {
- type.scriptApi =
- [callback](QQmlEngine *engine, QJSEngine *) -> QJSValue {
- AutoDecRef args(PyTuple_New(1));
-
- PyTuple_SET_ITEM(args, 0, Conversions::pointerToPython(
- (SbkObjectType *)SbkPySide2_QtQmlTypes[SBK_QQMLENGINE_IDX],
- engine));
-
- AutoDecRef retVal(PyObject_CallObject(callback, args));
-
- SbkObjectType *qjsvalueType = (SbkObjectType *)SbkPySide2_QtQmlTypes[SBK_QJSVALUE_IDX];
-
- // Make sure the callback returns something we can convert, else the entire application will crash.
- if (retVal.isNull() ||
- Conversions::isPythonToCppPointerConvertible(qjsvalueType, retVal) == nullptr) {
- PyErr_Format(PyExc_TypeError, "Callback returns invalid value.");
- return QJSValue(QJSValue::UndefinedValue);
- }
-
- QJSValue *val = nullptr;
- Conversions::pythonToCppPointer(qjsvalueType, retVal, &val);
-
- Py_INCREF(retVal);
-
- return *val;
- };
- }
-
- return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &type);
-}
-
-extern "C"
-{
-
-// This is the user data we store in the property.
-struct QmlListProperty
-{
- PyTypeObject *type;
- PyObject *append;
- PyObject *count;
- PyObject *at;
- PyObject *clear;
- PyObject *replace;
- PyObject *removeLast;
-};
-
-static int propListTpInit(PyObject *self, PyObject *args, PyObject *kwds)
-{
- static const char *kwlist[] = {"type", "append", "count", "at", "clear", "replace", "removeLast", 0};
- PySideProperty *pySelf = reinterpret_cast<PySideProperty *>(self);
- QmlListProperty *data = new QmlListProperty;
- memset(data, 0, sizeof(QmlListProperty));
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- "O|OOOOOO:QtQml.ListProperty", (char **) kwlist,
- &data->type,
- &data->append,
- &data->count,
- &data->at,
- &data->clear,
- &data->replace,
- &data->removeLast)) {
- return -1;
- }
-
- static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
- assert(qobjectType);
-
- if (!PySequence_Contains(data->type->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
- PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
- qobjectType->tp_name, data->type->tp_name);
- return -1;
- }
-
- if ((data->append && data->append != Py_None && !PyCallable_Check(data->append)) ||
- (data->count && data->count != Py_None && !PyCallable_Check(data->count)) ||
- (data->at && data->at != Py_None && !PyCallable_Check(data->at)) ||
- (data->clear && data->clear != Py_None && !PyCallable_Check(data->clear)) ||
- (data->replace && data->replace != Py_None && !PyCallable_Check(data->replace)) ||
- (data->removeLast && data->removeLast != Py_None && !PyCallable_Check(data->removeLast))) {
- PyErr_Format(PyExc_TypeError, "Non-callable parameter given");
- return -1;
- }
-
- PySide::Property::setMetaCallHandler(pySelf, &propListMetaCall);
- PySide::Property::setTypeName(pySelf, "QQmlListProperty<QObject>");
- PySide::Property::setUserData(pySelf, data);
-
- return 0;
-}
-
-void propListTpFree(void *self)
-{
- auto pySelf = reinterpret_cast<PySideProperty *>(self);
- delete reinterpret_cast<QmlListProperty *>(PySide::Property::userData(pySelf));
- // calls base type constructor
- Py_TYPE(pySelf)->tp_base->tp_free(self);
-}
-
-static PyType_Slot PropertyListType_slots[] = {
- {Py_tp_init, (void *)propListTpInit},
- {Py_tp_free, (void *)propListTpFree},
- {Py_tp_dealloc, (void *)Sbk_object_dealloc},
- {0, 0}
-};
-static PyType_Spec PropertyListType_spec = {
- "2:PySide2.QtQml.ListProperty",
- sizeof(PySideProperty),
- 0,
- Py_TPFLAGS_DEFAULT,
- PropertyListType_slots,
-};
-
-
-PyTypeObject *PropertyListTypeF(void)
-{
- static PyTypeObject *type = nullptr;
- if (!type) {
- PyObject *bases = Py_BuildValue("(O)", PySidePropertyTypeF());
- type = (PyTypeObject *)SbkType_FromSpecWithBases(&PropertyListType_spec, bases);
- Py_XDECREF(bases);
- }
- return type;
-}
-
-} // extern "C"
-
-// Implementation of QQmlListProperty<T>::AppendFunction callback
-void propListAppender(QQmlListProperty<QObject> *propList, QObject *item)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(2));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
- PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], item));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
-
- if (PyErr_Occurred())
- PyErr_Print();
-}
-
-// Implementation of QQmlListProperty<T>::CountFunction callback
-int propListCount(QQmlListProperty<QObject> *propList)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(1));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
-
- // Check return type
- int cppResult = 0;
- PythonToCppFunc pythonToCpp = 0;
- if (PyErr_Occurred())
- PyErr_Print();
- else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), retVal)))
- pythonToCpp(retVal, &cppResult);
- return cppResult;
-}
-
-// Implementation of QQmlListProperty<T>::AtFunction callback
-QObject *propListAt(QQmlListProperty<QObject> *propList, int index)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(2));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
- PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
-
- QObject *result = 0;
- if (PyErr_Occurred())
- PyErr_Print();
- else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
- Shiboken::Conversions::pythonToCppPointer((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], retVal, &result);
- return result;
-}
-
-// Implementation of QQmlListProperty<T>::ClearFunction callback
-void propListClear(QQmlListProperty<QObject> * propList)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(1));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
-
- if (PyErr_Occurred())
- PyErr_Print();
-}
-
-// Implementation of QQmlListProperty<T>::ReplaceFunction callback
-void propListReplace(QQmlListProperty<QObject> *propList, int index, QObject *value)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(3));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
- PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
- PyTuple_SET_ITEM(args, 2, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], value));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->replace, args));
-
- if (PyErr_Occurred())
- PyErr_Print();
-}
-
-// Implementation of QQmlListProperty<T>::RemoveLastFunction callback
-void propListRemoveLast(QQmlListProperty<QObject> *propList)
-{
- Shiboken::GilState state;
-
- Shiboken::AutoDecRef args(PyTuple_New(1));
- PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
-
- auto data = reinterpret_cast<QmlListProperty *>(propList->data);
- Shiboken::AutoDecRef retVal(PyObject_CallObject(data->removeLast, args));
-
- if (PyErr_Occurred())
- PyErr_Print();
-}
-
-// qt_metacall specialization for ListProperties
-static void propListMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call, void **args)
-{
- if (call != QMetaObject::ReadProperty)
- return;
-
- auto data = reinterpret_cast<QmlListProperty *>(PySide::Property::userData(pp));
- QObject *qobj;
- Shiboken::Conversions::pythonToCppPointer((SbkObjectType *)SbkPySide2_QtCoreTypes[SBK_QOBJECT_IDX], self, &qobj);
- QQmlListProperty<QObject> declProp(qobj, data,
- data->append && data->append != Py_None ? &propListAppender : nullptr,
- data->count && data->count != Py_None ? &propListCount : nullptr,
- data->at && data->at != Py_None ? &propListAt : nullptr,
- data->clear && data->clear != Py_None ? &propListClear : nullptr,
- data->replace && data->replace != Py_None ? &propListReplace : nullptr,
- data->removeLast && data->removeLast != Py_None ? &propListRemoveLast : nullptr);
-
- // Copy the data to the memory location requested by the meta call
- void *v = args[0];
- *reinterpret_cast<QQmlListProperty<QObject> *>(v) = declProp;
-}
-
-// VolatileBool (volatile bool) type definition.
-
-static PyObject *
-QtQml_VolatileBoolObject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
- static const char *kwlist[] = {"x", 0};
- PyObject *x = Py_False;
- long ok;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:bool", const_cast<char **>(kwlist), &x))
- return Q_NULLPTR;
- ok = PyObject_IsTrue(x);
- if (ok < 0)
- return Q_NULLPTR;
-
- QtQml_VolatileBoolObject *self
- = reinterpret_cast<QtQml_VolatileBoolObject *>(type->tp_alloc(type, 0));
-
- if (self != nullptr)
- self->flag = new AtomicBool(ok);
-
- return reinterpret_cast<PyObject *>(self);
-}
-
-static void QtQml_VolatileBoolObject_dealloc(PyObject *self)
-{
- auto volatileBool = reinterpret_cast<QtQml_VolatileBoolObject *>(self);
- delete volatileBool->flag;
- Sbk_object_dealloc(self);
-}
-
-static PyObject *
-QtQml_VolatileBoolObject_get(QtQml_VolatileBoolObject *self)
-{
- return *self->flag ? Py_True : Py_False;
-}
-
-static PyObject *
-QtQml_VolatileBoolObject_set(QtQml_VolatileBoolObject *self, PyObject *args)
-{
- PyObject *value = Py_False;
- long ok;
-
- if (!PyArg_ParseTuple(args, "O:bool", &value)) {
- return Q_NULLPTR;
- }
-
- ok = PyObject_IsTrue(value);
- if (ok < 0) {
- PyErr_SetString(PyExc_TypeError, "Not a boolean value.");
- return Q_NULLPTR;
- }
-
- *self->flag = ok > 0;
-
- Py_RETURN_NONE;
-}
-
-static PyMethodDef QtQml_VolatileBoolObject_methods[] = {
- {"get", reinterpret_cast<PyCFunction>(QtQml_VolatileBoolObject_get), METH_NOARGS,
- "B.get() -> Bool. Returns the value of the volatile boolean"
- },
- {"set", reinterpret_cast<PyCFunction>(QtQml_VolatileBoolObject_set), METH_VARARGS,
- "B.set(a) -> None. Sets the value of the volatile boolean"
- },
- {Q_NULLPTR} /* Sentinel */
-};
-
-static PyObject *
-QtQml_VolatileBoolObject_repr(QtQml_VolatileBoolObject *self)
-{
- PyObject *s;
-
- if (*self->flag)
- s = PyBytes_FromFormat("%s(True)",
- Py_TYPE(self)->tp_name);
- else
- s = PyBytes_FromFormat("%s(False)",
- Py_TYPE(self)->tp_name);
- Py_XINCREF(s);
- return s;
-}
-
-static PyObject *
-QtQml_VolatileBoolObject_str(QtQml_VolatileBoolObject *self)
-{
- PyObject *s;
-
- if (*self->flag)
- s = PyBytes_FromFormat("%s(True) -> %p",
- Py_TYPE(self)->tp_name, self->flag);
- else
- s = PyBytes_FromFormat("%s(False) -> %p",
- Py_TYPE(self)->tp_name, self->flag);
- Py_XINCREF(s);
- return s;
-}
-
-static PyType_Slot QtQml_VolatileBoolType_slots[] = {
- {Py_tp_repr, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_repr)},
- {Py_tp_str, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_str)},
- {Py_tp_methods, (void *)QtQml_VolatileBoolObject_methods},
- {Py_tp_new, (void *)QtQml_VolatileBoolObject_new},
- {Py_tp_dealloc, (void *)QtQml_VolatileBoolObject_dealloc},
- {0, 0}
-};
-static PyType_Spec QtQml_VolatileBoolType_spec = {
- "2:PySide2.QtQml.VolatileBool",
- sizeof(QtQml_VolatileBoolObject),
- 0,
- Py_TPFLAGS_DEFAULT,
- QtQml_VolatileBoolType_slots,
-};
-
-
-PyTypeObject *QtQml_VolatileBoolTypeF(void)
-{
- static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
- SbkType_FromSpec(&QtQml_VolatileBoolType_spec));
- return type;
-}
-
-static const char *PropertyList_SignatureStrings[] = {
- "PySide2.QtQml.ListProperty(type:type,append:typing.Callable,"
- "at:typing.Callable=None,clear:typing.Callable=None,count:typing.Callable=None)",
- nullptr}; // Sentinel
-
-static const char *VolatileBool_SignatureStrings[] = {
- "PySide2.QtQml.VolatileBool.get()->bool",
- "PySide2.QtQml.VolatileBool.set(a:object)",
- nullptr}; // Sentinel
-
-void PySide::initQmlSupport(PyObject *module)
-{
- // Export QmlListProperty type
- if (InitSignatureStrings(PropertyListTypeF(), PropertyList_SignatureStrings) < 0) {
- PyErr_Print();
- qWarning() << "Error initializing PropertyList type.";
- return;
- }
-
- // Register QQmlListProperty metatype for use in QML
- qRegisterMetaType<QQmlListProperty<QObject>>();
-
- Py_INCREF(reinterpret_cast<PyObject *>(PropertyListTypeF()));
- PyModule_AddObject(module, PepType_GetNameStr(PropertyListTypeF()),
- reinterpret_cast<PyObject *>(PropertyListTypeF()));
-
- if (InitSignatureStrings(QtQml_VolatileBoolTypeF(), VolatileBool_SignatureStrings) < 0) {
- PyErr_Print();
- qWarning() << "Error initializing VolatileBool type.";
- return;
- }
-
- Py_INCREF(QtQml_VolatileBoolTypeF());
- PyModule_AddObject(module, PepType_GetNameStr(QtQml_VolatileBoolTypeF()),
- reinterpret_cast<PyObject *>(QtQml_VolatileBoolTypeF()));
-}
-
-static std::string getGlobalString(const char *name)
-{
- using Shiboken::AutoDecRef;
-
- PyObject *globals = PyEval_GetGlobals();
-
- AutoDecRef pyName(Py_BuildValue("s", name));
-
- PyObject *globalVar = PyDict_GetItem(globals, pyName);
-
- if (globalVar == nullptr || !PyUnicode_Check(globalVar))
- return "";
-
- const char *stringValue = PyUnicode_AsUTF8(globalVar);
- return stringValue != nullptr ? stringValue : "";
-}
-
-static int getGlobalInt(const char *name)
-{
- using Shiboken::AutoDecRef;
-
- PyObject *globals = PyEval_GetGlobals();
-
- AutoDecRef pyName(Py_BuildValue("s", name));
-
- PyObject *globalVar = PyDict_GetItem(globals, pyName);
-
- if (globalVar == nullptr || !PyLong_Check(globalVar))
- return -1;
-
- long value = PyLong_AsLong(globalVar);
-
- if (value > std::numeric_limits<int>::max() || value < std::numeric_limits<int>::min())
- return -1;
-
- return value;
-}
-
-PyObject *PySide::qmlElementMacro(PyObject *pyObj)
-{
- if (!PyType_Check(pyObj)) {
- PyErr_Format(PyExc_TypeError, "This decorator can only be used on classes.");
- return nullptr;
- }
-
- static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
- assert(qobjectType);
-
- PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
- if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
- PyErr_Format(PyExc_TypeError, "This decorator can only be used with classes inherited from QObject, got %s.", pyObjType->tp_name);
- return nullptr;
- }
-
- std::string importName = getGlobalString("QML_IMPORT_NAME");
- int majorVersion = getGlobalInt("QML_IMPORT_MAJOR_VERSION");
- int minorVersion = getGlobalInt("QML_IMPORT_MINOR_VERSION");
-
- if (importName.empty()) {
- PyErr_Format(PyExc_TypeError, "You need specify QML_IMPORT_NAME in order to use QmlElement.");
- return nullptr;
- }
-
- if (majorVersion == -1) {
- PyErr_Format(PyExc_TypeError, "You need specify QML_IMPORT_MAJOR_VERSION in order to use QmlElement.");
- return nullptr;
- }
-
- // Specifying a minor version is optional
- if (minorVersion == -1)
- minorVersion = 0;
-
- if (qmlRegisterType(pyObj, importName.c_str(), majorVersion, minorVersion, pyObjType->tp_name) == -1) {
- PyErr_Format(PyExc_TypeError, "Failed to register type %s.", pyObjType->tp_name);
- }
-
- return pyObj;
-}
diff --git a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
deleted file mode 100644
index 0d7adf9e8..000000000
--- a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtQml">
- <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"/>
-
- <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 {
- PyObject_HEAD
- AtomicBool *flag;
- } QtQml_VolatileBoolObject;
- </inject-code>
-
- <inject-code class="native" position="beginning">
- #include "pysideqmlregistertype.h"
- </inject-code>
-
- <!-- This is to inform the generator that the VolatileBool python type exists -->
- <custom-type name="VolatileBool"/>
- <primitive-type name="bool volatile" target-lang-api-name="VolatileBool">
- <!-- No conversion rules are specified here, because the generator does not handle
- pointer to primitive types without function adjustment.
- See commit ff0b861b59b41387e771d9cd565e13de8b2750d1 or search for changePStr
- in generator tests folder. -->
- </primitive-type>
-
- <enum-type name="QQmlModuleImportSpecialVersions" since="6.0"/>
-
- <!-- For qmlEngine(const QObject*), qmlContext(const QObject*) in qqml.h -->
- <namespace-type name="QtQml"/>
-
- <!-- expose QQmlIncubationController::incubateWhile() (see
- QtQml_VolatileBoolTypeF/pysideqmlregistertype.h) -->
- <namespace-type name="std" generate="no">
- <value-type name="atomic" generate="no"/>
- </namespace-type>
-
- <add-function signature="qmlRegisterType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistertype"/>
- </add-function>
-
- <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*,PyObject*)" return-type="int">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_callback"/>
- </add-function>
-
- <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_nocallback"/>
- </add-function>
-
- <add-function signature="qmlRegisterSingletonType(const char*,int,int,const char*,PyObject*)" return-type="int">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qjsvalue"/>
- </add-function>
-
- <add-function signature="qmlRegisterUncreatableType(PyTypeObject,const char*,int,int,const char*,const char*)" return-type="int">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregisteruncreatabletype"/>
- </add-function>
-
- <add-function signature="QmlElement(PyObject*)" return-type="PyObject*">
- <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlelement"/>
- </add-function>
-
- <enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES">
- <extra-includes>
- <include file-name="QtQml" location="global"/>
- </extra-includes>
- </enum-type>
-
- <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"/>
- <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>
- </object-type>
- <value-type name="QJSValue">
- <enum-type name="ErrorType" since="5.12"/>
- <enum-type name="SpecialValue"/>
- </value-type>
- <object-type name="QJSValueIterator"/>
- <object-type name="QQmlAbstractUrlInterceptor">
- <enum-type name="DataType"/>
- </object-type>
- <object-type name="QQmlApplicationEngine"/>
- <object-type name="QQmlComponent">
- <enum-type name="CompilationMode"/>
- <enum-type name="Status"/>
- <modify-function signature="QQmlComponent(QObject*)" allow-thread="yes"/>
- <modify-function signature="QQmlComponent(QQmlEngine*,QObject*)" allow-thread="yes"/>
- <modify-function signature="QQmlComponent(QQmlEngine*,QString,QObject*)" allow-thread="yes"/>
- <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"/>
- </object-type>
- <object-type name="QQmlContext"/>
- <value-type name="QQmlError"/>
- <object-type name="QQmlDebuggingEnabler">
- <enum-type name="StartMode"/>
- </object-type>
- <object-type name="QQmlEngine">
- <modify-function signature="addImageProvider(const QString&amp;,QQmlImageProviderBase*)">
- <modify-argument index="2">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QQmlExpression">
- <modify-function signature="evaluate(bool*)" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
- </object-type>
- <interface-type name="QQmlTypesExtensionInterface"/>
- <interface-type name="QQmlExtensionInterface"/>
- <object-type name="QQmlExtensionPlugin"/>
- <!-- Possible qRegisterMetaType issues ? -->
- <object-type name="QQmlFile">
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QQmlFileSelector"/>
- <object-type name="QQmlImageProviderBase">
- <enum-type name="Flag" flags="Flags"/>
- <enum-type name="ImageType"/>
- </object-type>
- <object-type name="QQmlIncubator">
- <enum-type name="IncubationMode"/>
- <enum-type name="Status"/>
- </object-type>
- <object-type name="QQmlIncubationController">
- <extra-includes>
- <include file-name="pysideqmlregistertype.h" location="local"/>
- </extra-includes>
- <modify-function signature="incubateWhile(std::atomic&lt;bool&gt;*,int)" allow-thread="yes">
- <modify-argument index="1">
- The replace type is needed to use the VolatileBool_Check macro instead of
- a template conversion function with "volatile bool" as argument.
- <replace-type modified-type="VolatileBool"/>
- <conversion-rule class="native">
- auto volatileBool = reinterpret_cast&lt;QtQml_VolatileBoolObject *&gt;(%PYARG_1);
- std::atomic&lt;bool&gt; *%out = volatileBool->flag;
- </conversion-rule>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <!-- TODO: QQmlListProperty is a template class, and thus should probably be treated like a
- container-type tag, which implies custom code for conversion. Not sure there's a use case to
- allow instantiating or deriving from the class though, given that a separate custom ListProperty
- type is provided by the module. Plus meta type registration would have to be taken into account
- for the QML parts.
- <value-type name="QQmlListProperty"/>-->
- <value-type name="QQmlListReference"/>
- <interface-type name="QQmlParserStatus"/>
- <value-type name="QQmlProperty">
- <enum-type name="PropertyTypeCategory"/>
- <enum-type name="Type"/>
- </value-type>
- <object-type name="QQmlPropertyMap"/>
- <object-type name="QQmlPropertyValueSource"/>
- <value-type name="QQmlScriptString">
- <modify-function signature="numberLiteral(bool*)const" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <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="booleanLiteral(bool*)const" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_bool*"/>
- </inject-code>
- </modify-function>
- </value-type>
- <object-type name="QQmlNetworkAccessManagerFactory">
- <modify-function signature="create(QObject*)">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <!-- Suppress anonymous enum warning -->
- <suppress-warning text="Anonymous enum (QmlCurrentSingletonTypeRegistrationVersion) does not have a type entry"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt b/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
deleted file mode 100644
index 25f54679f..000000000
--- a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-project(QtQuick)
-
-set(QtQuick_registerType "${QtQuick_SOURCE_DIR}/pysidequickregistertype.cpp")
-
-set(QtQuick_SRC
-${QtQuick_GEN_DIR}/qquickasyncimageprovider_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickframebufferobject_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickframebufferobject_renderer_wrapper.cpp
-${QtQuick_GEN_DIR}/qquicktexturefactory_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickimageprovider_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickimageresponse_wrapper.cpp
-${QtQuick_GEN_DIR}/qquicktransform_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickitem_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickitem_updatepaintnodedata_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickitemgrabresult_wrapper.cpp
-${QtQuick_GEN_DIR}/qsharedpointer_qquickitemgrabresult_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickpainteditem_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickrendercontrol_wrapper.cpp
-${QtQuick_GEN_DIR}/qquicktextdocument_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickview_wrapper.cpp
-${QtQuick_GEN_DIR}/qquickwindow_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgbasicgeometrynode_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgclipnode_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgdynamictexture_wrapper.cpp
-#${QtQuick_GEN_DIR}/qsgflatcolormaterial_wrapper.cpp
-${QtQuick_GEN_DIR}/qsggeometry_attribute_wrapper.cpp
-${QtQuick_GEN_DIR}/qsggeometry_attributeset_wrapper.cpp
-${QtQuick_GEN_DIR}/qsggeometry_coloredpoint2d_wrapper.cpp
-${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}/qsgmaterial_wrapper.cpp
-#${QtQuick_GEN_DIR}/qsgmaterialshader_renderstate_wrapper.cpp
-# Issue with virtual char const *const *attributeNames()
-#${QtQuick_GEN_DIR}/qsgmaterialshader_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgmaterialtype_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgnode_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}/qsgsimplerectnode_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgsimpletexturenode_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgtexture_wrapper.cpp
-#${QtQuick_GEN_DIR}/qsgtexturematerial_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgtextureprovider_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgtransformnode_wrapper.cpp
-#${QtQuick_GEN_DIR}/qsgvertexcolormaterial_wrapper.cpp
-# module is always needed
-${QtQuick_GEN_DIR}/qtquick_module_wrapper.cpp
-)
-
-set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
- ${QtQml_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}Qml_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtGui_GEN_DIR}
- ${QtCore_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtQml_GEN_DIR}
- ${QtQuick_GEN_DIR})
-
-set(QtQuick_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES})
-
-set(QtQuick_deps QtGui QtNetwork QtQml)
-
-create_pyside_module(NAME QtQuick
- INCLUDE_DIRS QtQuick_include_dirs
- LIBRARIES QtQuick_libraries
- DEPS QtQuick_deps
- TYPESYSTEM_PATH QtQuick_SOURCE_DIR
- SOURCES QtQuick_SRC
- STATIC_SOURCES QtQuick_registerType)
diff --git a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
deleted file mode 100644
index acb733f73..000000000
--- a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "pysidequickregistertype.h"
-
-#include <pyside.h>
-#include <pyside_p.h>
-#include <shiboken.h>
-
-// Auto generated headers.
-#include "qquickitem_wrapper.h"
-#include "qquickpainteditem_wrapper.h"
-#include "qquickframebufferobject_wrapper.h"
-#include "pyside2_qtcore_python.h"
-#include "pyside2_qtquick_python.h"
-#include "pyside2_qtqml_python.h"
-
-// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr.
-static QMutex nextQmlElementMutex;
-
-static void createQuickItem(void *memory, void *type)
-{
- QMutexLocker locker(&nextQmlElementMutex);
- PySide::setNextQObjectMemoryAddr(memory);
- Shiboken::GilState state;
- PyObject *obj = PyObject_CallObject(reinterpret_cast<PyObject *>(type), 0);
- if (!obj || PyErr_Occurred())
- PyErr_Print();
- PySide::setNextQObjectMemoryAddr(0);
-}
-
-#define PY_REGISTER_IF_INHERITS_FROM(className, typeToRegister,typePointerName, \
- typeListName, typeMetaObject, type, registered) \
- registerTypeIfInheritsFromClass<className##Wrapper>(#className, typeToRegister, \
- typePointerName, typeListName, \
- typeMetaObject, type, registered)
-
-bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, QByteArray className)
-{
- className.append('*');
- PyTypeObject *classPyType = Shiboken::Conversions::getPythonTypeObject(className.constData());
- bool isDerived = PySequence_Contains(pyObjType->tp_mro,
- reinterpret_cast<PyObject *>(classPyType));
- return isDerived;
-}
-
-template <typename T>
-struct QPysideQmlMetaTypeInterface : QtPrivate::QMetaTypeInterface
-{
- const QByteArray name;
-
- QPysideQmlMetaTypeInterface(const QByteArray &name, const QMetaObject *metaObject = nullptr)
- : QMetaTypeInterface {
- /*.revision=*/ 0,
- /*.alignment=*/ alignof(T),
- /*.size=*/ sizeof(T),
- /*.flags=*/ QtPrivate::QMetaTypeTypeFlags<T>::Flags,
- /*.typeId=*/ 0,
- /*.metaObject=*/ metaObject,
- /*.name=*/ name.constData(),
- /*.defaultCtr=*/ [](const QMetaTypeInterface *, void *addr) { new (addr) T(); },
- /*.copyCtr=*/ [](const QMetaTypeInterface *, void *addr, const void *other) {
- new (addr) T(*reinterpret_cast<const T *>(other));
- },
- /*.moveCtr=*/ [](const QMetaTypeInterface *, void *addr, void *other) {
- new (addr) T(std::move(*reinterpret_cast<T *>(other)));
- },
- /*.dtor=*/ [](const QMetaTypeInterface *, void *addr) {
- reinterpret_cast<T *>(addr)->~T();
- },
- /*.equals=*/ nullptr,
- /*.lessThan=*/ nullptr,
- /*.debugStream=*/ nullptr,
- /*.dataStreamOut=*/ nullptr,
- /*.dataStreamIn=*/ nullptr,
- /*.legacyRegisterOp=*/ nullptr
- }
- , name(name) {}
-};
-
-template <class WrapperClass>
-void registerTypeIfInheritsFromClass(
- QByteArray className,
- PyTypeObject *typeToRegister,
- const QByteArray &typePointerName,
- const QByteArray &typeListName,
- const QMetaObject *typeMetaObject,
- QQmlPrivate::RegisterType *type,
- bool &registered)
-{
- bool shouldRegister = !registered && pyTypeObjectInheritsFromClass(typeToRegister, className);
- if (shouldRegister) {
- QMetaType ptrType(new QPysideQmlMetaTypeInterface<WrapperClass *>(typePointerName, typeMetaObject));
- QMetaType lstType(new QPysideQmlMetaTypeInterface<QQmlListProperty<WrapperClass>>(typeListName));
-
- type->typeId = std::move(ptrType);
- type->listId = std::move(lstType);
- type->attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<WrapperClass>();
- type->attachedPropertiesMetaObject =
- QQmlPrivate::attachedPropertiesMetaObject<WrapperClass>();
- type->parserStatusCast =
- QQmlPrivate::StaticCastSelector<WrapperClass, QQmlParserStatus>::cast();
- type->valueSourceCast =
- QQmlPrivate::StaticCastSelector<WrapperClass, QQmlPropertyValueSource>::cast();
- type->valueInterceptorCast =
- QQmlPrivate::StaticCastSelector<WrapperClass, QQmlPropertyValueInterceptor>::cast();
- type->objectSize = sizeof(WrapperClass);
- registered = true;
- }
-}
-
-bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int versionMinor,
- const char *qmlName, bool creatable, const char *noCreationReason, QQmlPrivate::RegisterType *type)
-{
- using namespace Shiboken;
-
- PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
- PyTypeObject *qQuickItemPyType =
- Shiboken::Conversions::getPythonTypeObject("QQuickItem*");
- bool isQuickItem = PySequence_Contains(pyObjType->tp_mro,
- reinterpret_cast<PyObject *>(qQuickItemPyType));
-
- // Register only classes that inherit QQuickItem or its children.
- if (!isQuickItem)
- return false;
-
- // Used inside macros to register the type.
- const QMetaObject *metaObject = PySide::retrieveMetaObject(pyObj);
- Q_ASSERT(metaObject);
-
-
- // Incref the type object, don't worry about decref'ing it because
- // there's no way to unregister a QML type.
- Py_INCREF(pyObj);
-
- // Used in macro registration.
- QByteArray pointerName(qmlName);
- pointerName.append('*');
- QByteArray listName(qmlName);
- listName.prepend("QQmlListProperty<");
- listName.append('>');
-
- bool registered = false;
- PY_REGISTER_IF_INHERITS_FROM(QQuickPaintedItem, pyObjType, pointerName, listName, metaObject,
- type, registered);
- PY_REGISTER_IF_INHERITS_FROM(QQuickFramebufferObject, pyObjType, pointerName, listName,
- metaObject, type, registered);
- PY_REGISTER_IF_INHERITS_FROM(QQuickItem, pyObjType, pointerName, listName, metaObject,
- type, registered);
- if (!registered)
- return false;
-
- type->structVersion = 0;
- type->create = creatable ? createQuickItem : nullptr;
- type->noCreationReason = noCreationReason;
- type->userdata = pyObj;
- type->uri = uri;
- type->version = QTypeRevision::fromVersion(versionMajor, versionMinor);
- type->elementName = qmlName;
- type->metaObject = metaObject;
-
- type->extensionObjectCreate = 0;
- type->extensionMetaObject = 0;
- type->customParser = 0;
-
- return true;
-}
-
-void PySide::initQuickSupport(PyObject *module)
-{
- Q_UNUSED(module);
-#ifdef PYSIDE_QML_SUPPORT
- setQuickRegisterItemFunction(quickRegisterType);
-#endif
-}
diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
deleted file mode 100644
index 31e05979b..000000000
--- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtQuick">
- <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"/>
- <load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
-
- <smart-pointer-type name="QSharedPointer" type="shared" getter="data"/>
-
- <extra-includes>
- <include file-name="pysidequickregistertype.h" location="local"/>
- </extra-includes>
-
- <inject-code class="target" position="end" file="../glue/qtquick.cpp" snippet="qtquick"/>
-
- <object-type name="QQuickAsyncImageProvider" since="5.6"/>
-
- <object-type name="QQuickFramebufferObject">
- <object-type name="Renderer"/>
- </object-type>
-
- <object-type name="QQuickTextureFactory"/>
- <object-type name="QQuickImageProvider"/>
- <object-type name="QQuickImageResponse" since="5.6"/>
-
- <object-type name="QQuickTransform"/>
- <object-type name="QQuickItem" delete-in-main-thread="true">
- <value-type name="UpdatePaintNodeData"/>
- <enum-type name="Flag" flags="Flags"/>
- <enum-type name="ItemChange"/>
- <enum-type name="TransformOrigin"/>
- <modify-function signature="itemTransform(QQuickItem*,bool*)const" allow-thread="yes">
- <modify-argument index="2">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,bool*"/>
- </inject-code>
- </modify-function>
- <!-- TODO: Find a way to wrap `union ItemChangeData {}` -->
- </object-type>
-
- <object-type name="QQuickItemGrabResult"/>
-
- <object-type name="QQuickPaintedItem">
- <enum-type name="RenderTarget"/>
- <enum-type name="PerformanceHint" flags="PerformanceHints"/>
- </object-type>
-
- <object-type name="QQuickRenderControl"/>
-
- <object-type name="QQuickTextDocument"/>
-
- <object-type name="QQuickView">
- <enum-type name="ResizeMode"/>
- <enum-type name="Status"/>
- </object-type>
-
- <object-type name="QQuickWindow">
- <enum-type name="CreateTextureOption" flags="CreateTextureOptions"/>
- <enum-type name="NativeObjectType" since="5.14"/>
- <enum-type name="RenderStage"/>
- <enum-type name="SceneGraphError"/>
- <enum-type name="TextRenderType" since="5.10"/>
- </object-type>
-
- <object-type name="QSGBasicGeometryNode"/>
- <object-type name="QSGClipNode"/>
- <object-type name="QSGDynamicTexture"/>
- <!-- <object-type name="QSGFlatColorMaterial"/> -->
- <object-type name="QSGGeometry">
- <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"/>
- <value-type name="Attribute"/>
- <value-type name="AttributeSet"/>
- <value-type name="ColoredPoint2D"/>
- <value-type name="Point2D"/>
- <value-type name="TexturedPoint2D"/>
- </object-type>
- <object-type name="QSGGeometryNode"/>
-
- <!-- QSGMaterialShader doesn't compile because of const char * char * types not being recognized
- by the C++ parser, nor the generator.
- <object-type name="QSGMaterial">
- <enum-type name="Flag" flags="Flags"/>
- </object-type>
- <object-type name="QSGMaterialShader"/>
- <value-type name="QSGMaterialShader::RenderState">
- <enum-type name="DirtyState" flags="DirtyStates"/>
- </value-type>
- -->
- <object-type name="QSGMaterialType"/>
- <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="QSGOpacityNode"/>
- <!-- <object-type name="QSGOpaqueTextureMaterial"/> -->
- <object-type name="QSGSimpleRectNode"/>
- <object-type name="QSGSimpleTextureNode">
- <enum-type name="TextureCoordinatesTransformFlag" flags="TextureCoordinatesTransformMode"/>
- </object-type>
- <object-type name="QSGTexture">
- <enum-type name="AnisotropyLevel" since="5.9"/>
- <enum-type name="Filtering"/>
- <enum-type name="WrapMode"/>
- </object-type>
- <!-- <object-type name="QSGTextureMaterial"/> -->
- <object-type name="QSGTextureProvider"/>
- <object-type name="QSGTransformNode"/>
- <!-- <object-type name="QSGVertexColorMaterial"/> -->
-
- <!-- These currently don't work because they are template classes, and the generator chokes on
- them. Making these work properly would require fixing the parsing of template classes,
- allowing creation of State structures and passing them to the template classes, as well as
- implementing some mechanism of registration of the custom template classes, kind of how
- it's done for qt quick items.
- <object-type name="QSGSimpleMaterial"/>
- <object-type name="QSGSimpleMaterialShader"/>
- -->
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt b/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt
deleted file mode 100644
index 8321d8a3e..000000000
--- a/sources/pyside2/PySide2/QtQuickControls2/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-project(QtQuickControls2)
-
-set(QtQuickControls2_SRC
-${QtQuickControls2_GEN_DIR}/qquickstyle_wrapper.cpp
-# module is always needed
-${QtQuickControls2_GEN_DIR}/qtquickcontrols2_module_wrapper.cpp
-)
-
-
-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}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}
- ${QtCore_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtQml_GEN_DIR}
- ${QtQuick_GEN_DIR}
- ${QtQuickControls2_GEN_DIR})
-
-set(QtQuickControls2_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_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})
-
-set(QtQuickControls2_deps QtGui QtNetwork QtQml QtQuick)
-
-create_pyside_module(NAME QtQuickControls2
- INCLUDE_DIRS QtQuickControls2_include_dirs
- LIBRARIES QtQuickControls2_libraries
- DEPS QtQuickControls2_deps
- TYPESYSTEM_PATH QtQuickControls2_SOURCE_DIR
- SOURCES QtQuickControls2_SRC)
diff --git a/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml b/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml
deleted file mode 100644
index 51d42b46b..000000000
--- a/sources/pyside2/PySide2/QtQuickControls2/typesystem_quickcontrols2.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtQuickControls2">
- <load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
-
- <object-type name="QQuickStyle" since="5.7"/>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt
deleted file mode 100644
index 4da9bf838..000000000
--- a/sources/pyside2/PySide2/QtQuickWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-project(QtQuickWidgets)
-
-set(QtQuickWidgets_SRC
-${QtQuickWidgets_GEN_DIR}/qquickwidget_wrapper.cpp
-# module is always needed
-${QtQuickWidgets_GEN_DIR}/qtquickwidgets_module_wrapper.cpp
-)
-
-set(QtQuickWidgets_include_dirs ${QtQuickWidgets_SOURCE_DIR}
- ${QtQml_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}QuickWidgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtGui_GEN_DIR}
- ${QtCore_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtQuick_GEN_DIR}
- ${QtQml_GEN_DIR}
- ${QtQuickWidgets_GEN_DIR})
-
-set(QtQuickWidgets_libraries pyside2
- ${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}Quick_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}QuickWidgets_LIBRARIES})
-
-set(QtQuickWidgets_deps QtGui QtQml QtQuick QtWidgets QtNetwork)
-
-create_pyside_module(NAME QtQuickWidgets
- INCLUDE_DIRS QtQuickWidgets_include_dirs
- LIBRARIES QtQuickWidgets_libraries
- DEPS QtQuickWidgets_deps
- TYPESYSTEM_PATH QtQuickWidgets_SOURCE_DIR
- SOURCES QtQuickWidgets_SRC)
diff --git a/sources/pyside2/PySide2/QtQuickWidgets/typesystem_quickwidgets.xml b/sources/pyside2/PySide2/QtQuickWidgets/typesystem_quickwidgets.xml
deleted file mode 100644
index b272eec19..000000000
--- a/sources/pyside2/PySide2/QtQuickWidgets/typesystem_quickwidgets.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtQuickWidgets">
- <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"/>
- <load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
-
- <object-type name="QQuickWidget">
- <enum-type name="ResizeMode"/>
- <enum-type name="Status"/>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt b/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt
deleted file mode 100644
index 98553b6a0..000000000
--- a/sources/pyside2/PySide2/QtRemoteObjects/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-project(QtRemoteObjects)
-
-set(QtRemoteObjects_SRC
-${QtRemoteObjects_GEN_DIR}/qabstractitemmodelreplica_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjectabstractpersistedstore_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjectdynamicreplica_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjecthost_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjecthostbase_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjectnode_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjectpendingcall_wrapper.cpp
-${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}/qremoteobjectsettingsstore_wrapper.cpp
-${QtRemoteObjects_GEN_DIR}/qremoteobjectsourcelocationinfo_wrapper.cpp
-
-# module is always needed
-${QtRemoteObjects_GEN_DIR}/qtremoteobjects_module_wrapper.cpp
-)
-
-set(QtRemoteObjects_include_dirs ${QtRemoteObjects_SOURCE_DIR}
- ${QtRemoteObjects_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}RemoteObjects_INCLUDE_DIRS}
- ${SHIBOKEN_INCLUDE_DIR}
- ${libpyside_SOURCE_DIR}
- ${SHIBOKEN_PYTHON_INCLUDE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtRemoteObjects_libraries pyside2
- ${SHIBOKEN_PYTHON_LIBRARIES}
- ${SHIBOKEN_LIBRARY}
- ${Qt${QT_MAJOR_VERSION}RemoteObjects_LIBRARIES})
-
-set(QtRemoteObjects_deps QtCore QtNetwork)
-
-create_pyside_module(NAME QtRemoteObjects
- INCLUDE_DIRS QtRemoteObjects_include_dirs
- LIBRARIES QtRemoteObjects_libraries
- DEPS QtRemoteObjects_deps
- TYPESYSTEM_PATH QtRemoteObjects_SOURCE_DIR
- SOURCES QtRemoteObjects_SRC
- TYPESYSTEM_NAME ${QtRemoteObjects_BINARY_DIR}/typesystem_remoteobjects.xml
- )
diff --git a/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml b/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml
deleted file mode 100644
index b4f7ed13b..000000000
--- a/sources/pyside2/PySide2/QtRemoteObjects/typesystem_remoteobjects.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtRemoteObjects">
- <load-typesystem name="templates/core_common.xml" generate="no"/>
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <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="QRemoteObjectAbstractPersistedStore"/>
- <object-type name="QRemoteObjectDynamicReplica"/>
- <object-type name="QRemoteObjectHost"/>
- <object-type name="QRemoteObjectHostBase">
- <enum-type name="AllowedSchemas"/>
- </object-type>
- <object-type name="QRemoteObjectNode">
- <enum-type name="ErrorCode"/>
- </object-type>
- <object-type name="QRemoteObjectPendingCall">
- <enum-type name="Error"/>
- </object-type>
- <object-type name="QRemoteObjectPendingCallWatcher"/>
- <object-type name="QRemoteObjectRegistry"/>
- <object-type name="QRemoteObjectRegistryHost"/>
- <object-type name="QRemoteObjectReplica">
- <enum-type name="State"/>
- <!-- protected: <enum-type name="ConstructorType"/> -->
- </object-type>
- <object-type name="QRemoteObjectSettingsStore"/>
- <value-type name="QRemoteObjectSourceLocationInfo"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtScxml/CMakeLists.txt b/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
deleted file mode 100644
index 732253bba..000000000
--- a/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-project(QtScxml)
-
-set(QtScxml_OPTIONAL_SRC )
-set(QtScxml_DROPPED_ENTRIES )
-
-set(QtScxml_SRC
-${QtScxml_GEN_DIR}/qscxmlcompiler_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlcompiler_loader_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlevent_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmldynamicscxmlservicefactory_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlinvokableservice_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlinvokableservicefactory_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlstaticscxmlservicefactory_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlstatemachine_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmltabledata_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlerror_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_assignmentinfo_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_evaluatorinfo_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_foreachinfo_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_invokeinfo_wrapper.cpp
-${QtScxml_GEN_DIR}/qscxmlexecutablecontent_parameterinfo_wrapper.cpp
-# module is always needed
-${QtScxml_GEN_DIR}/qtscxml_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}Scxml_VERSION VERSION_EQUAL 5.12.0
- OR Qt${QT_MAJOR_VERSION}Scxml_VERSION VERSION_GREATER 5.12.0)
- list(APPEND QtScxml_SRC
- ${QtScxml_GEN_DIR}/qscxmldatamodel_wrapper.cpp
- ${QtScxml_GEN_DIR}/qscxmldatamodel_foreachloopbody_wrapper.cpp
- ${QtScxml_GEN_DIR}/qscxmlecmascriptdatamodel_wrapper.cpp
- ${QtScxml_GEN_DIR}/qscxmlcppdatamodel_wrapper.cpp
- ${QtScxml_GEN_DIR}/qscxmlnulldatamodel_wrapper.cpp)
-endif()
-
-set(QtScxml_include_dirs ${QtScxml_SOURCE_DIR}
- ${QtScxml_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Scxml_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtScxml_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Scxml_LIBRARIES})
-
-set(QtScxml_deps QtCore)
-
-create_pyside_module(NAME QtScxml
- INCLUDE_DIRS QtScxml_include_dirs
- LIBRARIES QtScxml_libraries
- DEPS QtScxml_deps
- TYPESYSTEM_PATH QtScxml_SOURCE_DIR
- SOURCES QtScxml_SRC
- DROPPED_ENTRIES QtScxml_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml b/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml
deleted file mode 100644
index c00052c2f..000000000
--- a/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtScxml">
- <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">
- <enum-type name="EventType"/>
- </object-type>
- <object-type name="QScxmlDynamicScxmlServiceFactory"/>
- <object-type name="QScxmlInvokableService"/>
- <object-type name="QScxmlInvokableServiceFactory"/>
- <object-type name="QScxmlStaticScxmlServiceFactory"/>
- <object-type name="QScxmlStateMachine">
- <modify-function signature="submitEvent(QScxmlEvent*)">
- <modify-argument index="1">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QScxmlTableData"/>
- <object-type name="QScxmlDataModel" since="5.12">
- <!-- Needs to have exports fixed -->
- <interface-type name="ForeachLoopBody" since="5.12"/>
- <modify-function signature="^evaluateTo(String|Bool|Variant)\(.*bool ?\*.*$">
- <modify-argument index="2">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,arg,bool*"/>
- </inject-code>
- </modify-function>
- </object-type>
- <object-type name="QScxmlEcmaScriptDataModel" since="5.12"/>
- <value-type name="QScxmlError"/>
- <namespace-type name="QScxmlExecutableContent">
- <value-type name="AssignmentInfo"/>
- <value-type name="EvaluatorInfo"/>
- <value-type name="ForeachInfo"/>
- <value-type name="InvokeInfo"/>
- <value-type name="ParameterInfo"/>
- </namespace-type>
- <object-type name="QScxmlNullDataModel" since="5.12"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtSensors/CMakeLists.txt b/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
deleted file mode 100644
index 0bd6260b7..000000000
--- a/sources/pyside2/PySide2/QtSensors/CMakeLists.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-project(QtSensors)
-
-set(QtSensors_OPTIONAL_SRC )
-set(QtSensors_DROPPED_ENTRIES )
-
-set(QtSensors_SRC
-# overrides QObject::metaObject() by private method
-# ${QtSensors_GEN_DIR}/qsensorgesture_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorgesturemanager_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorgestureplugininterface_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorgesturerecognizer_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaccelerometer_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaccelerometerfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaccelerometerreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaltimeter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaltimeterfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qaltimeterreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambientlightfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambientlightreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambientlightsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambienttemperaturefilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambienttemperaturereading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qambienttemperaturesensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qcompass_wrapper.cpp
- ${QtSensors_GEN_DIR}/qcompassfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qcompassreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qdistancefilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qdistancereading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qdistancesensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qgyroscope_wrapper.cpp
- ${QtSensors_GEN_DIR}/qgyroscopefilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qgyroscopereading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qholsterfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qholsterreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qholstersensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qhumidityfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qhumidityreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qhumiditysensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qirproximityfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qirproximityreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qirproximitysensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlidfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlidreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlidsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlightfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlightreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qlightsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qmagnetometer_wrapper.cpp
- ${QtSensors_GEN_DIR}/qmagnetometerfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qmagnetometerreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qorientationfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qorientationreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qorientationsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qpressurefilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qpressurereading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qpressuresensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qproximityfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qproximityreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qproximitysensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qrotationfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qrotationreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qrotationsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qoutputrange_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorbackend_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorbackendfactory_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensormanager_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorchangesinterface_wrapper.cpp
- ${QtSensors_GEN_DIR}/qsensorplugininterface_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtapfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtapreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtapsensor_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtiltfilter_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtiltreading_wrapper.cpp
- ${QtSensors_GEN_DIR}/qtiltsensor_wrapper.cpp
-# module is always needed
- ${QtSensors_GEN_DIR}/qtsensors_module_wrapper.cpp
-)
-
-set(QtSensors_include_dirs ${QtSensors_SOURCE_DIR}
- ${QtSensors_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Sensors_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtSensors_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Sensors_LIBRARIES})
-
-set(QtSensors_deps QtCore)
-
-create_pyside_module(NAME QtSensors
- INCLUDE_DIRS QtSensors_include_dirs
- LIBRARIES QtSensors_libraries
- DEPS QtSensors_deps
- TYPESYSTEM_PATH QtSensors_SOURCE_DIR
- SOURCES QtSensors_SRC
- DROPPED_ENTRIES QtSensors_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml b/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml
deleted file mode 100644
index 31c0d2f53..000000000
--- a/sources/pyside2/PySide2/QtSensors/typesystem_sensors.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtSensors">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
-<!-- overrides QObject::metaObject() by private method
- <object-type name="QSensorGesture"/>
--->
- <object-type name="QSensorGestureManager"/>
- <object-type name="QSensorGesturePluginInterface"/>
- <object-type name="QSensorGestureRecognizer"/>
- <object-type name="QAccelerometer">
- <enum-type name="AccelerationMode"/>
- </object-type>
- <object-type name="QAccelerometerFilter"/>
- <object-type name="QAccelerometerReading"/>
- <object-type name="QAltimeter"/>
- <object-type name="QAltimeterFilter"/>
- <object-type name="QAltimeterReading"/>
- <object-type name="QAmbientLightFilter"/>
- <object-type name="QAmbientLightReading">
- <enum-type name="LightLevel"/>
- </object-type>
- <object-type name="QAmbientLightSensor"/>
- <object-type name="QAmbientTemperatureFilter"/>
- <object-type name="QAmbientTemperatureReading"/>
- <object-type name="QAmbientTemperatureSensor"/>
- <object-type name="QCompass"/>
- <object-type name="QCompassFilter"/>
- <object-type name="QCompassReading"/>
- <object-type name="QDistanceFilter"/>
- <object-type name="QDistanceReading"/>
- <object-type name="QDistanceSensor"/>
- <object-type name="QGyroscope"/>
- <object-type name="QGyroscopeFilter"/>
- <object-type name="QGyroscopeReading"/>
- <object-type name="QHolsterFilter"/>
- <object-type name="QHolsterReading"/>
- <object-type name="QHolsterSensor"/>
- <object-type name="QHumidityFilter"/>
- <object-type name="QHumidityReading"/>
- <object-type name="QHumiditySensor"/>
- <object-type name="QIRProximityFilter"/>
- <object-type name="QIRProximityReading"/>
- <object-type name="QIRProximitySensor"/>
- <object-type name="QLidFilter"/>
- <object-type name="QLidReading"/>
- <object-type name="QLidSensor"/>
- <object-type name="QLightFilter"/>
- <object-type name="QLightReading"/>
- <object-type name="QLightSensor"/>
- <object-type name="QMagnetometer"/>
- <object-type name="QMagnetometerFilter"/>
- <object-type name="QMagnetometerReading"/>
- <object-type name="QOrientationFilter"/>
- <object-type name="QOrientationReading">
- <enum-type name="Orientation"/>
- </object-type>
- <object-type name="QOrientationSensor"/>
- <object-type name="QPressureFilter"/>
- <object-type name="QPressureReading"/>
- <object-type name="QPressureSensor"/>
- <object-type name="QProximityFilter"/>
- <object-type name="QProximityReading"/>
- <object-type name="QProximitySensor"/>
- <object-type name="QRotationFilter"/>
- <object-type name="QRotationReading"/>
- <object-type name="QRotationSensor"/>
- <object-type name="QSensor">
- <enum-type name="Feature"/>
- <enum-type name="AxesOrientationMode"/>
- </object-type>
- <object-type name="QSensorFilter"/>
- <object-type name="QSensorReading"/>
- <value-type name="qoutputrange"/>
- <object-type name="QSensorBackend"/>
- <object-type name="QSensorBackendFactory"/>
- <object-type name="QSensorManager"/>
- <object-type name="QSensorChangesInterface"/>
- <object-type name="QSensorPluginInterface"/>
- <object-type name="QTapFilter"/>
- <object-type name="QTapReading">
- <enum-type name="TapDirection"/>
- </object-type>
- <object-type name="QTapSensor"/>
- <object-type name="QTiltFilter"/>
- <object-type name="QTiltReading"/>
- <object-type name="QTiltSensor"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtSerialPort/CMakeLists.txt b/sources/pyside2/PySide2/QtSerialPort/CMakeLists.txt
deleted file mode 100644
index 5242cad4a..000000000
--- a/sources/pyside2/PySide2/QtSerialPort/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-project(QtSerialPort)
-
-set(QtSerialPort_OPTIONAL_SRC )
-set(QtSerialPort_DROPPED_ENTRIES )
-
-set(QtSerialPort_SRC
- ${QtSerialPort_GEN_DIR}/qserialport_wrapper.cpp
- ${QtSerialPort_GEN_DIR}/qserialportinfo_wrapper.cpp
-# module is always needed
- ${QtSerialPort_GEN_DIR}/qtserialport_module_wrapper.cpp
-)
-
-set(QtSerialPort_include_dirs ${QtSerialPort_SOURCE_DIR}
- ${QtSerialPort_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}SerialPort_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtSerialPort_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}SerialPort_LIBRARIES})
-
-set(QtSerialPort_deps QtCore)
-
-create_pyside_module(NAME QtSerialPort
- INCLUDE_DIRS QtSerialPort_include_dirs
- LIBRARIES QtSerialPort_libraries
- DEPS QtSerialPort_deps
- TYPESYSTEM_PATH QtSerialPort_SOURCE_DIR
- SOURCES QtSerialPort_SRC
- DROPPED_ENTRIES QtSerialPort_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtSerialPort/typesystem_serialport.xml b/sources/pyside2/PySide2/QtSerialPort/typesystem_serialport.xml
deleted file mode 100644
index 8548c543e..000000000
--- a/sources/pyside2/PySide2/QtSerialPort/typesystem_serialport.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtSerialPort">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <object-type name="QSerialPort">
- <enum-type name="BaudRate"/>
- <enum-type name="DataBits"/>
- <enum-type name="DataErrorPolicy"/>
- <enum-type name="Direction" flags="Directions"/>
- <enum-type name="FlowControl"/>
- <enum-type name="Parity"/>
- <enum-type name="PinoutSignal" flags="PinoutSignals"/>
- <enum-type name="SerialPortError"/>
- <enum-type name="StopBits"/>
- </object-type>
- <value-type name="QSerialPortInfo"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtSql/CMakeLists.txt b/sources/pyside2/PySide2/QtSql/CMakeLists.txt
deleted file mode 100644
index 40a253393..000000000
--- a/sources/pyside2/PySide2/QtSql/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-project(QtSql)
-
-set(QtSql_SRC
-${QtSql_GEN_DIR}/qsql_wrapper.cpp
-${QtSql_GEN_DIR}/qsqldatabase_wrapper.cpp
-${QtSql_GEN_DIR}/qsqldriver_wrapper.cpp
-${QtSql_GEN_DIR}/qsqldrivercreatorbase_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlerror_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlfield_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlindex_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlquery_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlquerymodel_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlrecord_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlrelation_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlrelationaldelegate_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlrelationaltablemodel_wrapper.cpp
-${QtSql_GEN_DIR}/qsqlresult_wrapper.cpp
-${QtSql_GEN_DIR}/qsqltablemodel_wrapper.cpp
-# module is always needed
-${QtSql_GEN_DIR}/qtsql_module_wrapper.cpp
-)
-
-configure_file("${QtSql_SOURCE_DIR}/QtSql_global.pre.h.in"
- "${QtSql_BINARY_DIR}/QtSql_global.pre.h" @ONLY)
-
-set(QtSql_include_dirs ${QtSql_SOURCE_DIR}
- ${QtSql_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Sql_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
-set(QtSql_libraries pyside2
- ${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
- INCLUDE_DIRS QtSql_include_dirs
- LIBRARIES QtSql_libraries
- DEPS QtSql_deps
- TYPESYSTEM_PATH QtSql_SOURCE_DIR
- SOURCES QtSql_SRC)
diff --git a/sources/pyside2/PySide2/QtSql/typesystem_sql.xml b/sources/pyside2/PySide2/QtSql/typesystem_sql.xml
deleted file mode 100644
index 408b5cdce..000000000
--- a/sources/pyside2/PySide2/QtSql/typesystem_sql.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtSql">
- <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"/>
- <enum-type name="ParamTypeFlag" flags="ParamType"/>
- <enum-type name="TableType"/>
- <enum-type name="NumericalPrecisionPolicy"/>
- <extra-includes>
- <include file-name="QtSql/qtsqlglobal.h" location="global"/>
- </extra-includes>
- </namespace-type>
-
- <value-type name="QSqlDatabase">
- <extra-includes>
- <include file-name="QSqlQuery" location="global"/>
- <include file-name="QSqlError" location="global"/>
- <include file-name="QSqlIndex" location="global"/>
- <include file-name="QSqlRecord" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes"/>
- <modify-function signature="open()" allow-thread="yes"/>
- <modify-function signature="open(const QString&amp;, const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="commit()" allow-thread="yes"/>
- <modify-function signature="rollback()" allow-thread="yes"/>
- <modify-function signature="transaction()" allow-thread="yes"/>
- <modify-function signature="registerSqlDriver(const QString&amp;,QSqlDriverCreatorBase*)">
- <modify-argument index="2">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </value-type>
-
- <value-type name="QSqlQuery">
- <enum-type name="BatchExecutionMode"/>
- <extra-includes>
- <include file-name="QSqlError" location="global"/>
- <include file-name="QSqlRecord" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="exec(const QString&amp;)" rename="exec_" allow-thread="yes"/>
- <modify-function signature="prepare(const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="clear()" allow-thread="yes"/>
- <modify-function signature="last()" allow-thread="yes"/>
- <modify-function signature="first()" allow-thread="yes"/>
- <modify-function signature="previous()" allow-thread="yes"/>
- <modify-function signature="next()" allow-thread="yes"/>
- <modify-function signature="seek(int,bool)" allow-thread="yes"/>
- </value-type>
-
- <value-type name="QSqlRecord">
- <extra-includes>
- <include file-name="QSqlField" location="global"/>
- </extra-includes>
- </value-type>
-
- <value-type name="QSqlError">
- <enum-type name="ErrorType"/>
- </value-type>
-
- <value-type name="QSqlIndex"/>
-
- <value-type name="QSqlRelation"/>
-
- <object-type name="QSqlRelationalDelegate"/>
-
- <value-type name="QSqlField">
- <enum-type name="RequiredStatus"/>
- </value-type>
-
- <object-type name="QSqlDriver">
- <enum-type name="DbmsType"/>
- <enum-type name="DriverFeature"/>
- <enum-type name="IdentifierType"/>
- <enum-type name="NotificationSource"/>
- <enum-type name="StatementType"/>
- <extra-includes>
- <include file-name="QSqlQuery" location="global"/>
- <include file-name="QSqlError" location="global"/>
- <include file-name="QSqlIndex" location="global"/>
- <include file-name="QSqlRecord" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <modify-function signature="beginTransaction()" allow-thread="yes"/>
- <modify-function signature="commitTransaction()" allow-thread="yes"/>
- <modify-function signature="rollbackTransaction()" allow-thread="yes"/>
- <modify-function signature="open(const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,const QString&amp;)" allow-thread="yes"/>
- <!-- ### This is too low level for Python, and pointer would be useless for the Python programmer -->
- <modify-function signature="handle()const" remove="all"/>
- <!-- ### -->
- </object-type>
-
- <object-type name="QSqlQueryModel">
- <extra-includes>
- <include file-name="QSqlError" location="global"/>
- <include file-name="QSqlQuery" location="global"/>
- <include file-name="QSqlRecord" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QSqlRelationalTableModel">
- <enum-type name="JoinMode"/>
- <extra-includes>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QSqlResult">
- <enum-type name="BindingSyntax"/>
- <enum-type name="VirtualHookOperation"/>
- <extra-includes>
- <include file-name="QSqlError" location="global"/>
- <include file-name="QSqlQuery" location="global"/>
- <include file-name="QSqlRecord" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- <!-- ### This isn't part of Qt public API -->
- <modify-function signature="virtual_hook(int,void*)" remove="all"/>
- <!-- ### -->
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="fetchLast()" allow-thread="yes"/>
- <modify-function signature="fetchFirst()" allow-thread="yes"/>
- <modify-function signature="fetchNext()" allow-thread="yes"/>
- <modify-function signature="fetchPrevious()" allow-thread="yes"/>
- <modify-function signature="fetch(int)" allow-thread="yes"/>
- <modify-function signature="prepare(QString)" allow-thread="yes"/>
- </object-type>
- <object-type name="QSqlTableModel">
- <enum-type name="EditStrategy"/>
- <extra-includes>
- <include file-name="QSqlIndex" location="global"/>
- <include file-name="QStringList" location="global"/>
- <include file-name="QSize" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QSqlDriverCreatorBase">
- <extra-includes>
- <include file-name="QSqlDriver" location="global"/>
- </extra-includes>
- </object-type>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtSvg/CMakeLists.txt b/sources/pyside2/PySide2/QtSvg/CMakeLists.txt
deleted file mode 100644
index 34f72219e..000000000
--- a/sources/pyside2/PySide2/QtSvg/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-project(QtSvg)
-
-set(QtSvg_SRC
-${QtSvg_GEN_DIR}/qsvggenerator_wrapper.cpp
-${QtSvg_GEN_DIR}/qsvgrenderer_wrapper.cpp
-# module is always needed
-${QtSvg_GEN_DIR}/qtsvg_module_wrapper.cpp
-)
-
-set(QtSvg_include_dirs ${QtSvg_SOURCE_DIR}
- ${QtSvg_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Svg_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- )
-set(QtSvg_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Svg_LIBRARIES}
- )
-set(QtSvg_deps QtGui)
-
-create_pyside_module(NAME QtSvg
- INCLUDE_DIRS QtSvg_include_dirs
- LIBRARIES QtSvg_libraries
- DEPS QtSvg_deps
- TYPESYSTEM_PATH QtSvg_SOURCE_DIR
- SOURCES QtSvg_SRC)
diff --git a/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml b/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml
deleted file mode 100644
index c921c631e..000000000
--- a/sources/pyside2/PySide2/QtSvg/typesystem_svg.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtSvg">
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
-
- <object-type name="QSvgRenderer"/>
-
- <object-type name="QSvgGenerator">
- <modify-function signature="setOutputDevice(QIODevice*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="outputDevice()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtSvgWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtSvgWidgets/CMakeLists.txt
deleted file mode 100644
index e04d5194b..000000000
--- a/sources/pyside2/PySide2/QtSvgWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-project(QtSvgWidgets)
-
-set(QtSvgWidgets_SRC
-${QtSvgWidgets_GEN_DIR}/qgraphicssvgitem_wrapper.cpp
-${QtSvgWidgets_GEN_DIR}/qsvgwidget_wrapper.cpp
-# module is always needed
-${QtSvgWidgets_GEN_DIR}/qtsvgwidgets_module_wrapper.cpp
-)
-
-set(QtSvgWidgets_include_dirs ${QtSvgWidgets_SOURCE_DIR}
- ${QtSvgWidgets_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Svg_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}SvgWidgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtSvg_GEN_DIR}
- )
-
-set(QtSvgWidgets_libraries pyside2
- ${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}
- )
-
-set(QtSvgWidgets_deps QtSvg QtWidgets)
-
-create_pyside_module(NAME QtSvgWidgets
- INCLUDE_DIRS QtSvgWidgets_include_dirs
- LIBRARIES QtSvgWidgets_libraries
- DEPS QtSvgWidgets_deps
- TYPESYSTEM_PATH QtSvgWidgets_SOURCE_DIR
- SOURCES QtSvgWidgets_SRC)
diff --git a/sources/pyside2/PySide2/QtSvgWidgets/typesystem_svgwidgets.xml b/sources/pyside2/PySide2/QtSvgWidgets/typesystem_svgwidgets.xml
deleted file mode 100644
index a6aa5b922..000000000
--- a/sources/pyside2/PySide2/QtSvgWidgets/typesystem_svgwidgets.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtSvgWidgets">
- <load-typesystem name="QtSvg/typesystem_svg.xml" generate="no"/>
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
- <object-type name="QSvgWidget"/>
-
- <object-type name="QGraphicsSvgItem">
- <modify-function signature="QGraphicsSvgItem(QGraphicsItem*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QGraphicsSvgItem(const QString&amp;,QGraphicsItem*)">
- <modify-argument index="this">
- <parent index="2" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtTest/CMakeLists.txt b/sources/pyside2/PySide2/QtTest/CMakeLists.txt
deleted file mode 100644
index 04bb28cc9..000000000
--- a/sources/pyside2/PySide2/QtTest/CMakeLists.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-project(QtTest)
-
-set(QtTest_SRC
-${QtTest_GEN_DIR}/qtest_pysideqtoucheventsequence_wrapper.cpp
-${QtTest_GEN_DIR}/qtest_wrapper.cpp
-# module is always needed
-${QtTest_GEN_DIR}/qttest_module_wrapper.cpp
-)
-
-configure_file("${QtTest_SOURCE_DIR}/QtTest_global.pre.h.in"
- "${QtTest_BINARY_DIR}/QtTest_global.pre.h" @ONLY)
-
-configure_file("${QtTest_SOURCE_DIR}/QtTest_global.post.h.in"
- "${QtTest_BINARY_DIR}/QtTest_global.post.h" @ONLY)
-
-set(QtTest_include_dirs ${QtTest_SOURCE_DIR}
- ${QtTest_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Test_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
-set(QtTest_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Test_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtTest_deps QtWidgets)
-
-create_pyside_module(NAME QtTest
- INCLUDE_DIRS QtTest_include_dirs
- LIBRARIES QtTest_libraries
- DEPS QtTest_deps
- TYPESYSTEM_PATH QtTest_SOURCE_DIR
- SOURCES QtTest_SRC)
diff --git a/sources/pyside2/PySide2/QtTest/typesystem_test.xml b/sources/pyside2/PySide2/QtTest/typesystem_test.xml
deleted file mode 100644
index eb638befb..000000000
--- a/sources/pyside2/PySide2/QtTest/typesystem_test.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtTest">
- <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" function-name="qCompare"/>
- <rejection class="QTest" function-name="qInit"/>
- <rejection class="QTest" function-name="qVerify"/>
- <rejection class="QTest" function-name="qSleep"/>
- <rejection class="QTest" function-name="toHexRepresentation"/>
- <rejection class="QTest" function-name="qWait"/>
- <rejection class="QTest" function-name="qFail"/>
- <rejection class="QTest" function-name="qInit"/>
- <rejection class="QTest" function-name="qExec"/>
- <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="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.
-
- The problem that costed my days of bug hunting is the fact that shiboken gives
- misleading error messages. The messages that I could not get rid of were
-
- signature 'generateTouchEvent(QWidget*,QInputDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
- signature 'generateTouchEvent(QWindow*,QInputDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
-
- I always thought that for some reason the functions were not recognized, or the arguments somehow
- do not match their declaration. Only late in the project, I learnt that also
- a simply missing type name in the argument list leads to this message.
-
- <object-type name="QInputDevice">
- <enum-type name="CapabilityFlag" flags="Capabilities"/>
- <enum-type name="DeviceType"/>
- </object-type>
- ^^^ this is now moved into QtGui -->
-
- <namespace-type name="QTest">
- <!-- Qt5: private <enum-type name="AttributeIndex" since="4.6"/> -->
- <enum-type name="KeyAction"/>
- <!-- Qt5: private <enum-type name="LogElementType" since="4.6"/> -->
- <enum-type name="MouseAction"/>
- <enum-type name="QBenchmarkMetric" since="4.7"/>
- <enum-type name="TestFailMode"/>
- <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">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="press(int,const QPoint&amp;,QWindow*)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="move(int,const QPoint&amp;,QWidget*)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="move(int,const QPoint&amp;,QWindow*)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="release(int,const QPoint&amp;,QWidget*)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="release(int,const QPoint&amp;,QWindow*)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="stationary(int)">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <modify-function signature="generateTouchEvent(QWidget*,QPointingDevice*,bool)" rename="touchEvent" since="4.6">
- <modify-argument index="return">
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="generateTouchEvent(QWindow*,QPointingDevice*,bool)" rename="touchEvent" since="4.6">
- <modify-argument index="return">
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- </modify-function>
- </namespace-type>
-
- <rejection class="QSignalSpy"/>
- <rejection class="QTestEventList"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt b/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt
deleted file mode 100644
index ebd95cfbe..000000000
--- a/sources/pyside2/PySide2/QtTextToSpeech/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-project(QtTextToSpeech)
-
-set(QtTextToSpeech_SRC
-${QtTextToSpeech_GEN_DIR}/qtexttospeech_wrapper.cpp
-${QtTextToSpeech_GEN_DIR}/qtexttospeechengine_wrapper.cpp
-${QtTextToSpeech_GEN_DIR}/qvoice_wrapper.cpp
-# module is always needed
-${QtTextToSpeech_GEN_DIR}/qttexttospeech_module_wrapper.cpp
-)
-
-set(QtTextToSpeech_include_dirs ${QtTextToSpeech_SOURCE_DIR}
- ${QtTextToSpeech_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}TextToSpeech_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR})
-
-set(QtTextToSpeech_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Multimedia_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}TextToSpeech_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES})
-
-set(QtTextToSpeech_deps QtCore QtMultimedia)
-
-create_pyside_module(NAME QtTextToSpeech
- INCLUDE_DIRS QtTextToSpeech_include_dirs
- LIBRARIES QtTextToSpeech_libraries
- DEPS QtTextToSpeech_deps
- TYPESYSTEM_PATH QtTextToSpeech_SOURCE_DIR
- SOURCES QtTextToSpeech_SRC)
diff --git a/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml b/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml
deleted file mode 100644
index 48a5bc9f4..000000000
--- a/sources/pyside2/PySide2/QtTextToSpeech/typesystem_texttospeech.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtTextToSpeech">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
-
- <object-type name="QTextToSpeech">
- <enum-type name="State"/>
- </object-type>
- <object-type name="QTextToSpeechEngine"/>
- <value-type name="QVoice">
- <enum-type name="Gender"/>
- <enum-type name="Age"/>
- </value-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt b/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt
deleted file mode 100644
index f9ca16e5a..000000000
--- a/sources/pyside2/PySide2/QtUiTools/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-project(QtUiTools)
-
-set(QtUiTools_SRC
-${QtUiTools_GEN_DIR}/quiloader_wrapper.cpp
-# module is always needed
-${QtUiTools_GEN_DIR}/qtuitools_module_wrapper.cpp
-)
-
-set(QtUiTools_glue_sources
- "${QtUiTools_SOURCE_DIR}/glue/plugins.h"
-)
-
-set(QtUiTools_include_dirs ${QtUiTools_SOURCE_DIR}
- ${QtUiTools_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Xml_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Designer_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}UiTools_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${plugins_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtXml_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- )
-set(QtUiTools_libraries pyside2
- 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}
- )
-set(QtUiTools_deps QtWidgets QtXml)
-create_pyside_module(NAME QtUiTools
- INCLUDE_DIRS QtUiTools_include_dirs
- LIBRARIES QtUiTools_libraries
- DEPS QtUiTools_deps
- TYPESYSTEM_PATH QtUiTools_SOURCE_DIR
- SOURCES QtUiTools_SRC
- GLUE_SOURCES QtUiTools_glue_sources)
diff --git a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml
deleted file mode 100644
index 43ed7a60e..000000000
--- a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-
-<typesystem package="PySide2.QtUiTools">
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
- <load-typesystem name="QtXml/typesystem_xml.xml" generate="no"/>
-
- <object-type name="QUiLoader">
- <extra-includes>
- <include file-name="glue/plugins.h" location="local"/>
- </extra-includes>
- <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*)" return-type="void">
- <modify-argument index="1">
- <rename to="customWidgetType"/>
- </modify-argument>
- <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:`~PySide2.QtGui.QWidget`'s :meth:`~PySide2.QtGui.QWidget.paintEvent` method.
-
- .. code-block:: python
-
- class Circle(QWidget):
- def paintEvent(self, event):
- painter = QPainter(self)
- 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"/>
- </add-function>
- <modify-function signature="createAction(QObject*,const QString&amp;)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="createActionGroup(QObject*,const QString&amp;)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="createLayout(const QString&amp;,QObject*,const QString&amp;)">
- <modify-argument index="return">
- <parent index="2" action="add"/>
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="createWidget(const QString&amp;,QWidget*,const QString&amp;)">
- <modify-argument index="return">
- <parent index="2" action="add"/>
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="load(QIODevice*,QWidget*)">
- <modify-argument index="2">
- <replace-default-expression with="0"/>
- <rename to="parentWidget"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- <inject-code file="../glue/qtuitools.cpp" snippet="quiloader-load-1"/>
- </modify-function>
-
- <!-- Syntax sugar -->
- <add-function signature="load(QString,QWidget*)" return-type="QWidget*">
- <modify-argument index="2">
- <replace-default-expression with="0"/>
- <rename to="parentWidget"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- <inject-code file="../glue/qtuitools.cpp" snippet="quiloader-load-2"/>
- </add-function>
- </object-type>
-
- <!--
- After the removal of the 'pysideuic' Python module, many users were unable to generate and
- load UI classes dynamically.
- This function was created to provide an equivalent solution to the 'loadUiType' function from
- Riverbank's PyQt.
- -->
- <add-function signature="loadUiType(const QString&amp; @uifile@)" return-type="PyObject*">
- <inject-code file="../glue/qtuitools.cpp" snippet="loaduitype"/>
- </add-function>
-
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt b/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt
deleted file mode 100644
index df9531809..000000000
--- a/sources/pyside2/PySide2/QtWebChannel/CMakeLists.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-project(QtWebChannel)
-
-set(QtWebChannel_SRC
-${QtWebChannel_GEN_DIR}/qwebchannel_wrapper.cpp
-${QtWebChannel_GEN_DIR}/qwebchannelabstracttransport_wrapper.cpp
-# module is always needed
-${QtWebChannel_GEN_DIR}/qtwebchannel_module_wrapper.cpp
-)
-
-set(QtWebChannel_include_dirs ${QtWebChannel_SOURCE_DIR}
- ${QtWebChannel_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebChannel_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtWebChannel_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtWebChannel_deps QtCore)
-
-create_pyside_module(NAME QtWebChannel
- INCLUDE_DIRS QtWebChannel_include_dirs
- LIBRARIES QtWebChannel_libraries
- DEPS QtWebChannel_deps
- TYPESYSTEM_PATH QtWebChannel_SOURCE_DIR
- SOURCES QtWebChannel_SRC)
diff --git a/sources/pyside2/PySide2/QtWebChannel/typesystem_webchannel.xml b/sources/pyside2/PySide2/QtWebChannel/typesystem_webchannel.xml
deleted file mode 100644
index c47d5fa08..000000000
--- a/sources/pyside2/PySide2/QtWebChannel/typesystem_webchannel.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWebChannel">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
-
- <object-type name="QWebChannel"/>
- <object-type name="QWebChannelAbstractTransport">
- <extra-includes>
- <include file-name="QJsonObject" location="global"/>
- </extra-includes>
- </object-type>
- <!-- Not sure if this will be useful, but commented out for now because
- the QML module is not yet wrapped.
- <object-type name="QQmlWebChannel"/> -->
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt
deleted file mode 100644
index e1460ff21..000000000
--- a/sources/pyside2/PySide2/QtWebEngine/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-project(QtWebEngine)
-
-set(QtWebEngine_SRC
-${QtWebEngine_GEN_DIR}/qtwebengine_wrapper.cpp
-# module is always needed
-${QtWebEngine_GEN_DIR}/qtwebengine_module_wrapper.cpp
-)
-
-set(QtWebEngine_include_dirs
- ${QtWebEngine_SOURCE_DIR}
- ${QtWebEngine_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtWebEngine_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebEngine_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtWebEngine_deps QtCore)
-create_pyside_module(NAME QtWebEngine
- INCLUDE_DIRS QtWebEngine_include_dirs
- LIBRARIES QtWebEngine_libraries
- DEPS QtWebEngine_deps
- TYPESYSTEM_PATH QtWebEngine_SOURCE_DIR
- SOURCES QtWebEngine_SRC)
-
diff --git a/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml b/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml
deleted file mode 100644
index 7d0875a2c..000000000
--- a/sources/pyside2/PySide2/QtWebEngine/typesystem_webengine.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWebEngine">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <namespace-type name="QtWebEngine"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
deleted file mode 100644
index 52a071606..000000000
--- a/sources/pyside2/PySide2/QtWebEngineCore/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-project(QtWebEngineCore)
-
-set(QtWebEngineCore_SRC
-${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebenginehttprequest_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinfo_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinterceptor_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestjob_wrapper.cpp
-${QtWebEngineCore_GEN_DIR}/qwebengineurlschemehandler_wrapper.cpp
-# module is always needed
-${QtWebEngineCore_GEN_DIR}/qtwebenginecore_module_wrapper.cpp
-)
-
-if (Qt${QT_MAJOR_VERSION}WebEngineCore_VERSION VERSION_EQUAL 5.12.0
- OR Qt${QT_MAJOR_VERSION}WebEngineCore_VERSION VERSION_GREATER 5.12.0)
- list(APPEND QtWebEngineCore_SRC
- ${QtWebEngineCore_GEN_DIR}/qwebengineurlscheme_wrapper.cpp)
-endif()
-
-set(QtWebEngineCore_include_dirs
- ${QtWebEngineCore_SOURCE_DIR}
- ${QtWebEngineCore_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- )
-set(QtWebEngineCore_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- )
-set(QtWebEngineCore_deps QtCore QtNetwork)
-create_pyside_module(NAME QtWebEngineCore
- INCLUDE_DIRS QtWebEngineCore_include_dirs
- LIBRARIES QtWebEngineCore_libraries
- DEPS QtWebEngineCore_deps
- TYPESYSTEM_PATH QtWebEngineCore_SOURCE_DIR
- SOURCES QtWebEngineCore_SRC)
-
diff --git a/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
deleted file mode 100644
index 65c0e8137..000000000
--- a/sources/pyside2/PySide2/QtWebEngineCore/typesystem_webenginecore.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWebEngineCore">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
-
- <object-type name="QWebEngineCookieStore"/>
-
- <object-type name="QWebEngineHttpRequest">
- <enum-type name="Method"/>
- <modify-function signature="QWebEngineHttpRequest(const QUrl &amp;, const QWebEngineHttpRequest::Method &amp;)">
- <modify-argument index="2">
- <replace-type modified-type="QWebEngineHttpRequest::Method"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QWebEngineUrlRequestInfo">
- <enum-type name="NavigationType"/>
- <enum-type name="ResourceType"/>
- </object-type>
-
- <object-type name="QWebEngineUrlRequestInterceptor"/>
-
- <object-type name="QWebEngineUrlRequestJob">
- <enum-type name="Error"/>
- </object-type>
- <value-type name="QWebEngineUrlScheme" since="5.12">
- <enum-type name="Syntax"/>
- <enum-type name="SpecialPort"/>
- <enum-type name="Flag" flags="Flags"/>
- </value-type>
-
- <object-type name="QWebEngineUrlSchemeHandler"/>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
deleted file mode 100644
index b9fc1bc92..000000000
--- a/sources/pyside2/PySide2/QtWebEngineWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-project(QtWebEngineWidgets)
-
-set(QtWebEngineWidgets_SRC
-${QtWebEngineWidgets_GEN_DIR}/qwebenginecertificateerror_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginedownloaditem_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginehistory_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginehistoryitem_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginepage_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebengineprofile_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginescript_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginescriptcollection_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginesettings_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebengineview_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginecontextmenudata_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginefullscreenrequest_wrapper.cpp
-# module is always needed
-${QtWebEngineWidgets_GEN_DIR}/qtwebenginewidgets_module_wrapper.cpp
-)
-
-set(QtWebEngineWidgets_include_dirs
- ${QtWebEngineWidgets_SOURCE_DIR}
- ${QtWebEngineWidgets_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebChannel_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtWebEngineWidgets_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- ${QtWebChannel_GEN_DIR}
- ${QtWebEngineCore_GEN_DIR}
- ${QtPrintSupport_GEN_DIR}
- )
-set(QtWebEngineWidgets_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebChannel_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}
- )
-set(QtWebEngineWidgets_deps QtGui QtWidgets QtNetwork QtWebChannel QtPrintSupport)
-create_pyside_module(NAME QtWebEngineWidgets
- INCLUDE_DIRS QtWebEngineWidgets_include_dirs
- LIBRARIES QtWebEngineWidgets_libraries
- DEPS QtWebEngineWidgets_deps
- TYPESYSTEM_PATH QtWebEngineWidgets_SOURCE_DIR
- SOURCES QtWebEngineWidgets_SRC)
-
diff --git a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml
deleted file mode 100644
index 2519101d7..000000000
--- a/sources/pyside2/PySide2/QtWebEngineWidgets/typesystem_webenginewidgets.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWebEngineWidgets">
- <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="QtNetwork/typesystem_network.xml" generate="no"/>
- <load-typesystem name="QtWebChannel/typesystem_webchannel.xml" generate="no"/>
- <load-typesystem name="QtWebEngineCore/typesystem_webenginecore.xml" generate="no"/>
- <load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
-
-
- <object-type name="QWebEngineCertificateError">
- <enum-type name="Error"/>
- </object-type>
-
- <object-type name="QWebEngineDownloadItem">
- <enum-type name="DownloadInterruptReason"/>
- <enum-type name="DownloadState"/>
- <enum-type name="DownloadType"/>
- <enum-type name="SavePageFormat"/>
- </object-type>
-
- <object-type name="QWebEngineHistory"/>
- <value-type name="QWebEngineHistoryItem"/>
-
- <object-type name="QWebEnginePage">
- <enum-type name="LifecycleState"/>
- <enum-type name="WebAction"/>
- <enum-type name="FindFlag" flags="FindFlags"/>
- <enum-type name="WebWindowType"/>
- <enum-type name="PermissionPolicy"/>
- <enum-type name="NavigationType"/>
- <enum-type name="Feature"/>
- <enum-type name="FileSelectionMode"/>
- <enum-type name="JavaScriptConsoleMessageLevel"/>
- <enum-type name="RenderProcessTerminationStatus"/>
- <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>
- <add-function signature="print(QPrinter*,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-print"/>
- </add-function>
- <add-function signature="toPlainText(PyObject*) const">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
- </add-function>
- <add-function signature="toHtml(PyObject*) const">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
- </add-function>
- <add-function signature="runJavaScript(const QString &amp;,quint32,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-runjavascript"/>
- </add-function>
- <add-function signature="printToPdf(PyObject*,const QPageLayout &amp;)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-printtopdf"/>
- </add-function>
- </object-type>
-
- <object-type name="QWebEngineProfile">
- <enum-type name="HttpCacheType"/>
- <enum-type name="PersistentCookiesPolicy"/>
- </object-type>
-
- <value-type name="QWebEngineScript">
- <enum-type name="InjectionPoint"/>
- <enum-type name="ScriptWorldId"/>
- </value-type>
-
- <object-type name="QWebEngineScriptCollection"/>
-
- <object-type name="QWebEngineSettings">
- <enum-type name="FontFamily"/>
- <enum-type name="FontSize"/>
- <enum-type name="UnknownUrlSchemePolicy" since="5.11"/>
- <enum-type name="WebAttribute"/>
- </object-type>
-
- <object-type name="QWebEngineView">
- <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>
- </object-type>
-
- <value-type name="QWebEngineContextMenuData">
- <enum-type name="EditFlag" flags="EditFlags" since="5.11"/>
- <enum-type name="MediaFlag" flags="MediaFlags" since="5.11"/>
- <enum-type name="MediaType"/>
- </value-type>
-
- <object-type name="QWebEngineFullScreenRequest"/>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt
deleted file mode 100644
index 4a2c765a6..000000000
--- a/sources/pyside2/PySide2/QtWebSockets/CMakeLists.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-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}/qwebsocketprotocol_wrapper.cpp
-${QtWebSockets_GEN_DIR}/qwebsocketserver_wrapper.cpp
-# module is always needed
-${QtWebSockets_GEN_DIR}/qtwebsockets_module_wrapper.cpp
-)
-
-set(QtWebSockets_include_dirs ${QtWebSockets_SOURCE_DIR}
- ${QtWebSockets_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebSockets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtWebSockets_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- )
-set(QtWebSockets_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebSockets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-
-set(QtWebSockets_deps QtNetwork)
-
-create_pyside_module(NAME QtWebSockets
- INCLUDE_DIRS QtWebSockets_include_dirs
- LIBRARIES QtWebSockets_libraries
- DEPS QtWebSockets_deps
- TYPESYSTEM_PATH QtWebSockets_SOURCE_DIR
- SOURCES QtWebSockets_SRC)
diff --git a/sources/pyside2/PySide2/QtWebSockets/typesystem_websockets.xml b/sources/pyside2/PySide2/QtWebSockets/typesystem_websockets.xml
deleted file mode 100644
index 4257a998b..000000000
--- a/sources/pyside2/PySide2/QtWebSockets/typesystem_websockets.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWebSockets">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
-
- <object-type name="QMaskGenerator"/>
-
- <object-type name="QWebSocket">
- <extra-includes>
- <include file-name="QTcpSocket" location="global"/>
- </extra-includes>
- </object-type>
-
- <object-type name="QWebSocketCorsAuthenticator"/>
-
- <namespace-type name="QWebSocketProtocol">
- <enum-type name="Version"/>
- <enum-type name="CloseCode"/>
- </namespace-type>
-
- <object-type name="QWebSocketServer">
- <enum-type name="SslMode"/>
- <extra-includes>
- <include file-name="QWebSocketCorsAuthenticator" location="global"/>
- </extra-includes>
- </object-type>
-
- <!-- TODO: Gracefully handle the lack of SSL support -->
- <rejection class="QWebSocket" function-name="ignoreSslErrors"/>
- <rejection class="QWebSocket" function-name="setSslConfiguration"/>
- <rejection class="QWebSocket" function-name="sslConfiguration"/>
- <rejection class="QWebSocket" function-name="ignoreSslErrors"/>
- <rejection class="QWebSocket" function-name="sslErrors"/>
- <rejection class="QWebSocketServer" function-name="setSslConfiguration"/>
- <rejection class="QWebSocketServer" function-name="sslConfiguration"/>
- <rejection class="QWebSocketServer" function-name="peerVerifyError"/>
- <rejection class="QWebSocketServer" function-name="sslErrors"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
deleted file mode 100644
index 3df3b8d19..000000000
--- a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,225 +0,0 @@
-project(QtWidgets)
-
-set(QtWidgets_SRC
-${QtWidgets_GEN_DIR}/qaccessiblewidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractbutton_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractgraphicsshapeitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractitemdelegate_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractitemview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractscrollarea_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractslider_wrapper.cpp
-${QtWidgets_GEN_DIR}/qabstractspinbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qapplication_wrapper.cpp
-${QtWidgets_GEN_DIR}/qboxlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qbuttongroup_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcalendarwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcheckbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcolordialog_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcolormap_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcolumnview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcombobox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcommandlinkbutton_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcommonstyle_wrapper.cpp
-${QtWidgets_GEN_DIR}/qcompleter_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdatawidgetmapper_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdateedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdatetimeedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdial_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdialog_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdialogbuttonbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdockwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdoublespinbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qerrormessage_wrapper.cpp
-${QtWidgets_GEN_DIR}/qfiledialog_wrapper.cpp
-${QtWidgets_GEN_DIR}/qfileiconprovider_wrapper.cpp
-${QtWidgets_GEN_DIR}/qfilesystemmodel_wrapper.cpp
-${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}/qframe_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgestureevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgesturerecognizer_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsanchor_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsanchorlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsblureffect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicscolorizeeffect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsdropshadoweffect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicseffect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsellipseitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsgridlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsitemanimation_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsitemgroup_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicslayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicslayoutitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicslinearlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicslineitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsobject_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsopacityeffect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicspathitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicspixmapitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicspolygonitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsproxywidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsrectitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsrotation_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscale_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscene_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenecontextmenuevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenedragdropevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicssceneevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenehelpevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenehoverevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenemouseevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenemoveevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicssceneresizeevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsscenewheelevent_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicssimpletextitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicstextitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicstransform_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicsview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgraphicswidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgridlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qgroupbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qhboxlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qheaderview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qinputdialog_wrapper.cpp
-${QtWidgets_GEN_DIR}/qitemdelegate_wrapper.cpp
-${QtWidgets_GEN_DIR}/qitemeditorcreatorbase_wrapper.cpp
-${QtWidgets_GEN_DIR}/qitemeditorfactory_wrapper.cpp
-${QtWidgets_GEN_DIR}/qkeysequenceedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlabel_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlayoutitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlcdnumber_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlineedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlistview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlistwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qlistwidgetitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmainwindow_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmdiarea_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmdisubwindow_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmenu_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmenubar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qmessagebox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qpangesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qpinchgesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qplaintextdocumentlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qplaintextedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qprogressbar_wrapper.cpp
-${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}/qrubberband_wrapper.cpp
-${QtWidgets_GEN_DIR}/qscrollarea_wrapper.cpp
-${QtWidgets_GEN_DIR}/qscrollbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qscroller_wrapper.cpp
-${QtWidgets_GEN_DIR}/qscrollerproperties_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsizegrip_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsizepolicy_wrapper.cpp
-${QtWidgets_GEN_DIR}/qslider_wrapper.cpp
-${QtWidgets_GEN_DIR}/qspaceritem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qspinbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsplashscreen_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsplitter_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsplitterhandle_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstackedlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstackedwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstatusbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyle_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleditemdelegate_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstylefactory_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstylehintreturn_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstylehintreturnmask_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstylehintreturnvariant_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoption_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionbutton_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptioncombobox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptioncomplex_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiondockwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionfocusrect_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionframe_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiongraphicsitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiongroupbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionheader_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionmenuitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionprogressbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionrubberband_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionsizegrip_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionslider_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionspinbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontab_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontabbarbase_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontabwidgetframe_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontitlebar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontoolbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontoolbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptiontoolbutton_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstyleoptionviewitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qstylepainter_wrapper.cpp
-${QtWidgets_GEN_DIR}/qswipegesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qsystemtrayicon_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtabbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtableview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtablewidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtablewidgetitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtablewidgetselectionrange_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtabwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtapandholdgesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtapgesture_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtextbrowser_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtextedit_extraselection_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtextedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtilerules_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtimeedit_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtoolbar_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtoolbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtoolbutton_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtooltip_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtreeview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtreewidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtreewidgetitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qtreewidgetitemiterator_wrapper.cpp
-${QtWidgets_GEN_DIR}/qundoview_wrapper.cpp
-${QtWidgets_GEN_DIR}/qvboxlayout_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwhatsthis_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwidget_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwidgetaction_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwidgetitem_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwizard_wrapper.cpp
-${QtWidgets_GEN_DIR}/qwizardpage_wrapper.cpp
-
-${SPECIFIC_OS_FILES}
-# module is always needed
-${QtWidgets_GEN_DIR}/qtwidgets_module_wrapper.cpp
-)
-
-configure_file("${QtWidgets_SOURCE_DIR}/typesystem_widgets.xml.in"
- "${QtWidgets_BINARY_DIR}/typesystem_widgets.xml" @ONLY)
-
-set(QtWidgets_include_dirs ${QtWidgets_SOURCE_DIR}
- ${QtWidgets_BINARY_DIR}
- ${pyside2_SOURCE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- )
-set(QtWidgets_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- )
-set(QtWidgets_deps QtGui)
-
-create_pyside_module(NAME QtWidgets
- INCLUDE_DIRS QtWidgets_include_dirs
- LIBRARIES QtWidgets_libraries
- DEPS QtWidgets_deps
- TYPESYSTEM_PATH QtWidgets_SOURCE_DIR
- SOURCES QtWidgets_SRC
- TYPESYSTEM_NAME ${QtWidgets_BINARY_DIR}/typesystem_widgets.xml)
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets.xml.in b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets.xml.in
deleted file mode 100644
index ea57b7861..000000000
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets.xml.in
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWidgets">
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
- <load-typesystem name="QtWidgets/typesystem_widgets_@AUTO_OS@.xml" generate="yes"/>
- <load-typesystem name="QtWidgets/typesystem_widgets_common.xml" generate="yes"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
deleted file mode 100644
index d067e1aba..000000000
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ /dev/null
@@ -1,3326 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWidgets">
- <load-typesystem name="templates/core_common.xml" generate="no"/>
- <load-typesystem name="templates/widgets_common.xml" generate="no"/>
-
-
-
- <!-- Qt5: Beware forgetting the following rejection!
- There are anonymous enums "enum { Type = 1 }" etc. in these QGraphics classes, but they
- don't show up as "enum_1", but pretend they were a real enum field, not a value.
-
- """
- Generating class model... [WARNING]
- enum 'QGraphicsItem::UserType' does not have a type entry or is not an enum
- enum 'QGraphicsWidget::Type' does not have a type entry or is not an enum
- enum 'QGraphicsProxyWidget::Type' does not have a type entry or is not an enum
- enum 'QGraphicsEllipseItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsPixmapItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsSimpleTextItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsTextItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsItemGroup::Type' does not have a type entry or is not an enum
- enum 'QGraphicsRectItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsLineItem::Type' does not have a type entry or is not an enum
- enum 'QGraphicsPathItem::Type' does not have a type entry or is not an enum
- 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.
- -->
-
- <object-type name="QStyleOption" polymorphic-id-expression="%1-&gt;type == QStyleOption::SO_Default">
- <enum-type name="OptionType"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionGraphicsItem" polymorphic-id-expression="%1-&gt;type == QStyleOptionGraphicsItem::Type &amp;&amp; %1-&gt;version == QStyleOptionGraphicsItem::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionSizeGrip" polymorphic-id-expression="%1-&gt;type == QStyleOptionSizeGrip::Type &amp;&amp; %1-&gt;version == QStyleOptionSizeGrip::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionButton" polymorphic-id-expression="%1-&gt;type == QStyleOptionButton::Type &amp;&amp; %1-&gt;version == QStyleOptionButton::Version">
- <enum-type name="ButtonFeature" flags="ButtonFeatures"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionComboBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionComboBox::Type &amp;&amp; %1-&gt;version == QStyleOptionComboBox::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionComplex" polymorphic-id-expression="%1-&gt;type == QStyleOptionComplex::Type &amp;&amp; %1-&gt;version == QStyleOptionComplex::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionDockWidget" polymorphic-id-expression="%1-&gt;type == QStyleOptionDockWidget::Type &amp;&amp; %1-&gt;version == QStyleOptionDockWidget::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionFocusRect" polymorphic-id-expression="%1-&gt;type == QStyleOptionFocusRect::Type &amp;&amp; %1-&gt;version == QStyleOptionFocusRect::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionFrame" polymorphic-id-expression="%1-&gt;type == QStyleOptionFrame::Type &amp;&amp; %1-&gt;version == QStyleOptionFrame::Version">
- <enum-type name="FrameFeature" flags="FrameFeatures"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionGroupBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionGroupBox::Type &amp;&amp; %1-&gt;version == QStyleOptionGroupBox::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionHeader" polymorphic-id-expression="%1-&gt;type == QStyleOptionHeader::Type &amp;&amp; %1-&gt;version == QStyleOptionHeader::Version">
- <enum-type name="SectionPosition"/>
- <enum-type name="SelectedPosition"/>
- <enum-type name="SortIndicator"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionMenuItem" polymorphic-id-expression="%1-&gt;type == QStyleOptionMenuItem::Type &amp;&amp; %1-&gt;version == QStyleOptionMenuItem::Version">
- <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="%1-&gt;type == QStyleOptionProgressBar::Type &amp;&amp; %1-&gt;version == QStyleOptionProgressBar::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionRubberBand" polymorphic-id-expression="%1-&gt;type == QStyleOptionRubberBand::Type &amp;&amp; %1-&gt;version == QStyleOptionRubberBand::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionSlider" polymorphic-id-expression="%1-&gt;type == QStyleOptionSlider::Type &amp;&amp; %1-&gt;version == QStyleOptionSlider::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionSpinBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionSpinBox::Type &amp;&amp; %1-&gt;version == QStyleOptionSpinBox::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionTab" polymorphic-id-expression="%1-&gt;type == QStyleOptionTab::Type &amp;&amp; %1-&gt;version == QStyleOptionTab::Version">
- <enum-type name="CornerWidget" flags="CornerWidgets"/>
- <enum-type name="SelectedPosition"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- <enum-type name="TabFeature" flags="TabFeatures"/>
- <enum-type name="TabPosition"/>
- </object-type>
- <object-type name="QStyleOptionTabBarBase" polymorphic-id-expression="%1-&gt;type == QStyleOptionTabBarBase::Type &amp;&amp; %1-&gt;version == QStyleOptionTabBarBase::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionTabWidgetFrame" polymorphic-id-expression="%1-&gt;type == QStyleOptionTabWidgetFrame::Type &amp;&amp; %1-&gt;version == QStyleOptionTabWidgetFrame::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionTitleBar" polymorphic-id-expression="%1-&gt;type == QStyleOptionTitleBar::Type &amp;&amp; %1-&gt;version == QStyleOptionTitleBar::Version">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleOptionToolBar" polymorphic-id-expression="%1-&gt;type == QStyleOptionToolBar::Type &amp;&amp; %1-&gt;version == QStyleOptionToolBar::Version">
- <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="%1-&gt;type == QStyleOptionToolBox::Type &amp;&amp; %1-&gt;version == QStyleOptionToolBox::Version">
- <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="%1-&gt;type == QStyleOptionToolButton::Type &amp;&amp; %1-&gt;version == QStyleOptionToolButton::Version">
- <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">
- <enum-type name="Position"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- <enum-type name="ViewItemFeature" flags="ViewItemFeatures"/>
- <enum-type name="ViewItemPosition"/>
- </value-type>
-
- <object-type name="QAccessibleWidget"/>
- <value-type name="QColormap">
- <enum-type name="Mode"/>
- </value-type>
- <value-type name="QSizePolicy">
- <enum-type name="ControlType" flags="ControlTypes"/>
- <enum-type name="Policy"/>
- <enum-type name="PolicyFlag"/>
- </value-type>
- <value-type name="QTableWidgetSelectionRange"/>
-
- <value-type name="QTreeWidgetItemIterator" >
- <modify-function signature="QTreeWidgetItemIterator(QTreeWidget*,QFlags&lt;QTreeWidgetItemIterator::IteratorFlag&gt;)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
-
- <add-function signature="__iter__()" return-type="PyObject*">
- <inject-code class="target" position="beginning">
- <insert-template name="__iter__"/>
- </inject-code>
- </add-function>
- <add-function signature="__next__()" return-type="PyObject*">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitemiterator-next"/>
- </add-function>
-
- <add-function signature="value()" return-type="QTreeWidgetItem*">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qtreewidgetitemiterator-value"/>
- </add-function>
- <enum-type name="IteratorFlag" flags="IteratorFlags"/>
- <!-- ### See bug 778 -->
- <modify-function signature="operator++(int)" remove="all"/>
- <modify-function signature="operator--(int)" remove="all"/>
- <modify-function signature="operator++()" remove="all"/>
- <modify-function signature="operator--()" remove="all"/>
- <!-- ### Operator* doesn't make sense in Python. -->
- <modify-function signature="operator*()const" remove="all"/>
- <!-- ### -->
- </value-type>
-
- <object-type name="QLayoutItem">
-
- <modify-function signature="widget()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="layout()">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="spacerItem()">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QGraphicsItem">
- <enum-type name="CacheMode"/>
- <enum-type name="Extension"/>
- <enum-type name="GraphicsItemChange"/>
- <enum-type name="GraphicsItemFlag" flags="GraphicsItemFlags"/>
- <enum-type name="PanelModality" since="4.6"/>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem"/>
- <modify-function signature="setParentItem(QGraphicsItem*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="scene()const">
- <inject-code position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-scene-return-parenting"/>
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="parentItem()const">
- <modify-argument index="return">
- <define-ownership owner="target"/>
- </modify-argument>
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="parentWidget()const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="paint(QPainter*,const QStyleOptionGraphicsItem*,QWidget*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="collidesWithItem(const QGraphicsItem*,Qt::ItemSelectionMode)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="contextMenuEvent(QGraphicsSceneContextMenuEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragEnterEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragLeaveEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragMoveEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dropEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="focusInEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="focusOutEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="hoverEnterEvent(QGraphicsSceneHoverEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="hoverLeaveEvent(QGraphicsSceneHoverEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="hoverMoveEvent(QGraphicsSceneHoverEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="isBlockedByModalPanel(QGraphicsItem**)const" since="4.6">
- <modify-argument index="1">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, blockingPanel)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-isblockedbymodalpanel"/>
- </modify-function>
- <modify-function signature="itemTransform(const QGraphicsItem*,bool*)const">
- <modify-argument index="2">
- <remove-argument />
- <remove-default-expression />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(QTransform, bool ok)"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,bool*"/>
- </inject-code>
- </modify-function>
- <modify-function signature="isObscuredBy(const QGraphicsItem*)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="keyPressEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="keyReleaseEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseDoubleClickEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseMoveEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mousePressEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseReleaseEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="sceneEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="sceneEventFilter(QGraphicsItem*,QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- <modify-argument index="2" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="wheelEvent(QGraphicsSceneWheelEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="setGraphicsEffect(QGraphicsEffect*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!-- ### These methods are internal on Qt. -->
- <modify-function signature="supportsExtension(QGraphicsItem::Extension)const" remove="all"/>
- <modify-function signature="setExtension(QGraphicsItem::Extension,QVariant)" remove="all"/>
- <!-- ### -->
- </object-type>
- <object-type name="QAbstractGraphicsShapeItem"/>
- <object-type name="QAbstractItemView">
- <enum-type name="CursorAction"/>
- <enum-type name="DragDropMode"/>
- <enum-type name="DropIndicatorPosition"/>
- <enum-type name="EditTrigger" flags="EditTriggers"/>
- <enum-type name="ScrollHint"/>
- <enum-type name="ScrollMode"/>
- <enum-type name="SelectionBehavior"/>
- <enum-type name="SelectionMode"/>
- <enum-type name="State"/>
- <modify-function signature="setModel(QAbstractItemModel*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setSelectionModel(QItemSelectionModel*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegateForColumn(int,QAbstractItemDelegate*)">
- <modify-argument index="2">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegateForRow(int,QAbstractItemDelegate*)">
- <modify-argument index="2">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="model()const">
- <modify-argument index="return">
- <!-- Defining ownership as "default" avoids the object to be automatically
- set as parent of the returned pointer. -->
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="selectionModel()const">
- <modify-argument index="return">
- <!-- Defining ownership as "default" avoids the object to be automatically
- set as parent of the returned pointer. -->
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setIndexWidget(const QModelIndex &amp;,QWidget*)" allow-thread="yes">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="edit(QModelIndex,QAbstractItemView::EditTrigger,QEvent*)">
- <modify-argument index="3" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="selectionCommand(QModelIndex,const QEvent*)const">
- <modify-argument index="2" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QAbstractSlider">
- <enum-type name="SliderAction"/>
- <enum-type name="SliderChange"/>
- </object-type>
- <object-type name="QCheckBox"/>
- <object-type name="QCommonStyle">
- </object-type>
- <object-type name="QDataWidgetMapper">
- <enum-type name="SubmitPolicy"/>
- <modify-function signature="addMapping(QWidget*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMapping(QWidget*,int,QByteArray)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeMapping(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setModel(QAbstractItemModel*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QDateEdit"/>
- <object-type name="QDialog">
- <enum-type name="DialogCode"/>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- </object-type>
- <object-type name="QDialogButtonBox">
- <enum-type name="ButtonLayout"/>
- <enum-type name="ButtonRole"/>
- <enum-type name="StandardButton" flags="StandardButtons"/>
- <modify-function signature="addButton(QAbstractButton*,QDialogButtonBox::ButtonRole)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeButton(QAbstractButton*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QFileIconProvider"/>
- <object-type name="QWizard">
- <enum-type name="WizardButton"/>
- <enum-type name="WizardOption" flags="WizardOptions"/>
- <enum-type name="WizardPixmap"/>
- <enum-type name="WizardStyle"/>
- <modify-function signature="addPage(QWizardPage*)">
- <modify-argument index="1">
- <no-null-pointer/>
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setButton(QWizard::WizardButton,QAbstractButton*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QWizardPage">
- <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"/>
- </object-type>
- <object-type name="QFocusFrame">
- <modify-function signature="setWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QFontComboBox">
- <enum-type name="FontFilter" flags="FontFilters"/>
- </object-type>
- <object-type name="QFontDialog">
- <enum-type name="FontDialogOption" flags="FontDialogOptions"/>
- <modify-function signature="getFont(bool*,QWidget*)" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="bool*_fix,arg"/>
- </inject-code>
- </modify-function>
- <modify-function signature="getFont(bool*,QFont,QWidget*,QString,QFlags&lt;QFontDialog::FontDialogOption&gt;)" allow-thread="yes">
- <modify-argument index="1">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyTuple"/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="bool*_fix,arg,arg,arg,arg"/>
- </inject-code>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsEllipseItem"/>
- <object-type name="QGraphicsItemAnimation">
- <modify-function signature="setItem(QGraphicsItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setTimeLine(QTimeLine*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <extra-includes>
- <include file-name="QPair" location="global"/>
- </extra-includes>
- </object-type>
- <object-type name="QGraphicsItemGroup">
- <modify-function signature="addToGroup(QGraphicsItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsLineItem"/>
- <object-type name="QGraphicsPathItem"/>
- <object-type name="QGraphicsPixmapItem">
- <enum-type name="ShapeMode"/>
- </object-type>
- <object-type name="QGraphicsPolygonItem"/>
- <object-type name="QGraphicsRectItem"/>
- <object-type name="QGraphicsSimpleTextItem"/>
- <object-type name="QHBoxLayout"/>
- <object-type name="QHeaderView">
- <enum-type name="ResizeMode"/>
- <modify-function signature="paintSection(QPainter*,QRect,int)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QItemDelegate">
- <!-- ### "doLayout(...)" is an internal method. -->
- <modify-function signature="doLayout(QStyleOptionViewItem,QRect*,QRect*,QRect*,bool)const" remove="all"/>
- <!-- ### -->
- <modify-function signature="drawCheck(QPainter*,QStyleOptionViewItem,QRect,Qt::CheckState)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawDecoration(QPainter*,QStyleOptionViewItem,QRect,QPixmap)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawDisplay(QPainter*,QStyleOptionViewItem,QRect,QString)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawFocus(QPainter*,QStyleOptionViewItem,QRect)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="setItemEditorFactory(QItemEditorFactory*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QItemEditorCreatorBase">
- <modify-function signature="createWidget(QWidget*)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QItemEditorFactory">
- <modify-function signature="registerEditor(int,QItemEditorCreatorBase*)">
- <modify-argument index="2">
- <reference-count action="set"/>
- </modify-argument>
- <inject-code file="../glue/qtwidgets.cpp" snippet="qitemeditorfactory-registereditor"/>
- </modify-function>
- <modify-function signature="setDefaultFactory(QItemEditorFactory*)">
- <modify-argument index="1">
- <define-ownership owner="c++"/>
- </modify-argument>
- <inject-code file="../glue/qtwidgets.cpp" snippet="qitemeditorfactory-setdefaultfactory"/>
- </modify-function>
- </object-type>
- <object-type name="QListView">
- <enum-type name="Flow"/>
- <enum-type name="LayoutMode"/>
- <enum-type name="Movement"/>
- <enum-type name="ResizeMode"/>
- <enum-type name="ViewMode"/>
- </object-type>
- <object-type name="QColumnView">
- <modify-function signature="setPreviewWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QMainWindow">
- <enum-type name="DockOption" flags="DockOptions"/>
- <modify-function signature="setCentralWidget(QWidget*)">
- <inject-code class="target" position="beginning">
- <insert-template name="replace_child">
- <replace from="$FUNCTION_GET_OLD" to="centralWidget"/>
- <replace from="$CHILD_TYPE" to="QWidget"/>
- <replace from="$PYARG" to="%PYARG_1"/>
- <replace from="$CPPARG" to="%1"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <modify-function signature="setMenuBar(QMenuBar*)">
- <inject-code class="target" position="beginning">
- <insert-template name="replace_child">
- <replace from="$FUNCTION_GET_OLD" to="menuBar"/>
- <replace from="$CHILD_TYPE" to="QMenuBar"/>
- <replace from="$PYARG" to="%PYARG_1"/>
- <replace from="$CPPARG" to="%1"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <modify-function signature="setMenuWidget(QWidget*)">
- <inject-code class="target" position="beginning">
- <insert-template name="replace_child">
- <replace from="$FUNCTION_GET_OLD" to="menuWidget"/>
- <replace from="$CHILD_TYPE" to="QWidget"/>
- <replace from="$PYARG" to="%PYARG_1"/>
- <replace from="$CPPARG" to="%1"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <modify-function signature="setStatusBar(QStatusBar*)">
- <inject-code class="target" position="beginning">
- <insert-template name="replace_child">
- <replace from="$FUNCTION_GET_OLD" to="statusBar"/>
- <replace from="$CHILD_TYPE" to="QStatusBar"/>
- <replace from="$PYARG" to="%PYARG_1"/>
- <replace from="$CPPARG" to="%1"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <modify-function signature="addDockWidget(Qt::DockWidgetArea,QDockWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addDockWidget(Qt::DockWidgetArea,QDockWidget*,Qt::Orientation)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!-- this fuction is declared when not defined QT_NO_TOOLBA -->
- <modify-function signature="addToolBar(Qt::ToolBarArea,QToolBar*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addToolBar(QToolBar*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addToolBar(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!--- END QT_NO_TOOLBAR -->
- <modify-function signature="removeDockWidget(QDockWidget*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeToolBar(QToolBar*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeDockWidget(QDockWidget*)">
- <modify-argument index="2">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- </object-type>
- <object-type name="QMdiArea">
- <enum-type name="AreaOption" flags="AreaOptions"/>
- <enum-type name="ViewMode"/>
- <enum-type name="WindowOrder"/>
- <modify-function signature="addSubWindow(QWidget*,QFlags&lt;Qt::WindowType&gt;)" >
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeSubWindow(QWidget*)" allow-thread="yes"/>
- </object-type>
- <object-type name="QMdiSubWindow">
- <enum-type name="SubWindowOption" flags="SubWindowOptions"/>
- <modify-function signature="setWidget(QWidget*)" allow-thread="yes">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setSystemMenu(QMenu*)" allow-thread="yes">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QMenu">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-glue"/>
-
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="exec(const QPoint&amp;,QAction*)" rename="exec_" allow-thread="yes"/>
- <modify-function signature="exec(QList&lt;QAction*>,const QPoint&amp;,QAction*,QWidget*)" rename="exec_" allow-thread="yes"/>
- <modify-function signature="addAction(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMenu(QMenu*)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMenu(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertMenu(QAction*,QMenu*)">
- <modify-argument index="return">
- <parent index="2" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMenu(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!-- ### "setNoReplayFor(QWidget*)" is an internal method. -->
- <modify-function signature="setNoReplayFor(QWidget*)" remove="all"/>
-
- <add-function signature="addAction(QString&amp;,PyObject*,QKeySequence&amp;)">
- <modify-argument index="3">
- <replace-default-expression with="0"/>
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
-
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-1"/>
- </add-function>
-
- <add-function signature="addAction(QIcon&amp;,QString&amp;,PyObject*,QKeySequence&amp;)">
- <modify-argument index="4">
- <replace-default-expression with="0"/>
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
-
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-2"/>
- </add-function>
-
- <add-function signature="addAction(QAction*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-3"/>
- </add-function>
-
- <modify-function signature="clear()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qmenu-clear"/>
- </modify-function>
-
- </object-type>
-
- <object-type name="QMenuBar">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-glue"/>
- <modify-function signature="addAction(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addAction(QString,const QObject*,const char*)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <add-function signature="addAction(const QString&amp;,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-addaction-1"/>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </add-function>
- <modify-function signature="addMenu(QMenu*)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addSeparator()">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertMenu(QAction*,QMenu*)">
- <modify-argument index="return">
- <parent index="2" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertSeparator(QAction*)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="clear()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qmenubar-clear"/>
- </modify-function>
-
- <add-function signature="addAction(QAction*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-addaction-2"/>
- </add-function>
-
- </object-type>
- <object-type name="QProgressBar">
- <enum-type name="Direction"/>
- </object-type>
- <object-type name="QProxyStyle">
- <modify-function signature="QProxyStyle(QStyle*)">
- <modify-argument index="1">
- <define-ownership owner="c++"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QPushButton"/>
- <object-type name="QScrollArea">
- <modify-function signature="setWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QSpacerItem"/>
- <object-type name="QStatusBar">
- <modify-function signature="addWidget(QWidget*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addPermanentWidget(QWidget*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertWidget(int,QWidget*,int)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertPermanentWidget(int,QWidget*,int)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QStyleFactory">
- <modify-function signature="create(const QString&amp;)">
- <modify-argument index="return">
- <define-ownership owner="target"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QStyleHintReturn">
- <enum-type name="HintReturnType"/>
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleHintReturnVariant">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStyleHintReturnMask">
- <enum-type name="StyleOptionType"/>
- <enum-type name="StyleOptionVersion"/>
- </object-type>
- <object-type name="QStylePainter"/>
- <object-type name="QTableView">
- <modify-function signature="setHorizontalHeader(QHeaderView*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setVerticalHeader(QHeaderView*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QTimeEdit"/>
- <object-type name="QToolBox">
- <modify-function signature="addItem(QWidget*,const QIcon&amp;,const QString&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addItem(QWidget*,const QString&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItem(int,QWidget*,const QIcon&amp;,const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItem(int,QWidget*,const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeItem(int)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtoolbox-removeitem"/>
- </modify-function>
- </object-type>
- <object-type name="QToolButton">
- <enum-type name="ToolButtonPopupMode"/>
- <modify-function signature="setDefaultAction(QAction*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setMenu(QMenu*)">
- </modify-function>
- </object-type>
- <object-type name="QToolTip"/>
- <object-type name="QTreeView">
- <modify-function signature="drawBranches(QPainter*,QRect,QModelIndex)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawRow(QPainter*,QStyleOptionViewItem,QModelIndex)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="setHeader(QHeaderView*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QUndoView">
- <modify-function signature="setGroup(QUndoGroup*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setStack(QUndoStack*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QUndoView(QUndoGroup*,QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QUndoView(QUndoStack*,QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QVBoxLayout"/>
-
- <object-type name="QWhatsThis"/>
- <object-type name="QWidgetAction">
- <modify-function signature="setDefaultWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="releaseWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QWidgetItem" polymorphic-id-expression="%1-&gt;widget()"/>
-
- <object-type name="QGraphicsSceneContextMenuEvent" copyable="false" polymorphic-id-expression="%1-&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" >
- <!-- ### "setMimeData(const QMimeData*)" is an internal method. -->
- <modify-function signature="setMimeData(const QMimeData*)" remove="all"/>
- <!-- ### "setSource(QWidget*)" is an internal method. -->
- <modify-function signature="setSource(QWidget*)" remove="all"/>
- <!-- ### -->
- </object-type>
- <object-type name="QGraphicsSceneEvent" copyable="false">
- <!-- ### "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">
- <modify-function signature="activeGestures()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="canceledGestures()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="gestures()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="gesture(Qt::GestureType)const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="widget()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QAbstractButton"/>
- <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="RequestSoftwareInputPanel" since="4.6"/>
- <enum-type name="StandardPixmap"/>
- <enum-type name="StateFlag" flags="State"/>
- <enum-type name="StyleHint"/>
- <enum-type name="SubControl" flags="SubControls"/>
- <enum-type name="SubElement"/>
- <modify-function signature="drawComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,QPainter*,const QWidget*)const">
- <modify-argument index="3" invalidate-after-use="yes"/>
- <modify-argument index="4">
- <replace-default-expression with="0"/>
- <rename to="widget"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="drawControl(QStyle::ControlElement,const QStyleOption*,QPainter*,const QWidget*)const">
- <modify-argument index="3" invalidate-after-use="yes"/>
- <modify-argument index="4">
- <replace-default-expression with="0"/>
- <rename to="widget"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="drawPrimitive(QStyle::PrimitiveElement,const QStyleOption*,QPainter*,const QWidget*)const">
- <modify-argument index="3" invalidate-after-use="yes"/>
- <modify-argument index="4">
- <replace-default-expression with="0"/>
- <rename to="widget"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="hitTestComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,const QPoint&amp;,const QWidget*)const">
- <modify-argument index="4">
- <replace-default-expression with="0"/>
- <rename to="widget"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="styleHint(QStyle::StyleHint,const QStyleOption*,const QWidget*,QStyleHintReturn*)const">
- <modify-argument index="4" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawItemPixmap(QPainter*,QRect,int,QPixmap)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawItemText(QPainter*,QRect,int,QPalette,bool,QString,QPalette::ColorRole)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QColorDialog">
- <enum-type name="ColorDialogOption" flags="ColorDialogOptions"/>
- <modify-function signature="getColor(const QColor&amp;,QWidget*,const QString&amp;,QFlags&lt;QColorDialog::ColorDialogOption>)" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QLayout">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
- <enum-type name="SizeConstraint"/>
-
- <modify-function signature="itemAt(int)const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
- </modify-function>
-
- <modify-function signature="removeWidget(QWidget*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="removeownership-1"/>
- </modify-function>
- <modify-function signature="removeItem(QLayoutItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="removeownership-1"/>
- </modify-function>
-
- <modify-function signature="parentWidget()const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="takeAt(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- <define-ownership class="native" owner="c++"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addItem(QLayoutItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
-
- <modify-function signature="addWidget(QWidget*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addChildWidget(QWidget*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addChildLayout(QLayout*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="setMenuBar(QWidget*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
-
- <modify-function signature="getContentsMargins(int*,int*,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- <inject-code class="native" position="end">
- <insert-template name="fix_native_return_number*,number*,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
-
- <add-function signature="setAlignment(QFlags&lt;Qt::AlignmentFlag&gt;)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-setalignment"/>
- </add-function>
-
- </object-type>
-
- <object-type name="QStackedLayout">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
- <enum-type name="StackingMode"/>
- <modify-function signature="insertWidget(int,QWidget*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
- </modify-function>
- <modify-function signature="addWidget(QWidget*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- </object-type>
-
- <object-type name="QBoxLayout">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
-
- <enum-type name="Direction"/>
-
- <modify-function signature="addWidget(QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
-
- <modify-function signature="addLayout(QLayout*,int)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
-
- <modify-function signature="insertWidget(int,QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
- </modify-function>
- <modify-function signature="insertLayout(int,QLayout*,int)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
- </modify-function>
- <modify-function signature="insertItem(int,QLayoutItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
- </modify-function>
- <modify-function signature="addSpacerItem(QSpacerItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="insertSpacerItem(int,QSpacerItem*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
- </modify-function>
- </object-type>
-
- <object-type name="QGridLayout">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
- <modify-function signature="itemAtPosition (int,int)const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
- </modify-function>
- <modify-function signature="addWidget(QWidget*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="4">
- <rename to="alignment"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addWidget(QWidget*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="6">
- <rename to="alignment"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addLayout(QLayout*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="4">
- <rename to="alignment"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addLayout(QLayout*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="6">
- <rename to="alignment"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="addItem(QLayoutItem*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="4">
- <rename to="rowSpan"/>
- </modify-argument>
- <modify-argument index="5">
- <rename to="columnSpan"/>
- </modify-argument>
- <modify-argument index="6">
- <rename to="alignment"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
- </modify-function>
- <modify-function signature="getItemPosition(int,int*,int*,int*,int*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject*"/>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgridlayout-getitemposition"/>
- </modify-function>
- </object-type>
-
- <object-type name="QGraphicsView">
- <extra-includes>
- <include file-name="QPainterPath" location="global"/>
- <include file-name="QVarLengthArray" location="global"/>
- </extra-includes>
- <enum-type name="CacheModeFlag" flags="CacheMode"/>
- <enum-type name="DragMode"/>
- <enum-type name="OptimizationFlag" flags="OptimizationFlags"/>
- <enum-type name="ViewportAnchor"/>
- <enum-type name="ViewportUpdateMode"/>
- <modify-function signature="setScene(QGraphicsScene*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="scene()const">
- <inject-code position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-scene-return-parenting"/>
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="itemAt(int,int)const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="itemAt(QPoint)const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="drawBackground(QPainter*,QRectF)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawForeground(QPainter*,QRectF)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
-
- <!-- TODO: Support conversions on virtual function -->
- <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[])">
- <modify-argument index="2">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="pysequencesize_int"/>
- </conversion-rule>
- </modify-argument>
-
- <modify-argument index="3">
- <replace-type modified-type="PySequence"/>
- <conversion-rule class="native">
- <insert-template name="qgraphicsitem_pysequence"/>
- </conversion-rule>
-
- <conversion-rule class="target">
- <insert-template name="qgraphicsitem_pyobject"/>
- </conversion-rule>
- </modify-argument>
-
- <modify-argument index="4">
- <replace-type modified-type="PySequence"/>
- <conversion-rule class="target">
- <insert-template name="qstyleoptiongraphicsitem_pyobject"/>
- </conversion-rule>
-
- <conversion-rule class="native">
- <insert-template name="pysequence_qstyleoptiongraphicsitem"/>
- </conversion-rule>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QInputDialog">
- <enum-type name="InputDialogOption"/>
- <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="8">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg"/>
- </inject-code>
- </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="7">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg"/>
- </inject-code>
- </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="5">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,arg,arg,arg,bool*,arg,arg"/>
- </inject-code>
- </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="6">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,arg,arg,arg,arg,bool*,arg"/>
- </inject-code>
- </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="8">
- <remove-default-expression/>
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg,arg"/>
- </inject-code>
- </modify-function>
- </object-type>
-
- <object-type name="QGraphicsScene">
- <extra-includes>
- <include file-name="QVarLengthArray" location="global"/>
- </extra-includes>
- <enum-type name="ItemIndexMethod"/>
- <enum-type name="SceneLayer" flags="SceneLayers"/>
-
- <!-- Qt5: note: this was called 'obsolete'. Is that true? -->
- <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[],QWidget*)" remove="all"/>
-
- <modify-function signature="createItemGroup(const QList&lt;QGraphicsItem*&gt;&amp;)">
- <modify-argument index="1">
- <parent index="return" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="destroyItemGroup(QGraphicsItemGroup*)">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-destroyitemgroup"/>
- </modify-function>
-
- <modify-function signature="contextMenuEvent(QGraphicsSceneContextMenuEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragEnterEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragLeaveEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dragMoveEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawBackground(QPainter*,QRectF)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="drawForeground(QPainter*,QRectF)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="dropEvent(QGraphicsSceneDragDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="focusInEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="focusOutEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="helpEvent(QGraphicsSceneHelpEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="keyPressEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="keyReleaseEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseDoubleClickEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseMoveEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mousePressEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="mouseReleaseEvent(QGraphicsSceneMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="wheelEvent(QGraphicsSceneWheelEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="addItem(QGraphicsItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addEllipse(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addEllipse(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addLine(const QLineF&amp;,const QPen&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addLine(qreal,qreal,qreal,qreal,const QPen&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addPath(const QPainterPath&amp;,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addPixmap(const QPixmap&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addPolygon(const QPolygonF&amp;,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRect(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRect(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addText(const QString&amp;,const QFont&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addSimpleText(const QString&amp;,const QFont&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="addWidget(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
- <!-- TODO: Add a keeper attribute to reference-count tag to do what this inject code do. -->
- <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-addwidget"/>
- </modify-function>
-
- <modify-function signature="clear()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-clear"/>
- </modify-function>
-
- <modify-function signature="removeItem(QGraphicsItem*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setFocusItem(QGraphicsItem*,Qt::FocusReason)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QCalendarWidget">
- <enum-type name="HorizontalHeaderFormat"/>
- <enum-type name="SelectionMode"/>
- <enum-type name="VerticalHeaderFormat"/>
- <extra-includes>
- <include file-name="QTextCharFormat" location="global"/>
- </extra-includes>
- <modify-function signature="paintCell(QPainter*,QRect,QDate)const">
- <modify-argument invalidate-after-use="yes" index="1"/>
- </modify-function>
- </object-type>
- <object-type name="QTreeWidget">
- <modify-function signature="mimeData(const QList&lt;QTreeWidgetItem*&gt;&amp;)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemWidget(QTreeWidgetItem*,int,QWidget*)" allow-thread="yes">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="dropMimeData(QTreeWidgetItem*,int,const QMimeData*,Qt::DropAction)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="addTopLevelItem(QTreeWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addTopLevelItems(const QList&lt;QTreeWidgetItem*&gt; &amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addTopLevelItem(QTreeWidgetItem*)">
- <modify-argument index="1">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTopLevelItem(int,QTreeWidgetItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTopLevelItems(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setHeaderItem(QTreeWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeTopLevelItem(int)">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="clear()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qtreewidget-clear"/>
- </modify-function>
- <modify-function signature="removeItemWidget(QTreeWidgetItem*,int)" allow-thread="yes"/>
- </object-type>
- <object-type name="QAbstractItemDelegate">
- <enum-type name="EndEditHint"/>
- <modify-function signature="paint(QPainter*,QStyleOptionViewItem,QModelIndex)const">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="editorEvent(QEvent*,QAbstractItemModel*,QStyleOptionViewItem,QModelIndex)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="createEditor(QWidget*,QStyleOptionViewItem,QModelIndex)const">
- <modify-argument index="1">
- <define-ownership owner="c++"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)" allow-thread="yes"/>
- </object-type>
- <object-type name="QTableWidgetItem" >
- <enum-type name="ItemType"/>
- <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QListWidgetItem" >
- <enum-type name="ItemType"/>
- <modify-function signature="QListWidgetItem(const QString&amp;,QListWidget*,int)">
- <modify-argument index="this">
- <parent index="2" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QListWidgetItem(const QIcon&amp;,const QString&amp;,QListWidget*,int)">
- <modify-argument index="this">
- <parent index="3" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QListWidgetItem(QListWidget*,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="listWidget()const">
- <modify-argument index="return">
- <define-ownership owner="target"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsTextItem">
- <!-- a QObject so main-thread delete redundant -->
- <extra-includes>
- <include file-name="QTextCursor" location="global"/>
- </extra-includes>
- <modify-function signature="setDocument(QTextDocument*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QCompleter">
- <enum-type name="CompletionMode"/>
- <enum-type name="ModelSorting"/>
- <modify-function signature="setModel(QAbstractItemModel*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setPopup(QAbstractItemView*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setWidget(QWidget*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QTreeWidgetItem" hash-function="qHash">
- <enum-type name="ChildIndicatorPolicy"/>
- <enum-type name="ItemType"/>
- <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*,const QStringList&amp;,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidget*,QTreeWidgetItem*,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,const QStringList &amp;,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,QTreeWidgetItem*,int)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addChild(QTreeWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addChildren(const QList&lt;QTreeWidgetItem*&gt; &amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertChild(int,QTreeWidgetItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertChildren(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeChild(QTreeWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeChild(int)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeChildren()">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="parent()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitem"/>
- </modify-function>
- <modify-function signature="treeWidget()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitem"/>
- </modify-function>
-
- </object-type>
- <object-type name="QListWidget">
- <modify-function signature="mimeData(const QList&lt;QListWidgetItem*&gt;&amp;)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemWidget(QListWidgetItem*,QWidget*)" allow-thread="yes">
- <modify-argument index="2">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addItem(QListWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItem(int,QListWidgetItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeItem(int)">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="clear()">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlistwidget-clear"/>
- </modify-function>
- <modify-function signature="removeItemWidget(QListWidgetItem*)" allow-thread="yes"/>
- </object-type>
-
- <object-type name="QWidget" delete-in-main-thread="true">
- <!-- see QWindow::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
- <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
- <modify-argument index="3">
- <remove-argument/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion_variables"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- <conversion-rule class="native">
- <insert-template name="return_native_eventfilter_conversion"/>
- </conversion-rule>
- </modify-argument>
- <inject-code position="end">
- <insert-template name="return_native_eventfilter"/>
- </inject-code>
- </modify-function>
-
- <extra-includes>
- <include file-name="QIcon" location="global"/>
- <include file-name="QMessageBox" location="global"/>
- </extra-includes>
-
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-glue"/>
-
- <enum-type name="RenderFlag" flags="RenderFlags"/>
-
- <modify-function signature="setParent(QWidget*)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="parentWidget()const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="actionEvent(QActionEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="changeEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="closeEvent(QCloseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="contextMenuEvent(QContextMenuEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="dragEnterEvent(QDragEnterEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="dragLeaveEvent(QDragLeaveEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="dragMoveEvent(QDragMoveEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="dropEvent(QDropEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="enterEvent(QEnterEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="focusInEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="focusOutEvent(QFocusEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="hideEvent(QHideEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="keyPressEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="keyReleaseEvent(QKeyEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="leaveEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="mouseDoubleClickEvent(QMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="mouseMoveEvent(QMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="mousePressEvent(QMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="mouseReleaseEvent(QMouseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="moveEvent(QMoveEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="paintEvent(QPaintEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="resizeEvent(QResizeEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="showEvent(QShowEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="tabletEvent(QTabletEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="wheelEvent(QWheelEvent*)">
- <modify-argument index="1" invalidate-after-use="yes">
- <rename to="event"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setStyle(QStyle*)">
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qwidget-setstyle"/>
- </modify-function>
- <modify-function signature="style()const">
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qwidget-style"/>
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="render(QPainter*,QPoint,QRegion,QFlags&lt;QWidget::RenderFlag&gt;)">
- <modify-argument index="2">
- <!-- Removed because the render(QPainter*) overload conflicts with the identical function in QGraphicsView -->
- <remove-default-expression/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setFocusProxy(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="insertAction(QAction*,QAction*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setLayout(QLayout*)" allow-thread="yes">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-setlayout"/>
- </modify-function>
- <modify-function signature="raise()" rename="raise_"/>
- <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType>)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="window()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QMessageBox">
- <enum-type name="ButtonRole"/>
- <enum-type name="Icon"/>
- <enum-type name="StandardButton" flags="StandardButtons"/>
- <modify-function signature="removeButton(QAbstractButton*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <extra-includes>
- <include file-name="QPixmap" location="global"/>
- </extra-includes>
-
- <modify-function signature="critical(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;,QFlags&lt;QMessageBox::StandardButton&gt;,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="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,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"/>
- <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
- <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
- <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
- <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
- <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
- <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
- <modify-function signature="about(QWidget*,const QString&amp;,const QString&amp;)" allow-thread="yes"/>
- <modify-function signature="aboutQt(QWidget*,const QString&amp;)" allow-thread="yes"/>
- </object-type>
- <object-type name="QAbstractSpinBox">
- <enum-type name="ButtonSymbols"/>
- <enum-type name="CorrectionMode"/>
- <enum-type name="StepEnabledFlag" flags="StepEnabled"/>
- <enum-type name="StepType" since="5.12"/>
- <modify-function signature="setLineEdit(QLineEdit*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="fixup(QString &amp;)const">
- <modify-argument index="return">
- <replace-type modified-type="QString"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qstring-return"/>
- </modify-function>
- <modify-function signature="validate(QString &amp;,int &amp;)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- <conversion-rule class="native">
- <insert-template name="validator_conversionrule"/>
- </conversion-rule>
- </modify-argument>
- <inject-code class="target" position="end">
- <insert-template name="return_tuple_QValidator_QString_int"/>
- </inject-code>
- </modify-function>
- </object-type>
-
- <object-type name="QTabWidget">
- <enum-type name="TabPosition"/>
- <enum-type name="TabShape"/>
- <modify-function signature="addTab(QWidget*,const QString&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addTab(QWidget*,const QIcon&amp;,const QString&amp;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTab(int,QWidget*,const QIcon&amp;,const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertTab(int,QWidget*,const QString&amp;)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCornerWidget(QWidget*,Qt::Corner)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setTabBar(QTabBar*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <!-- This function need be re-implemented in inject code -->
- <modify-function signature="removeTab(int)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtabwidget-removetab"/>
- </modify-function>
- <modify-function signature="clear()">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtabwidget-clear"/>
- </modify-function>
- </object-type>
- <object-type name="QDateTimeEdit">
- <enum-type name="Section" flags="Sections"/>
- <modify-function signature="setCalendarWidget(QCalendarWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QSlider">
- <enum-type name="TickPosition"/>
- </object-type>
- <object-type name="QProgressDialog">
- <modify-function signature="setBar(QProgressBar*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setLabel(QLabel*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCancelButton(QPushButton*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QLabel">
- <modify-function signature="setBuddy(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="pixmap(Qt::ReturnByValueConstant)const" remove="all"/>
- <modify-function signature="picture(Qt::ReturnByValueConstant)const" remove="all"/>
- <modify-function signature="setMovie(QMovie *)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QFileDialog">
- <enum-type name="AcceptMode"/>
- <enum-type name="DialogLabel"/>
- <enum-type name="FileMode"/>
- <enum-type name="Option" flags="Options"/>
- <enum-type name="ViewMode"/>
- <extra-includes>
- <include file-name="QUrl" location="global"/>
- <include file-name="QAbstractProxyModel" location="global"/>
- </extra-includes>
- <modify-function signature="setIconProvider(QAbstractFileIconProvider*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
-
- <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">
- <replace-type modified-type="(fileName, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <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">
- <replace-type modified-type="(fileNames, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
- </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">
- <replace-type modified-type="(fileName, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
- </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">
- <replace-type modified-type="(fileName, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
- </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">
- <replace-type modified-type="(fileName, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
- </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">
- <replace-type modified-type="(fileName, selectedFilter)"/>
- </modify-argument>
- <modify-argument index="5">
- <replace-type modified-type="QString"/>
- <replace-default-expression with="QString()"/>
- </modify-argument>
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
- </modify-function>
-
- </object-type>
-
- <object-type name="QErrorMessage"/>
- <object-type name="QTabBar">
- <extra-includes>
- <include file-name="QIcon" location="global"/>
- </extra-includes>
- <enum-type name="Shape"/>
- <enum-type name="SelectionBehavior"/>
- <enum-type name="ButtonPosition"/>
- </object-type>
- <object-type name="QRadioButton"/>
- <object-type name="QScrollBar"/>
- <object-type name="QAbstractScrollArea">
- <enum-type name="SizeAdjustPolicy"/>
- <modify-function signature="setViewport(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addScrollBarWidget(QWidget*,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCornerWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setHorizontalScrollBar(QScrollBar*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setVerticalScrollBar(QScrollBar*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setViewport(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setupViewport(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="viewportEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QRubberBand">
- <enum-type name="Shape"/>
- <modify-function signature="QRubberBand(QRubberBand::Shape,QWidget*)">
- <modify-argument index="this">
- <parent index="2" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <rename to="parent"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QTableWidget">
- <modify-function signature="mimeData(const QList&lt;QTableWidgetItem*&gt;&amp;)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setHorizontalHeaderItem(int,QTableWidgetItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItem(int,int,QTableWidgetItem*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeHorizontalHeaderItem(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeVerticalHeaderItem(int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="takeItem(int,int)">
- <modify-argument index="return">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemPrototype(const QTableWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setVerticalHeaderItem(int,QTableWidgetItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCellWidget(int,int,QWidget*)" allow-thread="yes">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeCellWidget(int,int)" allow-thread="yes"/>
- <modify-function signature="setCurrentItem(QTableWidgetItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCurrentItem(QTableWidgetItem*,QFlags&lt;QItemSelectionModel::SelectionFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QSplitter">
- <modify-function signature="getRange(int,int*,int*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <modify-argument index="2">
- <remove-argument/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_args,number*,number*">
- <replace from="$TYPE" to="int"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="addWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertWidget(int,QWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGroupBox">
- <modify-function signature="clicked(bool)" allow-thread="yes"/>
- </object-type>
- <object-type name="QStackedWidget">
- <modify-function signature="addWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertWidget(int,QWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setCurrentWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QSplitterHandle"/>
- <object-type name="QDial"/>
- <object-type name="QKeySequenceEdit"/>
- <object-type name="QLineEdit">
- <enum-type name="ActionPosition"/>
- <enum-type name="EchoMode"/>
- <modify-function signature="setCompleter(QCompleter*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setValidator(const QValidator*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="del()" rename="del_"/>
-
- <add-function signature="addAction(QAction*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlineedit-addaction"/>
- </add-function>
-
- </object-type>
- <object-type name="QLCDNumber">
- <enum-type name="Mode"/>
- <enum-type name="SegmentStyle"/>
- </object-type>
- <object-type name="QSplashScreen">
- <!-- Override QWidget.painter -->
- <modify-function signature="repaint()" remove="all"/>
- <modify-function signature="drawContents(QPainter*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QDockWidget">
- <enum-type name="DockWidgetFeature" flags="DockWidgetFeatures"/>
- <modify-function signature="setTitleBarWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QFrame">
- <enum-type name="Shadow"/>
- <enum-type name="Shape"/>
- <enum-type name="StyleMask"/>
- </object-type>
- <object-type name="QSpinBox">
- <modify-function signature="valueChanged(int)">
- <inject-documentation mode="append" format="target">
-::
-
- def callback_int(value_as_int):
- print 'int value changed:', repr(value_as_int)
-
- app = QApplication(sys.argv)
- spinbox = QSpinBox()
- spinbox.valueChanged[unicode].connect(callback_unicode)
- spinbox.show()
- sys.exit(app.exec_())
- </inject-documentation>
- </modify-function>
- <modify-function signature="textChanged(QString)">
- <inject-documentation mode="append" format="target">
-::
-
- def callback_unicode(value_as_unicode):
- print 'unicode value changed:', repr(value_as_unicode)
-
- app = QApplication(sys.argv)
- spinbox = QSpinBox()
- spinbox.valueChanged[unicode].connect(callback_unicode)
- spinbox.show()
- sys.exit(app.exec_())
- </inject-documentation>
- </modify-function>
- </object-type>
- <object-type name="QTextBrowser"/>
- <object-type name="QDoubleSpinBox"/>
- <object-type name="QButtonGroup">
- <modify-function signature="addButton(QAbstractButton*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeButton(QAbstractButton*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setId(QAbstractButton*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QToolBar">
- <modify-function signature="addAction(QIcon,QString,const QObject*,const char*)">
- <modify-argument index="3">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-1"/>
- </modify-function>
- <modify-function signature="addAction(QString,const QObject*,const char*)">
- <modify-argument index="2">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument />
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-2"/>
- </modify-function>
- <modify-function signature="addAction(const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addAction(const QIcon&amp;,const QString&amp;)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <add-function signature="addAction(QAction*)">
- <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-3"/>
- </add-function>
- <modify-function signature="addSeparator()">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addWidget(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertWidget(QAction*,QWidget*)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertSeparator(QAction*)">
- <modify-argument index="return">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="clear()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-clear"/>
- </modify-function>
- </object-type>
- <object-type name="QComboBox">
- <enum-type name="InsertPolicy"/>
- <enum-type name="SizeAdjustPolicy"/>
- <modify-function signature="setCompleter(QCompleter*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setValidator(const QValidator*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setView(QAbstractItemView*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setLineEdit(QLineEdit*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setModel(QAbstractItemModel*)">
- <modify-argument index="1">
- <no-null-pointer/>
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QTextEdit">
- <enum-type name="AutoFormattingFlag" flags="AutoFormatting"/>
- <enum-type name="LineWrapMode"/>
- <value-type name="ExtraSelection" >
- <include file-name="QTextEdit" location="global"/>
- </value-type>
- <extra-includes>
- <include file-name="QTextCursor" location="global"/>
- </extra-includes>
- <modify-function signature="createMimeDataFromSelection() const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setDocument(QTextDocument*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertFromMimeData(const QMimeData*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
- </object-type>
-
- <object-type name="QApplication">
- <extra-includes>
- <include file-name="QBasicTimer" location="global"/>
- <include file-name="QFont" location="global"/>
- <include file-name="QFontMetrics" location="global"/>
- <include file-name="QPalette" location="global"/>
- <include file-name="QIcon" location="global"/>
- <include file-name="QLocale" location="global"/>
- <include file-name="QStyle" location="global"/>
- </extra-includes>
- <modify-function signature="QApplication(int&amp;,char**,int)" access="private"/>
- <add-function signature="QApplication(QStringList)">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qapplication-1"/>
- </add-function>
- <add-function signature="QApplication()">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qapplication-2"/>
- </add-function>
- <modify-function signature="setStyle(QStyle*)">
- <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qapplication-setStyle"/>
- </modify-function>
- <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
- <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes"/>
- <modify-function signature="alert(QWidget*,int)" allow-thread="yes"/>
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qapplication-init"/>
- </object-type>
-
- <object-type name="QCommandLinkButton"/>
- <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"/>
- <modify-function signature="setIconProvider(QAbstractFileIconProvider*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QFormLayout">
- <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
-
- <enum-type name="FieldGrowthPolicy"/>
- <enum-type name="ItemRole"/>
- <enum-type name="RowWrapPolicy"/>
-
-
- <modify-function signature="getLayoutPosition(QLayout*,int*,QFormLayout::ItemRole*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
- </modify-function>
- <modify-function signature="getWidgetPosition(QWidget*,int*,QFormLayout::ItemRole*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
- </modify-function>
- <modify-function signature="getItemPosition(int,int*,QFormLayout::ItemRole*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
- </modify-function>
-
- <modify-function signature="addRow(QWidget*,QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QLayout*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QWidget*,QLayout*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QString,QLayout*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addRow(QString,QWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QLayout*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QWidget*,QLayout*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QWidget*,QWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QWidget*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QString,QLayout*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertRow(int,QString,QWidget*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setLayout(int,QFormLayout::ItemRole,QLayout*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setWidget(int,QFormLayout::ItemRole,QWidget*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setItem(int,QFormLayout::ItemRole,QLayoutItem*)">
- <modify-argument index="3">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsGridLayout" >
- <modify-function signature="addItem(QGraphicsLayoutItem*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="addItem(QGraphicsLayoutItem*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAlignment(QGraphicsLayoutItem*,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsLayout">
- <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- <inject-code class="native" position="end">
- <insert-template name="fix_native_return_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="widgetEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsLayoutItem" copyable="false">
- <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="0">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- <inject-code class="native" position="end">
- <insert-template name="fix_native_return_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="setParentLayoutItem(QGraphicsLayoutItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsLinearLayout" >
- <modify-function signature="addItem(QGraphicsLayoutItem*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertItem(int,QGraphicsLayoutItem*)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="removeItem(QGraphicsLayoutItem*)">
- <modify-argument index="1">
- <parent index="this" action="remove"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setAlignment(QGraphicsLayoutItem*,QFlags&lt;Qt::AlignmentFlag&gt;)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setStretchFactor(QGraphicsLayoutItem*,int)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QGraphicsProxyWidget">
- <modify-function signature="QGraphicsProxyWidget(QGraphicsItem*,QFlags&lt;Qt::WindowType&gt;)">
- <modify-argument index="this">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="createProxyForChildWidget(QWidget*)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="newProxyWidget(const QWidget*)">
- <modify-argument index="return">
- <parent index="1" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setWidget(QWidget*)" allow-thread="yes">
- <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsproxywidget-setwidget"/>
- </modify-function>
- </object-type>
- <!-- a QObject so main-thread delete redundant -->
- <object-type name="QGraphicsWidget">
- <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
-
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="getWindowFrameMargins(qreal*,qreal*,qreal*,qreal*)const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </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>
- <modify-argument index="4">
- <remove-argument/>
- </modify-argument>
-
- <inject-code class="target" position="beginning">
- <insert-template name="fix_number*,number*,number*,number*">
- <replace from="$TYPE" to="qreal"/>
- </insert-template>
- </inject-code>
- </modify-function>
- <modify-function signature="setLayout(QGraphicsLayout*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="changeEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="closeEvent(QCloseEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="grabKeyboardEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="grabMouseEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="hideEvent(QHideEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="moveEvent(QGraphicsSceneMoveEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="paintWindowFrame(QPainter*,const QStyleOptionGraphicsItem*,QWidget*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="resizeEvent(QGraphicsSceneResizeEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="showEvent(QShowEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="ungrabKeyboardEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="ungrabMouseEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="windowFrameEvent(QEvent*)">
- <modify-argument index="1" invalidate-after-use="yes"/>
- </modify-function>
- <modify-function signature="setStyle(QStyle*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setTabOrder(QGraphicsWidget*,QGraphicsWidget*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
- <object-type name="QPlainTextDocumentLayout"/>
- <object-type name="QPlainTextEdit">
- <enum-type name="LineWrapMode"/>
- <modify-function signature="createMimeDataFromSelection() const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setDocument(QTextDocument*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="insertFromMimeData(const QMimeData*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
- </object-type>
- <object-type name="QStyledItemDelegate">
- <modify-function signature="setItemEditorFactory(QItemEditorFactory*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setEditorData(QWidget*,QModelIndex)const">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="setModelData(QWidget*,QAbstractItemModel*,QModelIndex)const">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QGesture" since="4.6">
- <enum-type name="GestureCancelPolicy"/>
- </object-type>
- <object-type name="QGestureRecognizer" since="4.6">
- <enum-type name="ResultFlag" flags="Result"/>
- </object-type>
- <object-type name="QTapAndHoldGesture" since="4.6"/>
- <object-type name="QTapGesture" since="4.6"/>
- <object-type name="QGraphicsAnchor" since="4.6"/>
- <object-type name="QGraphicsAnchorLayout" since="4.6"/>
- <object-type name="QGraphicsBlurEffect" since="4.6">
- <enum-type name="BlurHint" flags="BlurHints"/>
- </object-type>
- <object-type name="QGraphicsColorizeEffect" since="4.6"/>
- <object-type name="QGraphicsDropShadowEffect" since="4.6"/>
-
- <object-type name="QGraphicsEffect" since="4.6">
- <enum-type name="ChangeFlag" flags="ChangeFlags"/>
- <enum-type name="PixmapPadMode"/>
- </object-type>
-
- <object-type name="QGraphicsObject" since="4.6" default-superclass="QGraphicsItem"/>
- <object-type name="QGraphicsOpacityEffect" since="4.6"/>
- <object-type name="QGraphicsRotation" since="4.6"/>
- <object-type name="QGraphicsScale" since="4.6"/>
- <object-type name="QGraphicsTransform" since="4.6"/>
- <object-type name="QPanGesture" since="4.6"/>
- <object-type name="QPinchGesture" since="4.6">
- <enum-type name="ChangeFlag" flags="ChangeFlags"/>
- </object-type>
- <object-type name="QSwipeGesture" since="4.6">
- <enum-type name="SwipeDirection"/>
- </object-type>
-
- <value-type name="QTileRules" since="4.6"/>
-
- <object-type name="QScroller">
- <enum-type name="State"/>
- <enum-type name="ScrollerGestureType"/>
- <enum-type name="Input"/>
- </object-type>
- <value-type name="QScrollerProperties">
- <enum-type name="OvershootPolicy"/>
- <enum-type name="FrameRates"/>
- <enum-type name="ScrollMetric"/>
- </value-type>
-
- <object-type name="QSizeGrip"/>
-
- <object-type name="QSystemTrayIcon">
- <enum-type name="ActivationReason"/>
- <enum-type name="MessageIcon"/>
- <modify-function signature="setContextMenu(QMenu*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <!-- 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"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml
deleted file mode 100644
index af607ce1e..000000000
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_mac.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWidgets">
- <rejection class="*" function-name="qt_mac_set_cursor"/>
- <rejection class="*" function-name="macMenu"/>
-
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
- <!-- Qt5: internal
- <object-type name="QMacStyle" >
- <enum-type name="FocusRectPolicy"/>
- <enum-type name="WidgetSizePolicy"/>
- </object-type>
- -->
- <rejection class="QWidget" function-name="macCGHandle"/>
- <rejection class="QWidget" function-name="macQDHandle"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_win.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_win.xml
deleted file mode 100644
index 4c51907fe..000000000
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_win.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWidgets"/>
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_x11.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_x11.xml
deleted file mode 100644
index 4c51907fe..000000000
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_x11.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWidgets"/>
diff --git a/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt b/sources/pyside2/PySide2/QtWinExtras/CMakeLists.txt
deleted file mode 100644
index 6c877dfe4..000000000
--- a/sources/pyside2/PySide2/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 pyside2
- ${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/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml b/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml
deleted file mode 100644
index 69c90dd34..000000000
--- a/sources/pyside2/PySide2/QtWinExtras/typesystem_winextras.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtWinExtras">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
- <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
-
- <namespace-type name="QtWin">
- <enum-type name="HBitmapFormat"/>
- <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/pyside2/PySide2/QtX11Extras/CMakeLists.txt b/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt
deleted file mode 100644
index 9008da747..000000000
--- a/sources/pyside2/PySide2/QtX11Extras/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-project(QtX11Extras)
-
-set(QtX11Extras_SRC
-${QtX11Extras_GEN_DIR}/qx11info_wrapper.cpp
-# module is always needed
-${QtX11Extras_GEN_DIR}/qtx11extras_module_wrapper.cpp
-)
-
-configure_file("${QtX11Extras_SOURCE_DIR}/QtX11Extras_global.post.h.in"
- "${QtX11Extras_BINARY_DIR}/QtX11Extras_global.post.h" @ONLY)
-
-set(QtX11Extras_include_dirs ${QtX11Extras_SOURCE_DIR}
- ${QtX11Extras_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}X11Extras_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${libpyside_SOURCE_DIR})
-
-set(QtX11Extras_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}X11Extras_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
-
-set(QtX11Extras_deps QtCore QtGui)
-
-create_pyside_module(NAME QtX11Extras
- INCLUDE_DIRS QtX11Extras_include_dirs
- LIBRARIES QtX11Extras_libraries
- DEPS QtX11Extras_deps
- TYPESYSTEM_PATH QtX11Extras_SOURCE_DIR
- SOURCES QtX11Extras_SRC)
diff --git a/sources/pyside2/PySide2/QtX11Extras/typesystem_x11extras.xml b/sources/pyside2/PySide2/QtX11Extras/typesystem_x11extras.xml
deleted file mode 100644
index 73fc2b77c..000000000
--- a/sources/pyside2/PySide2/QtX11Extras/typesystem_x11extras.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Mateusz Skowroński <skowri@gmail.com>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtX11Extras">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
-
- <object-type name="QX11Info">
- <enum-type name="PeekOption" flags="PeekOptions" since="5.10"/>
- </object-type>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtXml/CMakeLists.txt b/sources/pyside2/PySide2/QtXml/CMakeLists.txt
deleted file mode 100644
index e7b22ca2b..000000000
--- a/sources/pyside2/PySide2/QtXml/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-project(QtXml)
-
-set(QtXml_SRC
-${QtXml_GEN_DIR}/qdomattr_wrapper.cpp
-${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}/qdomdocumentfragment_wrapper.cpp
-${QtXml_GEN_DIR}/qdomdocumenttype_wrapper.cpp
-${QtXml_GEN_DIR}/qdomelement_wrapper.cpp
-${QtXml_GEN_DIR}/qdomentity_wrapper.cpp
-${QtXml_GEN_DIR}/qdomentityreference_wrapper.cpp
-${QtXml_GEN_DIR}/qdomimplementation_wrapper.cpp
-${QtXml_GEN_DIR}/qdomnamednodemap_wrapper.cpp
-${QtXml_GEN_DIR}/qdomnode_wrapper.cpp
-${QtXml_GEN_DIR}/qdomnodelist_wrapper.cpp
-${QtXml_GEN_DIR}/qdomnotation_wrapper.cpp
-${QtXml_GEN_DIR}/qdomprocessinginstruction_wrapper.cpp
-${QtXml_GEN_DIR}/qdomtext_wrapper.cpp
-# module is always needed
-${QtXml_GEN_DIR}/qtxml_module_wrapper.cpp
-)
-
-set(QtXml_include_dirs ${QtXml_SOURCE_DIR}
- ${QtXml_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Xml_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtXml_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}Xml_LIBRARIES})
-set(QtXml_deps QtCore)
-
-create_pyside_module(NAME QtXml
- INCLUDE_DIRS QtXml_include_dirs
- LIBRARIES QtXml_libraries
- DEPS QtXml_deps
- TYPESYSTEM_PATH QtXml_SOURCE_DIR
- SOURCES QtXml_SRC)
diff --git a/sources/pyside2/PySide2/QtXml/typesystem_xml.xml b/sources/pyside2/PySide2/QtXml/typesystem_xml.xml
deleted file mode 100644
index 8da1664d5..000000000
--- a/sources/pyside2/PySide2/QtXml/typesystem_xml.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide2.QtXml">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no" />
- <load-typesystem name="templates/core_common.xml" generate="no" />
- <load-typesystem name="templates/xml_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"/>
- <value-type name="QDomCharacterData"/>
- <value-type name="QDomComment"/>
-
-
- <value-type name="QDomDocument">
- <!-- will be replaced in inject code -->
- <modify-function signature="setContent(const QByteArray&amp;,bool,QString*,int*,int*)">
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- <modify-function signature="setContent(const QString&amp;,bool,QString*,int*,int*)">
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- <modify-function signature="setContent(QIODevice*,bool,QString*,int*,int*)">
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="5">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- <modify-function signature="setContent(const QByteArray&amp;,QString*,int*,int*)">
- <modify-argument index="2">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- <modify-function signature="setContent(QIODevice*,QString*,int*,int*)">
- <modify-argument index="2">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- <modify-function signature="setContent(const QString&amp;,QString*,int*,int*)">
- <modify-argument index="2">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="3">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="4">
- <remove-argument/>
- <remove-default-expression/>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
- </modify-argument>
- <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
- </modify-function>
- </value-type>
-
- <value-type name="QDomDocumentFragment"/>
- <value-type name="QDomDocumentType"/>
- <value-type name="QDomEntity"/>
- <value-type name="QDomEntityReference"/>
- <value-type name="QDomImplementation">
- <enum-type name="InvalidDataPolicy"/>
- </value-type>
-
- <value-type name="QDomNamedNodeMap"/>
-
- <value-type name="QDomNode">
- <enum-type name="EncodingPolicy"/>
- <enum-type name="NodeType"/>
- <modify-function signature="save(QTextStream&amp;,int,QDomNode::EncodingPolicy)const" allow-thread="yes"/>
- </value-type>
-
- <value-type name="QDomNodeList"/>
- <value-type name="QDomNotation"/>
- <value-type name="QDomProcessingInstruction"/>
-
- <value-type name="QDomText"/>
-
- <value-type name="QDomElement">
- <!-- PYSIDE-1372
- We will leave only one for int, and one for float since Python
- doesn't have other variations on the primitive types.
- Only 'qlonglong' and 'double' will be available from the Qt API.
- TODO: This will require a better review of the shiboken primitive
- types converters, since this situation might happen on
- different signatures.
- -->
- <modify-function signature="setAttribute(const QString&amp;, uint)" remove="all"/>
- <modify-function signature="setAttribute(const QString&amp;, float)" remove="all"/>
- <modify-function signature="setAttribute(const QString&amp;, int)" remove="all"/>
- <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/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
deleted file mode 100644
index f062c284a..000000000
--- a/sources/pyside2/PySide2/__init__.py.in
+++ /dev/null
@@ -1,108 +0,0 @@
-from __future__ import print_function
-import os
-import sys
-from textwrap import dedent
-
-__all__ = list("Qt" + body for body in
- "@all_module_shortnames@"
- .split(";"))
-__version__ = "@FINAL_PACKAGE_VERSION@"
-__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", "@BINDING_API_PRE_RELEASE_VERSION@")
-
-
-def _additional_dll_directories(package_dir):
- # Find shiboken6 relative to the package directory.
- root = os.path.dirname(package_dir)
- # Check for a flat .zip as deployed by cx_free(PYSIDE-1257)
- if root.endswith('.zip'):
- return []
- shiboken6 = os.path.join(root, 'shiboken6')
- if os.path.isdir(shiboken6): # Standard case, only shiboken6 is needed
- return [shiboken6]
- # The below code is for the build process when generate_pyi.py
- # is executed in the build directory. We need libpyside and Qt in addition.
- shiboken6 = os.path.join(os.path.dirname(root), 'shiboken6', 'libshiboken')
- if not os.path.isdir(shiboken6):
- raise ImportError(shiboken6 + ' does not exist')
- result = [shiboken6, os.path.join(root, 'libpyside')]
- for path in os.environ.get('PATH').split(';'):
- if path:
- if os.path.exists(os.path.join(path, 'qmake.exe')):
- result.append(path)
- break
- return result
-
-
-def _setupQtDirectories():
- # On Windows we need to explicitly import the shiboken6 module so
- # that the libshiboken.dll dependency is loaded by the time a
- # Qt module is imported. Otherwise due to PATH not containing
- # the shiboken6 module path, the Qt module import would fail
- # due to the missing libshiboken dll.
- # In addition, as of Python 3.8, the shiboken package directory
- # must be added to the DLL search paths so that shiboken6.dll
- # is found.
- # We need to do the same on Linux and macOS, because we do not
- # embed rpaths into the PySide2 libraries that would point to
- # the libshiboken library location. Importing the module
- # loads the libraries into the process memory beforehand, and
- # thus takes care of it for us.
-
- pyside_package_dir = os.path.abspath(os.path.dirname(__file__))
-
- if sys.platform == 'win32' and sys.version_info[0] == 3 and sys.version_info[1] >= 8:
- for dir in _additional_dll_directories(pyside_package_dir):
- os.add_dll_directory(dir)
-
- try:
- import shiboken6
- except Exception:
- paths = ', '.join(sys.path)
- print('PySide2/__init__.py: Unable to import shiboken6 from {}'.format(paths),
- 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:
- stars = 79 * "*"
- print(dedent(f'''\
- {stars}
- PySide2/__init__.py: The `signature` module was not initialized.
- This libshiboken module was loaded from
-
- "{shiboken6.__file__}".
-
- Please make sure that this is the real shiboken6 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
- # svg image plugin won't find Qt5Svg.dll).
- os.environ['PATH'] = pyside_package_dir + os.pathsep + os.environ['PATH']
-
- # On Windows, add the PySide2\openssl folder (created by setup.py's
- # --openssl option) to the PATH so that the SSL DLLs can be found
- # when Qt tries to dynamically load them. Tell Qt to load them and
- # then reset the PATH.
- openssl_dir = os.path.join(pyside_package_dir, 'openssl')
- if os.path.exists(openssl_dir):
- path = os.environ['PATH']
- try:
- os.environ['PATH'] = openssl_dir + os.pathsep + path
- try:
- from . import QtNetwork
- except ImportError:
- pass
- else:
- QtNetwork.QSslSocket.supportsSsl()
- finally:
- os.environ['PATH'] = path
-
-_setupQtDirectories()
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
deleted file mode 100644
index 996d46d43..000000000
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ /dev/null
@@ -1,1879 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*********************************************************************
- * INJECT CODE
- ********************************************************************/
-
-// @snippet include-pyside
-#include <pyside.h>
-#include <limits>
-// @snippet include-pyside
-
-// @snippet qsettings-value
-// If we enter the kwds, means that we have a defaultValue or
-// at least a type.
-// This avoids that we are passing '0' as defaultValue.
-// defaultValue can also be passed as positional argument,
-// not only as keyword.
-QVariant out;
-if (kwds || numArgs > 1) {
- Py_BEGIN_ALLOW_THREADS
- out = %CPPSELF.value(%1, %2);
- Py_END_ALLOW_THREADS
-} else {
- Py_BEGIN_ALLOW_THREADS
- out = %CPPSELF.value(%1);
- Py_END_ALLOW_THREADS
-}
-
-PyTypeObject *typeObj = reinterpret_cast<PyTypeObject*>(%PYARG_3);
-
-if (typeObj) {
- if (typeObj == &PyList_Type) {
- QByteArray out_ba = out.toByteArray();
- if (!out_ba.isEmpty()) {
- QByteArrayList valuesList = out_ba.split(',');
- const int valuesSize = valuesList.size();
- if (valuesSize > 0) {
- PyObject *list = PyList_New(valuesSize);
- for (int i = 0; i < valuesSize; i++) {
- PyObject *item = PyUnicode_FromString(valuesList[i].data());
- 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.data());
- } else if (typeObj == &PyUnicode_Type) {
- QByteArray asByteArray = out.toByteArray();
- %PYARG_0 = PyUnicode_FromString(asByteArray.data());
- } 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;
- }
- }
- // TODO: PyDict_Type and PyTuple_Type
-}
-else {
- if (!out.isValid()) {
- Py_INCREF(Py_None);
- %PYARG_0 = Py_None;
- } else {
- %PYARG_0 = %CONVERTTOPYTHON[QVariant](out);
- }
-}
-
-// @snippet qsettings-value
-
-// @snippet qvariant-conversion
-static QMetaType QVariant_resolveMetaType(PyTypeObject *type)
-{
- if (PyObject_TypeCheck(type, SbkObjectType_TypeF())) {
- auto sbkType = reinterpret_cast<SbkObjectType *>(type);
- const char *typeName = Shiboken::ObjectType::getOriginalName(sbkType);
- if (!typeName)
- return {};
- const bool valueType = '*' != typeName[qstrlen(typeName) - 1];
- // Do not convert user type of value
- if (valueType && Shiboken::ObjectType::isUserType(type))
- return {};
- QMetaType metaType = QMetaType::fromName(typeName);
- if (metaType.isValid())
- return metaType;
- // Do not resolve types to value type
- if (valueType)
- return {};
- // Find in base types. First check tp_bases, and only after check tp_base, because
- // tp_base does not always point to the first base class, but rather to the first
- // that has added any python fields or slots to its object layout.
- // See https://mail.python.org/pipermail/python-list/2009-January/520733.html
- if (type->tp_bases) {
- for (int i = 0, size = PyTuple_GET_SIZE(type->tp_bases); i < size; ++i) {
- auto baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(type->tp_bases, i));
- const QMetaType derived = QVariant_resolveMetaType(baseType);
- if (derived.isValid())
- return derived;
- }
- } else if (type->tp_base) {
- return QVariant_resolveMetaType(type->tp_base);
- }
- }
- return {};
-}
-static QVariant QVariant_convertToValueList(PyObject *list)
-{
- if (PySequence_Size(list) < 0) {
- // clear the error if < 0 which means no length at all
- PyErr_Clear();
- return QVariant();
- }
-
- Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
-
- const QMetaType metaType = QVariant_resolveMetaType(element.cast<PyTypeObject *>());
- if (metaType.isValid()) {
- QByteArray listTypeName("QList<");
- listTypeName += metaType.name();
- listTypeName += '>';
- QMetaType metaType = QMetaType::fromName(listTypeName);
- if (metaType.isValid()) {
- Shiboken::Conversions::SpecificConverter converter(listTypeName);
- if (converter) {
- QVariant var(metaType);
- converter.toCpp(list, &var);
- return var;
- }
- qWarning() << "Type converter for :" << listTypeName << "not registered.";
- }
- }
- return QVariant();
-}
-static bool QVariant_isStringList(PyObject *list)
-{
- if (!PySequence_Check(list)) {
- // If it is not a list or a derived list class
- // we assume that will not be a String list neither.
- return false;
- }
-
- if (PySequence_Size(list) < 0) {
- // clear the error if < 0 which means no length at all
- PyErr_Clear();
- return false;
- }
-
- Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
- const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
- for (Py_ssize_t i = 0; i < size; ++i) {
- PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i);
- if (!%CHECKTYPE[QString](item))
- return false;
- }
- return true;
-}
-static QVariant QVariant_convertToVariantMap(PyObject *map)
-{
- Py_ssize_t pos = 0;
- Shiboken::AutoDecRef keys(PyDict_Keys(map));
- if (!QVariant_isStringList(keys))
- return QVariant();
- PyObject *key;
- PyObject *value;
- QMap<QString,QVariant> ret;
- while (PyDict_Next(map, &pos, &key, &value)) {
- QString cppKey = %CONVERTTOCPP[QString](key);
- QVariant cppValue = %CONVERTTOCPP[QVariant](value);
- ret.insert(cppKey, cppValue);
- }
- return QVariant(ret);
-}
-static QVariant QVariant_convertToVariantList(PyObject *list)
-{
- if (QVariant_isStringList(list)) {
- QList<QString > lst = %CONVERTTOCPP[QList<QString>](list);
- return QVariant(QStringList(lst));
- }
- QVariant valueList = QVariant_convertToValueList(list);
- if (valueList.isValid())
- return valueList;
-
- if (PySequence_Size(list) < 0) {
- // clear the error if < 0 which means no length at all
- PyErr_Clear();
- return QVariant();
- }
-
- QList<QVariant> lst;
- Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
- const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
- for (Py_ssize_t i = 0; i < size; ++i) {
- PyObject *pyItem = PySequence_Fast_GET_ITEM(fast.object(), i);
- QVariant item = %CONVERTTOCPP[QVariant](pyItem);
- lst.append(item);
- }
- return QVariant(lst);
-}
-// @snippet qvariant-conversion
-
-// @snippet qvariantmap-check
-static bool QVariantType_isStringList(PyObject *list)
-{
- Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
- const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
- for (Py_ssize_t i=0; i < size; i++) {
- PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i);
- if (!%CHECKTYPE[QString](item))
- return false;
- }
- return true;
-}
-static bool QVariantType_checkAllStringKeys(PyObject *dict)
-{
- Shiboken::AutoDecRef keys(PyDict_Keys(dict));
- return QVariantType_isStringList(keys);
-}
-// @snippet qvariantmap-check
-
-// @snippet qt-qabs
-double _abs = qAbs(%1);
-%PYARG_0 = %CONVERTTOPYTHON[double](_abs);
-// @snippet qt-qabs
-
-// @snippet qt-postroutine
-namespace PySide {
-static QStack<PyObject *> globalPostRoutineFunctions;
-void globalPostRoutineCallback()
-{
- Shiboken::GilState state;
- for (auto *callback : globalPostRoutineFunctions) {
- Shiboken::AutoDecRef result(PyObject_CallObject(callback, nullptr));
- Py_DECREF(callback);
- }
- globalPostRoutineFunctions.clear();
-}
-void addPostRoutine(PyObject *callback)
-{
- if (PyCallable_Check(callback)) {
- globalPostRoutineFunctions << callback;
- Py_INCREF(callback);
- } else {
- PyErr_SetString(PyExc_TypeError, "qAddPostRoutine: The argument must be a callable object.");
- }
-}
-} // namespace
-// @snippet qt-postroutine
-
-// @snippet qt-addpostroutine
-PySide::addPostRoutine(%1);
-// @snippet qt-addpostroutine
-
-// @snippet qt-qaddpostroutine
-qAddPostRoutine(PySide::globalPostRoutineCallback);
-// @snippet qt-qaddpostroutine
-
-// @snippet qt-version
-QList<QByteArray> version = QByteArray(qVersion()).split('.');
-PyObject *pyQtVersion = PyTuple_New(3);
-for (int i = 0; i < 3; ++i)
- PyTuple_SET_ITEM(pyQtVersion, i, PyInt_FromLong(version[i].toInt()));
-PyModule_AddObject(module, "__version_info__", pyQtVersion);
-PyModule_AddStringConstant(module, "__version__", qVersion());
-// @snippet qt-version
-
-// @snippet qobject-connect
-static bool isDecorator(PyObject *method, PyObject *self)
-{
- Shiboken::AutoDecRef methodName(PyObject_GetAttr(method, Shiboken::PyMagicName::name()));
- if (!PyObject_HasAttr(self, methodName))
- return true;
- Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName));
- return PyMethod_GET_FUNCTION(otherMethod.object()) != PyMethod_GET_FUNCTION(method);
-}
-
-static bool getReceiver(QObject *source, const char *signal, PyObject *callback, QObject **receiver, PyObject **self, QByteArray *callbackSig)
-{
- bool forceGlobalReceiver = false;
- if (PyMethod_Check(callback)) {
- *self = PyMethod_GET_SELF(callback);
- if (%CHECKTYPE[QObject *](*self))
- *receiver = %CONVERTTOCPP[QObject *](*self);
- forceGlobalReceiver = isDecorator(callback, *self);
- } else if (PyCFunction_Check(callback)) {
- *self = PyCFunction_GET_SELF(callback);
- if (*self && %CHECKTYPE[QObject *](*self))
- *receiver = %CONVERTTOCPP[QObject *](*self);
- } else if (PyCallable_Check(callback)) {
- // Ok, just a callable object
- *receiver = nullptr;
- *self = nullptr;
- }
-
- bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
-
- // Check if this callback is a overwrite of a non-virtual Qt slot.
- if (!usingGlobalReceiver && receiver && self) {
- *callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toLatin1();
- const QMetaObject *metaObject = (*receiver)->metaObject();
- int slotIndex = metaObject->indexOfSlot(callbackSig->constData());
- if (slotIndex != -1 && slotIndex < metaObject->methodOffset() && PyMethod_Check(callback))
- usingGlobalReceiver = true;
- }
-
- const auto receiverThread = *receiver ? (*receiver)->thread() : nullptr;
-
- if (usingGlobalReceiver) {
- PySide::SignalManager &signalManager = PySide::SignalManager::instance();
- *receiver = signalManager.globalReceiver(source, callback);
- // PYSIDE-1354: Move the global receiver to the original receivers's thread
- // so that autoconnections work correctly.
- if (receiverThread && receiverThread != (*receiver)->thread())
- (*receiver)->moveToThread(receiverThread);
- *callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toLatin1();
- }
-
- return usingGlobalReceiver;
-}
-
-static bool qobjectConnect(QObject *source, const char *signal, QObject *receiver, const char *slot, Qt::ConnectionType type)
-{
- if (!signal || !slot)
- return false;
-
- if (!PySide::Signal::checkQtSignal(signal))
- return false;
- signal++;
-
- if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
- return false;
-
- bool isSignal = PySide::Signal::isQtSignal(slot);
- slot++;
- PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot);
- bool connection;
- connection = QObject::connect(source, signal - 1, receiver, slot - 1, type);
- return connection;
-}
-
-static bool qobjectConnect(QObject *source, QMetaMethod signal, QObject *receiver, QMetaMethod slot, Qt::ConnectionType type)
-{
- return qobjectConnect(source, signal.methodSignature(), receiver, slot.methodSignature(), type);
-}
-
-static bool qobjectConnectCallback(QObject *source, const char *signal, PyObject *callback, Qt::ConnectionType type)
-{
- if (!signal || !PySide::Signal::checkQtSignal(signal))
- return false;
- signal++;
-
- int signalIndex = PySide::SignalManager::registerMetaMethodGetIndex(source, signal, QMetaMethod::Signal);
- if (signalIndex == -1)
- return false;
-
- PySide::SignalManager &signalManager = PySide::SignalManager::instance();
-
- // Extract receiver from callback
- QObject *receiver = nullptr;
- PyObject *self = nullptr;
- QByteArray callbackSig;
- bool usingGlobalReceiver = getReceiver(source, signal, callback, &receiver, &self, &callbackSig);
- if (receiver == nullptr && self == nullptr)
- return false;
-
- const QMetaObject *metaObject = receiver->metaObject();
- const char *slot = callbackSig.constData();
- int slotIndex = metaObject->indexOfSlot(slot);
- QMetaMethod signalMethod = metaObject->method(signalIndex);
-
- if (slotIndex == -1) {
- if (!usingGlobalReceiver && self && !Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
- qWarning("You can't add dynamic slots on an object originated from C++.");
- if (usingGlobalReceiver)
- signalManager.releaseGlobalReceiver(source, receiver);
-
- return false;
- }
-
- if (usingGlobalReceiver)
- slotIndex = signalManager.globalReceiverSlotIndex(receiver, slot);
- else
- slotIndex = PySide::SignalManager::registerMetaMethodGetIndex(receiver, slot, QMetaMethod::Slot);
-
- if (slotIndex == -1) {
- if (usingGlobalReceiver)
- signalManager.releaseGlobalReceiver(source, receiver);
-
- return false;
- }
- }
- bool connection;
- connection = QMetaObject::connect(source, signalIndex, receiver, slotIndex, type);
- if (connection) {
- if (usingGlobalReceiver)
- signalManager.notifyGlobalReceiver(receiver);
- #ifndef AVOID_PROTECTED_HACK
- source->connectNotify(signalMethod); //Qt5: QMetaMethod instead of char *
- #else
- // Need to cast to QObjectWrapper * and call the public version of
- // connectNotify when avoiding the protected hack.
- reinterpret_cast<QObjectWrapper *>(source)->connectNotify(signalMethod); //Qt5: QMetaMethod instead of char *
- #endif
-
- return connection;
- }
-
- if (usingGlobalReceiver)
- signalManager.releaseGlobalReceiver(source, receiver);
-
- return false;
-}
-
-
-static bool qobjectDisconnectCallback(QObject *source, const char *signal, PyObject *callback)
-{
- if (!PySide::Signal::checkQtSignal(signal))
- return false;
-
- PySide::SignalManager &signalManager = PySide::SignalManager::instance();
-
- // Extract receiver from callback
- QObject *receiver = nullptr;
- PyObject *self = nullptr;
- QByteArray callbackSig;
- QMetaMethod slotMethod;
- bool usingGlobalReceiver = getReceiver(nullptr, signal, callback, &receiver, &self, &callbackSig);
- if (receiver == nullptr && self == nullptr)
- return false;
-
- const QMetaObject *metaObject = receiver->metaObject();
- int signalIndex = source->metaObject()->indexOfSignal(++signal);
- int slotIndex = -1;
-
- slotIndex = metaObject->indexOfSlot(callbackSig);
- slotMethod = metaObject->method(slotIndex);
-
- bool disconnected;
- disconnected = QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex);
-
- if (disconnected) {
- if (usingGlobalReceiver)
- signalManager.releaseGlobalReceiver(source, receiver);
-
- #ifndef AVOID_PROTECTED_HACK
- source->disconnectNotify(slotMethod); //Qt5: QMetaMethod instead of char *
- #else
- // Need to cast to QObjectWrapper * and call the public version of
- // connectNotify when avoiding the protected hack.
- reinterpret_cast<QObjectWrapper *>(source)->disconnectNotify(slotMethod); //Qt5: QMetaMethod instead of char *
- #endif
- return true;
- }
- return false;
-}
-// @snippet qobject-connect
-
-// @snippet qobject-connect-1
-// %FUNCTION_NAME() - disable generation of function call.
-bool %0 = qobjectConnect(%1, %2, %CPPSELF, %3, %4);
-%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
-// @snippet qobject-connect-1
-
-// @snippet qobject-connect-2
-// %FUNCTION_NAME() - disable generation of function call.
-bool %0 = qobjectConnect(%1, %2, %3, %4, %5);
-%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
-// @snippet qobject-connect-2
-
-// @snippet qobject-connect-3
-// %FUNCTION_NAME() - disable generation of function call.
-bool %0 = qobjectConnect(%1, %2, %3, %4, %5);
-%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
-// @snippet qobject-connect-3
-
-// @snippet qobject-connect-4
-// %FUNCTION_NAME() - disable generation of function call.
-%RETURN_TYPE %0 = qobjectConnectCallback(%1, %2, %PYARG_3, %4);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-connect-4
-
-// @snippet qobject-connect-5
-// %FUNCTION_NAME() - disable generation of function call.
-%RETURN_TYPE %0 = qobjectConnectCallback(%CPPSELF, %1, %PYARG_2, %3);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-connect-5
-
-// @snippet qobject-connect-6
-// %FUNCTION_NAME() - disable generation of function call.
-%RETURN_TYPE %0 = qobjectConnect(%CPPSELF, %1, %2, %3, %4);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-connect-6
-
-// @snippet qobject-emit
-%RETURN_TYPE %0 = PySide::SignalManager::instance().emitSignal(%CPPSELF, %1, %PYARG_2);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-emit
-
-// @snippet qobject-disconnect-1
-// %FUNCTION_NAME() - disable generation of function call.
-%RETURN_TYPE %0 = qobjectDisconnectCallback(%CPPSELF, %1, %2);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-disconnect-1
-
-// @snippet qobject-disconnect-2
-// %FUNCTION_NAME() - disable generation of function call.
-%RETURN_TYPE %0 = qobjectDisconnectCallback(%1, %2, %3);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-disconnect-2
-
-// @snippet qfatal
-// qFatal doesn't have a stream version, so we do a
-// qWarning call followed by a qFatal() call using a
-// literal.
-Py_BEGIN_ALLOW_THREADS
-qWarning() << %1;
-qFatal("[A qFatal() call was made from Python code]");
-Py_END_ALLOW_THREADS
-// @snippet qfatal
-
-// @snippet moduleshutdown
-PySide::runCleanupFunctions();
-// @snippet moduleshutdown
-
-// @snippet qt-qenum
-%PYARG_0 = PySide::QEnum::QEnumMacro(%1, false);
-// @snippet qt-qenum
-
-// @snippet qt-qflag
-%PYARG_0 = PySide::QEnum::QEnumMacro(%1, true);
-// @snippet qt-qflag
-
-// @snippet qt-init-feature
-PySide::Feature::init();
-// @snippet qt-init-feature
-
-// @snippet qt-pysideinit
-Shiboken::Conversions::registerConverterName(SbkPySide2_QtCoreTypeConverters[SBK_QSTRING_IDX], "unicode");
-Shiboken::Conversions::registerConverterName(SbkPySide2_QtCoreTypeConverters[SBK_QSTRING_IDX], "str");
-Shiboken::Conversions::registerConverterName(SbkPySide2_QtCoreTypeConverters[SBK_QTCORE_QLIST_QVARIANT_IDX], "QVariantList");
-Shiboken::Conversions::registerConverterName(SbkPySide2_QtCoreTypeConverters[SBK_QTCORE_QMAP_QSTRING_QVARIANT_IDX], "QVariantMap");
-
-PySide::registerInternalQtConf();
-PySide::init(module);
-Py_AtExit(QtCoreModuleExit);
-// @snippet qt-pysideinit
-
-// @snippet qt-messagehandler
-// Define a global variable to handle qInstallMessageHandler callback
-static PyObject *qtmsghandler = nullptr;
-
-static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, const QString &msg)
-{
- Shiboken::GilState state;
- Shiboken::AutoDecRef arglist(PyTuple_New(3));
- PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QtMsgType](type));
- PyTuple_SET_ITEM(arglist, 1, %CONVERTTOPYTHON[QMessageLogContext &](ctx));
- QByteArray array = msg.toUtf8(); // Python handler requires UTF-8
- char *data = array.data();
- PyTuple_SET_ITEM(arglist, 2, %CONVERTTOPYTHON[char *](data));
- Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));
-}
-static void QtCoreModuleExit()
-{
- PySide::SignalManager::instance().clear();
-}
-// @snippet qt-messagehandler
-
-// @snippet qt-installmessagehandler
-if (%PYARG_1 == Py_None) {
- qInstallMessageHandler(0);
- %PYARG_0 = qtmsghandler ? qtmsghandler : Py_None;
- qtmsghandler = 0;
-} else if (!PyCallable_Check(%PYARG_1)) {
- PyErr_SetString(PyExc_TypeError, "parameter must be callable");
-} else {
- %PYARG_0 = qtmsghandler ? qtmsghandler : Py_None;
- Py_INCREF(%PYARG_1);
- qtmsghandler = %PYARG_1;
- qInstallMessageHandler(msgHandlerCallback);
-}
-
-if (%PYARG_0 == Py_None)
- Py_INCREF(%PYARG_0);
-// @snippet qt-installmessagehandler
-
-// @snippet qline-hash
-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);
- }
-};
-// @snippet qline-hash
-
-// @snippet qlinef-intersect
-QPointF p;
-%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &p);
-%PYARG_0 = PyTuple_New(2);
-PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval));
-PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QPointF](p));
-// @snippet qlinef-intersect
-
-// @snippet qresource-data
-const void *d = %CPPSELF.%FUNCTION_NAME();
-if (d) {
- %PYARG_0 = Shiboken::Buffer::newObject(d, %CPPSELF.size());
-} else {
- Py_INCREF(Py_None);
- %PYARG_0 = Py_None;
-}
-// @snippet qresource-data
-
-// @snippet qdate-topython
-if (!PyDateTimeAPI)
- PyDateTime_IMPORT;
-%PYARG_0 = PyDate_FromDate(%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day());
-// @snippet qdate-topython
-
-// @snippet qdate-getdate
-int year, month, day;
-%CPPSELF.%FUNCTION_NAME(&year, &month, &day);
-%PYARG_0 = PyTuple_New(3);
-PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](year));
-PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](month));
-PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](day));
-// @snippet qdate-getdate
-
-// @snippet qdate-weeknumber
-int yearNumber;
-int week = %CPPSELF.%FUNCTION_NAME(&yearNumber);
-%PYARG_0 = PyTuple_New(2);
-PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](week));
-PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](yearNumber));
-// @snippet qdate-weeknumber
-
-// @snippet qdatetime-1
-QDate date(%1, %2, %3);
-QTime time(%4, %5, %6, %7);
-%0 = new %TYPE(date, time, Qt::TimeSpec(%8));
-// @snippet qdatetime-1
-
-// @snippet qdatetime-2
-QDate date(%1, %2, %3);
-QTime time(%4, %5, %6);
-%0 = new %TYPE(date, time);
-// @snippet qdatetime-2
-
-// @snippet qdatetime-topython
-QDate date = %CPPSELF.date();
-QTime time = %CPPSELF.time();
-if (!PyDateTimeAPI)
- PyDateTime_IMPORT;
-%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;
-%PYARG_0 = PyTime_FromTime(%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()*1000);
-// @snippet qtime-topython
-
-// @snippet qbitarray-len
-return %CPPSELF.size();
-// @snippet qbitarray-len
-
-// @snippet qbitarray-getitem
-if (_i < 0 || _i >= %CPPSELF.size()) {
- PyErr_SetString(PyExc_IndexError, "index out of bounds");
- return 0;
-}
-bool ret = %CPPSELF.at(_i);
-return %CONVERTTOPYTHON[bool](ret);
-// @snippet qbitarray-getitem
-
-// @snippet qbitarray-setitem
-PyObject *args = Py_BuildValue("(iiO)", _i, 1, _value);
-PyObject *result = Sbk_QBitArrayFunc_setBit(self, args);
-Py_DECREF(args);
-Py_XDECREF(result);
-return !result ? -1 : 0;
-// @snippet qbitarray-setitem
-
-// @snippet unlock
-%CPPSELF.unlock();
-// @snippet unlock
-
-// @snippet qabstractitemmodel-createindex
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, %PYARG_3);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qabstractitemmodel-createindex
-
-// @snippet qabstractitemmodel
-qRegisterMetaType<QVector<int> >("QVector<int>");
-// @snippet qabstractitemmodel
-
-// @snippet qobject-metaobject
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME();
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qobject-metaobject
-
-// @snippet qobject-findchild-1
-static QObject *_findChildHelper(const QObject *parent, const QString &name, PyTypeObject *desiredType)
-{
- for (auto *child : parent->children()) {
- Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
- if (PyType_IsSubtype(Py_TYPE(pyChild), desiredType)
- && (name.isNull() || name == child->objectName())) {
- return child;
- }
- }
-
- for (auto *child : parent->children()) {
- QObject *obj = _findChildHelper(child, name, desiredType);
- if (obj)
- return obj;
- }
- return nullptr;
-}
-
-static inline bool _findChildrenComparator(const QObject *&child, const QRegularExpression &name)
-{
- return name.match(child->objectName()).hasMatch();
-}
-
-static inline bool _findChildrenComparator(const QObject *&child, const QString &name)
-{
- return name.isNull() || name == child->objectName();
-}
-
-template<typename T>
-static void _findChildrenHelper(const QObject *parent, const T& name, PyTypeObject *desiredType, PyObject *result)
-{
- for (const auto *child : parent->children()) {
- Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
- if (PyType_IsSubtype(Py_TYPE(pyChild), desiredType) && _findChildrenComparator(child, name))
- PyList_Append(result, pyChild);
- _findChildrenHelper(child, name, desiredType, result);
- }
-}
-// @snippet qobject-findchild-1
-
-// @snippet qobject-findchild-2
-QObject *child = _findChildHelper(%CPPSELF, %2, reinterpret_cast<PyTypeObject *>(%PYARG_1));
-%PYARG_0 = %CONVERTTOPYTHON[QObject *](child);
-// @snippet qobject-findchild-2
-
-// @snippet qobject-findchildren
-%PYARG_0 = PyList_New(0);
-_findChildrenHelper(%CPPSELF, %2, reinterpret_cast<PyTypeObject *>(%PYARG_1), %PYARG_0);
-// @snippet qobject-findchildren
-
-// @snippet qobject-tr
-QString result;
-if (QCoreApplication::instance()) {
- PyObject *klass = PyObject_GetAttr(%PYSELF, Shiboken::PyMagicName::class_());
- PyObject *cname = PyObject_GetAttr(klass, Shiboken::PyMagicName::name());
- result = QString(QCoreApplication::instance()->translate(Shiboken::String::toCString(cname),
- /* %1, %2, QCoreApplication::CodecForTr, %3)); */
- %1, %2, %3));
-
- Py_DECREF(klass);
- Py_DECREF(cname);
-} else {
- result = QString(QString::fromLatin1(%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 qregexp-replace
-%1.replace(*%CPPSELF, %2);
-%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
-// @snippet qregexp-replace
-
-// @snippet qbytearray-mgetitem
-if (PyIndex_Check(_key)) {
- Py_ssize_t _i;
- _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
- if (_i < 0 || _i >= %CPPSELF.size()) {
- PyErr_SetString(PyExc_IndexError, "index out of bounds");
- return 0;
- } else {
- char res[2];
- res[0] = %CPPSELF.at(_i);
- res[1] = 0;
- return PyBytes_FromStringAndSize(res, 1);
- }
-} else if (PySlice_Check(_key)) {
- Py_ssize_t start, stop, step, slicelength, cur;
- if (PySlice_GetIndicesEx(_key, %CPPSELF.count(), &start, &stop, &step, &slicelength) < 0) {
- return nullptr;
- }
-
- QByteArray ba;
- if (slicelength <= 0) {
- return %CONVERTTOPYTHON[QByteArray](ba);
- } else if (step == 1) {
- Py_ssize_t max = %CPPSELF.count();
- start = qBound(Py_ssize_t(0), start, max);
- stop = qBound(Py_ssize_t(0), stop, max);
- QByteArray ba;
- if (start < stop)
- ba = %CPPSELF.mid(start, stop - start);
- return %CONVERTTOPYTHON[QByteArray](ba);
- } else {
- QByteArray ba;
- for (cur = start; slicelength > 0; cur += static_cast<size_t>(step), slicelength--) {
- ba.append(%CPPSELF.at(cur));
- }
- return %CONVERTTOPYTHON[QByteArray](ba);
- }
-} else {
- PyErr_Format(PyExc_TypeError,
- "list indices must be integers or slices, not %.200s",
- Py_TYPE(_key)->tp_name);
- return nullptr;
-}
-// @snippet qbytearray-mgetitem
-
-// @snippet qbytearray-msetitem
-if (PyIndex_Check(_key)) {
- Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
- if (_i == -1 && PyErr_Occurred())
- return -1;
-
- if (_i < 0)
- _i += %CPPSELF.count();
-
- if (_i < 0 || _i >= %CPPSELF.size()) {
- PyErr_SetString(PyExc_IndexError, "QByteArray index out of range");
- return -1;
- }
-
- // Provide more specific error message for bytes/str, bytearray, QByteArray respectively
- if (PyBytes_Check(_value)) {
- if (Py_SIZE(_value) != 1) {
- PyErr_SetString(PyExc_ValueError, "bytes must be of size 1");
- return -1;
- }
- } else if (PyByteArray_Check(_value)) {
- if (Py_SIZE(_value) != 1) {
- PyErr_SetString(PyExc_ValueError, "bytearray must be of size 1");
- return -1;
- }
- } else if (reinterpret_cast<PyTypeObject *>(Py_TYPE(_value)) == reinterpret_cast<PyTypeObject *>(SbkPySide2_QtCoreTypes[SBK_QBYTEARRAY_IDX])) {
- if (PyObject_Length(_value) != 1) {
- PyErr_SetString(PyExc_ValueError, "QByteArray must be of size 1");
- return -1;
- }
- } else {
- PyErr_SetString(PyExc_ValueError, "a bytes, bytearray, QByteArray of size 1 is required");
- return -1;
- }
-
- // Not support int or long.
- %CPPSELF.remove(_i, 1);
- PyObject *args = Py_BuildValue("(nO)", _i, _value);
- PyObject *result = Sbk_QByteArrayFunc_insert(self, args);
- Py_DECREF(args);
- Py_XDECREF(result);
- return !result ? -1 : 0;
-} else if (PySlice_Check(_key)) {
- Py_ssize_t start, stop, step, slicelength, value_length;
- if (PySlice_GetIndicesEx(_key, %CPPSELF.count(), &start, &stop, &step, &slicelength) < 0) {
- return -1;
- }
- // The parameter candidates are: bytes/str, bytearray, QByteArray itself.
- // Not support iterable which contains ints between 0~255
-
- // case 1: value is nullpre, means delete the items within the range
- // case 2: step is 1, means shrink or expanse
- // case 3: step is not 1, then the number of slots have to equal the number of items in _value
- QByteArray ba;
- if (_value == nullptr || _value == Py_None) {
- ba = QByteArray();
- value_length = 0;
- } else if (!(PyBytes_Check(_value) || PyByteArray_Check(_value) || reinterpret_cast<PyTypeObject *>(Py_TYPE(_value)) == reinterpret_cast<PyTypeObject *>(SbkPySide2_QtCoreTypes[SBK_QBYTEARRAY_IDX]))) {
- PyErr_Format(PyExc_TypeError, "bytes, bytearray or QByteArray is required, not %.200s", Py_TYPE(_value)->tp_name);
- return -1;
- } else {
- value_length = PyObject_Length(_value);
- }
-
- if (step != 1 && value_length != slicelength) {
- PyErr_Format(PyExc_ValueError, "attempt to assign %s of size %d to extended slice of size %d",
- Py_TYPE(_value)->tp_name, int(value_length), int(slicelength));
- return -1;
- }
-
- if (step != 1) {
- int i = start;
- for (int j = 0; j < slicelength; j++) {
- PyObject *item = PyObject_GetItem(_value, PyLong_FromLong(j));
- QByteArray temp;
- if (PyLong_Check(item)) {
- int overflow;
- long ival = PyLong_AsLongAndOverflow(item, &overflow);
- // Not suppose to bigger than 255 because only bytes, bytearray, QByteArray were accept
- temp = QByteArray(reinterpret_cast<const char *>(&ival));
- } else {
- temp = %CONVERTTOCPP[QByteArray](item);
- }
-
- %CPPSELF.replace(i, 1, temp);
- i += step;
- }
- return 0;
- } else {
- ba = %CONVERTTOCPP[QByteArray](_value);
- %CPPSELF.replace(start, slicelength, ba);
- return 0;
- }
-} else {
- PyErr_Format(PyExc_TypeError, "QBytearray indices must be integers or slices, not %.200s",
- Py_TYPE(_key)->tp_name);
- return -1;
-}
-// @snippet qbytearray-msetitem
-
-// @snippet qbytearray-bufferprotocol
-extern "C" {
-// QByteArray buffer protocol functions
-// see: http://www.python.org/dev/peps/pep-3118/
-
-static int SbkQByteArray_getbufferproc(PyObject *obj, Py_buffer *view, int flags)
-{
- if (!view || !Shiboken::Object::isValid(obj))
- return -1;
-
- QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj);
- //XXX /|\ omitting this space crashes shiboken!
- #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->ndim = 1;
- view->shape = (flags & PyBUF_ND) == PyBUF_ND ? &(view->len) : nullptr;
- view->strides = &view->itemsize;
- view->suboffsets = NULL;
- view->internal = NULL;
-
- Py_XINCREF(obj);
- return 0;
-#else // Py_LIMITED_API
- const int result = PyBuffer_FillInfo(view, obj, reinterpret_cast<void *>(cppSelf->data()),
- cppSelf->size(), 0, flags);
- if (result == 0)
- Py_XINCREF(obj);
- return result;
-#endif
-}
-
-static PyBufferProcs SbkQByteArrayBufferProc = {
- /*bf_getbuffer*/ (getbufferproc)SbkQByteArray_getbufferproc,
- /*bf_releasebuffer*/ (releasebufferproc)0,
-};
-
-}
-// @snippet qbytearray-bufferprotocol
-
-// @snippet qbytearray-operatorplus-1
-QByteArray ba = QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)) + *%CPPSELF;
-%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
-// @snippet qbytearray-operatorplus-1
-
-// @snippet qbytearray-operatorplus-2
-QByteArray ba = QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)) + *%CPPSELF;
-%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
-// @snippet qbytearray-operatorplus-2
-
-// @snippet qbytearray-operatorplus-3
-QByteArray ba = *%CPPSELF + QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
-%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
-// @snippet qbytearray-operatorplus-3
-
-// @snippet qbytearray-operatorplusequal
-*%CPPSELF += QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
-// @snippet qbytearray-operatorplusequal
-
-// @snippet qbytearray-operatorequalequal
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF == ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatorequalequal
-
-// @snippet qbytearray-operatornotequal
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF != ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatornotequal
-
-// @snippet qbytearray-operatorgreater
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF > ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatorgreater
-
-// @snippet qbytearray-operatorgreaterequal
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF >= ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatorgreaterequal
-
-// @snippet qbytearray-operatorlower
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF < ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatorlower
-
-// @snippet qbytearray-operatorlowerequal
-if (PyUnicode_CheckExact(%PYARG_1)) {
- Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
- QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
- bool cppResult = %CPPSELF <= ba;
- %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
-}
-// @snippet qbytearray-operatorlowerequal
-
-// @snippet qbytearray-repr
-PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size());
-if (aux == nullptr) {
- return nullptr;
-}
-QByteArray b(Py_TYPE(%PYSELF)->tp_name);
-%PYARG_0 = PyUnicode_FromFormat("%s(%R)", b.constData(), aux);
-Py_DECREF(aux);
-// @snippet qbytearray-repr
-
-// @snippet qbytearray-1
-if (PyBytes_Check(%PYARG_1)) {
- %0 = new QByteArray(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
-} else if (Shiboken::String::check(%PYARG_1)) {
- %0 = new QByteArray(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1));
-}
-// @snippet qbytearray-1
-
-// @snippet qbytearray-2
-%0 = new QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
-// @snippet qbytearray-2
-
-// @snippet qbytearray-3
-%0 = new QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
-// @snippet qbytearray-3
-
-// @snippet qbytearray-py3
-PepType_AS_BUFFER(Shiboken::SbkType<QByteArray>()) = &SbkQByteArrayBufferProc;
-// @snippet qbytearray-py3
-
-// @snippet qbytearray-data
-%PYARG_0 = PyBytes_FromStringAndSize(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.size());
-// @snippet qbytearray-data
-
-// @snippet qbytearray-fromrawdata
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qbytearray-fromrawdata
-
-// @snippet qbytearray-str
-PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size());
-if (aux == nullptr) {
- return nullptr;
-}
-%PYARG_0 = PyObject_Repr(aux);
-Py_DECREF(aux);
-// @snippet qbytearray-str
-
-// @snippet qbytearray-len
-return %CPPSELF.count();
-// @snippet qbytearray-len
-
-// @snippet qbytearray-getitem
-if (_i < 0 || _i >= %CPPSELF.size()) {
- PyErr_SetString(PyExc_IndexError, "index out of bounds");
- return 0;
-} else {
- char res[2];
- res[0] = %CPPSELF.at(_i);
- res[1] = 0;
- return PyBytes_FromStringAndSize(res, 1);
-}
-// @snippet qbytearray-getitem
-
-// @snippet qbytearray-setitem
-%CPPSELF.remove(_i, 1);
-PyObject *args = Py_BuildValue("(nO)", _i, _value);
-PyObject *result = Sbk_QByteArrayFunc_insert(self, args);
-Py_DECREF(args);
-Py_XDECREF(result);
-return !result ? -1 : 0;
-// @snippet qbytearray-setitem
-
-// @snippet qfiledevice-unmap
-uchar *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1));
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(ptr);
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qfiledevice-unmap
-
-// @snippet qfiledevice-map
-%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(%1, %2, %3), %2, Shiboken::Buffer::ReadWrite);
-// @snippet qfiledevice-map
-
-// @snippet qiodevice-readdata
-QByteArray ba(1 + int(%2), char(0));
-%CPPSELF.%FUNCTION_NAME(ba.data(), int(%2));
-%PYARG_0 = Shiboken::String::fromCString(ba.constData());
-// @snippet qiodevice-readdata
-
-// @snippet qcryptographichash-adddata
-%CPPSELF.%FUNCTION_NAME(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1));
-// @snippet qcryptographichash-adddata
-
-// @snippet qsocketdescriptor
-#ifdef WIN32
-using DescriptorType = Qt::HANDLE;
-#else
-using DescriptorType = int;
-#endif
-// @snippet qsocketdescriptor
-
-// @snippet qsocketnotifier
-PyObject *socket = %PYARG_1;
-if (socket != nullptr) {
- // We use qintptr as PyLong, but we check for int
- // since it is currently an alias to be Python2 compatible.
- // Internally, ints are qlonglongs.
- if (%CHECKTYPE[int](socket)) {
- int cppSocket = %CONVERTTOCPP[int](socket);
- qintptr socket = (qintptr)cppSocket;
- %0 = new %TYPE(socket, %2, %3);
- } else {
- PyErr_SetString(PyExc_TypeError,
- "QSocketNotifier: first argument (socket) must be an int.");
- }
-}
-// @snippet qsocketnotifier
-
-// @snippet qtranslator-load
-Py_ssize_t size;
-uchar *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1, &size));
-%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(const_cast<const uchar *>(ptr), size);
-%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));
-PyObject *pyTimer = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, 0);
-reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_init(pyTimer, emptyTuple, 0);
-
-auto timer = %CONVERTTOCPP[QTimer *](pyTimer);
-//XXX /|\ omitting this space crashes shiboken!
-Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer,
- const_cast<char *>("connect"),
- const_cast<char *>("OsOs"),
- pyTimer,
- SIGNAL(timeout()),
- %PYARG_2,
- %3)
-);
-Shiboken::Object::releaseOwnership((SbkObject *)pyTimer);
-Py_XDECREF(pyTimer);
-timer->setSingleShot(true);
-timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()));
-timer->start(%1);
-// @snippet qtimer-singleshot-1
-
-// @snippet qtimer-singleshot-2
-// %FUNCTION_NAME() - disable generation of c++ function call
-Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
-PyObject *pyTimer = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, 0);
-reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_init(pyTimer, emptyTuple, 0);
-QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
-timer->setSingleShot(true);
-
-if (PyObject_TypeCheck(%2, PySideSignalInstanceTypeF())) {
- PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%2);
- Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance)));
- Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer,
- const_cast<char *>("connect"),
- const_cast<char *>("OsOO"),
- pyTimer,
- SIGNAL(timeout()),
- PySide::Signal::getObject(signalInstance),
- signalSignature.object())
- );
-} else {
- Shiboken::AutoDecRef result(
- PyObject_CallMethod(pyTimer,
- const_cast<char *>("connect"),
- const_cast<char *>("OsO"),
- pyTimer,
- SIGNAL(timeout()),
- %PYARG_2)
- );
-}
-
-timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()), Qt::DirectConnection);
-Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
-Py_XDECREF(pyTimer);
-timer->start(%1);
-// @snippet qtimer-singleshot-2
-
-// @snippet qprocess-startdetached
-qint64 pid;
-%RETURN_TYPE retval = %TYPE::%FUNCTION_NAME(%1, %2, %3, &pid);
-%PYARG_0 = PyTuple_New(2);
-PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval));
-PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[qint64](pid));
-// @snippet qprocess-startdetached
-
-// @snippet qcoreapplication-init
-static void QCoreApplicationConstructor(PyObject *self, PyObject *pyargv, QCoreApplicationWrapper **cptr)
-{
- static int argc;
- static char **argv;
- PyObject *stringlist = PyTuple_GET_ITEM(pyargv, 0);
- if (Shiboken::listToArgcArgv(stringlist, &argc, &argv, "PySideApp")) {
- *cptr = new QCoreApplicationWrapper(argc, argv);
- Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(self));
- PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
- }
-}
-// @snippet qcoreapplication-init
-
-// @snippet qcoreapplication-1
-QCoreApplicationConstructor(%PYSELF, args, &%0);
-// @snippet qcoreapplication-1
-
-// @snippet qcoreapplication-2
-PyObject *empty = PyTuple_New(2);
-if (!PyTuple_SetItem(empty, 0, PyList_New(0))) {
- QCoreApplicationConstructor(%PYSELF, empty, &%0);
-}
-// @snippet qcoreapplication-2
-
-// @snippet qcoreapplication-instance
-PyObject *pyApp = Py_None;
-if (qApp) {
- pyApp = reinterpret_cast<PyObject *>(
- Shiboken::BindingManager::instance().retrieveWrapper(qApp));
- if (!pyApp)
- pyApp = %CONVERTTOPYTHON[QCoreApplication *](qApp);
- // this will keep app live after python exit (extra ref)
-}
-// PYSIDE-571: make sure that we return the singleton "None"
-if (Py_TYPE(pyApp) == Py_TYPE(Py_None))
- Py_DECREF(MakeQAppWrapper(nullptr));
-%PYARG_0 = pyApp;
-Py_XINCREF(%PYARG_0);
-// @snippet qcoreapplication-instance
-
-// @snippet qdatastream-readrawdata
-QByteArray data;
-data.resize(%2);
-int result = 0;
-Py_BEGIN_ALLOW_THREADS
-result = %CPPSELF.%FUNCTION_NAME(data.data(), data.size());
-Py_END_ALLOW_THREADS
-if (result == -1) {
- Py_INCREF(Py_None);
- %PYARG_0 = Py_None;
-} else {
- %PYARG_0 = PyBytes_FromStringAndSize(data.data(), result);
-}
-// @snippet qdatastream-readrawdata
-
-// @snippet qdatastream-writerawdata
-int r = 0;
-Py_BEGIN_ALLOW_THREADS
-r = %CPPSELF.%FUNCTION_NAME(%1, Shiboken::String::len(%PYARG_1));
-Py_END_ALLOW_THREADS
-%PYARG_0 = %CONVERTTOPYTHON[int](r);
-// @snippet qdatastream-writerawdata
-
-// @snippet releaseownership
-Shiboken::Object::releaseOwnership(%PYARG_0);
-// @snippet releaseownership
-
-// @snippet qanimationgroup-clear
-for (int counter = 0, count = %CPPSELF.animationCount(); counter < count; ++counter ) {
- QAbstractAnimation *animation = %CPPSELF.animationAt(counter);
- PyObject *obj = %CONVERTTOPYTHON[QAbstractAnimation *](animation);
- Shiboken::Object::setParent(nullptr, obj);
- Py_DECREF(obj);
-}
-%CPPSELF.clear();
-// @snippet qanimationgroup-clear
-
-// @snippet qeasingcurve
-PySideEasingCurveFunctor::init();
-// @snippet qeasingcurve
-
-// @snippet qeasingcurve-setcustomtype
-QEasingCurve::EasingFunction func = PySideEasingCurveFunctor::createCustomFuntion(%PYSELF, %PYARG_1);
-if (func)
- %CPPSELF.%FUNCTION_NAME(func);
-// @snippet qeasingcurve-setcustomtype
-
-// @snippet qeasingcurve-customtype
-//%FUNCTION_NAME()
-%PYARG_0 = PySideEasingCurveFunctor::callable(%PYSELF);
-// @snippet qeasingcurve-customtype
-
-// @snippet qsignaltransition
-if (PyObject_TypeCheck(%1, PySideSignalInstanceTypeF())) {
- PyObject *dataSource = PySide::Signal::getObject((PySideSignalInstance *)%PYARG_1);
- Shiboken::AutoDecRef obType(PyObject_Type(dataSource));
- QObject * sender = %CONVERTTOCPP[QObject *](dataSource);
- //XXX /|\ omitting this space crashes shiboken!
- if (sender) {
- const char *dataSignature = PySide::Signal::getSignature((PySideSignalInstance *)%PYARG_1);
- QByteArray signature(dataSignature); // Append SIGNAL flag (2)
- signature.prepend('2');
- %0 = new QSignalTransitionWrapper(sender, signature, %2);
- }
-}
-// @snippet qsignaltransition
-
-// @snippet qstate-addtransition-1
-QString signalName(%2);
-if (PySide::SignalManager::registerMetaMethod(%1, signalName.mid(1).toLatin1().data(), QMetaMethod::Signal)) {
- QSignalTransition *%0 = %CPPSELF->addTransition(%1, %2, %3);
- %PYARG_0 = %CONVERTTOPYTHON[QSignalTransition *](%0);
-} else {
- Py_INCREF(Py_None);
- %PYARG_0 = Py_None;
-}
-// @snippet qstate-addtransition-1
-
-// @snippet qstate-addtransition-2
-// Obviously the label used by the following goto is a very awkward solution,
-// 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
-if (!PyObject_TypeCheck(%1, PySideSignalInstanceTypeF()))
- goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError;
-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);
-%PYARG_0 = %CONVERTTOPYTHON[QSignalTransition *](%0);
-// @snippet qstate-addtransition-2
-
-// @snippet qstatemachine-configuration
-%PYARG_0 = PySet_New(0);
-for (auto *abs_state : %CPPSELF.configuration()) {
- Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractState *](abs_state));
- Shiboken::Object::setParent(self, obj);
- PySet_Add(%PYARG_0, obj);
-}
-// @snippet qstatemachine-configuration
-
-// @snippet qstatemachine-defaultanimations
-%PYARG_0 = PyList_New(0);
-for (auto *abs_anim : %CPPSELF.defaultAnimations()) {
- Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractAnimation *](abs_anim));
- Shiboken::Object::setParent(self, obj);
- PyList_Append(%PYARG_0, obj);
-}
-// @snippet qstatemachine-defaultanimations
-
-// @snippet qt-signal
-%PYARG_0 = Shiboken::String::fromFormat("2%s",QMetaObject::normalizedSignature(%1).constData());
-// @snippet qt-signal
-
-// @snippet qt-slot
-%PYARG_0 = Shiboken::String::fromFormat("1%s",QMetaObject::normalizedSignature(%1).constData());
-// @snippet qt-slot
-
-// @snippet qt-registerresourcedata
-QT_BEGIN_NAMESPACE
-extern bool
-qRegisterResourceData(int,
- const unsigned char *,
- const unsigned char *,
- const unsigned char *);
-
-extern bool
-qUnregisterResourceData(int,
- const unsigned char *,
- const unsigned char *,
- const unsigned char *);
-QT_END_NAMESPACE
-// @snippet qt-registerresourcedata
-
-// @snippet qt-qregisterresourcedata
-%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_2)),
- reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_3)),
- reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_4)));
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qt-qregisterresourcedata
-
-// @snippet qt-qunregisterresourcedata
-%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_2)),
- reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_3)),
- reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_4)));
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qt-qunregisterresourcedata
-
-// @snippet use-stream-for-format-security
-// Uses the stream version for security reasons
-// see gcc man page at -Wformat-security
-Py_BEGIN_ALLOW_THREADS
-%FUNCTION_NAME() << %1;
-Py_END_ALLOW_THREADS
-// @snippet use-stream-for-format-security
-
-// @snippet qresource-registerResource
- auto ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1));
- %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(const_cast<const uchar *>(ptr), %2);
- %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
-// @snippet qresource-registerResource
-
-// @snippet qstring-return
-%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
-// @snippet qstring-return
-
-// @snippet stream-write-method
-Py_BEGIN_ALLOW_THREADS
-(*%CPPSELF) << %1;
-Py_END_ALLOW_THREADS
-// @snippet stream-write-method
-
-// @snippet stream-read-method
-%RETURN_TYPE _cpp_result;
-Py_BEGIN_ALLOW_THREADS
-(*%CPPSELF) >> _cpp_result;
-Py_END_ALLOW_THREADS
-%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](_cpp_result);
-// @snippet stream-read-method
-
-// @snippet return-qstring-ref
-QString &res = *%0;
-%PYARG_0 = %CONVERTTOPYTHON[QString](res);
-// @snippet return-qstring-ref
-
-// @snippet return-readData
-%RETURN_TYPE %0 = 0;
-if (PyBytes_Check(%PYARG_0)) {
- %0 = PyBytes_GET_SIZE((PyObject *)%PYARG_0);
- memcpy(%1, PyBytes_AS_STRING((PyObject *)%PYARG_0), %0);
-} else if (Shiboken::String::check(%PYARG_0)) {
- %0 = Shiboken::String::len((PyObject *)%PYARG_0);
- memcpy(%1, Shiboken::String::toCString((PyObject *)%PYARG_0), %0);
-}
-// @snippet return-readData
-
-// @snippet qiodevice-readData
-QByteArray ba(1 + int(%2), char(0));
-Py_BEGIN_ALLOW_THREADS
-%CPPSELF.%FUNCTION_NAME(ba.data(), int(%2));
-Py_END_ALLOW_THREADS
-%PYARG_0 = Shiboken::String::fromCString(ba.constData());
-// @snippet qiodevice-readData
-
-// @snippet qt-module-shutdown
-{ // Avoid name clash
- Shiboken::AutoDecRef regFunc(static_cast<PyObject *>(nullptr));
- Shiboken::AutoDecRef atexit(Shiboken::Module::import("atexit"));
- if (atexit.isNull()) {
- qWarning("Module atexit not found for registering __moduleShutdown");
- PyErr_Clear();
- }else{
- regFunc.reset(PyObject_GetAttrString(atexit, "register"));
- if (regFunc.isNull()) {
- qWarning("Function atexit.register not found for registering __moduleShutdown");
- PyErr_Clear();
- }
- }
- if (!atexit.isNull() && !regFunc.isNull()){
- PyObject *shutDownFunc = PyObject_GetAttrString(module, "__moduleShutdown");
- Shiboken::AutoDecRef args(PyTuple_New(1));
- PyTuple_SET_ITEM(args, 0, shutDownFunc);
- Shiboken::AutoDecRef retval(PyObject_Call(regFunc, args, 0));
- Q_ASSERT(!retval.isNull());
- }
-}
-// @snippet qt-module-shutdown
-
-
-/*********************************************************************
- * CONVERSIONS
- ********************************************************************/
-
-// @snippet conversion-pybool
-%out = %OUTTYPE(%in == Py_True);
-// @snippet conversion-pybool
-
-// @snippet conversion-pylong
-%out = %OUTTYPE(PyLong_AsLong(%in));
-// @snippet conversion-pylong
-
-// @snippet conversion-pylong-unsigned
-%out = %OUTTYPE(PyLong_AsUnsignedLong(%in));
-// @snippet conversion-pylong-unsigned
-
-// @snippet conversion-pylong-quintptr
-#if QT_POINTER_SIZE == 8
-%out = %OUTTYPE(PyLong_AsUnsignedLongLong(%in));
-#else
-%out = %OUTTYPE(PyLong_AsUnsignedLong(%in));
-#endif
-// @snippet conversion-pylong-quintptr
-
-// @snippet conversion-pyunicode
-#ifndef Py_LIMITED_API
-Py_UNICODE *unicode = PyUnicode_AS_UNICODE(%in);
-# if defined(Py_UNICODE_WIDE)
-// cast as Py_UNICODE can be a different type
-# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
-%out = QString::fromUcs4(reinterpret_cast<const char32_t *>(unicode));
-# else
-%out = QString::fromUcs4(reinterpret_cast<const uint *>(unicode));
-# endif // Qt 6
-# else // Py_UNICODE_WIDE
-# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
-%out = QString::fromUtf16(reinterpret_cast<const char16_t *>(unicode), PepUnicode_GetLength(%in));
-# else
-%out = QString::fromUtf16(reinterpret_cast<const ushort *>(unicode), PepUnicode_GetLength(%in));
-# endif // Qt 6
-# endif
-#else
-wchar_t *temp = PyUnicode_AsWideCharString(%in, NULL);
-%out = QString::fromWCharArray(temp);
-PyMem_Free(temp);
-#endif
-// @snippet conversion-pyunicode
-
-// @snippet conversion-pynone
-%out = %OUTTYPE();
-// @snippet conversion-pynone
-
-// @snippet conversion-pystring-char
-char c = %CONVERTTOCPP[char](%in);
-%out = %OUTTYPE(c);
-// @snippet conversion-pystring-char
-
-// @snippet conversion-pyint
-int i = %CONVERTTOCPP[int](%in);
-%out = %OUTTYPE(i);
-// @snippet conversion-pyint
-
-// @snippet conversion-qlonglong
-// PYSIDE-1250: For QVariant, if the type fits into an int; use int preferably.
-qlonglong in = %CONVERTTOCPP[qlonglong](%in);
-constexpr qlonglong intMax = qint64(std::numeric_limits<int>::max());
-constexpr qlonglong intMin = qint64(std::numeric_limits<int>::min());
-%out = in >= intMin && in <= intMax ? %OUTTYPE(int(in)) : %OUTTYPE(in);
-// @snippet conversion-qlonglong
-
-// @snippet conversion-qstring
-QString in = %CONVERTTOCPP[QString](%in);
-%out = %OUTTYPE(in);
-// @snippet conversion-qstring
-
-// @snippet conversion-qbytearray
-QByteArray in = %CONVERTTOCPP[QByteArray](%in);
-%out = %OUTTYPE(in);
-// @snippet conversion-qbytearray
-
-// @snippet conversion-pyfloat
-double in = %CONVERTTOCPP[double](%in);
-%out = %OUTTYPE(in);
-// @snippet conversion-pyfloat
-
-// @snippet conversion-sbkobject
-// a class supported by QVariant?
-const QMetaType metaType = QVariant_resolveMetaType(Py_TYPE(%in));
-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));
-}
-// @snippet conversion-sbkobject
-
-// @snippet conversion-pydict
-QVariant ret = QVariant_convertToVariantMap(%in);
-%out = ret.isValid() ? ret : QVariant::fromValue(PySide::PyObjectWrapper(%in));
-// @snippet conversion-pydict
-
-// @snippet conversion-pylist
-QVariant ret = QVariant_convertToVariantList(%in);
-%out = ret.isValid() ? ret : QVariant::fromValue(PySide::PyObjectWrapper(%in));
-// @snippet conversion-pylist
-
-// @snippet conversion-pyobject
-// Is a shiboken type not known by Qt
-%out = QVariant::fromValue(PySide::PyObjectWrapper(%in));
-// @snippet conversion-pyobject
-
-// @snippet conversion-qjsonobject-pydict
-QVariant dict = QVariant_convertToVariantMap(%in);
-QJsonValue val = QJsonValue::fromVariant(dict);
-%out = val.toObject();
-// @snippet conversion-qjsonobject-pydict
-
-// @snippet conversion-qpair-pysequence
-%out.first = %CONVERTTOCPP[%OUTTYPE_0](PySequence_Fast_GET_ITEM(%in, 0));
-%out.second = %CONVERTTOCPP[%OUTTYPE_1](PySequence_Fast_GET_ITEM(%in, 1));
-// @snippet conversion-qpair-pysequence
-
-// @snippet conversion-qdate-pydate
-int day = PyDateTime_GET_DAY(%in);
-int month = PyDateTime_GET_MONTH(%in);
-int year = PyDateTime_GET_YEAR(%in);
-%out = %OUTTYPE(year, month, day);
-// @snippet conversion-qdate-pydate
-
-// @snippet conversion-qdatetime-pydatetime
-int day = PyDateTime_GET_DAY(%in);
-int month = PyDateTime_GET_MONTH(%in);
-int year = PyDateTime_GET_YEAR(%in);
-int hour = PyDateTime_DATE_GET_HOUR(%in);
-int min = PyDateTime_DATE_GET_MINUTE(%in);
-int sec = PyDateTime_DATE_GET_SECOND(%in);
-int usec = PyDateTime_DATE_GET_MICROSECOND(%in);
-%out = %OUTTYPE(QDate(year, month, day), QTime(hour, min, sec, usec/1000));
-// @snippet conversion-qdatetime-pydatetime
-
-// @snippet conversion-qtime-pytime
-int hour = PyDateTime_TIME_GET_HOUR(%in);
-int min = PyDateTime_TIME_GET_MINUTE(%in);
-int sec = PyDateTime_TIME_GET_SECOND(%in);
-int usec = PyDateTime_TIME_GET_MICROSECOND(%in);
-%out = %OUTTYPE(hour, min, sec, usec/1000);
-// @snippet conversion-qtime-pytime
-
-// @snippet conversion-qbytearray-pybytes
-%out = %OUTTYPE(PyBytes_AS_STRING(%in), PyBytes_GET_SIZE(%in));
-// @snippet conversion-qbytearray-pybytes
-
-// @snippet conversion-qbytearray-pybytearray
-%out = %OUTTYPE(PyByteArray_AsString(%in), PyByteArray_Size(%in));
-// @snippet conversion-qbytearray-pybytearray
-
-// @snippet conversion-qbytearray-pystring
-%out = %OUTTYPE(Shiboken::String::toCString(%in), Shiboken::String::len(%in));
-// @snippet conversion-qbytearray-pystring
-
-/*********************************************************************
- * NATIVE TO TARGET CONVERSIONS
- ********************************************************************/
-
-// @snippet return-pybool
-return PyBool_FromLong((bool)%in);
-// @snippet return-pybool
-
-// @snippet return-pybytes
-return PyBytes_FromStringAndSize(%in.constData(), %in.size());
-// @snippet return-pybytes
-
-// @snippet return-pylong
-return PyLong_FromLong(%in);
-// @snippet return-pylong
-
-// @snippet return-pylong-unsigned
-return PyLong_FromUnsignedLong(%in);
-// @snippet return-pylong-unsigned
-
-// @snippet return-pylong-quintptr
-#if QT_POINTER_SIZE == 8
-return PyLong_FromUnsignedLongLong(%in);
-#else
-return PyLong_FromUnsignedLong(%in);
-#endif
-// @snippet return-pylong-quintptr
-
-// @snippet return-pyunicode
-QByteArray ba = %in.toUtf8();
-return PyUnicode_FromStringAndSize(ba.constData(), ba.size());
-// @snippet return-pyunicode
-
-// @snippet return-pyunicode-qchar
-wchar_t c = (wchar_t)%in.unicode();
-return PyUnicode_FromWideChar(&c, 1);
-// @snippet return-pyunicode-qchar
-
-// @snippet return-qvariant
-if (!%in.isValid())
- Py_RETURN_NONE;
-
-if (qstrcmp(%in.typeName(), "QVariantList") == 0) {
- QList<QVariant> var = %in.value<QVariantList>();
- return %CONVERTTOPYTHON[QList<QVariant>](var);
-}
-
-if (qstrcmp(%in.typeName(), "QStringList") == 0) {
- QStringList var = %in.value<QStringList>();
- return %CONVERTTOPYTHON[QList<QString>](var);
-}
-
-if (qstrcmp(%in.typeName(), "QVariantMap") == 0) {
- QMap<QString, QVariant> var = %in.value<QVariantMap>();
- return %CONVERTTOPYTHON[QMap<QString, QVariant>](var);
-}
-
-Shiboken::Conversions::SpecificConverter converter(cppInRef.typeName());
-if (converter) {
- void *ptr = cppInRef.data();
- return converter.toPython(ptr);
-}
-PyErr_Format(PyExc_RuntimeError, "Can't find converter for '%s'.", %in.typeName());
-return 0;
-// @snippet return-qvariant
-
-// @snippet return-qvariant-type
-const char *typeName = QMetaType(%in).name();
-PyObject *%out;
-PyTypeObject *pyType = nullptr;
-if (typeName)
- pyType = Shiboken::Conversions::getPythonTypeObject(typeName);
-%out = pyType ? (reinterpret_cast<PyObject *>(pyType)) : Py_None;
-Py_INCREF(%out);
-return %out;
-// @snippet return-qvariant-type
-
-// @snippet return-qjsonobject
-// The QVariantMap returned by QJsonObject seems to cause a segfault, so
-// using QJsonObject.toVariantMap() won't work.
-// Wrapping it in a QJsonValue first allows it to work
-QJsonValue val(%in);
-QVariant ret = val.toVariant();
-
-return %CONVERTTOPYTHON[QVariant](ret);
-// @snippet return-qjsonobject
-
-// @snippet return-qpair
-PyObject *%out = PyTuple_New(2);
-PyTuple_SET_ITEM(%out, 0, %CONVERTTOPYTHON[%INTYPE_0](%in.first));
-PyTuple_SET_ITEM(%out, 1, %CONVERTTOPYTHON[%INTYPE_1](%in.second));
-return %out;
-// @snippet return-qpair
-
-// @snippet qthread_pthread_cleanup
-#ifdef Q_OS_UNIX
-# include <stdio.h>
-# include <pthread.h>
-static void qthread_pthread_cleanup(void *arg)
-{
- // PYSIDE 1282: When terminating a thread using QThread::terminate()
- // (pthread_cancel()), QThread::run() is aborted and the lock is released,
- // but ~GilState() is still executed for some reason. Prevent it from
- // releasing.
- auto gil = reinterpret_cast<Shiboken::GilState *>(arg);
- gil->abandon();
-}
-#endif // Q_OS_UNIX
-// @snippet qthread_pthread_cleanup
-
-// @snippet qthread_pthread_cleanup_install
-#ifdef Q_OS_UNIX
-pthread_cleanup_push(qthread_pthread_cleanup, &gil);
-#endif
-// @snippet qthread_pthread_cleanup_install
-
-// @snippet qthread_pthread_cleanup_uninstall
-#ifdef Q_OS_UNIX
-pthread_cleanup_pop(0);
-#endif
-// @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);
-#endif
-// @snippet qlibraryinfo_build
diff --git a/sources/pyside2/PySide2/glue/qtuitools.cpp b/sources/pyside2/PySide2/glue/qtuitools.cpp
deleted file mode 100644
index 08dc0eb0a..000000000
--- a/sources/pyside2/PySide2/glue/qtuitools.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-// @snippet uitools-loadui
-/*
- * Based on code provided by:
- * Antonio Valentino <antonio.valentino at tiscali.it>
- * Frédéric <frederic.mantegazza at gbiloba.org>
- */
-
-#include <shiboken.h>
-#include <QUiLoader>
-#include <QFile>
-#include <QWidget>
-
-static void createChildrenNameAttributes(PyObject *root, QObject *object)
-{
- for (auto *child : object->children()) {
- const QByteArray name = child->objectName().toLocal8Bit();
-
- if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
- Shiboken::AutoDecRef attrName(Py_BuildValue("s", name.constData()));
- if (!PyObject_HasAttr(root, attrName)) {
- Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
- PyObject_SetAttr(root, attrName, pyChild);
- }
- createChildrenNameAttributes(root, child);
- }
- createChildrenNameAttributes(root, child);
- }
-}
-
-static PyObject *QUiLoadedLoadUiFromDevice(QUiLoader *self, QIODevice *dev, QWidget *parent)
-{
- QWidget *wdg = self->load(dev, parent);
-
- if (wdg) {
- PyObject *pyWdg = %CONVERTTOPYTHON[QWidget *](wdg);
- createChildrenNameAttributes(pyWdg, wdg);
- if (parent) {
- Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget *](parent));
- Shiboken::Object::setParent(pyParent, pyWdg);
- }
- return pyWdg;
- }
-
- if (!PyErr_Occurred())
- PyErr_SetString(PyExc_RuntimeError, "Unable to open/read ui device");
- return nullptr;
-}
-
-static PyObject *QUiLoaderLoadUiFromFileName(QUiLoader *self, const QString &uiFile, QWidget *parent)
-{
- QFile fd(uiFile);
- return QUiLoadedLoadUiFromDevice(self, &fd, parent);
-}
-// @snippet uitools-loadui
-
-// @snippet quiloader
-Q_IMPORT_PLUGIN(PyCustomWidgets);
-// @snippet quiloader
-
-// @snippet quiloader-registercustomwidget
-registerCustomWidget(%PYARG_1);
-%CPPSELF.addPluginPath(""); // force reload widgets
-// @snippet quiloader-registercustomwidget
-
-// @snippet quiloader-load-1
-// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
-%PYARG_0 = QUiLoadedLoadUiFromDevice(%CPPSELF, %1, %2);
-// @snippet quiloader-load-1
-
-// @snippet quiloader-load-2
-// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
-%PYARG_0 = QUiLoaderLoadUiFromFileName(%CPPSELF, %1, %2);
-// @snippet quiloader-load-2
-
-// @snippet loaduitype
-/*
-Arguments:
- %PYARG_1 (uifile)
-*/
-// 1. Generate the Python code from the UI file
-PyObject *strObj = PyUnicode_AsUTF8String(%PYARG_1);
-char *arg1 = PyBytes_AsString(strObj);
-QByteArray uiFileName(arg1);
-Py_DECREF(strObj);
-
-QFile uiFile(uiFileName);
-
-if (!uiFile.exists()) {
- qCritical().noquote() << "File" << uiFileName << "does not exists";
- Py_RETURN_NONE;
-}
-
-if (uiFileName.isEmpty()) {
- qCritical() << "Error converting the UI filename to QByteArray";
- Py_RETURN_NONE;
-}
-
-// Use the 'pyside2-uic' wrapper instead of 'uic'
-// This approach is better than rely on 'uic' since installing
-// the wheels cover this case.
-QString uicBin("pyside2-uic");
-QStringList uicArgs = {QString::fromUtf8(uiFileName)};
-
-QProcess uicProcess;
-uicProcess.start(uicBin, uicArgs);
-if (!uicProcess.waitForFinished()) {
- qCritical() << "Cannot run 'pyside2-uic': " << uicProcess.errorString() << " - "
- << "Exit status " << uicProcess.exitStatus()
- << " (" << uicProcess.exitCode() << ")\n"
- << "Check if 'pyside2-uic' is in PATH";
- Py_RETURN_NONE;
-}
-QByteArray uiFileContent = uicProcess.readAllStandardOutput();
-QByteArray errorOutput = uicProcess.readAllStandardError();
-
-if (!errorOutput.isEmpty()) {
- qCritical().noquote() << errorOutput;
- Py_RETURN_NONE;
-}
-
-// 2. Obtain the 'classname' and the Qt base class.
-QByteArray className;
-QByteArray baseClassName;
-
-// Problem
-// The generated Python file doesn't have the Qt Base class information.
-
-// Solution
-// Use the XML file
-if (!uiFile.open(QIODevice::ReadOnly))
- Py_RETURN_NONE;
-
-// This will look for the first <widget> tag, e.g.:
-// <widget class="QWidget" name="ThemeWidgetForm">
-// and then extract the information from "class", and "name",
-// to get the baseClassName and className respectively
-QXmlStreamReader reader(&uiFile);
-while (!reader.atEnd() && baseClassName.isEmpty() && className.isEmpty()) {
- auto token = reader.readNext();
- if (token == QXmlStreamReader::StartElement && reader.name() == "widget") {
- baseClassName = reader.attributes().value(QLatin1String("class")).toUtf8();
- className = reader.attributes().value(QLatin1String("name")).toUtf8();
- }
-}
-
-uiFile.close();
-
-if (className.isEmpty() || baseClassName.isEmpty() || reader.hasError()) {
- qCritical() << "An error occurred when parsing the UI file while looking for the class info "
- << reader.errorString();
- Py_RETURN_NONE;
-}
-
-QByteArray pyClassName("Ui_"+className);
-
-PyObject *module = PyImport_ImportModule("__main__");
-PyObject *loc = PyModule_GetDict(module);
-
-// 3. exec() the code so the class exists in the context: exec(uiFileContent)
-// The context of PyRun_SimpleString is __main__.
-// 'Py_file_input' is the equivalent to using exec(), since it will execute
-// the code, without returning anything.
-Shiboken::AutoDecRef codeUi(Py_CompileString(uiFileContent.constData(), "<stdin>", Py_file_input));
-if (codeUi.isNull()) {
- qCritical() << "Error while compiling the generated Python file";
- Py_RETURN_NONE;
-}
-PyObject *uiObj = PyEval_EvalCode(codeUi, loc, loc);
-
-if (uiObj == nullptr) {
- qCritical() << "Error while running exec() on the generated code";
- Py_RETURN_NONE;
-}
-
-// 4. eval() the name of the class on a variable to return
-// 'Py_eval_input' is the equivalent to using eval(), since it will just
-// evaluate an expression.
-Shiboken::AutoDecRef codeClass(Py_CompileString(pyClassName.constData(),"<stdin>", Py_eval_input));
-if (codeClass.isNull()) {
- qCritical() << "Error while compiling the Python class";
- Py_RETURN_NONE;
-}
-
-Shiboken::AutoDecRef codeBaseClass(Py_CompileString(baseClassName.constData(), "<stdin>", Py_eval_input));
-if (codeBaseClass.isNull()) {
- qCritical() << "Error while compiling the base class";
- Py_RETURN_NONE;
-}
-
-PyObject *classObj = PyEval_EvalCode(codeClass, loc, loc);
-PyObject *baseClassObj = PyEval_EvalCode(codeBaseClass, loc, loc);
-
-%PYARG_0 = PyTuple_New(2);
-if (%PYARG_0 == nullptr) {
- qCritical() << "Error while creating the return Tuple";
- Py_RETURN_NONE;
-}
-PyTuple_SET_ITEM(%PYARG_0, 0, classObj);
-PyTuple_SET_ITEM(%PYARG_0, 1, baseClassObj);
-// @snippet loaduitype
diff --git a/sources/pyside2/PySide2/support/deprecated.py b/sources/pyside2/PySide2/support/deprecated.py
deleted file mode 100644
index af4c18e14..000000000
--- a/sources/pyside2/PySide2/support/deprecated.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# This Python file uses the following encoding: utf-8
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-"""
-deprecated.py
-
-This module contains deprecated things that are removed from the interface.
-They are implemented in Python again, together with a deprecation warning.
-
-Functions that are to be called for
- PySide2.<module> must be named
- fix_for_<module> .
-
-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/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
deleted file mode 100644
index 12ad105b9..000000000
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ /dev/null
@@ -1,324 +0,0 @@
-# This Python file uses the following encoding: utf-8
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import, unicode_literals
-
-"""
-generate_pyi.py
-
-This script generates the .pyi files for all PySide modules.
-"""
-
-import sys
-import os
-import io
-import re
-import subprocess
-import argparse
-from contextlib import contextmanager
-from textwrap import dedent
-import logging
-
-
-# Make sure not to get .pyc in Python2.
-sourcepath = os.path.splitext(__file__)[0] + ".py"
-
-# Can we use forward references?
-USE_PEP563 = sys.version_info[:2] >= (3, 7)
-
-indent = " " * 4
-is_py3 = sys.version_info[0] == 3
-is_ci = os.environ.get("QTEST_ENVIRONMENT", "") == "ci"
-is_debug = is_ci or os.environ.get("QTEST_ENVIRONMENT")
-
-logging.basicConfig(level=logging.DEBUG if is_debug else logging.INFO)
-logger = logging.getLogger("generate_pyi")
-
-
-class Writer(object):
- def __init__(self, outfile):
- self.outfile = outfile
- self.history = [True, True]
-
- def print(self, *args, **kw):
- # controlling too much blank lines
- if self.outfile:
- if args == () or args == ("",):
- # Python 2.7 glitch: Empty tuples have wrong encoding.
- # But we use that to skip too many blank lines:
- if self.history[-2:] == [True, True]:
- return
- print("", file=self.outfile, **kw)
- self.history.append(True)
- else:
- print(*args, file=self.outfile, **kw)
- self.history.append(False)
-
-
-class Formatter(Writer):
- """
- Formatter is formatting the signature listing of an enumerator.
-
- It is written as context managers in order to avoid many callbacks.
- The separation in formatter and enumerator is done to keep the
- unrelated tasks of enumeration and formatting apart.
- """
- def __init__(self, *args):
- Writer.__init__(self, *args)
- # patching __repr__ to disable the __repr__ of typing.TypeVar:
- """
- def __repr__(self):
- if self.__covariant__:
- prefix = '+'
- elif self.__contravariant__:
- prefix = '-'
- else:
- prefix = '~'
- return prefix + self.__name__
- """
- def _typevar__repr__(self):
- return "typing." + self.__name__
- typing.TypeVar.__repr__ = _typevar__repr__
-
- # Adding a pattern to substitute "Union[T, NoneType]" by "Optional[T]"
- # I tried hard to replace typing.Optional by a simple override, but
- # this became _way_ too much.
- # See also the comment in layout.py .
- brace_pat = build_brace_pattern(3)
- pattern = fr"\b Union \s* \[ \s* {brace_pat} \s*, \s* NoneType \s* \]"
- replace = r"Optional[\1]"
- optional_searcher = re.compile(pattern, flags=re.VERBOSE)
- def optional_replacer(source):
- return optional_searcher.sub(replace, str(source))
- self.optional_replacer = optional_replacer
- # self.level is maintained by enum_sig.py
- # self.after_enum() is a one-shot set by enum_sig.py .
-
- @contextmanager
- def module(self, mod_name):
- self.mod_name = mod_name
- self.print("# Module", mod_name)
- self.print("import PySide2")
- from PySide2.support.signature import typing
- self.print("try:")
- self.print(" import typing")
- self.print("except ImportError:")
- self.print(" from PySide2.support.signature import typing")
- self.print("from PySide2.support.signature.mapping import (")
- self.print(" Virtual, Missing, Invalid, Default, Instance)")
- self.print()
- self.print("class Object(object): pass")
- self.print()
- self.print("import shiboken6 as Shiboken")
- self.print("Shiboken.Object = Object")
- self.print()
- # This line will be replaced by the missing imports postprocess.
- self.print("IMPORTS")
- yield
-
- @contextmanager
- def klass(self, class_name, class_str):
- spaces = indent * self.level
- while "." in class_name:
- class_name = class_name.split(".", 1)[-1]
- class_str = class_str.split(".", 1)[-1]
- self.print()
- if self.level == 0:
- self.print()
- here = self.outfile.tell()
- if self.have_body:
- self.print(f"{spaces}class {class_str}:")
- else:
- self.print(f"{spaces}class {class_str}: ...")
- yield
-
- @contextmanager
- def function(self, func_name, signature):
- if self.after_enum() or func_name == "__init__":
- self.print()
- key = func_name
- spaces = indent * self.level
- if type(signature) == type([]):
- for sig in signature:
- self.print(f'{spaces}@typing.overload')
- self._function(func_name, sig, spaces)
- else:
- self._function(func_name, signature, spaces)
- if func_name == "__init__":
- self.print()
- yield key
-
- def _function(self, func_name, signature, spaces):
- if "self" not in tuple(signature.parameters.keys()):
- self.print(f'{spaces}@staticmethod')
- signature = self.optional_replacer(signature)
- self.print(f'{spaces}def {func_name}{signature}: ...')
-
- @contextmanager
- def enum(self, class_name, enum_name, value):
- spaces = indent * self.level
- hexval = hex(value)
- self.print(f"{spaces}{enum_name:25}: {class_name} = ... # {hexval}")
- yield
-
-
-def get_license_text():
- with io.open(sourcepath) as f:
- lines = f.readlines()
- license_line = next((lno for lno, line in enumerate(lines)
- if "$QT_END_LICENSE$" in line))
- return "".join(lines[:license_line + 3])
-
-
-def find_imports(text):
- return [imp for imp in PySide2.__all__ if imp + "." in text]
-
-
-def generate_pyi(import_name, outpath, options):
- """
- Generates a .pyi file.
- """
- plainname = import_name.split(".")[-1]
- outfilepath = os.path.join(outpath, plainname + ".pyi")
- top = __import__(import_name)
- obj = getattr(top, plainname)
- if not getattr(obj, "__file__", None) or os.path.isdir(obj.__file__):
- raise ModuleNotFoundError(f"We do not accept a namespace as module {plainname}")
- module = sys.modules[import_name]
-
- outfile = io.StringIO()
- fmt = Formatter(outfile)
- fmt.print(get_license_text()) # which has encoding, already
- need_imports = not USE_PEP563
- if USE_PEP563:
- fmt.print("from __future__ import annotations")
- fmt.print()
- fmt.print(dedent(f'''\
- """
- This file contains the exact signatures for all functions in module
- {import_name}, except for defaults which are replaced by "...".
- """
- '''))
- HintingEnumerator(fmt).module(import_name)
- fmt.print()
- fmt.print("# eof")
- # Postprocess: resolve the imports
- with open(outfilepath, "w") as realfile:
- wr = Writer(realfile)
- outfile.seek(0)
- while True:
- line = outfile.readline()
- if not line:
- break
- line = line.rstrip()
- # we remove the IMPORTS marker and insert imports if needed
- if line == "IMPORTS":
- if need_imports:
- for mod_name in find_imports(outfile.getvalue()):
- imp = "PySide2." + mod_name
- if imp != import_name:
- wr.print("import " + imp)
- wr.print("import " + import_name)
- wr.print()
- wr.print()
- else:
- wr.print(line)
- logger.info(f"Generated: {outfilepath}")
- if is_py3 and (options.check or is_ci):
- # Python 3: We can check the file directly if the syntax is ok.
- subprocess.check_output([sys.executable, outfilepath])
-
-
-def generate_all_pyi(outpath, options):
- ps = os.pathsep
- if options.sys_path:
- # make sure to propagate the paths from sys_path to subprocesses
- sys_path = [os.path.normpath(_) for _ in options.sys_path]
- sys.path[0:0] = sys_path
- pypath = ps.join(sys_path)
- os.environ["PYTHONPATH"] = pypath
-
- # now we can import
- global PySide2, inspect, typing, HintingEnumerator, build_brace_pattern
- import PySide2
- from PySide2.support.signature import inspect, typing
- from PySide2.support.signature.lib.enum_sig import HintingEnumerator
- from PySide2.support.signature.lib.tool import build_brace_pattern
-
- # propagate USE_PEP563 to the mapping module.
- # Perhaps this can be automated?
- PySide2.support.signature.mapping.USE_PEP563 = USE_PEP563
-
- outpath = outpath or os.path.dirname(PySide2.__file__)
- name_list = PySide2.__all__ if options.modules == ["all"] else options.modules
- errors = ", ".join(set(name_list) - set(PySide2.__all__))
- if errors:
- raise ImportError(f"The module(s) '{errors}' do not exist")
- quirk1, quirk2 = "QtMultimedia", "QtMultimediaWidgets"
- if name_list == [quirk1]:
- logger.debug(f"Note: We must defer building of {quirk1}.pyi until {quirk2} is available")
- name_list = []
- elif name_list == [quirk2]:
- name_list = [quirk1, quirk2]
- for mod_name in name_list:
- import_name = "PySide2." + mod_name
- generate_pyi(import_name, outpath, options)
-
-
-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.)")
- 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)")
- parser.add_argument("--sys-path", nargs="+",
- help="a list of strings prepended to sys.path")
- options = parser.parse_args()
- if options.quiet:
- logger.setLevel(logging.WARNING)
- outpath = options.outpath
- if outpath and not os.path.exists(outpath):
- os.makedirs(outpath)
- logger.info(f"+++ Created path {outpath}")
- generate_all_pyi(outpath, options=options)
-# eof
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml
deleted file mode 100644
index fb8e66881..000000000
--- a/sources/pyside2/PySide2/templates/gui_common.xml
+++ /dev/null
@@ -1,307 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem>
- <template name="QFontCharFix">
- int size = Shiboken::String::len(%PYARG_1);
- if (size == 1) {
- const char *str = Shiboken::String::toCString(%PYARG_1);
- QChar ch(str[0]);
- %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(ch);
- %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
- } else {
- PyErr_SetString(PyExc_TypeError, "String must have only one character");
- }
- </template>
-
- <template name="load_xpm">
- Shiboken::AutoDecRef strList(PySequence_Fast(%PYARG_1, "Invalid sequence."));
- int lineCount = PySequence_Fast_GET_SIZE(strList.object());
- for (int line = 0; line &lt; lineCount; ++line) {
- if (!Shiboken::String::check(PySequence_Fast_GET_ITEM(strList.object(), line))) {
- PyErr_SetString(PyExc_TypeError, "The argument must be a sequence of strings.");
- break;
- }
- }
-
- const char **xpm = reinterpret_cast&lt;const char**&gt;(malloc(lineCount * sizeof(const char**)));
- for (int line = 0; line &lt; lineCount; ++line)
- xpm[line] = Shiboken::String::toCString(PySequence_Fast_GET_ITEM(strList.object(), line));
-
- %0 = new %TYPE(xpm);
-
- free(xpm);
- </template>
-
- <template name="qmatrix_map">
- %ARG1_TYPE a, b;
- %CPPSELF.%FUNCTION_NAME(%1, %2, &amp;a, &amp;b);
- %PYARG_0 = PyTuple_New(2);
- PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%ARG1_TYPE](a));
- PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](b));
- </template>
-
- <template name="qimage_buffer_constructor">
- auto ptr = reinterpret_cast&lt;uchar*&gt;(Shiboken::Buffer::getPointer(%PYARG_1));
- %0 = new %TYPE(ptr, %ARGS);
- </template>
-
- <template name="qcolor_repr">
- switch(%CPPSELF.spec()) {
- case QColor::Rgb:
- {
- float r, g, b, a;
- %CPPSELF.getRgbF(&amp;r, &amp;g, &amp;b, &amp;a);
- QString repr = QString::asprintf("PySide2.QtGui.QColor.fromRgbF(%.6f, %.6f, %.6f, %.6f)", r, g, b, a);
- %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
- break;
- }
- case QColor::Hsv:
- {
- float h, s, v, a;
- %CPPSELF.getHsvF(&amp;h, &amp;s, &amp;v, &amp;a);
- QString repr = QString::asprintf("PySide2.QtGui.QColor.fromHsvF(%.6f, %.6f, %.6f, %.6f)", h, s, v, a);
- %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
- break;
- }
- case QColor::Cmyk:
- {
- float c, m, y, k, a;
- %CPPSELF.getCmykF(&amp;c, &amp;m, &amp;y, &amp;k, &amp;a);
- QString repr = QString::asprintf("PySide2.QtGui.QColor.fromCmykF(%.6f, %.6f, %.6f, %.6f, %.6f)", c, m, y, k, a);
- %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
- break;
- }
- case QColor::Hsl:
- {
- float h, s, l, a;
- %CPPSELF.getHslF(&amp;h, &amp;s, &amp;l, &amp;a);
- QString repr = QString::asprintf("PySide2.QtGui.QColor.fromHslF(%.6f, %.6f, %.6f, %.6f)", h, s, l, a);
- %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
- break;
- }
- default:
- {
- %PYARG_0 = Shiboken::String::fromCString("PySide2.QtGui.QColor()");
- }
- }
- </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;
-
- if (PySequence_Check(%PYARG_0)) {
- Shiboken::AutoDecRef seq(PySequence_Fast(%PYARG_0, 0));
- int size = PySequence_Fast_GET_SIZE(seq.object());
-
- if (size > 1) {
- if (%ISCONVERTIBLE[QString](PySequence_Fast_GET_ITEM(seq.object(), 1)))
- %1 = %CONVERTTOCPP[QString](PySequence_Fast_GET_ITEM(seq.object(), 1));
- else
- qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to unicode.");
- }
-
- if (size > 2) {
- if (%ISCONVERTIBLE[int](PySequence_Fast_GET_ITEM(seq.object(), 2)))
- %2 = %CONVERTTOCPP[int](PySequence_Fast_GET_ITEM(seq.object(), 2));
- else
- qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to int.");
- }
- %PYARG_0.reset(PySequence_Fast_GET_ITEM(seq.object(), 0));
- Py_INCREF(%PYARG_0); // we need to incref, because "%PYARG_0 = ..." will decref the tuple and the tuple will be decrefed again at the end of this scope.
- }
-
- // check retrun value
- if (%ISCONVERTIBLE[QValidator::State](%PYARG_0)) {
- %out = %CONVERTTOCPP[QValidator::State](%PYARG_0);
- } else {
- PyErr_Format(PyExc_TypeError, "Invalid return value in function %s, expected %s, got %s.",
- "QValidator.validate",
- "PySide2.QtGui.QValidator.State, (PySide2.QtGui.QValidator.State,), (PySide2.QtGui.QValidator.State, unicode) or (PySide2.QtGui.QValidator.State, unicode, int)",
- Py_TYPE(pyResult)->tp_name);
- return QValidator::State();
- }
- </template>
-
- <template name="qpainter_drawlist">
- %CPPSELF.%FUNCTION_NAME(%1.data(), %1.size());
- </template>
-
- <template name="inplace_add">
- *%CPPSELF += %1;
- return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
- </template>
-
- <template name="inplace_sub">
- *%CPPSELF -= %1;
- return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
- </template>
-
- <template name="inplace_mult">
- *%CPPSELF *= %1;
- return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
- </template>
-
- <template name="inplace_div">
- *%CPPSELF /= %1;
- return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
- </template>
-
- <template name="return_QString_native">
- if (%ISCONVERTIBLE[QString](%PYARG_0))
- %1 = %CONVERTTOCPP[QString](%PYARG_0);
- else
- qWarning("%TYPE::%FUNCTION_NAME: Argument is not convertible to unicode.");
- </template>
-
- <template name="repr_code_matrix">
- QByteArray format(Py_TYPE(%PYSELF)->tp_name);
- format += QByteArray("((");
-
- QList&lt; %MATRIX_TYPE &gt; cppArgs;
- %MATRIX_TYPE data[%MATRIX_SIZE];
- %CPPSELF.copyDataTo(data);
- int matrixSize = %MATRIX_SIZE;
- for(int size=0; size &lt; matrixSize; size++) {
- if (size > 0)
- format += ", ";
- format += QByteArray::number(data[size]);
- }
- format += "))";
-
- %PYARG_0 = Shiboken::String::fromStringAndSize(format, format.size());
- </template>
-
- <template name="reduce_code_matrix">
- QList&lt; %MATRIX_TYPE &gt; cppArgs;
- %MATRIX_TYPE data[%MATRIX_SIZE];
- %CPPSELF.copyDataTo(data);
- int matrixSize = %MATRIX_SIZE;
- for(int size=0; size &lt; matrixSize; size++)
- cppArgs.append(data[size]);
-
- PyObject *type = PyObject_Type(%PYSELF);
- PyObject *args = Py_BuildValue("(N)",
- %CONVERTTOPYTHON[QList&lt;%MATRIX_TYPE&gt; ](cppArgs));
- %PYARG_0 = Py_BuildValue("(NN)", type, args);
- </template>
-
- <template name="matrix_data_function">
- const float* data = %CPPSELF.constData();
- PyObject *pyData = PyTuple_New(%MATRIX_SIZE);
- if (data) {
- for(int i=0; i &lt; %MATRIX_SIZE; i++)
- PyTuple_SET_ITEM(pyData, i, %CONVERTTOPYTHON[float](data[i]));
- }
- return pyData;
- </template>
-
- <template name="matrix_constructor">
- // PYSIDE-795: All PySequences can be made iterable with PySequence_Fast.
- Shiboken::AutoDecRef seq(PySequence_Fast(%PYARG_1, "Can't turn into sequence"));
- if (PySequence_Size(seq) == %SIZE) {
- Shiboken::AutoDecRef fast(PySequence_Fast(seq,
- "Failed to parse sequence on %TYPE constructor."));
- float values[%SIZE];
- for(int i=0; i &lt; %SIZE; i++) {
- PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
- values[i] = %CONVERTTOCPP[float](pv);
- }
- %0 = new %TYPE(values);
- }
- </template>
-
- <template name="fix_args,QRectF*">
- QRectF rect_;
- %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
- %PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
- </template>
-
- <template name="fix_args,QRect*">
- QRect rect_;
- %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
- %PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
- </template>
-
- <template name="__next__">
- if (!%CPPSELF.atEnd()) {
- %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](*%CPPSELF);
- ++(*%CPPSELF);
- }
- </template>
-
- <template name="__iter_parent__">
- %CPPSELF_TYPE _tmp = %CPPSELF.begin();
- %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](_tmp);
- </template>
-
- <template name="const_char_pybuffer">
- PyObject *%out = Shiboken::Buffer::newObject(%in, size);
- </template>
-
- <template name="pybuffer_const_char">
- Py_ssize_t bufferLen;
- char *%out = reinterpret_cast&lt;char*&gt;(Shiboken::Buffer::getPointer(%PYARG_1, &amp;bufferLen));
- </template>
-
- <template name="uint_remove">
- uint %out = bufferLen;
- </template>
-
- <template name="pybytes_const_uchar">
- const uchar *%out = reinterpret_cast&lt;const uchar*>(PyBytes_AS_STRING(%PYARG_1));
- </template>
-
- <template name="pybytes_uint">
- uint %out = static_cast&lt;uint>(PyBytes_Size(%PYARG_1));
- </template>
-
-
-</typesystem>
diff --git a/sources/pyside2/cmake/Macros/PySideModules.cmake b/sources/pyside2/cmake/Macros/PySideModules.cmake
deleted file mode 100644
index bbaeb9ada..000000000
--- a/sources/pyside2/cmake/Macros/PySideModules.cmake
+++ /dev/null
@@ -1,253 +0,0 @@
-include(CMakeParseArguments)
-
-# A version of cmake_parse_arguments that makes sure all arguments are processed and errors out
-# with a message about ${type} having received unknown arguments.
-macro(pyside_parse_all_arguments prefix type flags options multiopts)
- cmake_parse_arguments(${prefix} "${flags}" "${options}" "${multiopts}" ${ARGN})
- if(DEFINED ${prefix}_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unknown arguments were passed to ${type} (${${prefix}_UNPARSED_ARGUMENTS}).")
- endif()
-endmacro()
-
-macro(make_path varname)
- # accepts any number of path variables
- string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
-endmacro()
-
-macro(unmake_path varname)
- string(REPLACE "${PATH_SEP}" ";" ${varname} "${ARGN}")
-endmacro()
-
-# Sample usage
-# create_pyside_module(NAME QtGui
-# INCLUDE_DIRS QtGui_include_dirs
-# LIBRARIES QtGui_libraries
-# DEPS QtGui_deps
-# TYPESYSTEM_PATH QtGui_SOURCE_DIR
-# SOURCES QtGui_SRC
-# STATIC_SOURCES QtGui_static_sources
-# TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
-# DROPPED_ENTRIES QtGui_DROPPED_ENTRIES
-# GLUE_SOURCES QtGui_glue_sources)
-macro(create_pyside_module)
- pyside_parse_all_arguments(
- "module" # Prefix
- "create_pyside_module" # Macro name
- "" # Flags
- "NAME;TYPESYSTEM_PATH;TYPESYSTEM_NAME" # Single value
- "INCLUDE_DIRS;LIBRARIES;DEPS;SOURCES;STATIC_SOURCES;DROPPED_ENTRIES;GLUE_SOURCES" # Multival
- ${ARGN} # Number of arguments given when the macros is called
- )
-
- if ("${module_NAME}" STREQUAL "")
- message(FATAL_ERROR "create_pyside_module needs a NAME value.")
- endif()
- if ("${module_INCLUDE_DIRS}" STREQUAL "")
- message(FATAL_ERROR "create_pyside_module needs at least one INCLUDE_DIRS value.")
- endif()
- if ("${module_TYPESYSTEM_PATH}" STREQUAL "")
- message(FATAL_ERROR "create_pyside_module needs a TYPESYSTEM_PATH value.")
- endif()
- if ("${module_SOURCES}" STREQUAL "")
- message(FATAL_ERROR "create_pyside_module needs at least one SOURCES value.")
- endif()
-
- string(TOLOWER ${module_NAME} _module)
- string(REGEX REPLACE ^qt "" _module ${_module})
-
- if(${module_DROPPED_ENTRIES})
- string(REPLACE ";" "\\;" dropped_entries "${${module_DROPPED_ENTRIES}}")
- else()
- set (dropped_entries "")
- endif()
-
- if(${module_GLUE_SOURCES})
- set (module_GLUE_SOURCES "${${module_GLUE_SOURCES}}")
- else()
- set (module_GLUE_SOURCES "")
- endif()
-
- if (NOT EXISTS ${module_TYPESYSTEM_NAME})
- set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
- else()
- set(typesystem_path ${module_TYPESYSTEM_NAME})
- endif()
-
- # Create typesystem XML dependencies list, so that whenever they change, shiboken is invoked
- # automatically.
- # First add the main file.
- set(total_type_system_files ${typesystem_path})
-
- get_filename_component(typesystem_root "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY)
-
- set(deps ${module_NAME} ${${module_DEPS}})
- foreach(dep ${deps})
- set(glob_expression "${typesystem_root}/${dep}/*.xml")
- file(GLOB type_system_files ${glob_expression})
- set(total_type_system_files ${total_type_system_files} ${type_system_files})
- endforeach(dep)
-
- # Remove any possible duplicates.
- list(REMOVE_DUPLICATES total_type_system_files)
-
- # Contains include directories to pass to shiboken's preprocessor.
- # Workaround: Added ${QT_INCLUDE_DIR}/QtCore until
- # qtdeclarative/8d560d1bf0a747bf62f73fad6b6774095442d9d2 has reached qt5.git
- string(REPLACE ";" ${PATH_SEP} core_includes "${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}")
- set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${core_includes})
- set(shiboken_framework_include_dirs_option "")
- if(CMAKE_HOST_APPLE)
- set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
- make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
- set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
- endif()
-
- # Transform the path separators into something shiboken understands.
- make_path(shiboken_include_dirs ${shiboken_include_dirs})
-
- get_filename_component(pyside_binary_dir ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
-
- # Install module glue files.
- string(TOLOWER ${module_NAME} lower_module_name)
- set(${module_NAME}_glue "${CMAKE_CURRENT_SOURCE_DIR}/../glue/${lower_module_name}.cpp")
- set(${module_name}_glue_dependency "")
- if(EXISTS ${${module_NAME}_glue})
- install(FILES ${${module_NAME}_glue} DESTINATION share/PySide2${pyside2_SUFFIX}/glue)
- set(${module_NAME}_glue_dependency ${${module_NAME}_glue})
- endif()
-
- # Install standalone glue files into typesystems subfolder, so that the resolved relative
- # paths remain correct.
- if (module_GLUE_SOURCES)
- install(FILES ${module_GLUE_SOURCES} DESTINATION share/PySide2${pyside2_SUFFIX}/typesystems/glue)
- endif()
-
- add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
- BYPRODUCTS ${${module_SOURCES}}
- COMMAND Shiboken6::shiboken6 ${GENERATOR_EXTRA_FLAGS}
- "${pyside2_BINARY_DIR}/${module_NAME}_global.h"
- --include-paths=${shiboken_include_dirs}
- ${shiboken_framework_include_dirs_option}
- --typesystem-paths=${pyside_binary_dir}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${${module_TYPESYSTEM_PATH}}
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}
- --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
- ${typesystem_path}
- --api-version=${SUPPORTED_QT_VERSION}
- --drop-type-entries="${dropped_entries}"
- DEPENDS ${total_type_system_files}
- ${module_GLUE_SOURCES}
- ${${module_NAME}_glue_dependency}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMENT "Running generator for ${module_NAME}...")
-
- include_directories(${module_NAME} ${${module_INCLUDE_DIRS}} ${pyside2_SOURCE_DIR})
- add_library(${module_NAME} MODULE ${${module_SOURCES}}
- ${${module_STATIC_SOURCES}})
- set_target_properties(${module_NAME} PROPERTIES
- PREFIX ""
- OUTPUT_NAME "${module_NAME}${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}"
- LIBRARY_OUTPUT_DIRECTORY ${pyside2_BINARY_DIR})
- if(WIN32)
- set_target_properties(${module_NAME} PROPERTIES SUFFIX ".pyd")
- # Sanitize windows.h as pulled by gl.h to prevent clashes with QAbstract3dAxis::min(), etc.
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
- endif()
-
- target_link_libraries(${module_NAME} ${${module_LIBRARIES}})
- target_link_libraries(${module_NAME} Shiboken6::libshiboken)
- if(${module_DEPS})
- add_dependencies(${module_NAME} ${${module_DEPS}})
- endif()
- create_generator_target(${module_NAME})
-
- # build type hinting stubs
-
- # Need to set the LD_ env vars before invoking the script, because it might use build-time
- # libraries instead of install time libraries.
- if (WIN32)
- set(ld_prefix_var_name "PATH")
- elseif(APPLE)
- set(ld_prefix_var_name "DYLD_LIBRARY_PATH")
- else()
- set(ld_prefix_var_name "LD_LIBRARY_PATH")
- endif()
- set(ld_prefix "${ld_prefix_var_name}=${pysidebindings_BINARY_DIR}/libpyside${PATH_SEP}${SHIBOKEN_SHARED_LIBRARY_DIR}")
-
- # Append any existing ld_prefix values, so existing PATH, LD_LIBRARY_PATH, etc.
- # On Windows it is needed because pyside modules import Qt,
- # and the Qt modules are found from PATH.
- # On Linux and macOS, existing values might be set to find system libraries correctly.
- # For example on openSUSE when compiling with icc, libimf.so from Intel has to be found.
- if(WIN32)
- # Get the value of PATH with CMake separators.
- file(TO_CMAKE_PATH "$ENV{${ld_prefix_var_name}}" path_value)
-
- # Replace the CMake list separators with "\;"s, to avoid the PATH values being
- # interpreted as CMake list elements, we actually want to pass the whole string separated
- # by ";" to the command line.
- if(path_value)
- make_path(path_value "${path_value}")
- string(APPEND ld_prefix "${PATH_SEP}${path_value}")
- endif()
- else()
- # Handles both macOS and Linux.
- set(env_value "$ENV{${ld_prefix_var_name}}")
- if(env_value)
- string(APPEND ld_prefix ":${env_value}")
- endif()
- endif()
- set(generate_pyi_options ${module_NAME} --sys-path
- "${pysidebindings_BINARY_DIR}"
- "${SHIBOKEN_PYTHON_MODULE_DIR}")
- if (QUIET_BUILD)
- list(APPEND generate_pyi_options "--quiet")
- endif()
-
- # Add target to generate pyi file, which depends on the module target.
- add_custom_target("${module_NAME}_pyi" ALL
- COMMAND ${CMAKE_COMMAND} -E env ${ld_prefix}
- "${SHIBOKEN_PYTHON_INTERPRETER}"
- "${CMAKE_CURRENT_SOURCE_DIR}/../support/generate_pyi.py" ${generate_pyi_options})
- add_dependencies("${module_NAME}_pyi" ${module_NAME})
-
- # install
- install(TARGETS ${module_NAME} LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}/PySide2")
-
- file(GLOB hinting_stub_files RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/PySide2" "${CMAKE_CURRENT_BINARY_DIR}/PySide2/*.pyi")
- install(FILES ${hinting_stub_files}
- DESTINATION "${PYTHON_SITE_PACKAGES}/PySide2")
-
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide2/${module_NAME}/pyside2_${lower_module_name}_python.h
- DESTINATION include/PySide2${pyside2_SUFFIX}/${module_NAME}/)
- file(GLOB typesystem_files ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_*.xml ${typesystem_path})
-
-# Copy typesystem files and remove module names from the <load-typesystem> element
-# so that it works in a flat directory:
-# <load-typesystem name="QtWidgets/typesystem_widgets.xml" ... ->
-# <load-typesystem name="typesystem_widgets.xml"
- foreach(typesystem_file ${typesystem_files})
- get_filename_component(typesystem_file_name "${typesystem_file}" NAME)
- file(READ "${typesystem_file}" typesystemXml)
- string(REGEX REPLACE "<load-typesystem name=\"[^/\"]+/" "<load-typesystem name=\"" typesystemXml "${typesystemXml}")
- set (typesystem_target_file "${CMAKE_CURRENT_BINARY_DIR}/PySide2/typesystems/${typesystem_file_name}")
- file(WRITE "${typesystem_target_file}" "${typesystemXml}")
- install(FILES "${typesystem_target_file}" DESTINATION share/PySide2${pyside2_SUFFIX}/typesystems)
- endforeach()
-endmacro()
-
-# Only add subdirectory if the associated Qt module is found.
-# As a side effect, this macro now also defines the variable ${name}_GEN_DIR
-# and must be called for every subproject.
-macro(HAS_QT_MODULE var name)
- if (NOT DISABLE_${name} AND ${var})
- # we keep the PySide name here because this is compiled into shiboken
- set(${name}_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}/PySide2/${name}
- CACHE INTERNAL "dir with generated source" FORCE)
- add_subdirectory(${name})
- else()
- # Used on documentation to skip modules
- set("if_${name}" "<!--" PARENT_SCOPE)
- set("end_${name}" "-->" PARENT_SCOPE)
- endif()
-endmacro()
-
diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt
deleted file mode 100644
index 409fde41b..000000000
--- a/sources/pyside2/doc/CMakeLists.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-cmake_minimum_required(VERSION 3.16)
-cmake_policy(VERSION 3.16)
-
-project(doc)
-
-if (WIN32)
- set(PATH_SEP "\;")
-else()
- set(PATH_SEP ":")
-endif()
-
-set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qdoc-output")
-
-get_filename_component(ROOT ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
-set(TS_ROOT "${ROOT}/PySide2")
-
-file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf.in)
-
-set(SHIBOKEN_INTERSPHINX_FILE "${ROOT}/pyside2/shiboken6/objects.inv")
-set(HAS_WEBENGINE_WIDGETS 0)
-set(SKIP_SPHINX_WARNINGS 1)
-if (FULLDOCSBUILD)
- set(SKIP_SPHINX_WARNINGS 0)
- set(SHIBOKEN_INTERSPHINX_FILE "${CMAKE_BINARY_DIR}/doc/html/shiboken6/doc/html/objects.inv")
- # For Qt modules that are part of the documentation build:
- # - Configure the module docconf file
- # - Write shiboken header consisting of pyside2_global.h and module includes
- # - Build include path for qdoc for shiboken
-
- # The last element of the include list is the mkspec directory containing qplatformdefs.h
- list(GET Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS -1 mkspecInclude)
- configure_file("pyside-config.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf" @ONLY)
-
- file(READ "${pyside2_BINARY_DIR}/pyside2_global.h" docHeaderContents)
- file(READ "typesystem_doc.xml.in" typeSystemDocXmlContents)
-
-
- foreach(moduleIn ${all_module_shortnames})
- string(TOLOWER "${moduleIn}" lowerModuleIn)
- set(docConf "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-qt${lowerModuleIn}.qdocconf.in")
- if(EXISTS "${docConf}")
- string(REGEX REPLACE "(^.*)\.in" "\\1" OUTFILE ${docConf})
- get_filename_component(BASENAME ${OUTFILE} NAME)
- configure_file(${docConf} "${CMAKE_CURRENT_LIST_DIR}/qtmodules/${BASENAME}" @ONLY)
- file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/${BASENAME}\n")
- # Handle docconf files in Qt that contain multiple modules
- if ("${moduleIn}" STREQUAL "3DExtras")
- set(modules 3DCore 3DRender 3DInput 3DLogic 3DAnimation "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "QuickWidgets")
- set(modules Qml Quick "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "MultimediaWidgets")
- set(modules Multimedia "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "WebEngineWidgets")
- set(modules WebEngine WebEngineCore "${moduleIn}")
- set(HAS_WEBENGINE_WIDGETS 1)
- else()
- set(modules "${moduleIn}")
- endif()
- foreach(module ${modules})
- string(TOLOWER "${module}" lowerModule)
- # -- @TODO fix this for macOS frameworks.
- file(APPEND "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf"
- " -I ${QT_INCLUDE_DIR}Qt${module} \\\n"
- " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION} \\\n"
- " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION}/Qt${module} \\\n")
-
- if (${moduleIn} STREQUAL "X11Extras")
- set(globalHeader "QX11Info")
- else()
- set(globalHeader "Qt${module}")
- endif()
- set(docHeaderContents "${docHeaderContents}\n#include <Qt${module}/${globalHeader}>")
- set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n<load-typesystem name=\"Qt${module}/typesystem_${lowerModule}.xml\" generate=\"yes\"/>")
- endforeach()
- endif()
- endforeach()
-
- #Appending the additional qdocconf that describes the pyside-examples
- #doc project.
- configure_file("qtmodules/pyside-examples.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-examples.qdocconf" @ONLY)
- file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/pyside-examples.qdocconf\n")
-
- set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n</typesystem>\n")
- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml" "${typeSystemDocXmlContents}")
-
- set(docHeader "${pyside2_BINARY_DIR}/qdoc.h")
- file(WRITE ${docHeader} "${docHeaderContents}")
- configure_file("pyside.qdocconf.in" "pyside.qdocconf" @ONLY)
-
-
- set(QDOC_TYPESYSTEM_PATH "${pyside2_SOURCE_DIR}${PATH_SEP}${pyside2_BINARY_DIR}")
-
- add_custom_target(qdoc
- # Use dummy Qt version information, QDoc needs it but has no effect on WebXML output
- COMMAND ${CMAKE_COMMAND} -E env BUILDDIR=${CMAKE_CURRENT_LIST_DIR}/src QT_INSTALL_DOCS=${QT_SRC_DIR}/doc
- QT_VERSION=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
- QT_VER=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}
- QT_VERSION_TAG=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
- qdoc pyside.qdocconf -single-exec -installdir ${DOC_DATA_DIR} -outputdir ${DOC_DATA_DIR}
- COMMENT "Running qdoc against Qt source code..."
- SOURCE "pyside.qdocconf")
-endif()
-
-# conditional tag for sphinx build
-#string(JOIN "_" SPHINX_TAG ${DOC_OUTPUT_FORMAT} "format")
-# Python script to replace the virtualFolder string in the QHP
-set(py_cmd "from __future__ import print_function
-import fileinput
-import re
-try:
-\tfor line in fileinput.input('html/PySide.qhp',inplace=True,backup='.bak'):
-\t\tline_copy=line.strip()
-\t\tif not line_copy: # check for empty line
-\t\t\tcontinue
-\t\tmatch=re.match('(^.*virtualFolder.)doc(.*$)',line)
-\t\tif match:
-\t\t\trepl=''.join([match.group(1),'pyside2',match.group(2)])
-\t\t\tprint(line.replace(match.group(0),repl),end='')
-\t\telse:
-\t\t\tprint(line)
-except:
-\tpass\n")
-file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_script.py CONTENT ${py_cmd})
-
-add_custom_target(apidoc
- COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b ${DOC_OUTPUT_FORMAT} ${CMAKE_CURRENT_BINARY_DIR}/rst html
- COMMENT "Generating PySide htmls..."
- )
-
-# create a custom commands to copy the shiboken docs
-# and generate offline help based on the output format.
-if(DOC_OUTPUT_FORMAT STREQUAL "html")
- add_custom_command(TARGET apidoc POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken6
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_CURRENT_BINARY_DIR}/../../shiboken6/doc/html
- ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken6
- COMMENT "Copying Shiboken docs..."
- VERBATIM)
-else()
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/html/PySide.qhp QHP_FILE)
- add_custom_command(TARGET apidoc POST_BUILD
- COMMAND ${PYTHON_EXECUTABLE} py_script.py
- COMMAND qhelpgenerator ${QHP_FILE}
- COMMENT "Generating QCH from a QHP file..."
- VERBATIM)
-endif()
-
-# create conf.py based on conf.py.in
-configure_file("conf.py.in" "rst/conf.py" @ONLY)
-
-add_custom_target("docrsts"
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
- COMMAND Shiboken6::shiboken6 --generator-set=qtdoc ${docHeader}
- --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${TS_ROOT}"
- --api-version=${SUPPORTED_QT_VERSION}
- --typesystem-paths="${QDOC_TYPESYSTEM_PATH}"
- --library-source-dir=${QT_SRC_DIR}
- --documentation-data-dir=${DOC_DATA_DIR}/webxml
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
- --documentation-code-snippets-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/doc/src/snippets${PATH_SEP}${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/examples
- --documentation-extra-sections-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/extras
- --additional-documentation=${CMAKE_CURRENT_BINARY_DIR}/rst/additionaldocs.lst
- ${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
- WORKING_DIRECTORY ${${module}_SOURCE_DIR}
- COMMENT "Running generator to generate documentation..."
-)
-
-add_custom_target("licensedocrsts"
- COMMAND ${PYTHON_EXECUTABLE}
- ${CMAKE_CURRENT_LIST_DIR}/qtattributionsscannertorst.py
- ${CMAKE_CURRENT_LIST_DIR}/../../..
- ${CMAKE_CURRENT_BINARY_DIR}/rst/licenses.rst
- COMMENT "Creating 3rdparty license documentation..."
-)
-
-if (FULLDOCSBUILD)
- add_dependencies(apidoc docrsts licensedocrsts)
- add_dependencies(licensedocrsts docrsts)
- add_dependencies(docrsts qdoc)
-endif()
-
-#install files
-add_custom_target(apidocinstall
- COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/PySide2-${BINDING_API_VERSION} && cp -rv ${CMAKE_CURRENT_BINARY_DIR}/html/* ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION}
-)
-
-add_dependencies(apidocinstall apidoc)
diff --git a/sources/pyside2/doc/api.rst b/sources/pyside2/doc/api.rst
deleted file mode 100644
index 337d383b4..000000000
--- a/sources/pyside2/doc/api.rst
+++ /dev/null
@@ -1,90 +0,0 @@
-.. _pyside-api:
-
-|project| Modules
-=================
-
-Basic modules
--------------
-
-These are the main modules that help you build a Widget-based UI.
-
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`Qt Core <PySide2.QtCore>` | Provides core non-GUI functionality, like signal and |
-| | slots, properties, base classes of item models, |
-| | serialization, and more. |
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`Qt GUI <PySide2.QtGui>` | Extends QtCore with GUI functionality: Events, windows |
-| | and screens, OpenGL and raster-based 2D painting, as |
-| | well as images. |
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`Qt Widgets <PySide2.QtWidgets>` | Provides ready to use Widgets for your application, |
-| | including graphical elements for your UI. |
-+---------------------------------------+--------------------------------------------------------+
-
-QML and Qt Quick
-----------------
-
-Use these modules to interact with the `QML Language <https://doc.qt.io/qt-5.qmlapplications>`,
-from Python.
-
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`Qt QML <PySide2.QtQml>` | The base Python API to interact with the |
-| | module. |
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`Qt Quick <PySide2.QtQuick>` | Provides classes to embed Qt Quick in Qt |
-| | applications. |
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`Qt QuickWidgets <PySide2.QtQuickWidgets>` | Provides the QQuickWidget class to embed Qt |
-| | Quick in widget-based applications. |
-+-------------------------------------------------+----------------------------------------------+
-
-Data visualization
-------------------
-
-Charts, diagrams, animations: these modules provide classes to help you include these elements in
-your UI.
-
-+------------------------------------------------------------+-----------------------------------+
-| :mod:`Qt Charts <PySide2.QtCharts>` | Provides a set of easy to use |
-| | chart components. |
-+------------------------------------------------------------+-----------------------------------+
-| :mod:`Qt DataVisualization <PySide2.QtDataVisualization>` | Provides a way to visualize data |
-| | in 3D as bar, scatter, or surface |
-| | graphs. |
-+------------------------------------------------------------+-----------------------------------+
-
-Multimedia
------------
-
-Audio, video, and hardware interaction: use these modules for multimedia solutions.
-
-+------------------------------------------------------------+-----------------------------------+
-| :mod:`Qt Multimedia <PySide2.QtMultimedia>` | Provides low-level multimedia |
-| | functionality. |
-+------------------------------------------------------------+-----------------------------------+
-| :mod:`Qt MultimediaWidgets <PySide2.QtMultimediaWidgets>` | Provides the widget-based |
-| | multimedia API. |
-+------------------------------------------------------------+-----------------------------------+
-
-WebEngine
----------
-
-If your project is based on a browser or the features around Web-based applications, use these
-modules to interact with them.
-
-+---------------------------------------------------------+--------------------------------------+
-| :mod:`Qt WebEngineWidgets <PySide2.QtWebEngineWidgets>` | Provides widgets to handle Web |
-| | content. |
-+---------------------------------------------------------+--------------------------------------+
-| :mod:`Qt WebChannel <PySide2.QtWebChannel>` | Enables peer-to-peer communication |
-| | between a server and a client |
-| | (HTML/JavaScript or QML application).|
-+---------------------------------------------------------+--------------------------------------+
-
-All the modules
----------------
-
-There are many other modules currently supported by |pymodname|, here you can find a complete list
-of them.
-
- :doc:`Check all the modules <modules>`
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py
deleted file mode 100644
index 1cbd56241..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py
+++ /dev/null
@@ -1,105 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-form PySide2.QtGui import *
-
-
-def __init__(self, parent):
- QMainWindow.__init__(self, parent)
- clipboard = QApplication.clipboard()
-
- centralWidget = QWidget(self)
- currentItem = QWidget(centralWidget)
- mimeTypeLabel = QLabel(tr("MIME types:"), currentItem)
- mimeTypeCombo = QComboBox(currentItem)
- dataLabel = QLabel(tr("Data:"), currentItem)
- dataInfoLabel = QLabel("", currentItem)
-
- previousItems = QListWidget(centralWidget)
-
-//! [0]
- clipboard.dataChanged.connect(self.updateClipboard)
-//! [0]
- mimeTypeCombo.activated[str].connect(self.updateData)
-
- currentLayout = QVBoxLayout(currentItem)
- currentLayout.addWidget(mimeTypeLabel)
- currentLayout.addWidget(mimeTypeCombo)
- currentLayout.addWidget(dataLabel)
- currentLayout.addWidget(dataInfoLabel)
- currentLayout.addStretch(1)
-
- mainLayout = QHBoxLayout(centralWidget)
- mainLayout.addWidget(currentItem, 1)
- mainLayout.addWidget(previousItems)
-
- setCentralWidget(centralWidget)
- setWindowTitle(tr("Clipboard"))
-
-//! [1]
-def updateClipboard(self):
- formats = clipboard.mimeData().formats()
- data = clipboard.mimeData().data(format)
-//! [1]
-
- mimeTypeCombo.clear()
- mimeTypeCombo.insertStringList(formats)
-
- size = clipboard.mimeData().data(formats[0]).size()
- Item = QListWidgetItem(previousItems)
- Item.setText(tr("%1 (%2 bytes)").arg(formats[0]).arg(size))
-
- updateData(formats[0])
-//! [2]
-//! [2]
-
-def updateData(self, format)
- data = clipboard.mimeData().data(format)
- dataInfoLabel.setText(tr("%1 bytes").arg(data.size()))
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py
deleted file mode 100644
index 4696bd38b..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtCore
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py
deleted file mode 100644
index 84e7e9189..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [1]
-import PySide2.QtNetwork
-//! [1]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py
deleted file mode 100644
index 63c5665cd..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtOpenGL
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py
deleted file mode 100644
index fb5541603..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 20188888888 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [1]
-import PySide2.QtPrintSupport
-//! [1]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py
deleted file mode 100644
index 3eeb024db..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtQml
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py
deleted file mode 100644
index bf55f0c7e..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtQuick
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py
deleted file mode 100644
index 31849e785..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//! [0]
-import PySide2.QtSql
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py
deleted file mode 100644
index 34dd7bb5a..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtTest
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py
deleted file mode 100644
index a0deee957..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [1]
-import PySide2.QtWidgets
-//! [1]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py
deleted file mode 100644
index 077be436d..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtXml
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
deleted file mode 100644
index c0c703d3d..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-from PySide2.QtCore import QApplication, QTimer
-
-def main():
-
- app = QApplication([])
- QTimer.singleShot(600000, app, SLOT('quit()'))
- ...
- return app.exec_()
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp
deleted file mode 100644
index 7f8a1446b..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import sys
-
-from PySide2.QtGui import QApplication, qRgb
-from PySide2.QtOpenGL import QGLColormap
-
-def main(argv):
- app = QApplication(argv)
-
- widget = MySuperGLWidget() # a QGLWidget in color-index mode
- colormap = QGLColormap()
-
- # This will fill the colormap with colors ranging from
- # black to white.
- for i in range(0, colormap.size()):
- colormap.setEntry(i, qRgb(i, i, i))
-
- widget.setColormap(colormap)
- widget.show()
- return app.exec_()
-
-if __name__ == "__main__":
- main(sys.argv)
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py
deleted file mode 100644
index bfc35e1ee..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtCharts
-//! [0]
-
-//! [3]
-series = QtCharts.QLineSeries()
-series.append(0,6)
-series.append(2,4)
-...
-chartView = QtCharts.QChartView()
-chartView.chart().addSeries(series)
-chartView.chart().createDefaultAxes()
-chartView.show()
-//! [3]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py
deleted file mode 100644
index 11c3cf5e9..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtCore
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py
deleted file mode 100644
index 494145357..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-import PySide2.QtMultimedia
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py
deleted file mode 100644
index c3363e97e..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-//! [0]
-import PySide2.QtXmlPatterns
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp
deleted file mode 100644
index 662852000..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/droparea.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-
-
-DropArea.DropArea(QWidget *parent)
- : QLabel(parent)
-{
- setMinimumSize(200, 200)
- setFrameStyle(QFrame.Sunken | QFrame::StyledPanel)
- setAlignment(Qt.AlignCenter)
- setAcceptDrops(True)
- setAutoFillBackground(True)
- clear()
-}
-
-void DropArea.dragEnterEvent(QDragEnterEvent *event)
-{
- setText(tr("<drop content>"))
- setBackgroundRole(QPalette.Highlight)
-
- event.acceptProposedAction()
- emit changed(event.mimeData())
-}
-
-void DropArea.dragMoveEvent(QDragMoveEvent *event)
-{
- event.acceptProposedAction()
-}
-
-void DropArea.dropEvent(QDropEvent *event)
-{
- const QMimeData *mimeData = event.mimeData()
-
- if (mimeData.hasImage()) {
- setPixmap(qvariant_cast<QPixmap>(mimeData.imageData()))
- } else if (mimeData.hasHtml()) {
- setText(mimeData.html())
- setTextFormat(Qt.RichText)
- } else if (mimeData.hasText()) {
- setText(mimeData.text())
- setTextFormat(Qt.PlainText)
- } else {
- setText(tr("Cannot display data"))
- }
-
- setBackgroundRole(QPalette.Dark)
- event.acceptProposedAction()
-}
-
-//![0]
-def paste(self):
- clipboard = QGuiApplication.clipboard()
- mimeData = clipboard.mimeData()
-
- if mimeData.hasImage():
- setPixmap(mimeData.imageData())
- elif mimeData.hasHtml():
- setText(mimeData.html())
- setTextFormat(Qt.RichText)
- elif (mimeData.hasText():
- setText(mimeData.text())
- setTextFormat(Qt.PlainText)
- else:
- setText(tr("Cannot display data"))
-//![0]
-
- emit changed(mimeData)
- setBackgroundRole(QPalette.Dark)
- //event.acceptProposedAction()
-}
-
-void DropArea.dragLeaveEvent(QDragLeaveEvent *event)
-{
- clear()
- event.accept()
-}
-
-void DropArea.clear()
-{
- setText(tr("<drop content>"))
- setBackgroundRole(QPalette.Dark)
-
- emit changed()
-}
-
-QPixmap DropArea.extractPixmap(const QByteArray &data, const QString &format)
-{
- QList<QByteArray> imageFormats = QImageReader.supportedImageFormats()
- QPixmap pixmap
-
- foreach (QByteArray imageFormat, imageFormats) {
- if (format.mid(6) == QString(imageFormat)) {
- pixmap.loadFromData(data, imageFormat)
- break
- }
- }
- return pixmap
-}
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dropevents/window.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/dropevents/window.py
deleted file mode 100644
index 66a6a7ba2..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dropevents/window.py
+++ /dev/null
@@ -1,65 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtWidgets import QWidget, QComboBox, QFrame, QTextBrowser
-
-class Window(QWidget):
-
- def __init__(self, parent=None):
- self.mimeTypeCombo = QComboBox()
- self.dropFrame = QFrame()
- self.textBrowser = QTextBrowser()
- self.oldText = ""
- self.oldMimeTypes = []
-
- def dragEnterEvent(self, event):
- pass
- def dropEvent(self, event):
- pass
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/myscrollarea.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/myscrollarea.cpp
deleted file mode 100644
index 2e6869cbd..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/myscrollarea.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-import sys
-
-class MyScrollArea (QAbstractScrollArea):
- widget = None
-
- def __init__(widget):
- self.setWidget(widget);
-
- def setWidget(w):
- self.widget = w;
- self.widget.setParent(viewport());
- if not self.widget.testAttribute(Qt.WA_Resized):
- self.widget.resize(widget.sizeHint())
-
- self.verticalScrollBar().setValue(0)
- self.verticalScrollBar().setValue(0)
-
- self.updateArea()
-
-
- def updateWidgetPosition():
-//! [0]
- hvalue = self.horizontalScrollBar().value()
- vvalue = self.verticalScrollBar().value()
- topLeft = self.viewport().rect().topLeft()
-
- self.widget.move(topLeft.x() - hvalue, topLeft.y() - vvalue)
-//! [0]
-
-
- def scrollContentsBy(dx, dy):
- self.updateWidgetPosition()
-
- def updateArea():
-//! [1]
- areaSize = viewport().size()
- widgetSize = widget.size()
-
- self.verticalScrollBar().setPageStep(widgetSize.height())
- self.horizontalScrollBar().setPageStep(widgetSize.width())
- self.verticalScrollBar().setRange(0, widgetSize.height() - areaSize.height())
- self.horizontalScrollBar().setRange(0, widgetSize.width() - areaSize.width())
- self.updateWidgetPosition()
-//! [1]
-
- def resizeEvent(QResizeEvent):
- self.updateArea()
-
-app = QApplication(sys.argv)
-pixmap = QPixmap("mypixmap.png")
-label = QLabel()
-label.setPixmap(pixmap)
-area = MyScrollArea(label)
-area.resize(300, 300)
-area.show()
-
-area.setWidget(label)
-
-app.exec_();
-
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp
deleted file mode 100644
index fc7d278a3..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-from PySide2.QtGui import *
-from PySide2.QtNetwork import QTcpSocket
-
-def main():
- app = QCoreApplication()
-
- socket = QTcpSocket()
- socket.connectToHost("localhost", 1025)
-
-//! [0]
- numRead = 0
- numReadTotal = 0
-
- while(True):
- buffer = socket.read(50)
- # do whatever with array
- numReadTotal += buffer.size()
- if (buffer.size() == 0 && !socket.waitForReadyRead()):
- break
-//! [0]
- return app.exec_()
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp
deleted file mode 100644
index 9bd639913..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-
-from PySide2.QtCore import QDir, QCoreApplication
-import sys
-
-app = QCoreApplication(sys.argv)
-directory = QDir()
-directory.setFilter(QDir.Files | QDir.Hidden | QDir.NoSymLinks)
-directory.setSorting(QDir.Size | QDir.Reversed)
-
-for entry in directory.entryInfoList():
- print "%s %s" % (entry.size(), entry.fileName())
-
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp
deleted file mode 100644
index ab22163ae..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-from PySide2.QtCore import *
-
-def main():
- dir_ = QDir()
- dir_.setFilter(QDir.Files | QDir.Hidden | QDir.NoSymLinks)
- dir_.setSorting(QDir.Size | QDir.Reversed)
-
-//! [0]
- filters = ["*.cpp", "*.cxx", "*.cc"]
- dir_.setNameFilters(filters)
-//! [0]
-//
- lst = d.entryInfoList()
-
- print " Bytes Filename"
- for fileInfo in lst:
- print '%d %s' % (fileInfo.size(), fileInfo.fileName())
-
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py
deleted file mode 100644
index 184128406..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py
+++ /dev/null
@@ -1,87 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the documentation of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtWidgets import QApplication, QWidget, QStackedLayout, QComboBox
-
-class Widget(QWidget)
- def __init__(self, parent=None):
- QWidget.__init__(self, parent)
-//! [0]
- self.firstPageWidget = QWidget()
- self.secondPageWidget = QWidget()
- self.thirdPageWidget = QWidget()
-
- self.stackedLayout = QStackedLayout()
- self.stackedLayout.addWidget(self.firstPageWidget)
- self.stackedLayout.addWidget(self.secondPageWidget)
- self.stackedLayout.addWidget(self.thirdPageWidget)
-
-//! [0] //! [1]
- self.pageComboBox = QComboBox()
- self.pageComboBox.addItem(tr("Page 1"))
- self.pageComboBox.addItem(tr("Page 2"))
- self.pageComboBox.addItem(tr("Page 3"))
- self.pageComboBox.activated.connect(self.stackedLayout.setCurrentIndex)
-//! [1]
-
-//! [2]
- self.mainLayout = QVBoxLayout()
-//! [2]
- self.mainLayout.addWidget(self.pageComboBox)
-//! [3]
- self.mainLayout.addLayout(self.stackedLayout)
- self.setLayout(self.mainLayout)
-//! [3]
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
- widget = Widget()
- widget.show()
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py
deleted file mode 100644
index 141189ad8..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [1]
-import PySide2.QtUiTools
-//! [1]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp
deleted file mode 100644
index 338d131ea..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-"""
- main.cpp
-
- A simple example of how to view a model in several views, and share a
- selection model.
-"""
-
-from PySide2.QtGui import *
-
-
-//! [0] //! [1]
-def main():
- app = QApplication(sys.argv)
- splitter = QSplitter()
-
-//! [2] //! [3]
- model = QFileSystemModel()
- model.setRootPath(QDir.currentPath())
-//! [0] //! [2] //! [4] //! [5]
- tree = QTreeView()
-//! [3] //! [6]
- tree.setModel(model)
-//! [4] //! [6] //! [7]
- tree.setRootIndex(model.index(QDir.currentPath()))
-//! [7]
-
- list = QListView(splitter)
- list.setModel(model)
- list.setRootIndex(model.index(QDir.currentPath()))
-
-//! [5]
- selection = QItemSelectionModel(model)
- tree.setSelectionModel(selection)
- list.setSelectionModel(selection)
-
-//! [8]
- splitter.setWindowTitle("Two views onto the same directory model")
- splitter.show()
- return app.exec_()
-//! [1] //! [8]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py
deleted file mode 100644
index 7c28cf5e6..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py
+++ /dev/null
@@ -1,489 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-from PySide2.QtSql import *
-
-
-def tr(text):
- return QApplication.translate(text, text)
-
-def QSqlDatabase_snippets():
-//! [0]
- db = QSqlDatabase.addDatabase("QPSQL")
- db.setHostName("acidalia")
- db.setDatabaseName("customdb")
- db.setUserName("mojito")
- db.setPassword("J0a1m8")
- ok = db.open()
-//! [0]
-
-//! [1]
- db = QSqlDatabase.database()
-//! [1]
-
-def QSqlField_snippets():
-//! [2]
- field = QSqlField("age", QVariant.Int)
- field.setValue(QPixmap()) # WRONG
-//! [2]
-
-//! [3]
- field = QSqlField("age", QVariant.Int)
- field.setValue(str(123)) # casts str to int
-//! [3]
-
-//! [4]
- query = QSqlQuery()
-//! [4] //! [5]
- record = query.record()
-//! [5] //! [6]
- field = record.field("country")
-//! [6]
-
-def doSomething(str):
- pass
-
-def QSqlQuery_snippets():
- # typical loop
-//! [7]
- query = QSqlQuery("SELECT country FROM artist")
- while query.next():
- country = query.value(0)
- doSomething(country)
-//! [7]
-
-
- # field index lookup
-//! [8]
- query = QSqlQuery("SELECT * FROM artist")
- fieldNo = query.record().indexOf("country")
- while query.next():
- country = query.value(fieldNo)
- doSomething(country)
-//! [8]
-
- # named with named
-//! [9]
- query = QSqlQuery()
- query.prepare("INSERT INTO person (id, forename, surname) "
- "VALUES (:id, :forename, :surname)")
- query.bindValue(":id", 1001)
- query.bindValue(":forename", "Bart")
- query.bindValue(":surname", "Simpson")
- query.exec_()
-//! [9]
-
- # positional with named
-//! [10]
- query = QSqlQuery()
- query.prepare("INSERT INTO person (id, forename, surname) "
- "VALUES (:id, :forename, :surname)")
- query.bindValue(0, 1001)
- query.bindValue(1, "Bart")
- query.bindValue(2, "Simpson")
- query.exec_()
-//! [10]
-
- # positional 1
-//! [11]
- query = QSqlQuery()
- query.prepare("INSERT INTO person (id, forename, surname) "
- "VALUES (?, ?, ?)")
- query.bindValue(0, 1001)
- query.bindValue(1, "Bart")
- query.bindValue(2, "Simpson")
- query.exec_()
-//! [11]
-
- # positional 2
-//! [12]
- query = QSqlQuery()
- query.prepare("INSERT INTO person (id, forename, surname) "
- "VALUES (?, ?, ?)")
- query.addBindValue(1001)
- query.addBindValue("Bart")
- query.addBindValue("Simpson")
- query.exec_()
-//! [12]
-
- # stored
-//! [13]
- query = QSqlQuery()
- query.prepare("CALL AsciiToInt(?, ?)")
- query.bindValue(0, "A")
- query.bindValue(1, 0, QSql.Out)
- query.exec_()
- i = query.boundValue(1) # i is 65
-//! [13]
-
- query = QSqlQuery()
-
- # examine with named binding
-//! [14]
- i = query.boundValues()
- while i.hasNext():
- i.next()
- print i.key(), ": ", i.value()
-//! [14]
-
- # examine with positional binding
-//! [15]
- list_ = query.boundValues().values()
- for item in list:
- print item
-//! [15]
-
-def QSqlQueryModel_snippets():
-
-//! [16]
- model = QSqlQueryModel()
- model.setQuery("SELECT name, salary FROM employee")
- model.setHeaderData(0, Qt.Horizontal, tr("Name"))
- model.setHeaderData(1, Qt.Horizontal, tr("Salary"))
-
-//! [17]
- view = QTableView()
-//! [17] //! [18]
- view.setModel(model)
-//! [18] //! [19]
- view.show()
-//! [16] //! [19] //! [20]
- view.setEditTriggers(QAbstractItemView.NoEditTriggers)
-//! [20]
-
-//! [21]
- model = QSqlQueryModel()
- model.setQuery("SELECT * FROM employee")
- salary = model.record(4).value("salary")
-//! [21]
-
-//! [22]
- salary = model.data(model.index(4, 2))
-//! [22]
-
- for row in range(model.rowCount()):
- for (col in range(model.columnCount())):
- print model.data(model.index(row, col))
-
-
-class MyModel(QSqlQueryModel)
- m_specialColumnNo = 0
- def data(item, role):
-//! [23]
- if item.column() == self.m_specialColumnNo:
- # handle column separately
- pass
-
- return QSqlQueryModel.data(item, role)
-
-//! [23]
-
-
-def QSqlTableModel_snippets():
-
-//! [24]
- model = QSqlTableModel()
- model.setTable("employee")
- model.setEditStrategy(QSqlTableModel.OnManualSubmit)
- model.select()
- model.removeColumn(0) # don't show the ID
- model.setHeaderData(0, Qt.Horizontal, tr("Name"))
- model.setHeaderData(1, Qt.Horizontal, tr("Salary"))
-
- view = QTableView()
- view.setModel(model)
- view.show()
-//! [24]
-
-
-//! [25]
- model = QSqlTableModel()
- model.setTable("employee")
- name = model.record(4).value("name")
-//! [25]
-
-def sql_intro_snippets():
-
-//! [26]
- db = QSqlDatabase.addDatabase("QMYSQL")
- db.setHostName("bigblue")
- db.setDatabaseName("flightdb")
- db.setUserName("acarlson")
- db.setPassword("1uTbSbAs")
- ok = db.open()
-//! [26]
-
-//! [27]
- firstDB = QSqlDatabase.addDatabase("QMYSQL", "first")
- secondDB = QSqlDatabase.addDatabase("QMYSQL", "second")
-//! [27]
-
-//! [28]
- defaultDB = QSqlDatabase.database()
-//! [28] //! [29]
- firstDB = QSqlDatabase.database("first")
-//! [29] //! [30]
- secondDB = QSqlDatabase.database("second")
-//! [30]
-
- # SELECT1
-//! [31]
- query = QSqlQuery()
- query.exec_("SELECT name, salary FROM employee WHERE salary > 50000")
-//! [31]
-
-//! [32]
- while query.next():
- name = query.value(0)
- salary = query.value(1)
- print name, salary
-//! [32]
-
- # FEATURE
-//! [33]
- query = QSqlQuery()
- query.exec_("SELECT name, salary FROM employee WHERE salary > 50000")
-
- defaultDB = QSqlDatabase.database()
- if defaultDB.driver().hasFeature(QSqlDriver.QuerySize):
- numRows = query.size()
- else:
- # self can be very slow
- query.last()
- numRows = query.at() + 1
-//! [33]
-
- # INSERT1
-//! [34]
- query = QSqlQuery()
- query.exec_("INSERT INTO employee (id, name, salary) "
- "VALUES (1001, 'Thad Beaumont', 65000)")
-//! [34]
-
- # NAMED BINDING
-//! [35]
- query = QSqlQuery()
- query.prepare("INSERT INTO employee (id, name, salary) "
- "VALUES (:id, :name, :salary)")
- query.bindValue(":id", 1001)
- query.bindValue(":name", "Thad Beaumont")
- query.bindValue(":salary", 65000)
- query.exec_()
-//! [35]
-
- # POSITIONAL BINDING
-//! [36]
- query = QSqlQuery()
- query.prepare("INSERT INTO employee (id, name, salary) "
- "VALUES (?, ?, ?)")
- query.addBindValue(1001)
- query.addBindValue("Thad Beaumont")
- query.addBindValue(65000)
- query.exec_()
-//! [36]
-
- # UPDATE1
-//! [37]
- query = QSqlQuery()
- query.exec_("UPDATE employee SET salary = 70000 WHERE id = 1003")
-//! [37]
-
- # DELETE1
-//! [38]
- query = QSqlQuery()
- query.exec_("DELETE FROM employee WHERE id = 1007")
-//! [38]
-
- # TRANSACTION
-//! [39]
- QSqlDatabase.database().transaction()
- query = QSqlQuery()
- query.exec_("SELECT id FROM employee WHERE name = 'Torild Halvorsen'")
- if query.next():
- employeeId = query.value(0)
- query.exec_("INSERT INTO project (id, name, ownerid) "
- "VALUES (201, 'Manhattan Project', "
- + str(employeeId) + ')')
-
- QSqlDatabase.database().commit()
-//! [39]
-
- # SQLQUERYMODEL1
-//! [40]
- model = QSqlQueryModel()
- model.setQuery("SELECT * FROM employee")
-
- for i in range(model.rowCount()):
- _id = model.record(i).value("id")
- name = model.record(i).value("name")
- print _id, name
-
-//! [40]
- }
-
- {
- # SQLTABLEMODEL1
-//! [41]
- model = QSqlTableModel()
- model.setTable("employee")
- model.setFilter("salary > 50000")
- model.setSort(2, Qt.DescendingOrder)
- model.select()
-
- for i in range(model.rowCount()):
- name = model.record(i).value("name")
- salary = model.record(i).value("salary")
- print "%s: %d" % (name, salary)
-
-//! [41]
-
- # SQLTABLEMODEL2
- model = QSqlTableModel()
- model.setTable("employee")
-
-//! [42]
- for i in range(model.rowCount()):
- record = model.record(i)
- salary = record.value("salary")
- salary *= 1.1
- record.setValue("salary", salary)
- model.setRecord(i, record)
-
- model.submitAll()
-//! [42]
-
- # SQLTABLEMODEL3
- row = 1
- column = 2
-//! [43]
- model.setData(model.index(row, column), 75000)
- model.submitAll()
-//! [43]
-
- # SQLTABLEMODEL4
-//! [44]
- model.insertRows(row, 1)
- model.setData(model.index(row, 0), 1013)
- model.setData(model.index(row, 1), "Peter Gordon")
- model.setData(model.index(row, 2), 68500)
- model.submitAll()
-//! [44]
-
-//! [45]
- model.removeRows(row, 5)
-//! [45]
-
-//! [46]
- model.submitAll()
-//! [46]
-
-//! [47]
-class XyzResult(QSqlResult):
- def __init__(driver):
- QSqlResult.__init__(self, driver)
- pass
-
- def data(self, index):
- return QVariant()
-
- def isNull(self, index):
- return False
-
- def reset(self, query):
- return False
-
- def fetch(self, index):
- return False
-
- def fetchFirst(self):
- return False
-
- def fetchLast(self):
- return False
-
- def size(self):
- return 0
-
- def numRowsAffected(self):
- return 0
-
- def record(self):
- return QSqlRecord()
-
-//! [47]
-
-//! [48]
-class XyzDriver(QSqlDriver)
- def hasFeature(self, feature):
- return False
-
- def open(self, db, user, password, host, port, options):
- return False
-
- def close(self):
- pass
-
- def createResult(self):
- return XyzResult(self)
-
-//! [48]
-
-def main():
- app = QApplication([])
-
- QSqlDatabase_snippets()
- QSqlField_snippets()
- QSqlQuery_snippets()
- QSqlQueryModel_snippets()
- QSqlTableModel_snippets()
-
- driver = XyzDriver()
- result = XyzResult(driver)
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/timers/timers.cpp b/sources/pyside2/doc/codesnippets/doc/src/snippets/timers/timers.cpp
deleted file mode 100644
index fbbd46a1e..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/timers/timers.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-from PySide2.QtCore import QTimer
-
-class Foo : public QObject
-{
-public:
- Foo()
-}
-
-Foo::Foo()
-{
-//! [0]
- timer = QTimer(self)
-//! [0] //! [1]
- timer.timeout.connect(self.updateCaption)
-//! [1] //! [2]
- timer.start(1000)
-//! [2]
-
-//! [3]
- QTimer.singleShot(200, self.updateCaption)
-//! [3]
-
- {
- // ZERO-CASE
-//! [4]
- timer = QTimer(self)
-//! [4] //! [5]
- timer.timeout.connect(self.processOneThing)
-//! [5] //! [6]
- timer.start()
-//! [6]
- }
-}
-
-int main()
-{
-
-}
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py b/sources/pyside2/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py
deleted file mode 100644
index d38829fc7..000000000
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py
+++ /dev/null
@@ -1,66 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the documentation of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-//! [main.cpp body]
-import sys
-from PySide2.QtWidgets import QApplication
-
-# Include header files for application components.
-# ...
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- # Set up and show widgets.
- # ...
-
- sys.exit(app.exec_())
-}
-//! [main.cpp body]
diff --git a/sources/pyside2/doc/codesnippets/examples/dbus/example-client.py b/sources/pyside2/doc/codesnippets/examples/dbus/example-client.py
deleted file mode 100755
index 52ad7335a..000000000
--- a/sources/pyside2/doc/codesnippets/examples/dbus/example-client.py
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the documentation of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## # Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## # Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## # Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# -*- coding: utf-8 -*-
-
-# DBUS Client using PySide integration
-
-import sys
-from traceback import print_exc
-
-# import python dbus module
-import dbus
-# import python dbus GLib mainloop support
-import dbus.mainloop.glib
-# import QtCore
-from PySide2.QtCore import *
-
-# signal handler
-def button_clicked():
- print "button clicked"
-
-# main function
-if __name__ == '__main__':
-
- # Enable glib main loop support
- dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
- # Get the session bus
- bus = dbus.SessionBus()
-
- try:
- # Get the remote object
- remote_object = bus.get_object("com.example.SampleService",
- "/DBusWidget")
- # Get the remote interface for the remote object
- iface = dbus.Interface(remote_object, "com.example.SampleWidget")
- except dbus.DBusException:
- print_exc()
- sys.exit(1)
-
- # Start the application
- app = QCoreApplication([])
-
- # Call some methods of the remote interface
- iface.show()
- iface.setText("Emit signal")
- # connect the DBus signal clicked to the function button_clicked
- iface.connect_to_signal("clicked", button_clicked)
- iface.connect_to_signal("lastWindowClosed", app.quit)
-
- # enter in the main loop
- app.exec_()
diff --git a/sources/pyside2/doc/codesnippets/examples/dbus/example-server.py b/sources/pyside2/doc/codesnippets/examples/dbus/example-server.py
deleted file mode 100755
index c42b8697c..000000000
--- a/sources/pyside2/doc/codesnippets/examples/dbus/example-server.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the documentation of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## # Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## # Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## # Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# -*- coding: utf-8 -*-
-
-# DBUS Server Example of use PySide with PyDBus library
-
-import dbus
-import dbus.service
-import dbus.mainloop.glib
-import random
-
-from PySide2.QtCore import *
-from PySide2.QtGui import QPushButton, QApplication
-
-# The adaptor, MUST inherit dbus.service.Object
-class DBusWidget(dbus.service.Object):
- def __init__(self, name, session):
- # export this object to dbus
- dbus.service.Object.__init__(self, name, session)
-
- # create a simple widget
- self.widget = QPushButton()
- self.widget.resize(200, 50)
-
- # To export a Qt signal as a DBus-signal, you need to connect it to a method in this class.
- # The method MUST have the signal annotation, so python-dbus will export it as a dbus-signal
- QObject.connect(self.widget, SIGNAL("clicked()"), self.clicked)
- QObject.connect(QApplication.instance(), SIGNAL("lastWindowClosed()"), self.lastWindowClosed)
-
- # You can export methods to dbus like you do in python-dbus.
- @dbus.service.method("com.example.SampleWidget", in_signature='', out_signature='')
- def show(self):
- self.widget.show()
-
- # Another method... now with a parameter
- @dbus.service.method("com.example.SampleWidget", in_signature='s', out_signature='')
- def setText(self, value):
- self.widget.setText(value)
-
- # Another one...
- @dbus.service.method("com.example.SampleWidget", in_signature='', out_signature='')
- def exit(self):
- qApp().quit()
-
- # A signal that will be exported to dbus
- @dbus.service.signal("com.example.SampleWidget", signature='')
- def clicked(self):
- pass
-
- # Another signal that will be exported to dbus
- @dbus.service.signal("com.example.SampleWidget", signature='')
- def lastWindowClosed(self):
- pass
-
-
-if __name__ == '__main__':
- app = QApplication([])
- # Use qt/glib mainloop integration to get dbus mainloop working
- dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-
- session_bus = dbus.SessionBus()
- # Export the service
- name = dbus.service.BusName("com.example.SampleService", session_bus)
- # Export the object
- widget = DBusWidget(session_bus, '/DBusWidget')
-
- print "Running example service."
- app.exec_()
-
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.py b/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.py
deleted file mode 100644
index 1872e631b..000000000
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.py
+++ /dev/null
@@ -1,119 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-
-from PySide2.QtGui import *
-
-//! [0]
-def __init__(self, parent):
- QDialog.__init__(self, parent)
- label = QLabel(self.tr("Find &what:"))
- lineEdit = QLineEdit()
- label.setBuddy(lineEdit)
-
- caseCheckBox = QCheckBox(self.tr("Match &case"))
- fromStartCheckBox = QCheckBox(self.tr("Search from &start"))
- fromStartCheckBox.setChecked(True)
-
-//! [1]
- findButton = QPushButton(self.tr("&Find"))
- findButton.setDefault(True)
-
- moreButton = QPushButton(self.tr("&More"))
- moreButton.setCheckable(True)
-//! [0]
- moreButton.setAutoDefault(False)
-
- buttonBox = QDialogButtonBox(Qt.Vertical)
- buttonBox.addButton(findButton, QDialogButtonBox.ActionRole)
- buttonBox.addButton(moreButton, QDialogButtonBox.ActionRole)
-//! [1]
-
-//! [2]
- extension = QWidget()
-
- wholeWordsCheckBox = QCheckBox(self.tr("&Whole words"))
- backwardCheckBox = QCheckBox(self.tr("Search &backward"))
- searchSelectionCheckBox = QCheckBox(self.tr("Search se&lection"))
-//! [2]
-
-//! [3]
- moreButton.toggled[bool].connect(extension.setVisible)
-
- extensionLayout = QVBoxLayout()
- extensionLayout.setMargin(0)
- extensionLayout.addWidget(wholeWordsCheckBox)
- extensionLayout.addWidget(backwardCheckBox)
- extensionLayout.addWidget(searchSelectionCheckBox)
- extension.setLayout(extensionLayout)
-//! [3]
-
-//! [4]
- topLeftLayout = QHBoxLayout()
- topLeftLayout.addWidget(label)
- topLeftLayout.addWidget(lineEdit)
-
- leftLayout = QVBoxLayout()
- leftLayout.addLayout(topLeftLayout)
- leftLayout.addWidget(caseCheckBox)
- leftLayout.addWidget(fromStartCheckBox)
- leftLayout.addSself.tretch(1)
-
- mainLayout = QGridLayout()
- mainLayout.setSizeConsself.traint(QLayout.SetFixedSize)
- mainLayout.addLayout(leftLayout, 0, 0)
- mainLayout.addWidget(buttonBox, 0, 1)
- mainLayout.addWidget(extension, 1, 0, 1, 2)
- setLayout(mainLayout)
-
- setWindowTitle(self.tr("Extension"))
-//! [4] //! [5]
- extension.hide()
-//! [5]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h
deleted file mode 100644
index d2cda4aa2..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QMainWindow, QMenu,
- QPlainTextEdit, QSessionManager)
-
-
-//! [0]
-class MainWindow(QMainWindow):
- def __init__(self, parent=None):
- self.textEdit = QPlainTextEdit()
- self.curFile = ""
- # ...
-
- def loadFile(self, fileName):
- pass
-
- def closeEvent(self, event):
- pass
-
- def newFile(self):
- pass
-
- def open(self):
- pass
-
- def save(self):
- pass
-
- def saveAs(self):
- pass
-
- def about(self):
- pass
-
- def documentWasModified(self):
- pass
- # Enable this only if QT_NO_SESSIONMANAGER is not defined
- # def commitData(self):
- # pass
-
- def createActions(self):
- pass
-
- def createStatusBar(self):
- pass
-
- def readSettings(self):
- pass
-
- def writeSettings(self):
- pass
-
- def maybeSave(self):
- pass
-
- def saveFile(self, fileName):
- pass
-
- def setCurrentFile(self, fileName):
- pass
-
- def strippedName(self, fullFileName):
- pass
-//! [0]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.py b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.py
deleted file mode 100644
index f976bb8e3..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.py
+++ /dev/null
@@ -1,357 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-//! [0]
-from PySide2.QtCore import Qt, QFile, QFileInfo, QSettings, QTextStream
-from PySide2.QtGui import QIcon
-from PySide2.Widgets import (QAction, QApplication, QFileDialog, QMainWindow,
- QPlainTextEdit, QFileDialog, QMessageBox, )
-//! [0]
-
-//! [1]
-def __init__(self, parent=None):
- QMainWindow.__init__(self)
-//! [1] //! [2]
- self.textEdit = QPlainTextEdit()
- self.setCentralWidget(textEdit)
-
- self.createActions()
- self.createMenus()
- self.createToolBars()
- self.createStatusBar()
-
- self.readSettings()
-
- self.textEdit.document().contentsChanged.connect(self.documentWasModified)
-
- self.setCurrentFile("")
- self.setUnifiedTitleAndToolBarOnMac(True)
-
-//! [2]
-
-//! [3]
-def closeEvent(self, event):
-//! [3] //! [4]
- if maybeSave():
- writeSettings()
- event.accept()
- else:
- event.ignore()
-//! [4]
-
-//! [5]
-def File(self):
-//! [5] //! [6]
- if maybeSave():
- textEdit.clear()
- setCurrentFile("")
-//! [6]
-
-//! [7]
-def open(self):
-//! [7] //! [8]
- if maybeSave():
- fileName = QFileDialog.getOpenFileName(self)
- if not fileName.isEmpty():
- loadFile(fileName)
-//! [8]
-
-//! [9]
-def save(self):
-//! [9] //! [10]
- if curFile.isEmpty():
- return saveAs()
- else:
- return saveFile(curFile)
-//! [10]
-
-//! [11]
-def saveAs(self):
-//! [11] //! [12]
- fileName = QFileDialog.getSaveFileName(self)
- if fileName.isEmpty():
- return False
-
- return saveFile(fileName)
-//! [12]
-
-//! [13]
-def about(self):
-//! [13] //! [14]
- QMessageBox.about(self, tr("About Application"),
- tr("The <b>Application</b> example demonstrates how to "
- "write modern GUI applications using Qt, with a menu bar, "
- "toolbars, and a status bar."))
-
-//! [14]
-
-//! [15]
-def documentWasModified(self):
-//! [15] //! [16]
- setWindowModified(textEdit.document().isModified())
-//! [16]
-
-//! [17]
-def MainWindow.createActions(self):
-//! [17] //! [18]
- Act = QAction(QIcon(":/images/new.png"), tr("&New"), self)
- Act.setShortcuts(QKeySequence.New)
- Act.setStatusTip(tr("Create a new file"))
- Act.triggered.connect(newFile)
-
-//! [19]
- openAct = QAction(QIcon(":/images/open.png"), tr("&Open..."), self)
- openAct.setShortcuts(QKeySequence.Open)
- openAct.setStatusTip(tr("Open an existing file"))
- openAct.triggered.connect(open)
-//! [18] //! [19]
-
- saveAct = QAction(QIcon(":/images/save.png"), tr("&Save"), self)
- saveAct.setShortcuts(QKeySequence.Save)
- saveAct.setStatusTip(tr("Save the document to disk"))
- saveAct.triggered.connect(save)
-
- saveAsAct = QAction(tr("Save &As..."), self)
- saveAsAct.setShortcuts(QKeySequence.SaveAs)
- saveAsAct.setStatusTip(tr("Save the document under a name"))
- saveAsAct.triggered.connect(saveAs)
-
-//! [20]
- exitAct = QAction(tr("E&xit"), self)
- exitAct.setShortcut(tr("Ctrl+Q"))
-//! [20]
- exitAct.setStatusTip(tr("Exit the application"))
- exitAct.triggered.connect(close)
-
-//! [21]
- cutAct = QAction(QIcon(":/images/cut.png"), tr("Cu&t"), self)
-//! [21]
- cutAct.setShortcuts(QKeySequence.Cut)
- cutAct.setStatusTip(tr("Cut the current selection's contents to the "
- "clipboard"))
- cutAct.triggered.connect(cut)
-
- copyAct = QAction(QIcon(":/images/copy.png"), tr("&Copy"), self)
- copyAct.setShortcuts(QKeySequence.Copy)
- copyAct.setStatusTip(tr("Copy the current selection's contents to the "
- "clipboard"))
- copyAct.triggered.connect(copy)
-
- pasteAct = QAction(QIcon(":/images/paste.png"), tr("&Paste"), self)
- pasteAct.setShortcuts(QKeySequence.Paste)
- pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
- "selection"))
- pasteAct.triggered.connect(textEdit.paste)
-
- aboutAct = QAction(tr("&About"), self)
- aboutAct.setStatusTip(tr("Show the application's About box"))
- aboutAct.triggered.connect(about)
-
-//! [22]
- aboutQtAct = QAction(tr("About &Qt"), self)
- aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
- aboutQtAct.triggered.connect(qApp.aboutQt)
-//! [22]
-
-//! [23]
- cutAct.setEnabled(False)
-//! [23] //! [24]
- copyAct.setEnabled(False)
- textEdit.copyAvailable[bool].connect(cutAct.setEnabled)
- textEdit.copyAvailable[bool].connect(copyAct.setEnabled)
-}
-//! [24]
-
-//! [25] //! [26]
-def createMenus(self):
-//! [25] //! [27]
- fileMenu = menuBar().addMenu(tr("&File"))
- fileMenu.addAction(Act)
-//! [28]
- fileMenu.addAction(openAct)
-//! [28]
- fileMenu.addAction(saveAct)
-//! [26]
- fileMenu.addAction(saveAsAct)
- fileMenu.addSeparator()
- fileMenu.addAction(exitAct)
-
- editMenu = menuBar().addMenu(tr("&Edit"))
- editMenu.addAction(cutAct)
- editMenu.addAction(copyAct)
- editMenu.addAction(pasteAct)
-
- menuBar().addSeparator()
-
- helpMenu = menuBar().addMenu(tr("&Help"))
- helpMenu.addAction(aboutAct)
- helpMenu.addAction(aboutQtAct)
-
-//! [27]
-
-//! [29] //! [30]
-def createToolBars(self):
- fileToolBar = addToolBar(tr("File"))
- fileToolBar.addAction(Act)
-//! [29] //! [31]
- fileToolBar.addAction(openAct)
-//! [31]
- fileToolBar.addAction(saveAct)
-
- editToolBar = addToolBar(tr("Edit"))
- editToolBar.addAction(cutAct)
- editToolBar.addAction(copyAct)
- editToolBar.addAction(pasteAct)
-//! [30]
-
-//! [32]
-def createStatusBar(self):
-//! [32] //! [33]
- statusBar().showMessage(tr("Ready"))
-
-//! [33]
-
-//! [34] //! [35]
-def readSettings(self):
-//! [34] //! [36]
- settings("Trolltech", "Application Example")
- pos = settings.value("pos", QPoint(200, 200)).toPoint()
- size = settings.value("size", QSize(400, 400)).toSize()
- resize(size)
- move(pos)
-
-//! [35] //! [36]
-
-//! [37] //! [38]
-def writeSettings(self):
-//! [37] //! [39]
- settings = QSettings("Trolltech", "Application Example")
- settings.setValue("pos", pos())
- settings.setValue("size", size())
-
-//! [38] //! [39]
-
-//! [40]
-def maybeSave(self):
-//! [40] //! [41]
- if textEdit.document()->isModified():
- ret = QMessageBox.warning(self, tr("Application"),
- tr("The document has been modified.\n"
- "Do you want to save your changes?"),
- QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
- if ret == QMessageBox.Save:
- return save()
- elif ret == QMessageBox.Cancel:
- return False
- return True
-//! [41]
-
-//! [42]
-def loadFile(self, fileName):
-//! [42] //! [43]
- file = QFile(fileName)
- if !file.open(QFile.ReadOnly | QFile.Text):
- QMessageBox.warning(self, tr("Application"), tr("Cannot read file "
- "{}:\n{}.".format(fileName, file.errorString())))
- return
-
- in = QTextStream(file)
- QApplication.setOverrideCursor(Qt::WaitCursor)
- textEdit.setPlainText(in.readAll())
- QApplication.restoreOverrideCursor()
-
- self.setCurrentFile(fileName)
- self.statusBar().showMessage(tr("File loaded"), 2000)
-
-//! [43]
-
-//! [44]
-def saveFile(self, fileName):
-//! [44] //! [45]
- file = QFile(fileName)
- if !file.open(QFile.WriteOnly | QFile::Text):
- QMessageBox.warning(self, tr("Application"),
- tr("Cannot write file %1:\n%2.")
- .arg(fileName)
- .arg(file.errorString()))
- return False
-
- out = QTextStream(file)
- QApplication.setOverrideCursor(Qt.WaitCursor)
- out << textEdit.toPlainText()
- QApplication.restoreOverrideCursor()
-
- setCurrentFile(fileName)
- statusBar().showMessage(tr("File saved"), 2000)
- return True
-
-//! [45]
-
-//! [46]
-def setCurrentFile(fileName):
-//! [46] //! [47]
- curFile = fileName
- textEdit.document().setModified(False)
- setWindowModified(False)
-
- if curFile.isEmpty():
- shownName = "untitled.txt"
- else:
- shownName = strippedName(curFile)
-
- setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Application")))
-
-//! [47]
-
-//! [48]
-def strippedName(self, fullFileName):
-//! [48] //! [49]
- return QFileInfo(fullFileName).fileName()
-//! [49]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py b/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py
deleted file mode 100644
index 55d551c24..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py
+++ /dev/null
@@ -1,253 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-//! [0]
-from PySide2.QtGui import *
-//! [0]
-
-//! [1]
-def __init__(self):
- textEdit = QTextEdit()
- setCentralWidget(textEdit)
-
- createActions()
- createMenus()
- createToolBars()
- createStatusBar()
- createDockWindows()
-
- setWindowTitle(tr("Dock Widgets"))
-
- Letter()
- setUnifiedTitleAndToolBarOnMac(True)
-//! [1]
-
-//! [2]
-def Letter(self)
- textEdit.clear()
-
- cursor = QTextCursor(textEdit.textCursor())
- cursor.movePosition(QTextCursor.Start)
- topFrame = cursor.currentFrame()
- topFrameFormat = topFrame.frameFormat()
- topFrameFormat.setPadding(16)
- topFrame.setFrameFormat(topFrameFormat)
-
- textFormat = QTextCharFormat()
- boldFormat = QTextCharFormat()
- boldFormat.setFontWeight(QFont.Bold)
- italicFormat = QTextCharFormat()
- italicFormat.setFontItalic(True)
-
- tableFormat = QTextTableFormat()
- tableFormat.setBorder(1)
- tableFormat.setCellPadding(16)
- tableFormat.setAlignment(Qt.AlignRight)
- cursor.insertTable(1, 1, tableFormat)
- cursor.insertText("The Firm", boldFormat)
- cursor.insertBlock()
- cursor.insertText("321 City Street", textFormat)
- cursor.insertBlock()
- cursor.insertText("Industry Park")
- cursor.insertBlock()
- cursor.insertText("Some Country")
- cursor.setPosition(topFrame.lastPosition())
- cursor.insertText(QDate.currentDate().toString("d MMMM yyyy"), textFormat)
- cursor.insertBlock()
- cursor.insertBlock()
- cursor.insertText("Dear ", textFormat)
- cursor.insertText("NAME", italicFormat)
- cursor.insertText(",", textFormat)
- for i in range(3):
- cursor.insertBlock()
- cursor.insertText(tr("Yours sincerely,"), textFormat)
- for i in range(3):
- cursor.insertBlock()
- cursor.insertText("The Boss", textFormat)
- cursor.insertBlock()
- cursor.insertText("ADDRESS", italicFormat)
-//! [2]
-
-//! [3]
-def print(self)
- document = textEdit.document()
- printer = QPrinter()
-
- dlg = QPrintDialog(&printer, self)
- if dlg.exec() != QDialog.Accepted:
- return
-
- document.print(printer)
- statusBar().showMessage(tr("Ready"), 2000)
-//! [3]
-
-//! [4]
-def save(self):
- fileName = QFileDialog.getSaveFileName(self,
- tr("Choose a file name"), ".",
- tr("HTML (*.html *.htm)"))
- if fileName.isEmpty():
- return
- file = QFile(fileName)
- if !file.open(QFile.WriteOnly | QFile::Text):
- QMessageBox.warning(self, tr("Dock Widgets"),
- tr("Cannot write file %1:\n%2.")
- .arg(fileName)
- .arg(file.errorString()))
- return
-
-
- out = QTextStream(file)
- QApplication.setOverrideCursor(Qt::WaitCursor)
- out << textEdit.toHtml()
- QApplication.restoreOverrideCursor()
-
- statusBar().showMessage(tr("Saved '%1'").arg(fileName), 2000)
-
-//! [4]
-
-//! [5]
-def undo(self):
- document = textEdit.document()
- document.undo()
-
-//! [5]
-
-//! [6]
-def insertCustomer(self, customer):
- if customer.isEmpty():
- return
-
- customerList = customer.split(", ")
- document = textEdit.document()
- cursor = document.find("NAME")
- if not cursor.isNull():
- cursor.beginEditBlock()
- cursor.insertText(customerList.at(0))
- oldcursor = cursor
- cursor = document.find("ADDRESS")
- if not cursor.isNull():
- for i in range(customerList.size()):
- cursor.insertBlock()
- cursor.insertText(customerList.at(i))
-
- cursor.endEditBlock()
- else:
- oldcursor.endEditBlock()
-//! [6]
-
-//! [7]
-def addParagraph(self, paragraph):
- if (paragraph.isEmpty())
- return
-
- document = textEdit.document()
- cursor = document.find(tr("Yours sincerely,"))
- if cursor.isNull():
- return
- cursor.beginEditBlock()
- cursor.movePosition(QTextCursor.PreviousBlock, QTextCursor.MoveAnchor, 2)
- cursor.insertBlock()
- cursor.insertText(paragraph)
- cursor.insertBlock()
- cursor.endEditBlock()
-
-//! [7]
-
-
-//! [8]
-def createStatusBar(self):
- statusBar().showMessage(tr("Ready"))
-
-//! [8]
-
-//! [9]
-def createDockWindows(self):
- dock = QDockWidget(tr("Customers"), self)
- dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
- customerList = QListWidget(dock)
- customerList.addItems(QStringList()
- << "John Doe, Harmony Enterprises, 12 Lakeside, Ambleton"
- << "Jane Doe, Memorabilia, 23 Watersedge, Beaton"
- << "Tammy Shea, Tiblanka, 38 Sea Views, Carlton"
- << "Tim Sheen, Caraba Gifts, 48 Ocean Way, Deal"
- << "Sol Harvey, Chicos Coffee, 53 New Springs, Eccleston"
- << "Sally Hobart, Tiroli Tea, 67 Long River, Fedula")
- dock.setWidget(customerList)
- addDockWidget(Qt.RightDockWidgetArea, dock)
- viewMenu.addAction(dock.toggleViewAction())
-
- dock = QDockWidget(tr("Paragraphs"), self)
- paragraphsList = QListWidget(dock)
- paragraphsList.addItems(QStringList()
- << "Thank you for your payment which we have received today."
- << "Your order has been dispatched and should be with you "
- "within 28 days."
- << "We have dispatched those items that were in stock. The "
- "rest of your order will be dispatched once all the "
- "remaining items have arrived at our warehouse. No "
- "additional shipping charges will be made."
- << "You made a small overpayment (less than $5) which we "
- "will keep on account for you, or return at your request."
- << "You made a small underpayment (less than $1), but we have "
- "sent your order anyway. We'll add self underpayment to "
- "your next bill."
- << "Unfortunately you did not send enough money. Please remit "
- "an additional $. Your order will be dispatched as soon as "
- "the complete amount has been received."
- << "You made an overpayment (more than $5). Do you wish to "
- "buy more items, or should we return the excess to you?")
- dock.setWidget(paragraphsList)
- addDockWidget(Qt.RightDockWidgetArea, dock)
- viewMenu.addAction(dock.toggleViewAction())
-
- customerList.currentTextChanged[str].connect(self.insertCostumer)
- paragraphsList.currentTextChanged[str].connect(self.addParagraph)
-//! [9]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.py b/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.py
deleted file mode 100644
index b0bbed810..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.py
+++ /dev/null
@@ -1,366 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-
-//! [0]
-def __init__(self):
- Q__init__(self)
-
- widget = QWidget()
- setCentralWidget(widget)
-//! [0]
-
-//! [1]
- topFiller = QWidget()
- topFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
-
- infoLabel = QLabel(tr("<i>Choose a menu option, or right-click to "
- "invoke a context menu</i>"))
- infoLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
- infoLabel.setAlignment(Qt.AlignCenter)
-
- bottomFiller = QWidget()
- bottomFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
-
- layout = QVBoxLayout()
- layout.setMargin(5)
- layout.addWidget(topFiller)
- layout.addWidget(infoLabel)
- layout.addWidget(bottomFiller)
- widget.setLayout(layout)
-//! [1]
-
-//! [2]
- createActions()
- createMenus()
-
- message = tr("A context menu is available by right-clicking")
- statusBar().showMessage(message)
-
- setWindowTitle(tr("Menus"))
- setMinimumSize(160, 160)
- resize(480, 320)
-
-//! [2]
-
-//! [3]
-def contextMenuEvent(self, event):
- menu = QMenu(self)
- menu.addAction(cutAct)
- menu.addAction(copyAct)
- menu.addAction(pasteAct)
- menu.exec_(event.globalPos()")
-
-//! [3]
-
-def File(self):
- infoLabel.setText(tr("Invoked <b>File|New</b>"))
-
-
-def open(self):
- infoLabel.setText(tr("Invoked <b>File|Open</b>"))
-
-
-def save(self):
- infoLabel.setText(tr("Invoked <b>File|Save</b>"))
-
-def print_(self):
- infoLabel.setText(tr("Invoked <b>File|Print</b>"))
-
-def undo(self):
- infoLabel.setText(tr("Invoked <b>Edit|Undo</b>"))
-
-def redo(self):
- infoLabel.setText(tr("Invoked <b>Edit|Redo</b>"))
-
-def cut(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Cut</b>"))
-
-
-def copy(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Copy</b>"))
-
-
-def paste(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Paste</b>"))
-
-
-def bold(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Bold</b>"))
-
-
-def italic(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Italic</b>"))
-
-
-def leftAlign(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Left Align</b>"))
-
-
-def rightAlign(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Right Align</b>"))
-
-
-def justify(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Justify</b>"))
-
-
-def center(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Center</b>"))
-
-
-def setLineSpacing(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Set Line Spacing</b>"))
-
-
-def setParagraphSpacing(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Set Paragraph Spacing</b>"))
-
-
-def about(self):
-
- infoLabel.setText(tr("Invoked <b>Help|About</b>"))
- QMessageBox.about(self, tr("About Menu"),
- tr("The <b>Menu</b> example shows how to create "
- "menu-bar menus and context menus."))
-
-
-def aboutQt(self):
-
- infoLabel.setText(tr("Invoked <b>Help|About Qt</b>"))
-
-
-//! [4]
-def createActions(self):
-
-//! [5]
- Act = new QAction(tr("&New"), self)
- Act.setShortcuts(QKeySequence.New)
- Act.setStatusTip(tr("Create a new file"))
- Act.triggered.connect(newFile)
-//! [4]
-
- openAct = QAction(tr("&Open..."), self)
- openAct.setShortcuts(QKeySequence.Open)
- openAct.setStatusTip(tr("Open an existing file"))
- openAct.triggered.connect(open)
-//! [5]
-
- saveAct = QAction(tr("&Save"), self)
- saveAct.setShortcuts(QKeySequence.Save)
- saveAct.setStatusTip(tr("Save the document to disk"))
- saveAct.triggered.connect(save)
-
- printAct = QAction(tr("&Print..."), self)
- printAct.setShortcuts(QKeySequence.Print)
- printAct.setStatusTip(tr("Print the document"))
- printAct.triggered.connect(print_)
-
- exitAct = QAction(tr("E&xit"), self)
- exitAct.setShortcut(tr("Ctrl+Q"))
- exitAct.setStatusTip(tr("Exit the application"))
- exitAct.triggered.connect(close)
-
- undoAct = QAction(tr("&Undo"), self)
- undoAct.setShortcuts(QKeySequence.Undo)
- undoAct.setStatusTip(tr("Undo the last operation"))
- undoAct.triggered.connect(undo)
-
- redoAct = QAction(tr("&Redo"), self)
- redoAct.setShortcuts(QKeySequence.Redo)
- redoAct.setStatusTip(tr("Redo the last operation"))
- redoAct.triggered.connect(redo)
-
- cutAct = QAction(tr("Cu&t"), self)
- cutAct.setShortcuts(QKeySequence.Cut)
- cutAct.setStatusTip(tr("Cut the current selection's contents to the "
- "clipboard"))
- cutAct.triggered.connect(cut)
-
- copyAct = QAction(tr("&Copy"), self)
- copyAct.setShortcut(tr("Ctrl+C"))
- copyAct.setStatusTip(tr("Copy the current selection's contents to the "
- "clipboard"))
- copyAct.triggered.connect(copy)
-
- pasteAct = QAction(tr("&Paste"), self)
- pasteAct.setShortcuts(QKeySequence.Paste)
- pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
- "selection"))
- pasteAct.triggered.connect(paste)
-
- boldAct = QAction(tr("&Bold"), self)
- boldAct.setCheckable(True)
- boldAct.setShortcut(tr("Ctrl+B"))
- boldAct.setStatusTip(tr("Make the text bold"))
- boldAct.triggered.connect(bold)
-
- QFont boldFont = boldAct.font()
- boldFont.setBold(True)
- boldAct.setFont(boldFont)
-
- italicAct = QAction(tr("&Italic"), self)
- italicAct.setCheckable(True)
- italicAct.setShortcut(tr("Ctrl+I"))
- italicAct.setStatusTip(tr("Make the text italic"))
- italicAct.triggered.connect(italic)
-
- QFont italicFont = italicAct.font()
- italicFont.setItalic(True)
- italicAct.setFont(italicFont)
-
- setLineSpacingAct = QAction(tr("Set &Line Spacing..."), self)
- setLineSpacingAct.setStatusTip(tr("Change the gap between the lines of a "
- "paragraph"))
- setLineSpacingAct.triggered.connect(setLineSpacing)
-
- setParagraphSpacingAct = QAction(tr("Set &Paragraph Spacing..."), self)
- setLineSpacingAct.setStatusTip(tr("Change the gap between paragraphs"))
- setParagraphSpacingAct.triggered.connect(setParagraphSpacing)
-
- aboutAct = QAction(tr("&About"), self)
- aboutAct.setStatusTip(tr("Show the application's About box"))
- aboutAct.triggered.connect(about)
-
- aboutQtAct = QAction(tr("About &Qt"), self)
- aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
- aboutQtAct.triggered.connect(qApp.aboutQt)
- aboutQtAct.triggered.connect(aboutQt)
-
- leftAlignAct = QAction(tr("&Left Align"), self)
- leftAlignAct.setCheckable(True)
- leftAlignAct.setShortcut(tr("Ctrl+L"))
- leftAlignAct.setStatusTip(tr("Left align the selected text"))
- leftAlignAct.triggered.connect(leftAlign)
-
- rightAlignAct = QAction(tr("&Right Align"), self)
- rightAlignAct.setCheckable(True)
- rightAlignAct.setShortcut(tr("Ctrl+R"))
- rightAlignAct.setStatusTip(tr("Right align the selected text"))
- rightAlignAct.triggered.connect.(rightAlign)
-
- justifyAct = QAction(tr("&Justify"), self)
- justifyAct.setCheckable(True)
- justifyAct.setShortcut(tr("Ctrl+J"))
- justifyAct.setStatusTip(tr("Justify the selected text"))
- justifyAct.triggered.connect(justify)
-
- centerAct = QAction(tr("&Center"), self)
- centerAct.setCheckable(True)
- centerAct.setShortcut(tr("Ctrl+E"))
- centerAct.setStatusTip(tr("Center the selected text"))
- centerAct.triggered.connect(center)
-
-//! [6] //! [7]
- alignmentGroup = QActionGroup(self)
- alignmentGroup.addAction(leftAlignAct)
- alignmentGroup.addAction(rightAlignAct)
- alignmentGroup.addAction(justifyAct)
- alignmentGroup.addAction(centerAct)
- leftAlignAct.setChecked(True)
-//! [6]
-
-//! [7]
-
-//! [8]
-def createMenus(self):
-
-//! [9] //! [10]
- fileMenu = menuBar().addMenu(tr("&File"))
- fileMenu.addAction(Act)
-//! [9]
- fileMenu.addAction(openAct)
-//! [10]
- fileMenu.addAction(saveAct)
- fileMenu.addAction(printAct)
-//! [11]
- fileMenu.addSeparator()
-//! [11]
- fileMenu.addAction(exitAct)
-
- editMenu = menuBar().addMenu(tr("&Edit"))
- editMenu.addAction(undoAct)
- editMenu.addAction(redoAct)
- editMenu.addSeparator()
- editMenu.addAction(cutAct)
- editMenu.addAction(copyAct)
- editMenu.addAction(pasteAct)
- editMenu.addSeparator()
-
- helpMenu = menuBar().addMenu(tr("&Help"))
- helpMenu.addAction(aboutAct)
- helpMenu.addAction(aboutQtAct)
-//! [8]
-
-//! [12]
- formatMenu = editMenu.addMenu(tr("&Format"))
- formatMenu.addAction(boldAct)
- formatMenu.addAction(italicAct)
- formatMenu.addSeparator()->setText(tr("Alignment"))
- formatMenu.addAction(leftAlignAct)
- formatMenu.addAction(rightAlignAct)
- formatMenu.addAction(justifyAct)
- formatMenu.addAction(centerAct)
- formatMenu.addSeparator()
- formatMenu.addAction(setLineSpacingAct)
- formatMenu.addAction(setParagraphSpacingAct)
-//! [12]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py b/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py
deleted file mode 100644
index 41f515847..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py
+++ /dev/null
@@ -1,360 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-
-class QMdiSubWindow(QMainWindow):
- def __init__(self, parent=None):
- QMainWindow.__init__(self, parent)
-
- mdiArea = QMdiArea()
- mdiArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
- mdiArea.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
- setCentralWidget(mdiArea)
- mdiArea.subWindowActivated[QMdiSubWindow].connect(updateMenus)
- windowMapper = QSignalMapper(self)
- windowMapper.mapped[QWidget].connect(setActiveSubWindow)
-
- self.createActions()
- self.createMenus()
- self.createToolBars()
- self.createStatusBar()
- self.updateMenus()
- self.readSettings()
- self.setWindowTitle(tr("MDI"))
- self.setUnifiedTitleAndToolBarOnMac(True)
-
-
- def closeEvent(self, event):
- mdiArea.closeAllSubWindows()
- if self.activeMdiChild():
- event.ignore()
- else:
- self.writeSettings()
- event.accept()
-
- def File(self):
- child = self.createMdiChild()
- child.File()
- child.show()
-
-
- def open(self):
- fileName = QFileDialog.getOpenFileName(self)
- if not fileName.isEmpty():
- existing = self.findMdiChild(fileName)
- if existing:
- mdiArea.setActiveSubWindow(existing)
- return
-
- child = createMdiChild()
- if child.loadFile(fileName):
- statusBar().showMessage(tr("File loaded"), 2000)
- child.show()
- else:
- child.close()
-
- def save(self):
- if self.activeMdiChild() and self.activeMdiChild().save():
- self.statusBar().showMessage(tr("File saved"), 2000)
-
- def saveAs(self):
- if self.activeMdiChild() and self.activeMdiChild().saveAs():
- self.statusBar().showMessage(tr("File saved"), 2000)
-
- def cut(self):
- if self.activeMdiChild():
- self.activeMdiChild().cut()
-
- def copy(self):
- if self.activeMdiChild():
- activeMdiChild().copy()
-
- def paste(self):
- if self.activeMdiChild():
- activeMdiChild().paste()
-
- def about(self):
- QMessageBox.about(self, tr("About MDI"),
- tr("The <b>MDI</b> example demonstrates how to write multiple "
- "document interface applications using Qt."))
-
- def updateMenus(self):
- hasMdiChild = (activeMdiChild() != 0)
- self.saveAct.setEnabled(hasMdiChild)
- self.saveAsAct.setEnabled(hasMdiChild)
- self.pasteAct.setEnabled(hasMdiChild)
- self.closeAct.setEnabled(hasMdiChild)
- self.closeAllAct.setEnabled(hasMdiChild)
- self.tileAct.setEnabled(hasMdiChild)
- self.cascadeAct.setEnabled(hasMdiChild)
- self.nextAct.setEnabled(hasMdiChild)
- self.previousAct.setEnabled(hasMdiChild)
- self.separatorAct.setVisible(hasMdiChild)
-
- hasSelection = (self.activeMdiChild() and
- self.activeMdiChild().textCursor().hasSelection())
- self.cutAct.setEnabled(hasSelection)
- self.copyAct.setEnabled(hasSelection)
-
- def updateWindowMenu(self):
- self.windowMenu.clear()
- self.windowMenu.addAction(closeAct)
- self.windowMenu.addAction(closeAllAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(tileAct)
- self.windowMenu.addAction(cascadeAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(nextAct)
- self.windowMenu.addAction(previousAct)
- self.windowMenu.addAction(separatorAct)
-
- windows = mdiArea.subWindowList()
- separatorAct.setVisible(not windows.isEmpty())
-
- for i in range(0, windows.size()):
- child = windows.at(i).widget()
-
- text = ""
- if i < 9:
- text = "{} {}".format(i + 1, child.userFriendlyCurrentFile())
- else:
- text = "{} {}".format(i + 1, child.userFriendlyCurrentFile())
-
- action = windowMenu.addAction(text)
- action.setCheckable(True)
- action.setChecked(child == activeMdiChild())
- action.triggered.connect(windowMapper.map)
- windowMapper.setMapping(action, windows.at(i))
-
- createMdiChild = MdiChild()
-
- child = MdiChild()
- mdiArea.addSubWindow(child)
-
- child.copyAvailable[bool].connect(cutAct.setEnabled)
- child.copyAvailable[bool].connect(copyAct.setEnabled)
-
- return child
-
-
- def createActions(self):
-
- Act = QAction(QIcon(":/images/new.png"), tr("&New"), self)
- Act.setShortcuts(QKeySequence.New)
- Act.setStatusTip(tr("Create a new file"))
- Act.triggered.connect(self.newFile)
-
- openAct = QAction(QIcon(":/images/open.png"), tr("&Open..."), self)
- openAct.setShortcuts(QKeySequence.Open)
- openAct.setStatusTip(tr("Open an existing file"))
- openAct.triggered.connect(self.open)
-
- saveAct = QAction(QIcon(":/images/save.png"), tr("&Save"), self)
- saveAct.setShortcuts(QKeySequence.Save)
- saveAct.setStatusTip(tr("Save the document to disk"))
- saveAct.triggered.connect(self.save)
-
- saveAsAct = QAction(tr("Save &As..."), self)
- saveAsAct.setShortcuts(QKeySequence.SaveAs)
- saveAsAct.setStatusTip(tr("Save the document under a name"))
- saveAsAct.triggered.connect(self.saveAs)
-
-//! [0]
- exitAct = QAction(tr("E&xit"), self)
- exitAct.setShortcut(tr("Ctrl+Q"))
- exitAct.setStatusTip(tr("Exit the application"))
- exitAct.triggered.connect(qApp.closeAllWindows)
-//! [0]
-
- cutAct = QAction(QIcon(":/images/cut.png"), tr("Cu&t"), self)
- cutAct.setShortcuts(QKeySequence.Cut)
- cutAct.setStatusTip(tr("Cut the current selection's contents to the "
- "clipboard"))
- cutAct.triggered.connect(self.cut)
-
- copyAct = QAction(QIcon(":/images/copy.png"), tr("&Copy"), self)
- copyAct.setShortcuts(QKeySequence.Copy)
- copyAct.setStatusTip(tr("Copy the current selection's contents to the "
- "clipboard"))
- copyAct.triggered.connect(self.copy)
-
- pasteAct = QAction(QIcon(":/images/paste.png"), tr("&Paste"), self)
- pasteAct.setShortcuts(QKeySequence.Paste)
- pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
- "selection"))
- pasteAct.triggered.connect(self.paste)
-
- closeAct = QAction(tr("Cl&ose"), self)
- closeAct.setShortcut(tr("Ctrl+F4"))
- closeAct.setStatusTip(tr("Close the active window"))
- closeAct.triggered.connect(mdiArea.closeActiveSubWindow)
-
- closeAllAct = QAction(tr("Close &All"), self)
- closeAllAct.setStatusTip(tr("Close all the windows"))
- closeAllAct.triggered.connect(mdiArea.closeAllSubWindows)
-
- tileAct = QAction(tr("&Tile"), self)
- tileAct.setStatusTip(tr("Tile the windows"))
- tileAct.triggered.connect(mdiArea.tileSubWindows)
-
- cascadeAct = QAction(tr("&Cascade"), self)
- cascadeAct.setStatusTip(tr("Cascade the windows"))
- cascadeAct.triggered.connect(mdiArea.cascadeSubWindows)
-
- nextAct = QAction(tr("Ne&xt"), self)
- nextAct.setShortcuts(QKeySequence.NextChild)
- nextAct.setStatusTip(tr("Move the focus to the next window"))
- nextAct.triggered.connect(mdiArea.activateNextSubWindow)
-
- previousAct = QAction(tr("Pre&vious"), self)
- previousAct.setShortcuts(QKeySequence.PreviousChild)
- previousAct.setStatusTip(tr("Move the focus to the previous "
- "window"))
- previousAct.triggered.connect(mdiArea.activatePreviousSubWindow)
-
- separatorAct = QAction(self)
- separatorAct.setSeparator(True)
-
- aboutAct = QAction(tr("&About"), self)
- aboutAct.setStatusTip(tr("Show the application's About box"))
- aboutAct.triggered.connect(self.about)
-
- aboutQtAct = QAction(tr("About &Qt"), self)
- aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
- aboutQtAct.triggered.connect(qApp.aboutQt)
-
-
- def createMenus(self):
-
- fileMenu = menuBar().addMenu(tr("&File"))
- fileMenu.addAction(Act)
- fileMenu.addAction(openAct)
- fileMenu.addAction(saveAct)
- fileMenu.addAction(saveAsAct)
- fileMenu.addSeparator()
- action = fileMenu.addAction(tr("Switch layout direction"))
- action.triggered.connect(self.switchLayoutDirection)
- fileMenu.addAction(exitAct)
-
- editMenu = menuBar().addMenu(tr("&Edit"))
- editMenu.addAction(cutAct)
- editMenu.addAction(copyAct)
- editMenu.addAction(pasteAct)
-
- windowMenu = menuBar().addMenu(tr("&Window"))
- updateWindowMenu()
- windowMenu.aboutToShow.connect(self.updateWindowMenu)
-
- menuBar().addSeparator()
-
- helpMenu = menuBar().addMenu(tr("&Help"))
- helpMenu.addAction(aboutAct)
- helpMenu.addAction(aboutQtAct)
-
-
- def createToolBars(self):
- fileToolBar = addToolBar(tr("File"))
- fileToolBar.addAction(Act)
- fileToolBar.addAction(openAct)
- fileToolBar.addAction(saveAct)
-
- editToolBar = addToolBar(tr("Edit"))
- editToolBar.addAction(cutAct)
- editToolBar.addAction(copyAct)
- editToolBar.addAction(pasteAct)
-
-
- def createStatusBar(self):
- statusBar().showMessage(tr("Ready"))
-
-
- def readSettings(self):
- settings = QSettings("Trolltech", "MDI Example")
- QPoint pos = settings.value("pos", QPoint(200, 200)").toPoint()
- QSize size = settings.value("size", QSize(400, 400)").toSize()
- move(pos)
- resize(size)
-
- def writeSettings(self):
- QSettings settings("Trolltech", "MDI Example")
- settings.setValue("pos", pos()")
- settings.setValue("size", size()")
-
-
- activeMdiChild = MdiChild()
- activeSubWindow = mdiArea.activeSubWindow()
- if activeSubWindow:
- return activeSubWindow.widget()
- return 0
-
-
- def findMdiChild(self, fileName):
-
- canonicalFilePath = QFileInfo(fileName).canonicalFilePath()
-
- for window in mdiArea.subWindowList():
- mdiChild = window.widget()
- if mdiChild.currentFile() == canonicalFilePath:
- return window
- return 0
-
-
- def switchLayoutDirection(self)
- if layoutDirection() == Qt.LeftToRight:
- qApp.setLayoutDirection(Qt.RightToLeft)
- else:
- qApp.setLayoutDirection(Qt.LeftToRight)
-
-
- def setActiveSubWindow(self, window):
- if not window:
- return
- mdiArea.setActiveSubWindow(window)
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.py b/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.py
deleted file mode 100644
index 6505f1f1a..000000000
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.py
+++ /dev/null
@@ -1,366 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-
-//! [0]
-def __init__(self):
- Q__init__(self)
-
- widget = QWidget()
- setCentralWidget(widget)
-//! [0]
-
-//! [1]
- topFiller = QWidget()
- topFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
-
- infoLabel = QLabel(tr("<i>Choose a menu option, or right-click to "
- "invoke a context menu</i>"))
- infoLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
- infoLabel.setAlignment(Qt.AlignCenter)
-
- bottomFiller = QWidget()
- bottomFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
-
- layout = QVBoxLayout()
- layout.setMargin(5)
- layout.addWidget(topFiller)
- layout.addWidget(infoLabel)
- layout.addWidget(bottomFiller)
- widget.setLayout(layout)
-//! [1]
-
-//! [2]
- createActions()
- createMenus()
-
- message = tr("A context menu is available by right-clicking")
- statusBar().showMessage(message)
-
- setWindowTitle(tr("Menus"))
- setMinimumSize(160, 160)
- resize(480, 320)
-
-//! [2]
-
-//! [3]
-def contextMenuEvent(self, event):
- menu = QMenu(self)
- menu.addAction(cutAct)
- menu.addAction(copyAct)
- menu.addAction(pasteAct)
- menu.exec_(event.globalPos()")
-
-//! [3]
-
-def File(self):
- infoLabel.setText(tr("Invoked <b>File|New</b>"))
-
-
-def open(self):
- infoLabel.setText(tr("Invoked <b>File|Open</b>"))
-
-
-def save(self):
- infoLabel.setText(tr("Invoked <b>File|Save</b>"))
-
-def print_(self):
- infoLabel.setText(tr("Invoked <b>File|Print</b>"))
-
-def undo(self):
- infoLabel.setText(tr("Invoked <b>Edit|Undo</b>"))
-
-def redo(self):
- infoLabel.setText(tr("Invoked <b>Edit|Redo</b>"))
-
-def cut(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Cut</b>"))
-
-
-def copy(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Copy</b>"))
-
-
-def paste(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Paste</b>"))
-
-
-def bold(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Bold</b>"))
-
-
-def italic(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Italic</b>"))
-
-
-def leftAlign(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Left Align</b>"))
-
-
-def rightAlign(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Right Align</b>"))
-
-
-def justify(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Justify</b>"))
-
-
-def center(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Center</b>"))
-
-
-def setLineSpacing(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Set Line Spacing</b>"))
-
-
-def setParagraphSpacing(self):
-
- infoLabel.setText(tr("Invoked <b>Edit|Format|Set Paragraph Spacing</b>"))
-
-
-def about(self):
-
- infoLabel.setText(tr("Invoked <b>Help|About</b>"))
- QMessageBox.about(self, tr("About Menu"),
- tr("The <b>Menu</b> example shows how to create "
- "menu-bar menus and context menus."))
-
-
-def aboutQt(self):
-
- infoLabel.setText(tr("Invoked <b>Help|About Qt</b>"))
-
-
-//! [4]
-def createActions(self):
-
-//! [5]
- Act = new QAction(tr("&New"), self)
- Act.setShortcuts(QKeySequence.New)
- Act.setStatusTip(tr("Create a new file"))
- Act.triggered.connect(newFile)
-//! [4]
-
- openAct = QAction(tr("&Open..."), self)
- openAct.setShortcuts(QKeySequence.Open)
- openAct.setStatusTip(tr("Open an existing file"))
- openAct.triggered.connect(open)
-//! [5]
-
- saveAct = QAction(tr("&Save"), self)
- saveAct.setShortcuts(QKeySequence.Save)
- saveAct.setStatusTip(tr("Save the document to disk"))
- saveAct.triggered.connect(save)
-
- printAct = QAction(tr("&Print..."), self)
- printAct.setShortcuts(QKeySequence.Print)
- printAct.setStatusTip(tr("Print the document"))
- printAct.triggered.connect(print_)
-
- exitAct = QAction(tr("E&xit"), self)
- exitAct.setShortcut(tr("Ctrl+Q"))
- exitAct.setStatusTip(tr("Exit the application"))
- exitAct.triggered.connect(close)
-
- undoAct = QAction(tr("&Undo"), self)
- undoAct.setShortcuts(QKeySequence.Undo)
- undoAct.setStatusTip(tr("Undo the last operation"))
- undoAct.triggered.connect(undo)
-
- redoAct = QAction(tr("&Redo"), self)
- redoAct.setShortcuts(QKeySequence.Redo)
- redoAct.setStatusTip(tr("Redo the last operation"))
- redoAct.triggered.connect(redo)
-
- cutAct = QAction(tr("Cu&t"), self)
- cutAct.setShortcuts(QKeySequence.Cut)
- cutAct.setStatusTip(tr("Cut the current selection's contents to the "
- "clipboard"))
- cutAct.triggered.connect(cut)
-
- copyAct = QAction(tr("&Copy"), self)
- copyAct.setShortcut(tr("Ctrl+C"))
- copyAct.setStatusTip(tr("Copy the current selection's contents to the "
- "clipboard"))
- copyAct.triggered.connect(copy)
-
- pasteAct = QAction(tr("&Paste"), self)
- pasteAct.setShortcuts(QKeySequence.Paste)
- pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
- "selection"))
- pasteAct.triggered.connect(paste)
-
- boldAct = QAction(tr("&Bold"), self)
- boldAct.setCheckable(True)
- boldAct.setShortcut(tr("Ctrl+B"))
- boldAct.setStatusTip(tr("Make the text bold"))
- boldAct.triggered.connect(bold)
-
- QFont boldFont = boldAct.font()
- boldFont.setBold(True)
- boldAct.setFont(boldFont)
-
- italicAct = QAction(tr("&Italic"), self)
- italicAct.setCheckable(True)
- italicAct.setShortcut(tr("Ctrl+I"))
- italicAct.setStatusTip(tr("Make the text italic"))
- italicAct.triggered.connect(italic)
-
- QFont italicFont = italicAct.font()
- italicFont.setItalic(True)
- italicAct.setFont(italicFont)
-
- setLineSpacingAct = QAction(tr("Set &Line Spacing..."), self)
- setLineSpacingAct.setStatusTip(tr("Change the gap between the lines of a "
- "paragraph"))
- setLineSpacingAct.triggered.connect(setLineSpacing)
-
- setParagraphSpacingAct = QAction(tr("Set &Paragraph Spacing..."), self)
- setLineSpacingAct.setStatusTip(tr("Change the gap between paragraphs"))
- setParagraphSpacingAct.triggered.connect(setParagraphSpacing)
-
- aboutAct = QAction(tr("&About"), self)
- aboutAct.setStatusTip(tr("Show the application's About box"))
- aboutAct.triggered.connect(about)
-
- aboutQtAct = QAction(tr("About &Qt"), self)
- aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
- aboutQtAct.triggered.connect(qApp.aboutQt)
- aboutQtAct.triggered.connect(aboutQt)
-
- leftAlignAct = QAction(tr("&Left Align"), self)
- leftAlignAct.setCheckable(True)
- leftAlignAct.setShortcut(tr("Ctrl+L"))
- leftAlignAct.setStatusTip(tr("Left align the selected text"))
- leftAlignAct.triggered.connect(leftAlign)
-
- rightAlignAct = QAction(tr("&Right Align"), self)
- rightAlignAct.setCheckable(True)
- rightAlignAct.setShortcut(tr("Ctrl+R"))
- rightAlignAct.setStatusTip(tr("Right align the selected text"))
- rightAlignAct.triggered.connect(rightAlign)
-
- justifyAct = QAction(tr("&Justify"), self)
- justifyAct.setCheckable(True)
- justifyAct.setShortcut(tr("Ctrl+J"))
- justifyAct.setStatusTip(tr("Justify the selected text"))
- justifyAct.triggered.connect(justify)
-
- centerAct = QAction(tr("&Center"), self)
- centerAct.setCheckable(True)
- centerAct.setShortcut(tr("Ctrl+E"))
- centerAct.setStatusTip(tr("Center the selected text"))
- centerAct.triggered.connect(center)
-
-//! [6] //! [7]
- alignmentGroup = QActionGroup(self)
- alignmentGroup.addAction(leftAlignAct)
- alignmentGroup.addAction(rightAlignAct)
- alignmentGroup.addAction(justifyAct)
- alignmentGroup.addAction(centerAct)
- leftAlignAct.setChecked(True)
-//! [6]
-
-//! [7]
-
-//! [8]
-def createMenus(self):
-
-//! [9] //! [10]
- fileMenu = menuBar().addMenu(tr("&File"))
- fileMenu.addAction(Act)
-//! [9]
- fileMenu.addAction(openAct)
-//! [10]
- fileMenu.addAction(saveAct)
- fileMenu.addAction(printAct)
-//! [11]
- fileMenu.addSeparator()
-//! [11]
- fileMenu.addAction(exitAct)
-
- editMenu = menuBar().addMenu(tr("&Edit"))
- editMenu.addAction(undoAct)
- editMenu.addAction(redoAct)
- editMenu.addSeparator()
- editMenu.addAction(cutAct)
- editMenu.addAction(copyAct)
- editMenu.addAction(pasteAct)
- editMenu.addSeparator()
-
- helpMenu = menuBar().addMenu(tr("&Help"))
- helpMenu.addAction(aboutAct)
- helpMenu.addAction(aboutQtAct)
-//! [8]
-
-//! [12]
- formatMenu = editMenu.addMenu(tr("&Format"))
- formatMenu.addAction(boldAct)
- formatMenu.addAction(italicAct)
- formatMenu.addSeparator()->setText(tr("Alignment"))
- formatMenu.addAction(leftAlignAct)
- formatMenu.addAction(rightAlignAct)
- formatMenu.addAction(justifyAct)
- formatMenu.addAction(centerAct)
- formatMenu.addSeparator()
- formatMenu.addAction(setLineSpacingAct)
- formatMenu.addAction(setParagraphSpacingAct)
-//! [12]
diff --git a/sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp b/sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp
deleted file mode 100644
index 48803f05e..000000000
--- a/sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-from PySide2.QtSql import *
-
-def initializeModel(model):
-//! [0]
- model.setTable("employee")
-//! [0]
-
- model.setEditStrategy(QSqlTableModel.OnManualSubmit)
-//! [1]
- model.setRelation(2, QSqlRelation("city", "id", "name"))
-//! [1] //! [2]
- model.setRelation(3, QSqlRelation("country", "id", "name"))
-//! [2]
-
-//! [3]
- model.setHeaderData(0, Qt.Horizontal, QObject::tr("ID"))
- model.setHeaderData(1, Qt.Horizontal, QObject::tr("Name"))
- model.setHeaderData(2, Qt.Horizontal, QObject::tr("City"))
- model.setHeaderData(3, Qt.Horizontal, QObject::tr("Country"))
-//! [3]
-
- model.select()
-
-
-def createView(title, model):
-//! [4]
- view = QTableView()
- view.setModel(model)
- view.setItemDelegate(QSqlRelationalDelegate(view))
-//! [4]
- view.setWindowTitle(title)
- return view
-
-
-def createRelationalTables():
- query = QSqlQuery()
- query.exec_("create table employee(id int primary key, name varchar(20), city int, country int)")
- query.exec_("insert into employee values(1, 'Espen', 5000, 47)")
- query.exec_("insert into employee values(2, 'Harald', 80000, 49)")
- query.exec_("insert into employee values(3, 'Sam', 100, 1)")
-
- query.exec_("create table city(id int, name varchar(20))")
- query.exec_("insert into city values(100, 'San Jose')")
- query.exec_("insert into city values(5000, 'Oslo')")
- query.exec_("insert into city values(80000, 'Munich')")
-
- query.exec_("create table country(id int, name varchar(20))")
- query.exec_("insert into country values(1, 'USA')")
- query.exec_("insert into country values(47, 'Norway')")
- query.exec_("insert into country values(49, 'Germany')")
-
-
-def main():
-
- app = QApplication([])
- if !createConnection():
- return 1
-
- createRelationalTables()
-
- model = QSqlRelationalTableModel()
-
- initializeModel(model)
-
- view = createView(QObject.tr("Relational Table Model"), model)
- view.show()
-
- return app.exec_()
-
diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.py b/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.py
deleted file mode 100644
index 40fe28bf1..000000000
--- a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.py
+++ /dev/null
@@ -1,247 +0,0 @@
-############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the examples of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## BSD License Usage
-## Alternatively, you may use this file under the terms of the BSD license
-## as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-############################################################################
-
-from PySide2.QtGui import *
-
-//! [0]
-def __init__(self):
- createSpinBoxes()
- createDateTimeEdits()
- createDoubleSpinBoxes()
-
- layout = QHBoxLayout()
- layout.addWidget(spinBoxesGroup)
- layout.addWidget(editsGroup)
- layout.addWidget(doubleSpinBoxesGroup)
- setLayout(layout)
-
- setWindowTitle(tr("Spin Boxes"))
-//! [0]
-
-//! [1]
-def createSpinBoxes(self):
- spinBoxesGroup = QGroupBox(tr("Spinboxes"))
-
- integerLabel = QLabel(tr("Enter a value between "
- "%1 and %2:").arg(-20).arg(20))
- integerSpinBox = QSpinBox()
- integerSpinBox.setRange(-20, 20)
- integerSpinBox.setSingleStep(1)
- integerSpinBox.setValue(0)
-//! [1]
-
-//! [2]
- zoomLabel = QLabel(tr("Enter a zoom value between "
- "%1 and %2:").arg(0).arg(1000))
-//! [3]
- zoomSpinBox = QSpinBox()
- zoomSpinBox.setRange(0, 1000)
- zoomSpinBox.setSingleStep(10)
- zoomSpinBox.setSuffix("%")
- zoomSpinBox.setSpecialValueText(tr("Automatic"))
- zoomSpinBox.setValue(100)
-//! [2] //! [3]
-
-//! [4]
- priceLabel = QLabel(tr("Enter a price between "
- "%1 and %2:").arg(0).arg(999))
- priceSpinBox = QSpinBox()
- priceSpinBox.setRange(0, 999)
- priceSpinBox.setSingleStep(1)
- priceSpinBox.setPrefix("$")
- priceSpinBox.setValue(99)
-//! [4] //! [5]
-
- spinBoxLayout = QVBoxLayout()
- spinBoxLayout.addWidget(integerLabel)
- spinBoxLayout.addWidget(integerSpinBox)
- spinBoxLayout.addWidget(zoomLabel)
- spinBoxLayout.addWidget(zoomSpinBox)
- spinBoxLayout.addWidget(priceLabel)
- spinBoxLayout.addWidget(priceSpinBox)
- spinBoxesGroup.setLayout(spinBoxLayout)
-
-//! [5]
-
-//! [6]
-def createDateTimeEdits(self):
- editsGroup = QGroupBox(tr("Date and time spin boxes"))
-
- dateLabel = QLabel()
- dateEdit = QDateEdit(QDate.currentDate())
- dateEdit.setDateRange(QDate(2005, 1, 1), QDate(2010, 12, 31))
- dateLabel.setText(tr("Appointment date (between %0 and %1):")
- .arg(dateEdit.minimumDate().toString(Qt.ISODate))
- .arg(dateEdit.maximumDate().toString(Qt.ISODate)))
-//! [6]
-
-//! [7]
- timeLabel = QLabel()
- timeEdit = QTimeEdit(QTime.currentTime())
- timeEdit.setTimeRange(QTime(9, 0, 0, 0), QTime(16, 30, 0, 0))
- timeLabel.setText(tr("Appointment time (between %0 and %1):")
- .arg(timeEdit.minimumTime().toString(Qt.ISODate))
- .arg(timeEdit.maximumTime().toString(Qt.ISODate)))
-//! [7]
-
-//! [8]
- meetingLabel = QLabel()
- meetingEdit = QDateTimeEdit(QDateTime.currentDateTime())
-//! [8]
-
-//! [9]
- formatLabel = QLabel(tr("Format string for the meeting date "
- "and time:"))
- formatComboBox = QComboBox()
- formatComboBox.addItem("yyyy-MM-dd hh:mm:ss (zzz 'ms')")
- formatComboBox.addItem("hh:mm:ss MM/dd/yyyy")
- formatComboBox.addItem("hh:mm:ss dd/MM/yyyy")
- formatComboBox.addItem("hh:mm:ss")
- formatComboBox.addItem("hh:mm ap")
-//! [9] //! [10]
-
- formatComboBox.activated[str].connect(setFormatString)
-//! [10]
-
- setFormatString(formatComboBox.currentText())
-
-//! [11]
- editsLayout = QVBoxLayout()
- editsLayout.addWidget(dateLabel)
- editsLayout.addWidget(dateEdit)
- editsLayout.addWidget(timeLabel)
- editsLayout.addWidget(timeEdit)
- editsLayout.addWidget(meetingLabel)
- editsLayout.addWidget(meetingEdit)
- editsLayout.addWidget(formatLabel)
- editsLayout.addWidget(formatComboBox)
- editsGroup.setLayout(editsLayout)
-//! [11]
-
-//! [12]
-def setFormatString(self, formatString):
- meetingEdit.setDisplayFormat(formatString)
-//! [12] //! [13]
- if meetingEdit.displayedSections() & QDateTimeEdit.DateSections_Mask:
- meetingEdit.setDateRange(QDate(2004, 11, 1), QDate(2005, 11, 30))
- meetingLabel.setText(tr("Meeting date (between %0 and %1):")
- .arg(meetingEdit.minimumDate().toString(Qt.ISODate))
- .arg(meetingEdit.maximumDate().toString(Qt.ISODate)))
- else:
- meetingEdit.setTimeRange(QTime(0, 7, 20, 0), QTime(21, 0, 0, 0))
- meetingLabel.setText(tr("Meeting time (between %0 and %1):")
- .arg(meetingEdit.minimumTime().toString(Qt.ISODate))
- .arg(meetingEdit.maximumTime().toString(Qt.ISODate)))
-//! [13]
-
-//! [14]
-def createDoubleSpinBoxes():
- doubleSpinBoxesGroup = QGroupBox(tr("Double precision spinboxes"))
-
- precisionLabel = QLabel(tr("Number of decimal places "
- "to show:"))
- precisionSpinBox = QSpinBox()
- precisionSpinBox.setRange(0, 100)
- precisionSpinBox.setValue(2)
-//! [14]
-
-//! [15]
- doubleLabel = QLabel(tr("Enter a value between "
- "%1 and %2:").arg(-20).arg(20))
- doubleSpinBox = QDoubleSpinBox ()
- doubleSpinBox.setRange(-20.0, 20.0)
- doubleSpinBox.setSingleStep(1.0)
- doubleSpinBox.setValue(0.0)
-//! [15]
-
-//! [16]
- scaleLabel = QLabel(tr("Enter a scale factor between "
- "%1 and %2:").arg(0).arg(1000.0))
- scaleSpinBox = QDoubleSpinBox()
- scaleSpinBox.setRange(0.0, 1000.0)
- scaleSpinBox.setSingleStep(10.0)
- scaleSpinBox.setSuffix("%")
- scaleSpinBox.setSpecialValueText(tr("No scaling"))
- scaleSpinBox.setValue(100.0)
-//! [16]
-
-//! [17]
- priceLabel = QLabel(tr("Enter a price between "
- "%1 and %2:").arg(0).arg(1000))
- priceSpinBox = QDoubleSpinBox()
- priceSpinBox.setRange(0.0, 1000.0)
- priceSpinBox.setSingleStep(1.0)
- priceSpinBox.setPrefix("$")
- priceSpinBox.setValue(99.99)
-
- precisionSpinBox.valueChanged[int].connect(changePrecision)
-//! [17]
-
-//! [18]
- spinBoxLayout = QVBoxLayout()
- spinBoxLayout.addWidget(precisionLabel)
- spinBoxLayout.addWidget(precisionSpinBox)
- spinBoxLayout.addWidget(doubleLabel)
- spinBoxLayout.addWidget(doubleSpinBox)
- spinBoxLayout.addWidget(scaleLabel)
- spinBoxLayout.addWidget(scaleSpinBox)
- spinBoxLayout.addWidget(priceLabel)
- spinBoxLayout.addWidget(priceSpinBox)
- doubleSpinBoxesGroup.setLayout(spinBoxLayout)
-}
-//! [18]
-
-//! [19]
-def changePrecision(self, int)
- doubleSpinBox.setDecimals(decimals)
- scaleSpinBox.setDecimals(decimals)
- priceSpinBox.setDecimals(decimals)
-
-//! [19]
diff --git a/sources/pyside2/doc/codesnippets/snippets/customstyle/main.cpp b/sources/pyside2/doc/codesnippets/snippets/customstyle/main.cpp
deleted file mode 100644
index 877c63afd..000000000
--- a/sources/pyside2/doc/codesnippets/snippets/customstyle/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [using a custom style]
-import sys
-from PySide2.QtGui import *
-
-QApplication.setStyle(CustomStyle())
-app = QApplication(sys.argv)
-spinBox = QSpinBox()
-spinBox.show()
-sys.exit(app.exec_())
-
-//! [using a custom style]
diff --git a/sources/pyside2/doc/conf.py.in b/sources/pyside2/doc/conf.py.in
deleted file mode 100644
index ff04dcf20..000000000
--- a/sources/pyside2/doc/conf.py.in
+++ /dev/null
@@ -1,190 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# PySide documentation build configuration file, created by
-# sphinx-quickstart on Wed Apr 22 15:04:20 2009.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@')
-sys.path.append('@pyside_BINARY_DIR@')
-if @HAS_WEBENGINE_WIDGETS@:
- sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@/../../../examples/webenginewidgets/tabbedbrowser')
-
-# -- General configuration -----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-#extensions = ['sphinx.ext.todo', 'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude']
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
-'sphinx.ext.coverage', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
-'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude',
-'sphinx.ext.viewcode']
-
-output_format='@DOC_OUTPUT_FORMAT@'
-
-def setup(app):
- app.add_config_value('output_format','qthelp','env')
-
-rst_epilog = """
-.. |project| replace:: Qt for Python
-.. |pymodname| replace:: PySide2
-"""
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'PySide'
-copyright = u'© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/license/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.'
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '@BINDING_API_VERSION@'
-# The full version, including alpha/beta/rc tags.
-release = '@BINDING_API_VERSION_FULL@'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_patterns = ['_build', 'extras']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'pysidedocs'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {
-#}
-
-# Add any paths that contain custom themes here, relative to this directory.
-html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-html_title = u'Qt for Python'
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = { '' : ''}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = { 'index' : 'index.html'}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If false, no index is generated.
-html_use_index = False
-
-# If true, the index is split into individual pages for each letter.
-html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-#htmlhelp_basename = 'PySideDoc'
-
-# Link to the shiboken6 sphinx project to enable linking
-# between the two projects.
-intersphinx_mapping = {'shiboken6': ('shiboken6','@SHIBOKEN_INTERSPHINX_FILE@')}
-
-add_module_names = False
-
-# Skip some warnings when building the documentation with
-# 'build_rst_docs' due to the lack of qdoc generated files, in charge
-# of sphinx modules (autodoc) and references.
-if @SKIP_SPHINX_WARNINGS@:
- suppress_warnings = ["autodoc", "autodoc.import_object", "ref.ref"]
-
-# -- Options for qthelp output ---------------------------------------------------
-qthelp_theme = 'pysidedocs_qthelp'
-
diff --git a/sources/pyside2/doc/considerations.rst b/sources/pyside2/doc/considerations.rst
deleted file mode 100644
index b5eae7d86..000000000
--- a/sources/pyside2/doc/considerations.rst
+++ /dev/null
@@ -1,149 +0,0 @@
-.. _pysideapi2:
-
-|project| Considerations
-=========================
-
-API Changes
------------
-
-One of the goals of |pymodname| is to be API compatible with PyQt5,
-with certain exceptions.
-
-The latest considerations and known issues will be also reported
-in the `wiki <https://wiki.qt.io/Qt_for_Python/Considerations>`_.
-
-__hash__() function return value
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The hash value returned for the classes :class:`PySide2.QtCore.QDate`,
-:class:`PySide2.QtCore.QDateTime`, :class:`PySide2.QtCore.QTime`, :class:`PySide2.QtCore.QUrl`
-will be based on their string representations, thus objects with the same value will produce the
-same hash.
-
-
-QString
-~~~~~~~
-
-Methods and functions that change the contents of a QString argument were modified to receive an
-immutable Python Unicode (or str) and return another Python Unicode/str as the modified string.
-
-The following methods had their return types modified this way:
-
-**Classes:** QAbstractSpinBox, QDateTimeEdit, QDoubleSpinBox, QSpinBox, QValidator
-
-* ``fixup(string): string``
-* ``validate(string, int): [QValidator.State, string, int]``
-
-**Classes:** QDoubleValidator, QIntValidator, QRegExpValidator
-
-* ``validate(string, int): [QValidator.State, string, int]``
-
-**Class:** QClipboard
-
-* ``text(string, QClipboard.Mode mode=QClipboard.Clipboard): [string, string]``
-
-**Class:** QFileDialog
-
-Instead of ``getOpenFileNameAndFilter()``, ``getOpenFileNamesAndFilter()`` and
-``getSaveFileNameAndFilter()`` like PyQt does, PySide has modified the original methods to return
-a tuple.
-
-* ``getOpenFileName(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [string, filter]``
-* ``getOpenFileNames(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [list(string), filter]``
-* ``getSaveFileName(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [string, filter]``
-
-**Class:** QWebPage
-
-* ``javaScriptPrompt(QWebFrame, string, string): [bool, string]``
-
-**Classes:** QFontMetrics and QFontMetricsF
-
-They had two new methods added. Both take a string of one character and convert to a QChar
-(to call the C++ counterpart):
-
-* ``widthChar(string)``
-* ``boundingRectChar(string)``
-
-
-QTextStream
-~~~~~~~~~~~
-
-Inside this class some renames were applied to avoid clashes with native Python functions.
-They are: ``bin_()``, ``hex_()`` and ``oct_()``.
-The only modification was the addition of the '_' character.
-
-
-QVariant
-~~~~~~~~
-
-As ``QVariant`` was removed, any function expecting it can receive any Python object (``None`` is
-an invalid ``QVariant``).
-The same rule is valid when returning something: the returned ``QVariant`` will be converted to
-its original Python object type.
-
-When a method expects a ``QVariant::Type`` the programmer can use a string (the type name) or the
-type itself.
-
-
-qApp "macro"
-~~~~~~~~~~~~
-
-The C++ API of QtWidgets provides a macro called ``qApp`` that roughly expands to
-``QtWidgets::QApplication->instance()``.
-
-In PySide, we tried to create a macro-like experience.
-For that, the ``qApp`` variable was implemented as a normal variable
-that lives in the builtins.
-After importing ``PySide2``, you can immediately use ``qApp``.
-
-As a useful shortcut for the action "create an application if it was not created", we recommend::
-
- qApp or QtWidgets.QApplication()
-
-or if you want to check if there is one, simply use the truth value::
-
- if qApp:
- # do something if an application was created
- pass
-
-Comparing to ``None`` is also possible, but slightly over-specified.
-
-
-Testing support
-+++++++++++++++
-
-For testing purposes, you can also get rid of the application by calling::
-
- qApp.shutdown()
-
-As for 5.14.2, this is currently an experimental feature that is not fully tested.
-
-
-Embedding status
-++++++++++++++++
-
-In embedded mode, application objects that are pre-created in C++ don't have a Python wrapper.
-The ``qApp`` variable is created together with a wrapped application.
-Therefore, ``qApp`` does not exist in that embedded mode.
-Please note that you always can use ``QtWidgets.QApplication.instance()`` instead.
-
-
-Abandoned Alternative
-+++++++++++++++++++++
-
-We also tried an alternative implementation with a ``qApp()`` function that was more *pythonic*
-and problem free, but many people liked the ``qApp`` macro better for its brevity, so here it is.
-
-
-Rich Comparison
-~~~~~~~~~~~~~~~
-
-There was a long-standing bug in the ``tp_richcompare`` implementation of PySide classes.
-
-* When a class did not implement it, the default implementation of ``object`` is used.
- This implements ``==`` and ``!=`` like the ``is`` operator.
-
-* When a class implements only a single function like ``<``, then the default implementation
- was disabled, and expressions like ``obj in sequence`` failed with ``NotImplemented``.
-
-This oversight was fixed in version 5.15.1 .
diff --git a/sources/pyside2/doc/deployment-briefcase.rst b/sources/pyside2/doc/deployment-briefcase.rst
deleted file mode 100644
index a5179a279..000000000
--- a/sources/pyside2/doc/deployment-briefcase.rst
+++ /dev/null
@@ -1,199 +0,0 @@
-|project| & Briefcase
-#######################
-
-`Briefcase <https://briefcase.readthedocs.io>`_ is a packaging tool that lets you create a standalone package for a Python application. It supports the following installer formats:
-
- * .app application bundle for macOS
- * MSI installer for Windows
- * AppImage for Linux
-
-For more details, see the `official documentation <https://briefcase.readthedocs.io/en/latest/index.html>`_.
-
-Preparation
-===========
-
-Install `Briefcase` using the following **pip** command::
-
- pip install briefcase
-
-You also need : docker on linux, `WixToolset`_ on windows,
-
-If you're using a virtual environment, remember to activate it before installing `Briefcase`.
-
-After installation, the `briefcase` binary is located in your virtual environment's `bin/`
-directory, or where your Python executable is located.
-
-You can either create a brand new project using the briefcase assistant or setup your own.
-
-.. _`WixToolset`: https://wixtoolset.org/
-
-Use Briefcase Assistant
-=======================
-
-Run the following command and answer the questions to get started::
-
- briefcase new
-
-Ensure that `PySide2` is chosen as the `GUI toolkit choice`.
-Your PySide2 application is now configured. You can jump to `Build the package`_.
-
-
-Set up your project
-===================
-
-Create a pyproject.toml
------------------------
-
-At the root level of your project, create a `pyproject.toml` file::
-
- [tool.briefcase]
- project_name = "MyPySideApp"
- bundle = "com.example"
- version = "0.0.1"
- url = "https://somwhere/on/the/net"
- license = "GNU General Public License v3 (GPLv3)"
- author = 'MyName Firstname'
- author_email = "cool@mailexample.com"
-
- [tool.briefcase.app.mypysideapp]
- formal_name = "A Cool App"
- description = "The coolest app ever"
- icon = "src/mypysideapp/resources/appicon" # Briecase will choose the right extension depending the os (png,ico,...)
- sources = ['src/mypysideapp']
- requires = ['pyside2==5.15.0',
- 'pony>=0.7.11,<0.8',
- 'dickens==1.0.1',
- 'Pillow==7.1.2',
- 'mako==1.1.2',
- 'beautifulsoup4']
-
-
- [tool.briefcase.app.mypysideapp.macOS]
- requires = []
-
- [tool.briefcase.app.mypysideapp.linux]
- requires = []
- system_requires = []
-
- [tool.briefcase.app.mypysideapp.windows]
- requires = []
-
-
-Write some code
-----------------
-
-Let's say your project tree is like this::
-
- pyproject.toml
- setup.cfg
- pytest.ini
- src/
-
- mypysideapp/
- resources/
- appicon.png
- appicon.ico
- __init__.py
- __main__.py
- app.py
-
-
-Content of `__main__.py`::
-
- import sys
- from PySide2.QtWidgets import QApplication
- from mypysideapp.app import MyWidget
-
- if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- widget = MyWidget()
- widget.resize(800, 600)
- widget.show()
-
- sys.exit(app.exec_())
-
-
-Content of `app.py`::
-
- import random
- from PySide2.QtWidgets import (QLabel, QPushButton,
- QVBoxLayout, QWidget)
- from PySide2.QtCore import Slot, Qt
-
- class MyWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
- "Hola Mundo", "Привет мир"]
-
- self.button = QPushButton("Click me!")
- self.text = QLabel("Hello World")
- self.text.setAlignment(Qt.AlignCenter)
-
- self.layout = QVBoxLayout()
- self.layout.addWidget(self.text)
- self.layout.addWidget(self.button)
- self.setLayout(self.layout)
-
- # Connecting the signal
- self.button.clicked.connect(self.magic)
-
- @Slot()
- def magic(self):
- self.text.setText(random.choice(self.hello))
-
-
-Build the package
-==================
-
-Initialize the package
-------------------------
-
-Just run::
-
- briefcase create
-
-Run the following command to initialize the building the packages for Windows, Linux, and macOS.
-It creates a subdirectory each for the different platforms.
-This step takes longer as it adds the packages listed in `requires` sections in the `pyproject.toml` file.
-
-Build the application
----------------------
-::
-
- briefcase build
-
-You'll get::
-
- macOS/A Cool App/A Cool App.app
- or
- linux/A Cool App-x86_64-0.0.1.AppImage
- or
- windows\A Cool App
-
-
-Run the application
--------------------
-::
-
- briefcase run
-
-.. note:: You can run your project in `dev` mode (your source code not packaged) with `briefcase dev`
-
-
-Build the installer (only Windows and macOS)
----------------------------------------------
-
-macOS::
-
- briefcase package --no-sign
-
-It's possible to sign, see the `documentation <https://briefcase.readthedocs.io/en/latest/how-to/code-signing/index.html>`_. You get `macOS/A Cool App-0.0.1.dmg`
-
-Windows::
-
- briefcase package
-
-You get `windows\A_Cool_App-0.0.1.msi`
diff --git a/sources/pyside2/doc/deployment-cxfreeze.rst b/sources/pyside2/doc/deployment-cxfreeze.rst
deleted file mode 100644
index f0a71ca80..000000000
--- a/sources/pyside2/doc/deployment-cxfreeze.rst
+++ /dev/null
@@ -1,130 +0,0 @@
-=====================
-|project| & cx_Freeze
-=====================
-
-`cx_Freeze <https://anthony-tuininga.github.io/cx_Freeze/>`_ lets you
-freeze your Python application into executables. The supported
-platforms are Linux, macOS, Windows, FreeBSD, among others.
-
-You can read the `official documentation <https://cx-freeze.readthedocs.io/en/latest/index.html>`_
-to clarify any further question, and remember to contribute to
-the project by `filing issues <https://sourceforge.net/projects/cx-freeze/>`_
-if you find any, or contributing to `their development <https://bitbucket.org/anthony_tuininga/cx_freeze/src>`_.
-
-Preparation
-===========
-
-Installing `cx_Freeze` can be done using **pip**::
-
- pip install cx_freeze
-
-If you are using a virtual environment, remember to activate it before
-installing `cx_Freeze` into it.
-
-After the installation, you will have the `cxfreeze` binary to deploy
-your application.
-
-Freezing an application
-=======================
-
-There are three options to work with `cx_Freeze`:
-
- 1. Using the `cxfreeze` script.
- 2. Creating `setup.py` script to build the project.
- 3. Using the module classes directly (for advanced purposes).
-
-The following sections cover the first two use cases.
-
-Creating an example
--------------------
-
-Now, consider the following simple script, named `hello.py`::
-
- import sys
- import random
- from PySide2.QtWidgets import (QApplication, QLabel, QPushButton,
- QVBoxLayout, QWidget)
- from PySide2.QtCore import Slot, Qt
-
- class MyWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
- "Hola Mundo", "Привет мир"]
-
- self.button = QPushButton("Click me!")
- self.text = QLabel("Hello World")
- self.text.setAlignment(Qt.AlignCenter)
-
- self.layout = QVBoxLayout()
- self.layout.addWidget(self.text)
- self.layout.addWidget(self.button)
- self.setLayout(self.layout)
-
- # Connecting the signal
- self.button.clicked.connect(self.magic)
-
- @Slot()
- def magic(self):
- self.text.setText(random.choice(self.hello))
-
- if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- widget = MyWidget()
- widget.resize(800, 600)
- widget.show()
-
- sys.exit(app.exec_())
-
-
-Using `cxfreeze` executable
----------------------------
-
-Now that we have an application, try freezing it with the following
-command::
-
- cxfreeze hello.py
-
-This command creates a `dist/` directory containing the executable.
-and a `lib/` directory containing all the shared libraries.
-
-To launch the application, go to the `dist/` directory and execute
-the file::
-
- cd dist/
- ./main
-
-
-Using a setuptools script
--------------------------
-
-For this process, you need an additional script called `setup.py`::
-
- import sys
- from cx_Freeze import setup, Executable
-
- setup(name = "MyApp",
- version = "0.1",
- description = "My GUI App",
- executables = [Executable("hello.py")])
-
-Now, build the project using it::
-
- python setup.py build
-
-This step creates a `build/` directory with the following structure::
-
- build
- └── exe.linux-x86_64-3.7
- └── lib
- └── main
-
-The first directory inside `build/` depends on the platform
-you are using, in this case a `x86_64` Linux using Python 3.7.
-The structure is the same as previously described, and you can simply
-enter the directory and execute the file::
-
- cd build/exe.linux-x86_64-3.7
- ./main
diff --git a/sources/pyside2/doc/deployment-fbs.rst b/sources/pyside2/doc/deployment-fbs.rst
deleted file mode 100644
index a90b4993b..000000000
--- a/sources/pyside2/doc/deployment-fbs.rst
+++ /dev/null
@@ -1,97 +0,0 @@
-|project| & fbs
-####################
-
-`fbs`_ provides a powerful environment for packaging, creating installers, and signing your
-application. It also lets you manage updates to your application. Since `fbs` is based on
-PyInstaller, it supports Linux, macOS, and Windows.
-
-For more details, see the `fbs tutorial`_ and the `fbs manual`_.
-
-.. _fbs: https://build-system.fman.io/
-.. _fbs tutorial: https://github.com/mherrmann/fbs-tutorial
-.. _fbs manual: https://build-system.fman.io/manual/
-
-Preparation
-===========
-
-Installing `fbs`_ (>= 0.7.6) is done via **pip**::
-
- pip install fbs
-
-If you're using a virtual environment, remember to activate it before installing `fbs`_.
-
-After the installation, you can use the `fbs`_ executable.
-
-Starting a new project
-======================
-
-`fbs`_ provides useful features for you to create a base project structure with the following
-command::
-
- fbs startproject
-
-This command prompts you to answer a few questions to configure the details of your project, like:
-
- * Application name
- * Author name
- * Qt bindings (PySide2 or PyQt5)
- * Bundle indentified (for macOS)
-
-Afterwards, you have a `src/` directory that contains the following structure::
-
- └── src
- ├── build
- │ └── settings
- └── main
- ├── icons
- │ ├── base
- │ ├── linux
- │ └── mac
- └── python
-
-Inside the `settings` directory, there are a few JSON files that can be edited to include more
-information about your project.
-
-The `main` file is in the `python` directory, and its default content is::
-
- from fbs_runtime.application_context import ApplicationContext
- from PySide2.QtWidgets import QMainWindow
-
- import sys
-
- if __name__ == '__main__':
- appctxt = ApplicationContext() # 1. Instantiate ApplicationContext
- window = QMainWindow()
- window.resize(250, 150)
- window.show()
- exit_code = appctxt.app.exec_() # 2. Invoke appctxt.app.exec_()
- sys.exit(exit_code)
-
-This example shows an empty `QMainWindow`. You can run it using the following command::
-
- fbs run
-
-Freezing the application
-========================
-
-Once you've verified that the application is working properly, you can continue with the freezing
-process using the following command::
-
- fbs freeze
-
-After the process completes, you see a message stating the location of your executable. For
-example::
-
- Done. You can now run `target/MyApp/MyApp`. If that doesn't work, see
- https://build-system.fman.io/troubleshooting.
-
-
-Now, you can try to run the application. The result is the same window as the one you saw with the
-`fbs run` command::
-
- cd target/MyApp/
- ./MyApp
-
-.. note:: This is the case for Linux. For other platforms like macOS, you need to enter the
- directory: `target/MyApp.app/Contents/macOS`. For Windows, you need to find the `MyApp.exe`
- executable.
diff --git a/sources/pyside2/doc/deployment-pyinstaller.rst b/sources/pyside2/doc/deployment-pyinstaller.rst
deleted file mode 100644
index 3bc8c6996..000000000
--- a/sources/pyside2/doc/deployment-pyinstaller.rst
+++ /dev/null
@@ -1,145 +0,0 @@
-|project| & PyInstaller
-#######################
-
-`PyInstaller <https://www.pyinstaller.org/>`_ lets you freeze your python application into a
-stand-alone executable. This installer supports Linux, macOS, Windows, and more; and is also
-compatible with 3rd-party Python modules, such as |pymodname|.
-
-For more details, see the `official documentation <https://www.pyinstaller.org/documentation.html>`_.
-
-Preparation
-===========
-
-Install the `PyInstaller` via **pip** with the following command::
-
- pip install pyinstaller
-
-If you're using a virtual environment, remember to activate it before installing `PyInstaller`.
-
-After installation, the `pyinstaller` binary is located in your virtual environment's `bin/`
-directory, or where your Python executable is located. If that directory isn't in your `PATH`,
-include the whole path when you run `pyinstaller`.
-
-.. warning:: If you already have a PySide2 or Shiboken6 version installed in your
- system path, PyInstaller uses them instead of your virtual environment version.
-
-Freeze an application
-=======================
-
-`PyInstaller` has many options that you can use. To list them all, run `pyinstaller -h`.
-
-There are two main features:
-
- * the option to package the whole project (including shared libraries) into one executable file
- (`--onefile`)
- * the option to place it in a directory containing the libraries
-
-Additionally, on Windows when the command is running, you can open a console with the `-c` option
-(or `--console` or `--nowindowed` equivalent).
-
-Otherwise, you can specify to not open such a console window on macOS and Windows with the `-w`
-option (or `--windowed` or `--noconsole` equivalent).
-
-Create an example
------------------
-
-Now, consider the following script, named `hello.py`::
-
- import sys
- import random
- from PySide2.QtWidgets import (QApplication, QLabel, QPushButton,
- QVBoxLayout, QWidget)
- from PySide2.QtCore import Slot, Qt
-
- class MyWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
- "Hola Mundo", "Привет мир"]
-
- self.button = QPushButton("Click me!")
- self.text = QLabel("Hello World")
- self.text.setAlignment(Qt.AlignCenter)
-
- self.layout = QVBoxLayout()
- self.layout.addWidget(self.text)
- self.layout.addWidget(self.button)
- self.setLayout(self.layout)
-
- # Connecting the signal
- self.button.clicked.connect(self.magic)
-
- @Slot()
- def magic(self):
- self.text.setText(random.choice(self.hello))
-
- if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- widget = MyWidget()
- widget.resize(800, 600)
- widget.show()
-
- sys.exit(app.exec_())
-
-
-Since it has a UI, you use the `--windowed` option.
-
-The command line to proceed looks like this::
-
- pyinstaller --name="MyApplication" --windowed hello.py
-
-This process creates two directories: `dist/` and `build/`. The application executable and the
-required shared libraries are placed in `dist/MyApplication`.
-
-To run the application, go to `dist/MyApplication` and run the program::
-
- cd dist/MyApplication/
- ./MyApplication
-
-.. note:: The directory inside `dist/` and the executable have the same name.
-
-Use the `--onefile` option if you prefer to have everything bundled into one executable, without
-the shared libraries next to it::
-
- pyinstaller --name="MyApplication" --windowed --onefile hello.py
-
-This process takes a bit longer, but in the end you have one executable in the `dist/` directory::
-
- cd dist/
- ./MyApplication
-
-
-Some Caveats
-============
-
-
-PyInstaller Issue
------------------
-
-As mentioned before, if available, `PyInstaller` picks a system installation of PySide2 or
-Shiboken6 instead of your `virtualenv` version without notice. This is negligible if those
-two versions are the same.
-
-If you're working with different versions, this can result in frustrating debugging sessions
-when you think you are testing the latest version, but `PyInstaller` is working with an older
-version.
-
-
-Safety Instructions
--------------------
-
-- When using `PyInstaller` with `virtualenv`, make sure that there is no system
- installation of PySide2 or shiboken6.
-
-- Before compiling, use `pip -uninstall pyside2 shiboken6 -y` multiple times, until
- none of the programs are found anymore.
-
-- Pip is usually a good tool. But to be 100 % sure, you should directly remove
- the PySide2 and shiboken6 folders from site-packages.
-
-- Be sure to use the right version of pip. The safest way to really run the right
- pip, is to use the Python that you mean: Instead of the pip command, better use::
-
- <path/to/your/>python -m pip
diff --git a/sources/pyside2/doc/examples/index.rst b/sources/pyside2/doc/examples/index.rst
deleted file mode 100644
index 6d2b56dca..000000000
--- a/sources/pyside2/doc/examples/index.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-|project| Examples
-===================
-
-A collection of examples are provided with |project| to help new users
-to understand different use cases of the module.
-You can find all the examples inside the ``pyside-setup`` on the ``examples``
-directory, or you can access them after installing |pymodname| from ``pip``
-inside the ``site-packages/PySide2/examples`` directory.
-
-.. toctree::
- :maxdepth: 1
-
- tabbedbrowser.rst
- ../pyside-examples/all-pyside-examples.rst
diff --git a/sources/pyside2/doc/extras/QtCore.ClassInfo.rst b/sources/pyside2/doc/extras/QtCore.ClassInfo.rst
deleted file mode 100644
index 89ca926c7..000000000
--- a/sources/pyside2/doc/extras/QtCore.ClassInfo.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-.. currentmodule:: PySide2.QtCore
-.. _ClassInfo:
-
-ClassInfo
-*********
-
-This class is used to associates extra information to the class, which is available
-using QObject.metaObject(). Qt and PySide doesn't use this information.
-
-The extra information takes the form of a dictionary with key and value in a literal string.
-
-.. note:: This Class is a implementation of Q_CLASSINFO macro.
-
-
-Example
--------
-
-::
-
- @ClassInfo(Author='PySide Team', URL='http://www.pyside.org')
- class MyObject(QObject):
- ...
-
diff --git a/sources/pyside2/doc/extras/QtCore.Property.rst b/sources/pyside2/doc/extras/QtCore.Property.rst
deleted file mode 100644
index a10c9f807..000000000
--- a/sources/pyside2/doc/extras/QtCore.Property.rst
+++ /dev/null
@@ -1,62 +0,0 @@
-.. currentmodule:: PySide2.QtCore
-.. _Property:
-Property
-********
-
-Detailed Description
---------------------
-
-The Property function lets you declare properties that
-behave both as Qt and Python properties, and have their
-setters and getters defined as Python functions.
-
-Here is an example that illustrates how to use this
-function:
-
-.. code-block::
- :linenos:
-
- from PySide2.QtCore import QObject, Property
-
- class MyObject(QObject):
- def __init__(self,startval=42):
- QObject.__init__(self)
- self.ppval = startval
-
- def readPP(self):
- return self.ppval
-
- def setPP(self,val):
- self.ppval = val
-
- pp = Property(int, readPP, setPP)
-
- obj = MyObject()
- obj.pp = 47
- print(obj.pp)
-
-Properties in QML expressions
------------------------------
-
-If you are using properties of your objects in QML expressions,
-QML requires that the property changes are notified. Here is an
-example illustrating how to do this:
-
-.. code-block::
- :linenos:
-
- from PySide2.QtCore import QObject, Signal, Property
-
- class Person(QObject):
- def __init__(self, name):
- QObject.__init__(self)
- self._person_name = name
-
- def _name(self):
- return self._person_name
-
- @Signal
- def name_changed(self):
- pass
-
- name = Property(str, _name, notify=name_changed)
diff --git a/sources/pyside2/doc/extras/QtCore.QEnum.rst b/sources/pyside2/doc/extras/QtCore.QEnum.rst
deleted file mode 100644
index a5a2e31fd..000000000
--- a/sources/pyside2/doc/extras/QtCore.QEnum.rst
+++ /dev/null
@@ -1,92 +0,0 @@
-.. currentmodule:: PySide2.QtCore
-.. _QEnum:
-
-QEnum/QFlag
-***********
-
-This class decorator is equivalent to the `Q_ENUM` macro from Qt.
-The decorator is used to register an Enum to the meta-object system,
-which is available via `QObject.staticMetaObject`.
-The enumerator must be in a QObject derived class to be registered.
-
-
-Example
--------
-
-::
-
- from enum import Enum, Flag, auto
-
- from PySide2.QtCore import QEnum, QFlag, QObject
-
- class Demo(QObject):
-
- @QEnum
- class Orientation(Enum):
- North, East, South, West = range(4)
-
- class Color(Flag):
- RED = auto()
- BLUE = auto()
- GREEN = auto()
- WHITE = RED | BLUE | GREEN
-
- QFlag(Color) # identical to @QFlag usage
-
-
-Caution:
---------
-
-QEnum registers a Python Enum derived class.
-QFlag treats a variation of the Python Enum, the Flag class.
-
-Please do not confuse that with the Qt QFlags concept. Python does
-not use that concept, it has its own class hierarchy, instead.
-For more details, see the `Python enum documentation <https://docs.python.org/3/library/enum.html>`_.
-
-
-Details about Qt Flags:
------------------------
-
-There are some small differences between Qt flags and Python flags.
-In Qt, we have for instance these declarations:
-
-::
-
- enum QtGui::RenderHint { Antialiasing, TextAntialiasing, SmoothPixmapTransform,
- HighQualityAntialiasing, NonCosmeticDefaultPen }
- flags QtGui::RenderHints
-
-The equivalent Python notation would look like this:
-
-::
-
- @QFlag
- class RenderHints(enum.Flag)
- Antialiasing = auto()
- TextAntialiasing = auto()
- SmoothPixmapTransform = auto()
- HighQualityAntialiasing = auto()
- NonCosmeticDefaultPen = auto()
-
-
-As another example, the Qt::AlignmentFlag flag has 'AlignmentFlag' as the enum
-name, but 'Alignment' as the type name. Non flag enums have the same type and
-enum names.
-
-::
-
- enum Qt::AlignmentFlag
- flags Qt::Alignment
-
-The Python way to specify this would be
-
-::
-
- @QFlag
- class Alignment(enum.Flag):
- ...
-
-We are considering to map all builtin enums and flags to Python enums as well
-in a later release.
-
diff --git a/sources/pyside2/doc/extras/QtCore.Signal.rst b/sources/pyside2/doc/extras/QtCore.Signal.rst
deleted file mode 100644
index a0660f88f..000000000
--- a/sources/pyside2/doc/extras/QtCore.Signal.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-.. currentmodule:: PySide2.QtCore
-.. _Signal:
-
-Signal
-******
-
-Synopsis
---------
-
-Functions
-^^^^^^^^^
-
-+---------------------------------------------------------------------------------------------+
-|def :meth:`connect<Signal.connect>` (receiver) |
-+---------------------------------------------------------------------------------------------+
-|def :meth:`disconnect<Signal.disconnect>` (receiver) |
-+---------------------------------------------------------------------------------------------+
-|def :meth:`emit<Signal.disconnect>` (\*args) |
-+---------------------------------------------------------------------------------------------+
-
-Detailed Description
---------------------
-
- The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way.
-
- PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow.
-
-.. method:: Signal.connect(receiver[, type=Qt.AutoConnection])
-
- Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
-
-.. method:: Signal.disconnect(receiver)
-
- Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
-
-.. method:: Signal.emit(*args)
-
- `args` is the arguments to pass to any connected slots, if any.
-
diff --git a/sources/pyside2/doc/extras/QtCore.Slot.rst b/sources/pyside2/doc/extras/QtCore.Slot.rst
deleted file mode 100644
index 5a59a2ae3..000000000
--- a/sources/pyside2/doc/extras/QtCore.Slot.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-.. currentmodule:: PySide2.QtCore
-.. _Slot:
-
-Slot
-****
-
-Detailed Description
---------------------
-
- PySide2 adopt PyQt5's new signal and slot syntax as-is. The PySide2
- implementation is functionally compatible with the PyQt5 one, with the
- exceptions listed below.
-
- PyQt5's new signal and slot style utilizes method and decorator names
- specific to their implementation. These will be generalized according to
- the table below:
-
- ======= ======================= =============
- Module PyQt5 factory function PySide2 class
- ======= ======================= =============
- QtCore pyqtSignal Signal
- QtCore pyqtSlot Slot
- ======= ======================= =============
-
-Q_INVOKABLE
------------
-
- There is no equivalent of the Q_INVOKABLE macro of Qt
- since PySide2 slots can actually have return values.
- If you need to create a invokable method that returns some value,
- declare it as a slot, e.g.:
-
- ::
-
- class Foo(QObject):
-
- @Slot(float, result=int)
- def getFloatReturnInt(self, f):
- return int(f)
diff --git a/sources/pyside2/doc/extras/QtCore.rst b/sources/pyside2/doc/extras/QtCore.rst
deleted file mode 100644
index d3277a418..000000000
--- a/sources/pyside2/doc/extras/QtCore.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtCore
diff --git a/sources/pyside2/doc/extras/QtGui.rst b/sources/pyside2/doc/extras/QtGui.rst
deleted file mode 100644
index e16329c38..000000000
--- a/sources/pyside2/doc/extras/QtGui.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-To include the definitions of modules classes, use the following directive:
-
-::
-
- import PySide2.QtGui
-
-.. seealso:: :mod:`PySide2.QtCore`
diff --git a/sources/pyside2/doc/extras/QtHelp.rst b/sources/pyside2/doc/extras/QtHelp.rst
deleted file mode 100644
index 239f4faa6..000000000
--- a/sources/pyside2/doc/extras/QtHelp.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtHelp
diff --git a/sources/pyside2/doc/extras/QtMultimedia.rst b/sources/pyside2/doc/extras/QtMultimedia.rst
deleted file mode 100644
index 5088db4d0..000000000
--- a/sources/pyside2/doc/extras/QtMultimedia.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtMultimedia
-
-
diff --git a/sources/pyside2/doc/extras/QtNetwork.rst b/sources/pyside2/doc/extras/QtNetwork.rst
deleted file mode 100644
index 07303b157..000000000
--- a/sources/pyside2/doc/extras/QtNetwork.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtNetwork
diff --git a/sources/pyside2/doc/extras/QtOpenGL.rst b/sources/pyside2/doc/extras/QtOpenGL.rst
deleted file mode 100644
index 38783d9fd..000000000
--- a/sources/pyside2/doc/extras/QtOpenGL.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms.
-
-.. note:: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.
-
-The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents.
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtOpenGL
-
-The Qt OpenGL module is implemented as a platform-independent wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality.
-
-The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded Systems). \ No newline at end of file
diff --git a/sources/pyside2/doc/extras/QtQml.QmlElement.rst b/sources/pyside2/doc/extras/QtQml.QmlElement.rst
deleted file mode 100644
index 90a5134c1..000000000
--- a/sources/pyside2/doc/extras/QtQml.QmlElement.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-.. currentmodule:: PySide2.QtQml
-.. _QmlElement:
-
-QmlElement
-**********
-
-.. py:decorator:: QmlElement
-
- This decorator registers a class it is attached to for use in QML, using
- global variables to specify the import name and version.
-
- ::
- QML_IMPORT_NAME = "com.library.name"
- QML_IMPORT_MAJOR_VERSION = 1
- QML_IMPORT_MINOR_VERSION = 0 # Optional
-
- @QmlElement
- class ClassForQml(QObject):
- # ...
-
- Afterwards the class may be used in QML:
-
- ::
- import com.library.name 1.0
-
- ClassForQml {
- // ...
- }
diff --git a/sources/pyside2/doc/extras/QtQml.qmlRegisterSingletonType.rst b/sources/pyside2/doc/extras/QtQml.qmlRegisterSingletonType.rst
deleted file mode 100644
index 2e0f80762..000000000
--- a/sources/pyside2/doc/extras/QtQml.qmlRegisterSingletonType.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-.. currentmodule:: PySide2.QtQml
-.. _qmlRegisterSingletonType:
-
-qmlRegisterSingletonType
-************************
-
-.. 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.
-
-.. 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.
-
-
-.. 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.
diff --git a/sources/pyside2/doc/extras/QtQml.qmlRegisterType.rst b/sources/pyside2/doc/extras/QtQml.qmlRegisterType.rst
deleted file mode 100644
index d8bd3acb1..000000000
--- a/sources/pyside2/doc/extras/QtQml.qmlRegisterType.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-.. currentmodule:: PySide2.QtQml
-.. _qmlRegisterType:
-
-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.
diff --git a/sources/pyside2/doc/extras/QtQml.qmlRegisterUncreatableType.rst b/sources/pyside2/doc/extras/QtQml.qmlRegisterUncreatableType.rst
deleted file mode 100644
index 0e73f3d97..000000000
--- a/sources/pyside2/doc/extras/QtQml.qmlRegisterUncreatableType.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. currentmodule:: PySide2.QtQml
-.. _qmlRegisterUncreatableType:
-
-
-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.
diff --git a/sources/pyside2/doc/extras/QtScript.rst b/sources/pyside2/doc/extras/QtScript.rst
deleted file mode 100644
index 8ce7681ec..000000000
--- a/sources/pyside2/doc/extras/QtScript.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-The QtScript module only provides core scripting facilities; the QtScriptTools module provides additional Qt Script-related components that application developers may find useful.
-
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtScript
-
-License Information
--------------------
-
-Qt Commercial Edition licensees that wish to distribute applications that use the QtScript module need to be aware of their obligations under the GNU Library General Public License (LGPL).
-
-Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL.
-QtScript is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code.
-
-This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/sources/pyside2/doc/extras/QtScriptTools.rst b/sources/pyside2/doc/extras/QtScriptTools.rst
deleted file mode 100644
index a54ed914b..000000000
--- a/sources/pyside2/doc/extras/QtScriptTools.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-Applications that use the Qt Script Tools classes need to be configured to be built against the QtScriptTools module. To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtScriptTools
diff --git a/sources/pyside2/doc/extras/QtSql.rst b/sources/pyside2/doc/extras/QtSql.rst
deleted file mode 100644
index fcdd6ba02..000000000
--- a/sources/pyside2/doc/extras/QtSql.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtSql
diff --git a/sources/pyside2/doc/extras/QtSvg.rst b/sources/pyside2/doc/extras/QtSvg.rst
deleted file mode 100644
index 7817e532f..000000000
--- a/sources/pyside2/doc/extras/QtSvg.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtSvg
diff --git a/sources/pyside2/doc/extras/QtTest.rst b/sources/pyside2/doc/extras/QtTest.rst
deleted file mode 100644
index 0b89a22d4..000000000
--- a/sources/pyside2/doc/extras/QtTest.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtTest
-
-.. note:: All macros in the C++ version of QtTest were not binded in PySide, this module is useful only for GUI testing and benchmarking, for ordinary unit testing you should use the ``unittest`` Python module.
diff --git a/sources/pyside2/doc/extras/QtUiTools.loadUiType.rst b/sources/pyside2/doc/extras/QtUiTools.loadUiType.rst
deleted file mode 100644
index 9ca330dea..000000000
--- a/sources/pyside2/doc/extras/QtUiTools.loadUiType.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. currentmodule:: PySide2.QtUiTools
-.. _loadUiType:
-
-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 `pyside2-uic` wrapper uses a shipped `uic` that is located in the
- `site-packages/PySide2/uic`, so PATH needs to be updated to use that if there
- is no `uic` in the system.
-
- A simple use case is::
-
- from PySide2.QtUiTools import loadUiType
-
- generated_class, base_class = loadUiType("themewidget.ui")
- # the values will be:
- # (<class '__main__.Ui_ThemeWidgetForm'>, <class 'PySide2.QtWidgets.QWidget'>)
-
- widget = base_class()
- form = generated_class()
- form.setupUi(widget)
- # form.a_widget_member.a_method_of_member()
- widget.show()
diff --git a/sources/pyside2/doc/extras/QtUiTools.rst b/sources/pyside2/doc/extras/QtUiTools.rst
deleted file mode 100644
index 598d69dda..000000000
--- a/sources/pyside2/doc/extras/QtUiTools.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a UI file is needed.
-
-A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The :meth:`PySide2.QtUiTools.QUiLoader.load` function takes the user interface description contained in the file and constructs the form widget.
-
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide.QtUiTools
diff --git a/sources/pyside2/doc/extras/QtXml.rst b/sources/pyside2/doc/extras/QtXml.rst
deleted file mode 100644
index 4b48ef21e..000000000
--- a/sources/pyside2/doc/extras/QtXml.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtXml
diff --git a/sources/pyside2/doc/extras/QtXmlPatterns.rst b/sources/pyside2/doc/extras/QtXmlPatterns.rst
deleted file mode 100644
index 99254ad62..000000000
--- a/sources/pyside2/doc/extras/QtXmlPatterns.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtXmlPatterns
-
-Further Reading
----------------
-
-General overviews of XQuery and XSchema can be found in the XQuery document.
-
-An introduction to the XQuery language can be found in A Short Path to XQuery.
diff --git a/sources/pyside2/doc/faq.rst b/sources/pyside2/doc/faq.rst
deleted file mode 100644
index 99721141b..000000000
--- a/sources/pyside2/doc/faq.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-.. _faq:
-
-:orphan:
-
-Frequently Asked Questions
-==========================
-
-**When did The Qt Company adopt PySide2?**
- In April 2016 `The Qt Company <https://qt.io>`_ decided to properly support the port. For more
- information, see `<https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE>`_.
-
-**Why use PySide2 and not PySide?**
- Since PySide was developed for Qt 4, we now use PySide2 to imply that it is for a newer version,
- after it was ported to support Qt 5.
-
-**Where I can find information about the old PySide project?**
- The project's old wiki page is available on PySide, but the project is now deprecated and not
- supported.
-
-**There are three wheels (pyside2, shiboken6, and shiboken6_generator), what's the difference?**
-
- Before the official release, everything was in one big wheel, so it made sense to split these
- into separate wheels, each for the major projects currently in development:
-
- * **pyside2**: contains all the PySide2 modules to use the Qt framework; also depends on the
- shiboken6 module.
- * **shiboken6**: contains the shiboken6 module with helper functions for PySide2.
- * **shiboken6_generator**: contains the generator binary that can work with a C++ project and a
- typesystem to generate Python bindings.
- If you want to generate bindings for a Qt/C++ project, there won't be any linking to the Qt
- shared libraries; you need to do this by hand. We recommend building PySide2 from scratch
- to have everything properly linked.
-
-**Why is the shiboken6_generator not installed automatically?**
- It's not necessary to install the shiboken6_generator to use PySide2. The package is a result of
- the wheel splitting process. To use the generator, it's recommended to build it from scratch to
- have the proper Qt linking.
diff --git a/sources/pyside2/doc/gettingstarted-linux.rst b/sources/pyside2/doc/gettingstarted-linux.rst
deleted file mode 100644
index b2f5dc77b..000000000
--- a/sources/pyside2/doc/gettingstarted-linux.rst
+++ /dev/null
@@ -1,96 +0,0 @@
-Getting Started on Linux
-==========================
-
-Requirements
-------------
-
- * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably 5.15)
- * A Python interpreter (version Python 3.6+).
- You can either use the one provided by your OS, or get it
- from the `official website`_.
- * GCC
- * `CMake`_ version 3.1 or greater
- * Git version 2 or greater
- * `libclang`_ from your system or the prebuilt version from the ``Qt Downloads`` page is
- recommended. libclang10 is required for PySide 5.15.
- * ``sphinx`` package for the documentation (optional).
- * Depending on your linux distribution, the following dependencies might also be required:
-
- * ``libgl-dev``,
- * ``python-dev``,
- * ``python-distutils``,
- * and ``python-setuptools``.
-
-.. _here: https://qt.io/download
-.. _official website: https://www.python.org/downloads/
-.. _CMake: https://cmake.org/download/
-.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
-
-
-Building from source
---------------------
-
-Creating a virtual environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
-which arbitrary modules can be installed and which can be removed after use::
-
- python -m venv testenv
- source testenv/bin/activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
-
-will create and use a new virtual environment, which is indicated by the command prompt changing.
-
-Setting up CLANG
-~~~~~~~~~~~~~~~~
-
-If you don't have libclang already in your system, you can download from the Qt servers::
-
- wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
-
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
-
- 7z x libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
-
-Getting PySide2
-~~~~~~~~~~~~~~~
-
-Cloning the official repository can be done by::
-
- git clone --recursive https://code.qt.io/pyside/pyside-setup
-
-Checking out the version that we want to build, e.g. 5.15::
-
- cd pyside-setup && git checkout 5.15
-
-.. note:: Keep in mind you need to use the same version as your Qt installation.
- Additionally, ``git checkout -b 5.15 --track origin/5.14`` could be a better option
- in case you want to work on it.
-
-Building PySide2
-~~~~~~~~~~~~~~~~
-
-Check your Qt installation path, to specifically use that version of qmake to build PySide2.
-e.g. ``/opt/Qt/5.14.0/gcc_64/bin/qmake``.
-
-Build can take a few minutes, so it is recommended to use more than one CPU core::
-
- python setup.py build --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Installing PySide2
-~~~~~~~~~~~~~~~~~~
-
-To install on the current directory, just run::
-
- python setup.py install --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Test installation
-~~~~~~~~~~~~~~~~~
-
-You can execute one of the examples to verify the process is properly working.
-Remember to properly set the environment variables for Qt and PySide2::
-
- python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside2/doc/gettingstarted-macOS.rst b/sources/pyside2/doc/gettingstarted-macOS.rst
deleted file mode 100644
index 1d421a7a6..000000000
--- a/sources/pyside2/doc/gettingstarted-macOS.rst
+++ /dev/null
@@ -1,95 +0,0 @@
-Getting Started on macOS
-========================
-
-Requirements
-------------
-
- * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably 5.15)
- * A Python interpreter (version Python 3.6+).
- You can use the one provided by HomeBrew, or you can get
- python from the `official website`_.
- * `XCode`_ 8.2 (macOS 10.11), 8.3.3 (macOS 10.12), 9 (macOS 10.13), 10.1 (macOS 10.14)
- * `CMake`_ version 3.1 or greater
- * Git version 2 or greater
- * `libclang`_ from your system or the prebuilt version from the ``Qt Downloads`` page is
- recommended. libclang10 is required for PySide 5.15.
- * ``sphinx`` package for the documentation (optional).
- * Depending on your OS, the following dependencies might also be required:
-
- * ``libgl-dev``,
- * ``python-dev``,
- * ``python-distutils``,
- * and ``python-setuptools``.
-
-.. _XCode: https://developer.apple.com/xcode/
-.. _here: https://qt.io/download
-.. _official website: https://www.python.org/downloads/
-.. _CMake: https://cmake.org/download/
-.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
-
-
-Building from source
---------------------
-
-Creating a virtual environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
-which arbitrary modules can be installed and which can be removed after use::
-
- python -m venv testenv # your interpreter could be called 'python3'
- source testenv/bin/activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
-
-will create and use a new virtual environment, which is indicated by the command prompt changing.
-
-Setting up CLANG
-~~~~~~~~~~~~~~~~
-
-If you don't have libclang already in your system, you can download from the Qt servers::
-
- wget http://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-mac.7z
-
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
-
- 7z x libclang-release_100-based-mac.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
-
-Getting PySide2
-~~~~~~~~~~~~~~~
-
-Cloning the official repository can be done by::
-
- git clone --recursive https://code.qt.io/pyside/pyside-setup
-
-Checking out the version that we want to build, e.g. 5.15::
-
- cd pyside-setup && git checkout 5.15
-
-.. note:: Keep in mind you need to use the same version as your Qt installation
-
-Building PySide2
-~~~~~~~~~~~~~~~~
-
-Check your Qt installation path, to specifically use that version of qmake to build PySide2.
-e.g. ``/opt/Qt/5.15.0/gcc_64/bin/qmake``.
-
-Build can take a few minutes, so it is recommended to use more than one CPU core::
-
- python setup.py build --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Installing PySide2
-~~~~~~~~~~~~~~~~~~
-
-To install on the current directory, just run::
-
- python setup.py install --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Test installation
-~~~~~~~~~~~~~~~~~
-
-You can execute one of the examples to verify the process is properly working.
-Remember to properly set the environment variables for Qt and PySide2::
-
- python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside2/doc/gettingstarted-windows.rst b/sources/pyside2/doc/gettingstarted-windows.rst
deleted file mode 100644
index df24a3f90..000000000
--- a/sources/pyside2/doc/gettingstarted-windows.rst
+++ /dev/null
@@ -1,97 +0,0 @@
-Getting Started on Windows
-==========================
-
-The Qt library has to be built with the same version of MSVC as Python and PySide2, this can be
-selected when using the online installer.
-
-Requirements
-------------
-
- * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably Qt 5.15)
- * A Python interpreter (version Python 3.6+). Preferably get it from the `official website`_.
- * `MSVC2017`_ (or MSVC2019) for Python 3 on Windows,
- * `CMake`_ version 3.1 or greater
- * `Git`_ version 2 or greater
- * `libclang`_ prebuilt version from the ``Qt Downloads`` page is recommended. We recommend
- libclang10 for PySide 5.15.
- * `OpenSSL`_ (optional for SSL support, Qt must have been configured using the same SSL library).
- * ``venv`` or ``virtualenv`` is strongly recommended, but optional.
- * ``sphinx`` package for the documentation (optional).
-
-.. note:: Python 3.8.0 was missing some API required for PySide/Shiboken so it's not possible
- to use it for a Windows build.
-
-
-.. _here: https://qt.io/download
-.. _official website: https://www.python.org/downloads/
-.. _MSVC2017: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools
-.. _CMake: https://cmake.org/download/
-.. _Git: https://git-scm.com/download/win
-.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
-.. _OpenSSL: https://sourceforge.net/projects/openssl/
-
-
-Building from source on Windows 10
-----------------------------------
-
-Creating a virtual environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
-which arbitrary modules can be installed and which can be removed after use::
-
- python -m venv testenv
- call testenv\Scripts\activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
-
-will create and use a new virtual environment, which is indicated by the command prompt changing.
-
-Setting up CLANG
-~~~~~~~~~~~~~~~~
-
-If you don't have libclang already in your system, you can download from the Qt servers,
-e.g. ``libclang-release_100-based-windows-vs2019_64.7z``.
-
-Extract the files, and leave it on any desired path, e.g ``c:\``, and then set these two required
-environment variables::
-
- set LLVM_INSTALL_DIR=c:\libclang
- set PATH=C:\libclang\bin;%PATH%
-
-Getting PySide2
-~~~~~~~~~~~~~~~
-
-Cloning the official repository can be done by::
-
- git clone --recursive https://code.qt.io/pyside/pyside-setup
-
-Checking out the version that we want to build, e.g. 5.15::
-
- cd pyside-setup && git checkout 5.15
-
-.. note:: Keep in mind you need to use the same version as your Qt installation
-
-Building PySide2
-~~~~~~~~~~~~~~~~
-
-Check your Qt installation path, to specifically use that version of qmake to build PySide2.
-e.g. ``E:\Qt\5.15.0\msvc2019_64\bin\qmake.exe``.
-
-Build can take a few minutes, so it is recommended to use more than one CPU core::
-
- python setup.py build --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
-
-Installing PySide2
-~~~~~~~~~~~~~~~~~~
-
-To install on the current directory, just run::
-
- python setup.py install --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
-
-Test installation
-~~~~~~~~~~~~~~~~~
-
-You can execute one of the examples to verify the process is properly working.
-Remember to properly set the environment variables for Qt and PySide2::
-
- python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside2/doc/gettingstarted.rst b/sources/pyside2/doc/gettingstarted.rst
deleted file mode 100644
index cbf0056e9..000000000
--- a/sources/pyside2/doc/gettingstarted.rst
+++ /dev/null
@@ -1,218 +0,0 @@
-|project| Getting Started
-==========================
-
-This page is focused on building |project| from source, if you just want to install |pymodname|
-with ``pip`` you need to run::
-
- pip install pyside2
-
-for more details, refer to our `Quick Start`_ guide. Additionally, you can
-check the :ref:`FAQ <faq>` related to the project.
-
-.. _Quick Start: quickstart.html
-
-General Requirements
---------------------
-
- * **Python**: 3.6+
- * **Qt:** 5.12+ is recommended
- * **libclang:** The libclang library, recommended: version 10 for PySide2 5.15.
- Prebuilt versions of it can be `downloaded here`_.
- * **CMake:** 3.1+ is needed.
-
-.. _downloaded here: http://download.qt.io/development_releases/prebuilt/libclang/
-
-Guides per platform
--------------------
-
-You can refer to the following pages for platform specific instructions:
-
- * `Windows`_
- * `macOS`_
- * `Linux`_
- * Mobile platforms (iOS/Android) **(no support)**
- * Embedded platforms **(no official support)**
-
- .. note:: Most Linux-based embedded OS provide PySide2 with their official
- package manager (e.g. `Raspbian`_ and `ArchlinuxARM`_).
-
-.. _Windows: gettingstarted-windows.html
-.. _macOS: gettingstarted-macOS.html
-.. _Linux: gettingstarted-linux.html
-.. _Raspbian: https://www.raspbian.org/
-.. _ArchlinuxARM: https://archlinuxarm.org/
-
-A normal building command will look like this::
-
- python setup.py install --qmake=/path/to/qmake \
- --ignore-git \
- --debug \
- --build-tests \
- --parallel=8 \
- --make-spec=ninja \
- --verbose-build \
- --module-subset=Core,Gui,Widgets
-
-Which will build and install the project with **debug** symbols, including the **tests**,
-using **ninja** (instead of make), and considering only the **module subset** of QtCore, QtGUI
-and QtWidgets.
-
-Other important options to consider are:
- * ``--cmake``, to specify the path to the cmake binary,
- * ``--reuse-build``, to rebuild only the modified files,
- * ``--openssl=/path/to/openssl/bin``, to use a different path for OpenSSL,
- * ``--standalone``, to copy over the Qt libraries into the final package
- to make it work on other machines,
- * ``--doc-build-online``, to build documentation using the online template.
-
-Testing the installation
-------------------------
-
-Once the installation finishes, you will be able to execute any of our examples::
-
- python examples/widgets/widgets/tetrix.py
-
-Running Tests
--------------
-
-Using the ``--build-tests`` option will enable us to run all the auto tests inside the project::
-
- python testrunner.py test > testlog.txt
-
-.. note:: On Windows, don't forget to have qmake in your path
- (``set PATH=E:\Path\to\Qt\5.15\msvc2017_64\bin;%PATH%``)
-
-You can also run a specific test (for example ``qpainter_test``) by running::
-
- ctest -R qpainter_test --verbose
-
-Building the documentation
---------------------------
-
-Starting from 5.15, there are two options to build the documentation:
-
-1. Building rst-only documentation (no API)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The process of parsing Qt headers to generate the PySide API documentation can take several
-minutes, this means that modifying a specific section of the rst files we currently have, might
-become a hard task.
-
-For this, you can install ``sphinx`` on a virtual environment, and execute the following command::
-
- python setup.py build_rst_docs
-
-which will generate a ``html/`` directory with the following structure::
-
- html
- └── pyside2
- ├── index.html
- ├── ...
- └── shiboken6
- ├── index.html
- └── ...
-
-so you can open the main page ``html/pyside2/index.html`` on your browser to check the generated
-files.
-
-This is useful when updating the general sections of the documentation, adding tutorials,
-modifying the build instructions, and more.
-
-2. Building the documentation (rst + API)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The documentation is being generated using **qdoc** to get the API information, and also **sphinx**
-for the local Python related notes.
-
-The system required ``libxml2`` and ``libxslt``, also on the Python environment, ``sphinx`` and
-``graphviz`` need to be installed before running the installation process::
-
- pip install graphviz sphinx
-
-After installing ``graphviz``, the ``dot`` command needs to be in PATH, otherwise,
-the process will fail. Installing ``graphviz`` system-wide is also an option.
-
-Since the process rely on a Qt installation, you need to specify where the ``qtbase`` directory
-you will use with your ``qmake`` is located::
-
- export QT_SRC_DIR=/path/to/qtbase
-
-Once the build process finishes, you can go to the generated ``*_build/*_release/pyside2``
-directory, and run::
-
- make apidoc
-
-.. note:: The ``apidoc`` make target builds offline documenation in QCH (Qt Creator Help) format
- by default. You can switch to building for the online use with the ``--doc-build-online``
- configure option.
-
-Finally, you will get a ``html`` directory containing all the generated documentation. The offline
-help files, ``PySide.qch`` and ``Shiboken.qch``, can be moved to any directory of your choice. You
-can find ``Shiboken.qch`` in the build directory, ``*_build\*_release\shiboken6\doc\html``.
-
-Viewing offline documentation
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The offline documentation (QCH) can be viewed using the Qt Creator IDE or Qt Assistant, which is
-a standalone application for viewing QCH files.
-
-To view the QCH using Qt Creator, following the instructions outlined in
-`Using Qt Creator Help Mode <https://doc.qt.io/qtcreator/creator-help.html>`_. If you chose to
-use Qt Assistant instead, use the following command to register the QCH file before launching
-Qt Assistant:
-
- assistant -register PySide.qch
-
-.. note:: Qt Assistant renders the QCH content using the QTextBrowser backend, which supports
- a subset of the CSS styles, However, Qt Creator offers an alternative litehtml-based
- backend, which offers better browsing experience. At the moment, this is not the default
- backend, so you have to select the litehtml backend
- explicitly under the ``General`` tab in ``Qt Creator >> Tools >> Options >> Help``.
-
-Using the internal tools
-------------------------
-
-A set of tools can be found under the ``tools/`` directory inside the ``pyside-setup`` repository.
-
-* ``checklibs.py``: Script to analyze dynamic library dependencies of Mach-O binaries.
- To use this utility, just run::
-
- python checklibs.py /path/to/some.app/Contents/MacOS/Some
-
- This script was fetched from this repository_.
-
-* ``create_changelog.py``: Script used to create the CHANGELOG that you can find in the ``dist/``
- directory. Usage::
-
- python create_changelog.py -r 5.15.1 -v v5.15.0..5.15 -t bug-fix
-
-* ``debug_windows.py``: This script can be used to find out why PySide2 modules
- fail to load with various DLL errors like Missing DLL or Missing symbol in DLL.
-
- You can think of it as a Windows version of ``ldd`` / ``LD_DEBUG``.
-
- Underneath it uses the ``cdb.exe`` command line debugger, and the ``gflags.exe`` tool, both
- installed with the latest Windows Kit.
-
- The aim is to ask users to run this script when they encounter PySide2 imports not working on
- Windows. The user should then provide the generated log file.
-
- Incidentally it can also be used for any Windows executables, not just Python.
- To use it just run::
-
- python debug_windows.py
-
-* ``missing_bindings.py``: This script is used to compare the state of PySide2 and PyQt5
- regarding available modules and classses. This content is displayed in our `wiki page`_,
- and can be used as follows::
-
- python missing_bindings.py --qt-version 5.15.1 -w all
-
- Please keep in mind we rely on BeautifulSoup_ to parse the content, so you will be to install
- it besides PySide2 and PyQt5 (Including additional modules like DataVisualiztion, QtCharts,
- WebEngine, etc).
-
-
-.. _repository: https://github.com/liyanage/macosx-shell-scripts/
-.. _`wiki page`: https://wiki.qt.io/Qt_for_Python_Missing_Bindings
-.. _BeautifulSoup: https://www.crummy.com/software/BeautifulSoup/
diff --git a/sources/pyside2/doc/index.rst b/sources/pyside2/doc/index.rst
deleted file mode 100644
index 65e5912f4..000000000
--- a/sources/pyside2/doc/index.rst
+++ /dev/null
@@ -1,104 +0,0 @@
-|project|
-*********
-
-.. ifconfig:: output_format == 'html'
-
- **Qt for Python** offers the official Python bindings for `Qt`_, and
- has two main components:
-
- * `PySide2`_, so that you can use Qt5 APIs in your Python applications, and
- * `Shiboken6 <shiboken6/index.html>`__, a binding generator tool, which can
- be used to expose C++ projects to Python, and a Python module with
- some utility functions.
-
-.. ifconfig:: output_format == 'qthelp'
-
- **Qt for Python** offers the official Python bindings for `Qt`_, and
- has two main components:
-
- * `PySide2`_, so that you can use Qt5 APIs in your Python applications, and
- * `Shiboken6 <../shiboken6/index.html>`__, a binding generator tool, which can
- be used to expose C++ projects to Python, and a Python module with
- some utility functions.
-
-This project is available under the LGPLv3/GPLv3 and the `Qt commercial license`_.
-
-.. _Qt: https://doc.qt.io
-.. _PySide2: quickstart.html
-.. _`Qt commercial license`: https://www.qt.io/licensing/
-
-
-
-Documentation
-=============
-
-.. ifconfig:: output_format == 'html'
-
- .. raw:: html
-
- <table class="special">
- <colgroup>
- <col style="width: 33%" />
- <col style="width: 33%" />
- <col style="width: 33%" />
- </colgroup>
- <tr>
- <td><a href="quickstart.html"><p><strong>Check It Out!</strong><br/>Write your first Qt app.</p></a></td>
- <td><a href="gettingstarted.html"><p><strong>Getting Started</strong><br/>Install and build from source.</p></a></td>
- <td><a href="api.html"><p><strong>API Docs</strong><br/>Qt for Python API reference.</p></a></td>
- </tr>
-
- <tr>
- <td><a href="tutorials/index.html"><p><strong>Tutorials</strong><br/>Learn with step-by-step guides.</p></a></td>
- <td><a href="examples/index.html"><p><strong>Examples</strong><br/>Check all the available examples.</p></a></td>
- <td><a href="videos.html"><p><strong>Videos</strong><br/>Watch webinars, Talks, and more.</p></a></td>
- </tr>
-
- <tr>
- <td><a href="deployment.html" style="display: block;"><p><strong>Deployment</strong><br/>Learn to deploy your apps.</p></a></td>
- <td><a href="considerations.html" style="display: block;"><p><strong>Considerations</strong><br/>API differences and known issues.</p></a></td>
- <td><a href="shiboken6/index.html" style="display: block;"><p><strong>Shiboken</strong><br/>Generate C++ to Python binding.</p></a></td>
- </tr>
- </table>
-
-.. ifconfig :: output_format == 'qthelp'
-
- .. raw:: html
-
- <table class="special">
- <colgroup>
- <col style="width: 33%" />
- <col style="width: 33%" />
- <col style="width: 33%" />
- </colgroup>
- <tr>
- <td><a href="quickstart.html"><p><strong>Check It Out!</strong><br/>Write your first Qt app.</p></a></td>
- <td><a href="gettingstarted.html"><p><strong>Getting Started</strong><br/>Install and build from source.</p></a></td>
- <td><a href="api.html"><p><strong>API Docs</strong><br/>Qt for Python API reference.</p></a></td>
- </tr>
-
- <tr>
- <td><a href="tutorials/index.html"><p><strong>Tutorials</strong><br/>Learn with step-by-step guides.</p></a></td>
- <td><a href="examples/index.html"><p><strong>Examples</strong><br/>Check all the available examples.</p></a></td>
- <td><a href="videos.html"><p><strong>Videos</strong><br/>Watch webinars, Talks, and more.</p></a></td>
- </tr>
-
- <tr>
- <td><a href="deployment.html" style="display: block;"><p><strong>Deployment</strong><br/>Learn to deploy your apps.</p></a></td>
- <td><a href="considerations.html" style="display: block;"><p><strong>Considerations</strong><br/>API differences and known issues.</p></a></td>
- <td><a href="../shiboken6/index.html" style="display: block;"><p><strong>Shiboken</strong><br/>Generate C++ to Python binding.</p></a></td>
- </tr>
- </table>
-
-We have also a `wiki page`_ where you can find how to report bugs, contribute or contact the community.
-
-.. _`wiki page`: https://wiki.qt.io/Qt_for_Python
-
-.. toctree::
- :hidden:
- :glob:
-
- contents.rst
- gettingstarted*
- pyside-examples/pysideexamples*
- overviews/*
diff --git a/sources/pyside2/doc/inheritance_diagram.py b/sources/pyside2/doc/inheritance_diagram.py
deleted file mode 100644
index 875e17b50..000000000
--- a/sources/pyside2/doc/inheritance_diagram.py
+++ /dev/null
@@ -1,372 +0,0 @@
-# -*- coding: utf-8 -*-
-r"""
- sphinx.ext.inheritance_diagram
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Defines a docutils directive for inserting inheritance diagrams.
-
- Provide the directive with one or more classes or modules (separated
- by whitespace). For modules, all of the classes in that module will
- be used.
-
- Example::
-
- Given the following classes:
-
- class A: pass
- class B(A): pass
- class C(A): pass
- class D(B, C): pass
- class E(B): pass
-
- .. inheritance-diagram: D E
-
- Produces a graph like the following:
-
- A
- / \
- B C
- / \ /
- E D
-
- The graph is inserted as a PNG+image map into HTML and a PDF in
- LaTeX.
-
- :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- :copyright: Copyright 2010-2011 by the PySide team.
- :license: BSD, see LICENSE for details.
-"""
-
-import os
-import re
-import sys
-import inspect
-try:
- from hashlib import md5
-except ImportError:
- from md5 import md5
-
-from docutils import nodes
-from docutils.parsers.rst import directives, Directive
-
-from sphinx.ext.graphviz import render_dot_html, render_dot_latex
-
-class InheritanceException(Exception):
- pass
-
-# When passed something like:
-# PySide2.QtCore.QStateMachine.SignalEvent
-# try to import the underlying module and return a
-# handle to the object. In a loop, import
-# PySide2.QtCore.QStateMachine.SignalEvent
-# PySide2.QtCore.QStateMachine
-# PySide2.QtCore
-# until the import succeeds and walk up the attributes
-# to obtain the object
-
-def importClassOrModule(name):
- components = name.split('.')
- for i in range(len(components), 0, -1):
- importPath = '.'.join(components[: i])
- try:
- __import__(importPath)
- except ImportError:
- continue
- if i == len(components):
- return sys.modules[importPath]
- remaining = components[i :]
- cls = sys.modules[importPath]
- for component in remaining:
- try:
- cls = getattr(cls, component)
- except Exception: # No such attribute
- return None
- return cls
- return None
-
-class InheritanceGraph(object):
- """
- Given a list of classes, determines the set of classes that they inherit
- from all the way to the root "object", and then is able to generate a
- graphviz dot graph from them.
- """
- def __init__(self, class_names, currmodule, show_builtins=False, parts=0):
- """
- *class_names* is a list of child classes to show bases from.
-
- If *show_builtins* is True, then Python builtins will be shown
- in the graph.
- """
- self.class_names = class_names
- classes = self._import_classes(class_names, currmodule)
- self.class_info = self._class_info(classes, show_builtins, parts)
- if not self.class_info:
- raise InheritanceException('No classes found for '
- 'inheritance diagram')
-
- def _import_class_or_module(self, name, currmodule):
- """
- Import a class using its fully-qualified *name*.
- """
- todoc = importClassOrModule(name)
- if not todoc and currmodule is not None:
- todoc = importClassOrModule(currmodule + '.' + name)
- if not todoc:
- moduleStr = '(module {})'.format(currmodule) if currmodule else ''
- raise InheritanceException('Could not import class {} specified for '
- 'inheritance diagram {}.'.format(name, moduleStr))
- if inspect.isclass(todoc):
- return [todoc]
- elif inspect.ismodule(todoc):
- classes = []
- for cls in todoc.__dict__.values():
- if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
- classes.append(cls)
- return classes
- raise InheritanceException('%r specified for inheritance diagram is '
- 'not a class or module' % name)
-
- def _import_classes(self, class_names, currmodule):
- """Import a list of classes."""
- classes = []
- for name in class_names:
- classes.extend(self._import_class_or_module(name, currmodule))
- return classes
-
- def _class_info(self, classes, show_builtins, parts):
- """Return name and bases for all classes that are ancestors of
- *classes*.
-
- *parts* gives the number of dotted name parts that is removed from the
- displayed node names.
- """
- all_classes = {}
- builtins = __builtins__.values()
-
- def recurse(cls):
- if not show_builtins and cls in builtins:
- return
-
- nodename = self.class_name(cls, parts)
- fullname = self.class_name(cls, 0)
-
- baselist = []
- all_classes[cls] = (nodename, fullname, baselist)
- for base in cls.__bases__:
- if not show_builtins and base in builtins:
- continue
- if base.__name__ == "Object" and base.__module__ == "Shiboken":
- continue
- baselist.append(self.class_name(base, parts))
- if base not in all_classes:
- recurse(base)
-
- for cls in classes:
- recurse(cls)
-
- return list(all_classes.values())
-
- def class_name(self, cls, parts=0):
- """Given a class object, return a fully-qualified name.
-
- This works for things I've tested in matplotlib so far, but may not be
- completely general.
- """
- module = cls.__module__
- if module == '__builtin__':
- fullname = cls.__name__
- else:
- fullname = '%s.%s' % (module, cls.__qualname__)
- if parts == 0:
- return fullname
- name_parts = fullname.split('.')
- return '.'.join(name_parts[-parts:])
-
- def get_all_class_names(self):
- """
- Get all of the class names involved in the graph.
- """
- return [fullname for (_, fullname, _) in self.class_info]
-
- # These are the default attrs for graphviz
- default_graph_attrs = {
- 'rankdir': 'LR',
- 'size': '"8.0, 12.0"',
- }
- default_node_attrs = {
- 'shape': 'box',
- 'fontsize': 10,
- 'height': 0.25,
- 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, '
- 'Arial, Helvetica, sans"',
- 'style': '"setlinewidth(0.5)"',
- }
- default_edge_attrs = {
- 'arrowsize': 0.5,
- 'style': '"setlinewidth(0.5)"',
- }
-
- def _format_node_attrs(self, attrs):
- return ','.join(['%s=%s' % x for x in attrs.items()])
-
- def _format_graph_attrs(self, attrs):
- return ''.join(['%s=%s;\n' % x for x in attrs.items()])
-
- def generate_dot(self, name, urls={}, env=None,
- graph_attrs={}, node_attrs={}, edge_attrs={}):
- """
- Generate a graphviz dot graph from the classes that
- were passed in to __init__.
-
- *name* is the name of the graph.
-
- *urls* is a dictionary mapping class names to HTTP URLs.
-
- *graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing
- key/value pairs to pass on as graphviz properties.
- """
- g_attrs = self.default_graph_attrs.copy()
- n_attrs = self.default_node_attrs.copy()
- e_attrs = self.default_edge_attrs.copy()
- g_attrs.update(graph_attrs)
- n_attrs.update(node_attrs)
- e_attrs.update(edge_attrs)
- if env:
- g_attrs.update(env.config.inheritance_graph_attrs)
- n_attrs.update(env.config.inheritance_node_attrs)
- e_attrs.update(env.config.inheritance_edge_attrs)
-
- res = []
- res.append('digraph %s {\n' % name)
- res.append(self._format_graph_attrs(g_attrs))
-
- for name, fullname, bases in self.class_info:
- # Write the node
- this_node_attrs = n_attrs.copy()
- url = urls.get(fullname)
- if url is not None:
- this_node_attrs['URL'] = '"%s"' % url
- res.append(' "%s" [%s];\n' %
- (name, self._format_node_attrs(this_node_attrs)))
-
- # Write the edges
- for base_name in bases:
- res.append(' "%s" -> "%s" [%s];\n' %
- (base_name, name,
- self._format_node_attrs(e_attrs)))
- res.append('}\n')
- return ''.join(res)
-
-
-class inheritance_diagram(nodes.General, nodes.Element):
- """
- A docutils node to use as a placeholder for the inheritance diagram.
- """
- pass
-
-
-class InheritanceDiagram(Directive):
- """
- Run when the inheritance_diagram directive is first encountered.
- """
- has_content = False
- required_arguments = 1
- optional_arguments = 0
- final_argument_whitespace = True
- option_spec = {
- 'parts': directives.nonnegative_int,
- }
-
- def run(self):
- node = inheritance_diagram()
- node.document = self.state.document
- env = self.state.document.settings.env
- class_names = self.arguments[0].split()
- class_role = env.get_domain('py').role('class')
- # Store the original content for use as a hash
- node['parts'] = self.options.get('parts', 0)
- node['content'] = ', '.join(class_names)
-
- # Create a graph starting with the list of classes
- try:
- graph = InheritanceGraph(
- class_names, env.temp_data.get('py:module'),
- parts=node['parts'])
- except InheritanceException as err:
- return [node.document.reporter.warning(err.args[0],
- line=self.lineno)]
-
- # Create xref nodes for each target of the graph's image map and
- # add them to the doc tree so that Sphinx can resolve the
- # references to real URLs later. These nodes will eventually be
- # removed from the doctree after we're done with them.
- for name in graph.get_all_class_names():
- refnodes, x = class_role(
- 'class', ':class:`%s`' % name, name, 0, self.state)
- node.extend(refnodes)
- # Store the graph object so we can use it to generate the
- # dot file later
- node['graph'] = graph
- return [node]
-
-
-def get_graph_hash(node):
- hashString = node['content'] + str(node['parts'])
- return md5(hashString.encode('utf-8')).hexdigest()[-10:]
-
-
-def html_visit_inheritance_diagram(self, node):
- """
- Output the graph for HTML. This will insert a PNG with clickable
- image map.
- """
- graph = node['graph']
-
- graph_hash = get_graph_hash(node)
- name = 'inheritance%s' % graph_hash
-
- # Create a mapping from fully-qualified class names to URLs.
- urls = {}
- for child in node:
- if child.get('refuri') is not None:
- urls[child['reftitle']] = child.get('refuri')
- elif child.get('refid') is not None:
- urls[child['reftitle']] = '#' + child.get('refid')
-
- dotcode = graph.generate_dot(name, urls, env=self.builder.env)
- render_dot_html(self, node, dotcode, {}, 'inheritance', 'inheritance',
- alt='Inheritance diagram of ' + node['content'])
- raise nodes.SkipNode
-
-
-def latex_visit_inheritance_diagram(self, node):
- """
- Output the graph for LaTeX. This will insert a PDF.
- """
- graph = node['graph']
-
- graph_hash = get_graph_hash(node)
- name = 'inheritance%s' % graph_hash
-
- dotcode = graph.generate_dot(name, env=self.builder.env,
- graph_attrs={'size': '"6.0,6.0"'})
- render_dot_latex(self, node, dotcode, {}, 'inheritance')
- raise nodes.SkipNode
-
-
-def skip(self, node):
- raise nodes.SkipNode
-
-
-def setup(app):
- app.setup_extension('sphinx.ext.graphviz')
- app.add_node(
- inheritance_diagram,
- latex=(latex_visit_inheritance_diagram, None),
- html=(html_visit_inheritance_diagram, None),
- text=(skip, None),
- man=(skip, None))
- app.add_directive('inheritance-diagram', InheritanceDiagram)
- app.add_config_value('inheritance_graph_attrs', {}, False),
- app.add_config_value('inheritance_node_attrs', {}, False),
- app.add_config_value('inheritance_edge_attrs', {}, False),
diff --git a/sources/pyside2/doc/modules.rst b/sources/pyside2/doc/modules.rst
deleted file mode 100644
index f42fac636..000000000
--- a/sources/pyside2/doc/modules.rst
+++ /dev/null
@@ -1,97 +0,0 @@
-Qt Modules
-===========
-
-.. toctree::
- :hidden:
- :glob:
-
- PySide2/Qt*/index
-
-.. list-table::
- :widths: 150, 150
- :align: left
-
- * - :mod:`Qt Core <PySide2.QtCore>`
- Provides core non-GUI functionality.
- - :mod:`Qt 3D Animation <PySide2.Qt3DAnimation>`
- Provides basic elements required to animate 3D objects.
- * - :mod:`Qt Gui <PySide2.QtGui>`
- Extends QtCore with GUI functionality.
- - :mod:`Qt Help <PySide2.QtHelp>`
- Provides classes for integrating online documentation in applications.
- * - :mod:`Qt Network <PySide2.QtNetwork>`
- Offers classes that let you to write TCP/IP clients and servers.
- - :mod:`Qt OpenGL <PySide2.QtOpenGL>`
- Offers classes that make it easy to use OpenGL in Qt applications.
- * - :mod:`Qt PrintSupport <PySide2.QtPrintSupport>`
- Provides extensive cross-platform support for printing.
- - :mod:`Qt Qml <PySide2.QtQml>`
- Python API for Qt QML.
- * - :mod:`Qt Charts <PySide2.QtCharts>`
- Provides a set of easy to use chart components.
- - :mod:`Qt Quick <PySide2.QtQuick>`
- Provides classes for embedding Qt Quick in Qt applications.
- * - :mod:`Qt DataVisualization <PySide2.QtDataVisualization>`
- Provides a way to visualize data in 3D as bar, scatter, and surface graphs.
- - :mod:`Qt QuickWidgets <PySide2.QtQuickWidgets>`
- Provides the QQuickWidget class for embedding Qt Quick in widget-based applications.
- * - :mod:`Qt TextToSpeech <PySide2.QtTextToSpeech>`
- Provides API to access text-to-speech engines.
- - :mod:`Qt Sql <PySide2.QtSql>`
- Helps you provide seamless database integration to your Qt applications.
- * - :mod:`Qt Multimedia <PySide2.QtMultimedia>`
- Provides low-level multimedia functionality.
- - :mod:`Qt MultimediaWidgets <PySide2.QtMultimediaWidgets>`
- Provides the widget-based multimedia API.
- * - :mod:`Qt MacExtras <PySide2.QtMacExtras>`
- Provides classes and functions specific to
- macOS and iOS operating systems.
- - :mod:`Qt Svg <PySide2.QtSvg>`
- Provides classes for displaying the contents of SVG files.
- * - :mod:`Qt UiTools <PySide2.QtUiTools>`
- Provides classes to handle forms created with Qt Designer.
- - :mod:`Qt Test <PySide2.QtTest>`
- Provides classes for unit testing Qt applications and libraries.
- * - :mod:`Qt Concurrent <PySide2.QtConcurrent>`
- Provides high-level APIs that make it possible
- to write multi-threaded programs without using low-level threading
- primitives such as mutexes, read-write locks, wait conditions, or semaphores.
- - :mod:`Qt AxContainer <PySide2.QtAxContainer>`
- Provides QAxObject and QAxWidget which act as
- containers for COM objects and ActiveX controls.
- * - :mod:`Qt WebEngineCore <PySide2.QtWebEngineCore>`
- Provides the core functionality to integrate web content.
- - :mod:`Qt WebEngineWidgets <PySide2.QtWebEngineWidgets>`
- Provides widgets that can handle web content.
- * - :mod:`Qt WebChannel <PySide2.QtWebChannel>`
- Enables peer-to-peer communication between a server and a client
- (HTML/JavaScript or QML application).
- - :mod:`Qt WebSockets <PySide2.QtWebSockets>`
- Provides interfaces that enable Qt applications
- to act as a server that can process WebSocket requests, or a client that
- can consume data received from the server, or both.
- * - :mod:`Qt Widgets <PySide2.QtWidgets>`
- Extends Qt GUI with C++ widget functionality.
- - :mod:`Qt WinExtras <PySide2.QtWinExtras>`
- Provides classes and functions for using some Windows APIs in a Qt way.
- * - :mod:`Qt X11Extras <PySide2.QtX11Extras>`
- Provides information about the X display configuration.
- - :mod:`Qt Xml <PySide2.QtXml>`
- Provides C++ implementations of SAX and DOM.
- * - :mod:`Qt 3D Extras <PySide2.Qt3DExtras>`
- Provides a set of prebuilt elements to help you get started with Qt 3D.
- - :mod:`Qt 3D Input <PySide2.Qt3DInput>`
- Provides classes for handling user input in applications using Qt 3D.
- * - :mod:`Qt 3D Logic <PySide2.Qt3DLogic>`
- Enables synchronizing frames with the Qt 3D backend.
- - :mod:`Qt 3D Render <PySide2.Qt3DRender>`
- Contains functionality to support 2D and 3D rendering using Qt 3D.
- * - :mod:`Qt Positioning <PySide2.QtPositioning>`
- Provides positioning information via QML and Python interfaces.
- - :mod:`Qt Location <PySide2.QtLocation>`
- Helps you create viable mapping solutions using the data available from some of the popular location services.
- * - :mod:`Qt Sensors <PySide2.QtSensors>`
- Provides access to sensor hardware via QML and Python interfaces and a motion gesture recognition API for devices.
- - :mod:`Qt Scxml <PySide2.QtScxml>`
- Provides classes to create and use state machines from SCXML files.
-
diff --git a/sources/pyside2/doc/pyside-config.qdocconf.in b/sources/pyside2/doc/pyside-config.qdocconf.in
deleted file mode 100644
index 3fd567165..000000000
--- a/sources/pyside2/doc/pyside-config.qdocconf.in
+++ /dev/null
@@ -1,19 +0,0 @@
-buildversion = @PYSIDE_QT_VERSION@
-navigation.homepage = Qt for Python
-
-macro.nullptr = "\\c{None}"
-
-outputdir = @DOC_DATA_DIR@
-outputformats = WebXML
-WebXML.quotinginformation = true
-WebXML.nosubdirs = true
-WebXML.outputsubdir = webxml
-
-spurious += "Hostile character .*"
-
-#excludes qdoc statements that are not relevant for PySide2
-defines += qtforpython
-
-includepaths += \
- -I @QT_INCLUDE_DIR@ \
- -I @mkspecInclude@ \
diff --git a/sources/pyside2/doc/pyside-examples/examples.qdoc b/sources/pyside2/doc/pyside-examples/examples.qdoc
deleted file mode 100644
index 748c4f8fd..000000000
--- a/sources/pyside2/doc/pyside-examples/examples.qdoc
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \group all-pyside-examples
- \title All Qt for Python Examples
- \brief A varied selection of examples can be found in the 'examples' directory of the
- pyside-setup repository. This can be accessed after installing
- PySide2 via pip, checking the 'site-packages/PySide2/examples' directory.
-
- This page aims to document the most important use cases of the module
- and it will be extended with each release.
-*/
diff --git a/sources/pyside2/doc/pyside-examples/pyside-classwizard.qdoc b/sources/pyside2/doc/pyside-examples/pyside-classwizard.qdoc
deleted file mode 100644
index 56ac43d63..000000000
--- a/sources/pyside2/doc/pyside-examples/pyside-classwizard.qdoc
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example widgets/dialogs/classwizard
- \title PySide2.QtWidgets - Classwizard Example
- \ingroup all-pyside-examples
- \brief Demonstrates the use of QDialog in a wizard application
-
- This example demonstrates the use a custom QDialog in a wizard,
- which generates necessary C++ class template code.
-
- \image pysideexample-classwizard.png
-
-*/
diff --git a/sources/pyside2/doc/pyside-examples/pyside-stardelegate.qdoc b/sources/pyside2/doc/pyside-examples/pyside-stardelegate.qdoc
deleted file mode 100644
index c2c974910..000000000
--- a/sources/pyside2/doc/pyside-examples/pyside-stardelegate.qdoc
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example widgets/itemviews/stardelegate
- \title PySide2.QtWidgets - Star Delegate Example
- \ingroup all-pyside-examples
- \brief Demonstrates Qt's itemview architecture
-
- This example demonstrates the itemview architecture, which
- is unique to Qt.
-
- \image pysideexample-stardelegate.png
-*/
-
diff --git a/sources/pyside2/doc/quickstart.rst b/sources/pyside2/doc/quickstart.rst
deleted file mode 100644
index fc6b9810a..000000000
--- a/sources/pyside2/doc/quickstart.rst
+++ /dev/null
@@ -1,118 +0,0 @@
-|project| Quick start
-======================
-
-Requirements
-------------
-
-Before you can install |project|, first you must install the following software:
-
- * Python 3.6+,
- * We recommend using a virtual environment, such as
- `venv <https://docs.python.org/3/library/venv.html>`_ or
- `virtualenv <https://virtualenv.pypa.io/en/latest>`_
-
-Creating and activating an environment
---------------------------------------
-
-You can do this by running the following on a terminal::
-
- $ python -m venv env/ # Your binary is maybe called 'python3'
- $ source env/bin/activate # for Linux and macOS
- $ env\Scripts\activate.bat # for Windows
-
-
-
-Installation
-------------
-
-Now you are ready to install the |project| packages using ``pip``.
-From the terminal, run the following command::
-
- # For the latest version on PyPi
- pip install PySide2
-
- # For a specific version
- pip install PySide2==5.15.0
-
-or::
-
- pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.15/latest pyside2 --trusted-host download.qt.io
-
-Test your Installation
-----------------------
-
-Now that you have |project| installed, you can test your setup by running the following Python
-constructs to print version information::
-
- import PySide2.QtCore
-
- # Prints PySide2 version
- print(PySide2.__version__)
-
- # Prints the Qt version used to compile PySide2
- print(PySide2.QtCore.__version__)
-
-.. note::
-
- As it happened in 5.14.2, PySide had a couple of new releases to fix
- issues in 5.14.2, adding yet another version level. In that case, you
- will have different versions being shown for Qt and PySide.
-
-Create a Simple Application
----------------------------
-
-Your |project| setup is ready. You can explore it further by developing a simple application
-that prints "Hello World" in several languages. The following instructions will
-guide you through the development process:
-
-1. Create a new file named :code:`hello_world.py`, and add the following imports to it.::
-
- import sys
- import random
- from PySide2 import QtCore, QtWidgets, QtGui
-
- The |pymodname| Python module provides access to the Qt APIs as its submodule.
- In this case, you are importing the :code:`QtCore`, :code:`QtWidgets`, and :code:`QtGui` submodules.
-
-2. Define a class named :code:`MyWidget`, which extends QWidget and includes a QPushButton and
- QLabel.::
-
- class MyWidget(QtWidgets.QWidget):
- def __init__(self):
- super().__init__()
-
- self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
-
- self.button = QtWidgets.QPushButton("Click me!")
- self.text = QtWidgets.QLabel("Hello World",
- alignment=QtCore.Qt.AlignCenter)
-
- self.layout = QtWidgets.QVBoxLayout()
- self.layout.addWidget(self.text)
- self.layout.addWidget(self.button)
- self.setLayout(self.layout)
-
- self.button.clicked.connect(self.magic)
-
- @QtCore.Slot()
- def magic(self):
- self.text.setText(random.choice(self.hello))
-
- The MyWidget class has the :code:`magic` member function that randomly chooses an item from the
- :code:`hello` list. When you click the button, the :code:`magic` function is called.
-
-3. Now, add a main function where you instantiate :code:`MyWidget` and :code:`show` it.::
-
- if __name__ == "__main__":
- app = QtWidgets.QApplication([])
-
- widget = MyWidget()
- widget.resize(800, 600)
- widget.show()
-
- sys.exit(app.exec_())
-
-Run your example. Try clicking the button at the bottom to see which greeting you get.
-
-.. image:: pyside-examples/images/screenshot_hello.png
- :alt: Hello World application
diff --git a/sources/pyside2/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside2/doc/tutorials/basictutorial/clickablebutton.rst
deleted file mode 100644
index accb54aea..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/clickablebutton.rst
+++ /dev/null
@@ -1,90 +0,0 @@
-A Simple Button Tutorial
-************************
-
-In this tutorial, we'll show you how to handle **signals and slots**
-using Qt for Python. **Signals and slots** is a Qt feature that lets
-your graphical widgets communicate with other graphical widgets or
-your python code. Our application creates a button that logs the
-`Button clicked, Hello!` message to the python console each time you
-click it.
-
-Let's start by importing the necessary PySide2 classes and python
-`sys` module:
-::
-
- import sys
- from PySide2.QtWidgets import QApplication, QPushButton
- from PySide2.QtCore import Slot
-
-Let's also create a python function that logs the message to the
-console:
-::
-
- # Greetings
- @Slot()
- def say_hello():
- print("Button clicked, Hello!")
-
-.. note:: The `@Slot()` is a decorator that identifies a function as
- a slot. It is not important to understand why for now,
- but use it always to avoid unexpected behavior.
-
-Now, as mentioned in previous examples you must create the
-`QApplication` to run your PySide2 code:
-::
-
- # Create the Qt Application
- app = QApplication(sys.argv)
-
-Let's create the clickable button, which is a `QPushButton` instance.
-To label the button, we pass a python string to the constructor:
-::
-
- # Create a button
- button = QPushButton("Click me")
-
-Before we show the button, we must connect it to the `say_hello()`
-function that we defined earlier. There are two ways of doing this;
-using the old style or the new style, which is more pythonic. Let's
-use the new style in this case. You can find more information about
-both these styles in the
-`Signals and Slots in PySide2 <https://wiki.qt.io/Qt_for_Python_Signals_and_Slots>`_
-wiki page.
-
-The `QPushButton` has a predefined signal called **clicked**, which
-is triggered every time the button is clicked. We'll connect this
-signal to the `say_hello()` function:
-::
-
- # Connect the button to the function
- button.clicked.connect(say_hello)
-
-Finally, we show the button and start the Qt main loop:
-::
-
- # Show the button
- button.show()
- # Run the main Qt loop
- app.exec_()
-
-Here is the complete code for this example:
-::
-
- #!/usr/bin/python
-
- import sys
- from PySide2.QtWidgets import QApplication, QPushButton
- from PySide2.QtCore import Slot
-
- @Slot()
- def say_hello():
- print("Button clicked, Hello!")
-
- # Create the Qt Application
- app = QApplication(sys.argv)
- # Create a button, connect it and show it
- button = QPushButton("Click me")
- button.clicked.connect(say_hello)
- button.show()
- # Run the main Qt loop
- app.exec_()
diff --git a/sources/pyside2/doc/tutorials/basictutorial/dialog.rst b/sources/pyside2/doc/tutorials/basictutorial/dialog.rst
deleted file mode 100644
index cdb356b91..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/dialog.rst
+++ /dev/null
@@ -1,145 +0,0 @@
-Creating a Simple PySide2 Dialog Application
-*********************************************
-
-This tutorial shows how to build a simple dialog with some
-basic widgets. The idea is to let users provide their name
-in a `QLineEdit`, and the dialog greets them on click of a
-`QPushButton`.
-
-Let us just start with a simple stub that creates and shows
-a dialog. This stub is updated during the course of this
-tutorial, but you can use this stub as is if you need to:
-::
-
- import sys
- from PySide2.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton
-
- class Form(QDialog):
-
- def __init__(self, parent=None):
- super(Form, self).__init__(parent)
- self.setWindowTitle("My Form")
-
-
- if __name__ == '__main__':
- # Create the Qt Application
- app = QApplication(sys.argv)
- # Create and show the form
- form = Form()
- form.show()
- # Run the main Qt loop
- sys.exit(app.exec_())
-
-The imports aren't new to you, the same for the creation of the
-`QApplication` and the execution of the Qt main loop.
-The only novelty here is the **class definition**.
-
-You can create any class that subclasses PySide2 widgets.
-In this case, we are subclassing `QDialog` to define a custom
-dialog, which we name as **Form**. We have also implemented the
-`init()` method that calls the `QDialog`'s init method with the
-parent widget, if any. Also, the new `setWindowTitle()` method
-just sets the title of the dialog window. In `main()`, you can see
-that we are creating a *Form object* and showing it to the world.
-
-Create the Widgets
-===================
-
-We are going to create two widgets: a `QLineEdit` where users can
-enter their name, and a `QPushButton` that prints the contents of
-the `QLineEdit`.
-So, let's add the following code to the `init()` method of our Form:
-::
-
- # Create widgets
- self.edit = QLineEdit("Write my name here..")
- self.button = QPushButton("Show Greetings")
-
-It's obvious from the code that both widgets will show the corresponding
-texts.
-
-Create a layout to organize the Widgets
-========================================
-
-Qt comes with layout-support that helps you organize the widgets
-in your application. In this case, let's use `QVBoxLayout` to lay out
-the widgets vertically. Add the following code to the `init()` method,
-after creating the widgets:
-::
-
- # Create layout and add widgets
- layout = QVBoxLayout()
- layout.addWidget(self.edit)
- layout.addWidget(self.button)
- # Set dialog layout
- self.setLayout(layout)
-
-So, we create the layout, add the widgets with `addWidget()`,
-and finally we say that our **Form** will have our `QVBoxLayout`
-as its layout.
-
-Create the function to greet and connect the Button
-====================================================
-
-Finally, we just have to add a function to our custom **Form**
-and *connect* our button to it. Our function will be a part of
-the Form, so you have to add it after the `init()` function:
-::
-
- # Greets the user
- def greetings(self):
- print ("Hello {}".format(self.edit.text()))
-
-Our function just prints the contents of the `QLineEdit` to the
-python console. We have access to the text by means of the
-`QLineEdit.text()` method.
-
-Now that we have everything, we just need to *connect* the
-`QPushButton` to the `Form.greetings()` method. To do so, add the
-following line to the `init()` method:
-::
-
- # Add button signal to greetings slot
- self.button.clicked.connect(self.greetings)
-
-Once executed, you can enter your name in the `QLineEdit` and watch
-the console for greetings.
-
-Complete code
-=============
-
-Here is the complete code for this tutorial:
-::
-
- import sys
- from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication,
- QVBoxLayout, QDialog)
-
- class Form(QDialog):
-
- def __init__(self, parent=None):
- super(Form, self).__init__(parent)
- # Create widgets
- self.edit = QLineEdit("Write my name here")
- self.button = QPushButton("Show Greetings")
- # Create layout and add widgets
- layout = QVBoxLayout()
- layout.addWidget(self.edit)
- layout.addWidget(self.button)
- # Set dialog layout
- self.setLayout(layout)
- # Add button signal to greetings slot
- self.button.clicked.connect(self.greetings)
-
- # Greets the user
- def greetings(self):
- print ("Hello %s" % self.edit.text())
-
- if __name__ == '__main__':
- # Create the Qt Application
- app = QApplication(sys.argv)
- # Create and show the form
- form = Form()
- form.show()
- # Run the main Qt loop
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/basictutorial/qml.rst b/sources/pyside2/doc/tutorials/basictutorial/qml.rst
deleted file mode 100644
index fb168410a..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/qml.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-Your First Application Using PySide2 and QtQuick/QML
-*****************************************************
-
-QML is a declarative language that lets you develop applications
-faster than with traditional languages. It is ideal for designing the
-UI of your application because of its declarative nature. In QML, a
-user interface is specified as a tree of objects with properties. In
-this tutorial, we will show how to make a simple "Hello World"
-application with PySide2 and QML.
-
-A PySide2/QML application consists, at least, of two different files -
-a file with the QML description of the user interface, and a python file
-that loads the QML file. To make things easier, let's save both files in
-the same directory.
-
-Here is a simple QML file called `view.qml`:
-
-.. code-block:: javascript
-
- import QtQuick 2.0
-
- Rectangle {
- width: 200
- height: 200
- color: "green"
-
- Text {
- text: "Hello World"
- anchors.centerIn: parent
- }
- }
-
-We start by importing `QtQuick 2.0`, which is a QML module.
-
-The rest of the QML code is pretty straightforward for those who
-have previously used HTML or XML files. Basically, we are creating
-a green rectangle with the size `200*200`, and adding a Text element
-that reads "Hello World". The code `anchors.centerIn: parent` makes
-the text appear centered in relation to its immediate parent, which
-is the Rectangle in this case.
-
-Now, let's see how the code looks on the PySide2.
-Let's call it `main.py`:
-
-.. code-block:: python
-
- from PySide2.QtWidgets import QApplication
- from PySide2.QtQuick import QQuickView
- from PySide2.QtCore import QUrl
-
- app = QApplication([])
- view = QQuickView()
- url = QUrl("view.qml")
-
- view.setSource(url)
- view.show()
- app.exec_()
-
-If you are already familiar with PySide2 and have followed our
-tutorials, you have already seen much of this code.
-The only novelties are that you must `import QtQuick` and set the
-source of the `QQuickView` object to the URL of your QML file.
-Then, as any Qt widget, you call `QQuickView.show()`.
-
-.. note:: If you are programming for desktop, you should consider
- adding `view.setResizeMode(QQuickView.SizeRootObjectToView)`
- before showing the view.
diff --git a/sources/pyside2/doc/tutorials/basictutorial/qrcfiles.rst b/sources/pyside2/doc/tutorials/basictutorial/qrcfiles.rst
deleted file mode 100644
index 2f986875c..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/qrcfiles.rst
+++ /dev/null
@@ -1,169 +0,0 @@
-Using `.qrc` Files (`pyside2-rcc`)
-**********************************
-
-The `Qt Resource System`_ is a mechanism for storing binary files
-in an application.
-
-The most common uses are for custom images, icons, fonts, among others.
-
-In this tutorial you will learn how to load custom images as button icons.
-
-For inspiration, we will try to adapt the multimedia player example
-from Qt.
-
-As you can see on the following image, the `QPushButton` that are used
-for the media actions (play, pause, stop, and so on) are using the
-default icons meant for such actions.
-
-.. image:: player.png
- :alt: Multimedia Player Qt Example
-
-You could make the application more attractive by designing the icons,
-but in case you don't want to design them, `download the following set`_
-and use them.
-
-.. image:: icons.png
- :alt: New Multimedia icons
-
-You can find more information about the `rcc` command, and `.qrc` file
-format, and the resource system in general in the `Qt Resource System`_
-site.
-
-.. _`download the following set`: icons/
-
-
-The `.qrc` file
-================
-
-Before running any command, add information about the resources to a `.qrc`
-file.
-In the following example, notice how the resources are listed in `icons.qrc`
-
-::
-
- </ui>
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource>
- <file>icons/play.png</file>
- <file>icons/pause.png</file>
- <file>icons/stop.png</file>
- <file>icons/previous.png</file>
- <file>icons/forward.png</file>
- </qresource>
- </RCC>
-
-
-Generating a Python file
-=========================
-
-Now that the `icons.qrc` file is ready, use the `pyside2-rcc` tool to generate
-a Python class containing the binary information about the resources
-
-To do this, we need to run::
-
- pyside2-rcc icons.rc -o rc_icons.py
-
-The `-o` option lets you specify the output filename,
-which is `rc_icons.py` in this case.
-
-To use the generated file, add the following import at the top of your main Python file::
-
- import rc_icons
-
-
-Changes in the code
-===================
-
-As you are modifying an existing example, you need to modify the following
-lines:
-
-.. code-block:: python
-
- from PySide2.QtGui import QIcon, QKeySequence
- playIcon = self.style().standardIcon(QStyle.SP_MediaPlay)
- previousIcon = self.style().standardIcon(QStyle.SP_MediaSkipBackward)
- pauseIcon = self.style().standardIcon(QStyle.SP_MediaPause)
- nextIcon = self.style().standardIcon(QStyle.SP_MediaSkipForward)
- stopIcon = self.style().standardIcon(QStyle.SP_MediaStop)
-
-and replace them with the following:
-
-.. code-block:: python
-
- from PySide2.QtGui import QIcon, QKeySequence, QPixmap
- playIcon = QIcon(QPixmap(":/icons/play.png"))
- previousIcon = QIcon(QPixmap(":/icons/previous.png"))
- pauseIcon = QIcon(QPixmap(":/icons/pause.png"))
- nextIcon = QIcon(QPixmap(":/icons/forward.png"))
- stopIcon = QIcon(QPixmap(":/icons/stop.png"))
-
-This ensures that the new icons are used instead of the default ones provided
-by the application theme.
-Notice that the lines are not consecutive, but are in different parts
-of the file.
-
-After all your imports, add the following
-
-.. code-block:: python
-
- import rc_icons
-
-Now, the constructor of your class should look like this:
-
-.. code-block:: python
-
- def __init__(self):
- super(MainWindow, self).__init__()
-
- self.playlist = QMediaPlaylist()
- self.player = QMediaPlayer()
-
- toolBar = QToolBar()
- self.addToolBar(toolBar)
-
- fileMenu = self.menuBar().addMenu("&File")
- openAction = QAction(QIcon.fromTheme("document-open"),
- "&Open...", self, shortcut=QKeySequence.Open,
- triggered=self.open)
- fileMenu.addAction(openAction)
- exitAction = QAction(QIcon.fromTheme("application-exit"), "E&xit",
- self, shortcut="Ctrl+Q", triggered=self.close)
- fileMenu.addAction(exitAction)
-
- playMenu = self.menuBar().addMenu("&Play")
- playIcon = QIcon(QPixmap(":/icons/play.png"))
- self.playAction = toolBar.addAction(playIcon, "Play")
- self.playAction.triggered.connect(self.player.play)
- playMenu.addAction(self.playAction)
-
- previousIcon = QIcon(QPixmap(":/icons/previous.png"))
- self.previousAction = toolBar.addAction(previousIcon, "Previous")
- self.previousAction.triggered.connect(self.previousClicked)
- playMenu.addAction(self.previousAction)
-
- pauseIcon = QIcon(QPixmap(":/icons/pause.png"))
- self.pauseAction = toolBar.addAction(pauseIcon, "Pause")
- self.pauseAction.triggered.connect(self.player.pause)
- playMenu.addAction(self.pauseAction)
-
- nextIcon = QIcon(QPixmap(":/icons/forward.png"))
- self.nextAction = toolBar.addAction(nextIcon, "Next")
- self.nextAction.triggered.connect(self.playlist.next)
- playMenu.addAction(self.nextAction)
-
- stopIcon = QIcon(QPixmap(":/icons/stop.png"))
- self.stopAction = toolBar.addAction(stopIcon, "Stop")
- self.stopAction.triggered.connect(self.player.stop)
- playMenu.addAction(self.stopAction)
-
- # many lines were omitted
-
-Executing the example
-=====================
-
-Run the application by calling `python main.py` to checkout the new icon-set:
-
-.. image:: player-new.png
- :alt: New Multimedia Player Qt Example
-
-.. _`Qt Resource System`: https://doc.qt.io/qt-5/resources.html
diff --git a/sources/pyside2/doc/tutorials/basictutorial/uifiles.rst b/sources/pyside2/doc/tutorials/basictutorial/uifiles.rst
deleted file mode 100644
index 982384629..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/uifiles.rst
+++ /dev/null
@@ -1,187 +0,0 @@
-Using `.ui` files from Designer or QtCreator with `QUiLoader` and `pyside2-uic`
-*******************************************************************************
-
-This page describes the use of Qt Creator to create graphical
-interfaces for your Qt for Python project.
-You will need **Qt Creator** to design and modify your interface (UI file).
-
-If you don't know how to use Qt Creator, refer to the
-`Using Qt Designer <http://doc.qt.io/qtcreator/creator-using-qt-designer.html>`_
-documentation page.
-
-At Qt Creator, create a new Qt Design Form, choose "Main Window" for template.
-And save as `mainwindow.ui`.
-Add a `QPushButton` to the center of the centralwidget.
-
-Your file ``mainwindow.ui`` should look something like this:
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>MainWindow</string>
- </property>
- <widget class="QWidget" name="centralWidget">
- <widget class="QPushButton" name="pushButton">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>80</y>
- <width>201</width>
- <height>81</height>
- </rect>
- </property>
- <property name="text">
- <string>PushButton</string>
- </property>
- </widget>
- </widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
- <widget class="QToolBar" name="mainToolBar">
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QStatusBar" name="statusBar"/>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
- </ui>
-
-Now we are ready to decide how to use the **UI file** from Python.
-
-Option A: Generating a Python class
-===================================
-
-Another option to interact with a **UI file** is to generate a Python
-class from it. This is possible thanks to the `pyside2-uic` tool.
-To use this tool, you need to run the following command on a console::
-
- pyside2-uic mainwindow.ui > ui_mainwindow.py
-
-We redirect all the output of the command to a file called `ui_mainwindow.py`,
-which will be imported directly::
-
- from ui_mainwindow import Ui_MainWindow
-
-Now to use it, we should create a personalized class for our widget
-to **setup** this generated design.
-
-To understand the idea, let's take a look at the whole code:
-
-.. code-block:: python
-
- import sys
- from PySide2.QtWidgets import QApplication, QMainWindow
- from PySide2.QtCore import QFile
- from ui_mainwindow import Ui_MainWindow
-
- class MainWindow(QMainWindow):
- def __init__(self):
- super(MainWindow, self).__init__()
- self.ui = Ui_MainWindow()
- self.ui.setupUi(self)
-
- if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- window = MainWindow()
- window.show()
-
- sys.exit(app.exec_())
-
-What is inside the *if* statement is already known from the previous
-examples, and our new basic class contains only two new lines
-that are in charge of loading the generated python class from the UI
-file:
-
-.. code-block:: python
-
- self.ui = Ui_MainWindow()
- self.ui.setupUi(self)
-
-.. note::
-
- You must run `pyside2-uic` again every time you make changes
- to the **UI file**.
-
-Option B: Loading it directly
-=============================
-
-To load the UI file directly, we will need a class from the **QtUiTools**
-module:
-
-.. code-block:: python
-
- from PySide2.QtUiTools import QUiLoader
-
-The `QUiLoader` lets us load the **ui file** dynamically
-and use it right away:
-
-.. code-block:: python
-
- ui_file = QFile("mainwindow.ui")
- ui_file.open(QFile.ReadOnly)
-
- loader = QUiLoader()
- window = loader.load(ui_file)
- window.show()
-
-The complete code of this example looks like this:
-
-.. code-block:: python
-
- # File: main.py
- import sys
- from PySide2.QtUiTools import QUiLoader
- from PySide2.QtWidgets import QApplication
- from PySide2.QtCore import QFile, QIODevice
-
- if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- ui_file_name = "mainwindow.ui"
- ui_file = QFile(ui_file_name)
- if not ui_file.open(QIODevice.ReadOnly):
- print("Cannot open {}: {}".format(ui_file_name, ui_file.errorString()))
- sys.exit(-1)
- loader = QUiLoader()
- window = loader.load(ui_file)
- ui_file.close()
- if not window:
- print(loader.errorString())
- sys.exit(-1)
- window.show()
-
- sys.exit(app.exec_())
-
-Then to execute it we just need to run the following on a
-command prompt:
-
-.. code-block:: python
-
- python main.py
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgets.rst b/sources/pyside2/doc/tutorials/basictutorial/widgets.rst
deleted file mode 100644
index 41e474227..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/widgets.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-Your First QtWidgets Application
-*********************************
-
-As with any other programming framework,
-you start with the traditional "Hello World" program.
-
-Here is a simple example of a Hello World application in PySide2:
-
-.. code-block:: python
-
- import sys
- from PySide2.QtWidgets import QApplication, QLabel
-
- app = QApplication(sys.argv)
- label = QLabel("Hello World!")
- label.show()
- app.exec_()
-
-
-For a widget application using PySide2, you must always start by
-importing the appropriate class from the `PySide2.QtWidgets` module.
-
-After the imports, you create a `QApplication` instance. As Qt can
-receive arguments from command line, you may pass any argument to
-the QApplication object. Usually, you don't need to pass any
-arguments so you can leave it as is, or use the following approach:
-
-.. code-block:: python
-
- app = QApplication([])
-
-After the creation of the application object, we have created a
-`QLabel` object. A `QLabel` is a widget that can present text
-(simple or rich, like html), and images:
-
-.. code-block:: python
-
- # This HTML approach will be valid too!
- label = QLabel("<font color=red size=40>Hello World!</font>")
-
-.. note:: After creating the label, we call `show()` on it.
-
-Finally, we call `app.exec_()` to enter the Qt main loop and start
-to execute the Qt code. In reality, it is only here where the label
-is shown, but this can be ignored for now.
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.py b/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.py
deleted file mode 100644
index 41af464c8..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel, QListWidget,
- QListWidgetItem, QPushButton, QVBoxLayout,
- QWidget)
-
-_placeholder = """
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
-tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
-veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
-commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
-velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
-occaecat cupidatat non proident, sunt in culpa qui officia deserunt
-mollit anim id est laborum
-"""
-
-
-class Widget(QWidget):
- def __init__(self, parent=None):
- super(Widget, self).__init__(parent)
-
- menu_widget = QListWidget()
- for i in range(10):
- item = QListWidgetItem("Item {}".format(i))
- item.setTextAlignment(Qt.AlignCenter)
- menu_widget.addItem(item)
-
- text_widget = QLabel(_placeholder)
- button = QPushButton("Something")
-
- content_layout = QVBoxLayout()
- content_layout.addWidget(text_widget)
- content_layout.addWidget(button)
- main_widget = QWidget()
- main_widget.setLayout(content_layout)
-
- layout = QHBoxLayout()
- layout.addWidget(menu_widget, 1)
- layout.addWidget(main_widget, 4)
- self.setLayout(layout)
-
-
-if __name__ == "__main__":
- app = QApplication()
-
- w = Widget()
- w.show()
-
- _style = None
- with open("style.qss", "r") as f:
- _style = f.read()
- app.setStyleSheet(_style)
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.rst b/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.rst
deleted file mode 100644
index a79f9c898..000000000
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling.rst
+++ /dev/null
@@ -1,169 +0,0 @@
-Widget Styling
-**************
-
-Qt Widgets application use a default theme depending on the platform.
-In some cases, there are system-wide configurations that modify the Qt theme,
-and applications are displayed differently.
-
-However, you can take care of your own widgets and provide a custom style
-to each component. As an example, look at the following simple snippet:
-
-.. code-block:: python
-
- import sys
- from PySide2.QtCore import Qt
- from PySide2.QtWidgets import QApplication, QLabel
-
- if __name__ == "__main__":
- app = QApplication()
- w = QLabel("This is a placeholder text")
- w.setAlignment(Qt.AlignCenter)
- w.show()
- sys.exit(app.exec_())
-
-When you execute this code, you will see a simple `QLabel` aligned at the
-center, and with a placeholder text.
-
-.. image:: widgetstyling-simple-no.png
- :alt: Simple Widget with no style
-
-You can style your application using the CSS-like syntax.
-For more information, see `Qt Style Sheets Reference`_.
-
-A `QLabel` can be styled differently by setting some of its CSS
-properties, such as `background-color` and `font-family`,
-so let's see how does the code look like with these changes:
-
-.. code-block:: python
-
- import sys
- from PySide2.QtCore import Qt
- from PySide2.QtWidgets import QApplication, QLabel
-
- if __name__ == "__main__":
- app = QApplication()
- w = QLabel("This is a placeholder text")
- w.setAlignment(Qt.AlignCenter)
- w.setStyleSheet("""
- background-color: #262626;
- color: #FFFFFF;
- font-family: Titillium;
- font-size: 18px;
- """)
- w.show()
- sys.exit(app.exec_())
-
-Now when you run the code, notice that the `QLabel` looks different with your
-custom style:
-
-.. image:: widgetstyling-simple-yes.png
- :alt: Simple Widget with Style
-
-
-.. note::
-
- If you don't have the font `Titillium` installed, you can try with any
- other you prefer.
- Remember you can list your installed fonts using `QFontDatabase`,
- specifically the `families()` method.
-
-
-Styling each UI element separately like you did in the previous snippet is a
-lot of work. The easier alternative for this is to use Qt Style Sheets,
-which is one or more `.qss` files defining the style for the UI elements in
-your application.
-
-More examples can be found in the `Qt Style Sheet Examples`_ documentation
-page.
-
-
-.. _`Qt Style Sheets Reference`: https://doc.qt.io/qt-5/stylesheet-reference.html
-.. _`Qt Style Sheet Examples`: https://doc.qt.io/qt-5/stylesheet-examples.html
-
-Qt Style Sheets
-===============
-
-.. warning::
-
- Before starting modifying your application, keep in mind that you will be
- responsible for all the graphical details of the application.
- Altering margins, and sizes might end up looking strange or incorrect, so you
- need to be careful when altering the style.
- It's recommended to create a full new Qt style to cover all the possible
- corner cases.
-
-A `qss` file is quite similar to a CSS file, but you need to specify the Widget
-component and optionally the name of the object::
-
- QLabel {
- background-color: red;
- }
-
- QLabel#title {
- font-size: 20px;
- }
-
-The first style defines a `background-color` for all `QLabel` objects in your
-application, whereas the later one styles the `title` object only.
-
-.. note::
-
- You can set object names with the `setObjectName(str)` function to any Qt
- object, for example: for a `label = QLabel("Test")`, you can write
- `label.setObjectName("title")`
-
-
-Once you have a `qss` file for your application, you can apply it by reading
-the file and using the `QApplication.setStyleSheet(str)` function:
-
-.. code-block:: python
-
- if __name__ == "__main__":
- app = QApplication()
-
- w = Widget()
- w.show()
-
- with open("style.qss", "r") as f:
- _style = f.read()
- app.setStyleSheet(_style)
-
- sys.exit(app.exec_())
-
-Having a general `qss` file allows you to decouple the styling aspects of
-the code, without mixing it in the middle of the general functionality, and you
-can simply enable it or disable it.
-
-Look at this new example, with more widgets components:
-
-.. literalinclude:: widgetstyling.py
- :linenos:
- :lines: 59-81
-
-This displays a two column widget, with a `QListWidget` on the left and a
-`QLabel` and a `QPushButton` on the right. It looks like this when you run the
-code:
-
-.. image:: widgetstyling-no.png
- :alt: Widget with no style
-
-If you add content to the previously described `style.qss` file, you can modify
-the look-n-feel of the previous example:
-
-.. literalinclude:: style.qss
- :linenos:
-
-The style changes mainly the color of the different widgets, alter the
-alignment, and includes some spacing.
-You can also use state-based styling on the QListWidget *items* for example, to
-style them differently depending on whether they are *selected* or not.
-
-After applying all the styling alternatives you explored in this topic, notice
-that the `QLabel` example looks a lot different now.
-Try running the code to check its new look:
-
-.. image:: widgetstyling-yes.png
- :alt: Widget with style
-
-You have the freedom to tune your style sheets and provide a really nice
-look-n-feel to all your applications.
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize2/main.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize2/main.py
deleted file mode 100644
index 33bd34723..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize2/main.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import argparse
-import pandas as pd
-
-from PySide2.QtCore import QDateTime, QTimeZone
-
-
-def transform_date(utc, timezone=None):
- utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
- new_date = QDateTime().fromString(utc, utc_fmt)
- if timezone:
- new_date.setTimeZone(timezone)
- return new_date
-
-
-def read_data(fname):
- # Read the CSV content
- df = pd.read_csv(fname)
-
- # Remove wrong magnitudes
- df = df.drop(df[df.mag < 0].index)
- magnitudes = df["mag"]
-
- # My local timezone
- timezone = QTimeZone(b"Europe/Berlin")
-
- # Get timestamp transformed to our timezone
- times = df["time"].apply(lambda x: transform_date(x, timezone))
-
- return times, magnitudes
-
-
-if __name__ == "__main__":
- options = argparse.ArgumentParser()
- options.add_argument("-f", "--file", type=str, required=True)
- args = options.parse_args()
- data = read_data(args.file)
- print(data)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main.py
deleted file mode 100644
index dd07a689f..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import argparse
-import pandas as pd
-
-from PySide2.QtCore import QDateTime, QTimeZone
-from PySide2.QtWidgets import QApplication
-from main_window import MainWindow
-
-
-def transform_date(utc, timezone=None):
- utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
- new_date = QDateTime().fromString(utc, utc_fmt)
- if timezone:
- new_date.setTimeZone(timezone)
- return new_date
-
-
-def read_data(fname):
- # Read the CSV content
- df = pd.read_csv(fname)
-
- # Remove wrong magnitudes
- df = df.drop(df[df.mag < 0].index)
- magnitudes = df["mag"]
-
- # My local timezone
- timezone = QTimeZone(b"Europe/Berlin")
-
- # Get timestamp transformed to our timezone
- times = df["time"].apply(lambda x: transform_date(x, timezone))
-
- return times, magnitudes
-
-
-if __name__ == "__main__":
- options = argparse.ArgumentParser()
- options.add_argument("-f", "--file", type=str, required=True)
- args = options.parse_args()
- data = read_data(args.file)
-
- # Qt Application
- app = QApplication(sys.argv)
-
- window = MainWindow()
- window.show()
-
- sys.exit(app.exec_())
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
deleted file mode 100644
index d97db65aa..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self):
- QMainWindow.__init__(self)
- self.setWindowTitle("Eartquakes information")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut(QKeySequence.Quit)
- exit_action.triggered.connect(self.close)
-
- self.file_menu.addAction(exit_action)
-
- # Status Bar
- self.status = self.statusBar()
- self.status.showMessage("Data loaded and plotted")
-
- # Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
- self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main.py
deleted file mode 100644
index 43c5cd521..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import argparse
-import pandas as pd
-
-from PySide2.QtCore import QDateTime, QTimeZone
-from PySide2.QtWidgets import QApplication
-from main_window import MainWindow
-from main_widget import Widget
-
-
-def transform_date(utc, timezone=None):
- utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
- new_date = QDateTime().fromString(utc, utc_fmt)
- if timezone:
- new_date.setTimeZone(timezone)
- return new_date
-
-
-def read_data(fname):
- # Read the CSV content
- df = pd.read_csv(fname)
-
- # Remove wrong magnitudes
- df = df.drop(df[df.mag < 0].index)
- magnitudes = df["mag"]
-
- # My local timezone
- timezone = QTimeZone(b"Europe/Berlin")
-
- # Get timestamp transformed to our timezone
- times = df["time"].apply(lambda x: transform_date(x, timezone))
-
- return times, magnitudes
-
-
-if __name__ == "__main__":
- options = argparse.ArgumentParser()
- options.add_argument("-f", "--file", type=str, required=True)
- args = options.parse_args()
- data = read_data(args.file)
-
- # Qt Application
- app = QApplication(sys.argv)
-
- widget = Widget(data)
- window = MainWindow(widget)
- window.show()
-
- sys.exit(app.exec_())
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_widget.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_widget.py
deleted file mode 100644
index 0c780241a..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_widget.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtWidgets import (QHBoxLayout, QHeaderView, QSizePolicy,
- QTableView, QWidget)
-
-from table_model import CustomTableModel
-
-
-class Widget(QWidget):
- def __init__(self, data):
- QWidget.__init__(self)
-
- # Getting the Model
- self.model = CustomTableModel(data)
-
- # Creating a QTableView
- self.table_view = QTableView()
- self.table_view.setModel(self.model)
-
- # QTableView Headers
- self.horizontal_header = self.table_view.horizontalHeader()
- self.vertical_header = self.table_view.verticalHeader()
- self.horizontal_header.setSectionResizeMode(
- QHeaderView.ResizeToContents
- )
- self.vertical_header.setSectionResizeMode(
- QHeaderView.ResizeToContents
- )
- self.horizontal_header.setStretchLastSection(True)
-
- # QWidget Layout
- self.main_layout = QHBoxLayout()
- size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
-
- ## Left layout
- size.setHorizontalStretch(1)
- self.table_view.setSizePolicy(size)
- self.main_layout.addWidget(self.table_view)
-
- # Set the layout to the QWidget
- self.setLayout(self.main_layout)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
deleted file mode 100644
index db9517f42..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Eartquakes information")
- self.setCentralWidget(widget)
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- ## Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut(QKeySequence.Quit)
- exit_action.triggered.connect(self.close)
-
- self.file_menu.addAction(exit_action)
-
- # Status Bar
- self.status = self.statusBar()
- self.status.showMessage("Data loaded and plotted")
-
- # Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
- self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/table_model.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/table_model.py
deleted file mode 100644
index d2eafb244..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/table_model.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Qt, QAbstractTableModel, QModelIndex
-from PySide2.QtGui import QColor
-
-
-class CustomTableModel(QAbstractTableModel):
- def __init__(self, data=None):
- QAbstractTableModel.__init__(self)
- self.load_data(data)
-
- def load_data(self, data):
- self.input_dates = data[0].values
- self.input_magnitudes = data[1].values
-
- self.column_count = 2
- self.row_count = len(self.input_magnitudes)
-
- def rowCount(self, parent=QModelIndex()):
- return self.row_count
-
- def columnCount(self, parent=QModelIndex()):
- return self.column_count
-
- def headerData(self, section, orientation, role):
- if role != Qt.DisplayRole:
- return None
- if orientation == Qt.Horizontal:
- return ("Date", "Magnitude")[section]
- else:
- return "{}".format(section)
-
- def data(self, index, role=Qt.DisplayRole):
- column = index.column()
- row = index.row()
-
- if role == Qt.DisplayRole:
- if column == 0:
- raw_date = self.input_dates[row]
- date = "{}".format(raw_date.toPython())
- return date[:-3]
- elif column == 1:
- return "{:.2f}".format(self.input_magnitudes[row])
- elif role == Qt.BackgroundRole:
- return QColor(Qt.white)
- elif role == Qt.TextAlignmentRole:
- return Qt.AlignRight
-
- return None
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main.py
deleted file mode 100644
index 43c5cd521..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import argparse
-import pandas as pd
-
-from PySide2.QtCore import QDateTime, QTimeZone
-from PySide2.QtWidgets import QApplication
-from main_window import MainWindow
-from main_widget import Widget
-
-
-def transform_date(utc, timezone=None):
- utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
- new_date = QDateTime().fromString(utc, utc_fmt)
- if timezone:
- new_date.setTimeZone(timezone)
- return new_date
-
-
-def read_data(fname):
- # Read the CSV content
- df = pd.read_csv(fname)
-
- # Remove wrong magnitudes
- df = df.drop(df[df.mag < 0].index)
- magnitudes = df["mag"]
-
- # My local timezone
- timezone = QTimeZone(b"Europe/Berlin")
-
- # Get timestamp transformed to our timezone
- times = df["time"].apply(lambda x: transform_date(x, timezone))
-
- return times, magnitudes
-
-
-if __name__ == "__main__":
- options = argparse.ArgumentParser()
- options.add_argument("-f", "--file", type=str, required=True)
- args = options.parse_args()
- data = read_data(args.file)
-
- # Qt Application
- app = QApplication(sys.argv)
-
- widget = Widget(data)
- window = MainWindow(widget)
- window.show()
-
- sys.exit(app.exec_())
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_widget.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_widget.py
deleted file mode 100644
index 08406d341..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_widget.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import QDateTime, Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
- QSizePolicy)
-from PySide2.QtCharts import QtCharts
-
-from table_model import CustomTableModel
-
-
-class Widget(QWidget):
- def __init__(self, data):
- QWidget.__init__(self)
-
- # Getting the Model
- self.model = CustomTableModel(data)
-
- # Creating a QTableView
- self.table_view = QTableView()
- self.table_view.setModel(self.model)
-
- # QTableView Headers
- self.horizontal_header = self.table_view.horizontalHeader()
- self.vertical_header = self.table_view.verticalHeader()
- self.horizontal_header.setSectionResizeMode(QHeaderView.ResizeToContents)
- self.vertical_header.setSectionResizeMode(QHeaderView.ResizeToContents)
- self.horizontal_header.setStretchLastSection(True)
-
- # Creating QChart
- self.chart = QtCharts.QChart()
- self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
-
- # Creating QChartView
- self.chart_view = QtCharts.QChartView(self.chart)
- self.chart_view.setRenderHint(QPainter.Antialiasing)
-
- # QWidget Layout
- self.main_layout = QHBoxLayout()
- size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
-
- ## Left layout
- size.setHorizontalStretch(1)
- self.table_view.setSizePolicy(size)
- self.main_layout.addWidget(self.table_view)
-
- ## Right Layout
- size.setHorizontalStretch(4)
- self.chart_view.setSizePolicy(size)
- self.main_layout.addWidget(self.chart_view)
-
- # Set the layout to the QWidget
- self.setLayout(self.main_layout)
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
deleted file mode 100644
index e8979ab25..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Eartquakes information")
- self.setCentralWidget(widget)
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut(QKeySequence.Quit)
- exit_action.triggered.connect(self.close)
-
- self.file_menu.addAction(exit_action)
-
- # Status Bar
- self.status = self.statusBar()
- self.status.showMessage("Data loaded and plotted")
-
- # Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
- self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/table_model.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/table_model.py
deleted file mode 100644
index d2eafb244..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/table_model.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Qt, QAbstractTableModel, QModelIndex
-from PySide2.QtGui import QColor
-
-
-class CustomTableModel(QAbstractTableModel):
- def __init__(self, data=None):
- QAbstractTableModel.__init__(self)
- self.load_data(data)
-
- def load_data(self, data):
- self.input_dates = data[0].values
- self.input_magnitudes = data[1].values
-
- self.column_count = 2
- self.row_count = len(self.input_magnitudes)
-
- def rowCount(self, parent=QModelIndex()):
- return self.row_count
-
- def columnCount(self, parent=QModelIndex()):
- return self.column_count
-
- def headerData(self, section, orientation, role):
- if role != Qt.DisplayRole:
- return None
- if orientation == Qt.Horizontal:
- return ("Date", "Magnitude")[section]
- else:
- return "{}".format(section)
-
- def data(self, index, role=Qt.DisplayRole):
- column = index.column()
- row = index.row()
-
- if role == Qt.DisplayRole:
- if column == 0:
- raw_date = self.input_dates[row]
- date = "{}".format(raw_date.toPython())
- return date[:-3]
- elif column == 1:
- return "{:.2f}".format(self.input_magnitudes[row])
- elif role == Qt.BackgroundRole:
- return QColor(Qt.white)
- elif role == Qt.TextAlignmentRole:
- return Qt.AlignRight
-
- return None
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main.py
deleted file mode 100644
index 441d81a32..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import argparse
-import pandas as pd
-
-from PySide2.QtCore import QDateTime, QTimeZone
-from PySide2.QtWidgets import QApplication
-
-from main_window import MainWindow
-from main_widget import Widget
-
-
-def transform_date(utc, timezone=None):
- utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
- new_date = QDateTime().fromString(utc, utc_fmt)
- if timezone:
- new_date.setTimeZone(timezone)
- return new_date
-
-
-def read_data(fname):
- # Read the CSV content
- df = pd.read_csv(fname)
-
- # Remove wrong magnitudes
- df = df.drop(df[df.mag < 0].index)
- magnitudes = df["mag"]
-
- # My local timezone
- timezone = QTimeZone(b"Europe/Berlin")
-
- # Get timestamp transformed to our timezone
- times = df["time"].apply(lambda x: transform_date(x, timezone))
-
- return times, magnitudes
-
-
-if __name__ == "__main__":
- options = argparse.ArgumentParser()
- options.add_argument("-f", "--file", type=str, required=True)
- args = options.parse_args()
- data = read_data(args.file)
-
- # Qt Application
- app = QApplication(sys.argv)
-
- # QWidget
- widget = Widget(data)
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
-
- window.show()
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_widget.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_widget.py
deleted file mode 100644
index 2d2452bf9..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_widget.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import QDateTime, Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
- QSizePolicy)
-from PySide2.QtCharts import QtCharts
-
-from table_model import CustomTableModel
-
-
-class Widget(QWidget):
- def __init__(self, data):
- QWidget.__init__(self)
-
- # Getting the Model
- self.model = CustomTableModel(data)
-
- # Creating a QTableView
- self.table_view = QTableView()
- self.table_view.setModel(self.model)
-
- # QTableView Headers
- resize = QHeaderView.ResizeToContents
- self.horizontal_header = self.table_view.horizontalHeader()
- self.vertical_header = self.table_view.verticalHeader()
- self.horizontal_header.setSectionResizeMode(resize)
- self.vertical_header.setSectionResizeMode(resize)
- self.horizontal_header.setStretchLastSection(True)
-
- # Creating QChart
- self.chart = QtCharts.QChart()
- self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
- self.add_series("Magnitude (Column 1)", [0, 1])
-
- # Creating QChartView
- self.chart_view = QtCharts.QChartView(self.chart)
- self.chart_view.setRenderHint(QPainter.Antialiasing)
-
- # QWidget Layout
- self.main_layout = QHBoxLayout()
- size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
-
- # Left layout
- size.setHorizontalStretch(1)
- self.table_view.setSizePolicy(size)
- self.main_layout.addWidget(self.table_view)
-
- # Right Layout
- size.setHorizontalStretch(4)
- self.chart_view.setSizePolicy(size)
- self.main_layout.addWidget(self.chart_view)
-
- # Set the layout to the QWidget
- self.setLayout(self.main_layout)
-
- def add_series(self, name, columns):
- # Create QLineSeries
- self.series = QtCharts.QLineSeries()
- self.series.setName(name)
-
- # Filling QLineSeries
- for i in range(self.model.rowCount()):
- # Getting the data
- t = self.model.index(i, 0).data()
- date_fmt = "yyyy-MM-dd HH:mm:ss.zzz"
-
- x = QDateTime().fromString(t, date_fmt).toSecsSinceEpoch()
- y = float(self.model.index(i, 1).data())
-
- if x > 0 and y > 0:
- self.series.append(x, y)
-
- self.chart.addSeries(self.series)
-
- # Setting X-axis
- self.axis_x = QtCharts.QDateTimeAxis()
- self.axis_x.setTickCount(10)
- self.axis_x.setFormat("dd.MM (h:mm)")
- self.axis_x.setTitleText("Date")
- self.chart.addAxis(self.axis_x, Qt.AlignBottom)
- self.series.attachAxis(self.axis_x)
- # Setting Y-axis
- self.axis_y = QtCharts.QValueAxis()
- self.axis_y.setTickCount(10)
- self.axis_y.setLabelFormat("%.2f")
- self.axis_y.setTitleText("Magnitude")
- self.chart.addAxis(self.axis_y, Qt.AlignLeft)
- self.series.attachAxis(self.axis_y)
-
- # Getting the color from the QChart to use it on the QTableView
- self.model.color = "{}".format(self.series.pen().color().name())
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
deleted file mode 100644
index ef4e06f41..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Eartquakes information")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut(QKeySequence.Quit)
- exit_action.triggered.connect(self.close)
-
- self.file_menu.addAction(exit_action)
-
- # Status Bar
- self.status = self.statusBar()
- self.status.showMessage("Data loaded and plotted")
-
- # Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
- self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
- self.setCentralWidget(widget)
-
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/table_model.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/table_model.py
deleted file mode 100644
index 99e1cf19b..000000000
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/table_model.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtCore import Qt, QAbstractTableModel, QModelIndex
-from PySide2.QtGui import QColor
-
-
-class CustomTableModel(QAbstractTableModel):
- def __init__(self, data=None):
- QAbstractTableModel.__init__(self)
- self.color = None
- self.load_data(data)
-
- def load_data(self, data):
- self.input_dates = data[0].values
- self.input_magnitudes = data[1].values
-
- self.column_count = 2
- self.row_count = len(self.input_magnitudes)
-
- def rowCount(self, parent=QModelIndex()):
- return self.row_count
-
- def columnCount(self, parent=QModelIndex()):
- return self.column_count
-
- def headerData(self, section, orientation, role):
- if role != Qt.DisplayRole:
- return None
- if orientation == Qt.Horizontal:
- return ("Date", "Magnitude")[section]
- else:
- return "{}".format(section)
-
- def data(self, index, role=Qt.DisplayRole):
- column = index.column()
- row = index.row()
-
- if role == Qt.DisplayRole:
- if column == 0:
- raw_date = self.input_dates[row]
- date = "{}".format(raw_date.toPython())
- return date[:-3]
- elif column == 1:
- return "{:.2f}".format(self.input_magnitudes[row])
- elif role == Qt.BackgroundRole:
- return (QColor(Qt.white), QColor(self.color))[column]
- elif role == Qt.TextAlignmentRole:
- return Qt.AlignRight
-
- return None
diff --git a/sources/pyside2/doc/tutorials/expenses/expenses.rst b/sources/pyside2/doc/tutorials/expenses/expenses.rst
deleted file mode 100644
index 640feb487..000000000
--- a/sources/pyside2/doc/tutorials/expenses/expenses.rst
+++ /dev/null
@@ -1,314 +0,0 @@
-######################
-Expenses Tool Tutorial
-######################
-
-In this tutorial you will learn the following concepts:
- * creating user interfaces programatically,
- * layouts and widgets,
- * overloading Qt classes,
- * connecting signal and slots,
- * interacting with QWidgets,
- * and building your own application.
-
-The requirements:
- * A simple window for the application
- (`QMainWindow <https://doc.qt.io/qtforpython/PySide2/QtWidgets/QMainWindow.html>`_).
- * A table to keep track of the expenses
- (`QTableWidget <https://doc.qt.io/qtforpython/PySide2/QtWidgets/QTableWidget.html>`_).
- * Two input fields to add expense information
- (`QLineEdit <https://doc.qt.io/qtforpython/PySide2/QtWidgets/QLineEdit.html>`_).
- * Buttons to add information to the table, plot data, clear table, and exit the application
- (`QPushButton <https://doc.qt.io/qtforpython/PySide2/QtWidgets/QPushButton.html>`_).
- * A verification step to avoid invalid data entry.
- * A chart to visualize the expense data
- (`QChart <https://doc.qt.io/qtforpython/PySide2/QtCharts/QtCharts.QChart.html>`_) that will
- be embedded in a chart view
- (`QChartView <https://doc.qt.io/qtforpython/PySide2/QtCharts/QtCharts.QChartView.html>`_).
-
-Empty window
-------------
-
-The base structure for a `QApplication` is located inside the `if __name__ == "__main__":`
-code block.
-
-.. code-block:: python
- :linenos:
-
- if __name__ == "__main__":
- app = QApplication([])
- # ...
- sys.exit(app.exec_())
-
-Now, to start the development, create an empty window called `MainWindow`.
-You could do that by defining a class that inherits from `QMainWindow`.
-
-.. literalinclude:: steps/01-expenses.py
- :linenos:
- :lines: 45-59
- :emphasize-lines: 1-4
-
-Now that our class is defined, create an instance of it and call `show()`.
-
-.. literalinclude:: steps/01-expenses.py
- :linenos:
- :lines: 45-59
- :emphasize-lines: 10-12
-
-Menu bar
---------
-
-Using a `QMainWindow` gives some features for free, among them a *menu bar*. To use it, you need
-to call the method `menuBar()` and populate it inside the `MainWindow` class.
-
-.. literalinclude:: steps/02-expenses.py
- :linenos:
- :lines: 46-58
- :emphasize-lines: 6
-
-Notice that the code snippet adds a *File* menu with the *Exit* option only.
-
-First signal/slot connection
-----------------------------
-
-The *Exit* option must be connected to a slot that triggers the application to exit. The main
-idea to achieve this, is the following:
-
-.. code-block:: python
-
- element.signal_name.connect(slot_name)
-
-All the interface's elements could be connected through signals to certain slots,
-in the case of a `QAction`, the signal `triggered` can be used:
-
-.. code-block:: python
-
- exit_action.triggered.connect(slot_name)
-
-.. note:: Now a *slot* needs to be defined to exit the application, which can be done using
- `QApplication.quit()`. If we put all these concepts together you will end up with the
- following code:
-
-.. literalinclude:: steps/03-expenses.py
- :linenos:
- :lines: 56-65
- :emphasize-lines: 4, 8-10
-
-Notice that the decorator `@Slot()` is required for each slot you declare to properly
-register them. Slots are normal functions, but the main difference is that they
-will be invokable from `Signals` of QObjects when connected.
-
-Empty widget and data
----------------------
-
-The `QMainWindow` enables us to set a central widget that will be displayed when showing the window
-(`read more <https://doc.qt.io/qt-5/qmainwindow.html#details>`_).
-This central widget could be another class derived from `QWidget`.
-
-Additionally, you will define example data to visualize later.
-
-.. literalinclude:: steps/04-expenses.py
- :linenos:
- :lines: 46-53
-
-With the `Widget` class in place, modify `MainWindow`'s initialization code
-
-.. literalinclude:: steps/04-expenses.py
- :linenos:
- :lines: 80-84
-
-Window layout
--------------
-
-Now that the main empty window is in place, you need to start adding widgets to achieve the main
-goal of creating an expenses application.
-
-After declaring the example data, you can visualize it on a simple `QTableWidget`. To do so, you
-will add this procedure to the `Widget` constructor.
-
-.. warning:: Only for the example purpose a QTableWidget will be used,
- but for more performance-critical applications the combination
- of a model and a QTableView is encouraged.
-
-.. literalinclude:: steps/05-expenses.py
- :linenos:
- :lines: 48-73
-
-As you can see, the code also includes a `QHBoxLayout` that provides the container to place widgets
-horizontally.
-
-Additionally, the `QTableWidget` allows for customizing it, like adding the labels for the two
-columns that will be used, and to *stretch* the content to use the whole `Widget` space.
-
-The last line of code refers to *filling the table**, and the code to perform that task is
-displayed below.
-
-.. literalinclude:: steps/05-expenses.py
- :linenos:
- :lines: 75-81
-
-Having this process on a separate method is a good practice to leave the constructor more readable,
-and to split the main functions of the class in independent processes.
-
-
-Right side layout
------------------
-
-Because the data that is being used is just an example, you are required to include a mechanism to
-input items to the table, and extra buttons to clear the table's content, and also quit the
-application.
-
-To distribute these input lines and buttons, you will use a `QVBoxLayout` that allows you to place
-elements vertically inside a layout.
-
-.. literalinclude:: steps/06-expenses.py
- :linenos:
- :lines: 64-80
-
-Leaving the table on the left side and these newly included widgets to the right side
-will be just a matter to add a layout to our main `QHBoxLayout` as you saw in the previous
-example:
-
-.. literalinclude:: steps/06-expenses.py
- :linenos:
- :lines: 42-47
-
-The next step will be connecting those new buttons to slots.
-
-
-Adding elements
----------------
-
-Each `QPushButton` have a signal called *clicked*, that is emitted when you click on the button.
-This will be more than enough for this example, but you can see other signals in the `official
-documentation <https://doc.qt.io/qtforpython/PySide2/QtWidgets/QAbstractButton.html#signals>`_.
-
-.. literalinclude:: steps/07-expenses.py
- :linenos:
- :lines: 92-95
-
-As you can see on the previous lines, we are connecting each *clicked* signal to different slots.
-In this example slots are normal class methods in charge of perform a determined task associated
-with our buttons. It is really important to decorate each method declaration with a `@Slot()`, in
-that way PySide2 knows internally how to register them into Qt.
-
-.. literalinclude:: steps/07-expenses.py
- :linenos:
- :lines: 100-129
- :emphasize-lines: 2,16,28
-
-Since these slots are methods, we can access the class variables, like our `QTableWidget` to
-interact with it.
-
-The mechanism to add elements into the table is described as the following:
-
- * get the *description* and *price* from the fields,
- * insert a new empty row to the table,
- * set the values for the empty row in each column,
- * clear the input text fields,
- * include the global count of table rows.
-
-To exit the application you can use the `quit()` method of the unique `QApplication` instance, and
-to clear the content of the table you can just set the table *row count*, and the internal count to
-zero.
-
-Verification step
------------------
-
-Adding information to the table needs to be a critical action that require a verification step
-to avoid adding invalid information, for example, empty information.
-
-You can use a signal from `QLineEdit` called *textChanged[str]* which will be emitted every
-time something inside changes, i.e.: each key stroke.
-Notice that this time, there is a *[str]* section on the signal, this means that the signal
-will also emit the value of the text that was changed, which will be really useful to verify
-the current content of the `QLineEdit`.
-
-You can connect two different object's signal to the same slot, and this will be the case
-for your current application:
-
-.. literalinclude:: steps/08-expenses.py
- :linenos:
- :lines: 99-100
-
-The content of the *check_disable* slot will be really simple:
-
-.. literalinclude:: steps/08-expenses.py
- :linenos:
- :lines: 119-124
-
-You have two options, write a verification based on the current value
-of the string you retrieve, or manually get the whole content of both
-`QLineEdit`. The second is preferred in this case, so you can verify
-if the two inputs are not empty to enable the button *Add*.
-
-.. note:: Qt also provides a special class called
- `QValidator <https://doc.qt.io/qtforpython/PySide2/QtGui/QValidator.html?highlight=qvalidator>`_
- that you can use to validate any input.
-
-Empty chart view
-----------------
-
-New items can be added to the table, and the visualization is so far
-OK, but you can accomplish more by representing the data graphically.
-
-First you will include an empty `QChartView` placeholder into the right
-side of your application.
-
-.. literalinclude:: steps/09-expenses.py
- :linenos:
- :lines: 66-68
-
-Additionally the order of how you include widgets to the right
-`QVBoxLayout` will also change.
-
-.. literalinclude:: steps/09-expenses.py
- :linenos:
- :lines: 81-91
- :emphasize-lines: 9
-
-Notice that before we had a line with `self.right.addStretch()`
-to fill up the vertical space between the *Add* and the *Clear* buttons,
-but now, with the `QChartView` it will not be necessary.
-
-Also, you need include a *Plot* button if you want to do it on-demand.
-
-Full application
-----------------
-
-For the final step, you will need to connect the *Plot* button
-to a slot that creates a chart and includes it into your `QChartView`.
-
-.. literalinclude:: steps/10-expenses.py
- :linenos:
- :lines: 103-109
- :emphasize-lines: 6
-
-That is nothing new, since you already did it for the other buttons,
-but now take a look at how to create a chart and include it into
-your `QChartView`.
-
-.. literalinclude:: steps/10-expenses.py
- :linenos:
- :lines: 139-151
-
-The following steps show how to fill a `QPieSeries`:
-
- * create a `QPieSeries`,
- * iterate over the table row IDs,
- * get the items at the *i* position,
- * add those values to the *series*.
-
-Once the series has been populated with our data, you create a new `QChart`,
-add the series on it, and optionally set an alignment for the legend.
-
-The final line `self.chart_view.setChart(chart)` is in charge of bringing
-your newly created chart to the `QChartView`.
-
-The application will look like this:
-
-.. image:: expenses_tool.png
-
-And now you can see the whole code:
-
-.. literalinclude:: main.py
- :linenos:
diff --git a/sources/pyside2/doc/tutorials/expenses/main.py b/sources/pyside2/doc/tutorials/expenses/main.py
deleted file mode 100644
index 5dd632301..000000000
--- a/sources/pyside2/doc/tutorials/expenses/main.py
+++ /dev/null
@@ -1,207 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QPainter
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-from PySide2.QtCharts import QtCharts
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Chart
- self.chart_view = QtCharts.QChartView()
- self.chart_view.setRenderHint(QPainter.Antialiasing)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
- self.plot = QPushButton("Plot")
-
- # Disabling 'Add' button
- self.add.setEnabled(False)
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addWidget(self.plot)
- self.right.addWidget(self.chart_view)
- self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.plot.clicked.connect(self.plot_data)
- self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text()
- price = self.price.text()
-
- self.table.insertRow(self.items)
- description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem("{:.2f}".format(float(price)))
- price_item.setTextAlignment(Qt.AlignRight)
-
- self.table.setItem(self.items, 0, description_item)
- self.table.setItem(self.items, 1, price_item)
-
- self.description.setText("")
- self.price.setText("")
-
- self.items += 1
-
- @Slot()
- def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def plot_data(self):
- # Get table information
- series = QtCharts.QPieSeries()
- for i in range(self.table.rowCount()):
- text = self.table.item(i, 0).text()
- number = float(self.table.item(i, 1).text())
- series.append(text, number)
-
- chart = QtCharts.QChart()
- chart.addSeries(series)
- chart.legend().setAlignment(Qt.AlignLeft)
- self.chart_view.setChart(chart)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- description_item = QTableWidgetItem(desc)
- price_item = QTableWidgetItem("{:.2f}".format(price))
- price_item.setTextAlignment(Qt.AlignRight)
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, description_item)
- self.table.setItem(self.items, 1, price_item)
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.setRowCount(0)
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py b/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py
deleted file mode 100644
index f4382e711..000000000
--- a/sources/pyside2/doc/tutorials/expenses/main_snake_prop.py
+++ /dev/null
@@ -1,210 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import QMargins, Qt, Slot, QSize
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-from PySide2.QtCharts import QtCharts
-
-from __feature__ import snake_case, true_property
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.column_count = 2
- self.table.horizontal_header_labels = ["Description", "Price"]
- self.table.horizontal_header().section_resize_mode = QHeaderView.Stretch
-
- # Chart
- self.chart_view = QtCharts.QChartView()
- self.chart_view.render_hint = QPainter.Antialiasing
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
- self.plot = QPushButton("Plot")
-
- # Disabling 'Add' button
- self.add.enabled = False
-
- self.right = QVBoxLayout()
-
- self.right.contents_margins = QMargins(10, 10, 10, 10)
- self.right.add_widget(QLabel("Description"))
- self.right.add_widget(self.description)
- self.right.add_widget(QLabel("Price"))
- self.right.add_widget(self.price)
- self.right.add_widget(self.add)
- self.right.add_widget(self.plot)
- self.right.add_widget(self.chart_view)
- self.right.add_widget(self.clear)
- self.right.add_widget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.add_widget(self.table)
- self.layout.add_layout(self.right)
-
- # Set the layout to the QWidget
- self.set_layout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.plot.clicked.connect(self.plot_data)
- self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text
- price = self.price.text
-
- self.table.insert_row(self.items)
- description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem("{:.2f}".format(float(price)))
- price_item.text_alignment = Qt.AlignRight
-
- self.table.set_item(self.items, 0, description_item)
- self.table.set_item(self.items, 1, price_item)
-
- self.description.text = ""
- self.price.text = ""
-
- self.items += 1
-
- @Slot()
- def check_disable(self, s):
- if not self.description.text or not self.price.text:
- self.add.enabled = False
- else:
- self.add.enabled = True
-
- @Slot()
- def plot_data(self):
- # Get table information
- series = QtCharts.QPieSeries()
- for i in range(self.table.row_count):
- text = self.table.item(i, 0).text()
- number = float(self.table.item(i, 1).text())
- series.append(text, number)
-
- chart = QtCharts.QChart()
- chart.add_series(series)
- chart.legend().alignment = Qt.AlignLeft
- self.chart_view.set_chart(chart)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- description_item = QTableWidgetItem(desc)
- price_item = QTableWidgetItem("{:.2f}".format(price))
- price_item.text_alignment = Qt.AlignRight
- self.table.insert_row(self.items)
- self.table.set_item(self.items, 0, description_item)
- self.table.set_item(self.items, 1, price_item)
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.row_count = 0
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.window_title = "Tutorial"
-
- # Menu
- self.menu = self.menu_bar()
- self.file_menu = self.menu.add_menu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.shortcut = "Ctrl+Q"
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.add_action(exit_action)
- self.set_central_widget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.size = QSize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/01-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/01-expenses.py
deleted file mode 100644
index 12d5f0b1a..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/01-expenses.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtWidgets import QApplication, QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
-
- window = MainWindow()
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py
deleted file mode 100644
index 9ffb2f9d0..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QApplication, QMainWindow
-
-
-class MainWindow(QMainWindow):
- def __init__(self):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
-
- self.file_menu.addAction(exit_action)
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
-
- window = MainWindow()
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py
deleted file mode 100644
index 1cb2f0035..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QApplication, QMainWindow
-from PySide2.QtCharts import QtCharts
-
-
-class MainWindow(QMainWindow):
- def __init__(self):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
-
- window = MainWindow()
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py
deleted file mode 100644
index 80a5cb16f..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QApplication, QMainWindow, QWidget
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py
deleted file mode 100644
index a72f8d990..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py
+++ /dev/null
@@ -1,118 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QMainWindow,
- QTableWidget, QTableWidgetItem, QWidget)
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Fill example data
- self.fill_table()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(desc))
- self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
- self.items += 1
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py
deleted file mode 100644
index e2c32e5c6..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addStretch()
- self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Fill example data
- self.fill_table()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(desc))
- self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
- self.items += 1
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py
deleted file mode 100644
index acc7edc7c..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py
+++ /dev/null
@@ -1,165 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addStretch()
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.clear.clicked.connect(self.clear_table)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text()
- price = self.price.text()
-
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(des))
- self.table.setItem(self.items, 1, QTableWidgetItem(price))
-
- self.description.setText("")
- self.price.setText("")
-
- self.items += 1
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(desc))
- self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.setRowCount(0)
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py
deleted file mode 100644
index a6003cb35..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py
+++ /dev/null
@@ -1,178 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
-
- # Disabling 'Add' button
- self.add.setEnabled(False)
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addStretch()
- self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text()
- price = self.price.text()
-
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(des))
- self.table.setItem(self.items, 1, QTableWidgetItem(price))
-
- self.description.setText("")
- self.price.setText("")
-
- self.items += 1
-
- @Slot()
- def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(desc))
- self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.setRowCount(0)
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py
deleted file mode 100644
index 3f1aed2c9..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py
+++ /dev/null
@@ -1,185 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Slot
-from PySide2.QtGui import QAction, QPainter
-from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-from PySide2.QtCharts import QtCharts
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Chart
- self.chart_view = QtCharts.QChartView()
- self.chart_view.setRenderHint(QPainter.Antialiasing)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
- self.plot = QPushButton("Plot")
-
- # Disabling 'Add' button
- self.add.setEnabled(False)
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addWidget(self.plot)
- self.right.addWidget(self.chart_view)
- self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text()
- price = self.price.text()
-
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(des))
- self.table.setItem(self.items, 1, QTableWidgetItem(price))
-
- self.description.setText("")
- self.price.setText("")
-
- self.items += 1
-
- @Slot()
- def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, QTableWidgetItem(desc))
- self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.setRowCount(0)
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py
deleted file mode 100644
index 2a7bddab0..000000000
--- a/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py
+++ /dev/null
@@ -1,207 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QPainter
-from PySide2.QtWidgets import (QQApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
-from PySide2.QtCharts import QtCharts
-
-
-class Widget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.items = 0
-
- # Example data
- self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
- "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
- "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
-
- # Left
- self.table = QTableWidget()
- self.table.setColumnCount(2)
- self.table.setHorizontalHeaderLabels(["Description", "Price"])
- self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
-
- # Chart
- self.chart_view = QtCharts.QChartView()
- self.chart_view.setRenderHint(QPainter.Antialiasing)
-
- # Right
- self.description = QLineEdit()
- self.price = QLineEdit()
- self.add = QPushButton("Add")
- self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
- self.plot = QPushButton("Plot")
-
- # Disabling 'Add' button
- self.add.setEnabled(False)
-
- self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
- self.right.addWidget(self.add)
- self.right.addWidget(self.plot)
- self.right.addWidget(self.chart_view)
- self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
-
- # QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
- self.layout.addWidget(self.table)
- self.layout.addLayout(self.right)
-
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
- # Signals and Slots
- self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
- self.plot.clicked.connect(self.plot_data)
- self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
-
- # Fill example data
- self.fill_table()
-
- @Slot()
- def add_element(self):
- des = self.description.text()
- price = self.price.text()
-
- self.table.insertRow(self.items)
- description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem("{:.2f}".format(float(price)))
- price_item.setTextAlignment(Qt.AlignRight)
-
- self.table.setItem(self.items, 0, description_item)
- self.table.setItem(self.items, 1, price_item)
-
- self.description.setText("")
- self.price.setText("")
-
- self.items += 1
-
- @Slot()
- def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def plot_data(self):
- # Get table information
- series = QtCharts.QPieSeries()
- for i in range(self.table.rowCount()):
- text = self.table.item(i, 0).text()
- number = float(self.table.item(i, 1).text())
- series.append(text, number)
-
- chart = QtCharts.QChart()
- chart.addSeries(series)
- chart.legend().setAlignment(Qt.AlignLeft)
- self.chart_view.setChart(chart)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
- def fill_table(self, data=None):
- data = self._data if not data else data
- for desc, price in data.items():
- description_item = QTableWidgetItem(desc)
- price_item = QTableWidgetItem("{:.2f}".format(price))
- price_item.setTextAlignment(Qt.AlignRight)
- self.table.insertRow(self.items)
- self.table.setItem(self.items, 0, description_item)
- self.table.setItem(self.items, 1, price_item)
- self.items += 1
-
- @Slot()
- def clear_table(self):
- self.table.setRowCount(0)
- self.items = 0
-
-
-class MainWindow(QMainWindow):
- def __init__(self, widget):
- QMainWindow.__init__(self)
- self.setWindowTitle("Tutorial")
-
- # Menu
- self.menu = self.menuBar()
- self.file_menu = self.menu.addMenu("File")
-
- # Exit QAction
- exit_action = QAction("Exit", self)
- exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
- self.setCentralWidget(widget)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
-
-if __name__ == "__main__":
- # Qt Application
- app = QApplication(sys.argv)
- # QWidget
- widget = Widget()
- # QMainWindow using QWidget as central widget
- window = MainWindow(widget)
- window.resize(800, 600)
- window.show()
-
- # Execute application
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter1/createdb.py b/sources/pyside2/doc/tutorials/portingguide/chapter1/createdb.py
deleted file mode 100644
index 8fb20cda1..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter1/createdb.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtSql import QSqlDatabase, QSqlError, QSqlQuery
-from datetime import date
-
-
-def add_book(q, title, year, authorId, genreId, rating):
- q.addBindValue(title)
- q.addBindValue(year)
- q.addBindValue(authorId)
- q.addBindValue(genreId)
- q.addBindValue(rating)
- q.exec_()
-
-
-def add_genre(q, name):
- q.addBindValue(name)
- q.exec_()
- return q.lastInsertId()
-
-
-def add_author(q, name, birthdate):
- q.addBindValue(name)
- q.addBindValue(str(birthdate))
- q.exec_()
- return q.lastInsertId()
-
-BOOKS_SQL = """
- create table books(id integer primary key, title varchar, author integer,
- genre integer, year integer, rating integer)
- """
-AUTHORS_SQL = """
- create table authors(id integer primary key, name varchar, birthdate text)
- """
-GENRES_SQL = """
- create table genres(id integer primary key, name varchar)
- """
-INSERT_AUTHOR_SQL = """
- insert into authors(name, birthdate) values(?, ?)
- """
-INSERT_GENRE_SQL = """
- insert into genres(name) values(?)
- """
-INSERT_BOOK_SQL = """
- insert into books(title, year, author, genre, rating)
- values(?, ?, ?, ?, ?)
- """
-
-def init_db():
- """
- init_db()
- Initializes the database.
- If tables "books" and "authors" are already in the database, do nothing.
- Return value: None or raises ValueError
- The error value is the QtSql error instance.
- """
- def check(func, *args):
- if not func(*args):
- raise ValueError(func.__self__.lastError())
- db = QSqlDatabase.addDatabase("QSQLITE")
- db.setDatabaseName(":memory:")
-
- check(db.open)
-
- q = QSqlQuery()
- check(q.exec_, BOOKS_SQL)
- check(q.exec_, AUTHORS_SQL)
- check(q.exec_, GENRES_SQL)
- check(q.prepare, INSERT_AUTHOR_SQL)
-
- asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
- greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
- pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
-
- check(q.prepare,INSERT_GENRE_SQL)
- sfiction = add_genre(q, "Science Fiction")
- fiction = add_genre(q, "Fiction")
- fantasy = add_genre(q, "Fantasy")
-
- check(q.prepare,INSERT_BOOK_SQL)
- add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
- add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
- add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
- add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
- add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
- add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
- add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
- add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
- add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
- add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
- add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
- add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
- add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter1/main.py b/sources/pyside2/doc/tutorials/portingguide/chapter1/main.py
deleted file mode 100644
index 7e94e4c14..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter1/main.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-
-from PySide2.QtSql import QSqlQueryModel
-from PySide2.QtWidgets import QTableView, QApplication
-
-import createdb
-
-if __name__ == "__main__":
- app = QApplication()
- createdb.init_db()
-
- model = QSqlQueryModel()
- model.setQuery("select * from books")
-
- table_view = QTableView()
- table_view.setModel(model)
- table_view.resize(800, 600)
- table_view.show()
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.py b/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.py
deleted file mode 100644
index 57d8f0f73..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import copy, os
-from PySide2.QtSql import QSqlRelationalDelegate
-from PySide2.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
- QStyle, QStyleOptionViewItem)
-from PySide2.QtGui import QMouseEvent, QPixmap, QPalette, QImage
-from PySide2.QtCore import QEvent, QSize, Qt, QUrl
-
-class BookDelegate(QSqlRelationalDelegate):
- """Books delegate to rate the books"""
-
- def __init__(self, parent=None):
- QSqlRelationalDelegate.__init__(self, parent)
- star_png = os.path.dirname(__file__) + "\images\star.png"
- self.star = QPixmap(star_png)
-
- def paint(self, painter, option, index):
- """ Paint the items in the table.
-
- If the item referred to by <index> is a StarRating, we
- handle the painting ourselves. For the other items, we
- let the base class handle the painting as usual.
-
- In a polished application, we'd use a better check than
- the column number to find out if we needed to paint the
- stars, but it works for the purposes of this example.
- """
- if index.column() != 5:
- # Since we draw the grid ourselves:
- opt = copy.copy(option)
- opt.rect = option.rect.adjusted(0, 0, -1, -1)
- QSqlRelationalDelegate.paint(self, painter, opt, index)
- else:
- model = index.model()
- if option.state & QStyle.State_Enabled:
- if option.state & QStyle.State_Active:
- color_group = QPalette.Normal
- else:
- color_group = QPalette.Inactive
- else:
- color_group = QPalette.Disabled
-
- if option.state & QStyle.State_Selected:
- painter.fillRect(option.rect,
- option.palette.color(color_group, QPalette.Highlight))
- rating = model.data(index, Qt.DisplayRole)
- width = self.star.width()
- height = self.star.height()
- x = option.rect.x()
- y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
- for i in range(rating):
- painter.drawPixmap(x, y, self.star)
- x += width
-
- # Since we draw the grid ourselves:
- self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
-
- pen = painter.pen()
- painter.setPen(option.palette.color(QPalette.Mid))
- painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
- painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
- painter.setPen(pen)
-
- def sizeHint(self, option, index):
- """ Returns the size needed to display the item in a QSize object. """
- if index.column() == 5:
- size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
- return size_hint
- # Since we draw the grid ourselves:
- return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
-
- def editorEvent(self, event, model, option, index):
- if index.column() != 5:
- return False
-
- if event.type() == QEvent.MouseButtonPress:
- mouse_pos = event.pos()
- new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
- stars = max(0, min(new_stars, 5))
- model.setData(index, stars)
- # So that the selection can change
- return False
-
- return True
-
- def createEditor(self, parent, option, index):
- if index.column() != 4:
- return QSqlRelationalDelegate.createEditor(self, parent, option, index)
-
- # For editing the year, return a spinbox with a range from -1000 to 2100.
- spinbox = QSpinBox(parent)
- spinbox.setFrame(False)
- spinbox.setMaximum(2100)
- spinbox.setMinimum(-1000)
- return spinbox
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/createdb.py b/sources/pyside2/doc/tutorials/portingguide/chapter2/createdb.py
deleted file mode 100644
index 8fb20cda1..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/createdb.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtSql import QSqlDatabase, QSqlError, QSqlQuery
-from datetime import date
-
-
-def add_book(q, title, year, authorId, genreId, rating):
- q.addBindValue(title)
- q.addBindValue(year)
- q.addBindValue(authorId)
- q.addBindValue(genreId)
- q.addBindValue(rating)
- q.exec_()
-
-
-def add_genre(q, name):
- q.addBindValue(name)
- q.exec_()
- return q.lastInsertId()
-
-
-def add_author(q, name, birthdate):
- q.addBindValue(name)
- q.addBindValue(str(birthdate))
- q.exec_()
- return q.lastInsertId()
-
-BOOKS_SQL = """
- create table books(id integer primary key, title varchar, author integer,
- genre integer, year integer, rating integer)
- """
-AUTHORS_SQL = """
- create table authors(id integer primary key, name varchar, birthdate text)
- """
-GENRES_SQL = """
- create table genres(id integer primary key, name varchar)
- """
-INSERT_AUTHOR_SQL = """
- insert into authors(name, birthdate) values(?, ?)
- """
-INSERT_GENRE_SQL = """
- insert into genres(name) values(?)
- """
-INSERT_BOOK_SQL = """
- insert into books(title, year, author, genre, rating)
- values(?, ?, ?, ?, ?)
- """
-
-def init_db():
- """
- init_db()
- Initializes the database.
- If tables "books" and "authors" are already in the database, do nothing.
- Return value: None or raises ValueError
- The error value is the QtSql error instance.
- """
- def check(func, *args):
- if not func(*args):
- raise ValueError(func.__self__.lastError())
- db = QSqlDatabase.addDatabase("QSQLITE")
- db.setDatabaseName(":memory:")
-
- check(db.open)
-
- q = QSqlQuery()
- check(q.exec_, BOOKS_SQL)
- check(q.exec_, AUTHORS_SQL)
- check(q.exec_, GENRES_SQL)
- check(q.prepare, INSERT_AUTHOR_SQL)
-
- asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
- greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
- pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
-
- check(q.prepare,INSERT_GENRE_SQL)
- sfiction = add_genre(q, "Science Fiction")
- fiction = add_genre(q, "Fiction")
- fantasy = add_genre(q, "Fantasy")
-
- check(q.prepare,INSERT_BOOK_SQL)
- add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
- add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
- add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
- add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
- add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
- add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
- add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
- add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
- add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
- add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
- add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
- add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
- add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/main.py b/sources/pyside2/doc/tutorials/portingguide/chapter2/main.py
deleted file mode 100644
index 639ee2ca0..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/main.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-
-from PySide2.QtCore import Qt
-from PySide2.QtSql import QSqlQueryModel
-from PySide2.QtWidgets import QTableView, QApplication
-
-import createdb
-from bookdelegate import BookDelegate
-
-if __name__ == "__main__":
- app = QApplication()
- createdb.init_db()
-
- model = QSqlQueryModel()
- model.setQuery("select title, author, genre, year, rating from books")
-
- table = QTableView()
- table.setModel(model)
- table.setItemDelegate(BookDelegate())
- table.resize(800, 600)
- table.show()
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate-old.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
deleted file mode 100644
index 2e8670448..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
+++ /dev/null
@@ -1,134 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import copy, os
-from PySide2.QtSql import QSqlRelationalDelegate
-from PySide2.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
- QStyle, QStyleOptionViewItem)
-from PySide2.QtGui import QMouseEvent, QPixmap, QPalette, QImage
-from PySide2.QtCore import QEvent, QSize, Qt, QUrl
-
-class BookDelegate(QSqlRelationalDelegate):
- """Books delegate to rate the books"""
-
- def __init__(self, star_png, parent=None):
- QSqlRelationalDelegate.__init__(self, parent)
- star_png = os.path.dirname(__file__) + "\images\star.png"
- self.star = QPixmap(star_png)
-
- def paint(self, painter, option, index):
- """ Paint the items in the table.
-
- If the item referred to by <index> is a StarRating, we
- handle the painting ourselves. For the other items, we
- let the base class handle the painting as usual.
-
- In a polished application, we'd use a better check than
- the column number to find out if we needed to paint the
- stars, but it works for the purposes of this example.
- """
- if index.column() != 5:
- # Since we draw the grid ourselves:
- opt = copy.copy(option)
- opt.rect = option.rect.adjusted(0, 0, -1, -1)
- QSqlRelationalDelegate.paint(self, painter, opt, index)
- else:
- model = index.model()
- if option.state & QStyle.State_Enabled:
- if option.state & QStyle.State_Active:
- color_group = QPalette.Normal
- else:
- color_group = QPalette.Inactive
- else:
- color_group = QPalette.Disabled
-
- if option.state & QStyle.State_Selected:
- painter.fillRect(option.rect,
- option.palette.color(color_group, QPalette.Highlight))
- rating = model.data(index, Qt.DisplayRole)
- width = self.star.width()
- height = self.star.height()
- x = option.rect.x()
- y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
- for i in range(rating):
- painter.drawPixmap(x, y, self.star)
- x += width
-
- # Since we draw the grid ourselves:
- self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
-
- pen = painter.pen()
- painter.setPen(option.palette.color(QPalette.Mid))
- painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
- painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
- painter.setPen(pen)
-
- def sizeHint(self, option, index):
- """ Returns the size needed to display the item in a QSize object. """
- if index.column() == 5:
- size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
- return size_hint
- # Since we draw the grid ourselves:
- return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
-
- def editorEvent(self, event, model, option, index):
- if index.column() != 5:
- return False
-
- if event.type() == QEvent.MouseButtonPress:
- mouse_pos = event.pos()
- new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
- stars = max(0, min(new_stars, 5))
- model.setData(index, stars)
- # So that the selection can change
- return False
-
- return True
-
- def createEditor(self, parent, option, index):
- if index.column() != 4:
- return QSqlRelationalDelegate.createEditor(self, parent, option, index)
-
- # For editing the year, return a spinbox with a range from -1000 to 2100.
- spinbox = QSpinBox(parent)
- spinbox.setFrame(False)
- spinbox.setMaximum(2100)
- spinbox.setMinimum(-1000)
- return spinbox
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate.py
deleted file mode 100644
index 087b0c262..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookdelegate.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import copy, os
-from PySide2.QtSql import QSqlRelationalDelegate
-from PySide2.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
- QStyle, QStyleOptionViewItem)
-from PySide2.QtGui import QMouseEvent, QPixmap, QPalette, QImage
-from PySide2.QtCore import QEvent, QSize, Qt, QUrl
-
-class BookDelegate(QSqlRelationalDelegate):
- """Books delegate to rate the books"""
-
- def __init__(self, star_png, parent=None):
- QSqlRelationalDelegate.__init__(self, parent)
- self.star = QPixmap(":/images/star.png")
-
- def paint(self, painter, option, index):
- """ Paint the items in the table.
-
- If the item referred to by <index> is a StarRating, we
- handle the painting ourselves. For the other items, we
- let the base class handle the painting as usual.
-
- In a polished application, we'd use a better check than
- the column number to find out if we needed to paint the
- stars, but it works for the purposes of this example.
- """
- if index.column() != 5:
- # Since we draw the grid ourselves:
- opt = copy.copy(option)
- opt.rect = option.rect.adjusted(0, 0, -1, -1)
- QSqlRelationalDelegate.paint(self, painter, opt, index)
- else:
- model = index.model()
- if option.state & QStyle.State_Enabled:
- if option.state & QStyle.State_Active:
- color_group = QPalette.Normal
- else:
- color_group = QPalette.Inactive
- else:
- color_group = QPalette.Disabled
-
- if option.state & QStyle.State_Selected:
- painter.fillRect(option.rect,
- option.palette.color(color_group, QPalette.Highlight))
- rating = model.data(index, Qt.DisplayRole)
- width = self.star.width()
- height = self.star.height()
- x = option.rect.x()
- y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
- for i in range(rating):
- painter.drawPixmap(x, y, self.star)
- x += width
-
- # Since we draw the grid ourselves:
- self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
-
- pen = painter.pen()
- painter.setPen(option.palette.color(QPalette.Mid))
- painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
- painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
- painter.setPen(pen)
-
- def sizeHint(self, option, index):
- """ Returns the size needed to display the item in a QSize object. """
- if index.column() == 5:
- size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
- return size_hint
- # Since we draw the grid ourselves:
- return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
-
- def editorEvent(self, event, model, option, index):
- if index.column() != 5:
- return False
-
- if event.type() == QEvent.MouseButtonPress:
- mouse_pos = event.pos()
- new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
- stars = max(0, min(new_stars, 5))
- model.setData(index, stars)
- # So that the selection can change
- return False
-
- return True
-
- def createEditor(self, parent, option, index):
- if index.column() != 4:
- return QSqlRelationalDelegate.createEditor(self, parent, option, index)
-
- # For editing the year, return a spinbox with a range from -1000 to 2100.
- spinbox = QSpinBox(parent)
- spinbox.setFrame(False)
- spinbox.setMaximum(2100)
- spinbox.setMinimum(-1000)
- return spinbox
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
deleted file mode 100644
index 792bcab51..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
- QHeaderView, QMainWindow, QMessageBox)
-from PySide2.QtGui import QKeySequence
-from PySide2.QtSql import (QSqlRelation, QSqlRelationalTableModel, QSqlTableModel,
- QSqlError)
-from PySide2.QtCore import QAbstractItemModel, QObject, QSize, Qt, Slot
-import createdb
-from ui_bookwindow import Ui_BookWindow
-from bookdelegate import BookDelegate
-
-
-class BookWindow(QMainWindow, Ui_BookWindow):
- # """A window to show the books available"""
-
- def __init__(self):
- QMainWindow.__init__(self)
- self.setupUi(self)
-
- #Initialize db
- createdb.init_db()
-
- model = QSqlRelationalTableModel(self.bookTable)
- model.setEditStrategy(QSqlTableModel.OnManualSubmit)
- model.setTable("books")
-
- # Remember the indexes of the columns:
- author_idx = model.fieldIndex("author")
- genre_idx = model.fieldIndex("genre")
-
- # Set the relations to the other database tables:
- model.setRelation(author_idx, QSqlRelation("authors", "id", "name"))
- model.setRelation(genre_idx, QSqlRelation("genres", "id", "name"))
-
- # Set the localized header captions:
- model.setHeaderData(author_idx, Qt.Horizontal, self.tr("Author Name"))
- model.setHeaderData(genre_idx, Qt.Horizontal, self.tr("Genre"))
- model.setHeaderData(model.fieldIndex("title"), Qt.Horizontal, self.tr("Title"))
- model.setHeaderData(model.fieldIndex("year"), Qt.Horizontal, self.tr("Year"))
- model.setHeaderData(model.fieldIndex("rating"), Qt.Horizontal, self.tr("Rating"))
-
- if not model.select():
- print(model.lastError())
-
- # Set the model and hide the ID column:
- self.bookTable.setModel(model)
- self.bookTable.setItemDelegate(BookDelegate(self.bookTable))
- self.bookTable.setColumnHidden(model.fieldIndex("id"), True)
- self.bookTable.setSelectionMode(QAbstractItemView.SingleSelection)
-
- # Initialize the Author combo box:
- self.authorEdit.setModel(model.relationModel(author_idx))
- self.authorEdit.setModelColumn(model.relationModel(author_idx).fieldIndex("name"))
-
- self.genreEdit.setModel(model.relationModel(genre_idx))
- self.genreEdit.setModelColumn(model.relationModel(genre_idx).fieldIndex("name"))
-
- # Lock and prohibit resizing of the width of the rating column:
- self.bookTable.horizontalHeader().setSectionResizeMode(model.fieldIndex("rating"),
- QHeaderView.ResizeToContents)
-
- mapper = QDataWidgetMapper(self)
- mapper.setModel(model)
- mapper.setItemDelegate(BookDelegate(self))
- mapper.addMapping(self.titleEdit, model.fieldIndex("title"))
- mapper.addMapping(self.yearEdit, model.fieldIndex("year"))
- mapper.addMapping(self.authorEdit, author_idx)
- mapper.addMapping(self.genreEdit, genre_idx)
- mapper.addMapping(self.ratingEdit, model.fieldIndex("rating"))
-
- selection_model = self.bookTable.selectionModel()
- selection_model.currentRowChanged.connect(mapper.setCurrentModelIndex)
-
- self.bookTable.setCurrentIndex(model.index(0, 0))
- self.create_menubar()
-
- def showError(err):
- QMessageBox.critical(self, "Unable to initialize Database",
- "Error initializing database: " + err.text())
-
- def create_menubar(self):
- file_menu = self.menuBar().addMenu(self.tr("&File"))
- quit_action = file_menu.addAction(self.tr("&Quit"))
- quit_action.triggered.connect(qApp.quit)
-
- help_menu = self.menuBar().addMenu(self.tr("&Help"))
- about_action = help_menu.addAction(self.tr("&About"))
- about_action.setShortcut(QKeySequence.HelpContents)
- about_action.triggered.connect(self.about)
- aboutQt_action = help_menu.addAction("&About Qt")
- aboutQt_action.triggered.connect(qApp.aboutQt)
-
- def about(self):
- QMessageBox.about(self, self.tr("About Books"),
- self.tr("<p>The <b>Books</b> example shows how to use Qt SQL classes "
- "with a model/view framework."))
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/chapter3.rst b/sources/pyside2/doc/tutorials/portingguide/chapter3/chapter3.rst
deleted file mode 100644
index 6d7db9ef5..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/chapter3.rst
+++ /dev/null
@@ -1,121 +0,0 @@
-Chapter 3: Port ``bookdwindow.cpp`` to ``bookwindow.py``
-*********************************************************
-
-After the bookdelegate, port the C++ code for the
-``BookWindow`` class. It offers a QMainWindow, containing a
-``QTableView`` to present the books data, and a **Details**
-section with a set of input fields to edit the selected row
-in the table. To begin with, create the ``bookwindow.py``
-and add the following imports to it:
-
-.. literalinclude:: bookwindow.py
- :language: python
- :linenos:
- :lines: 40-53
-
-.. note:: The imports include the ``BookDelegate`` you
- ported earlier and the ``Ui_BookWindow``. The pyside-uic
- tool generates the ``ui_bookwindow`` Python code based
- on the ``bookwindow.ui`` XML file.
-
-To generate this Python code, run the following command on the
-prompt:
-
-.. code-block::
-
- pyside2-uic bookwindow.ui > ui_bookwindow.py
-
-Try porting the remaining code now. To begin with, here is
-how both the versions of the constructor code looks:
-
-C++ version
-------------
-
-.. literalinclude:: bookwindow.cpp
- :language: c++
- :linenos:
- :lines: 57-140
-
-Python version
----------------
-
-.. literalinclude:: bookwindow.py
- :language: python
- :linenos:
- :lines: 53-116
-
-.. note:: The Python version of the ``BookWindow`` class
- definition inherits from both ``QMainWindow`` and
- ``Ui_BookWindow``, which is defined in the
- ``ui_bookwindow.py`` file that you generated earlier.
-
-Here is how the rest of the code looks like:
-
-C++ version
-------------
-
-.. literalinclude:: bookwindow.cpp
- :language: c++
- :linenos:
- :lines: 115-
-
-Python version
----------------
-
-.. literalinclude:: bookwindow.py
- :language: python
- :linenos:
- :lines: 117-
-
-Now that all the necessary pieces are in place, try to put
-them together in ``main.py``.
-
-.. literalinclude:: main.py
- :language: python
- :linenos:
- :lines: 40-
-
-Try running this to see if you get the following output:
-
-.. image:: images/chapter3-books.png
- :alt: BookWindow with a QTableView and a few input fields
-
-Now, if you look back at :doc:`chapter2 <../chapter2/chapter2>`,
-you'll notice that the ``bookdelegate.py`` loads the
-``star.png`` from the filesytem. Instead, you could add it
-to a ``qrc`` file, and load from it. The later approach is
-rececommended if your application is targeted for
-different platforms, as most of the popular platforms
-employ stricter file access policy these days.
-
-To add the ``star.png`` to a ``.qrc``, create a file called
-``books.qrc`` and the following XML content to it:
-
-.. literalinclude:: books.qrc
- :linenos:
-
-This is a simple XML file defining a list all resources that
-your application needs. In this case, it is the ``star.png``
-image only.
-
-Now, run the ``pyside2-rcc`` tool on the ``books.qrc`` file
-to generate ``rc_books.py``.
-
-.. code-block::
-
- pyside2-rcc books.qrc > rc_books.py
-
-Once you have the Python script generated, make the
-following changes to ``bookdelegate.py`` and ``main.py``:
-
-.. literalinclude:: bookdelegate.py
- :diff: ../chapter2/bookdelegate.py
-
-.. literalinclude:: main.py
- :diff: main-old.py
-
-Although there will be no noticeable difference in the UI
-after these changes, using a ``.qrc`` is a better approach.
-
-Now that you have successfully ported the SQL Books example,
-you know how easy it is. Try porting another C++ application.
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/createdb.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/createdb.py
deleted file mode 100644
index 8fb20cda1..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/createdb.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from PySide2.QtSql import QSqlDatabase, QSqlError, QSqlQuery
-from datetime import date
-
-
-def add_book(q, title, year, authorId, genreId, rating):
- q.addBindValue(title)
- q.addBindValue(year)
- q.addBindValue(authorId)
- q.addBindValue(genreId)
- q.addBindValue(rating)
- q.exec_()
-
-
-def add_genre(q, name):
- q.addBindValue(name)
- q.exec_()
- return q.lastInsertId()
-
-
-def add_author(q, name, birthdate):
- q.addBindValue(name)
- q.addBindValue(str(birthdate))
- q.exec_()
- return q.lastInsertId()
-
-BOOKS_SQL = """
- create table books(id integer primary key, title varchar, author integer,
- genre integer, year integer, rating integer)
- """
-AUTHORS_SQL = """
- create table authors(id integer primary key, name varchar, birthdate text)
- """
-GENRES_SQL = """
- create table genres(id integer primary key, name varchar)
- """
-INSERT_AUTHOR_SQL = """
- insert into authors(name, birthdate) values(?, ?)
- """
-INSERT_GENRE_SQL = """
- insert into genres(name) values(?)
- """
-INSERT_BOOK_SQL = """
- insert into books(title, year, author, genre, rating)
- values(?, ?, ?, ?, ?)
- """
-
-def init_db():
- """
- init_db()
- Initializes the database.
- If tables "books" and "authors" are already in the database, do nothing.
- Return value: None or raises ValueError
- The error value is the QtSql error instance.
- """
- def check(func, *args):
- if not func(*args):
- raise ValueError(func.__self__.lastError())
- db = QSqlDatabase.addDatabase("QSQLITE")
- db.setDatabaseName(":memory:")
-
- check(db.open)
-
- q = QSqlQuery()
- check(q.exec_, BOOKS_SQL)
- check(q.exec_, AUTHORS_SQL)
- check(q.exec_, GENRES_SQL)
- check(q.prepare, INSERT_AUTHOR_SQL)
-
- asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
- greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
- pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
-
- check(q.prepare,INSERT_GENRE_SQL)
- sfiction = add_genre(q, "Science Fiction")
- fiction = add_genre(q, "Fiction")
- fantasy = add_genre(q, "Fantasy")
-
- check(q.prepare,INSERT_BOOK_SQL)
- add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
- add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
- add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
- add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
- add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
- add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
- add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
- add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
- add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
- add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
- add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
- add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
- add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/main-old.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/main-old.py
deleted file mode 100644
index 4a8743c37..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/main-old.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtWidgets import QApplication
-from bookwindow import BookWindow
-
-if __name__ == "__main__":
- app = QApplication([])
-
- window = BookWindow()
- window.resize(800, 600)
- window.show()
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/main.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/main.py
deleted file mode 100644
index 50d2c0d6b..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/main.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from PySide2.QtWidgets import QApplication
-from bookwindow import BookWindow
-import rc_books
-
-if __name__ == "__main__":
- app = QApplication([])
-
- window = BookWindow()
- window.resize(800, 600)
- window.show()
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/hello_world_ex.py b/sources/pyside2/doc/tutorials/portingguide/hello_world_ex.py
deleted file mode 100644
index c83dda55c..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/hello_world_ex.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import random
-
-from PySide2.QtWidgets import (QApplication, QLabel,
- QPushButton, QVBoxLayout, QWidget)
-from PySide2.QtCore import Qt, Slot
-
-class MyWidget(QWidget):
- def __init__(self):
- super().__init__()
-
- self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
-
- self.button = QPushButton("Click me!")
- self.text = QLabel("Hello World")
- self.text.setAlignment(Qt.AlignCenter)
-
- self.layout = QVBoxLayout()
- self.layout.addWidget(self.text)
- self.layout.addWidget(self.button)
- self.setLayout(self.layout)
-
- self.button.clicked.connect(self.magic)
-
- @Slot()
- def magic(self):
- self.text.setText(random.choice(self.hello))
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
-
- widget = MyWidget()
- widget.resize(800, 600)
- widget.show()
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/index.rst b/sources/pyside2/doc/tutorials/portingguide/index.rst
deleted file mode 100644
index 3f2a36f32..000000000
--- a/sources/pyside2/doc/tutorials/portingguide/index.rst
+++ /dev/null
@@ -1,194 +0,0 @@
-Porting a C++ Application to Python
-*************************************
-
-Qt for Python lets you use Qt APIs in a Python application.
-So the next question is: What does it take to port an
-existing C++ application? Try porting a Qt C++ application
-to Python to understand this.
-
-Before you start, ensure that all the prerequisites for
-Qt for Python are met. See
-:doc:`Getting Started <../../gettingstarted>` for more
-information. In addition, familiarize yourself with the
-basic differences between Qt in C++ and in Python.
-
-Basic differences
-==================
-
-This section highlights some of the basic differences
-between C++ and Python, and how Qt differs between these
-two contexts.
-
-C++ vs Python
---------------
-
-* In the interest of code reuse, both C++ and Python
- provide ways for one file of code to use facilities
- provided by another. In C++, this is done using the
- ``#include`` directive to access the API definition of
- the reused code. The Python equivalent is an ``import``
- statement.
-* The constructor of a C++ class shares the name of its
- class and automatically calls the constructor of any
- base-classes (in a predefined order) before it runs.
- In Python, the ``__init__()`` method is the constructor
- of the class, and it can explicitly call base-class
- constructors in any order.
-* C++ uses the keyword, ``this``, to implicitly refer to
- the current object. In python, you need to explicitly
- mention the current object as the first parameter
- to each instance method of the class; it is conventionally
- named ``self``.
-* And more importantly, forget about curly braces, {}, and
- semi-colon, ;.
-* Precede variable definitions with the ``global`` keyword,
- only if they need global scope.
-
-.. code:: python
-
- var = None
- def func(key, value = None):
- """Does stuff with a key and an optional value.
-
- If value is omitted or None, the value from func()'s
- last call is reused.
- """
- global var
- if value is None:
- if var is None:
- raise ValueError("Must pass a value on first call", key, value)
- value = var
- else:
- var = value
- doStuff(key, value)
-
-In this example, ``func()`` would treat ``var`` as a local
-name without the ``global`` statement. This would lead to
-a ``NameError`` in the ``value is None`` handling, on
-accessing ``var``. For more information about this, see
-`Python refernce documentation <python refdoc>`_.
-
-.. _python refdoc: https://docs.python.org/3/reference/simple_stmts.html#the-global-statement
-
-.. tip:: Python being an interpreted language, most often
- the easiest way is to try your idea in the interperter.
- You could call the ``help()`` function in the
- interpreter on any built-in function or keyword in
- Python. For example, a call to ``help(import)`` should
- provide documentation about the ``import`` statment
-
-Last but not the least, try out a few examples to
-familiarize yourself with the Python coding style and
-follow the guidelines outlined in the
-`PEP8 - Style Guide <pep8>`_.
-
-.. _pep8: <https://www.python.org/dev/peps/pep-0008/#naming-conventions>
-
-.. code-block:: python
-
- import sys
-
- from PySide2.QtWidgets import QApplication, QLabel
-
- app = QApplication(sys.argv)
- label = QLabel("Hello World")
- label.show()
- sys.exit(app.exec_())
-
-.. note:: Qt provides classes that are meant to manage
- the application-specific requirements depending on
- whether the application is console-only
- (QCoreApplication), GUI with QtWidgets (QApplication),
- or GUI without QtWidgets (QGuiApplication). These
- classes load necessary plugins, such as the GUI
- libraries required by an application. In this case, it is
- QApplication that is initialized first as the application
- has a GUI with QtWidgets.
-
-Qt in the C++ and Python context
----------------------------------
-
-Qt behaves the same irrespective of whether it is used
-in a C++ or a Python application. Considering that C++
-and Python use different language semantics, some
-differences between the two variants of Qt are inevitable.
-Here are a few important ones that you must be aware of:
-
-* **Qt Properties**: ``Q_PROPERTY`` macros are used in C++ to add a
- public member variable with getter and setter functions. Python's
- alternative for this is the ``@property`` decorator before the
- getter and setter function definitions.
-* **Qt Signals and Slots**: Qt offers a unique callback mechanism,
- where a signal is emitted to notify the occurrence of an event, so
- that slots connected to this signal can react to it. In C++,
- the class definition must define the slots under the
- ``public Q_SLOTS:`` and signals under ``Q_SIGNALS:``
- access specifier. You connect these two using one of the
- several variants of the QObject::connect() function. Python's
- equivalent for this is the `@Slot`` decorator just before the
- function definition. This is necessary to register the slots
- with the QtMetaObject.
-* **QString, QVariant, and other types**
-
- - Qt for Python does not provide access to QString and
- QVariant. You must use Python's native types instead.
- - QChar and QStringRef are represented as Python strings,
- and QStringList is converted to a list of strings.
- - QDate, QDateTime, QTime, and QUrl's __hash__() methods
- return a string representation so that identical dates
- (and identical date/times or times or URLs) have
- identical hash values.
- - QTextStream's bin(), hex(), and oct() functions are
- renamed to bin_(), hex_(), and oct_() respectively. This
- should avoid name conflicts with Python's built-in
- functions.
-
-* **QByteArray**: A QByteArray is treated as a list of
- bytes without encoding. Python 3 uses
- "bytes". QString is represented as an encoded human readable string,
- which means it is a "str".
-
-Here is the improved version of the Hello World example,
-demonstrating some of these differences:
-
-.. literalinclude:: hello_world_ex.py
- :linenos:
- :lines: 40-
-
-.. note:: The ``if`` block is just a good practice when
- developing a Python application. It lets the Python file
- behave differently depending on whether it is imported
- as a module in another file or run directly. The
- ``__name__`` variable will have different values in
- these two scenarios. It is ``__main__`` when the file is
- run directly, and the module's file name
- (``hello_world_ex`` in this case) when imported as a
- module. In the later case, everything defined in the
- module except the ``if`` block is available to the
- importing file.
-
-Notice that the QPushButton's ``clicked`` signal is
-connected to the ``magic`` function to randomly change the
-QLabel's ``text`` property. The `@Slot`` decorator marks
-the methods that are slots and informs the QtMetaObject about
-them.
-
-Porting a Qt C++ example
-=========================
-
-Qt offers several C++ examples to showcase its features and help
-beginners learn. You can try porting one of these C++ examples to
-Python. The
-`books SQL example <https://code.qt.io/cgit/qt/qtbase.git/tree/examples/sql/books>`_
-is a good starting point as it does not require you to write UI-specific code in
-Python, but can use its ``.ui`` file instead.
-
-The following chapters guides you through the porting process:
-
-.. toctree::
- :glob:
- :titlesonly:
-
- chapter1/chapter1
- chapter2/chapter2
- chapter3/chapter3
diff --git a/sources/pyside2/doc/tutorials/qmlapp/main.py b/sources/pyside2/doc/tutorials/qmlapp/main.py
deleted file mode 100644
index 54edf0e37..000000000
--- a/sources/pyside2/doc/tutorials/qmlapp/main.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-#!/usr/bin/env python
-# -*- conding: utf-8 -*-
-
-import os, sys, urllib.request, json
-import PySide2.QtQml
-from PySide2.QtQuick import QQuickView
-from PySide2.QtCore import QStringListModel, Qt, QUrl
-from PySide2.QtGui import QGuiApplication
-
-if __name__ == '__main__':
-
- #get our data
- url = "http://country.io/names.json"
- response = urllib.request.urlopen(url)
- data = json.loads(response.read().decode('utf-8'))
-
- #Format and sort the data
- data_list = list(data.values())
- data_list.sort()
-
- #Set up the application window
- app = QGuiApplication(sys.argv)
- view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
-
- #Expose the list to the Qml code
- my_model = QStringListModel()
- my_model.setStringList(data_list)
- view.rootContext().setContextProperty("myModel",my_model)
-
- #Load the QML file
- qml_file = os.path.join(os.path.dirname(__file__),"view.qml")
- view.setSource(QUrl.fromLocalFile(os.path.abspath(qml_file)))
-
- #Show the window
- if view.status() == QQuickView.Error:
- sys.exit(-1)
- view.show()
-
- #execute and cleanup
- app.exec_()
- del view
diff --git a/sources/pyside2/doc/tutorials/qmlapp/qmlapplication.rst b/sources/pyside2/doc/tutorials/qmlapp/qmlapplication.rst
deleted file mode 100644
index 0cb296071..000000000
--- a/sources/pyside2/doc/tutorials/qmlapp/qmlapplication.rst
+++ /dev/null
@@ -1,132 +0,0 @@
-#########################
-QML Application Tutorial
-#########################
-
-This tutorial provides a quick walk-through of a python application
-that loads a QML file. QML is a declarative language that lets you
-design UIs faster than a traditional language, such as C++. The
-QtQml and QtQuick modules provides the necessary infrastructure for
-QML-based UIs.
-
-In this tutorial, you'll also learn how to provide data from Python
-as a QML context property, which is then consumed by the ListView
-defined in the QML file.
-
-Before you begin, install the following prerequisites:
-
-* The `PySide2 <https://pypi.org/project/PySide2/>`_ Python packages.
-* Qt Creator v4.9 beta1 or later from
- `http://download.qt.io
- <http://download.qt.io/snapshots/qtcreator/4.9/4.9.0-beta1/>`_.
-
-
-The following step-by-step instructions guide you through application
-development process using Qt Creator:
-
-#. Open Qt Creator and select **File > New File or Project..** menu item
- to open following dialog:
-
- .. image:: newpyproject.png
-
-#. Select **Qt for Python - Empty** from the list of application templates
- and select **Choose**.
-
- .. image:: pyprojname.png
-
-#. Give a **Name** to your project, choose its location in the
- filesystem, and select **Finish** to create an empty ``main.py``
- and ``main.pyproject``.
-
- .. image:: pyprojxplor.png
-
- This should create a ``main.py`` and ```main.pyproject`` files
- for the project.
-
-#. Download :download:`view.qml<view.qml>` and :download:`logo.png <logo.png>`
- and move them to your project folder.
-
-#. Double-click on ``main.pyproject`` to open it in edit mode, and append
- ``view.qml`` and ``logo.png`` to the **files** list. This is how your
- project file should look after this change:
-
- .. code::
-
- {
- "files": ["main.py", "view.qml", "logo.png"]
- }
-
-#. Now that you have the necessary bits for the application, import the
- Python modules in your ``main.py``, and download country data and
- format it:
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-60
- :emphasize-lines: 12-20
-
-#. Now, set up the application window using
- :ref:`PySide2.QtGui.QGuiApplication<qguiapplication>`, which manages the application-wide
- settings.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-65
- :emphasize-lines: 23-25
-
- .. note:: Setting the resize policy is important if you want the
- root item to resize itself to fit the window or vice-a-versa.
- Otherwise, the root item will retain its original size on
- resizing the window.
-
-#. You can now expose the ``data_list`` variable as a QML context
- property, which will be consumed by the QML ListView item in ``view.qml``.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-70
- :emphasize-lines: 27-30
-
-#. Load the ``view.qml`` to the ``QQuickView`` and call ``show()`` to
- display the application window.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-79
- :emphasize-lines: 33-39
-
-#. Finally, execute the application to start the event loop and clean up.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-
- :emphasize-lines: 41-43
-
-#. Your application is ready to be run now. Select **Projects** mode to
- choose the Python version to run it.
-
- .. image:: projectsmode.png
-
-Run the application by using the ``CTRL+R`` keyboard shortcut to see if it
-looks like this:
-
-.. image:: qmlapplication.png
-
-You could also watch the following video tutorial for guidance to develop
-this application:
-
-.. raw:: html
-
- <div style="position: relative; padding-bottom: 56.25%; height: 0;
- overflow: hidden; max-width: 100%; height: auto;">
- <iframe src="https://www.youtube.com/embed/JxfiUx60Mbg" frameborder="0"
- allowfullscreen style="position: absolute; top: 0; left: 0;
- width: 100%; height: 100%;">
- </iframe>
- </div>
-
-********************
-Related information
-********************
-
-* `QML Reference <https://doc.qt.io/qt-5/qmlreference.html>`_
-* :doc:`../qmlintegration/qmlintegration`
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/main.py b/sources/pyside2/doc/tutorials/qmlintegration/main.py
deleted file mode 100644
index 3451c65b5..000000000
--- a/sources/pyside2/doc/tutorials/qmlintegration/main.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-from os.path import abspath, dirname, join
-
-from PySide2.QtCore import QObject, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlApplicationEngine
-
-from style_rc import *
-
-
-class Bridge(QObject):
-
- @Slot(str, result=str)
- def getColor(self, color_name):
- if color_name.lower() == "red":
- return "#ef9a9a"
- elif color_name.lower() == "green":
- return "#a5d6a7"
- elif color_name.lower() == "blue":
- return "#90caf9"
- else:
- return "white"
-
- @Slot(float, result=int)
- def getSize(self, s):
- size = int(s * 42) # Maximum font size
- if size <= 0:
- return 1
- else:
- return size
-
- @Slot(str, result=bool)
- def getItalic(self, s):
- if s.lower() == "italic":
- return True
- else:
- return False
-
- @Slot(str, result=bool)
- def getBold(self, s):
- if s.lower() == "bold":
- return True
- else:
- return False
-
- @Slot(str, result=bool)
- def getUnderline(self, s):
- if s.lower() == "underline":
- return True
- else:
- return False
-
-
-if __name__ == '__main__':
- app = QGuiApplication(sys.argv)
- engine = QQmlApplicationEngine()
-
- # Instance of the Python object
- bridge = Bridge()
-
- # Expose the Python object to QML
- context = engine.rootContext()
- context.setContextProperty("con", bridge)
-
- # Get the path of the current directory, and then add the name
- # of the QML file, to load it.
- qmlFile = join(dirname(__file__), 'view.qml')
- engine.load(abspath(qmlFile))
-
- if not engine.rootObjects():
- sys.exit(-1)
-
- sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst b/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst
deleted file mode 100644
index 62336ee81..000000000
--- a/sources/pyside2/doc/tutorials/qmlintegration/qmlintegration.rst
+++ /dev/null
@@ -1,111 +0,0 @@
-########################
-QML Integration Tutorial
-########################
-
-This tutorial provides a quick walk-through of a python application that loads, and interacts with
-a QML file. QML is a declarative language that lets you design UIs faster than a traditional
-language, such as C++. The QtQml and QtQuick modules provides the necessary infrastructure for
-QML-based UIs.
-
-In this tutorial, you will learn how to integrate Python with a QML application through a context
-property. This mechanism will help us to understand how to use Python as a backend for certain
-signals from the UI elements in the QML interface. Additionally, you will learn how to provide
-a modern look to your QML application using one of the features from Qt Quick Controls 2.
-
-The tutorial is based on an application that allow you to set many text properties, like increasing
-the font size, changing the color, changing the style, and so on. Before you begin, install the
-`PySide2 <https://pypi.org/project/PySide2/>`_ Python packages.
-
-The following step-by-step process will guide you through the key elements of the QML based
-application and PySide2 integration:
-
-#. First, let's start with the following QML-based UI:
-
- .. image:: textproperties_default.png
-
- The design is based on a `GridLayout`, containing two `ColumnLayout`.
- Inside the UI you will find many `RadioButton`, `Button`, and a `Slider`.
-
-#. With the QML file in place, you can load it from Python:
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 98-108
- :emphasize-lines: 6,9
-
- Notice that we specify the name of the context property, **con**,
- and also we explicitly load our QML file.
-
-#. Define the `Bridge` class, containing all the logic for the context property:
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 51-91
-
-#. Now, go back to the QML file and connect the signals to the slots defined in the `Bridge` class:
-
- .. literalinclude:: view.qml
- :linenos:
- :lines: 85-93
- :emphasize-lines: 5-7
-
- The properties *Italic*, *Bold*, and *Underline* are mutually
- exclusive, this means only one can be active at any time.
- To achieve this each time we select one of these options, we
- check the three properties via the context property as you can
- see in the above snippet.
- Only one of the three will return *True*, while the other two
- will return *False*, that is how we make sure only one is being
- applied to the text.
-
-#. Each slot verifies if the selected option contains the text associated
- to the property:
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 79-84
- :emphasize-lines: 4,6
-
- Returning *True* or *False* allows you to activate and deactivate
- the properties of the QML UI elements.
-
- It is also possible to return other values that are not *Boolean*,
- like the slot in charge of returning the font size:
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 64-70
-
-#. Now, for changing the look of our application, you have two options:
-
- 1. Use the command line: execute the python file adding the option, `--style`::
-
- python main.py --style material
-
- 2. Use a `qtquickcontrols2.conf` file:
-
- .. literalinclude:: qtquickcontrols2.conf
- :linenos:
-
- Then add it to your `.qrc` file:
-
- .. literalinclude:: style.qrc
- :linenos:
-
- Generate the *rc* file running, `pyside2-rcc style.qrc > style_rc.py`
- And finally import it from your `main.py` script.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 41-48
- :emphasize-lines: 8
-
- You can read more about this configuration file
- `here <https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html>`_.
-
- The final look of your application will be:
-
- .. image:: textproperties_material.png
-
-You can :download:`view.qml <view.qml>` and
-:download:`main.py <main.py>` to try this example.
diff --git a/sources/pyside2/doc/tutorials/qmlsqlintegration/main.py b/sources/pyside2/doc/tutorials/qmlsqlintegration/main.py
deleted file mode 100644
index c710e019a..000000000
--- a/sources/pyside2/doc/tutorials/qmlsqlintegration/main.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python project.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import logging
-
-from PySide2.QtCore import QDir, QFile, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlApplicationEngine
-from PySide2.QtSql import QSqlDatabase
-
-from sqlDialog import SqlConversationModel
-
-logging.basicConfig(filename="chat.log", level=logging.DEBUG)
-logger = logging.getLogger("logger")
-
-
-def connectToDatabase():
- database = QSqlDatabase.database()
- if not database.isValid():
- database = QSqlDatabase.addDatabase("QSQLITE")
- if not database.isValid():
- logger.error("Cannot add database")
-
- write_dir = QDir()
- if not write_dir.mkpath("."):
- logger.error("Failed to create writable directory")
-
- # Ensure that we have a writable location on all devices.
- filename = "{}/chat-database.sqlite3".format(write_dir.absolutePath())
-
- # When using the SQLite driver, open() will create the SQLite
- # database if it doesn't exist.
- database.setDatabaseName(filename)
- if not database.open():
- logger.error("Cannot open database")
- QFile.remove(filename)
-
-
-if __name__ == "__main__":
- app = QGuiApplication()
- connectToDatabase()
- sql_conversation_model = SqlConversationModel()
-
- engine = QQmlApplicationEngine()
- # Export pertinent objects to QML
- engine.rootContext().setContextProperty("chat_model", sql_conversation_model)
- engine.load(QUrl("chat.qml"))
-
- app.exec_()
diff --git a/sources/pyside2/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst b/sources/pyside2/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
deleted file mode 100644
index f675f7899..000000000
--- a/sources/pyside2/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
+++ /dev/null
@@ -1,225 +0,0 @@
-QML, SQL and PySide Integration Tutorial
-########################################
-
-This tutorial is very similar to the `Qt Chat Tutorial`_ one but it focuses on explaining how to
-integrate a SQL database into a PySide2 application using QML for its UI.
-
-.. _`Qt Chat Tutorial`: https://doc.qt.io/qt-5/qtquickcontrols-chattutorial-example.html
-
-sqlDialog.py
-------------
-
-We import the pertinent libraries to our program, define a global variable that hold the
-name of our table, and define the global function ``createTable()`` that creates a new table if it
-doesn't already exist.
-The database contains a single line to mock the beginning of a conversation.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 40-77
-
-The ``SqlConversationModel`` class offers the read-only data model required for the non-editable
-contacts list. It derives from the :ref:`QSqlQueryModel` class, which is the logical choice for
-this use case.
-Then, we proceed to create the table, set its name to the one defined previously with the
-:meth:`~.QSqlTableModel.setTable` method.
-We add the necessary attributes to the table, to have a program that reflects the idea
-of a chat application.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 80-91
-
-In ``setRecipient()``, you set a filter over the returned results from the database, and
-emit a signal every time the recipient of the message changes.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 93-103
-
-The ``data()`` function falls back to ``QSqlTableModel``'s implementation if the role is not a
-custom user role.
-If you get a user role, we can subtract :meth:`~.QtCore.Qt.UserRole` from it to get the index of
-that field, and then use that index to find the value to be returned.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 105-112
-
-
-In ``roleNames()``, we return a Python dictionary with our custom role and role names as key-values
-pairs, so we can use these roles in QML.
-Alternatively, it can be useful to declare an Enum to hold all of the role values.
-Note that ``names`` has to be a hash to be used as a dictionary key,
-and that's why we're using the ``hash`` function.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 114-128
-
-The ``send_message()`` function uses the given recipient and message to insert a new record into
-the database.
-Using :meth:`~.QSqlTableModel.OnManualSubmit` requires you to also call ``submitAll()``,
-since all the changes will be cached in the model until you do so.
-
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 130-146
-
-chat.qml
---------
-
-Let's look at the ``chat.qml`` file.
-
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 40-42
-
-First, import the Qt Quick module.
-This gives us access to graphical primitives such as Item, Rectangle, Text, and so on.
-For a full list of types, see the `Qt Quick QML Types`_ documentation.
-We then add QtQuick.Layouts import, which we'll cover shortly.
-
-Next, import the Qt Quick Controls module.
-Among other things, this provides access to ``ApplicationWindow``, which replaces the existing
-root type, Window:
-
-Let's step through the ``chat.qml`` file.
-
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 44-49
-
-``ApplicationWindow`` is a Window with some added convenience for creating a header and a footer.
-It also provides the foundation for popups and supports some basic styling, such as the background
-color.
-
-There are three properties that are almost always set when using ApplicationWindow: ``width``,
-``height``, and ``visible``.
-Once we've set these, we have a properly sized, empty window ready to be filled with content.
-
-There are two ways of laying out items in QML: `Item Positioners`_ and `Qt Quick Layouts`_.
-
-- Item positioners (`Row`_, `Column`_, and so on) are useful for situations where the size of items
- is known or fixed, and all that is required is to neatly position them in a certain formation.
-- The layouts in Qt Quick Layouts can both position and resize items, making them well suited for
- resizable user interfaces.
- Below, we use `ColumnLayout`_ to vertically lay out a `ListView`_ and a `Pane`_.
-
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 50-53
-
-Pane is basically a rectangle whose color comes from the application's style.
-It's similar to `Frame`_, but it has no stroke around its border.
-
-Items that are direct children of a layout have various `attached properties`_ available to them.
-We use `Layout.fillWidth`_ and `Layout.fillHeight`_ on the `ListView`_ to ensure that it takes as
-much space within the `ColumnLayout`_ as it can, and the same is done for the Pane.
-As `ColumnLayout`_ is a vertical layout, there aren't any items to the left or right of each child,
-so this results in each item consuming the entire width of the layout.
-
-On the other hand, the `Layout.fillHeight`_ statement in the `ListView`_ enables it to occupy the
-remaining space that is left after accommodating the Pane.
-
-.. _Item Positioners: https://doc.qt.io/qt-5/qtquick-positioning-layouts.html
-.. _Qt Quick Layouts: https://doc.qt.io/qt-5/qtquicklayouts-index.html
-.. _Row: https://doc.qt.io/qt-5/qml-qtquick-row.html
-.. _Column: https://doc.qt.io/qt-5/qml-qtquick-column.html
-.. _ColumnLayout: https://doc.qt.io/qt-5/qml-qtquick-layouts-columnlayout.html
-.. _ListView: https://doc.qt.io/qt-5/qml-qtquick-listview.html
-.. _Pane: https://doc.qt.io/qt-5/qml-qtquick-controls2-pane.html
-.. _Frame: https://doc.qt.io/qt-5/qml-qtquick-controls2-frame.html
-.. _attached properties: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html
-.. _Layout.fillWidth: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillWidth-attached-prop
-.. _Layout.fillHeight: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillHeight-attached-prop
-.. _ListView: https://doc.qt.io/qt-5/qml-qtquick-listview.html
-.. _Qt Quick QML Types: https://doc.qt.io/qt-5/qtquick-qmlmodule.html
-
-Let's look at the ``Listview`` in detail:
-
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 53-99
-
-After filling the ``width`` and ``height`` of its parent, we also set some margins on the view.
-
-
-Next, we set `displayMarginBeginning`_ and `displayMarginEnd`_.
-These properties ensure that the delegates outside the view don't disappear when you
-scroll at the edges of the view.
-To get a better understanding, consider commenting out the properties and then rerun your code.
-Now watch what happens when you scroll the view.
-
-We then flip the vertical direction of the view, so that first items are at the bottom.
-
-Additionally, messages sent by the contact should be distinguished from those sent by a contact.
-For now, when a message is sent by you, we set a ``sentByMe`` property, to alternate between
-different contacts.
-Using this property, we distinguish between different contacts in two ways:
-
-* Messages sent by the contact are aligned to the right side of the screen by setting
- ``anchors.right`` to ``parent.right``.
-* We change the color of the rectangle depending on the contact.
- Since we don't want to display dark text on a dark background, and vice versa, we also set the
- text color depending on who the contact is.
-
-At the bottom of the screen, we place a `TextArea`_ item to allow multi-line text input, and a
-button to send the message.
-We use Pane to cover the area under these two items:
-
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 101-125
-
-The `TextArea`_ should fill the available width of the screen.
-We assign some placeholder text to provide a visual cue to the contact as to where they should begin
-typing.
-The text within the input area is wrapped to ensure that it does not go outside of the screen.
-
-Lastly, we have a button that allows us to call the ``send_message`` method we defined on
-``sqlDialog.py``, since we're just having a mock up example here and there is only one possible
-recipient and one possible sender for this conversation we're just using strings here.
-
-.. _displayMarginBeginning: https://doc.qt.io/qt-5/qml-qtquick-listview.html#displayMarginBeginning-prop
-.. _displayMarginEnd: https://doc.qt.io/qt-5/qml-qtquick-listview.html#displayMarginEnd-prop
-.. _TextArea: https://doc.qt.io/qt-5/qml-qtquick-controls2-textarea.html
-
-
-main.py
--------
-
-We use ``logging`` instead of Python's ``print()``, because it provides a better way to control the
-messages levels that our application will generate (errors, warnings, and information messages).
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-50
-
-``connectToDatabase()`` creates a connection with the SQLite database, creating the actual file
-if it doesn't already exist.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 53-72
-
-
-
-A few interesting things happen in the ``main`` function:
-
-- Declaring a :ref:`QGuiApplication`.
- You should use a :ref:`QGuiApplication` instead of :ref:`QApplication` because we're not
- using the **QtWidgets** module.
-- Connecting to the database,
-- Declaring a :ref:`QQmlApplicationEngine`.
- This allows you to access the QML context property to connect Python
- and QML from the conversation model we built on ``sqlDialog.py``.
-- Loading the ``.qml`` file that defines the UI.
-
-Finally, the Qt application runs, and your program starts.
-
- .. literalinclude:: main.py
- :linenos:
- :lines: 75-85
-
-.. image:: example_list_view.png
diff --git a/sources/pyside2/doc/tutorials/qmlsqlintegration/sqlDialog.py b/sources/pyside2/doc/tutorials/qmlsqlintegration/sqlDialog.py
deleted file mode 100644
index 6a9ff8234..000000000
--- a/sources/pyside2/doc/tutorials/qmlsqlintegration/sqlDialog.py
+++ /dev/null
@@ -1,146 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python project.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import datetime
-import logging
-
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtSql import QSqlDatabase, QSqlQuery, QSqlRecord, QSqlTableModel
-
-table_name = "Conversations"
-
-
-def createTable():
- if table_name in QSqlDatabase.database().tables():
- return
-
- query = QSqlQuery()
- if not query.exec_(
- """
- CREATE TABLE IF NOT EXISTS 'Conversations' (
- 'author' TEXT NOT NULL,
- 'recipient' TEXT NOT NULL,
- 'timestamp' TEXT NOT NULL,
- 'message' TEXT NOT NULL,
- FOREIGN KEY('author') REFERENCES Contacts ( name ),
- FOREIGN KEY('recipient') REFERENCES Contacts ( name )
- )
- """
- ):
- logging.error("Failed to query database")
-
- # This adds the first message from the Bot
- # and further development is required to make it interactive.
- query.exec_(
- """
- INSERT INTO Conversations VALUES(
- 'machine', 'Me', '2019-01-07T14:36:06', 'Hello!'
- )
- """
- )
- logging.info(query)
-
-
-class SqlConversationModel(QSqlTableModel):
- def __init__(self, parent=None):
- super(SqlConversationModel, self).__init__(parent)
-
- createTable()
- self.setTable(table_name)
- self.setSort(2, Qt.DescendingOrder)
- self.setEditStrategy(QSqlTableModel.OnManualSubmit)
- self.recipient = ""
-
- self.select()
- logging.debug("Table was loaded successfully.")
-
- def setRecipient(self, recipient):
- if recipient == self.recipient:
- pass
-
- self.recipient = recipient
-
- filter_str = (
- "(recipient = '{}' AND author = 'Me') OR " "(recipient = 'Me' AND author='{}')"
- ).format(self.recipient)
- self.setFilter(filter_str)
- self.select()
-
- def data(self, index, role):
- if role < Qt.UserRole:
- return QSqlTableModel.data(self, index, role)
-
- sql_record = QSqlRecord()
- sql_record = self.record(index.row())
-
- return sql_record.value(role - Qt.UserRole)
-
- def roleNames(self):
- """Converts dict to hash because that's the result expected
- by QSqlTableModel"""
- names = {}
- author = "author".encode()
- recipient = "recipient".encode()
- timestamp = "timestamp".encode()
- message = "message".encode()
-
- names[hash(Qt.UserRole)] = author
- names[hash(Qt.UserRole + 1)] = recipient
- names[hash(Qt.UserRole + 2)] = timestamp
- names[hash(Qt.UserRole + 3)] = message
-
- return names
-
- def send_message(self, recipient, message, author):
- timestamp = datetime.datetime.now()
-
- new_record = self.record()
- new_record.setValue("author", author)
- new_record.setValue("recipient", recipient)
- new_record.setValue("timestamp", str(timestamp))
- new_record.setValue("message", message)
-
- logging.debug('Message: "{}" \n Received by: "{}"'.format(message, recipient))
-
- if not self.insertRecord(self.rowCount(), new_record):
- logging.error("Failed to send message: {}".format(self.lastError().text()))
- return
-
- self.submitAll()
- self.select()
diff --git a/sources/pyside2/libpyside/CMakeLists.txt b/sources/pyside2/libpyside/CMakeLists.txt
deleted file mode 100644
index 579159c6a..000000000
--- a/sources/pyside2/libpyside/CMakeLists.txt
+++ /dev/null
@@ -1,210 +0,0 @@
-project(libpyside)
-
-if(${Qt${QT_MAJOR_VERSION}Qml_FOUND})
- if(NOT "${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS}" MATCHES "/QtQml/")
- string(REPLACE "/QtCore" "/QtQml" replaceme "${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}")
- list(APPEND Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS ${replaceme})
- list(REMOVE_DUPLICATES Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS)
- endif()
-endif()
-
-if(${Qt${QT_MAJOR_VERSION}Quick_FOUND})
- if(NOT "${Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS}" MATCHES "/QtQuick/")
- string(REPLACE "/QtCore" "/QtQuick" replaceme "${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}")
- list(APPEND Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS ${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS})
- list(APPEND Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS ${replaceme})
- list(REMOVE_DUPLICATES Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS)
- endif()
-endif()
-
-set(QML_PRIVATE_API_SUPPORT 0)
-if(Qt${QT_MAJOR_VERSION}Qml_FOUND)
- # Used for registering custom QQuickItem classes defined in Python code.
- set(QML_SUPPORT 1)
- set(QML_INCLUDES ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS})
- set(QML_LIBRARIES ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES})
-
- if(Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS)
- # Used for transforming QML exceptions into Python exceptions.
- set(QML_PRIVATE_API_SUPPORT 1)
- set(QML_INCLUDES ${QML_INCLUDES} ${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS})
- else()
- message(WARNING "QML private API include files could not be found, support for catching QML exceptions inside Python code will not work.")
- endif()
-else()
- set(QML_SUPPORT 0)
- set(QML_PRIVATE_API_SUPPORT 0)
- set(QML_INCLUDES "")
- set(QML_LIBRARIES "")
-endif()
-
-set(libpyside_SRC
- class_property.cpp
- dynamicqmetaobject.cpp
- feature_select.cpp
- signalmanager.cpp
- globalreceiverv2.cpp
- pysideclassinfo.cpp
- pysideqenum.cpp
- pysidemetafunction.cpp
- pysidesignal.cpp
- pysideslot.cpp
- pysideproperty.cpp
- pysideqflags.cpp
- pysideweakref.cpp
- pyside.cpp
- pysidestaticstrings.cpp
-)
-
-# Add python files to project explorer in Qt Creator, when opening the CMakeLists.txt as a project,
-# so you can look up python files with the Locator.
-macro(add_other_files)
- foreach(_it ${ARGN})
- if(NOT IS_DIRECTORY ${_it})
- get_filename_component(name ${_it} NAME)
- if(NOT ${_it} MATCHES "^/\\\\..*$;~$")
- set_source_files_properties(${_it} PROPERTIES HEADER_FILE_ONLY TRUE)
- endif()
- endif()
- endforeach()
-endmacro()
-
-# Test files.
-file(GLOB_RECURSE pyside_folder_py_files "../*.py")
-
-# Mostly for setup.py.
-file(GLOB setup_folder_py_files "../../../*.py")
-
-set(other_files ${pyside_folder_py_files} ${setup_folder_py_files})
-add_other_files(${other_files})
-
-add_library(pyside2 SHARED ${libpyside_SRC} ${other_files})
-add_library(PySide2::pyside2 ALIAS pyside2)
-
-target_include_directories(pyside2 PRIVATE
- ${QML_INCLUDES}
- ${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
-)
-
-target_include_directories(pyside2 PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:include/PySide2>
-)
-
-target_link_libraries(pyside2
- PRIVATE Shiboken6::libshiboken
- PRIVATE ${QML_LIBRARIES}
- PRIVATE ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES})
-
-set_target_properties(pyside2 PROPERTIES
- VERSION ${BINDING_API_VERSION}
- SOVERSION "${PYSIDE_SO_VERSION}"
- OUTPUT_NAME "pyside2${pyside2_SUFFIX}${SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX}"
- DEFINE_SYMBOL BUILD_LIBPYSIDE)
-
-if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- set_property(TARGET pyside2 PROPERTY CXX_STANDARD 17)
-else()
- set_property(TARGET pyside2 PROPERTY CXX_STANDARD 11)
-endif()
-
-if(QML_SUPPORT)
- target_compile_definitions(pyside2 PUBLIC PYSIDE_QML_SUPPORT=1)
-endif()
-target_compile_definitions(pyside2 PRIVATE PYSIDE_QML_PRIVATE_API_SUPPORT=${QML_PRIVATE_API_SUPPORT})
-
-if(PYSIDE_QT_CONF_PREFIX)
- set_property(SOURCE pyside.cpp
- APPEND
- PROPERTY COMPILE_DEFINITIONS
- PYSIDE_QT_CONF_PREFIX=${PYSIDE_QT_CONF_PREFIX})
-endif()
-
-#
-# install stuff
-#
-
-set(libpyside_HEADERS
- class_property.h
- dynamicqmetaobject.h
- feature_select.h
- pysideclassinfo.h
- pysideqenum.h
- pysidemacros.h
- signalmanager.h
- pyside.h
- pysidestaticstrings.h
- pysidemetafunction.h
- pysidesignal.h
- pysideproperty.h
- pysideqflags.h
- pysideweakref.h
-)
-
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
-else()
- set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
-endif()
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII")
-
-# create pkg-config file
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pyside2.pc.in"
- "${CMAKE_CURRENT_BINARY_DIR}/pyside2${pyside2_SUFFIX}.pc" @ONLY)
-
-# for creating cmake-config files
-include(CMakePackageConfigHelpers)
-
-# Build-tree / super project package config file.
-set(PYSIDE_PYTHONPATH "${pysidebindings_BINARY_DIR}/PySide2")
-set(PYSIDE_TYPESYSTEMS "${pysidebindings_SOURCE_DIR}/PySide2/templates/")
-set(PYSIDE_GLUE "${pysidebindings_SOURCE_DIR}/PySide2/glue")
-
-configure_package_config_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config-spec.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
- INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
- PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
- INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
-)
-
-set(PYSIDE_PYTHONPATH "${PYTHON_SITE_PACKAGES}/PySide2")
-set(PYSIDE_TYPESYSTEMS "${CMAKE_INSTALL_PREFIX}/share/PySide2${pyside2_SUFFIX}/typesystems")
-set(PYSIDE_GLUE "${CMAKE_INSTALL_PREFIX}/share/PySide2${pyside2_SUFFIX}/glue")
-
-# Install-tree / relocatable package config file.
-configure_package_config_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config-spec.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/install/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
- INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}"
- PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
-)
-
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2Config.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake" @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide2ConfigVersion.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/PySide2ConfigVersion.cmake" @ONLY)
-
-install(FILES ${libpyside_HEADERS}
- DESTINATION include/${BINDING_NAME}${pyside2_SUFFIX})
-
-install(TARGETS pyside2 EXPORT PySide2Targets
- LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
- ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
- RUNTIME DESTINATION bin)
-install(EXPORT PySide2Targets NAMESPACE PySide2::
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside2${pyside2_SUFFIX}.pc"
- DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2Config.cmake"
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide2Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
-
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide2ConfigVersion.cmake"
- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide2-${BINDING_API_VERSION}")
diff --git a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in b/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
deleted file mode 100644
index 9f0ae236a..000000000
--- a/sources/pyside2/libpyside/PySide2Config-spec.cmake.in
+++ /dev/null
@@ -1,16 +0,0 @@
-# PYSIDE_PYTHONPATH - Path to where the PySide2 Python module files could be found
-# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide2
-# PYSIDE_GLUE - Path to module glue files.
-
-@PACKAGE_INIT@
-
-# Import targets only when using an installed PySide2 config file (so not during a regular
-# PySide2 build, or during a super project build).
-if (NOT TARGET PySide2::pyside2)
- include("${CMAKE_CURRENT_LIST_DIR}/PySide2Targets.cmake")
-endif()
-
-# Set relocatable variables.
-set_and_check(PYSIDE_PYTHONPATH "@PACKAGE_PYSIDE_PYTHONPATH@")
-set_and_check(PYSIDE_TYPESYSTEMS "@PACKAGE_PYSIDE_TYPESYSTEMS@")
-set_and_check(PYSIDE_GLUE "@PACKAGE_PYSIDE_GLUE@")
diff --git a/sources/pyside2/libpyside/PySide2Config.cmake.in b/sources/pyside2/libpyside/PySide2Config.cmake.in
deleted file mode 100644
index c5c1f44b4..000000000
--- a/sources/pyside2/libpyside/PySide2Config.cmake.in
+++ /dev/null
@@ -1,5 +0,0 @@
-if (NOT PYTHON_CONFIG_SUFFIX)
- message(STATUS "PySide2Config: Using default python: @SHIBOKEN_PYTHON_CONFIG_SUFFIX@")
- SET(PYTHON_CONFIG_SUFFIX @SHIBOKEN_PYTHON_CONFIG_SUFFIX@)
-endif()
-include(${CMAKE_CURRENT_LIST_DIR}/PySide2Config${PYTHON_CONFIG_SUFFIX}.cmake)
diff --git a/sources/pyside2/libpyside/class_property.cpp b/sources/pyside2/libpyside/class_property.cpp
deleted file mode 100644
index 90ce0d2f3..000000000
--- a/sources/pyside2/libpyside/class_property.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "pyside.h"
-#include "pysidestaticstrings.h"
-#include "feature_select.h"
-#include "class_property.h"
-
-#include <shiboken.h>
-#include <sbkstaticstrings.h>
-
-extern "C" {
-
-/*
- * A `classproperty` is the same as a `property` but the `__get__()` and `__set__()`
- * methods are modified to always use the object class instead of a concrete instance.
- *
- * Note: A "static property" as it is often called does not exist per se.
- * Static methods do not receive anything when created. Static methods which
- * should participate in a property must be turned into class methods, before.
- * See function `createProperty` in `feature_select.cpp`.
- */
-
-// `class_property.__get__()`: Always pass the class instead of the instance.
-static PyObject *PyClassProperty_get(PyObject *self, PyObject * /*ob*/, PyObject *cls)
-{
- return PyProperty_Type.tp_descr_get(self, cls, cls);
-}
-
-// `class_property.__set__()`: Just like the above `__get__()`.
-static int PyClassProperty_set(PyObject *self, PyObject *obj, PyObject *value)
-{
- PyObject *cls = PyType_Check(obj) ? obj : reinterpret_cast<PyObject *>(Py_TYPE(obj));
- return PyProperty_Type.tp_descr_set(self, cls, value);
-}
-
-// The property `__doc__` default does not work for class properties
-// because PyProperty_Type.tp_init thinks this is a subclass which needs PyObject_SetAttr.
-// We call `__init__` while pretending to be a PyProperty_Type instance.
-static int PyClassProperty_init(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- auto hold = Py_TYPE(self);
- Py_TYPE(self) = &PyProperty_Type;
- auto ret = PyProperty_Type.tp_init(self, args, kwargs);
- Py_TYPE(self) = hold;
- return ret;
-}
-
-static PyType_Slot PyClassProperty_slots[] = {
- {Py_tp_getset, nullptr}, // will be set below
- {Py_tp_base, reinterpret_cast<void *>(&PyProperty_Type)},
- {Py_tp_descr_get, reinterpret_cast<void *>(PyClassProperty_get)},
- {Py_tp_descr_set, reinterpret_cast<void *>(PyClassProperty_set)},
- {Py_tp_init, reinterpret_cast<void *>(PyClassProperty_init)},
- {0, 0}
-};
-
-static PyType_Spec PyClassProperty_spec = {
- "PySide2.PyClassProperty",
- sizeof(propertyobject),
- 0,
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
- PyClassProperty_slots,
-};
-
-PyTypeObject *PyClassPropertyTypeF()
-{
- static PyTypeObject *type = nullptr;
- if (type == nullptr) {
- // Provide the same `tp_getset`, which is not inherited.
- PyClassProperty_slots[0].pfunc = PyProperty_Type.tp_getset;
- type = reinterpret_cast<PyTypeObject *>(
- PyType_FromSpec(&PyClassProperty_spec));
- }
- return type;
-}
-
-/*
- * Types with class properties need to handle `Type.class_prop = x` in a specific way.
- * By default, Python replaces the `class_property` itself, but for wrapped C++ types
- * we need to call `class_property.__set__()` in order to propagate the new value to
- * the underlying C++ data structure.
- */
-static int SbkObjectType_meta_setattro(PyObject *obj, PyObject *name, PyObject *value)
-{
- // Use `_PepType_Lookup()` instead of `PyObject_GetAttr()` in order to get the raw
- // descriptor (`property`) instead of calling `tp_descr_get` (`property.__get__()`).
- auto type = reinterpret_cast<PyTypeObject *>(obj);
- PyObject *descr = _PepType_Lookup(type, name);
-
- // The following assignment combinations are possible:
- // 1. `Type.class_prop = value` --> descr_set: `Type.class_prop.__set__(value)`
- // 2. `Type.class_prop = other_class_prop` --> setattro: replace existing `class_prop`
- // 3. `Type.regular_attribute = value` --> setattro: regular attribute assignment
- const auto class_prop = reinterpret_cast<PyObject *>(PyClassPropertyTypeF());
- const auto call_descr_set = descr && PyObject_IsInstance(descr, class_prop)
- && !PyObject_IsInstance(value, class_prop);
- if (call_descr_set) {
- // Call `class_property.__set__()` instead of replacing the `class_property`.
- return Py_TYPE(descr)->tp_descr_set(descr, obj, value);
- } else {
- // Replace existing attribute.
- return PyType_Type.tp_setattro(obj, name, value);
- }
-}
-
-} // extern "C"
-
-/*
- * These functions are added to the SbkObjectType_TypeF() dynamically.
- */
-namespace PySide { namespace ClassProperty {
-
-void init()
-{
- PyTypeObject *type = SbkObjectType_TypeF();
- type->tp_setattro = SbkObjectType_meta_setattro;
- Py_TYPE(PyClassPropertyTypeF()) = type;
-}
-
-} // namespace ClassProperty
-} // namespace PySide
diff --git a/sources/pyside2/libpyside/dynamicqmetaobject.cpp b/sources/pyside2/libpyside/dynamicqmetaobject.cpp
deleted file mode 100644
index f67e97e01..000000000
--- a/sources/pyside2/libpyside/dynamicqmetaobject.cpp
+++ /dev/null
@@ -1,588 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "dynamicqmetaobject.h"
-#include "dynamicqmetaobject_p.h"
-#include "pysidesignal.h"
-#include "pysidesignal_p.h"
-#include "pysideproperty.h"
-#include "pysideproperty_p.h"
-#include "pysideslot_p.h"
-#include "pysideqenum.h"
-
-#include <shiboken.h>
-
-#include <QtCore/QByteArray>
-#include <QtCore/QObject>
-#include <QtCore/QStringList>
-#include <QtCore/QTextStream>
-#include <QtCore/QVector>
-#include <private/qmetaobjectbuilder_p.h>
-
-#include <cstring>
-#include <vector>
-
-using namespace PySide;
-
-// MetaObjectBuilder: Provides the QMetaObject's returned by
-// QObject::metaObject() for PySide2 objects. There are several
-// scenarios to consider:
-// 1) A plain Qt class (say QTimer) is instantiated. In that case,
-// return the base meta object until a modification is made by
-// adding methods, properties or class info (cf qmetaobject_test.py).
-// In that case, instantiate a QMetaObjectBuilder inheriting the
-// base meta meta object, add the method and return the result
-// of QMetaObjectBuilder::toMetaObject() (with dirty handling should
-// further modifications be made).
-// 2) A Python class inheriting a Qt class is instantiated. For this,
-// instantiate a QMetaObjectBuilder and add the methods/properties
-// found by inspecting the Python class.
-
-class MetaObjectBuilderPrivate
-{
-public:
- using MetaObjects = std::vector<const QMetaObject *>;
-
- QMetaObjectBuilder *ensureBuilder();
- void parsePythonType(PyTypeObject *type);
- int indexOfMethod(QMetaMethod::MethodType mtype,
- const QByteArray &signature) const;
- int indexOfProperty(const QByteArray &name) const;
- int addSlot(const QByteArray &signature);
- int addSlot(const QByteArray &signature, const QByteArray &type);
- int addSignal(const QByteArray &signature);
- void removeMethod(QMetaMethod::MethodType mtype, int index);
- int getPropertyNotifyId(PySideProperty *property) const;
- int addProperty(const QByteArray &property, PyObject *data);
- void addInfo(const QByteArray &key, const QByteArray &value);
- void addInfo(const QMap<QByteArray, QByteArray> &info);
- void addEnumerator(const char *name,
- bool flag,
- bool scoped,
- const QVector<QPair<QByteArray, int> > &entries);
- void removeProperty(int index);
- const QMetaObject *update();
-
- QMetaObjectBuilder *m_builder = nullptr;
-
- const QMetaObject *m_baseObject = nullptr;
- MetaObjects m_cachedMetaObjects;
- bool m_dirty = true;
-};
-
-QMetaObjectBuilder *MetaObjectBuilderPrivate::ensureBuilder()
-{
- if (!m_builder) {
- m_builder = new QMetaObjectBuilder();
- m_builder->setClassName(m_baseObject->className());
- m_builder->setSuperClass(m_baseObject);
- }
- return m_builder;
-}
-
-MetaObjectBuilder::MetaObjectBuilder(const char *className, const QMetaObject *metaObject) :
- m_d(new MetaObjectBuilderPrivate)
-{
- m_d->m_baseObject = metaObject;
- m_d->m_builder = new QMetaObjectBuilder();
- m_d->m_builder->setClassName(className);
- m_d->m_builder->setSuperClass(metaObject);
- m_d->m_builder->setClassName(className);
-}
-
-MetaObjectBuilder::MetaObjectBuilder(PyTypeObject *type, const QMetaObject *metaObject)
- : m_d(new MetaObjectBuilderPrivate)
-{
- m_d->m_baseObject = metaObject;
- const char *className = type->tp_name;
- if (const char *lastDot = strrchr(type->tp_name, '.'))
- className = lastDot + 1;
- // Different names indicate a Python class inheriting a Qt class.
- // Parse the type.
- if (strcmp(className, metaObject->className()) != 0) {
- m_d->m_builder = new QMetaObjectBuilder();
- m_d->m_builder->setClassName(className);
- m_d->m_builder->setSuperClass(metaObject);
- m_d->parsePythonType(type);
- }
-}
-
-MetaObjectBuilder::~MetaObjectBuilder()
-{
- for (auto *metaObject : m_d->m_cachedMetaObjects)
- free(const_cast<QMetaObject*>(metaObject));
- delete m_d->m_builder;
- delete m_d;
-}
-
-int MetaObjectBuilderPrivate::indexOfMethod(QMetaMethod::MethodType mtype,
- const QByteArray &signature) const
-{
- int result = -1;
- if (m_builder) {
- switch (mtype) {
- case QMetaMethod::Signal:
- result = m_builder->indexOfSignal(signature);
- break;
- case QMetaMethod::Slot:
- result = m_builder->indexOfSlot(signature);
- break;
- case QMetaMethod::Constructor:
- result = m_builder->indexOfConstructor(signature);
- break;
- case QMetaMethod::Method:
- result = m_builder->indexOfMethod(signature);
- break;
- }
- if (result >= 0)
- return result + m_baseObject->methodCount();
- }
- switch (mtype) {
- case QMetaMethod::Signal:
- result = m_baseObject->indexOfSignal(signature);
- break;
- case QMetaMethod::Slot:
- result = m_baseObject->indexOfSlot(signature);
- break;
- case QMetaMethod::Constructor:
- result = m_baseObject->indexOfConstructor(signature);
- break;
- case QMetaMethod::Method:
- result = m_baseObject->indexOfMethod(signature);
- break;
- }
- return result;
-}
-
-int MetaObjectBuilder::indexOfMethod(QMetaMethod::MethodType mtype,
- const QByteArray &signature) const
-{
- return m_d->indexOfMethod(mtype, signature);
-}
-
-int MetaObjectBuilderPrivate::indexOfProperty(const QByteArray &name) const
-{
- if (m_builder) {
- const int result = m_builder->indexOfProperty(name);
- if (result >= 0)
- return m_baseObject->propertyCount() + result;
- }
- return m_baseObject->indexOfProperty(name);
-}
-
-int MetaObjectBuilder::indexOfProperty(const QByteArray &name) const
-{
- return m_d->indexOfProperty(name);
-}
-
-static bool checkMethodSignature(const QByteArray &signature)
-{
- // Common mistake not to add parentheses to the signature.
- const int openParen = signature.indexOf('(');
- const int closingParen = signature.lastIndexOf(')');
- const bool ok = openParen != -1 && closingParen != -1 && openParen < closingParen;
- if (!ok) {
- const QByteArray message =
- "MetaObjectBuilder::addMethod: Invalid method signature provided for \""
- + signature + '"';
- PyErr_WarnEx(PyExc_RuntimeWarning, message.constData(), 0);
- }
- return ok;
-}
-
-int MetaObjectBuilderPrivate::addSlot(const QByteArray &signature)
-{
- if (!checkMethodSignature(signature))
- return -1;
- m_dirty = true;
- return m_baseObject->methodCount()
- + ensureBuilder()->addSlot(signature).index();
-}
-
-int MetaObjectBuilder::addSlot(const char *signature)
-{
- return m_d->addSlot(signature);
-}
-
-int MetaObjectBuilderPrivate::addSlot(const QByteArray &signature,
- const QByteArray &type)
-{
- if (!checkMethodSignature(signature))
- return -1;
- m_dirty = true;
- QMetaMethodBuilder methodBuilder = ensureBuilder()->addSlot(signature);
- methodBuilder.setReturnType(type);
- return m_baseObject->methodCount() + methodBuilder.index();
-}
-
-int MetaObjectBuilder::addSlot(const char *signature, const char *type)
-{
- return m_d->addSlot(signature, type);
-}
-
-int MetaObjectBuilderPrivate::addSignal(const QByteArray &signature)
-{
- if (!checkMethodSignature(signature))
- return -1;
- m_dirty = true;
- return m_baseObject->methodCount()
- + ensureBuilder()->addSignal(signature).index();
-}
-
-int MetaObjectBuilder::addSignal(const char *signature)
-{
- return m_d->addSignal(signature);
-}
-
-void MetaObjectBuilderPrivate::removeMethod(QMetaMethod::MethodType mtype,
- int index)
-{
- index -= m_baseObject->methodCount();
- auto builder = ensureBuilder();
- Q_ASSERT(index >= 0 && index < builder->methodCount());
- switch (mtype) {
- case QMetaMethod::Constructor:
- builder->removeConstructor(index);
- break;
- default:
- builder->removeMethod(index);
- break;
- }
- m_dirty = true;
-}
-
-void MetaObjectBuilder::removeMethod(QMetaMethod::MethodType mtype, int index)
-{
- m_d->removeMethod(mtype, index);
-}
-
-int MetaObjectBuilderPrivate::getPropertyNotifyId(PySideProperty *property) const
-{
- int notifyId = -1;
- if (property->d->notify) {
- if (const char *signalNotify = PySide::Property::getNotifyName(property))
- notifyId = indexOfMethod(QMetaMethod::Signal, signalNotify);
- }
- return notifyId;
-}
-
-int MetaObjectBuilderPrivate::addProperty(const QByteArray &propertyName,
- PyObject *data)
-{
- int index = indexOfProperty(propertyName);
- if (index != -1)
- return index;
-
- PySideProperty *property = reinterpret_cast<PySideProperty *>(data);
- int propertyNotifyId = getPropertyNotifyId(property);
- if (propertyNotifyId >= 0)
- propertyNotifyId -= m_baseObject->methodCount();
- auto newProperty =
- ensureBuilder()->addProperty(propertyName, property->d->typeName,
- propertyNotifyId);
- // Adding property attributes
- newProperty.setReadable(PySide::Property::isReadable(property));
- newProperty.setWritable(PySide::Property::isWritable(property));
- newProperty.setResettable(PySide::Property::hasReset(property));
- newProperty.setDesignable(PySide::Property::isDesignable(property));
- newProperty.setScriptable(PySide::Property::isScriptable(property));
- newProperty.setStored(PySide::Property::isStored(property));
- newProperty.setUser(PySide::Property::isUser(property));
- newProperty.setConstant(PySide::Property::isConstant(property));
- newProperty.setFinal(PySide::Property::isFinal(property));
-
- index = newProperty.index() + m_baseObject->propertyCount();
- m_dirty = true;
- return index;
-}
-
-int MetaObjectBuilder::addProperty(const char *property, PyObject *data)
-{
- return m_d->addProperty(property, data);
-}
-
-void MetaObjectBuilderPrivate::addInfo(const QByteArray &key,
- const QByteArray &value)
-{
- ensureBuilder()->addClassInfo(key, value);
- m_dirty = true;
-}
-
-void MetaObjectBuilder::addInfo(const char *key, const char *value)
-{
- m_d->addInfo(key, value);
-}
-
-void MetaObjectBuilderPrivate::addInfo(const QMap<QByteArray, QByteArray> &info)
-{
- auto builder = ensureBuilder();
- for (auto i = info.constBegin(), end = info.constEnd(); i != end; ++i)
- builder->addClassInfo(i.key(), i.value());
- m_dirty = true;
-}
-
-void MetaObjectBuilder::addInfo(const QMap<QByteArray, QByteArray> &info)
-{
- m_d->addInfo(info);
-}
-
-void MetaObjectBuilder::addEnumerator(const char *name, bool flag, bool scoped,
- const QVector<QPair<QByteArray, int> > &entries)
-{
- m_d->addEnumerator(name, flag, scoped, entries);
-}
-
-void MetaObjectBuilderPrivate::addEnumerator(const char *name, bool flag, bool scoped,
- const QVector<QPair<QByteArray, int> > &entries)
-{
- auto builder = ensureBuilder();
- int have_already = builder->indexOfEnumerator(name);
- if (have_already >= 0)
- builder->removeEnumerator(have_already);
- auto enumbuilder = builder->addEnumerator(name);
- enumbuilder.setIsFlag(flag);
- enumbuilder.setIsScoped(scoped);
-
- for (auto item : entries)
- enumbuilder.addKey(item.first, item.second);
- m_dirty = true;
-}
-
-void MetaObjectBuilderPrivate::removeProperty(int index)
-{
- index -= m_baseObject->propertyCount();
- auto builder = ensureBuilder();
- Q_ASSERT(index >= 0 && index < builder->propertyCount());
- builder->removeProperty(index);
- m_dirty = true;
-}
-
-void MetaObjectBuilder::removeProperty(int index)
-{
- m_d->removeProperty(index);
-}
-
-// PYSIDE-315: Instead of sorting the items and maybe breaking indices, we
-// ensure that the signals and slots are sorted by the improved
-// parsePythonType() (signals must go before slots). The order can only
-// become distorted if the class is modified after creation. In that
-// case, we give a warning.
-
-static QString msgMethodSortOrder(const QMetaObject *mo, int offendingIndex)
-{
- QString result;
- QTextStream str(&result);
- str << "\n\n*** Sort Warning ***\nSignals and slots in QMetaObject '"
- << mo->className()
- << "' are not ordered correctly, this may lead to issues.\n";
- const int methodOffset = mo->methodOffset();
- for (int m = methodOffset, methodCount = mo->methodCount(); m < methodCount; ++m) {
- const auto method = mo->method(m);
- str << (m - methodOffset + 1) << (m > offendingIndex ? '!' : ' ')
- << (method.methodType() == QMetaMethod::Signal ? " Signal " : " Slot ")
- << method.methodSignature() << '\n';
- }
- return result;
-}
-
-static void checkMethodOrder(const QMetaObject *metaObject)
-{
- const int lastMethod = metaObject->methodCount() - 1;
- for (int m = metaObject->methodOffset(); m < lastMethod; ++m) {
- if (metaObject->method(m).methodType() == QMetaMethod::Slot
- && metaObject->method(m + 1).methodType() == QMetaMethod::Signal) {
- const auto message = msgMethodSortOrder(metaObject, m);
- PyErr_WarnEx(PyExc_RuntimeWarning, qPrintable(message), 0);
- // Prevent a warning from being turned into an error. We cannot easily unwind.
- PyErr_Clear();
- break;
- }
- }
-}
-
-const QMetaObject *MetaObjectBuilderPrivate::update()
-{
- if (!m_builder)
- return m_baseObject;
- if (m_cachedMetaObjects.empty() || m_dirty) {
- // PYSIDE-803: The dirty branch needs to be protected by the GIL.
- // This was moved from SignalManager::retrieveMetaObject to here,
- // which is only the update in "return builder->update()".
- Shiboken::GilState gil;
- m_cachedMetaObjects.push_back(m_builder->toMetaObject());
- checkMethodOrder(m_cachedMetaObjects.back());
- m_dirty = false;
- }
- return m_cachedMetaObjects.back();
-}
-
-const QMetaObject *MetaObjectBuilder::update()
-{
- return m_d->update();
-}
-
-using namespace Shiboken;
-
-void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
-{
- // Get all non-QObject-derived base types in method resolution order, filtering out the types
- // that can't have signals, slots or properties.
- // This enforces registering of all signals and slots at type parsing time, and not later at
- // signal connection time, thus making sure no method indices change which would break
- // existing connections.
- const PyObject *mro = type->tp_mro;
- const Py_ssize_t basesCount = PyTuple_GET_SIZE(mro);
- PyTypeObject *qObjectType = Conversions::getPythonTypeObject("QObject*");
-
- std::vector<PyTypeObject *> basesToCheck;
- // Prepend the actual type that we are parsing.
- basesToCheck.reserve(1u + basesCount);
- basesToCheck.push_back(type);
-
- auto sbkObjTypeF = reinterpret_cast<PyTypeObject *>(SbkObject_TypeF());
- auto baseObjType = reinterpret_cast<PyTypeObject *>(&PyBaseObject_Type);
- for (Py_ssize_t i = 0; i < basesCount; ++i) {
- auto baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, i));
- if (baseType != sbkObjTypeF && baseType != baseObjType
- && PyType_IsSubtype(baseType, qObjectType) == 0) {
- basesToCheck.push_back(baseType);
- }
- }
-
- // PYSIDE-315: Handle all signals first, in all involved types.
- // Leave the properties to be registered after signals because they may depend on
- // notify signals.
- for (PyTypeObject *baseType : basesToCheck) {
- PyObject *attrs = baseType->tp_dict;
- PyObject *key = nullptr;
- PyObject *value = nullptr;
- Py_ssize_t pos = 0;
-
- while (PyDict_Next(attrs, &pos, &key, &value)) {
- if (Signal::checkType(value)) {
- // Register signals.
- auto data = reinterpret_cast<PySideSignal *>(value);
- if (data->data->signalName.isEmpty())
- data->data->signalName = String::toCString(key);
- for (const auto &s : data->data->signatures) {
- const auto sig = data->data->signalName + '(' + s.signature + ')';
- if (m_baseObject->indexOfSignal(sig) == -1) {
- // Registering the parameterNames to the QMetaObject (PYSIDE-634)
- // from:
- // Signal(..., arguments=['...', ...]
- // the arguments are now on data-data->signalArguments
- if (!data->data->signalArguments->isEmpty()) {
- m_builder->addSignal(sig).setParameterNames(*data->data->signalArguments);
- } else {
- m_builder->addSignal(sig);
- }
- }
- }
- }
- }
- }
-
- AutoDecRef slotAttrName(String::fromCString(PYSIDE_SLOT_LIST_ATTR));
- // PYSIDE-315: Now take care of the rest.
- // Signals and slots should be separated, unless the types are modified, later.
- // We check for this using "is_sorted()". Sorting no longer happens at all.
- for (PyTypeObject *baseType : basesToCheck) {
- PyObject *attrs = baseType->tp_dict;
- PyObject *key = nullptr;
- PyObject *value = nullptr;
- Py_ssize_t pos = 0;
-
- while (PyDict_Next(attrs, &pos, &key, &value)) {
- if (Property::checkType(value)) {
- const int index = m_baseObject->indexOfProperty(String::toCString(key));
- if (index == -1)
- addProperty(String::toCString(key), value);
- } else if (Py_TYPE(value)->tp_call != nullptr) {
- // PYSIDE-198: PyFunction_Check does not work with Nuitka.
- // Register slots.
- if (PyObject_HasAttr(value, slotAttrName)) {
- PyObject *signatureList = PyObject_GetAttr(value, slotAttrName);
- for (Py_ssize_t i = 0, i_max = PyList_Size(signatureList); i < i_max; ++i) {
- PyObject *pySignature = PyList_GET_ITEM(signatureList, i);
- QByteArray signature(String::toCString(pySignature));
- // Split the slot type and its signature.
- QByteArray type;
- const int spacePos = signature.indexOf(' ');
- if (spacePos != -1) {
- type = signature.left(spacePos);
- signature.remove(0, spacePos + 1);
- }
- const int index = m_baseObject->indexOfSlot(signature);
- if (index == -1) {
- if (type.isEmpty() || type == "void")
- addSlot(signature);
- else
- addSlot(signature, type);
- }
- }
- }
- }
- }
- }
- // PYSIDE-957: Collect the delayed QEnums
- auto collectedEnums = PySide::QEnum::resolveDelayedQEnums(type);
- for (PyObject *obEnumType : collectedEnums) {
- bool isFlag = PySide::QEnum::isFlag(obEnumType);
- AutoDecRef obName(PyObject_GetAttr(obEnumType, PyMagicName::name()));
- // Everything has been checked already in resolveDelayedQEnums.
- // Therefore, we don't need to error-check here again.
- auto name = String::toCString(obName);
- AutoDecRef members(PyObject_GetAttr(obEnumType, PyMagicName::members()));
- AutoDecRef items(PyMapping_Items(members));
- Py_ssize_t nr_items = PySequence_Length(items);
-
- QVector<QPair<QByteArray, int> > entries;
- for (Py_ssize_t idx = 0; idx < nr_items; ++idx) {
- AutoDecRef item(PySequence_GetItem(items, idx));
- AutoDecRef key(PySequence_GetItem(item, 0));
- AutoDecRef member(PySequence_GetItem(item, 1));
- AutoDecRef value(PyObject_GetAttr(member, Shiboken::PyName::value()));
- auto ckey = String::toCString(key);
- auto ivalue = PyInt_AsSsize_t(value); // int/long cheating
- auto thing = QPair<QByteArray, int>(ckey, int(ivalue));
- entries.push_back(thing);
- }
- addEnumerator(name, isFlag, true, entries);
- }
-}
diff --git a/sources/pyside2/libpyside/feature_select.cpp b/sources/pyside2/libpyside/feature_select.cpp
deleted file mode 100644
index 660547d99..000000000
--- a/sources/pyside2/libpyside/feature_select.cpp
+++ /dev/null
@@ -1,766 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "feature_select.h"
-#include "pyside.h"
-#include "pysidestaticstrings.h"
-#include "class_property.h"
-
-#include <shiboken.h>
-#include <sbkstaticstrings.h>
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// PYSIDE-1019: Support switchable extensions
-//
-// This functionality is no longer implemented in the signature module, since
-// the PyCFunction getsets do not have to be modified any longer.
-// Instead, we simply exchange the complete class dicts. This is done in the
-// basewrapper.cpp file and in every generated `tp_(get|set)attro`.
-//
-// This is the general framework of the switchable extensions.
-// A maximum of eight features is planned so far. This seems to be enough.
-// More features are possible, but then we must somehow register the
-// extra `select_id`s above 255.
-//
-
-/*****************************************************************************
-
- How Does This Feature Selection Work?
- -------------------------------------
-
-The basic idea is to replace the `tp_dict` of a QObject derived type.
-This way, we can replace the methods of the class in no time.
-
-The crucial point to understand is how the `tp_dict` is actually accessed:
-When you type "QObject.__dict__", the descriptor of `SbkObjectType_Type`
-is called. This descriptor is per default unassigned, so the base class
-PyType_Type provides the tp_getset method `type_dict`:
-
- static PyObject *
- type_dict(PyTypeObject *type, void *context)
- {
- if (type->tp_dict == NULL) {
- Py_RETURN_NONE;
- }
- return PyDictProxy_New(type->tp_dict);
- }
-
-In order to change that, we need to insert our own version into SbkObjectType:
-
- static PyObject *Sbk_TypeGet___dict__(PyTypeObject *type, void *context)
- {
- auto dict = type->tp_dict;
- if (dict == NULL)
- Py_RETURN_NONE;
- if (SelectFeatureSet != nullptr)
- dict = SelectFeatureSet(type);
- return PyDictProxy_New(dict);
- }
-
-This way, the Python function `type_ready()` does not fill in the default,
-but uses our modified version. It a similar way, we overwrite type_getattro
-with our own version, again in SbkObjectType, replacing the default of
-PyType_Type.
-
-Now we can exchange the dict with a customized version.
-We have our own derived type `ChameleonDict` with additional attributes.
-These allow us to create a ring of dicts which can be rotated to the actual
-needed dict version:
-
-Every dict has a field `select_id` which is selected by the `from __feature__`
-import. The dicts are cyclic connected by the `dict_ring` field.
-
-When a class dict is required, now always `SelectFeatureSet` is called, which
-looks into the `__name__` attribute of the active module and decides which
-version of `tp_dict` is needed. Then the right dict is searched in the ring
-and created if not already there.
-
-Furthermore, we need to overwrite every `tp_(get|set)attro` with a version
-that switches dicts right before looking up methods.
-The dict changing must walk the whole `tp_mro` in order to change all names.
-
-This is everything that the following code does.
-
-*****************************************************************************/
-
-
-namespace PySide { namespace Feature {
-
-using namespace Shiboken;
-
-typedef bool(*FeatureProc)(PyTypeObject *type, PyObject *prev_dict, int id);
-
-static FeatureProc *featurePointer = nullptr;
-
-static PyObject *cached_globals = nullptr;
-static PyObject *last_select_id = nullptr;
-
-static PyObject *_fast_id_array[1 + 256] = {};
-// this will point to element 1 to allow indexing from -1
-static PyObject **fast_id_array;
-
-static inline PyObject *getFeatureSelectId()
-{
- static PyObject *undef = fast_id_array[-1];
- static PyObject *feature_dict = GetFeatureDict();
- // these things are all borrowed
- PyObject *globals = PyEval_GetGlobals();
- if ( globals == nullptr
- || globals == cached_globals)
- return last_select_id;
-
- PyObject *modname = PyDict_GetItem(globals, PyMagicName::name());
- if (modname == nullptr)
- return last_select_id;
-
- PyObject *select_id = PyDict_GetItem(feature_dict, modname);
- if ( select_id == nullptr
- || !PyInt_Check(select_id) // int/long cheating
- || select_id == undef)
- return last_select_id;
-
- cached_globals = globals;
- last_select_id = select_id;
- assert(PyInt_AsSsize_t(select_id) >= 0);
- return select_id;
-}
-
-// Create a derived dict class
-static PyTypeObject *
-createDerivedDictType()
-{
- // It is not easy to create a compatible dict object with the
- // limited API. Easier is to use Python to create a derived
- // type and to modify that a bit from the C code.
- PyObject *ChameleonDict = PepRun_GetResult(R"CPP(if True:
-
- class ChameleonDict(dict):
- __slots__ = ("dict_ring", "select_id")
-
- result = ChameleonDict
-
- )CPP");
- return reinterpret_cast<PyTypeObject *>(ChameleonDict);
-}
-
-static PyTypeObject *new_dict_type = nullptr;
-
-static void ensureNewDictType()
-{
- if (new_dict_type == nullptr) {
- new_dict_type = createDerivedDictType();
- if (new_dict_type == nullptr)
- Py_FatalError("PySide2: Problem creating ChameleonDict");
- }
-}
-
-static inline PyObject *nextInCircle(PyObject *dict)
-{
- // returns a borrowed ref
- AutoDecRef next_dict(PyObject_GetAttr(dict, PyName::dict_ring()));
- return next_dict;
-}
-
-static inline void setNextDict(PyObject *dict, PyObject *next_dict)
-{
- PyObject_SetAttr(dict, PyName::dict_ring(), next_dict);
-}
-
-static inline void setSelectId(PyObject *dict, PyObject *select_id)
-{
- PyObject_SetAttr(dict, PyName::select_id(), select_id);
-}
-
-static inline PyObject *getSelectId(PyObject *dict)
-{
- auto select_id = PyObject_GetAttr(dict, PyName::select_id());
- return select_id;
-}
-
-static inline void setCurrentSelectId(PyTypeObject *type, PyObject *select_id)
-{
- SbkObjectType_SetReserved(type, PyInt_AsSsize_t(select_id)); // int/long cheating
-}
-
-static inline void setCurrentSelectId(PyTypeObject *type, int id)
-{
- SbkObjectType_SetReserved(type, id);
-}
-
-static inline PyObject *getCurrentSelectId(PyTypeObject *type)
-{
- int id = SbkObjectType_GetReserved(type);
- // This can be too early.
- if (id < 0)
- id = 0;
- return fast_id_array[id];
-}
-
-static bool replaceClassDict(PyTypeObject *type)
-{
- /*
- * Replace the type dict by the derived ChameleonDict.
- * This is mandatory for all type dicts when they are touched.
- */
- ensureNewDictType();
- PyObject *dict = type->tp_dict;
- auto ob_ndt = reinterpret_cast<PyObject *>(new_dict_type);
- PyObject *new_dict = PyObject_CallObject(ob_ndt, nullptr);
- if (new_dict == nullptr || PyDict_Update(new_dict, dict) < 0)
- return false;
- // Insert the default id. Cannot fail for small numbers.
- AutoDecRef select_id(PyInt_FromLong(0));
- setSelectId(new_dict, select_id);
- // insert the dict into itself as ring
- setNextDict(new_dict, new_dict);
- // We have now an exact copy of the dict with a new type.
- // Replace `__dict__` which usually has refcount 1 (but see cyclic_test.py)
- Py_DECREF(type->tp_dict);
- type->tp_dict = new_dict;
- return true;
-}
-
-static bool addNewDict(PyTypeObject *type, PyObject *select_id)
-{
- /*
- * Add a new dict to the ring and set it as `type->tp_dict`.
- * A 'false' return is fatal.
- */
- auto dict = type->tp_dict;
- auto ob_ndt = reinterpret_cast<PyObject *>(new_dict_type);
- auto new_dict = PyObject_CallObject(ob_ndt, nullptr);
- if (new_dict == nullptr)
- return false;
- setSelectId(new_dict, select_id);
- // insert the dict into the ring
- auto next_dict = nextInCircle(dict);
- setNextDict(dict, new_dict);
- setNextDict(new_dict, next_dict);
- type->tp_dict = new_dict;
- return true;
-}
-
-static bool moveToFeatureSet(PyTypeObject *type, PyObject *select_id)
-{
- /*
- * Rotate the ring to the given `select_id` and return `true`.
- * If not found, stay at the current position and return `false`.
- */
- auto initial_dict = type->tp_dict;
- auto dict = initial_dict;
- do {
- dict = nextInCircle(dict);
- AutoDecRef current_id(getSelectId(dict));
- // This works because small numbers are singleton objects.
- if (current_id == select_id) {
- type->tp_dict = dict;
- setCurrentSelectId(type, select_id);
- return true;
- }
- } while (dict != initial_dict);
- type->tp_dict = initial_dict;
- return false;
-}
-
-static bool createNewFeatureSet(PyTypeObject *type, PyObject *select_id)
-{
- /*
- * Create a new feature set.
- * A `false` return value is a fatal error.
- *
- * A FeatureProc sees an empty `type->tp_dict` and the previous dict
- * content in `prev_dict`. It is responsible of filling `type->tp_dict`
- * with modified content.
- */
- static auto small_1 = PyInt_FromLong(255);
- Q_UNUSED(small_1);
- static auto small_2 = PyInt_FromLong(255);
- Q_UNUSED(small_2);
- // make sure that small integers are cached
- assert(small_1 != nullptr && small_1 == small_2);
-
- static auto zero = fast_id_array[0];
- bool ok = moveToFeatureSet(type, zero);
- Q_UNUSED(ok);
- assert(ok);
-
- AutoDecRef prev_dict(type->tp_dict);
- Py_INCREF(prev_dict); // keep the first ref unchanged
- if (!addNewDict(type, select_id))
- return false;
- auto id = PyInt_AsSsize_t(select_id); // int/long cheating
- if (id == -1)
- return false;
- setCurrentSelectId(type, id);
- FeatureProc *proc = featurePointer;
- for (int idx = id; *proc != nullptr; ++proc, idx >>= 1) {
- if (idx & 1) {
- // clear the tp_dict that will get new content
- PyDict_Clear(type->tp_dict);
- // let the proc re-fill the tp_dict
- if (!(*proc)(type, prev_dict, id))
- return false;
- // if there is still a step, prepare `prev_dict`
- if (idx >> 1) {
- prev_dict.reset(PyDict_Copy(type->tp_dict));
- if (prev_dict.isNull())
- return false;
- }
- }
- }
- return true;
-}
-
-static bool SelectFeatureSetSubtype(PyTypeObject *type, PyObject *select_id)
-{
- /*
- * This is the selector for one sublass. We need to call this for
- * every subclass until no more subclasses or reaching the wanted id.
- */
- if (Py_TYPE(type->tp_dict) == Py_TYPE(PyType_Type.tp_dict)) {
- // On first touch, we initialize the dynamic naming.
- // The dict type will be replaced after the first call.
- if (!replaceClassDict(type)) {
- Py_FatalError("failed to replace class dict!");
- return false;
- }
- }
- if (!moveToFeatureSet(type, select_id)) {
- if (!createNewFeatureSet(type, select_id)) {
- Py_FatalError("failed to create a new feature set!");
- return false;
- }
- }
- return true;
-}
-
-static inline PyObject *SelectFeatureSet(PyTypeObject *type)
-{
- /*
- * This is the main function of the module.
- * The purpose of this function is to switch the dict of a class right
- * before a (get|set)attro call is performed.
- *
- * Generated functions call this directly.
- * Shiboken will assign it via a public hook of `basewrapper.cpp`.
- */
- if (Py_TYPE(type->tp_dict) == Py_TYPE(PyType_Type.tp_dict)) {
- // We initialize the dynamic features by using our own dict type.
- if (!replaceClassDict(type))
- return nullptr;
- }
- PyObject *select_id = getFeatureSelectId(); // borrowed
- PyObject *current_id = getCurrentSelectId(type); // borrowed
- static PyObject *undef = fast_id_array[-1];
-
- // PYSIDE-1019: During import PepType_SOTP is still zero.
- if (current_id == undef)
- current_id = select_id = fast_id_array[0];
-
- if (select_id != current_id) {
- PyObject *mro = type->tp_mro;
- Py_ssize_t idx, n = PyTuple_GET_SIZE(mro);
- // We leave 'Shiboken.Object' and 'object' alone, therefore "n - 2".
- for (idx = 0; idx < n - 2; idx++) {
- auto *sub_type = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, idx));
- // When any subtype is already resolved (false), we can stop.
- if (!SelectFeatureSetSubtype(sub_type, select_id))
- break;
- }
- }
- return type->tp_dict;
-}
-
-// For cppgenerator:
-void Select(PyObject *obj)
-{
- if (featurePointer == nullptr)
- return;
- auto type = Py_TYPE(obj);
- type->tp_dict = SelectFeatureSet(type);
-}
-
-PyObject *Select(PyTypeObject *type)
-{
- if (featurePointer != nullptr)
- type->tp_dict = SelectFeatureSet(type);
- return type->tp_dict;
-}
-
-static bool feature_01_addLowerNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_02_true_property(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_04_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_08_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_10_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_20_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_40_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-static bool feature_80_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
-
-static FeatureProc featureProcArray[] = {
- feature_01_addLowerNames,
- feature_02_true_property,
- feature_04_addDummyNames,
- feature_08_addDummyNames,
- feature_10_addDummyNames,
- feature_20_addDummyNames,
- feature_40_addDummyNames,
- feature_80_addDummyNames,
- nullptr
-};
-
-void finalize()
-{
- for (int idx = -1; idx < 256; ++idx)
- Py_DECREF(fast_id_array[idx]);
-}
-
-static bool patch_property_impl();
-
-void init()
-{
- // This function can be called multiple times.
- static bool is_initialized = false;
- if (!is_initialized) {
- fast_id_array = &_fast_id_array[1];
- for (int idx = -1; idx < 256; ++idx)
- fast_id_array[idx] = PyInt_FromLong(idx);
- last_select_id = fast_id_array[0];
- featurePointer = featureProcArray;
- initSelectableFeature(SelectFeatureSet);
- registerCleanupFunction(finalize);
- patch_property_impl();
- PySide::ClassProperty::init();
- is_initialized = true;
- }
- // Reset the cache. This is called at any "from __feature__ import".
- cached_globals = nullptr;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// PYSIDE-1019: Support switchable extensions
-//
-// Feature 0x01: Allow snake_case instead of camelCase
-//
-// This functionality is no longer implemented in the signature module, since
-// the PyCFunction getsets do not have to be modified any longer.
-// Instead, we simply exchange the complete class dicts. This is done in the
-// basewrapper.cpp file.
-//
-
-static PyObject *methodWithNewName(PyTypeObject *type,
- PyMethodDef *meth,
- const char *new_name)
-{
- /*
- * Create a method with a lower case name.
- */
- auto obtype = reinterpret_cast<PyObject *>(type);
- int len = strlen(new_name);
- auto name = new char[len + 1];
- strcpy(name, new_name);
- auto new_meth = new PyMethodDef;
- new_meth->ml_name = name;
- new_meth->ml_meth = meth->ml_meth;
- new_meth->ml_flags = meth->ml_flags;
- new_meth->ml_doc = meth->ml_doc;
- PyObject *descr = nullptr;
- if (new_meth->ml_flags & METH_STATIC) {
- AutoDecRef cfunc(PyCFunction_NewEx(new_meth, obtype, nullptr));
- if (cfunc.isNull())
- return nullptr;
- descr = PyStaticMethod_New(cfunc);
- }
- else {
- descr = PyDescr_NewMethod(type, new_meth);
- }
- return descr;
-}
-
-static bool feature_01_addLowerNames(PyTypeObject *type, PyObject *prev_dict, int id)
-{
- /*
- * Add objects with lower names to `type->tp_dict` from 'prev_dict`.
- */
- PyObject *lower_dict = type->tp_dict;
- PyObject *key, *value;
- Py_ssize_t pos = 0;
-
- // We first copy the things over which will not be changed:
- while (PyDict_Next(prev_dict, &pos, &key, &value)) {
- if ( Py_TYPE(value) != PepMethodDescr_TypePtr
- && Py_TYPE(value) != PepStaticMethod_TypePtr) {
- if (PyDict_SetItem(lower_dict, key, value))
- return false;
- continue;
- }
- }
- // Then we walk over the tp_methods to get all methods and insert
- // them with changed names.
- PyMethodDef *meth = type->tp_methods;
- if (!meth)
- return true;
-
- for (; meth != nullptr && meth->ml_name != nullptr; ++meth) {
- const char *name = String::toCString(String::getSnakeCaseName(meth->ml_name, true));
- AutoDecRef new_method(methodWithNewName(type, meth, name));
- if (new_method.isNull())
- return false;
- if (PyDict_SetItemString(lower_dict, name, new_method) < 0)
- return false;
- }
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// PYSIDE-1019: Support switchable extensions
-//
-// Feature 0x02: Use true properties instead of getters and setters
-//
-
-// This is the Python 2 version for inspection of m_ml, only.
-// The actual Python 3 version is larget.
-
-typedef struct {
- PyObject_HEAD
- PyMethodDef *m_ml; /* Description of the C function to call */
- PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
- PyObject *m_module; /* The __module__ attribute, can be anything */
-} PyCFunctionObject;
-
-static PyObject *modifyStaticToClassMethod(PyTypeObject *type, PyObject *sm)
-{
- AutoDecRef func_ob(PyObject_GetAttr(sm, PyMagicName::func()));
- if (func_ob.isNull())
- return nullptr;
- auto func = reinterpret_cast<PyCFunctionObject *>(func_ob.object());
- auto new_func = new PyMethodDef;
- new_func->ml_name = func->m_ml->ml_name;
- new_func->ml_meth = func->m_ml->ml_meth;
- new_func->ml_flags = (func->m_ml->ml_flags & ~METH_STATIC) | METH_CLASS;
- new_func->ml_doc = func->m_ml->ml_doc;
- auto cfunc = PyCFunction_NewEx(new_func, nullptr, nullptr);
- cfunc = PyDescr_NewClassMethod(type, new_func);
- return cfunc;
-}
-
-static PyObject *createProperty(PyTypeObject *type, PyObject *getter, PyObject *setter)
-{
- bool chassprop = false;
- assert(getter != nullptr);
- if (setter == nullptr)
- setter = Py_None;
- auto ptype = &PyProperty_Type;
- if (Py_TYPE(getter) == PepStaticMethod_TypePtr) {
- ptype = PyClassPropertyTypeF();
- chassprop = true;
- getter = modifyStaticToClassMethod(type, getter);
- if (setter != Py_None)
- setter = modifyStaticToClassMethod(type, setter);
- }
- auto obtype = reinterpret_cast<PyObject *>(ptype);
- PyObject *prop = PyObject_CallFunctionObjArgs(obtype, getter, setter, nullptr);
- return prop;
-}
-
-static QStringList parseFields(const char *propstr)
-{
- /*
- * Break the string into subfields at ':' and add defaults.
- */
- QString s = QString(QLatin1String(propstr));
- auto list = s.split(QLatin1Char(':'));
- assert(list.size() == 2 || list.size() == 3);
- auto name = list[0];
- auto read = list[1];
- if (read.size() == 0)
- list[1] = name;
- if (list.size() == 2)
- return list;
- auto write = list[2];
- if (write.size() == 0) {
- list[2] = QLatin1String("set") + name;
- list[2][3] = list[2][3].toUpper();
- }
- return list;
-}
-
-static PyObject *make_snake_case(QString s, bool lower)
-{
- if (s.isNull())
- return nullptr;
- return String::getSnakeCaseName(s.toLatin1().data(), lower);
-}
-
-static bool feature_02_true_property(PyTypeObject *type, PyObject *prev_dict, int id)
-{
- /*
- * Use the property info to create true Python property objects.
- */
-
- // The empty `tp_dict` gets populated by the previous dict.
- PyObject *prop_dict = type->tp_dict;
- if (PyDict_Update(prop_dict, prev_dict) < 0)
- return false;
-
- // We then replace methods by properties.
- bool lower = (id & 0x01) != 0;
- auto props = SbkObjectType_GetPropertyStrings(type);
- if (props == nullptr || *props == nullptr)
- return true;
- for (; *props != nullptr; ++props) {
- auto propstr = *props;
- auto fields = parseFields(propstr);
- bool haveWrite = fields.size() == 3;
- PyObject *name = make_snake_case(fields[0], lower);
- PyObject *read = make_snake_case(fields[1], lower);
- PyObject *write = haveWrite ? make_snake_case(fields[2], lower) : nullptr;
- PyObject *getter = PyDict_GetItem(prev_dict, read);
- if (getter == nullptr || !(Py_TYPE(getter) == PepMethodDescr_TypePtr ||
- Py_TYPE(getter) == PepStaticMethod_TypePtr))
- continue;
- PyObject *setter = haveWrite ? PyDict_GetItem(prev_dict, write) : nullptr;
-
- AutoDecRef PyProperty(createProperty(type, getter, setter));
- if (PyProperty.isNull())
- return false;
- if (PyDict_SetItem(prop_dict, name, PyProperty) < 0)
- return false;
- if (fields[0] != fields[1] && PyDict_GetItem(prop_dict, read))
- if (PyDict_DelItem(prop_dict, read) < 0)
- return false;
- // Theoretically, we need to check for multiple signatures to be exact.
- // But we don't do so intentionally because it would be confusing.
- if (haveWrite && PyDict_GetItem(prop_dict, write))
- if (PyDict_DelItem(prop_dict, write) < 0)
- return false;
- }
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// These are a number of patches to make Python's property object better
-// suitable for us.
-// We turn `__doc__` into a lazy attribute saving signature initialization.
-//
-// There is now also a class property implementation which inherits
-// from this one.
-//
-
-static PyObject *property_doc_get(PyObject *self, void *)
-{
- auto po = reinterpret_cast<propertyobject *>(self);
-
- if (po->prop_doc != nullptr && po->prop_doc != Py_None) {
- Py_INCREF(po->prop_doc);
- return po->prop_doc;
- }
- if (po->prop_get) {
- // PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
- auto txt = PyObject_GetAttr(po->prop_get, PyMagicName::doc());
- if (txt != nullptr) {
- Py_INCREF(txt);
- po->prop_doc = txt;
- Py_INCREF(txt);
- return txt;
- }
- PyErr_Clear();
- }
- Py_RETURN_NONE;
-}
-
-static int property_doc_set(PyObject *self, PyObject *value, void *)
-{
- auto po = reinterpret_cast<propertyobject *>(self);
-
- Py_INCREF(value);
- po->prop_doc = value;
- return 0;
-}
-
-static PyGetSetDef property_getset[] = {
- // This gets added to the existing getsets
- {const_cast<char *>("__doc__"), property_doc_get, property_doc_set, nullptr, nullptr},
- {nullptr, nullptr, nullptr, nullptr, nullptr}
-};
-
-static bool patch_property_impl()
-{
- // Turn `__doc__` into a computed attribute without changing writability.
- auto gsp = property_getset;
- auto type = &PyProperty_Type;
- auto dict = type->tp_dict;
- AutoDecRef descr(PyDescr_NewGetSet(type, gsp));
- if (descr.isNull())
- return false;
- if (PyDict_SetItemString(dict, gsp->name, descr) < 0)
- return false;
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// PYSIDE-1019: Support switchable extensions
-//
-// Feature 0x04..0x40: A fake switchable option for testing
-//
-
-#define SIMILAR_FEATURE(xx) \
-static bool feature_##xx##_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id) \
-{ \
- PyObject *dict = type->tp_dict; \
- if (PyDict_Update(dict, prev_dict) < 0) \
- return false; \
- if (PyDict_SetItemString(dict, "fake_feature_" #xx, Py_None) < 0) \
- return false; \
- return true; \
-}
-
-SIMILAR_FEATURE(04)
-SIMILAR_FEATURE(08)
-SIMILAR_FEATURE(10)
-SIMILAR_FEATURE(20)
-SIMILAR_FEATURE(40)
-SIMILAR_FEATURE(80)
-
-} // namespace PySide
-} // namespace Feature
diff --git a/sources/pyside2/libpyside/globalreceiverv2.cpp b/sources/pyside2/libpyside/globalreceiverv2.cpp
deleted file mode 100644
index bfaa9ff44..000000000
--- a/sources/pyside2/libpyside/globalreceiverv2.cpp
+++ /dev/null
@@ -1,348 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "globalreceiverv2.h"
-#include "dynamicqmetaobject_p.h"
-#include "pysideweakref.h"
-#include "signalmanager.h"
-
-#include <autodecref.h>
-#include <gilstate.h>
-
-#include <QtCore/QMetaMethod>
-#include <QtCore/QSet>
-
-#define RECEIVER_DESTROYED_SLOT_NAME "__receiverDestroyed__(QObject*)"
-
-namespace
-{
- static int DESTROY_SIGNAL_ID = 0;
- static int DESTROY_SLOT_ID = 0;
-}
-
-namespace PySide
-{
-class DynamicSlotDataV2
-{
- Q_DISABLE_COPY(DynamicSlotDataV2)
- public:
- DynamicSlotDataV2(PyObject *callback, GlobalReceiverV2 *parent);
- ~DynamicSlotDataV2();
-
- int addSlot(const char *signature);
- int id(const char *signature) const;
- PyObject *callback();
- QByteArray hash() const;
- void notify();
-
- static void onCallbackDestroyed(void *data);
- static QByteArray hash(PyObject *callback);
-
-
- private:
- bool m_isMethod;
- PyObject *m_callback;
- PyObject *m_pythonSelf;
- PyObject *m_pyClass;
- PyObject *m_weakRef;
- QMap<QByteArray, int> m_signatures;
- GlobalReceiverV2 *m_parent;
- QByteArray m_hash;
-};
-
-}
-
-using namespace PySide;
-
-DynamicSlotDataV2::DynamicSlotDataV2(PyObject *callback, GlobalReceiverV2 *parent)
- : m_pythonSelf(0), m_pyClass(0), m_weakRef(0), m_parent(parent)
-{
- Shiboken::GilState gil;
-
- m_isMethod = PyMethod_Check(callback);
- if (m_isMethod) {
- //Can not store calback pointe because this will be destroyed at the end of the scope
- //To avoid increment intance reference keep the callback information
- m_callback = PyMethod_GET_FUNCTION(callback);
- m_pythonSelf = PyMethod_GET_SELF(callback);
-
- //monitor class from method lifetime
- m_weakRef = WeakRef::create(m_pythonSelf, DynamicSlotDataV2::onCallbackDestroyed, this);
-
- m_hash = QByteArray::number((qlonglong)PyObject_Hash(m_callback))
- + QByteArray::number((qlonglong)PyObject_Hash(m_pythonSelf));
-
- } else {
- m_callback = callback;
- Py_INCREF(m_callback);
-
- m_hash = QByteArray::number((qlonglong)PyObject_Hash(m_callback));
- }
-}
-
-QByteArray DynamicSlotDataV2::hash() const
-{
- return m_hash;
-}
-
-QByteArray DynamicSlotDataV2::hash(PyObject *callback)
-{
- Shiboken::GilState gil;
- if (PyMethod_Check(callback)) {
- return QByteArray::number((qlonglong)PyObject_Hash(PyMethod_GET_FUNCTION(callback)))
- + QByteArray::number((qlonglong)PyObject_Hash(PyMethod_GET_SELF(callback)));
- }
- return QByteArray::number(qlonglong(PyObject_Hash(callback)));
-}
-
-PyObject *DynamicSlotDataV2::callback()
-{
- PyObject *callback = m_callback;
-
- //create a callback based on method data
- if (m_isMethod)
- callback = PyMethod_New(m_callback, m_pythonSelf);
- else
- Py_INCREF(callback);
-
- return callback;
-}
-
-int DynamicSlotDataV2::id(const char *signature) const
-{
- const auto it = m_signatures.constFind(signature);
- return it != m_signatures.cend() ? it.value() : -1;
-}
-
-int DynamicSlotDataV2::addSlot(const char *signature)
-{
- int index = id(signature);
- if (index == -1)
- index = m_signatures[signature] = m_parent->metaObjectBuilder().addSlot(signature);
- return index;
-}
-
-void DynamicSlotDataV2::onCallbackDestroyed(void *data)
-{
- auto self = reinterpret_cast<DynamicSlotDataV2 *>(data);
- self->m_weakRef = 0;
- Py_BEGIN_ALLOW_THREADS
- delete self->m_parent;
- Py_END_ALLOW_THREADS
-}
-
-DynamicSlotDataV2::~DynamicSlotDataV2()
-{
- Shiboken::GilState gil;
-
- Py_XDECREF(m_weakRef);
- m_weakRef = 0;
-
- if (!m_isMethod)
- Py_DECREF(m_callback);
-}
-
-GlobalReceiverV2::GlobalReceiverV2(PyObject *callback, SharedMap map) :
- QObject(nullptr),
- m_metaObject("__GlobalReceiver__", &QObject::staticMetaObject),
- m_sharedMap(std::move(map))
-{
- m_data = new DynamicSlotDataV2(callback, this);
- m_metaObject.addSlot(RECEIVER_DESTROYED_SLOT_NAME);
- m_metaObject.update();
- m_refs.append(NULL);
-
-
- if (DESTROY_SIGNAL_ID == 0)
- DESTROY_SIGNAL_ID = QObject::staticMetaObject.indexOfSignal("destroyed(QObject*)");
-
- if (DESTROY_SLOT_ID == 0)
- DESTROY_SLOT_ID = m_metaObject.indexOfMethod(QMetaMethod::Slot, RECEIVER_DESTROYED_SLOT_NAME);
-
-
-}
-
-GlobalReceiverV2::~GlobalReceiverV2()
-{
- m_refs.clear();
- // Remove itself from map.
- m_sharedMap->remove(m_data->hash());
- // Suppress handling of destroyed() for objects whose last reference is contained inside
- // the callback object that will now be deleted. The reference could be a default argument,
- // a callback local variable, etc.
- // The signal has to be suppressed because it would lead to the following situation:
- // Callback is deleted, hence the last reference is decremented,
- // leading to the object being deleted, which emits destroyed(), which would try to invoke
- // the already deleted callback, and also try to delete the object again.
- DynamicSlotDataV2 *data = m_data;
- m_data = Q_NULLPTR;
- delete data;
-}
-
-int GlobalReceiverV2::addSlot(const char *signature)
-{
- return m_data->addSlot(signature);
-}
-
-void GlobalReceiverV2::incRef(const QObject *link)
-{
- if (link) {
- if (!m_refs.contains(link)) {
- bool connected;
- Py_BEGIN_ALLOW_THREADS
- connected = QMetaObject::connect(link, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
- Py_END_ALLOW_THREADS
- if (connected)
- m_refs.append(link);
- else
- Q_ASSERT(false);
- } else {
- m_refs.append(link);
- }
- } else {
- m_refs.append(NULL);
- }
-}
-
-void GlobalReceiverV2::decRef(const QObject *link)
-{
- if (m_refs.empty())
- return;
-
-
- m_refs.removeOne(link);
- if (link) {
- if (!m_refs.contains(link)) {
- bool result;
- Py_BEGIN_ALLOW_THREADS
- result = QMetaObject::disconnect(link, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
- Py_END_ALLOW_THREADS
- Q_ASSERT(result);
- if (!result)
- return;
- }
- }
-
- if (m_refs.empty())
- Py_BEGIN_ALLOW_THREADS
- delete this;
- Py_END_ALLOW_THREADS
-
-}
-
-int GlobalReceiverV2::refCount(const QObject *link) const
-{
- if (link)
- return m_refs.count(link);
-
- return m_refs.size();
-}
-
-void GlobalReceiverV2::notify()
-{
- const QSet<const QObject *> objSet(m_refs.cbegin(), m_refs.cend());
- Py_BEGIN_ALLOW_THREADS
- for (const QObject *o : objSet) {
- QMetaObject::disconnect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
- QMetaObject::connect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
- }
- Py_END_ALLOW_THREADS
-}
-
-QByteArray GlobalReceiverV2::hash() const
-{
- return m_data->hash();
-}
-
-QByteArray GlobalReceiverV2::hash(PyObject *callback)
-{
- return DynamicSlotDataV2::hash(callback);
-}
-
-const QMetaObject *GlobalReceiverV2::metaObject() const
-{
- return const_cast<GlobalReceiverV2 *>(this)->m_metaObject.update();
-}
-
-int GlobalReceiverV2::qt_metacall(QMetaObject::Call call, int id, void **args)
-{
- Shiboken::GilState gil;
- Q_ASSERT(call == QMetaObject::InvokeMetaMethod);
- Q_ASSERT(id >= QObject::staticMetaObject.methodCount());
-
- QMetaMethod slot = metaObject()->method(id);
- Q_ASSERT(slot.methodType() == QMetaMethod::Slot);
-
- if (!m_data) {
- if (id != DESTROY_SLOT_ID) {
- const QByteArray message = "PySide2 Warning: Skipping callback call "
- + slot.methodSignature() + " because the callback object is being destructed.";
- PyErr_WarnEx(PyExc_RuntimeWarning, message.constData(), 0);
- }
- return -1;
- }
-
- if (id == DESTROY_SLOT_ID) {
- if (m_refs.empty())
- return -1;
- auto obj = *reinterpret_cast<QObject **>(args[1]);
- incRef(); //keep the object live (safe ref)
- m_refs.removeAll(obj); // remove all refs to this object
- decRef(); //remove the safe ref
- } else {
- bool isShortCuit = (strstr(slot.methodSignature(), "(") == 0);
- Shiboken::AutoDecRef callback(m_data->callback());
- SignalManager::callPythonMetaMethod(slot, args, callback, isShortCuit);
- }
-
- // SignalManager::callPythonMetaMethod might have failed, in that case we have to print the
- // error so it considered "handled".
- if (PyErr_Occurred()) {
- int reclimit = Py_GetRecursionLimit();
- // Inspired by Python's errors.c: PyErr_GivenExceptionMatches() function.
- // Temporarily bump the recursion limit, so that PyErr_Print will not raise a recursion
- // error again. Don't do it when the limit is already insanely high, to avoid overflow.
- if (reclimit < (1 << 30))
- Py_SetRecursionLimit(reclimit + 5);
- PyErr_Print();
- Py_SetRecursionLimit(reclimit);
- }
-
- return -1;
-}
diff --git a/sources/pyside2/libpyside/pyside.cpp b/sources/pyside2/libpyside/pyside.cpp
deleted file mode 100644
index 4995f35dd..000000000
--- a/sources/pyside2/libpyside/pyside.cpp
+++ /dev/null
@@ -1,616 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "pyside.h"
-#include "pyside_p.h"
-#include "signalmanager.h"
-#include "pysideclassinfo_p.h"
-#include "pysideproperty_p.h"
-#include "pysideproperty.h"
-#include "pysidesignal.h"
-#include "pysidesignal_p.h"
-#include "pysidestaticstrings.h"
-#include "pysideslot_p.h"
-#include "pysidemetafunction_p.h"
-#include "pysidemetafunction.h"
-#include "dynamicqmetaobject.h"
-
-#include <autodecref.h>
-#include <basewrapper.h>
-#include <bindingmanager.h>
-#include <gilstate.h>
-#include <sbkconverter.h>
-#include <sbkstring.h>
-#include <sbkstaticstrings.h>
-#include <qapp_macro.h>
-
-#include <QtCore/QByteArray>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtCore/QSharedPointer>
-#include <QtCore/QStack>
-
-#include <algorithm>
-#include <cstring>
-#include <cctype>
-#include <typeinfo>
-
-static QStack<PySide::CleanupFunction> cleanupFunctionList;
-static void *qobjectNextAddr;
-
-QT_BEGIN_NAMESPACE
-extern bool qRegisterResourceData(int, const unsigned char *, const unsigned char *,
- const unsigned char *);
-QT_END_NAMESPACE
-
-namespace PySide
-{
-
-void init(PyObject *module)
-{
- qobjectNextAddr = 0;
- ClassInfo::init(module);
- Signal::init(module);
- Slot::init(module);
- Property::init(module);
- MetaFunction::init(module);
- // Init signal manager, so it will register some meta types used by QVariant.
- SignalManager::instance();
- initQApp();
-}
-
-static bool _setProperty(PyObject *qObj, PyObject *name, PyObject *value, bool *accept)
-{
- QByteArray propName(Shiboken::String::toCString(name));
- propName[0] = std::toupper(propName[0]);
- propName.prepend("set");
-
- Shiboken::AutoDecRef propSetter(PyObject_GetAttrString(qObj, propName.constData()));
- if (!propSetter.isNull()) {
- *accept = true;
- Shiboken::AutoDecRef args(PyTuple_Pack(1, value));
- Shiboken::AutoDecRef retval(PyObject_CallObject(propSetter, args));
- if (retval.isNull())
- return false;
- } else {
- PyErr_Clear();
- Shiboken::AutoDecRef attr(PyObject_GenericGetAttr(qObj, name));
- if (PySide::Property::checkType(attr)) {
- *accept = true;
- if (PySide::Property::setValue(reinterpret_cast<PySideProperty *>(attr.object()), qObj, value) < 0)
- return false;
- }
- }
- return true;
-}
-
-bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, PyObject *kwds, const char **blackList, unsigned int blackListSize)
-{
-
- PyObject *key, *value;
- Py_ssize_t pos = 0;
-
- while (PyDict_Next(kwds, &pos, &key, &value)) {
- if (!blackListSize || !std::binary_search(blackList, blackList + blackListSize, std::string(Shiboken::String::toCString(key)))) {
- QByteArray propName(Shiboken::String::toCString(key));
- bool accept = false;
- if (metaObj->indexOfProperty(propName) != -1) {
- if (!_setProperty(qObj, key, value, &accept))
- return false;
- } else {
- propName.append("()");
- if (metaObj->indexOfSignal(propName) != -1) {
- accept = true;
- propName.prepend('2');
- if (!PySide::Signal::connect(qObj, propName, value))
- return false;
- }
- }
- if (!accept) {
- // PYSIDE-1019: Allow any existing attribute in the constructor.
- if (!_setProperty(qObj, key, value, &accept))
- return false;
- }
- if (!accept) {
- PyErr_Format(PyExc_AttributeError, "'%s' is not a Qt property or a signal",
- propName.constData());
- return false;
- }
- }
- }
- return true;
-}
-
-void registerCleanupFunction(CleanupFunction func)
-{
- cleanupFunctionList.push(func);
-}
-
-void runCleanupFunctions()
-{
- while (!cleanupFunctionList.isEmpty()) {
- CleanupFunction f = cleanupFunctionList.pop();
- f();
- }
-}
-
-static void destructionVisitor(SbkObject *pyObj, void *data)
-{
- auto realData = reinterpret_cast<void **>(data);
- auto pyQApp = reinterpret_cast<SbkObject *>(realData[0]);
- auto pyQObjectType = reinterpret_cast<PyTypeObject *>(realData[1]);
-
- if (pyObj != pyQApp && PyObject_TypeCheck(pyObj, pyQObjectType)) {
- if (Shiboken::Object::hasOwnership(pyObj) && Shiboken::Object::isValid(pyObj, false)) {
- Shiboken::Object::setValidCpp(pyObj, false);
-
- Py_BEGIN_ALLOW_THREADS
- Shiboken::callCppDestructor<QObject>(Shiboken::Object::cppPointer(pyObj, pyQObjectType));
- Py_END_ALLOW_THREADS
- }
- }
-
-};
-
-void destroyQCoreApplication()
-{
- QCoreApplication *app = QCoreApplication::instance();
- if (!app)
- return;
- SignalManager::instance().clear();
-
- Shiboken::BindingManager &bm = Shiboken::BindingManager::instance();
- SbkObject *pyQApp = bm.retrieveWrapper(app);
- PyTypeObject *pyQObjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
- assert(pyQObjectType);
-
- void *data[2] = {pyQApp, pyQObjectType};
- bm.visitAllPyObjects(&destructionVisitor, &data);
-
- // in the end destroy app
- // Allow threads because the destructor calls
- // QThreadPool::globalInstance().waitForDone() which may deadlock on the GIL
- // if there is a worker working with python objects.
- Py_BEGIN_ALLOW_THREADS
- delete app;
- Py_END_ALLOW_THREADS
- // PYSIDE-571: make sure to create a singleton deleted qApp.
- Py_DECREF(MakeQAppWrapper(nullptr));
-}
-
-std::size_t getSizeOfQObject(SbkObjectType *type)
-{
- return retrieveTypeUserData(type)->cppObjSize;
-}
-
-void initDynamicMetaObject(SbkObjectType *type, const QMetaObject *base, std::size_t cppObjSize)
-{
- //create DynamicMetaObject based on python type
- auto userData = new TypeUserData(reinterpret_cast<PyTypeObject *>(type), base, cppObjSize);
- userData->mo.update();
- Shiboken::ObjectType::setTypeUserData(type, userData, Shiboken::callCppDestructor<TypeUserData>);
-
- //initialize staticQMetaObject property
- void *metaObjectPtr = const_cast<QMetaObject *>(userData->mo.update());
- static SbkConverter *converter = Shiboken::Conversions::getConverter("QMetaObject");
- if (!converter)
- return;
- Shiboken::AutoDecRef pyMetaObject(Shiboken::Conversions::pointerToPython(converter, metaObjectPtr));
- PyObject_SetAttr(reinterpret_cast<PyObject *>(type),
- PySide::PyName::qtStaticMetaObject(), pyMetaObject);
-}
-
-TypeUserData *retrieveTypeUserData(SbkObjectType *sbkTypeObj)
-{
- return reinterpret_cast<TypeUserData *>(Shiboken::ObjectType::getTypeUserData(sbkTypeObj));
-}
-
-TypeUserData *retrieveTypeUserData(PyTypeObject *pyTypeObj)
-{
- return retrieveTypeUserData(reinterpret_cast<SbkObjectType *>(pyTypeObj));
-}
-
-TypeUserData *retrieveTypeUserData(PyObject *pyObj)
-{
- auto pyTypeObj = PyType_Check(pyObj)
- ? reinterpret_cast<PyTypeObject *>(pyObj) : Py_TYPE(pyObj);
- return retrieveTypeUserData(pyTypeObj);
-}
-
-const QMetaObject *retrieveMetaObject(PyTypeObject *pyTypeObj)
-{
- TypeUserData *userData = retrieveTypeUserData(pyTypeObj);
- return userData ? userData->mo.update() : nullptr;
-}
-
-const QMetaObject *retrieveMetaObject(PyObject *pyObj)
-{
- auto pyTypeObj = PyType_Check(pyObj)
- ? reinterpret_cast<PyTypeObject *>(pyObj) : Py_TYPE(pyObj);
- return retrieveMetaObject(pyTypeObj);
-}
-
-void initQObjectSubType(SbkObjectType *type, PyObject *args, PyObject * /* kwds */)
-{
- PyTypeObject *qObjType = Shiboken::Conversions::getPythonTypeObject("QObject*");
- QByteArray className(Shiboken::String::toCString(PyTuple_GET_ITEM(args, 0)));
-
- PyObject *bases = PyTuple_GET_ITEM(args, 1);
- int numBases = PyTuple_GET_SIZE(bases);
-
- TypeUserData *userData = nullptr;
-
- for (int i = 0; i < numBases; ++i) {
- auto base = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(bases, i));
- if (PyType_IsSubtype(base, qObjType)) {
- userData = retrieveTypeUserData(base);
- break;
- }
- }
- if (!userData) {
- qWarning("Sub class of QObject not inheriting QObject!? Crash will happen when using %s.", className.constData());
- return;
- }
- initDynamicMetaObject(type, userData->mo.update(), userData->cppObjSize);
-}
-
-void initQApp()
-{
- /*
- * qApp will not be initialized when embedding is active.
- * That means that qApp exists already when PySide is initialized.
- * We could solve that by creating a qApp variable, but in embedded
- * mode, we also have the effect that the first assignment to qApp
- * is persistent! Therefore, we can never be sure to have created
- * qApp late enough to get the right type for the instance.
- *
- * I would appreciate very much if someone could explain or even fix
- * this issue. It exists only when a pre-existing application exists.
- */
- if (!qApp)
- Py_DECREF(MakeQAppWrapper(nullptr));
-}
-
-PyObject *getMetaDataFromQObject(QObject *cppSelf, PyObject *self, PyObject *name)
-{
- PyObject *attr = PyObject_GenericGetAttr(self, name);
- if (!Shiboken::Object::isValid(reinterpret_cast<SbkObject *>(self), false))
- return attr;
-
- if (attr && Property::checkType(attr)) {
- PyObject *value = Property::getValue(reinterpret_cast<PySideProperty *>(attr), self);
- Py_DECREF(attr);
- if (!value)
- return 0;
- attr = value;
- }
-
- //mutate native signals to signal instance type
- if (attr && PyObject_TypeCheck(attr, PySideSignalTypeF())) {
- PyObject *signal = reinterpret_cast<PyObject *>(Signal::initialize(reinterpret_cast<PySideSignal *>(attr), name, self));
- PyObject_SetAttr(self, name, reinterpret_cast<PyObject *>(signal));
- return signal;
- }
-
- //search on metaobject (avoid internal attributes started with '__')
- if (!attr) {
- const char *cname = Shiboken::String::toCString(name);
- uint cnameLen = qstrlen(cname);
- if (std::strncmp("__", cname, 2)) {
- const QMetaObject *metaObject = cppSelf->metaObject();
- //signal
- QList<QMetaMethod> signalList;
- for(int i=0, i_max = metaObject->methodCount(); i < i_max; i++) {
- QMetaMethod method = metaObject->method(i);
- const QByteArray methSig_ = method.methodSignature();
- const char *methSig = methSig_.constData();
- bool methMacth = !std::strncmp(cname, methSig, cnameLen) && methSig[cnameLen] == '(';
- if (methMacth) {
- if (method.methodType() == QMetaMethod::Signal) {
- signalList.append(method);
- } else {
- PySideMetaFunction *func = MetaFunction::newObject(cppSelf, i);
- if (func) {
- PyObject *result = reinterpret_cast<PyObject *>(func);
- PyObject_SetAttr(self, name, result);
- return result;
- }
- }
- }
- }
- if (!signalList.empty()) {
- PyObject *pySignal = reinterpret_cast<PyObject *>(Signal::newObjectFromMethod(self, signalList));
- PyObject_SetAttr(self, name, pySignal);
- return pySignal;
- }
- }
- }
- return attr;
-}
-
-bool inherits(PyTypeObject *objType, const char *class_name)
-{
- if (strcmp(objType->tp_name, class_name) == 0)
- return true;
-
- PyTypeObject *base = objType->tp_base;
- if (base == 0)
- return false;
-
- return inherits(base, class_name);
-}
-
-void *nextQObjectMemoryAddr()
-{
- return qobjectNextAddr;
-}
-
-void setNextQObjectMemoryAddr(void *addr)
-{
- qobjectNextAddr = addr;
-}
-
-} // namespace PySide
-
-// A QSharedPointer is used with a deletion function to invalidate a pointer
-// when the property value is cleared. This should be a QSharedPointer with
-// a void *pointer, but that isn't allowed
-typedef char any_t;
-Q_DECLARE_METATYPE(QSharedPointer<any_t>);
-
-namespace PySide
-{
-
-static void invalidatePtr(any_t *object)
-{
- Shiboken::GilState state;
-
- SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(object);
- if (wrapper != NULL)
- Shiboken::BindingManager::instance().releaseWrapper(wrapper);
-}
-
-static const char invalidatePropertyName[] = "_PySideInvalidatePtr";
-
-// PYSIDE-1214, when creating new wrappers for classes inheriting QObject but
-// not exposed to Python, try to find the best-matching (most-derived) Qt
-// class by walking up the meta objects.
-static const char *typeName(QObject *cppSelf)
-{
- const char *typeName = typeid(*cppSelf).name();
- if (!Shiboken::Conversions::getConverter(typeName)) {
- for (auto metaObject = cppSelf->metaObject(); metaObject; metaObject = metaObject->superClass()) {
- const char *name = metaObject->className();
- if (Shiboken::Conversions::getConverter(name)) {
- typeName = name;
- break;
- }
- }
- }
- return typeName;
-}
-
-PyObject *getWrapperForQObject(QObject *cppSelf, SbkObjectType *sbk_type)
-{
- PyObject *pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppSelf));
- if (pyOut) {
- Py_INCREF(pyOut);
- return pyOut;
- }
-
- // Setting the property will trigger an QEvent notification, which may call into
- // code that creates the wrapper so only set the property if it isn't already
- // set and check if it's created after the set call
- QVariant existing = cppSelf->property(invalidatePropertyName);
- if (!existing.isValid()) {
- QSharedPointer<any_t> shared_with_del(reinterpret_cast<any_t *>(cppSelf), invalidatePtr);
- cppSelf->setProperty(invalidatePropertyName, QVariant::fromValue(shared_with_del));
- pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppSelf));
- if (pyOut) {
- Py_INCREF(pyOut);
- return pyOut;
- }
- }
-
- pyOut = Shiboken::Object::newObject(sbk_type, cppSelf, false, false, typeName(cppSelf));
-
- return pyOut;
-}
-
-#ifdef PYSIDE_QML_SUPPORT
-static QuickRegisterItemFunction quickRegisterItem;
-
-QuickRegisterItemFunction getQuickRegisterItemFunction()
-{
- return quickRegisterItem;
-}
-
-void setQuickRegisterItemFunction(QuickRegisterItemFunction function)
-{
- quickRegisterItem = function;
-}
-#endif // PYSIDE_QML_SUPPORT
-
-// Inspired by Shiboken::String::toCString;
-QString pyStringToQString(PyObject *str) {
- if (str == Py_None)
- return QString();
-
- if (PyUnicode_Check(str)) {
- const char *unicodeBuffer = _PepUnicode_AsString(str);
- if (unicodeBuffer)
- return QString::fromUtf8(unicodeBuffer);
- }
- if (PyBytes_Check(str)) {
- const char *asciiBuffer = PyBytes_AS_STRING(str);
- if (asciiBuffer)
- return QString::fromLatin1(asciiBuffer);
- }
- return QString();
-}
-
-static const unsigned char qt_resource_name[] = {
- // qt
- 0x0,0x2,
- 0x0,0x0,0x7,0x84,
- 0x0,0x71,
- 0x0,0x74,
- // etc
- 0x0,0x3,
- 0x0,0x0,0x6c,0xa3,
- 0x0,0x65,
- 0x0,0x74,0x0,0x63,
- // qt.conf
- 0x0,0x7,
- 0x8,0x74,0xa6,0xa6,
- 0x0,0x71,
- 0x0,0x74,0x0,0x2e,0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x66
-};
-
-static const unsigned char qt_resource_struct[] = {
- // :
- 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
- // :/qt
- 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
- // :/qt/etc
- 0x0,0x0,0x0,0xa,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x3,
- // :/qt/etc/qt.conf
- 0x0,0x0,0x0,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0
-};
-
-bool registerInternalQtConf()
-{
- // Guard to ensure single registration.
-#ifdef PYSIDE_QT_CONF_PREFIX
- static bool registrationAttempted = false;
-#else
- static bool registrationAttempted = true;
-#endif
- static bool isRegistered = false;
- if (registrationAttempted)
- return isRegistered;
- registrationAttempted = true;
-
- // Support PyInstaller case when a qt.conf file might be provided next to the generated
- // PyInstaller executable.
- // This will disable the internal qt.conf which points to the PySide2 subdirectory (due to the
- // subdirectory not existing anymore).
- QString executablePath =
- QString::fromWCharArray(Py_GetProgramFullPath());
- QString appDirPath = QFileInfo(executablePath).absolutePath();
- QString maybeQtConfPath = QDir(appDirPath).filePath(QStringLiteral("qt.conf"));
- bool executableQtConfAvailable = QFileInfo::exists(maybeQtConfPath);
- maybeQtConfPath = QDir::toNativeSeparators(maybeQtConfPath);
-
- // Allow disabling the usage of the internal qt.conf. This is necessary for tests to work,
- // because tests are executed before the package is installed, and thus the Prefix specified
- // in qt.conf would point to a not yet existing location.
- bool disableInternalQtConf =
- qEnvironmentVariableIntValue("PYSIDE_DISABLE_INTERNAL_QT_CONF") > 0 ? true : false;
- if (disableInternalQtConf || executableQtConfAvailable) {
- registrationAttempted = true;
- return false;
- }
-
- PyObject *pysideModule = PyImport_ImportModule("PySide2");
- if (!pysideModule)
- return false;
-
- // Querying __file__ should be done only for modules that have finished their initialization.
- // Thus querying for the top-level PySide2 package works for us whenever any Qt-wrapped module
- // is loaded.
- PyObject *pysideInitFilePath = PyObject_GetAttr(pysideModule, Shiboken::PyMagicName::file());
- Py_DECREF(pysideModule);
- if (!pysideInitFilePath)
- return false;
-
- QString initPath = pyStringToQString(pysideInitFilePath);
- Py_DECREF(pysideInitFilePath);
- if (initPath.isEmpty())
- return false;
-
- // pysideDir - absolute path to the directory containing the init file, which also contains
- // the rest of the PySide2 modules.
- // prefixPath - absolute path to the directory containing the installed Qt (prefix).
- QDir pysideDir = QFileInfo(QDir::fromNativeSeparators(initPath)).absoluteDir();
- QString setupPrefix;
-#ifdef PYSIDE_QT_CONF_PREFIX
- setupPrefix = QStringLiteral(PYSIDE_QT_CONF_PREFIX);
-#endif
- const QString prefixPathStr = pysideDir.absoluteFilePath(setupPrefix);
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- const QByteArray prefixPath = prefixPathStr.toLocal8Bit();
-#else
- // PYSIDE-972, QSettings used by QtCore uses Latin1
- const QByteArray prefixPath = prefixPathStr.toLatin1();
-#endif
-
- // rccData needs to be static, otherwise when it goes out of scope, the Qt resource system
- // will point to invalid memory.
- static QByteArray rccData = QByteArrayLiteral("[Paths]\nPrefix = ") + prefixPath
-#ifdef Q_OS_WIN
- // LibraryExecutables needs to point to Prefix instead of ./bin because we don't
- // currently conform to the Qt default directory layout on Windows. This is necessary
- // for QtWebEngineCore to find the location of QtWebEngineProcess.exe.
- + QByteArray("\nLibraryExecutables = ") + prefixPath
-#endif
- ;
- rccData.append('\n');
-
- // The RCC data structure expects a 4-byte size value representing the actual data.
- int size = rccData.size();
-
- for (int i = 0; i < 4; ++i) {
- rccData.prepend((size & 0xff));
- size >>= 8;
- }
-
- const int version = 0x01;
- isRegistered = qRegisterResourceData(version, qt_resource_struct, qt_resource_name,
- reinterpret_cast<const unsigned char *>(
- rccData.constData()));
-
- return isRegistered;
-}
-
-
-
-} //namespace PySide
-
diff --git a/sources/pyside2/libpyside/pyside2.pc.in b/sources/pyside2/libpyside/pyside2.pc.in
deleted file mode 100644
index 0653006f3..000000000
--- a/sources/pyside2/libpyside/pyside2.pc.in
+++ /dev/null
@@ -1,15 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/include/PySide2@pyside2_SUFFIX@
-typesystemdir=@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/typesystems
-gluedir=@CMAKE_INSTALL_PREFIX@/share/PySide2@pyside2_SUFFIX@/glue
-pythonpath=@PYTHON_SITE_PACKAGES@
-
-Name: PySide2@pyside2_SUFFIX@
-Description: Support library for Python bindings of Qt5-based libraries.
-Version: @BINDING_API_VERSION_FULL@
-Libs: -L${libdir} -lpyside2@pyside2_SUFFIX@@SHIBOKEN_PYTHON_CONFIG_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
-Cflags: -I${includedir}
-Requires: shiboken6
-
diff --git a/sources/pyside2/libpyside/pysideclassinfo.cpp b/sources/pyside2/libpyside/pysideclassinfo.cpp
deleted file mode 100644
index aa47f97c1..000000000
--- a/sources/pyside2/libpyside/pysideclassinfo.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <sbkpython.h>
-
-#include "pysideclassinfo.h"
-#include "pyside_p.h"
-#include "pysideclassinfo_p.h"
-#include "dynamicqmetaobject.h"
-
-#include <shiboken.h>
-#include <signature.h>
-
-extern "C"
-{
-
-static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject *args, PyObject *kwds);
-static int classInfoTpInit(PyObject *, PyObject *, PyObject *);
-static void classInfoFree(void *);
-static PyObject *classCall(PyObject *, PyObject *, PyObject *);
-
-static PyType_Slot PySideClassInfoType_slots[] = {
- {Py_tp_call, (void *)classCall},
- {Py_tp_init, (void *)classInfoTpInit},
- {Py_tp_new, (void *)classInfoTpNew},
- {Py_tp_free, (void *)classInfoFree},
- {Py_tp_dealloc, (void *)Sbk_object_dealloc},
- {0, 0}
-};
-static PyType_Spec PySideClassInfoType_spec = {
- "2:PySide2.QtCore.ClassInfo",
- sizeof(PySideClassInfo),
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideClassInfoType_slots,
-};
-
-
-PyTypeObject *PySideClassInfoTypeF(void)
-{
- static PyTypeObject *type =
- reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideClassInfoType_spec));
- return type;
-}
-
-PyObject *classCall(PyObject *self, PyObject *args, PyObject * /* kw */)
-{
- if (!PyTuple_Check(args) || PyTuple_Size(args) != 1) {
- PyErr_Format(PyExc_TypeError,
- "The ClassInfo decorator takes exactly 1 positional argument (%zd given)",
- PyTuple_Size(args));
- return 0;
- }
-
- PySideClassInfo *data = reinterpret_cast<PySideClassInfo *>(self);
- PySideClassInfoPrivate *pData = data->d;
-
- if (pData->m_alreadyWrapped) {
- PyErr_SetString(PyExc_TypeError, "This instance of ClassInfo() was already used to wrap an object");
- return 0;
- }
-
- PyObject *klass = PyTuple_GetItem(args, 0);
- bool validClass = false;
-
- // This will sometimes segfault if you mistakenly use it on a function declaration
- if (!PyType_Check(klass)) {
- PyErr_SetString(PyExc_TypeError, "This decorator can only be used on class declarations");
- return 0;
- }
-
- PyTypeObject *klassType = reinterpret_cast<PyTypeObject *>(klass);
- if (Shiboken::ObjectType::checkType(klassType)) {
- if (auto userData = PySide::retrieveTypeUserData(klassType)) {
- PySide::MetaObjectBuilder &mo = userData->mo;
- mo.addInfo(PySide::ClassInfo::getMap(data));
- pData->m_alreadyWrapped = true;
- validClass = true;
- }
- }
-
- if (!validClass) {
- PyErr_SetString(PyExc_TypeError, "This decorator can only be used on classes that are subclasses of QObject");
- return 0;
- }
-
- Py_INCREF(klass);
- return klass;
-}
-
-static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
-{
- PySideClassInfo *me = reinterpret_cast<PySideClassInfo *>(subtype->tp_alloc(subtype, 0));
- me->d = new PySideClassInfoPrivate;
-
- me->d->m_alreadyWrapped = false;
-
- return reinterpret_cast<PyObject *>(me);
-}
-
-int classInfoTpInit(PyObject *self, PyObject *args, PyObject *kwds)
-{
- if (PyTuple_Check(args) && PyTuple_Size(args) > 0) {
- PyErr_Format(PyExc_TypeError, "ClassInfo() takes exactly 0 positional arguments (%zd given)", PyTuple_Size(args));
- return -1;
- }
-
- PySideClassInfo *data = reinterpret_cast<PySideClassInfo *>(self);
- PySideClassInfoPrivate *pData = data->d;
-
- PyObject *key;
- PyObject *value;
- Py_ssize_t pos = 0;
-
- // PyDict_Next causes a segfault if kwds is empty
- if (kwds && PyDict_Check(kwds) && PyDict_Size(kwds) > 0) {
- while (PyDict_Next(kwds, &pos, &key, &value)) {
- if (Shiboken::String::check(key) && Shiboken::String::check(value)) {
- pData->m_data[Shiboken::String::toCString(key)] = Shiboken::String::toCString(value);
- } else {
- PyErr_SetString(PyExc_TypeError, "All keys and values provided to ClassInfo() must be strings");
- return -1;
- }
- }
- }
-
- return PyErr_Occurred() ? -1 : 0;
-}
-
-void classInfoFree(void *self)
-{
- auto pySelf = reinterpret_cast<PyObject *>(self);
- auto data = reinterpret_cast<PySideClassInfo *>(self);
-
- delete data->d;
- Py_TYPE(pySelf)->tp_base->tp_free(self);
-}
-
-
-} // extern "C"
-
-
-namespace PySide { namespace ClassInfo {
-
-static const char *ClassInfo_SignatureStrings[] = {
- "PySide2.QtCore.ClassInfo(**info:typing.Dict[str,str])",
- nullptr}; // Sentinel
-
-void init(PyObject *module)
-{
- if (InitSignatureStrings(PySideClassInfoTypeF(), ClassInfo_SignatureStrings) < 0)
- return;
-
- Py_INCREF(PySideClassInfoTypeF());
- PyModule_AddObject(module, "ClassInfo", reinterpret_cast<PyObject *>(PySideClassInfoTypeF()));
-}
-
-bool checkType(PyObject *pyObj)
-{
- if (pyObj)
- return PyType_IsSubtype(Py_TYPE(pyObj), PySideClassInfoTypeF());
- return false;
-}
-
-QMap<QByteArray, QByteArray> getMap(PySideClassInfo *obj)
-{
- return obj->d->m_data;
-}
-
-} //namespace Property
-} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysidemetafunction.cpp b/sources/pyside2/libpyside/pysidemetafunction.cpp
deleted file mode 100644
index 96ed953b6..000000000
--- a/sources/pyside2/libpyside/pysidemetafunction.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "pysidemetafunction.h"
-#include "pysidemetafunction_p.h"
-
-#include <shiboken.h>
-#include <signature.h>
-
-#include <QtCore/QMetaMethod>
-
-extern "C"
-{
-
-struct PySideMetaFunctionPrivate
-{
- QObject *qobject;
- int methodIndex;
-};
-
-//methods
-static void functionFree(void *);
-static PyObject *functionCall(PyObject *, PyObject *, PyObject *);
-
-static PyType_Slot PySideMetaFunctionType_slots[] = {
- {Py_tp_call, (void *)functionCall},
- {Py_tp_new, (void *)PyType_GenericNew},
- {Py_tp_free, (void *)functionFree},
- {Py_tp_dealloc, (void *)Sbk_object_dealloc},
- {0, 0}
-};
-static PyType_Spec PySideMetaFunctionType_spec = {
- "2:PySide2.QtCore.MetaFunction",
- sizeof(PySideMetaFunction),
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideMetaFunctionType_slots,
-};
-
-
-PyTypeObject *PySideMetaFunctionTypeF(void)
-{
- static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
- SbkType_FromSpec(&PySideMetaFunctionType_spec));
- return type;
-}
-
-void functionFree(void *self)
-{
- PySideMetaFunction *function = reinterpret_cast<PySideMetaFunction *>(self);
- delete function->d;
-}
-
-PyObject *functionCall(PyObject *self, PyObject *args, PyObject * /* kw */)
-{
- PySideMetaFunction *function = reinterpret_cast<PySideMetaFunction *>(self);
-
- PyObject *retVal;
- if (!PySide::MetaFunction::call(function->d->qobject, function->d->methodIndex, args, &retVal))
- return 0;
- return retVal;
-}
-
-} // extern "C"
-
-namespace PySide { namespace MetaFunction {
-
-static const char *MetaFunction_SignatureStrings[] = {
- "PySide2.QtCore.MetaFunction.__call__(*args:typing.Any)->typing.Any",
- nullptr}; // Sentinel
-
-void init(PyObject *module)
-{
- if (InitSignatureStrings(PySideMetaFunctionTypeF(), MetaFunction_SignatureStrings) < 0)
- return;
-
- Py_INCREF(PySideMetaFunctionTypeF());
- PyModule_AddObject(module, "MetaFunction", reinterpret_cast<PyObject *>(PySideMetaFunctionTypeF()));
-}
-
-PySideMetaFunction *newObject(QObject *source, int methodIndex)
-{
- if (methodIndex >= source->metaObject()->methodCount())
- return 0;
-
- QMetaMethod method = source->metaObject()->method(methodIndex);
- if ((method.methodType() == QMetaMethod::Slot) ||
- (method.methodType() == QMetaMethod::Method)) {
- PySideMetaFunction *function = PyObject_New(PySideMetaFunction, PySideMetaFunctionTypeF());
- function->d = new PySideMetaFunctionPrivate();
- function->d->qobject = source;
- function->d->methodIndex = methodIndex;
- return function;
- }
- return 0;
-}
-
-bool call(QObject *self, int methodIndex, PyObject *args, PyObject **retVal)
-{
-
- QMetaMethod method = self->metaObject()->method(methodIndex);
- QList<QByteArray> argTypes = method.parameterTypes();
-
- // args given plus return type
- Shiboken::AutoDecRef sequence(PySequence_Fast(args, 0));
- int numArgs = PySequence_Fast_GET_SIZE(sequence.object()) + 1;
-
- if (numArgs - 1 > argTypes.count()) {
- PyErr_Format(PyExc_TypeError, "%s only accepts %d argument(s), %d given!",
- method.methodSignature().constData(),
- argTypes.count(), numArgs - 1);
- return false;
- }
-
- if (numArgs - 1 < argTypes.count()) {
- PyErr_Format(PyExc_TypeError, "%s needs %d argument(s), %d given!",
- method.methodSignature().constData(),
- argTypes.count(), numArgs - 1);
- return false;
- }
-
- QVariant *methValues = new QVariant[numArgs];
- void **methArgs = new void *[numArgs];
-
- // Prepare room for return type
- const char *returnType = method.typeName();
- if (returnType && std::strcmp("void", returnType))
- argTypes.prepend(returnType);
- else
- argTypes.prepend(QByteArray());
-
- int i;
- for (i = 0; i < numArgs; ++i) {
- const QByteArray &typeName = argTypes.at(i);
- // This must happen only when the method hasn't return type.
- if (typeName.isEmpty()) {
- methArgs[i] = 0;
- continue;
- }
-
- Shiboken::Conversions::SpecificConverter converter(typeName);
- if (converter) {
- QMetaType metaType = QMetaType::fromName(typeName);
- if (!Shiboken::Conversions::pythonTypeIsObjectType(converter)) {
- if (!metaType.isValid()) {
- PyErr_Format(PyExc_TypeError, "Value types used on meta functions (including signals) need to be "
- "registered on meta type: %s", typeName.data());
- break;
- }
- methValues[i] = QVariant(metaType);
- }
- methArgs[i] = methValues[i].data();
- if (i == 0) // Don't do this for return type
- continue;
- if (metaType.id() == QMetaType::QString) {
- QString tmp;
- converter.toCpp(PySequence_Fast_GET_ITEM(sequence.object(), i - 1), &tmp);
- methValues[i] = tmp;
- } else {
- converter.toCpp(PySequence_Fast_GET_ITEM(sequence.object(), i - 1), methArgs[i]);
- }
- } else {
- PyErr_Format(PyExc_TypeError, "Unknown type used to call meta function (that may be a signal): %s", argTypes[i].constData());
- break;
- }
- }
-
- bool ok = i == numArgs;
- if (ok) {
- Py_BEGIN_ALLOW_THREADS
- QMetaObject::metacall(self, QMetaObject::InvokeMetaMethod, method.methodIndex(), methArgs);
- Py_END_ALLOW_THREADS
-
- if (retVal) {
- if (methArgs[0]) {
- static SbkConverter *qVariantTypeConverter = Shiboken::Conversions::getConverter("QVariant");
- Q_ASSERT(qVariantTypeConverter);
- *retVal = Shiboken::Conversions::copyToPython(qVariantTypeConverter, &methValues[0]);
- } else {
- *retVal = Py_None;
- Py_INCREF(*retVal);
- }
- }
- }
-
- delete[] methArgs;
- delete[] methValues;
-
- return ok;
-}
-
-
-} //namespace MetaFunction
-} //namespace PySide
-
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
deleted file mode 100644
index 30cfabf86..000000000
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ /dev/null
@@ -1,634 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <sbkpython.h>
-#include "pysideproperty.h"
-#include "pysideproperty_p.h"
-#include "dynamicqmetaobject_p.h"
-#include "pysidesignal.h"
-#include "pysidesignal_p.h"
-
-#include <shiboken.h>
-#include <signature.h>
-
-using namespace Shiboken;
-
-extern "C"
-{
-
-static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject *args, PyObject *kwds);
-static int qpropertyTpInit(PyObject *, PyObject *, PyObject *);
-static void qpropertyDeAlloc(PyObject *self);
-
-//methods
-static PyObject *qPropertyGetter(PyObject *, PyObject *);
-static PyObject *qPropertySetter(PyObject *, PyObject *);
-static PyObject *qPropertyResetter(PyObject *, PyObject *);
-static PyObject *qPropertyDeleter(PyObject *, PyObject *);
-static PyObject *qPropertyCall(PyObject *, PyObject *, PyObject *);
-static int qpropertyTraverse(PyObject *self, visitproc visit, void *arg);
-static int qpropertyClear(PyObject *self);
-
-// Attributes
-static PyObject *qPropertyDocGet(PyObject *, void *);
-static int qPropertyDocSet(PyObject *, PyObject *, void *);
-static PyObject *qProperty_fget(PyObject *, void *);
-static PyObject *qProperty_fset(PyObject *, void *);
-static PyObject *qProperty_freset(PyObject *, void *);
-static PyObject *qProperty_fdel(PyObject *, void *);
-
-static PyMethodDef PySidePropertyMethods[] = {
- {"getter", (PyCFunction)qPropertyGetter, METH_O, 0},
- {"setter", (PyCFunction)qPropertySetter, METH_O, 0},
- {"resetter", (PyCFunction)qPropertyResetter, METH_O, 0},
- {"deleter", (PyCFunction)qPropertyDeleter, METH_O, 0},
- // Synonyms from Qt
- {"read", (PyCFunction)qPropertyGetter, METH_O, 0},
- {"write", (PyCFunction)qPropertySetter, METH_O, 0},
- {0, 0, 0, 0}
-};
-
-static PyGetSetDef PySidePropertyType_getset[] = {
- // Note: we could not use `PyMemberDef` like Python's properties,
- // because of the indirection of PySidePropertyPrivate.
- {const_cast<char *>("fget"), qProperty_fget, nullptr, nullptr, nullptr},
- {const_cast<char *>("fset"), qProperty_fset, nullptr, nullptr, nullptr},
- {const_cast<char *>("freset"), qProperty_freset, nullptr, nullptr, nullptr},
- {const_cast<char *>("fdel"), qProperty_fdel, nullptr, nullptr, nullptr},
- {const_cast<char *>("__doc__"), qPropertyDocGet, qPropertyDocSet, nullptr, nullptr},
- {nullptr, nullptr, nullptr, nullptr, nullptr}
-};
-
-static PyType_Slot PySidePropertyType_slots[] = {
- {Py_tp_dealloc, (void *)qpropertyDeAlloc},
- {Py_tp_call, (void *)qPropertyCall},
- {Py_tp_traverse, (void *)qpropertyTraverse},
- {Py_tp_clear, (void *)qpropertyClear},
- {Py_tp_methods, (void *)PySidePropertyMethods},
- {Py_tp_init, (void *)qpropertyTpInit},
- {Py_tp_new, (void *)qpropertyTpNew},
- {Py_tp_getset, PySidePropertyType_getset},
- {0, 0}
-};
-// Dotted modulename is crucial for SbkType_FromSpec to work. Is this name right?
-static PyType_Spec PySidePropertyType_spec = {
- "2:PySide2.QtCore.Property",
- sizeof(PySideProperty),
- 0,
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE,
- PySidePropertyType_slots,
-};
-
-
-PyTypeObject *PySidePropertyTypeF(void)
-{
- static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
- SbkType_FromSpec(&PySidePropertyType_spec));
- return type;
-}
-
-static void qpropertyMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call, void **args)
-{
- Shiboken::Conversions::SpecificConverter converter(pp->d->typeName);
- Q_ASSERT(converter);
-
- QByteArray type(pp->d->typeName);
-
- switch(call) {
- case QMetaObject::ReadProperty:
- {
- Shiboken::GilState gil;
- PyObject *value = PySide::Property::getValue(pp, self);
- if (value) {
- converter.toCpp(value, args[0]);
- Py_DECREF(value);
- }
- break;
- }
-
- case QMetaObject::WriteProperty:
- {
- Shiboken::GilState gil;
- Shiboken::AutoDecRef value(converter.toPython(args[0]));
- PySide::Property::setValue(pp, self, value);
- break;
- }
-
- case QMetaObject::ResetProperty:
- {
- Shiboken::GilState gil;
- PySide::Property::reset(pp, self);
- break;
- }
-
- // just to avoid gcc warnings
- case QMetaObject::BindableProperty:
- case QMetaObject::InvokeMetaMethod:
- case QMetaObject::CreateInstance:
- case QMetaObject::IndexOfMethod:
- case QMetaObject::RegisterPropertyMetaType:
- case QMetaObject::RegisterMethodArgumentMetaType:
- break;
- }
-}
-
-
-static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
-{
- PySideProperty *me = reinterpret_cast<PySideProperty *>(subtype->tp_alloc(subtype, 0));
- me->d = new PySidePropertyPrivate;
- return reinterpret_cast<PyObject *>(me);
-}
-
-static int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
-{
- PyObject *type = nullptr;
- auto data = reinterpret_cast<PySideProperty *>(self);
- PySidePropertyPrivate *pData = data->d;
- pData->metaCallHandler = &qpropertyMetaCall;
-
- static const char *kwlist[] = {"type", "fget", "fset", "freset", "fdel", "doc", "notify",
- "designable", "scriptable", "stored",
- "user", "constant", "final", 0};
- char *doc{};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- "O|OOOOsObbbbbb:QtCore.Property",
- const_cast<char **>(kwlist),
- /*OO*/ &type, &(pData->fget),
- /*OOO*/ &(pData->fset), &(pData->freset), &(pData->fdel),
- /*s*/ &doc,
- /*O*/ &(pData->notify),
- /*bbb*/ &(pData->designable), &(pData->scriptable), &(pData->stored),
- /*bbb*/ &(pData->user), &(pData->constant), &(pData->final))) {
- return -1;
- }
-
- // PYSIDE-1019: Fetching the default `__doc__` from fget would fail for inherited functions
- // because we don't initialize the mro with signatures (and we will not!).
- // But it is efficient and in-time to do that on demand in qPropertyDocGet.
- pData->getter_doc = false;
- if (doc)
- pData->doc = doc;
- else
- pData->doc.clear();
-
- pData->typeName = PySide::Signal::getTypeName(type);
-
- if (pData->typeName.isEmpty())
- PyErr_SetString(PyExc_TypeError, "Invalid property type or type name.");
- else if (pData->constant && (pData->fset || pData->notify))
- PyErr_SetString(PyExc_TypeError, "A constant property cannot have a WRITE method or a NOTIFY signal.");
-
- if (!PyErr_Occurred()) {
- Py_XINCREF(pData->fget);
- Py_XINCREF(pData->fset);
- Py_XINCREF(pData->freset);
- Py_XINCREF(pData->fdel);
- Py_XINCREF(pData->notify);
- return 0;
- }
- pData->fget = nullptr;
- pData->fset = nullptr;
- pData->freset = nullptr;
- pData->fdel = nullptr;
- pData->notify = nullptr;
- return -1;
-}
-
-static void qpropertyDeAlloc(PyObject *self)
-{
- qpropertyClear(self);
- if (PepRuntime_38_flag) {
- // PYSIDE-939: Handling references correctly.
- // This was not needed before Python 3.8 (Python issue 35810)
- Py_DECREF(Py_TYPE(self));
- }
- Py_TYPE(self)->tp_free(self);
-}
-
-static PyObject *
-_property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *reset, PyObject *del)
-{
- PySideProperty *pold = reinterpret_cast<PySideProperty *>(old);
- PySidePropertyPrivate *pData = pold->d;
-
- AutoDecRef type(PyObject_Type(old));
- QByteArray doc{};
- if (type.isNull())
- return nullptr;
-
- if (get == nullptr || get == Py_None) {
- Py_XDECREF(get);
- get = pData->fget ? pData->fget : Py_None;
- }
- if (set == nullptr || set == Py_None) {
- Py_XDECREF(set);
- set = pData->fset ? pData->fset : Py_None;
- }
- if (reset == nullptr || reset == Py_None) {
- Py_XDECREF(reset);
- reset = pData->freset ? pData->freset : Py_None;
- }
- if (del == nullptr || del == Py_None) {
- Py_XDECREF(del);
- del = pData->fdel ? pData->fdel : Py_None;
- }
- if (pData->getter_doc && get != Py_None) {
- /* make _init use __doc__ from getter */
- doc = "";
- }
- else {
- doc = !pData->doc.isEmpty() ? pData->doc : "";
- }
- auto notify = pData->notify ? pData->notify : Py_None;
-
- PyObject *typeName = String::fromCString(pData->typeName);
- PyObject *obNew = PyObject_CallFunction(type, const_cast<char *>("OOOOOsO" "bbb" "bbb"),
- typeName, get, set, reset, del, doc.data(), notify,
- pData->designable, pData->scriptable, pData->stored,
- pData->user, pData->constant, pData->final);
-
- return obNew;
-}
-
-static PyObject *qPropertyGetter(PyObject *self, PyObject *getter)
-{
- return _property_copy(self, getter, nullptr, nullptr, nullptr);
-}
-
-static PyObject *qPropertySetter(PyObject *self, PyObject *setter)
-{
- return _property_copy(self, nullptr, setter, nullptr, nullptr);
-}
-
-static PyObject *qPropertyResetter(PyObject *self, PyObject *resetter)
-{
- return _property_copy(self, nullptr, nullptr, resetter, nullptr);
-}
-
-static PyObject *qPropertyDeleter(PyObject *self, PyObject *deleter)
-{
- return _property_copy(self, nullptr, nullptr, nullptr, deleter);
-}
-
-static PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
-{
- PyObject *getter = PyTuple_GetItem(args, 0);
- return _property_copy(self, getter, nullptr, nullptr, nullptr);
-}
-
-// PYSIDE-1019: Provide the same getters as Pythons `PyProperty`.
-
-static PyObject *qProperty_fget(PyObject *self, void *)
-{
- auto func = reinterpret_cast<PySideProperty *>(self)->d->fget;
- auto ret = func != nullptr ? func : Py_None;
- Py_INCREF(ret);
- return ret;
-}
-
-static PyObject *qProperty_fset(PyObject *self, void *)
-{
- auto func = reinterpret_cast<PySideProperty *>(self)->d->fset;
- auto ret = func != nullptr ? func : Py_None;
- Py_INCREF(ret);
- return ret;
-}
-
-static PyObject *qProperty_freset(PyObject *self, void *)
-{
- auto func = reinterpret_cast<PySideProperty *>(self)->d->freset;
- auto ret = func != nullptr ? func : Py_None;
- Py_INCREF(ret);
- return ret;
-}
-
-static PyObject *qProperty_fdel(PyObject *self, void *)
-{
- auto func = reinterpret_cast<PySideProperty *>(self)->d->fdel;
- auto ret = func != nullptr ? func : Py_None;
- Py_INCREF(ret);
- return ret;
-}
-
-static PyObject *qPropertyDocGet(PyObject *self, void *)
-{
- auto data = reinterpret_cast<PySideProperty *>(self);
- PySidePropertyPrivate *pData = data->d;
-
- QByteArray doc(pData->doc);
- if (!doc.isEmpty())
- return PyUnicode_FromString(doc);
- if (pData->fget != nullptr) {
- // PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
- AutoDecRef get_doc(PyObject_GetAttr(pData->fget, PyMagicName::doc()));
- if (!get_doc.isNull()) {
- pData->doc = String::toCString(get_doc);
- pData->getter_doc = true;
- if (Py_TYPE(self) == PySidePropertyTypeF())
- return qPropertyDocGet(self, nullptr);
- /*
- * If this is a property subclass, put __doc__ in dict of the
- * subclass instance instead, otherwise it gets shadowed by
- * __doc__ in the class's dict.
- */
- auto get_doc_obj = get_doc.object();
- int err = PyObject_SetAttr(self, PyMagicName::doc(), get_doc);
- return err < 0 ? nullptr : (Py_INCREF(get_doc_obj), get_doc_obj);
- }
- PyErr_Clear();
- }
- Py_RETURN_NONE;
-}
-
-static int qPropertyDocSet(PyObject *self, PyObject *value, void *)
-{
- auto data = reinterpret_cast<PySideProperty *>(self);
- PySidePropertyPrivate *pData = data->d;
-
- if (String::check(value)) {
- pData->doc = String::toCString(value);
- return 0;
- }
- PyErr_SetString(PyExc_TypeError, "String argument expected.");
- return -1;
-}
-
-static int qpropertyTraverse(PyObject *self, visitproc visit, void *arg)
-{
- PySidePropertyPrivate *data = reinterpret_cast<PySideProperty *>(self)->d;
- if (!data)
- return 0;
-
- Py_VISIT(data->fget);
- Py_VISIT(data->fset);
- Py_VISIT(data->freset);
- Py_VISIT(data->fdel);
- Py_VISIT(data->notify);
- return 0;
-}
-
-static int qpropertyClear(PyObject *self)
-{
- PySidePropertyPrivate *data = reinterpret_cast<PySideProperty *>(self)->d;
- if (!data)
- return 0;
-
- Py_CLEAR(data->fget);
- Py_CLEAR(data->fset);
- Py_CLEAR(data->freset);
- Py_CLEAR(data->fdel);
- Py_CLEAR(data->notify);
-
-
- delete data;
- reinterpret_cast<PySideProperty *>(self)->d = nullptr;
- return 0;
-}
-
-} // extern "C"
-
-namespace {
-
-static PyObject *getFromType(PyTypeObject *type, PyObject *name)
-{
- PyObject *attr = nullptr;
- attr = PyDict_GetItem(type->tp_dict, name);
- if (!attr) {
- PyObject *bases = type->tp_bases;
- int size = PyTuple_GET_SIZE(bases);
- for(int i=0; i < size; i++) {
- PyObject *base = PyTuple_GET_ITEM(bases, i);
- attr = getFromType(reinterpret_cast<PyTypeObject *>(base), name);
- if (attr)
- return attr;
- }
- }
- return attr;
-}
-
-} //namespace
-
-
-namespace PySide { namespace Property {
-
-static const char *Property_SignatureStrings[] = {
- "PySide2.QtCore.Property(self,type:type,fget:typing.Callable=None,fset:typing.Callable=None,"
- "freset:typing.Callable=None,fdel:typing.Callable=None,doc:str=None,"
- "notify:typing.Callable=None,designable:bool=True,scriptable:bool=True,"
- "stored:bool=True,user:bool=False,constant:bool=False,final:bool=False)"
- "->PySide2.QtCore.Property",
- "PySide2.QtCore.Property.deleter(self,func:typing.Callable)",
- "PySide2.QtCore.Property.fdel(self)->typing.Callable",
- "PySide2.QtCore.Property.fget(self)->typing.Callable",
- "PySide2.QtCore.Property.freset(self)->typing.Callable",
- "PySide2.QtCore.Property.fset(self)->typing.Callable",
- "PySide2.QtCore.Property.getter(self,func:typing.Callable)",
- "PySide2.QtCore.Property.read(self,func:typing.Callable)",
- "PySide2.QtCore.Property.setter(self,func:typing.Callable)",
- "PySide2.QtCore.Property.write(self,func:typing.Callable)",
- nullptr}; // Sentinel
-
-void init(PyObject *module)
-{
- if (InitSignatureStrings(PySidePropertyTypeF(), Property_SignatureStrings) < 0)
- return;
-
- Py_INCREF(PySidePropertyTypeF());
- PyModule_AddObject(module, "Property", reinterpret_cast<PyObject *>(PySidePropertyTypeF()));
-}
-
-bool checkType(PyObject *pyObj)
-{
- if (pyObj) {
- return PyType_IsSubtype(Py_TYPE(pyObj), PySidePropertyTypeF());
- }
- return false;
-}
-
-int setValue(PySideProperty *self, PyObject *source, PyObject *value)
-{
- PyObject *fset = self->d->fset;
- if (fset && value) {
- Shiboken::AutoDecRef args(PyTuple_New(2));
- PyTuple_SET_ITEM(args, 0, source);
- PyTuple_SET_ITEM(args, 1, value);
- Py_INCREF(source);
- Py_INCREF(value);
- Shiboken::AutoDecRef result(PyObject_CallObject(fset, args));
- return (result.isNull() ? -1 : 0);
- }
- PyObject *fdel = self->d->fdel;
- if (fdel) {
- Shiboken::AutoDecRef args(PyTuple_New(1));
- PyTuple_SET_ITEM(args, 0, source);
- Py_INCREF(source);
- Shiboken::AutoDecRef result(PyObject_CallObject(fdel, args));
- return (result.isNull() ? -1 : 0);
- }
- PyErr_SetString(PyExc_AttributeError, "Attibute read only");
- return -1;
-}
-
-PyObject *getValue(PySideProperty *self, PyObject *source)
-{
- PyObject *fget = self->d->fget;
- if (fget) {
- Shiboken::AutoDecRef args(PyTuple_New(1));
- Py_INCREF(source);
- PyTuple_SET_ITEM(args, 0, source);
- return PyObject_CallObject(fget, args);
- }
- return 0;
-}
-
-int reset(PySideProperty *self, PyObject *source)
-{
- PyObject *freset = self->d->freset;
- if (freset) {
- Shiboken::AutoDecRef args(PyTuple_New(1));
- Py_INCREF(source);
- PyTuple_SET_ITEM(args, 0, source);
- Shiboken::AutoDecRef result(PyObject_CallObject(freset, args));
- return (result.isNull() ? -1 : 0);
- }
- return -1;
-}
-
-const char *getTypeName(const PySideProperty *self)
-{
- return self->d->typeName;
-}
-
-PySideProperty *getObject(PyObject *source, PyObject *name)
-{
- PyObject *attr = nullptr;
-
- attr = getFromType(Py_TYPE(source), name);
- if (attr && checkType(attr)) {
- Py_INCREF(attr);
- return reinterpret_cast<PySideProperty *>(attr);
- }
-
- if (!attr)
- PyErr_Clear(); //Clear possible error caused by PyObject_GenericGetAttr
-
- return 0;
-}
-
-bool isReadable(const PySideProperty * /* self */)
-{
- return true;
-}
-
-bool isWritable(const PySideProperty *self)
-{
- return (self->d->fset != 0);
-}
-
-bool hasReset(const PySideProperty *self)
-{
- return (self->d->freset != 0);
-}
-
-bool isDesignable(const PySideProperty *self)
-{
- return self->d->designable;
-}
-
-bool isScriptable(const PySideProperty *self)
-{
- return self->d->scriptable;
-}
-
-bool isStored(const PySideProperty *self)
-{
- return self->d->stored;
-}
-
-bool isUser(const PySideProperty *self)
-{
- return self->d->user;
-}
-
-bool isConstant(const PySideProperty *self)
-{
- return self->d->constant;
-}
-
-bool isFinal(const PySideProperty *self)
-{
- return self->d->final;
-}
-
-const char *getNotifyName(PySideProperty *self)
-{
- if (self->d->notifySignature.isEmpty()) {
- PyObject *str = PyObject_Str(self->d->notify);
- self->d->notifySignature = Shiboken::String::toCString(str);
- Py_DECREF(str);
- }
-
- return self->d->notifySignature.isEmpty()
- ? nullptr : self->d->notifySignature.constData();
-}
-
-void setMetaCallHandler(PySideProperty *self, MetaCallHandler handler)
-{
- self->d->metaCallHandler = handler;
-}
-
-void setTypeName(PySideProperty *self, const char *typeName)
-{
- self->d->typeName = typeName;
-}
-
-void setUserData(PySideProperty *self, void *data)
-{
- self->d->userData = data;
-}
-
-void *userData(PySideProperty *self)
-{
- return self->d->userData;
-}
-
-} //namespace Property
-} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
deleted file mode 100644
index f3fb4e06d..000000000
--- a/sources/pyside2/libpyside/pysidesignal.cpp
+++ /dev/null
@@ -1,1040 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <sbkpython.h>
-#include "pysidesignal.h"
-#include "pysidesignal_p.h"
-#include "pysidestaticstrings.h"
-#include "signalmanager.h"
-
-#include <shiboken.h>
-
-#include <QtCore/QObject>
-#include <QtCore/QMetaMethod>
-#include <QtCore/QMetaObject>
-#include <signature.h>
-
-#include <algorithm>
-#include <utility>
-
-#define QT_SIGNAL_SENTINEL '2'
-
-namespace PySide {
-namespace Signal {
- //aux
- class SignalSignature {
- public:
- SignalSignature() = default;
- explicit SignalSignature(QByteArray parameterTypes) :
- m_parameterTypes(std::move(parameterTypes)) {}
- explicit SignalSignature(QByteArray parameterTypes, QMetaMethod::Attributes attributes) :
- m_parameterTypes(std::move(parameterTypes)),
- m_attributes(attributes) {}
-
- QByteArray m_parameterTypes;
- QMetaMethod::Attributes m_attributes = QMetaMethod::Compatibility;
- };
-
- static QByteArray buildSignature(const QByteArray &, const QByteArray &);
- static void appendSignature(PySideSignal *, const SignalSignature &);
- static void instanceInitialize(PySideSignalInstance *, PyObject *, PySideSignal *, PyObject *, int);
- static QByteArray parseSignature(PyObject *);
- static PyObject *buildQtCompatible(const QByteArray &);
-}
-}
-
-extern "C"
-{
-
-// Signal methods
-static int signalTpInit(PyObject *, PyObject *, PyObject *);
-static void signalFree(void *);
-static void signalInstanceFree(void *);
-static PyObject *signalGetItem(PyObject *self, PyObject *key);
-static PyObject *signalToString(PyObject *self);
-static PyObject *signalDescrGet(PyObject *self, PyObject *obj, PyObject *type);
-
-// Signal Instance methods
-static PyObject *signalInstanceConnect(PyObject *, PyObject *, PyObject *);
-static PyObject *signalInstanceDisconnect(PyObject *, PyObject *);
-static PyObject *signalInstanceEmit(PyObject *, PyObject *);
-static PyObject *signalInstanceGetItem(PyObject *, PyObject *);
-
-static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw);
-static PyObject *signalCall(PyObject *, PyObject *, PyObject *);
-
-static PyObject *metaSignalCheck(PyObject *, PyObject *);
-
-
-static PyMethodDef MetaSignal_methods[] = {
- {"__instancecheck__", (PyCFunction)metaSignalCheck, METH_O|METH_STATIC, NULL},
- {0, 0, 0, 0}
-};
-
-static PyType_Slot PySideMetaSignalType_slots[] = {
- {Py_tp_methods, reinterpret_cast<void *>(MetaSignal_methods)},
- {Py_tp_base, reinterpret_cast<void *>(&PyType_Type)},
- {Py_tp_free, reinterpret_cast<void *>(PyObject_GC_Del)},
- {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
- {0, 0}
-};
-static PyType_Spec PySideMetaSignalType_spec = {
- "2:PySide2.QtCore.MetaSignal",
- 0,
- // sizeof(PyHeapTypeObject) is filled in by SbkType_FromSpecWithBases
- // which calls PyType_Ready which calls inherit_special.
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideMetaSignalType_slots,
-};
-
-
-static PyTypeObject *PySideMetaSignalTypeF(void)
-{
- static PyTypeObject *type = nullptr;
- if (!type) {
- PyObject *bases = Py_BuildValue("(O)", &PyType_Type);
- type = (PyTypeObject *)SbkType_FromSpecWithBases(&PySideMetaSignalType_spec, bases);
- Py_XDECREF(bases);
- }
- return type;
-}
-
-static PyType_Slot PySideSignalType_slots[] = {
- {Py_mp_subscript, reinterpret_cast<void *>(signalGetItem)},
- {Py_tp_descr_get, reinterpret_cast<void *>(signalDescrGet)},
- {Py_tp_call, reinterpret_cast<void *>(signalCall)},
- {Py_tp_str, reinterpret_cast<void *>(signalToString)},
- {Py_tp_init, reinterpret_cast<void *>(signalTpInit)},
- {Py_tp_new, reinterpret_cast<void *>(PyType_GenericNew)},
- {Py_tp_free, reinterpret_cast<void *>(signalFree)},
- {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
- {0, 0}
-};
-static PyType_Spec PySideSignalType_spec = {
- "2:PySide2.QtCore.Signal",
- sizeof(PySideSignal),
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideSignalType_slots,
-};
-
-
-PyTypeObject *PySideSignalTypeF(void)
-{
- static PyTypeObject *type = nullptr;
- if (!type) {
- type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalType_spec));
- PyTypeObject *hold = Py_TYPE(type);
- Py_TYPE(type) = PySideMetaSignalTypeF();
- Py_INCREF(Py_TYPE(type));
- Py_DECREF(hold);
- }
- return type;
-}
-
-static PyMethodDef SignalInstance_methods[] = {
- {"connect", (PyCFunction)signalInstanceConnect, METH_VARARGS|METH_KEYWORDS, 0},
- {"disconnect", signalInstanceDisconnect, METH_VARARGS, 0},
- {"emit", signalInstanceEmit, METH_VARARGS, 0},
- {0, 0, 0, 0} /* Sentinel */
-};
-
-static PyType_Slot PySideSignalInstanceType_slots[] = {
- {Py_mp_subscript, reinterpret_cast<void *>(signalInstanceGetItem)},
- {Py_tp_call, reinterpret_cast<void *>(signalInstanceCall)},
- {Py_tp_methods, reinterpret_cast<void *>(SignalInstance_methods)},
- {Py_tp_new, reinterpret_cast<void *>(PyType_GenericNew)},
- {Py_tp_free, reinterpret_cast<void *>(signalInstanceFree)},
- {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
- {0, 0}
-};
-static PyType_Spec PySideSignalInstanceType_spec = {
- "2:PySide2.QtCore.SignalInstance",
- sizeof(PySideSignalInstance),
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideSignalInstanceType_slots,
-};
-
-
-PyTypeObject *PySideSignalInstanceTypeF(void)
-{
- static PyTypeObject *type =
- reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalInstanceType_spec));
- return type;
-}
-
-static int signalTpInit(PyObject *self, PyObject *args, PyObject *kwds)
-{
- static PyObject *emptyTuple = nullptr;
- static const char *kwlist[] = {"name", "arguments", nullptr};
- char *argName = nullptr;
- PyObject *argArguments = nullptr;
-
- if (emptyTuple == 0)
- emptyTuple = PyTuple_New(0);
-
- if (!PyArg_ParseTupleAndKeywords(emptyTuple, kwds,
- "|sO:QtCore.Signal", const_cast<char **>(kwlist), &argName, &argArguments))
- return -1;
-
- bool tupledArgs = false;
- PySideSignal *data = reinterpret_cast<PySideSignal *>(self);
- if (!data->data)
- data->data = new PySideSignalData;
- if (argName)
- data->data->signalName = argName;
-
- data->data->signalArguments = new QByteArrayList();
- if (argArguments && PySequence_Check(argArguments)) {
- Py_ssize_t argument_size = PySequence_Size(argArguments);
- for (Py_ssize_t i = 0; i < argument_size; ++i) {
- PyObject *item = PySequence_GetItem(argArguments, i);
- PyObject *strObj = PyUnicode_AsUTF8String(item);
- char *s = PyBytes_AsString(strObj);
- Py_DECREF(strObj);
- Py_DECREF(item);
- if (s != nullptr)
- data->data->signalArguments->append(QByteArray(s));
- }
- }
-
- for (Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
- PyObject *arg = PyTuple_GET_ITEM(args, i);
- if (PySequence_Check(arg) && !Shiboken::String::check(arg) && !PyEnumMeta_Check(arg)) {
- tupledArgs = true;
- const auto sig = PySide::Signal::parseSignature(arg);
- PySide::Signal::appendSignature(
- data,
- PySide::Signal::SignalSignature(sig));
- }
- }
-
- if (!tupledArgs) {
- const auto sig = PySide::Signal::parseSignature(args);
- PySide::Signal::appendSignature(
- data,
- PySide::Signal::SignalSignature(sig));
- }
-
- return 0;
-}
-
-static void signalFree(void *self)
-{
- auto pySelf = reinterpret_cast<PyObject *>(self);
- auto data = reinterpret_cast<PySideSignal *>(self);
- delete data->data;
- data->data = nullptr;
- Py_XDECREF(data->homonymousMethod);
- data->homonymousMethod = 0;
-
- Py_TYPE(pySelf)->tp_base->tp_free(self);
-}
-
-static PyObject *signalGetItem(PyObject *self, PyObject *key)
-{
- auto data = reinterpret_cast<PySideSignal *>(self);
- QByteArray sigKey;
- if (key) {
- sigKey = PySide::Signal::parseSignature(key);
- } else {
- sigKey = data->data == nullptr || data->data->signatures.isEmpty()
- ? PySide::Signal::voidType() : data->data->signatures.constFirst().signature;
- }
- auto sig = PySide::Signal::buildSignature(data->data->signalName, sigKey);
- return Shiboken::String::fromCString(sig.constData());
-}
-
-
-static PyObject *signalToString(PyObject *self)
-{
- return signalGetItem(self, 0);
-}
-
-static void signalInstanceFree(void *self)
-{
- auto pySelf = reinterpret_cast<PyObject *>(self);
- auto data = reinterpret_cast<PySideSignalInstance *>(self);
-
- PySideSignalInstancePrivate *dataPvt = data->d;
-
- Py_XDECREF(dataPvt->homonymousMethod);
-
- if (dataPvt->next) {
- Py_DECREF(dataPvt->next);
- dataPvt->next = 0;
- }
- delete dataPvt;
- data->d = 0;
- Py_TYPE(pySelf)->tp_base->tp_free(self);
-}
-
-static PyObject *signalInstanceConnect(PyObject *self, PyObject *args, PyObject *kwds)
-{
- PyObject *slot = nullptr;
- PyObject *type = nullptr;
- static const char *kwlist[] = {"slot", "type", nullptr};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- "O|O:SignalInstance", const_cast<char **>(kwlist), &slot, &type))
- return 0;
-
- PySideSignalInstance *source = reinterpret_cast<PySideSignalInstance *>(self);
- Shiboken::AutoDecRef pyArgs(PyList_New(0));
-
- bool match = false;
- if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) {
- PySideSignalInstance *sourceWalk = source;
- PySideSignalInstance *targetWalk;
-
- //find best match
- while (sourceWalk && !match) {
- targetWalk = reinterpret_cast<PySideSignalInstance *>(slot);
- while (targetWalk && !match) {
- if (QMetaObject::checkConnectArgs(sourceWalk->d->signature, targetWalk->d->signature)) {
- PyList_Append(pyArgs, sourceWalk->d->source);
- Shiboken::AutoDecRef sourceSignature(PySide::Signal::buildQtCompatible(sourceWalk->d->signature));
- PyList_Append(pyArgs, sourceSignature);
-
- PyList_Append(pyArgs, targetWalk->d->source);
- Shiboken::AutoDecRef targetSignature(PySide::Signal::buildQtCompatible(targetWalk->d->signature));
- PyList_Append(pyArgs, targetSignature);
-
- match = true;
- }
- targetWalk = reinterpret_cast<PySideSignalInstance *>(targetWalk->d->next);
- }
- sourceWalk = reinterpret_cast<PySideSignalInstance *>(sourceWalk->d->next);
- }
- } else {
- // Check signature of the slot (method or function) to match signal
- int slotArgs = -1;
- bool useSelf = false;
- bool isMethod = PyMethod_Check(slot);
- bool isFunction = PyFunction_Check(slot);
- bool matchedSlot = false;
-
- QByteArray functionName;
- PySideSignalInstance *it = source;
-
- if (isMethod || isFunction) {
- PyObject *function = isMethod ? PyMethod_GET_FUNCTION(slot) : slot;
- auto *objCode = reinterpret_cast<PepCodeObject *>(PyFunction_GET_CODE(function));
- useSelf = isMethod;
- slotArgs = PepCode_GET_FLAGS(objCode) & CO_VARARGS ? -1 : PepCode_GET_ARGCOUNT(objCode);
- if (useSelf)
- slotArgs -= 1;
-
- // Get signature args
- bool isShortCircuit = false;
- int signatureArgs = 0;
- QStringList argsSignature;
-
- argsSignature = PySide::Signal::getArgsFromSignature(it->d->signature,
- &isShortCircuit);
- signatureArgs = argsSignature.length();
-
- // Iterate the possible types of connection for this signal and compare
- // it with slot arguments
- if (signatureArgs != slotArgs) {
- while (it->d->next != nullptr) {
- it = it->d->next;
- argsSignature = PySide::Signal::getArgsFromSignature(it->d->signature,
- &isShortCircuit);
- signatureArgs = argsSignature.length();
- if (signatureArgs == slotArgs) {
- matchedSlot = true;
- break;
- }
- }
- }
- }
-
- // Adding references to pyArgs
- PyList_Append(pyArgs, source->d->source);
-
- if (matchedSlot) {
- // If a slot matching the same number of arguments was found,
- // include signature to the pyArgs
- Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(it->d->signature));
- PyList_Append(pyArgs, signature);
- } else {
- // Try the first by default if the slot was not found
- Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(source->d->signature));
- PyList_Append(pyArgs, signature);
- }
- PyList_Append(pyArgs, slot);
- match = true;
- }
-
- if (type)
- PyList_Append(pyArgs, type);
-
- if (match) {
- Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
- Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
- PySide::PyName::qtConnect()));
- if (pyMethod.isNull()) { // PYSIDE-79: check if pyMethod exists.
- PyErr_SetString(PyExc_RuntimeError, "method 'connect' vanished!");
- return 0;
- }
- PyObject *result = PyObject_CallObject(pyMethod, tupleArgs);
- if (result == Py_True || result == Py_False)
- return result;
- Py_XDECREF(result);
- }
- if (!PyErr_Occurred()) // PYSIDE-79: inverse the logic. A Null return needs an error.
- PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s.",
- source->d->signature.constData());
- return 0;
-}
-
-static int argCountInSignature(const char *signature)
-{
- return QByteArray(signature).count(",") + 1;
-}
-
-static PyObject *signalInstanceEmit(PyObject *self, PyObject *args)
-{
- PySideSignalInstance *source = reinterpret_cast<PySideSignalInstance *>(self);
-
- Shiboken::AutoDecRef pyArgs(PyList_New(0));
- int numArgsGiven = PySequence_Fast_GET_SIZE(args);
- int numArgsInSignature = argCountInSignature(source->d->signature);
-
- // If number of arguments given to emit is smaller than the first source signature expects,
- // it is possible it's a case of emitting a signal with default parameters.
- // Search through all the overloaded signals with the same name, and try to find a signature
- // with the same number of arguments as given to emit, and is also marked as a cloned method
- // (which in metaobject parlance means a signal with default parameters).
- // @TODO: This should be improved to take into account argument types as well. The current
- // assumption is there are no signals which are both overloaded on argument types and happen to
- // have signatures with default parameters.
- if (numArgsGiven < numArgsInSignature) {
- PySideSignalInstance *possibleDefaultInstance = source;
- while ((possibleDefaultInstance = possibleDefaultInstance->d->next)) {
- if (possibleDefaultInstance->d->attributes & QMetaMethod::Cloned
- && argCountInSignature(possibleDefaultInstance->d->signature) == numArgsGiven) {
- source = possibleDefaultInstance;
- break;
- }
- }
- }
- Shiboken::AutoDecRef sourceSignature(PySide::Signal::buildQtCompatible(source->d->signature));
-
- PyList_Append(pyArgs, sourceSignature);
- for (Py_ssize_t i = 0, max = PyTuple_Size(args); i < max; i++)
- PyList_Append(pyArgs, PyTuple_GetItem(args, i));
-
- Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
- PySide::PyName::qtEmit()));
-
- Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
- return PyObject_CallObject(pyMethod, tupleArgs);
-}
-
-static PyObject *signalInstanceGetItem(PyObject *self, PyObject *key)
-{
- auto data = reinterpret_cast<PySideSignalInstance *>(self);
- const auto sigName = data->d->signalName;
- const auto sigKey = PySide::Signal::parseSignature(key);
- const auto sig = PySide::Signal::buildSignature(sigName, sigKey);
- while (data) {
- if (data->d->signature == sig) {
- PyObject *result = reinterpret_cast<PyObject *>(data);
- Py_INCREF(result);
- return result;
- }
- data = data->d->next;
- }
-
- PyErr_Format(PyExc_IndexError, "Signature %s not found for signal: %s",
- sig.constData(), sigName.constData());
- return 0;
-}
-
-static PyObject *signalInstanceDisconnect(PyObject *self, PyObject *args)
-{
- auto source = reinterpret_cast<PySideSignalInstance *>(self);
- Shiboken::AutoDecRef pyArgs(PyList_New(0));
-
- PyObject *slot;
- if (PyTuple_Check(args) && PyTuple_GET_SIZE(args))
- slot = PyTuple_GET_ITEM(args, 0);
- else
- slot = Py_None;
-
- bool match = false;
- if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) {
- PySideSignalInstance *target = reinterpret_cast<PySideSignalInstance *>(slot);
- if (QMetaObject::checkConnectArgs(source->d->signature, target->d->signature)) {
- PyList_Append(pyArgs, source->d->source);
- Shiboken::AutoDecRef source_signature(PySide::Signal::buildQtCompatible(source->d->signature));
- PyList_Append(pyArgs, source_signature);
-
- PyList_Append(pyArgs, target->d->source);
- Shiboken::AutoDecRef target_signature(PySide::Signal::buildQtCompatible(target->d->signature));
- PyList_Append(pyArgs, target_signature);
- match = true;
- }
- } else {
- //try the first signature
- PyList_Append(pyArgs, source->d->source);
- Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(source->d->signature));
- PyList_Append(pyArgs, signature);
-
- // disconnect all, so we need to use the c++ signature disconnect(qobj, signal, 0, 0)
- if (slot == Py_None)
- PyList_Append(pyArgs, slot);
- PyList_Append(pyArgs, slot);
- match = true;
- }
-
- if (match) {
- Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
- Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
- PySide::PyName::qtDisconnect()));
- PyObject *result = PyObject_CallObject(pyMethod, tupleArgs);
- if (!result || result == Py_True)
- return result;
- else
- Py_DECREF(result);
- }
-
- PyErr_Format(PyExc_RuntimeError, "Failed to disconnect signal %s.",
- source->d->signature.constData());
- return 0;
-}
-
-// PYSIDE-68: Supply the missing __get__ function
-static PyObject *signalDescrGet(PyObject *self, PyObject *obj, PyObject * /*type*/)
-{
- auto signal = reinterpret_cast<PySideSignal *>(self);
- // Return the unbound signal if there is nothing to bind it to.
- if (obj == nullptr || obj == Py_None) {
- Py_INCREF(self);
- return self;
- }
- Shiboken::AutoDecRef name(Py_BuildValue("s", signal->data->signalName.data()));
- return reinterpret_cast<PyObject *>(PySide::Signal::initialize(signal, name, obj));
-}
-
-static PyObject *signalCall(PyObject *self, PyObject *args, PyObject *kw)
-{
- auto signal = reinterpret_cast<PySideSignal *>(self);
-
- // Native C++ signals can't be called like functions, thus we throw an exception.
- // The only way calling a signal can succeed (the Python equivalent of C++'s operator() )
- // is when a method with the same name as the signal is attached to an object.
- // An example is QProcess::error() (don't check the docs, but the source code of qprocess.h).
- if (!signal->homonymousMethod) {
- PyErr_SetString(PyExc_TypeError, "native Qt signal is not callable");
- return 0;
- }
-
- descrgetfunc getDescriptor = Py_TYPE(signal->homonymousMethod)->tp_descr_get;
-
- // Check if there exists a method with the same name as the signal, which is also a static
- // method in C++ land.
- Shiboken::AutoDecRef homonymousMethod(getDescriptor(signal->homonymousMethod, 0, 0));
- if (PyCFunction_Check(homonymousMethod)
- && (PyCFunction_GET_FLAGS(homonymousMethod.object()) & METH_STATIC)) {
-#if PY_VERSION_HEX >= 0x03090000
- return PyObject_Call(homonymousMethod, args, kw);
-#else
- return PyCFunction_Call(homonymousMethod, args, kw);
-#endif
- }
-
- // Assumes homonymousMethod is not a static method.
- ternaryfunc callFunc = Py_TYPE(signal->homonymousMethod)->tp_call;
- return callFunc(homonymousMethod, args, kw);
-}
-
-static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw)
-{
- auto PySideSignal = reinterpret_cast<PySideSignalInstance *>(self);
- if (!PySideSignal->d->homonymousMethod) {
- PyErr_SetString(PyExc_TypeError, "native Qt signal is not callable");
- return 0;
- }
-
- descrgetfunc getDescriptor = Py_TYPE(PySideSignal->d->homonymousMethod)->tp_descr_get;
- Shiboken::AutoDecRef homonymousMethod(getDescriptor(PySideSignal->d->homonymousMethod, PySideSignal->d->source, 0));
-#if PY_VERSION_HEX >= 0x03090000
- return PyObject_Call(homonymousMethod, args, kw);
-#else
- return PyCFunction_Call(homonymousMethod, args, kw);
-#endif
-}
-
-static PyObject *metaSignalCheck(PyObject * /* klass */, PyObject *arg)
-{
- if (PyType_IsSubtype(Py_TYPE(arg), PySideSignalInstanceTypeF()))
- Py_RETURN_TRUE;
- else
- Py_RETURN_FALSE;
-}
-
-} // extern "C"
-
-namespace PySide {
-namespace Signal {
-
-static const char *MetaSignal_SignatureStrings[] = {
- "PySide2.QtCore.MetaSignal.__instancecheck__(object:object)->bool",
- nullptr}; // Sentinel
-
-static const char *Signal_SignatureStrings[] = {
- "PySide2.QtCore.Signal(*types:type,name:str=nullptr,arguments:str=nullptr)",
- nullptr}; // Sentinel
-
-static const char *SignalInstance_SignatureStrings[] = {
- "PySide2.QtCore.SignalInstance.connect(slot:object,type:type=nullptr)",
- "PySide2.QtCore.SignalInstance.disconnect(slot:object=nullptr)",
- "PySide2.QtCore.SignalInstance.emit(*args:typing.Any)",
- nullptr}; // Sentinel
-
-void init(PyObject *module)
-{
- if (InitSignatureStrings(PySideMetaSignalTypeF(), MetaSignal_SignatureStrings) < 0)
- return;
- Py_INCREF(PySideMetaSignalTypeF());
- PyModule_AddObject(module, "MetaSignal", reinterpret_cast<PyObject *>(PySideMetaSignalTypeF()));
-
- if (InitSignatureStrings(PySideSignalTypeF(), Signal_SignatureStrings) < 0)
- return;
- Py_INCREF(PySideSignalTypeF());
- PyModule_AddObject(module, "Signal", reinterpret_cast<PyObject *>(PySideSignalTypeF()));
-
- if (InitSignatureStrings(PySideSignalInstanceTypeF(), SignalInstance_SignatureStrings) < 0)
- return;
- Py_INCREF(PySideSignalInstanceTypeF());
- PyModule_AddObject(module, "SignalInstance", reinterpret_cast<PyObject *>(PySideSignalInstanceTypeF()));
-}
-
-bool checkType(PyObject *pyObj)
-{
- if (pyObj)
- return PyType_IsSubtype(Py_TYPE(pyObj), PySideSignalTypeF());
- return false;
-}
-
-void updateSourceObject(PyObject *source)
-{
- PyTypeObject *objType = reinterpret_cast<PyTypeObject *>(PyObject_Type(source));
-
- Py_ssize_t pos = 0;
- PyObject *value;
- PyObject *key;
-
- while (PyDict_Next(objType->tp_dict, &pos, &key, &value)) {
- if (PyObject_TypeCheck(value, PySideSignalTypeF())) {
- Shiboken::AutoDecRef signalInstance(reinterpret_cast<PyObject *>(PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF())));
- instanceInitialize(signalInstance.cast<PySideSignalInstance *>(), key, reinterpret_cast<PySideSignal *>(value), source, 0);
- PyObject_SetAttr(source, key, signalInstance);
- }
- }
-
- Py_XDECREF(objType);
-}
-
-QByteArray getTypeName(PyObject *type)
-{
- if (PyType_Check(type)) {
- if (PyType_IsSubtype(reinterpret_cast<PyTypeObject *>(type),
- reinterpret_cast<PyTypeObject *>(SbkObject_TypeF()))) {
- auto objType = reinterpret_cast<SbkObjectType *>(type);
- return Shiboken::ObjectType::getOriginalName(objType);
- }
- // Translate python types to Qt names
- auto objType = reinterpret_cast<PyTypeObject *>(type);
- if (Shiboken::String::checkType(objType))
- return QByteArrayLiteral("QString");
- if (objType == &PyInt_Type)
- return QByteArrayLiteral("int");
- if (objType == &PyLong_Type)
- return QByteArrayLiteral("long");
- if (objType == &PyFloat_Type)
- return QByteArrayLiteral("double");
- if (objType == &PyBool_Type)
- return QByteArrayLiteral("bool");
- if (objType == &PyList_Type)
- return QByteArrayLiteral("QVariantList");
- if (Py_TYPE(objType) == SbkEnumType_TypeF())
- return Shiboken::Enum::getCppName(objType);
- return QByteArrayLiteral("PyObject");
- }
- if (type == Py_None) // Must be checked before as Shiboken::String::check accepts Py_None
- return voidType();
- if (Shiboken::String::check(type)) {
- QByteArray result = Shiboken::String::toCString(type);
- if (result == "qreal")
- result = sizeof(qreal) == sizeof(double) ? "double" : "float";
- return result;
- }
- return QByteArray();
-}
-
-static QByteArray buildSignature(const QByteArray &name, const QByteArray &signature)
-{
- return QMetaObject::normalizedSignature(name + '(' + signature + ')');
-}
-
-static QByteArray parseSignature(PyObject *args)
-{
- if (args && (Shiboken::String::check(args) || !PySequence_Check(args)))
- return getTypeName(args);
-
- QByteArray signature;
- for (Py_ssize_t i = 0, i_max = PySequence_Size(args); i < i_max; i++) {
- Shiboken::AutoDecRef arg(PySequence_GetItem(args, i));
- const auto typeName = getTypeName(arg);
- if (!typeName.isEmpty()) {
- if (!signature.isEmpty())
- signature += ',';
- signature += typeName;
- }
- }
- return signature;
-}
-
-static void appendSignature(PySideSignal *self, const SignalSignature &signature)
-{
- self->data->signatures.append({signature.m_parameterTypes, signature.m_attributes});
-}
-
-static void instanceInitialize(PySideSignalInstance *self, PyObject *name, PySideSignal *data, PyObject *source, int index)
-{
- self->d = new PySideSignalInstancePrivate;
- PySideSignalInstancePrivate *selfPvt = self->d;
- selfPvt->next = nullptr;
- if (data->data->signalName.isEmpty())
- data->data->signalName = Shiboken::String::toCString(name);
- selfPvt->signalName = data->data->signalName;
-
- selfPvt->source = source;
- const auto &signature = data->data->signatures.at(index);
- selfPvt->signature = buildSignature(self->d->signalName, signature.signature);
- selfPvt->attributes = signature.attributes;
- selfPvt->homonymousMethod = 0;
- if (data->homonymousMethod) {
- selfPvt->homonymousMethod = data->homonymousMethod;
- Py_INCREF(selfPvt->homonymousMethod);
- }
- index++;
-
- if (index < data->data->signatures.size()) {
- selfPvt->next = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF());
- instanceInitialize(selfPvt->next, name, data, source, index);
- }
-}
-
-PySideSignalInstance *initialize(PySideSignal *self, PyObject *name, PyObject *object)
-{
- PySideSignalInstance *instance = PyObject_New(PySideSignalInstance,
- PySideSignalInstanceTypeF());
- instanceInitialize(instance, name, self, object, 0);
- auto sbkObj = reinterpret_cast<SbkObject *>(object);
- if (!Shiboken::Object::wasCreatedByPython(sbkObj))
- Py_INCREF(object); // PYSIDE-79: this flag was crucial for a wrapper call.
- return instance;
-}
-
-bool connect(PyObject *source, const char *signal, PyObject *callback)
-{
- Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source,
- PySide::PyName::qtConnect()));
- if (pyMethod.isNull())
- return false;
-
- Shiboken::AutoDecRef pySignature(Shiboken::String::fromCString(signal));
- Shiboken::AutoDecRef pyArgs(PyTuple_Pack(3, source, pySignature.object(), callback));
- PyObject *result = PyObject_CallObject(pyMethod, pyArgs);
- if (result == Py_False) {
- PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s, to python callable object.", signal);
- Py_DECREF(result);
- result = 0;
- }
- return result;
-}
-
-PySideSignalInstance *newObjectFromMethod(PyObject *source, const QList<QMetaMethod>& methodList)
-{
- PySideSignalInstance *root = nullptr;
- PySideSignalInstance *previous = nullptr;
- for (const QMetaMethod &m : methodList) {
- PySideSignalInstance *item = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF());
- if (!root)
- root = item;
-
- if (previous)
- previous->d->next = item;
-
- item->d = new PySideSignalInstancePrivate;
- PySideSignalInstancePrivate *selfPvt = item->d;
- selfPvt->source = source;
- Py_INCREF(selfPvt->source); // PYSIDE-79: an INCREF is missing.
- QByteArray cppName(m.methodSignature());
- cppName.truncate(cppName.indexOf('('));
- // separe SignalName
- selfPvt->signalName = cppName;
- selfPvt->signature = m.methodSignature();
- selfPvt->attributes = m.attributes();
- selfPvt->homonymousMethod = 0;
- selfPvt->next = 0;
- }
- return root;
-}
-
-template<typename T>
-static typename T::value_type join(T t, const char *sep)
-{
- typename T::value_type res;
- if (t.isEmpty())
- return res;
-
- typename T::const_iterator it = t.begin();
- typename T::const_iterator end = t.end();
- res += *it;
- ++it;
-
- while (it != end) {
- res += sep;
- res += *it;
- ++it;
- }
- return res;
-}
-
-static void _addSignalToWrapper(SbkObjectType *wrapperType, const char *signalName, PySideSignal *signal)
-{
- auto typeDict = reinterpret_cast<PyTypeObject *>(wrapperType)->tp_dict;
- PyObject *homonymousMethod;
- if ((homonymousMethod = PyDict_GetItemString(typeDict, signalName))) {
- Py_INCREF(homonymousMethod);
- signal->homonymousMethod = homonymousMethod;
- }
- PyDict_SetItemString(typeDict, signalName, reinterpret_cast<PyObject *>(signal));
-}
-
-// This function is used by qStableSort to promote empty signatures
-static bool compareSignals(const SignalSignature &sig1, const SignalSignature &)
-{
- return sig1.m_parameterTypes.isEmpty();
-}
-
-static PyObject *buildQtCompatible(const QByteArray &signature)
-{
- const auto ba = QT_SIGNAL_SENTINEL + signature;
- return Shiboken::String::fromStringAndSize(ba, ba.size());
-}
-
-void registerSignals(SbkObjectType *pyObj, const QMetaObject *metaObject)
-{
- typedef QHash<QByteArray, QList<SignalSignature> > SignalSigMap;
- SignalSigMap signalsFound;
- for (int i = metaObject->methodOffset(), max = metaObject->methodCount(); i < max; ++i) {
- QMetaMethod method = metaObject->method(i);
-
- if (method.methodType() == QMetaMethod::Signal) {
- QByteArray methodName(method.methodSignature());
- methodName.chop(methodName.size() - methodName.indexOf('('));
- SignalSignature signature;
- signature.m_parameterTypes = join(method.parameterTypes(), ",");
- if (method.attributes() & QMetaMethod::Cloned)
- signature.m_attributes = QMetaMethod::Cloned;
- signalsFound[methodName] << signature;
- }
- }
-
- SignalSigMap::Iterator it = signalsFound.begin();
- SignalSigMap::Iterator end = signalsFound.end();
- for (; it != end; ++it) {
- PySideSignal *self = PyObject_New(PySideSignal, PySideSignalTypeF());
- self->data = new PySideSignalData;
- self->data->signalName = it.key();
- self->homonymousMethod = 0;
-
- // Empty signatures comes first! So they will be the default signal signature
- std::stable_sort(it.value().begin(), it.value().end(), &compareSignals);
- SignalSigMap::mapped_type::const_iterator j = it.value().begin();
- SignalSigMap::mapped_type::const_iterator endJ = it.value().end();
- for (; j != endJ; ++j) {
- const SignalSignature &sig = *j;
- appendSignature(self, sig);
- }
-
- _addSignalToWrapper(pyObj, it.key(), self);
- Py_DECREF(reinterpret_cast<PyObject *>(self));
- }
-}
-
-PyObject *getObject(PySideSignalInstance *signal)
-{
- return signal->d->source;
-}
-
-const char *getSignature(PySideSignalInstance *signal)
-{
- return signal->d->signature;
-}
-
-QStringList getArgsFromSignature(const char *signature, bool *isShortCircuit)
-{
- QString qsignature = QString::fromLatin1(signature).trimmed();
- QStringList result;
-
- if (isShortCircuit)
- *isShortCircuit = !qsignature.contains(QLatin1Char('('));
- if (qsignature.contains(QLatin1String("()")) || qsignature.contains(QLatin1String("(void)")))
- return result;
- if (qsignature.endsWith(QLatin1Char(')'))) {
- const int paren = qsignature.indexOf(QLatin1Char('('));
- if (paren >= 0) {
- qsignature.chop(1);
- qsignature.remove(0, paren + 1);
- result = qsignature.split(QLatin1Char(','));
- for (QString &type : result)
- type = type.trimmed();
- }
- }
- return result;
-}
-
-QString getCallbackSignature(const char *signal, QObject *receiver, PyObject *callback, bool encodeName)
-{
- QByteArray functionName;
- int numArgs = -1;
- bool useSelf = false;
- bool isMethod = PyMethod_Check(callback);
- bool isFunction = PyFunction_Check(callback);
-
- if (isMethod || isFunction) {
- PyObject *function = isMethod ? PyMethod_GET_FUNCTION(callback) : callback;
- auto objCode = reinterpret_cast<PepCodeObject *>(PyFunction_GET_CODE(function));
- functionName = Shiboken::String::toCString(PepFunction_GetName(function));
- useSelf = isMethod;
- numArgs = PepCode_GET_FLAGS(objCode) & CO_VARARGS ? -1 : PepCode_GET_ARGCOUNT(objCode);
- } else if (PyCFunction_Check(callback)) {
- const PyCFunctionObject *funcObj = reinterpret_cast<const PyCFunctionObject *>(callback);
- functionName = PepCFunction_GET_NAMESTR(funcObj);
- useSelf = PyCFunction_GET_SELF(funcObj);
- const int flags = PyCFunction_GET_FLAGS(funcObj);
-
- if (receiver) {
- //Search for signature on metaobject
- const QMetaObject *mo = receiver->metaObject();
- QByteArray prefix(functionName);
- prefix += '(';
- for (int i = 0; i < mo->methodCount(); i++) {
- QMetaMethod me = mo->method(i);
- if ((strncmp(me.methodSignature(), prefix, prefix.size()) == 0) &&
- QMetaObject::checkConnectArgs(signal, me.methodSignature())) {
- numArgs = me.parameterTypes().size() + useSelf;
- break;
- }
- }
- }
-
- if (numArgs == -1) {
- if (flags & METH_VARARGS)
- numArgs = -1;
- else if (flags & METH_NOARGS)
- numArgs = 0;
- }
- } else if (PyCallable_Check(callback)) {
- functionName = "__callback" + QByteArray::number((qlonglong)callback);
- }
-
- Q_ASSERT(!functionName.isEmpty());
-
- bool isShortCircuit = false;
-
- const QString functionNameS = QLatin1String(functionName);
- QString signature = encodeName ? codeCallbackName(callback, functionNameS) : functionNameS;
- QStringList args = getArgsFromSignature(signal, &isShortCircuit);
-
- if (!isShortCircuit) {
- signature.append(QLatin1Char('('));
- if (numArgs == -1)
- numArgs = std::numeric_limits<int>::max();
- while (args.count() && (args.count() > (numArgs - useSelf))) {
- args.removeLast();
- }
- signature.append(args.join(QLatin1Char(',')));
- signature.append(QLatin1Char(')'));
- }
- return signature;
-}
-
-bool isQtSignal(const char *signal)
-{
- return (signal && signal[0] == QT_SIGNAL_SENTINEL);
-}
-
-bool checkQtSignal(const char *signal)
-{
- if (!isQtSignal(signal)) {
- PyErr_SetString(PyExc_TypeError, "Use the function PySide2.QtCore.SIGNAL on signals");
- return false;
- }
- return true;
-}
-
-QString codeCallbackName(PyObject *callback, const QString &funcName)
-{
- if (PyMethod_Check(callback)) {
- PyObject *self = PyMethod_GET_SELF(callback);
- PyObject *func = PyMethod_GET_FUNCTION(callback);
- return funcName + QString::number(quint64(self), 16) + QString::number(quint64(func), 16);
- }
- return funcName + QString::number(quint64(callback), 16);
-}
-
-QByteArray voidType()
-{
- return QByteArrayLiteral("void");
-}
-
-} //namespace Signal
-} //namespace PySide
-
diff --git a/sources/pyside2/libpyside/pysideslot.cpp b/sources/pyside2/libpyside/pysideslot.cpp
deleted file mode 100644
index 1ec24ab21..000000000
--- a/sources/pyside2/libpyside/pysideslot.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "dynamicqmetaobject_p.h"
-#include "pysidesignal_p.h"
-#include "pysideslot_p.h"
-
-#include <shiboken.h>
-
-#include <QtCore/QMetaObject>
-#include <QtCore/QString>
-#include <signature.h>
-
-using namespace Shiboken;
-
-struct SlotData
-{
- QByteArray name;
- QByteArray args;
- QByteArray resultType;
-};
-
-typedef struct
-{
- PyObject_HEAD
- SlotData *slotData;
-} PySideSlot;
-
-extern "C"
-{
-
-static int slotTpInit(PyObject *, PyObject *, PyObject *);
-static PyObject *slotCall(PyObject *, PyObject *, PyObject *);
-
-// Class Definition -----------------------------------------------
-static PyType_Slot PySideSlotType_slots[] = {
- {Py_tp_call, (void *)slotCall},
- {Py_tp_init, (void *)slotTpInit},
- {Py_tp_new, (void *)PyType_GenericNew},
- {Py_tp_dealloc, (void *)Sbk_object_dealloc},
- {0, 0}
-};
-static PyType_Spec PySideSlotType_spec = {
- "2:PySide2.QtCore.Slot",
- sizeof(PySideSlot),
- 0,
- Py_TPFLAGS_DEFAULT,
- PySideSlotType_slots,
-};
-
-
-static PyTypeObject *PySideSlotTypeF(void)
-{
- static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
- SbkType_FromSpec(&PySideSlotType_spec));
- return type;
-}
-
-int slotTpInit(PyObject *self, PyObject *args, PyObject *kw)
-{
- static PyObject *emptyTuple = nullptr;
- static const char *kwlist[] = {"name", "result", nullptr};
- char *argName = nullptr;
- PyObject *argResult = nullptr;
-
- if (emptyTuple == 0)
- emptyTuple = PyTuple_New(0);
-
- if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot",
- const_cast<char **>(kwlist), &argName, &argResult)) {
- return -1;
- }
-
- PySideSlot *data = reinterpret_cast<PySideSlot *>(self);
- if (!data->slotData)
- data->slotData = new SlotData;
- for(Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
- PyObject *argType = PyTuple_GET_ITEM(args, i);
- const auto typeName = PySide::Signal::getTypeName(argType);
- if (typeName.isEmpty()) {
- PyErr_Format(PyExc_TypeError, "Unknown signal argument type: %s", Py_TYPE(argType)->tp_name);
- return -1;
- }
- if (!data->slotData->args.isEmpty())
- data->slotData->args += ',';
- data->slotData->args += typeName;
- }
-
- if (argName)
- data->slotData->name = argName;
-
- data->slotData->resultType = argResult
- ? PySide::Signal::getTypeName(argResult) : PySide::Signal::voidType();
-
- return 0;
-}
-
-PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */)
-{
- static PyObject *pySlotName = nullptr;
- PyObject *callback;
- callback = PyTuple_GetItem(args, 0);
- Py_INCREF(callback);
-
- if (Py_TYPE(callback)->tp_call != nullptr) {
- PySideSlot *data = reinterpret_cast<PySideSlot *>(self);
-
- if (!data->slotData)
- data->slotData = new SlotData;
-
- if (data->slotData->name.isEmpty()) {
- // PYSIDE-198: Use PyObject_GetAttr instead of PepFunction_GetName to support Nuitka.
- AutoDecRef funcName(PyObject_GetAttr(callback, PyMagicName::name()));
- data->slotData->name = String::toCString(funcName);
- }
- const QByteArray returnType = QMetaObject::normalizedType(data->slotData->resultType);
- const QByteArray signature =
- returnType + ' ' + data->slotData->name + '(' + data->slotData->args + ')';
-
- if (!pySlotName)
- pySlotName = String::fromCString(PYSIDE_SLOT_LIST_ATTR);
-
- PyObject *pySignature = String::fromCString(signature);
- PyObject *signatureList = 0;
- if (PyObject_HasAttr(callback, pySlotName)) {
- signatureList = PyObject_GetAttr(callback, pySlotName);
- } else {
- signatureList = PyList_New(0);
- PyObject_SetAttr(callback, pySlotName, signatureList);
- Py_DECREF(signatureList);
- }
-
- PyList_Append(signatureList, pySignature);
- Py_DECREF(pySignature);
-
- //clear data
- delete data->slotData;
- data->slotData = nullptr;
- return callback;
- }
- return callback;
-}
-
-} // extern "C"
-
-namespace PySide {
-namespace Slot {
-
-static const char *Slot_SignatureStrings[] = {
- "PySide2.QtCore.Slot(*types:type,name:str=nullptr,result:str=nullptr)->typing.Callable[...,typing.Optional[str]]",
- nullptr}; // Sentinel
-
-void init(PyObject *module)
-{
- if (InitSignatureStrings(PySideSlotTypeF(), Slot_SignatureStrings) < 0)
- return;
-
- Py_INCREF(PySideSlotTypeF());
- PyModule_AddObject(module, "Slot", reinterpret_cast<PyObject *>(PySideSlotTypeF()));
-}
-
-} // namespace Slot
-} // namespace PySide
diff --git a/sources/pyside2/plugins/CMakeLists.txt b/sources/pyside2/plugins/CMakeLists.txt
deleted file mode 100644
index 1d947fb44..000000000
--- a/sources/pyside2/plugins/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-project(plugins)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS UiPlugin)
-
-set(ui_plugin_src
- customwidgets.cpp
- customwidget.cpp
-)
-
-qt_wrap_cpp(MOC_FILES ${ui_plugin_moc})
-
-add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
-if(CMAKE_HOST_UNIX AND NOT CYGWIN)
- add_definitions(-fPIC)
-endif()
-add_definitions(-DQT_STATICPLUGIN)
-
-if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- set_property(TARGET pyside2 PROPERTY CXX_STANDARD 17)
-else()
- set_property(TARGET pyside2 PROPERTY CXX_STANDARD 11)
-endif()
-
-target_link_libraries(uiplugin
- Qt::Core
- Qt::Gui
- Qt::UiPlugin
- Qt::Widgets
- Shiboken6::libshiboken)
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
-else()
- set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
-endif()
diff --git a/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py b/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py
deleted file mode 100644
index 97ddc8af9..000000000
--- a/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py
+++ /dev/null
@@ -1,161 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for Q3DExtras'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqguiapplication import UsesQGuiApplication
-
-from PySide2.QtCore import(Property, QObject, QPropertyAnimation, QTimer, Signal, Slot)
-from PySide2.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D, QWindow)
-from PySide2.Qt3DCore import (Qt3DCore)
-from PySide2.Qt3DRender import (Qt3DRender)
-from PySide2.Qt3DExtras import (Qt3DExtras)
-
-class OrbitTransformController(QObject):
- def __init__(self, parent):
- super(OrbitTransformController, self).__init__(parent)
- self._target = None
- self._matrix = QMatrix4x4()
- self._radius = 1
- self._angle = 0
-
- def setTarget(self, t):
- self._target = t
-
- def getTarget(self):
- return self._target
-
- def setRadius(self, radius):
- if self._radius != radius:
- self._radius = radius
- self.updateMatrix()
- self.radiusChanged.emit()
-
- def getRadius(self):
- return self._radius
-
- def setAngle(self, angle):
- if self._angle != angle:
- self._angle = angle
- self.updateMatrix()
- self.angleChanged.emit()
-
- def getAngle(self):
- return self._angle
-
- def updateMatrix(self):
- self._matrix.setToIdentity();
- self._matrix.rotate(self._angle, QVector3D(0, 1, 0))
- self._matrix.translate(self._radius, 0, 0)
- if self._target is not None:
- self._target.setMatrix(self._matrix)
-
- angleChanged = Signal()
- radiusChanged = Signal()
- angle = Property(float, getAngle, setAngle, notify=angleChanged)
- radius = Property(float, getRadius, setRadius, notify=radiusChanged)
-
-class Window(Qt3DExtras.Qt3DWindow):
- def __init__(self):
- super(Window, self).__init__()
-
- # Camera
- self.camera().lens().setPerspectiveProjection(45, 16 / 9, 0.1, 1000)
- self.camera().setPosition(QVector3D(0, 0, 40))
- self.camera().setViewCenter(QVector3D(0, 0, 0))
-
- # For camera controls
- self.createScene()
- self.camController = Qt3DExtras.QOrbitCameraController(self.rootEntity)
- self.camController.setLinearSpeed(50)
- self.camController.setLookSpeed(180)
- self.camController.setCamera(self.camera())
-
- self.setRootEntity(self.rootEntity)
-
- def createScene(self):
- # Root entity
- self.rootEntity = Qt3DCore.QEntity()
-
- # Material
- self.material = Qt3DExtras.QPhongMaterial(self.rootEntity)
-
- # Torus
- self.torusEntity = Qt3DCore.QEntity(self.rootEntity)
- self.torusMesh = Qt3DExtras.QTorusMesh()
- self.torusMesh.setRadius(5)
- self.torusMesh.setMinorRadius(1)
- self.torusMesh.setRings(100)
- self.torusMesh.setSlices(20)
-
- self.torusTransform = Qt3DCore.QTransform()
- self.torusTransform.setScale3D(QVector3D(1.5, 1, 0.5))
- self.torusTransform.setRotation(QQuaternion.fromAxisAndAngle(QVector3D(1, 0, 0), 45))
-
- self.torusEntity.addComponent(self.torusMesh)
- self.torusEntity.addComponent(self.torusTransform)
- self.torusEntity.addComponent(self.material)
-
- # Sphere
- self.sphereEntity = Qt3DCore.QEntity(self.rootEntity)
- self.sphereMesh = Qt3DExtras.QSphereMesh()
- self.sphereMesh.setRadius(3)
-
- self.sphereTransform = Qt3DCore.QTransform()
- self.controller = OrbitTransformController(self.sphereTransform)
- self.controller.setTarget(self.sphereTransform)
- self.controller.setRadius(20)
-
- self.sphereEntity.addComponent(self.sphereMesh)
- self.sphereEntity.addComponent(self.sphereTransform)
- self.sphereEntity.addComponent(self.material)
-
-class Qt3DExtrasTestCase(UsesQGuiApplication):
- '''Tests related to Q3DExtras'''
-
- def test3DExtras(self):
-
- window = Window()
- window.show()
- while not window.isExposed():
- self.app.processEvents()
- QTimer.singleShot(2000, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCharts/qcharts_test.py b/sources/pyside2/tests/QtCharts/qcharts_test.py
deleted file mode 100644
index dc10fceb2..000000000
--- a/sources/pyside2/tests/QtCharts/qcharts_test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QCharts'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QRect, QSize, QTimer
-from PySide2.QtGui import QGuiApplication, QScreen
-from PySide2.QtCharts import QtCharts
-
-class QChartsTestCase(UsesQApplication):
- '''Tests related to QCharts'''
-
- def testCharts(self):
- self.series = QtCharts.QPieSeries()
- self.series.append("Jane", 1);
- self.series.append("Joe", 2);
- self.series.append("Andy", 3);
- self.series.append("Barbara", 4);
- self.series.append("Axel", 5);
- slice = self.series.slices()[1]
- slice.setExploded();
- slice.setLabelVisible();
- self.chart = QtCharts.QChart()
- self.chart.addSeries(self.series);
- chartView = QtCharts.QChartView(self.chart)
- screenSize = QGuiApplication.primaryScreen().geometry().size()
- chartView.resize(screenSize / 2)
- chartView.show()
- QTimer.singleShot(500, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/attr_cache_py3k.py b/sources/pyside2/tests/QtCore/attr_cache_py3k.py
deleted file mode 100644
index 558fe0e2b..000000000
--- a/sources/pyside2/tests/QtCore/attr_cache_py3k.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# This Python file uses the following encoding: utf-8
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''
-Unit tests for attribute cache in Python 3
-
-This is the original code from the bug report
-https://bugreports.qt.io/browse/PYSIDE-60
-'''
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import QObject
-
-
-class A(QObject):
- instance = 1
-
- @classmethod
- def test(cls):
- cls.instance
- cls.instance = cls()
- assert "<__main__.A(0x" in repr(cls.__dict__['instance'])
- assert "<__main__.A(0x" in repr(cls.instance)
- assert "<__main__.A(0x" in repr(type.__getattribute__(cls, 'instance'))
-
-
-if __name__ == "__main__":
- A.test()
diff --git a/sources/pyside2/tests/QtCore/blocking_signals_test.py b/sources/pyside2/tests/QtCore/blocking_signals_test.py
deleted file mode 100644
index c3497c89f..000000000
--- a/sources/pyside2/tests/QtCore/blocking_signals_test.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for QObject.signalsBlocked() and blockSignal()'''
-
-import os
-import sys
-from tempfile import mkstemp
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, QFile, QSignalBlocker
-
-class TestSignalsBlockedBasic(unittest.TestCase):
- '''Basic test case for signalsBlocked'''
-
- def testBasic(self):
- '''QObject.signalsBlocked() and blockSignals()
- The signals aren't blocked by default.
- blockSignals returns the previous value'''
- obj = QObject()
- self.assertTrue(not obj.signalsBlocked())
- self.assertTrue(not obj.blockSignals(True))
- self.assertTrue(obj.signalsBlocked())
- self.assertTrue(obj.blockSignals(False))
- blocker = QSignalBlocker(obj)
- self.assertTrue(obj.signalsBlocked())
- blocker.unblock()
- self.assertTrue(not obj.signalsBlocked())
- blocker.reblock()
- self.assertTrue(obj.signalsBlocked())
- del blocker
- self.assertTrue(not obj.signalsBlocked())
-
-
-class TestSignalsBlocked(unittest.TestCase):
- '''Test case to check if the signals are really blocked'''
-
- def setUp(self):
- #Set up the basic resources needed
- self.obj = QObject()
- self.args = tuple()
- self.called = False
-
- def tearDown(self):
- #Delete used resources
- del self.obj
- del self.args
-
- def callback(self, *args):
- #Default callback
- if args == self.args:
- self.called = True
- else:
- raise TypeError("Invalid arguments")
-
- def testShortCircuitSignals(self):
- #Blocking of Python short-circuit signals
- QObject.connect(self.obj, SIGNAL('mysignal()'), self.callback)
-
- self.obj.emit(SIGNAL('mysignal()'))
- self.assertTrue(self.called)
-
- self.called = False
- self.obj.blockSignals(True)
- self.obj.emit(SIGNAL('mysignal()'))
- self.assertTrue(not self.called)
-
- def testPythonSignals(self):
- #Blocking of Python typed signals
- QObject.connect(self.obj, SIGNAL('mysignal(int,int)'), self.callback)
- self.args = (1, 3)
-
- self.obj.emit(SIGNAL('mysignal(int,int)'), *self.args)
- self.assertTrue(self.called)
-
- self.called = False
- self.obj.blockSignals(True)
- self.obj.emit(SIGNAL('mysignal(int,int)'), *self.args)
- self.assertTrue(not self.called)
-
-class TestQFileSignalBlocking(unittest.TestCase):
- '''Test case for blocking the signal QIODevice.aboutToClose()'''
-
- def setUp(self):
- #Set up the needed resources - A temp file and a QFile
- self.called = False
- handle, self.filename = mkstemp()
- os.close(handle)
-
- self.qfile = QFile(self.filename)
-
- def tearDown(self):
- #Release acquired resources
- os.remove(self.filename)
- del self.qfile
-
- def callback(self):
- #Default callback
- self.called = True
-
- def testAboutToCloseBlocking(self):
- #QIODevice.aboutToClose() blocking
-
- QObject.connect(self.qfile, SIGNAL('aboutToClose()'), self.callback)
-
- self.assertTrue(self.qfile.open(QFile.ReadOnly))
- self.qfile.close()
- self.assertTrue(self.called)
-
- self.called = False
- self.qfile.blockSignals(True)
-
- self.assertTrue(self.qfile.open(QFile.ReadOnly))
- self.qfile.close()
- self.assertTrue(not self.called)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_1019.py b/sources/pyside2/tests/QtCore/bug_1019.py
deleted file mode 100644
index 404e71bfc..000000000
--- a/sources/pyside2/tests/QtCore/bug_1019.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyTimer (QTimer):
- def __init__(self):
- QTimer.__init__(self)
- self.startCalled = False
-
- @Slot()
- def slotUsedToIncreaseMethodOffset(self):
- pass
-
-class MyTimer2 (MyTimer):
-
- @Slot()
- def slotUsedToIncreaseMethodOffset2(self):
- pass
-
- def start(self):
- self.startCalled = True
- QCoreApplication.instance().quit()
-
-class TestBug1019 (unittest.TestCase):
- def testIt(self):
- app = QCoreApplication([])
- t = MyTimer2()
- QTimer.singleShot(0, t.start)
- app.exec_()
- self.assertTrue(t.startCalled)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_1063.py b/sources/pyside2/tests/QtCore/bug_1063.py
deleted file mode 100644
index db55dc1e0..000000000
--- a/sources/pyside2/tests/QtCore/bug_1063.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1063 '''
-
-import os
-import sys
-import tempfile
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-class QTextStreamTestCase(unittest.TestCase):
- def setUp(self):
- self.temp_file = tempfile.NamedTemporaryFile(delete=False)
- self.temp_file.close()
- self.f = QtCore.QFile(self.temp_file.name)
- self.f.open(QtCore.QIODevice.WriteOnly)
- self.strings = ('foo', 'bar')
- self.stream = QtCore.QTextStream(self.f)
-
- def testIt(self):
- for s in self.strings:
- self.stream << s
-
- self.f.close()
-
- # make sure we didn't get an empty file
- self.assertNotEqual(QtCore.QFile(self.temp_file.name).size(), 0)
-
- os.unlink(self.temp_file.name)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_1069.py b/sources/pyside2/tests/QtCore/bug_1069.py
deleted file mode 100644
index 690553e72..000000000
--- a/sources/pyside2/tests/QtCore/bug_1069.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1069 '''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-class QDataStreamOpOverloadTestCase(unittest.TestCase):
- def setUp(self):
- self.ba = QtCore.QByteArray()
- self.stream = QtCore.QDataStream(self.ba, QtCore.QIODevice.WriteOnly)
-
- def testIt(self):
- self.stream << "hello"
- ok = False
- for c in self.ba:
- if c != b'\x00':
- ok = True
- break
-
- self.assertEqual(ok, True)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_1313.py b/sources/pyside2/tests/QtCore/bug_1313.py
deleted file mode 100644
index 9f7742c84..000000000
--- a/sources/pyside2/tests/QtCore/bug_1313.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1313 '''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-class MyQObject(QtCore.QObject):
- sig = QtCore.Signal()
-
-
-demo_coroutine_definition_code = """
-async def demo_coroutine():
- my_qobject = MyQObject()
- my_qobject.sig.connect(lambda: None)
-"""
-
-
-exec(demo_coroutine_definition_code)
-
-
-class CoroutineRaisesStopIterationTestCase(unittest.TestCase):
- def setUp(self):
- self.coroutine = demo_coroutine()
-
- def testCoroutine(self):
- with self.assertRaises(StopIteration):
- self.coroutine.send(None)
-
-
-def demo_generator():
- my_qobject = MyQObject()
- my_qobject.sig.connect(lambda: None)
- return
- yield # to make it a generator
-
-
-class GeneratorRaisesStopIterationTestCase(unittest.TestCase):
- def setUp(self):
- self.generator = demo_generator()
-
- def testGenerator(self):
- with self.assertRaises(StopIteration):
- self.generator.send(None)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_278_test.py b/sources/pyside2/tests/QtCore/bug_278_test.py
deleted file mode 100644
index cc99136e7..000000000
--- a/sources/pyside2/tests/QtCore/bug_278_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-def setValue(o):
- values = ['Name']
- o.setProperty('test1', values)
-
-class QQtVersionTest(unittest.TestCase):
- '''Tests for QVariant conversion of QStringList'''
-
- def testGet(self):
- o = QtCore.QObject()
- setValue(o)
- self.assertEqual(o.property('test1'), ['Name'])
-
-
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/QtCore/bug_332.py b/sources/pyside2/tests/QtCore/bug_332.py
deleted file mode 100644
index f49845cf9..000000000
--- a/sources/pyside2/tests/QtCore/bug_332.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-class Lock(QtCore.QMutex):
- def tryLock(self,timeoutt=10):
- return QtCore.QMutex.tryLock(self,timeoutt)
-
-class TestBug(unittest.TestCase):
-
- def testCase(self):
- l = Lock()
- l.tryLock() # this cause a assertion
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_408.py b/sources/pyside2/tests/QtCore/bug_408.py
deleted file mode 100644
index bdb7c1af5..000000000
--- a/sources/pyside2/tests/QtCore/bug_408.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyDevice(QIODevice):
- def __init__(self, txt):
- QIODevice.__init__(self)
- self.txt = txt
- self.ptr = 0
-
- def readData(self, size):
- size = min(len(self.txt) - self.ptr, size)
- retval = self.txt[self.ptr:size]
- self.ptr += size
- return retval
-
-class QIODeviceTest(unittest.TestCase):
-
- def testIt(self):
- device = MyDevice("hello world\nhello again")
- device.open(QIODevice.ReadOnly)
-
- s = QTextStream(device)
- self.assertEqual(s.readLine(), "hello world")
- self.assertEqual(s.readLine(), "hello again")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_428.py b/sources/pyside2/tests/QtCore/bug_428.py
deleted file mode 100644
index b4c8f9632..000000000
--- a/sources/pyside2/tests/QtCore/bug_428.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class MyBaseObject(QObject):
- def __init__(self, number):
- self.myMember = 'myMember' + number
- QObject.__init__(self)
-
-class QObjectConstructorTest(unittest.TestCase):
- def testBug(self):
- for i in range(10):
- number = str(i)
- obj = MyBaseObject(number)
- self.assertEqual(obj.myMember, 'myMember' + number)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_462.py b/sources/pyside2/tests/QtCore/bug_462.py
deleted file mode 100644
index e929be0af..000000000
--- a/sources/pyside2/tests/QtCore/bug_462.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication, QEvent, QThread
-
-class MyEvent(QEvent):
- def __init__(self,i):
- print("TYPE:", type(QEvent.User))
- super(MyEvent,self).__init__(QEvent.Type(QEvent.User + 100 ))
- self.i = i
-
-class MyThread (QThread):
- def __init__(self,owner):
- super(MyThread,self).__init__()
- self.owner=owner;
-
- def run(self):
- for i in range(3):
- e=MyEvent(i);
- QCoreApplication.postEvent(self.owner,e)
-
-class MyBaseObject(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.events = []
- self.t = MyThread(self)
- self.t.start()
-
- def customEvent(self, event):
- self.events.append(event)
- if len(self.events) == 3:
- self.t.wait()
- self.app.quit()
-
-
-class CheckForEventsTypes(unittest.TestCase):
- def testTypes(self):
- o = MyBaseObject()
- o.app = QCoreApplication(sys.argv)
- o.app.exec_()
- for e in o.events:
- self.assertTrue(isinstance(e, MyEvent))
- o.app = None
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_505.py b/sources/pyside2/tests/QtCore/bug_505.py
deleted file mode 100644
index 4db6b801d..000000000
--- a/sources/pyside2/tests/QtCore/bug_505.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class MyBaseObject(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self.setObjectName("PySide")
-
- def __del__(self):
- if self.objectName() != "PySide":
- raise NameError('Fail')
-
-class CheckForEventsTypes(unittest.TestCase):
- def testDelObject(self):
- p = MyBaseObject()
- o = MyBaseObject(p)
- del o
- del p
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_515.py b/sources/pyside2/tests/QtCore/bug_515.py
deleted file mode 100644
index a96a8c193..000000000
--- a/sources/pyside2/tests/QtCore/bug_515.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-""" Unittest for bug #515 """
-""" http://bugs.openbossa.org/show_bug.cgi?id=515 """
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtCore
-
-callCleanup = False
-def _cleanup():
- global callCleanup
- callCleanup = True
-
-def _checkCleanup():
- global callCleanup
- assert(callCleanup)
-
-app = QtCore.QCoreApplication([])
-QtCore.qAddPostRoutine(_cleanup)
-QtCore.qAddPostRoutine(_checkCleanup)
-del app
diff --git a/sources/pyside2/tests/QtCore/bug_606.py b/sources/pyside2/tests/QtCore/bug_606.py
deleted file mode 100644
index 423b088dc..000000000
--- a/sources/pyside2/tests/QtCore/bug_606.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2.QtCore import QPoint, QPointF
-from PySide2.QtCore import QLine, QLineF
-from PySide2.QtCore import QSize, QSizeF
-
-class testCases(unittest.TestCase):
- def testQPointToTuple(self):
- p = QPoint(1, 2)
- self.assertEqual((1, 2), p.toTuple())
-
- def testQPointFToTuple(self):
- p = QPointF(1, 2)
- self.assertEqual((1, 2), p.toTuple())
-
- def testQLineToTuple(self):
- l = QLine(1, 2, 3, 4)
- self.assertEqual((1, 2, 3, 4), l.toTuple())
-
- def testQLineFToTuple(self):
- l = QLineF(1, 2, 3, 4)
- self.assertEqual((1, 2, 3, 4), l.toTuple())
-
- def testQSizeToTuple(self):
- s = QSize(1, 2)
- self.assertEqual((1, 2), s.toTuple())
-
- def testQSizeFToTuple(self):
- s = QSizeF(1, 2)
- self.assertEqual((1, 2), s.toTuple())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_656.py b/sources/pyside2/tests/QtCore/bug_656.py
deleted file mode 100644
index d3cd05f28..000000000
--- a/sources/pyside2/tests/QtCore/bug_656.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-
-class CoreApp(QCoreApplication):
- def __init__(self,*args):
- super(CoreApp,self).__init__(*args)
- # It shouldn't crash after the __init__ call
-
-import sys
-app = CoreApp(sys.argv)
diff --git a/sources/pyside2/tests/QtCore/bug_686.py b/sources/pyside2/tests/QtCore/bug_686.py
deleted file mode 100644
index 6e4f8994a..000000000
--- a/sources/pyside2/tests/QtCore/bug_686.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import with_statement
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyWriteThread(QThread):
- def __init__(self, lock):
- QThread.__init__(self)
- self.lock = lock
- self.started = False
- self.canQuit = False
-
- def run(self):
- self.started = True
- while not self.lock.tryLockForWrite():
- pass
- self.canQuit = True
-
-class MyReadThread(QThread):
- def __init__(self, lock):
- QThread.__init__(self)
- self.lock = lock
- self.started = False
- self.canQuit = False
-
- def run(self):
- self.started = True
- while not self.lock.tryLockForRead():
- pass
- self.canQuit = True
-
-class MyMutexedThread(QThread):
- def __init__(self, mutex):
- QThread.__init__(self)
- self.mutex = mutex
- self.started = False
- self.canQuit = False
-
- def run(self):
- self.started = True
- while not self.mutex.tryLock():
- pass
- self.mutex.unlock()
- self.canQuit = True
-
-class TestQMutex (unittest.TestCase):
-
- def testReadLocker(self):
- lock = QReadWriteLock()
- thread = MyWriteThread(lock)
-
- with QReadLocker(lock):
- thread.start()
- while not thread.started:
- pass
- self.assertFalse(thread.canQuit)
-
- thread.wait(2000)
- self.assertTrue(thread.canQuit)
-
- def testWriteLocker(self):
- lock = QReadWriteLock()
- thread = MyReadThread(lock)
-
- with QWriteLocker(lock):
- thread.start()
- while not thread.started:
- pass
- self.assertFalse(thread.canQuit)
-
- thread.wait(2000)
- self.assertTrue(thread.canQuit)
-
- def testMutexLocker(self):
- mutex = QMutex()
- thread = MyMutexedThread(mutex)
-
- with QMutexLocker(mutex):
- thread.start()
- while not thread.started:
- pass
- self.assertFalse(thread.canQuit)
-
- thread.wait(2000)
- self.assertTrue(thread.canQuit)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_699.py b/sources/pyside2/tests/QtCore/bug_699.py
deleted file mode 100644
index c86c485f9..000000000
--- a/sources/pyside2/tests/QtCore/bug_699.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class TestBug699 (unittest.TestCase):
-
- def defClass(self):
- class Foo (QObject):
- def foo(self):
- pass
-
- prop = Property(foo, foo)
-
- def testIt(self):
- self.assertRaises(TypeError, self.defClass)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_706.py b/sources/pyside2/tests/QtCore/bug_706.py
deleted file mode 100644
index 21743bf25..000000000
--- a/sources/pyside2/tests/QtCore/bug_706.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyModel (QAbstractListModel):
- def rowCount(self, parent = None):
- return 3
-
-class TestBug706(unittest.TestCase):
-
- def mySlot(self, idx, start, end):
- self.start = start
- self.end = end
-
- def testIt(self):
- self.start = None
- self.end = None
-
- app = QCoreApplication([])
- model = MyModel()
- model.columnsAboutToBeInserted.connect(self.mySlot)
- model.columnsAboutToBeInserted.emit(QModelIndex(), 0, 1)
- self.assertEqual(self.start, 0)
- self.assertEqual(self.end, 1)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_820.py b/sources/pyside2/tests/QtCore/bug_820.py
deleted file mode 100644
index 5d45f682e..000000000
--- a/sources/pyside2/tests/QtCore/bug_820.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import functools
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Slot, Signal, SIGNAL
-
-def log_exception():
- def log_exception_decorator(func):
- @functools.wraps(func)
- def wrapper(*args, **kwds):
- try:
- return func(*args, **kwds)
- except Exception:
- raise
-
- return wrapper
-
- return log_exception_decorator
-
-
-def log_exception2():
- def log_exception_decorator(func):
- def wrapper(*args, **kwds):
- try:
- return func(*args, **kwds)
- except Exception:
- raise
-
- return wrapper
-
- return log_exception_decorator
-
-class MyObject(QObject):
-
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self._mySlotcalled = False
- self._mySlot2called = False
-
- @Slot()
- @log_exception()
- def mySlot(self):
- self._mySlotcalled = True
-
- @Slot(name="mySlot2")
- @log_exception2()
- def mySlot2(self):
- self._mySlot2called = True
-
- def poke(self):
- self.events.emit()
-
- events = Signal()
-
-
-class SlotWithDecoratorTest(unittest.TestCase):
- def testSlots(self):
- o = MyObject()
- self.assertTrue(o.metaObject().indexOfSlot("mySlot()") > 0)
- self.assertTrue(o.metaObject().indexOfSlot("mySlot2()") > 0)
-
- o.events.connect(o.mySlot)
- o.events.connect(o.mySlot2)
- o.poke()
- self.assertTrue(o._mySlotcalled)
- self.assertTrue(o._mySlot2called)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/bug_826.py b/sources/pyside2/tests/QtCore/bug_826.py
deleted file mode 100644
index cb72e011e..000000000
--- a/sources/pyside2/tests/QtCore/bug_826.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QEvent, Qt
-import PySide2
-
-
-TEST_EVENT_TYPE = QEvent.Type(QEvent.registerEventType())
-
-class TestEvent(QEvent):
- TestEventType = QEvent.Type(QEvent.registerEventType())
-
- def __init__(self, rand=0):
- super(TestEvent, self).__init__(TestEvent.TestEventType)
- self._rand = rand
-
- def getRand(self):
- return self._rand
-
-
-class TestEnums(unittest.TestCase):
- def testUserTypesValues(self):
- self.assertTrue(QEvent.User <= TestEvent.TestEventType <= QEvent.MaxUser)
- self.assertTrue(QEvent.User <= TEST_EVENT_TYPE <= QEvent.MaxUser)
-
- def testUserTypesRepr(self):
- self.assertEqual(eval(repr(TestEvent.TestEventType)), TestEvent.TestEventType)
- self.assertEqual(eval(repr(TEST_EVENT_TYPE)), TEST_EVENT_TYPE)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_829.py b/sources/pyside2/tests/QtCore/bug_829.py
deleted file mode 100644
index 237ae0406..000000000
--- a/sources/pyside2/tests/QtCore/bug_829.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Copyright (C) 2011 Thomas Perl <thp.io/about>
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Test case for PySide bug 829
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QDir, QSettings, QTemporaryFile
-
-
-class QVariantConversions(unittest.TestCase):
-
- _confFileName = None
-
- def testDictionary(self):
- confFile = QTemporaryFile(QDir.tempPath() + '/pysidebug829_XXXXXX.ini')
- confFile.setAutoRemove(False)
- self.assertTrue(confFile.open())
- confFile.close()
- self._confFileName = confFile.fileName()
- del confFile
- s = QSettings(self._confFileName, QSettings.IniFormat)
- self.assertEqual(s.status(), QSettings.NoError)
- # Save value
- s.setValue('x', {1: 'a'})
- s.sync()
- self.assertEqual(s.status(), QSettings.NoError)
- del s
-
- # Restore value
- s = QSettings(self._confFileName, QSettings.IniFormat)
- self.assertEqual(s.status(), QSettings.NoError)
- self.assertEqual(s.value('x'), {1: 'a'})
-
- def __del__(self):
- if self._confFileName is not None:
- os.unlink(QDir.toNativeSeparators(self._confFileName))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_835.py b/sources/pyside2/tests/QtCore/bug_835.py
deleted file mode 100644
index e72ce500c..000000000
--- a/sources/pyside2/tests/QtCore/bug_835.py
+++ /dev/null
@@ -1,100 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-
-get_counter = 0
-set_counter = 0
-
-class Descriptor(object):
- def __get__(self, obj, owner):
- global get_counter
-
- if not obj:
- return self
-
- get_counter += 1
- return obj.var
-
- def __set__(self, obj, value):
- global set_counter
-
- set_counter += 1
- obj.var = value
-
-class FooBar(QObject):
- test = Descriptor()
- var = 0
-
-class SetAndGetTestCases(unittest.TestCase):
- def setUp(self):
- global get_counter
- global set_counter
-
- get_counter = 0
- set_counter = 0
-
- def testSetMethod(self):
- global get_counter
- global set_counter
-
- f = FooBar()
-
- f.test = 1
- self.assertEqual(get_counter, 0)
- self.assertEqual(set_counter, 1)
-
- get_counter = 0
- set_counter = 0
-
- def testGetMethod(self):
- global get_counter
- global set_counter
-
- f = FooBar()
- f.test = 1
- set_counter = 0
-
- ret = f.test
- self.assertEqual(get_counter, 1)
- self.assertEqual(set_counter, 0)
-
- get_counter = 0
- set_counter = 0
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_920.py b/sources/pyside2/tests/QtCore/bug_920.py
deleted file mode 100644
index b0cd84e6a..000000000
--- a/sources/pyside2/tests/QtCore/bug_920.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2.QtCore as QtCore
-
-class Signaller(QtCore.QObject):
- s1 = QtCore.Signal()
- s2 = QtCore.Signal()
-
-class TestBug920(unittest.TestCase):
-
- def testIt(self):
- s = Signaller()
- s.s1.connect(self.onSignal)
- s.s2.connect(self.onSignal)
- self.assertTrue(s.s1.disconnect(self.onSignal))
- self.assertTrue(s.s2.disconnect(self.onSignal))
-
- def onSignal(self):
- pass
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_927.py b/sources/pyside2/tests/QtCore/bug_927.py
deleted file mode 100644
index 1883bf5e8..000000000
--- a/sources/pyside2/tests/QtCore/bug_927.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import time
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTime, QRunnable, QThreadPool
-
-class Task(QRunnable):
- def run(self):
- t = QTime()
- t.start()
- time.sleep(2) # Sleep 2 seconds
-
-
-class QThreadPoolTest(unittest.TestCase):
- '''This used to cause a segfault due the ownership control on globalInstance function '''
- def testSlowJobs(self):
- for i in range(3):
- task = Task()
- QThreadPool.globalInstance().start(task)
- time.sleep(1) # Sleep 1 second
-
- QThreadPool.globalInstance().waitForDone()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_931.py b/sources/pyside2/tests/QtCore/bug_931.py
deleted file mode 100644
index 8220ecaba..000000000
--- a/sources/pyside2/tests/QtCore/bug_931.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal
-o = QObject()
-class MyObject(QObject):
- s = Signal(int)
-
-class CheckSignalType(unittest.TestCase):
- def testSignal(self):
- self.assertTrue(isinstance(QObject.destroyed, Signal))
- self.assertEqual(type(QObject.destroyed), Signal)
-
- self.assertEqual(type(o.destroyed).__name__, "SignalInstance")
- self.assertNotEqual(type(o.destroyed), Signal)
-
- self.assertTrue(isinstance(o.destroyed, Signal))
- self.assertTrue(isinstance(MyObject.s, Signal))
- self.assertFalse(isinstance(int, Signal))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_938.py b/sources/pyside2/tests/QtCore/bug_938.py
deleted file mode 100644
index 4e70a8604..000000000
--- a/sources/pyside2/tests/QtCore/bug_938.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-
-class TestBug938 (unittest.TestCase):
-
- def testIt(self):
- b = QBuffer()
- b.open(QBuffer.WriteOnly)
- b.write(bytes("\x0023\x005", "UTF-8"))
- b.close()
- self.assertEqual(b.buffer().size(), 5)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_953.py b/sources/pyside2/tests/QtCore/bug_953.py
deleted file mode 100644
index a250ebe32..000000000
--- a/sources/pyside2/tests/QtCore/bug_953.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-
-class Dispatcher(QObject):
- _me = None
-
- def __init__(self):
- super(Dispatcher, self).__init__()
- self._me = self
- QTimer.singleShot(0, self._finish)
-
- def _finish(self):
- del self._me # It can't crash here!
- QTimer.singleShot(10, QCoreApplication.instance().quit)
-
-if __name__ == '__main__':
- app = QCoreApplication([])
- Dispatcher()
- app.exec_()
diff --git a/sources/pyside2/tests/QtCore/bug_987.py b/sources/pyside2/tests/QtCore/bug_987.py
deleted file mode 100644
index 56e5e517e..000000000
--- a/sources/pyside2/tests/QtCore/bug_987.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-
-class TestBug987(unittest.TestCase):
- def callback(self):
- pass
-
- def testInvalidDisconnection(self):
- o = QObject()
- self.assertRaises(RuntimeError, o.destroyed.disconnect, self.callback)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_994.py b/sources/pyside2/tests/QtCore/bug_994.py
deleted file mode 100644
index 5465f4e01..000000000
--- a/sources/pyside2/tests/QtCore/bug_994.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QIODevice, QTextStream
-
-
-class MyIODevice (QIODevice):
- def readData(self, amount):
- return bytes("\0a" * int(amount/2), "UTF-8")
-
- def readLineData(self, maxSize):
- return bytes("\0b" * 4, "UTF-8")
-
- def atEnd(self):
- return False
-
-class TestBug944 (unittest.TestCase):
-
- def testIt(self):
- device = MyIODevice()
- device.open(QIODevice.ReadOnly)
- s = QTextStream(device)
- self.assertEqual(s.read(4), "\0a\0a")
- self.assertEqual(device.readLine(), "\0b\0b\0b\0b")
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py b/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py
deleted file mode 100644
index 96c892fd6..000000000
--- a/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication, QEventLoop, QObject, Qt, QThread, QTimer, SIGNAL
-
-class Emitter(QThread):
- def __init__(self):
- QThread.__init__(self)
-
- def run(self):
- print("Before emit.")
- self.emit(SIGNAL("signal(int)"), 0)
- print("After emit.")
-
-class Receiver(QObject):
- def __init__(self, eventloop):
- QObject.__init__(self)
- self.eventloop = eventloop
-
- def receive(self, number):
- print("Received number: %d" % number)
- self.eventloop.exit(0)
-
-
-class TestBugPYSIDE164(unittest.TestCase):
-
- def testBlockingSignal(self):
- app = QCoreApplication.instance() or QCoreApplication([])
- eventloop = QEventLoop()
- emitter = Emitter()
- receiver = Receiver(eventloop)
- emitter.connect(emitter, SIGNAL("signal(int)"),
- receiver.receive, Qt.BlockingQueuedConnection)
- emitter.start()
- retval = eventloop.exec_()
- emitter.wait(2000)
- self.assertEqual(retval, 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py b/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py
deleted file mode 100644
index 46e3c6d11..000000000
--- a/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-
-class TestBugPYSIDE42 (unittest.TestCase):
-
- def testIt(self):
- obj1 = QFile()
- obj2 = QObject()
- hash1 = hash(obj1)
- hash2 = hash(obj2)
-
- self.assertNotEqual(hash1, hash2)
- self.assertEqual(hash1, hash(obj1))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/child_event_test.py b/sources/pyside2/tests/QtCore/child_event_test.py
deleted file mode 100644
index 8c600210a..000000000
--- a/sources/pyside2/tests/QtCore/child_event_test.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for QObject.childEvent and QTimer.childEvent overloading'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer, QCoreApplication
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class ExtQObject(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.child_event_received = False
-
- def childEvent(self, event):
- QObject.childEvent(self, event)
- self.child_event_received = True
-
-class ExtQTimer(QTimer):
- def __init__(self):
- QTimer.__init__(self)
- self.child_event_received = False
-
- def childEvent(self, event):
- QTimer.childEvent(self, event)
- self.child_event_received = True
-
-
-class TestChildEvent(UsesQCoreApplication):
- '''Test case for QObject::childEvent and QTimer::childEvent'''
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
-
- def tearDown(self):
- UsesQCoreApplication.tearDown(self)
-
- def testQObject(self):
- parent = ExtQObject()
- child = QObject()
- child.setParent(parent)
- self.assertTrue(parent.child_event_received)
-
- def testQTimer(self):
- parent = ExtQTimer()
- child = QObject()
- child.setParent(parent)
- self.assertTrue(parent.child_event_received)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/classinfo_test.py b/sources/pyside2/tests/QtCore/classinfo_test.py
deleted file mode 100644
index d517b19c7..000000000
--- a/sources/pyside2/tests/QtCore/classinfo_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication, ClassInfo
-
-class TestClassInfo(unittest.TestCase):
- def test_metadata(self):
- @ClassInfo(author='pyside', url='http://www.pyside.org')
- class MyObject(QObject):
- pass
-
- o = MyObject()
- mo = o.metaObject()
- self.assertEqual(mo.classInfoCount(), 2)
-
- ci = mo.classInfo(0) #author
- self.assertEqual(ci.name(), 'author')
- self.assertEqual(ci.value(), 'pyside')
-
- ci = mo.classInfo(1) #url
- self.assertEqual(ci.name(), 'url')
- self.assertEqual(ci.value(), 'http://www.pyside.org')
-
- def test_verify_metadata_types(self):
- valid_dict = { '123': '456' }
-
- invalid_dict_1 = { '123': 456 }
- invalid_dict_2 = { 123: 456 }
- invalid_dict_3 = { 123: '456' }
-
- ClassInfo(**valid_dict)
-
- self.assertRaises(TypeError, ClassInfo, **invalid_dict_1)
-
- # assertRaises only allows for string keywords, so a `try` must be used here.
- try:
- ClassInfo(**invalid_dict_2)
- self.fail('ClassInfo() accepted invalid_dict_2!')
- except TypeError:
- pass
-
- try:
- ClassInfo(**invalid_dict_3)
- self.fail('ClassInfo() accepted invalid_dict_3!')
- except TypeError:
- pass
-
- def test_can_not_use_instance_twice(self):
- decorator = ClassInfo(author='pyside', url='http://www.pyside.org')
-
- @decorator
- class MyObject1(QObject):
- pass
-
- class MyObject2(QObject):
- pass
-
- self.assertRaises(TypeError, decorator, MyObject2)
-
- def test_can_only_be_used_on_qobjects(self):
- def test_function(): pass
- self.assertRaises(TypeError, ClassInfo(), test_function)
-
- class NotAQObject(object): pass
- self.assertRaises(TypeError, ClassInfo(), NotAQObject)
-
- class QObjectSubclass(QObject): pass
- ClassInfo()(QObjectSubclass)
-
- class SubclassOfNativeQObjectSubclass(QCoreApplication): pass
- ClassInfo()(SubclassOfNativeQObjectSubclass)
-
- class SubclassOfPythonQObjectSubclass(QObjectSubclass): pass
- ClassInfo()(SubclassOfPythonQObjectSubclass)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/deepcopy_test.py b/sources/pyside2/tests/QtCore/deepcopy_test.py
deleted file mode 100644
index 2fafea354..000000000
--- a/sources/pyside2/tests/QtCore/deepcopy_test.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from copy import deepcopy
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
-from PySide2.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QDir, QPoint, QPointF
-try:
- from PySide2.QtCore import QUuid
- HAVE_Q = True
-except ImportError:
- HAVE_Q = False
-
-class DeepCopyHelper:
- def testCopy(self):
- copy = deepcopy([self.original])[0]
- self.assertTrue(copy is not self.original)
- self.assertEqual(copy, self.original)
-
-class QByteArrayDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QByteArray(bytes('the quick brown fox jumps over the lazy dog', "UTF-8"))
-
-
-class QDateDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QDate(2010, 11, 22)
-
-
-class QTimeDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QTime(11, 37, 55, 692)
-
-
-class QDateTimeDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QDateTime(2010, 5, 18, 10, 24, 45, 223, Qt.LocalTime)
-
-
-class QSizeDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QSize(42, 190)
-
-
-class QSizeFDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QSizeF(42.7, 190.2)
-
-
-class QRectDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QRect(100, 200, 300, 400)
-
-
-class QRectFDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QRectF(100.33, 200.254, 300.321, 400.123)
-
-class QLineDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QLine(1, 2, 3, 4)
-
-class QLineFDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QLineF(1.1, 2.2, 3.3, 4.4)
-
-class QPointDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QPoint(1, 2)
-
-class QPointFDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QPointF(1.1, 2.2)
-
-class QDirDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QDir("./")
-
-class QUuiCopy(DeepCopyHelper, unittest.TestCase):
- @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
- def setUp(self):
- self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/deletelater_test.py b/sources/pyside2/tests/QtCore/deletelater_test.py
deleted file mode 100644
index 62268c1d0..000000000
--- a/sources/pyside2/tests/QtCore/deletelater_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QTimer.singleShot'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer, QCoreApplication, SIGNAL
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class TestDeleteLater(UsesQCoreApplication):
- '''Test case for function DeleteLater'''
-
- def testCase(self):
- o = QObject()
- o.deleteLater()
- del o
- QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/destroysignal_test.py b/sources/pyside2/tests/QtCore/destroysignal_test.py
deleted file mode 100644
index 1396a487b..000000000
--- a/sources/pyside2/tests/QtCore/destroysignal_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer, QObject
-
-
-class TestDestroySignal(unittest.TestCase):
- def onObjectDestroyed(self, timer):
- self.assertTrue(isinstance(timer, QObject))
- self._destroyed = True
-
- def testSignal(self):
- self._destroyed = False
- t = QTimer()
- t.destroyed[QObject].connect(self.onObjectDestroyed)
- del t
- self.assertTrue(self._destroyed)
-
- def testWithParent(self):
- self._destroyed = False
- p = QTimer()
- t = QTimer(p)
- t.destroyed[QObject].connect(self.onObjectDestroyed)
- del p
- self.assertTrue(self._destroyed)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/duck_punching_test.py b/sources/pyside2/tests/QtCore/duck_punching_test.py
deleted file mode 100644
index a735ecfa6..000000000
--- a/sources/pyside2/tests/QtCore/duck_punching_test.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for duck punching new implementations of C++ virtual methods into object instances.'''
-
-import os
-import sys
-import types
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-def MethodType(func, instance, instanceType):
- return types.MethodType(func, instance)
-
-class Duck(QObject):
- def __init__(self):
- QObject.__init__(self)
- def childEvent(self, event):
- QObject.childEvent(self, event)
-
-class TestDuckPunchingOnQObjectInstance(UsesQCoreApplication):
- '''Test case for duck punching new implementations of C++ virtual methods into object instances.'''
-
- def setUp(self):
- #Acquire resources
- self.duck_childEvent_called = False
- UsesQCoreApplication.setUp(self)
-
- def tearDown(self):
- #Release resources
- del self.duck_childEvent_called
- UsesQCoreApplication.tearDown(self)
-
-
- def testChildEventMonkeyPatch(self):
- #Test if the new childEvent injected on QObject instance is called from C++
- parent = QObject()
- def childEvent(obj, event):
- self.duck_childEvent_called = True
- parent.childEvent = MethodType(childEvent, parent, QObject)
- child = QObject()
- child.setParent(parent)
- self.assertTrue(self.duck_childEvent_called)
- # This is done to decrease the refcount of the vm object
- # allowing the object wrapper to be deleted before the
- # BindingManager. This is useful when compiling Shiboken
- # for debug, since the BindingManager destructor has an
- # assert that checks if the wrapper mapper is empty.
- parent.childEvent = None
-
- def testChildEventMonkeyPatchWithInheritance(self):
- #Test if the new childEvent injected on a QObject's extension class instance is called from C++
- parent = Duck()
- def childEvent(obj, event):
- QObject.childEvent(obj, event)
- self.duck_childEvent_called = True
- child = QObject()
- child.setParent(parent)
- parent.childEvent = MethodType(childEvent, parent, QObject)
- child = QObject()
- child.setParent(parent)
- self.assertTrue(self.duck_childEvent_called)
- # This is done to decrease the refcount of the vm object
- # allowing the object wrapper to be deleted before the
- # BindingManager. This is useful when compiling Shiboken
- # for debug, since the BindingManager destructor has an
- # assert that checks if the wrapper mapper is empty.
- parent.childEvent = None
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/emoji_string_test.py b/sources/pyside2/tests/QtCore/emoji_string_test.py
deleted file mode 100644
index 0bf088dee..000000000
--- a/sources/pyside2/tests/QtCore/emoji_string_test.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# This Python file uses the following encoding: utf-8
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-emoji-string-test.py
-
-This is the original code from the bug report
-https://bugreports.qt.io/browse/PYSIDE-336
-
-The only changes are the emoji constant creation which avoids unicode in the
-source itself, utf8 encoding in line 1 and a short plausibility test to make
-it safely fail.
-"""
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtCore
-
-emoji_str = u'\U0001f632' + u' ' # "😲 "
-
-class TestStuff(QtCore.QObject):
- testsig = QtCore.Signal(str)
-
- def a_nop(self, sendMeAnEmoji):
- print(sendMeAnEmoji)
- return
-
- def __init__(self):
- super(TestStuff, self).__init__()
- self.testsig.connect(self.a_nop)
- self.testsig.emit(emoji_str)
-
- def plausi(self):
- # Python 2 may be built with UCS-2 or UCS-4 support.
- # UCS-2 creates 2 surrogate code points. See
- # https://stackoverflow.com/questions/30775689/python-length-of-unicode-string-confusion
- assert len(emoji_str) == 2 if sys.maxunicode > 0xffff else 3
-
-if __name__ == "__main__":
- mything = TestStuff()
- mything.plausi()
diff --git a/sources/pyside2/tests/QtCore/hash_test.py b/sources/pyside2/tests/QtCore/hash_test.py
deleted file mode 100644
index 9ef1dfe08..000000000
--- a/sources/pyside2/tests/QtCore/hash_test.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QDate, QDateTime, QTime, QUrl
-from PySide2.QtCore import QLine, QPoint, QRect, QSize
-
-class HashTest(unittest.TestCase):
- def testInsert(self):
- myHash = {}
- qdate = QDate.currentDate()
- qdatetime = QDateTime.currentDateTime()
- qtime = QTime.currentTime()
- qurl = QUrl("http://www.pyside.org")
- qpoint = QPoint(12, 42)
-
- myHash[qdate] = "QDate"
- myHash[qdatetime] = "QDateTime"
- myHash[qtime] = "QTime"
- myHash[qurl] = "QUrl"
- myHash[qpoint] = "QPoint"
-
- self.assertEqual(myHash[qdate], "QDate")
- self.assertEqual(myHash[qdatetime], "QDateTime")
- self.assertEqual(myHash[qtime], "QTime")
- self.assertEqual(myHash[qurl], "QUrl")
- self.assertEqual(myHash[qpoint], "QPoint")
-
- def testQPointHash(self):
- p1 = QPoint(12, 34)
- p2 = QPoint(12, 34)
- self.assertFalse(p1 is p2)
- self.assertEqual(p1, p2)
- self.assertEqual(hash(p1), hash(p2))
-
- def testQSizeHash(self):
- s1 = QSize(12, 34)
- s2 = QSize(12, 34)
- self.assertFalse(s1 is s2)
- self.assertEqual(s1, s2)
- self.assertEqual(hash(s1), hash(s2))
-
- def testQRectHash(self):
- r1 = QRect(12, 34, 56, 78)
- r2 = QRect(12, 34, 56, 78)
- self.assertFalse(r1 is r2)
- self.assertEqual(r1, r2)
- self.assertEqual(hash(r1), hash(r2))
-
- def testQLineHash(self):
- l1 = QLine(12, 34, 56, 78)
- l2 = QLine(12, 34, 56, 78)
- self.assertFalse(l1 is l2)
- self.assertEqual(l1, l2)
- self.assertEqual(hash(l1), hash(l2))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/inherits_test.py b/sources/pyside2/tests/QtCore/inherits_test.py
deleted file mode 100644
index d8b68d816..000000000
--- a/sources/pyside2/tests/QtCore/inherits_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class MyObject(QObject):
- pass
-
-class MainTest(unittest.TestCase):
- def testInherits(self):
- o = MyObject()
- mo = o.metaObject()
- self.assertEqual(mo.className(), 'MyObject')
- self.assertTrue(o.inherits('MyObject'))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/max_signals.py b/sources/pyside2/tests/QtCore/max_signals.py
deleted file mode 100644
index 46fd1ba4f..000000000
--- a/sources/pyside2/tests/QtCore/max_signals.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-class MyObject(QObject):
- pass
-
-
-class TestSignalLimitless(unittest.TestCase):
- SIGNAL_MAX = 100
- def test100DynamicSignals(self):
-
- self.count = 0
- def onSignal():
- self.count += 1
-
- #create 100 dynamic signals
- o = MyObject()
- for i in range(self.SIGNAL_MAX):
- o.connect(SIGNAL('sig%d()'%i), onSignal)
-
- #chek if the signals are valid
- m = o.metaObject()
- for i in range(self.SIGNAL_MAX):
- self.assertTrue(m.indexOfSignal('sig%d()'%i) > 0)
-
- #emit all 100 signals
- for i in range(self.SIGNAL_MAX):
- o.emit(SIGNAL('sig%d()'%i))
-
- self.assertEqual(self.count, self.SIGNAL_MAX)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/missing_symbols_test.py b/sources/pyside2/tests/QtCore/missing_symbols_test.py
deleted file mode 100644
index a69603e1a..000000000
--- a/sources/pyside2/tests/QtCore/missing_symbols_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''(Very) Simple test case for missing names from QtCore'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-class MissingClasses(unittest.TestCase):
-
- def testQSettings(self): # Bug 232
- getattr(QtCore, 'QSettings')
-
- def testQtTrNoop(self): # Bug 220
- getattr(QtCore, 'QT_TR_NOOP')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/mockclass_test.py b/sources/pyside2/tests/QtCore/mockclass_test.py
deleted file mode 100644
index 9fb689e6e..000000000
--- a/sources/pyside2/tests/QtCore/mockclass_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Test case for PySide bug 634
-# http://bugs.pyside.org/show_bug.cgi?id=634
-# Marcus Lindblom <macke@yar.nu>; 2011-02-16
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication
-
-class Mock(object):
- def __init__(self):
- self.called = False
- self.return_value = None
-
- def __call__(self, *args, **kwargs):
- self.called = True
- return self.return_value
-
-
-class MockClassTest(unittest.TestCase):
- def testMockQCoreApplication(self):
- mock = Mock()
- setattr(QCoreApplication, 'instance', mock)
- QCoreApplication.instance()
- self.assertTrue(mock.called)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/multiple_feature_test.py b/sources/pyside2/tests/QtCore/multiple_feature_test.py
deleted file mode 100644
index 329e513fb..000000000
--- a/sources/pyside2/tests/QtCore/multiple_feature_test.py
+++ /dev/null
@@ -1,141 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-from PySide2.support import __feature__
-from textwrap import dedent
-
-"""
-multiple_feature_test.py
-------------------------
-
-This tests the selectable features in PySide.
-
-The first feature is `snake_case` instead of `camelCase`.
-There is much more to come.
-"""
-
-MethodDescriptorType = type(str.split)
-
-class FeaturesTest(unittest.TestCase):
-
- def testAllFeatureCombinations(self):
- """
- Test for all 256 possible combinations of `__feature__` imports.
- """
-
- def tst_bit0(flag, self, bits):
- if flag == 0:
- QtCore.QCborArray.isEmpty
- QtCore.QCborArray.__dict__["isEmpty"]
- with self.assertRaises(AttributeError):
- QtCore.QCborArray.is_empty
- with self.assertRaises(KeyError):
- QtCore.QCborArray.__dict__["is_empty"]
- else:
- QtCore.QCborArray.is_empty
- QtCore.QCborArray.__dict__["is_empty"]
- with self.assertRaises(AttributeError):
- QtCore.QCborArray.isEmpty
- with self.assertRaises(KeyError):
- QtCore.QCborArray.__dict__["isEmpty"]
-
- def tst_bit1(flag, self, bits):
- getter_name = "object_name" if bits & 1 else "objectName"
- setter_name = "set_object_name" if bits & 1 else "setObjectName"
- thing = getattr(QtCore.QObject, getter_name)
- if flag:
- self.assertEqual(type(thing), property)
- with self.assertRaises(AttributeError):
- getattr(QtCore.QObject, setter_name)
- else:
- self.assertEqual(type(thing), MethodDescriptorType)
- getattr(QtCore.QObject, setter_name)
-
- edict = {}
- for bit in range(2, 8):
- # We are cheating here, since the functions are in the globals.
-
- eval(compile(dedent("""
-
- def tst_bit{0}(flag, self, bits):
- if flag == 0:
- with self.assertRaises(AttributeError):
- QtCore.QCborArray.fake_feature_{1:02x}
- with self.assertRaises(KeyError):
- QtCore.QCborArray.__dict__["fake_feature_{1:02x}"]
- else:
- QtCore.QCborArray.fake_feature_{1:02x}
- QtCore.QCborArray.__dict__["fake_feature_{1:02x}"]
-
- """).format(bit, 1 << bit), "<string>", "exec"), globals(), edict)
- globals().update(edict)
- feature_list = __feature__._really_all_feature_names
- func_list = [tst_bit0, tst_bit1, tst_bit2, tst_bit3,
- tst_bit4, tst_bit5, tst_bit6, tst_bit7]
-
- for idx in range(0x100):
- __feature__.set_selection(0)
- config = "feature_{:02x}".format(idx)
- print()
- print("--- Feature Test Config `{}` ---".format(config))
- print("Imports:")
- for bit in range(8):
- if idx & 1 << bit:
- feature = feature_list[bit]
- text = "from __feature__ import {}".format(feature)
- print(text)
- eval(compile(text, "<string>", "exec"), globals(), edict)
- for bit in range(8):
- value = idx & 1 << bit
- func_list[bit](value, self=self, bits=idx)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/python_conversion.py b/sources/pyside2/tests/QtCore/python_conversion.py
deleted file mode 100644
index a32529a17..000000000
--- a/sources/pyside2/tests/QtCore/python_conversion.py
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QLineF'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import datetime
-
-from PySide2.QtCore import QTime, QDateTime, QDate
-
-class TestDateTimeConversions (unittest.TestCase):
- def testQDate(self):
- date = datetime.date(2010, 4, 23)
- other = QDate(date)
- self.assertEqual(date.year, other.year())
- self.assertEqual(date.month, other.month())
- self.assertEqual(date.day, other.day())
-
- self.assertEqual(date, other.toPython())
-
- def testQTime(self):
- time = datetime.time(11, 14, 0, 1000)
- other = QTime(time)
- self.assertEqual(time.hour, other.hour())
- self.assertEqual(time.minute, other.minute())
- self.assertEqual(time.second, other.second())
- self.assertEqual(time.microsecond/1000, other.msec())
-
- self.assertEqual(time, other.toPython())
-
- def testQDateTime(self):
- dateTime = datetime.datetime(2010, 4, 23, 11, 14, 0, 1000)
- other = QDateTime(dateTime)
-
- otherDate = other.date()
- self.assertEqual(dateTime.year, otherDate.year())
- self.assertEqual(dateTime.month, otherDate.month())
- self.assertEqual(dateTime.day, otherDate.day())
-
- otherTime = other.time()
- self.assertEqual(dateTime.hour, otherTime.hour())
- self.assertEqual(dateTime.minute, otherTime.minute())
- self.assertEqual(dateTime.second, otherTime.second())
- self.assertEqual(dateTime.microsecond/1000, otherTime.msec())
-
- self.assertEqual(dateTime, other.toPython())
-
- def testQDateTime6arg(self):
- dateTime = datetime.datetime(2010, 4, 23, 11, 14, 7)
- other = QDateTime(dateTime)
-
- otherDate = other.date()
- self.assertEqual(dateTime.year, otherDate.year())
- self.assertEqual(dateTime.month, otherDate.month())
- self.assertEqual(dateTime.day, otherDate.day())
-
- otherTime = other.time()
- self.assertEqual(dateTime.hour, otherTime.hour())
- self.assertEqual(dateTime.minute, otherTime.minute())
- self.assertEqual(dateTime.second, otherTime.second())
- self.assertEqual(dateTime.microsecond/1000, otherTime.msec())
-
- self.assertEqual(dateTime, other.toPython())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qabs_test.py b/sources/pyside2/tests/QtCore/qabs_test.py
deleted file mode 100644
index a63f37293..000000000
--- a/sources/pyside2/tests/QtCore/qabs_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-class QAbsTest(unittest.TestCase):
- '''Tests for QtCore.qAbs'''
-
- def testBasic(self):
- def check(x):
- self.assertEqual(QtCore.qAbs(x), abs(x))
-
- check(0)
- check(-10)
- check(10)
- check(10.5)
- check(-10.5)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py b/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py
deleted file mode 100644
index 2901f4dcc..000000000
--- a/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyModel (QAbstractListModel):
- pass
-
-
-class TestQModelIndexInternalPointer(unittest.TestCase):
-
- def testInternalPointer(self):
- m = MyModel()
- foo = QObject()
- idx = m.createIndex(0,0, foo)
- check = m.checkIndex(idx, QAbstractItemModel.CheckIndexOption.IndexIsValid
- | QAbstractItemModel.CheckIndexOption.DoNotUseParent
- | QAbstractItemModel.CheckIndexOption.ParentIsInvalid)
- self.assertTrue(check)
-
- def testPassQPersistentModelIndexAsQModelIndex(self):
- # Related to bug #716
- m = MyModel()
- idx = QPersistentModelIndex()
- m.span(idx)
-
- def testQIdentityProxyModel(self):
- sourceModel = QStringListModel(['item1', 'item2'])
- sourceIndex = sourceModel.index(0, 0)
- sourceData = str(sourceModel.data(sourceIndex, Qt.DisplayRole))
- proxyModel = QIdentityProxyModel()
- proxyModel.setSourceModel(sourceModel)
- proxyIndex = proxyModel.mapFromSource(sourceIndex)
- proxyData = str(proxyModel.data(proxyIndex, Qt.DisplayRole))
- self.assertEqual(sourceData, proxyData)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qanimationgroup_test.py b/sources/pyside2/tests/QtCore/qanimationgroup_test.py
deleted file mode 100644
index 961d1a754..000000000
--- a/sources/pyside2/tests/QtCore/qanimationgroup_test.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class QAnimationGroupTest(unittest.TestCase):
-
- def testBasic(self):
- app = QCoreApplication([])
-
- panim = QParallelAnimationGroup()
- sanim = QSequentialAnimationGroup()
- panim.addAnimation(sanim)
-
- self.assertEqual(sanim.parent(), panim)
-
- panim.clear()
-
- self.assertRaises(RuntimeError, lambda :sanim.parent())
-
- QTimer.singleShot(100, app.quit)
- app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qbitarray_test.py b/sources/pyside2/tests/QtCore/qbitarray_test.py
deleted file mode 100644
index d8d1d5147..000000000
--- a/sources/pyside2/tests/QtCore/qbitarray_test.py
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests if QBitArray class is iterable and also '~' (__invert__) and bitwise operators'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QBitArray
-
-def bool_list_from_qbitarray(qbitarray):
- '''This function is used instead of a list comprehension because
- the QBitArray is being tested also to check if it is providing
- the iterable protocol.
- '''
- qbitarray_values = []
- for i in range(qbitarray.size()):
- qbitarray_values.append(qbitarray.at(i))
- return qbitarray_values
-
-class QBitArrayIsIterableTest(unittest.TestCase):
- '''Tests if QBitArray class is iterable and also '~' (__invert__) and bitwise operators'''
-
- def setUp(self):
- #Acquire resources
- self.qbitarray = QBitArray(3)
- self.qbitarray_values = [True, False, False]
- # WARNING: do not pythonify the following loop
- for i in range(len(self.qbitarray_values)):
- self.qbitarray.setBit(i, self.qbitarray_values[i])
-
- self.inverted_qbitarray_values = [not bit for bit in self.qbitarray_values]
-
- self.other_qbitarray = QBitArray(3)
- self.other_qbitarray_values = [True, True, False]
- # WARNING: do not pythonify the following loop
- for i in range(len(self.other_qbitarray_values)):
- self.other_qbitarray.setBit(i, self.other_qbitarray_values[i])
-
- def tearDown(self):
- #Release resources
- del self.qbitarray
- del self.other_qbitarray
- del self.qbitarray_values
- del self.other_qbitarray_values
- del self.inverted_qbitarray_values
-
- def testQBitArrayIsIterable(self):
- #Tests if QBitArray class is iterable
- qbitarray_is_iterable = True
- try:
- bitarray = [bit for bit in self.qbitarray]
- except:
- qbitarray_is_iterable = False
- self.assertTrue(qbitarray_is_iterable)
-
- def testQBitArrayInvertOperator(self):
- #Tests QBitArray '~' (__invert__) operator
- inverted_qbitarray = ~self.qbitarray
- # WARNING: do not pythonify the following loop, the
- # iterability of QBitArray class is tested in another place
- inverted_qbitarray_values = bool_list_from_qbitarray(inverted_qbitarray)
- self.assertEqual(self.inverted_qbitarray_values, inverted_qbitarray_values)
-
- def testQBitArrayOrBitwiseOperator(self):
- #Tests QBitArray '|' (or) operator
- has_or_bitwise_operator = True
- ored_qbitarray, ored_bool_list = None, None
- try:
- ored_qbitarray = self.qbitarray | self.other_qbitarray
- ored_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
- except:
- has_or_bitwise_operator = False
- self.assertTrue(has_or_bitwise_operator)
- self.assertEqual(bool_list_from_qbitarray(ored_qbitarray), ored_bool_list)
-
- def testQBitArrayAndBitwiseOperator(self):
- #Tests QBitArray '&' (and) operator
- has_and_bitwise_operator = True
- anded_qbitarray, anded_bool_list = None, None
- try:
- anded_qbitarray = self.qbitarray | self.other_qbitarray
- anded_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
- except:
- has_and_bitwise_operator = False
- self.assertTrue(has_and_bitwise_operator)
- self.assertEqual(bool_list_from_qbitarray(anded_qbitarray), anded_bool_list)
-
- def testQBitArrayXorBitwiseOperator(self):
- #Tests QBitArray '^' (xor) operator
- has_xor_bitwise_operator = True
- xored_qbitarray, xored_bool_list = None, None
- try:
- xored_qbitarray = self.qbitarray | self.other_qbitarray
- xored_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
- except:
- has_xor_bitwise_operator = False
- self.assertTrue(has_xor_bitwise_operator)
- self.assertEqual(bool_list_from_qbitarray(xored_qbitarray), xored_bool_list)
-
-
-class QBitArrayGetItemTest(unittest.TestCase):
- '''Test case for []/__getitem__ operator'''
-
- def create_bitarray(self, values):
- '''helper function to create a bit array'''
- obj = QBitArray(len(values))
- for i, value in enumerate(values):
- obj.setBit(i, value)
- return obj
-
- def testSequenceProtocol(self):
- '''QBitArray sequence protocol'''
- data = [True, False, True]
- obj = self.create_bitarray(data)
- for reference, value in zip(data, obj):
- self.assertEqual(reference, value)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py b/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
deleted file mode 100644
index 6d369bf0b..000000000
--- a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QByteArray concatenation with '+' operator'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray
-
-
-class QByteArrayConcatenationOperatorTest(unittest.TestCase):
- '''Test cases for QByteArray concatenation with '+' operator'''
-
- def testConcatQByteArrayAndPythonString(self):
- #Test concatenation of a QByteArray with a Python bytes, in this order
- qba = QByteArray(bytes('foo', "UTF-8"))
- result = qba + bytes('\x00bar', "UTF-8")
- self.assertEqual(type(result), QByteArray)
- self.assertEqual(result, bytes('foo\x00bar', "UTF-8"))
-
- def testConcatPythonStringAndQByteArray(self):
- #Test concatenation of a Python bytes with a QByteArray, in this order
- concat_python_string_add_qbytearray_worked = True
- qba = QByteArray(bytes('foo', "UTF-8"))
- result = bytes('bar\x00', "UTF-8") + qba
- self.assertEqual(type(result), QByteArray)
- self.assertEqual(result, bytes('bar\x00foo', "UTF-8"))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py b/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py
deleted file mode 100644
index da9ca5b38..000000000
--- a/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray
-from helper.docmodifier import DocModifier
-
-
-class BaseQByteArrayOperatorIAdd(object):
- '''Base class for QByteArray += operator tests.
-
- Implementing classes should inherit from unittest.TestCase and implement
- setUp, setting self.obj and self.orig_obj to the target QByteArray and original
- one, respectively'''
-
- __metaclass__ = DocModifier
-
- def testSingleString(self):
- '''QByteArray += bytes of size 1'''
- s = bytes('0', "UTF-8")
- self.obj += s
- self.assertEqual(self.obj, self.orig_obj + s)
- self.assertEqual(self.obj.size(), self.orig_obj.size() + len(s))
-
- def testString(self):
- '''QByteArray += bytes of size > 1'''
- s = bytearray(bytes('dummy', "UTF-8"))
- self.obj += s # XXx iadd support abytearray
- self.assertEqual(self.obj, self.orig_obj + s)
- self.assertEqual(self.obj.size(), self.orig_obj.size() + len(s))
-
- def testQByteArray(self):
- '''QByteArray += QByteArray'''
- s = QByteArray(bytes('array', "UTF-8"))
- self.obj += s
- self.assertEqual(self.obj, self.orig_obj + s)
-
-
-class NullQByteArrayOperatorIAdd(unittest.TestCase, BaseQByteArrayOperatorIAdd):
- '''Test case for operator QByteArray += on null QByteArrays'''
-
- doc_prefix = 'Null object'
- doc_filter = lambda x: x.startswith('test')
-
- def setUp(self):
- self.obj = QByteArray()
- self.orig_obj = QByteArray()
-
-
-class ValidQByteArrayOperatorIAdd(unittest.TestCase, BaseQByteArrayOperatorIAdd):
- '''Test case for operator QByteArray += on valid QByteArrays'''
-
- doc_prefix = 'Valid object'
- doc_filter = lambda x: x.startswith('test')
-
- def setUp(self):
- self.obj = QByteArray(bytes('some byte array', "UTF-8"))
- self.orig_obj = QByteArray(bytes('some byte array', "UTF-8"))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qbytearray_operator_test.py b/sources/pyside2/tests/QtCore/qbytearray_operator_test.py
deleted file mode 100644
index 01000341c..000000000
--- a/sources/pyside2/tests/QtCore/qbytearray_operator_test.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QByteArray operators'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray
-
-class QByteArrayOperatorEqual(unittest.TestCase):
- '''TestCase for operator QByteArray == QByteArray'''
-
- def testDefault(self):
- #QByteArray() == QByteArray()
- obj1 = QByteArray()
- obj2 = QByteArray()
- self.assertEqual(obj1, obj2)
-
- def testSimple(self):
- #QByteArray(some_string) == QByteArray(some_string)
- string = bytes('egg snakes', "UTF-8")
- self.assertEqual(QByteArray(string), QByteArray(string))
-
- def testPyString(self):
- #QByteArray(string) == string
- string = bytes('my test string', "UTF-8")
- self.assertEqual(QByteArray(string), string)
-
-class QByteArrayOperatorAt(unittest.TestCase):
- '''TestCase for operator QByteArray[]'''
-
- def testInRange(self):
- #QByteArray[x] where x is a valid index
- string = 'abcdefgh'
- obj = QByteArray(bytes(string, "UTF-8"))
-
- for i in range(len(string)):
- self.assertEqual(obj[i], bytes(string[i], "UTF-8"))
-
- def testInRangeReverse(self):
- #QByteArray[x] where x is a valid index (reverse order)
- string = 'abcdefgh'
- obj = QByteArray(bytes(string, "UTF-8"))
-
- for i in range(len(string)-1, 0, -1):
- self.assertEqual(obj[i], bytes(string[i], "UTF-8"))
-
-
- def testOutOfRange(self):
- #QByteArray[x] where x is out of index
- string = bytes('1234567', "UTF-8")
- obj = QByteArray(string)
- self.assertRaises(IndexError, lambda :obj[len(string)])
-
- def testNullStrings(self):
- ba = QByteArray(bytes('\x00', "UTF-8"))
- self.assertEqual(ba.at(0), '\x00')
- self.assertEqual(ba[0], bytes('\x00', "UTF-8"))
-
-class QByteArrayOperatorLen(unittest.TestCase):
- '''Test case for __len__ operator of QByteArray'''
-
- def testBasic(self):
- '''QByteArray __len__'''
- self.assertEqual(len(QByteArray()), 0)
- self.assertEqual(len(QByteArray(bytes('', "UTF-8"))), 0)
- self.assertEqual(len(QByteArray(bytes(' ', "UTF-8"))), 1)
- self.assertEqual(len(QByteArray(bytes('yabadaba', "UTF-8"))), 8)
-
-
-class QByteArrayOperatorStr(unittest.TestCase):
- '''Test case for __str__ operator of QByteArray'''
-
- def testBasic(self):
- '''QByteArray __str__'''
- self.assertEqual(QByteArray().__str__(), str(b''))
- self.assertEqual(QByteArray(bytes('', "UTF-8")).__str__(), str(b''))
- self.assertEqual(QByteArray(bytes('aaa', "UTF-8")).__str__(), str(b'aaa'))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qbytearray_test.py b/sources/pyside2/tests/QtCore/qbytearray_test.py
deleted file mode 100644
index 529941706..000000000
--- a/sources/pyside2/tests/QtCore/qbytearray_test.py
+++ /dev/null
@@ -1,279 +0,0 @@
-# -*- coding:utf-8 -*-
-# !/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QByteArray'''
-
-import ctypes
-import os
-import pickle
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-
-from PySide2.QtCore import QByteArray, QSettings, QObject, QDataStream, QIODevice
-
-class QByteArrayTestToNumber(unittest.TestCase):
- def testToNumberInt(self):
- obj = QByteArray(bytes('37', "UTF8"))
- self.assertEqual((37, True), obj.toInt())
-
- def testToNumberUShort(self):
- obj = QByteArray(bytes('37', "UTF8"))
- self.assertEqual((37, True), obj.toUShort())
-
- def testToNumberFloat(self):
- obj = QByteArray(bytes('37.109', "UTF8"))
- self.assertEqual((ctypes.c_float(37.109).value, True),
- obj.toFloat())
-
- def testToNumberDouble(self):
- obj = QByteArray(bytes('37.109', "UTF8"))
- self.assertEqual((ctypes.c_double(37.109).value, True),
- obj.toDouble())
-
- def testSetNum(self):
- b = QByteArray()
- b.setNum(int(-124124))
- self.assertEqual(b, "-124124")
- b = QByteArray()
- b.setNum(-124124)
- self.assertEqual(b, "-124124")
- b = QByteArray()
- b.setNum(-0.5)
- self.assertEqual(b, "-0.5")
-
- def testNumber(self):
- b = QByteArray.number(int(-124124))
- self.assertEqual(b, "-124124")
- b = QByteArray.number(-124124)
- self.assertEqual(b, "-124124")
- b = QByteArray.number(-0.5)
- self.assertEqual(b, "-0.5")
-
- def testAppend(self):
- b = QByteArray()
- b.append(bytes("A", "UTF8"))
- self.assertEqual(b.size(), 1)
- b.append(bytes("AB", "UTF8"))
- self.assertEqual(b.size(), 3)
-
-
-class QByteArraySplit(unittest.TestCase):
- '''Test case for QByteArray.split'''
-
- def testPathSeparator(self):
- #QByteArray.split('/')
- obj = QByteArray(bytes(unittest.__file__, "UTF8"))
- self.assertEqual(obj.split('/'), unittest.__file__.split('/'))
-
-class QByteArrayData(unittest.TestCase):
-
- '''Test case for QByteArray.data'''
-
- def testData(self):
- url = QByteArray(bytes("http://pyside.org", "UTF8"))
- self.assertEqual(url.data(), bytes("http://pyside.org", "UTF8"))
-
- def testDataWithZeros(self):
- s1 = bytes("123\000321", "UTF8")
- ba = QByteArray(s1)
- s2 = ba.data()
- self.assertEqual(s1, s2)
- self.assertEqual(s1, ba)
-
-class QByteArrayOperatorAtSetter(unittest.TestCase):
- '''Test case for operator QByteArray[] - __setitem__'''
-
- def testSetterString(self):
- '''QByteArray[x] = pythonstring'''
- obj = QByteArray(bytes('123456', "UTF8"))
- obj[1] = bytes('0', "UTF8")
- self.assertEqual(obj, QByteArray(bytes('103456', "UTF8")))
-
-class QByteArrayOnQDataStream(unittest.TestCase):
- '''
- Bug PYSIDE-232
- '''
- def testIt(self):
- a = QByteArray()
- b = QDataStream(a, QIODevice.WriteOnly)
- b.writeUInt16(5000)
- # The __repr__ not suppose to crash anymore
- self.assertNotEqual(repr(b), None)
-
-class TestBug664(unittest.TestCase):
- '''
- QByteArray.data() should return correct data
- '''
- def testIt(self):
- a = QByteArray(bytes('hi 猫', "UTF-8"))
- self.assertEqual(repr(a), "PySide2.QtCore.QByteArray(b'hi \\xe7\\x8c\\xab')")
-
-
-class QByteArrayOnQVariant(unittest.TestCase):
- def testQByteArrayOnQVariant(self):
- a = QSettings().value("some_prop", QByteArray())
- self.assertEqual(type(a), QByteArray)
-
-class TestBug567(unittest.TestCase):
- '''
- QByteArray should support slices
- '''
- def testIt(self):
- ba = QByteArray(bytes('1234567890', "UTF8"))
- self.assertEqual(ba[2:4], '34')
- self.assertEqual(ba[:4], '1234')
- self.assertEqual(ba[4:], '567890')
- self.assertEqual(len(ba[4:1]), 0)
- self.assertEqual(ba[::-1], '0987654321')
- self.assertEqual(ba[::2], '13579')
- self.assertEqual(ba[::-2], '08642')
- self.assertEqual(ba[2:8:3], '36')
-
-
-class TestPickler(unittest.TestCase):
- def testIt(self):
- ba = QByteArray(bytes("321\x00123", "UTF8"))
- output = pickle.dumps(str(ba))
- ba2 = pickle.loads(output)
- self.assertEqual(str(ba), str(ba2))
-
-class QByteArrayBug720(unittest.TestCase):
- def testIt(self):
- ba = QByteArray(bytes("32\"1\x00123", "UTF8"))
- self.assertEqual(str(ba), str(bytes("32\"1\x00123", "UTF-8")))
- self.assertEqual(repr(ba), "PySide2.QtCore.QByteArray(b'32\"1\\x00123')")
-
-class QByteArrayImplicitConvert(unittest.TestCase):
- def testString(self):
- # No implicit conversions from QByteArray to python string
- ba = QByteArray(bytes("object name", "UTF8"))
- obj = QObject()
- self.assertRaises(TypeError, obj.setObjectName, ba)
-
-
-class QByteArraySliceAssignment(unittest.TestCase):
- def testIndexAssignment(self):
- a = QByteArray(bytes('abc', "UTF8"))
- a[0] = bytes('x', "UTF8")
- self.assertEqual(a[0], bytes('x', "UTF8"))
-
- def test_1():
- a[0] = bytes('xy', "UTF8")
- self.assertRaises(ValueError, test_1)
-
- def testSliceAssignmentBytes(self):
- b = QByteArray(bytes('0123456789', "UTF8"))
- b[2:8] = bytes('abcdef', "UTF8")
- self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
- # Delete behavior
- b[2:8] = None
- self.assertEqual(b, bytes('0189', "UTF8"))
-
- # number of slots and number of values doesn't match
- def test_2():
- b[2:8:2] = bytes('', "UTF8")
- self.assertRaises(ValueError, test_2)
- b = QByteArray(bytes('0123456789', "UTF8"))
- # reverse slice
- b[5:2:-1] = bytes('ABC', "UTF8")
- self.assertEqual(b, bytes('012CBA6789', "UTF8"))
- # step is not 1
- b[2:9:3] = bytes('XYZ', "UTF8")
- self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
- b = QByteArray(bytes('0123456789', "UTF8"))
- b[9:2:-3] = bytes('XYZ', "UTF8")
- self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
-
- def testSliceAssignmentQByteArray(self):
- b = QByteArray(bytes('0123456789', "UTF8"))
- b[2:8] = QByteArray(bytes('abcdef', "UTF8"))
- self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
- # shrink
- b[2:8] = QByteArray(bytes('aaa', "UTF8"))
- self.assertEqual(b, bytes('01aaa89', "UTF8"))
- # expanse
- b[2:5] = QByteArray(bytes('uvwxyz', "UTF8"))
- self.assertEqual(b, bytes('01uvwxyz89', "UTF8"))
- # Delete behavior
- b[2:8] = QByteArray()
- self.assertEqual(b, bytes('0189', "UTF8"))
-
- b = QByteArray(bytes('0123456789', "UTF8"))
- # reverse assginment
- b[5:2:-1] = QByteArray(bytes('ABC', "UTF8"))
- self.assertEqual(b, bytes('012CBA6789', "UTF8"))
- # step is not 1
- b[2:9:3] = QByteArray(bytes('XYZ', "UTF8"))
- self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
- b = QByteArray(bytes('0123456789', "UTF8"))
- b[9:2:-3] = QByteArray(bytes('XYZ', "UTF8"))
- self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
-
- def testSliceAssignmentByteArray(self):
- b = QByteArray(bytes('0123456789', "UTF8"))
- # replace
- b[2:8] = bytearray(bytes('abcdef', "UTF8"))
- self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
- # shrink
- b[2:8] = bytearray(bytes('aaa', "UTF8"))
- self.assertEqual(b, bytes('01aaa89', "UTF8"))
- # expanse
- b[2:5] = bytearray(bytes('uvwxyz', "UTF8"))
- self.assertEqual(b, bytes('01uvwxyz89', "UTF8"))
- # Delete behavior
- b[2:8] = bytearray(bytes('', "UTF8"))
- self.assertEqual(b, bytes('0189', "UTF8"))
-
- b = QByteArray(bytes('0123456789', "UTF8"))
- # reverse assginment
- b[5:2:-1] = bytearray(bytes('ABC', "UTF8"))
- self.assertEqual(b, bytes('012CBA6789', "UTF8"))
- # step is not 1
- b[2:9:3] = bytearray(bytes('XYZ', "UTF8"))
- self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
- b = QByteArray(bytes('0123456789', "UTF8"))
- b[9:2:-3] = bytearray(bytes('XYZ', "UTF8"))
- self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
-
- def testBufferProtocol(self):
- orig_bytes = bytes('0123456789', "UTF8")
- byte_array = QByteArray(orig_bytes)
- actual_bytes = bytes(byte_array)
- self.assertEqual(orig_bytes, actual_bytes)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qcalendar_test.py b/sources/pyside2/tests/QtCore/qcalendar_test.py
deleted file mode 100644
index e75931ad5..000000000
--- a/sources/pyside2/tests/QtCore/qcalendar_test.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QCalendar (5.14)'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCalendar
-
-class TestQCalendar (unittest.TestCase):
- def testCalendar(self):
- calendar = QCalendar(QCalendar.System.Gregorian)
- self.assertTrue(calendar.isGregorian())
- self.assertEqual(calendar.name(), 'Gregorian')
- self.assertFalse(calendar.hasYearZero())
- self.assertEqual(calendar.monthsInYear(2019), 12)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qcbor_test.py b/sources/pyside2/tests/QtCore/qcbor_test.py
deleted file mode 100644
index ec99e04f5..000000000
--- a/sources/pyside2/tests/QtCore/qcbor_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QCbor'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import (QByteArray, QCborStreamReader, QCborStreamWriter,
- QCborValue)
-
-class TestCbor(unittest.TestCase):
- def testReader(self):
- ba = QByteArray()
- writer = QCborStreamWriter(ba)
- writer.append(42)
- del writer
- self.assertTrue(not ba.isEmpty())
- reader = QCborStreamReader(ba)
- self.assertTrue(reader.hasNext())
- value = reader.toInteger()
- self.assertEqual(value, 42)
-
- def testReader(self):
- ba = QByteArray()
- writer = QCborStreamWriter(ba)
- writer.append("hello")
- del writer
- self.assertTrue(not ba.isEmpty())
- reader = QCborStreamReader(ba)
- self.assertTrue(reader.hasNext())
- if (reader.isByteArray()): # Python 2
- value = reader.readByteArray()
- self.assertTrue(value)
- self.assertEqual(value.data, "hello")
- else:
- self.assertTrue(reader.isString())
- value = reader.readString()
- self.assertTrue(value)
- self.assertEqual(value.data, "hello")
-
- def testValue(self):
- value = QCborValue('hello')
- self.assertTrue(value.isString())
- self.assertEqual(value.toString(), 'hello')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qcollator_test.py b/sources/pyside2/tests/QtCore/qcollator_test.py
deleted file mode 100644
index 3aa33240a..000000000
--- a/sources/pyside2/tests/QtCore/qcollator_test.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QCollator'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class QCollatorTest(unittest.TestCase):
- def testState(self):
- c = QCollator()
- c.setCaseSensitivity(Qt.CaseInsensitive)
- c.setLocale(QLocale.German)
-
- print("compare a and b:", c.compare("a", "b"))
-
- self.assertEqual(c.caseSensitivity(), Qt.CaseInsensitive)
- self.assertEqual(c.locale(), QLocale(QLocale.German))
-
- c.setLocale(QLocale.French)
- c.setNumericMode(True)
- c.setIgnorePunctuation(True)
- c.setLocale(QLocale.Norwegian)
-
- self.assertEqual(c.caseSensitivity(), Qt.CaseInsensitive)
- self.assertEqual(c.numericMode(), True)
- self.assertEqual(c.ignorePunctuation(), True)
- self.assertEqual(c.locale(), QLocale(QLocale.Norwegian))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qcommandlineparser_test.py b/sources/pyside2/tests/QtCore/qcommandlineparser_test.py
deleted file mode 100644
index a947cf48f..000000000
--- a/sources/pyside2/tests/QtCore/qcommandlineparser_test.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QCommandLineParser and QCommandLineOption'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class QCommandLineParserTest(unittest.TestCase):
- def testParser(self):
- app = QCoreApplication([])
-
- parser1 = QCommandLineParser()
- self.assertEqual(parser1.parse(["QtCore_qcommandlineparser_test", "file.txt"]), True)
- self.assertEqual(parser1.positionalArguments(), ["file.txt"])
-
- parser2 = QCommandLineParser()
- self.assertEqual(parser2.addOption(QCommandLineOption("b")), True)
- self.assertEqual(parser2.parse(["QtCore_qcommandlineparser_test", "-b"]), True)
- self.assertEqual(parser2.optionNames(), ["b"])
- self.assertEqual(parser2.isSet("b"), True)
- self.assertEqual(parser2.values("b"), [])
- self.assertEqual(parser2.positionalArguments(), [])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py b/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py
deleted file mode 100644
index 1e1a64204..000000000
--- a/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QCoreApplication.instance static method'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication
-
-class QCoreApplicationInstanceTest(unittest.TestCase):
- '''Test cases for QCoreApplication.instance static method'''
-
- def testQCoreApplicationInstance(self):
- #Tests QCoreApplication.instance()
- self.assertEqual(QCoreApplication.instance(), None)
- app = QCoreApplication([])
- self.assertEqual(QCoreApplication.instance(), app)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qcoreapplication_test.py b/sources/pyside2/tests/QtCore/qcoreapplication_test.py
deleted file mode 100644
index b9907abbf..000000000
--- a/sources/pyside2/tests/QtCore/qcoreapplication_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication
-
-class TestQCoreApplication(unittest.TestCase):
- def testNoArguments(self):
- app = QCoreApplication()
- self.assertIsInstance(app, QCoreApplication)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qdatastream_test.py b/sources/pyside2/tests/QtCore/qdatastream_test.py
deleted file mode 100644
index 2ea3460af..000000000
--- a/sources/pyside2/tests/QtCore/qdatastream_test.py
+++ /dev/null
@@ -1,324 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QDataStream'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QBitArray, QByteArray, QIODevice, QDataStream, QDate, QTime, QDateTime
-
-def create_bitarray(string):
- array = QBitArray(len(string))
- for i, char in enumerate(string):
- array.setBit(i, char != '0')
- return array
-
-
-def serialize_bitarray(bit_array):
- buffer = QByteArray()
- stream = QDataStream(buffer, QIODevice.WriteOnly)
- stream << bit_array
- return buffer
-
-
-class QDataStreamWrite(unittest.TestCase):
- '''Test case for QDatastream write* functions'''
-
- def setUp(self):
- self.ba = QByteArray()
- self.read = QDataStream(self.ba, QIODevice.ReadOnly)
- self.write = QDataStream(self.ba, QIODevice.WriteOnly)
-
- def testWriteUInt8(self):
- '''QDataStream.writeUInt8 (accepting str of size 1)'''
- x = 0xFF
- self.write.writeUInt8(x)
- y = self.read.readUInt8()
- self.assertEqual(x, y)
-
- self.assertRaises(TypeError, self.write.writeUInt8, 'aaaaa')
-
- def testWriteInt8(self):
- '''QDataStream.writeInt8 (accepting str of size 1)'''
- x = 65
- self.write.writeInt8(chr(x))
- y = self.read.readInt8()
- self.assertEqual(x, y)
-
- self.assertRaises(TypeError, self.write.writeInt8, 'aaaaa')
-
- def testWriteUInt8Int(self):
- '''QDataStream.writeUInt8 (accepting integer)'''
- x = 0xFF
- self.write.writeUInt8(x)
- y = self.read.readUInt8()
- self.assertEqual(x, y)
-
- def testWriteInt8Int(self):
- '''QDataStream.writeInt8 (accepting integer)'''
- x = 65
- self.write.writeInt8(x)
- y = self.read.readInt8()
- self.assertEqual(x, y)
-
- def testWriteUInt16(self):
- '''QDataStream.writeUInt16'''
- x = 0x4423
- self.write.writeUInt16(x)
- y = int(self.read.readUInt16())
- self.assertEqual(x, y)
-
- def testWriteUInt32(self):
- '''QDataStream.writeUInt32'''
- x = 0xdeadbeef
- self.write.writeUInt32(x)
- y = int(self.read.readUInt32())
- self.assertEqual(x, y)
-
-class QDataStreamShift(unittest.TestCase):
- '''Test case for << and >> operators'''
-
- def setUp(self):
- self.ba = QByteArray()
- self.stream = QDataStream(self.ba, QIODevice.WriteOnly)
- self.read_stream = QDataStream(self.ba, QIODevice.ReadOnly)
-
- def testQCharValid(self):
- '''QDataStream <<>> QChar - valid'''
- self.stream.writeQChar(42)
-
- res = self.read_stream.readQChar()
- self.assertEqual(res, chr(42))
-
- def testQCharNull(self):
- '''QDataStream <<>> QChar - null'''
- self.stream.writeQChar(None)
-
- res = self.read_stream.readQChar()
- self.assertEqual(res, '\x00')
-
- def testQByteArrayValid(self):
- '''QDataStream <<>> QByteArray - valid'''
- self.stream << QByteArray(bytes("hello", "UTF-8"))
-
- res = QByteArray()
-
- self.read_stream >> res
- self.assertEqual(res, QByteArray(bytes("hello", "UTF-8")))
-
- def testQByteArrayEmpty(self):
- '''QDataStream <<>> QByteArray - empty'''
- self.stream << QByteArray(bytes("", "UTF-8"))
-
- res = QByteArray()
-
- self.read_stream >> res
- self.assertEqual(res, QByteArray(bytes("", "UTF-8")))
- self.assertTrue(res.isEmpty())
- self.assertFalse(res.isNull())
-
- def testQByteArrayNull(self):
- '''QDataStream <<>> QByteArray - null'''
- self.stream << QByteArray()
-
- res = QByteArray()
-
- self.read_stream >> res
- self.assertEqual(res, QByteArray())
- self.assertTrue(res.isEmpty())
- self.assertTrue(res.isNull())
-
- def testQStringValid(self):
- '''QDataStream <<>> QString - valid'''
- self.stream.writeQString('Ka-boom')
-
- res = self.read_stream.readQString()
- self.assertEqual(res, 'Ka-boom')
-
- def testQStringEmpty(self):
- '''QDataStream <<>> QString - empty'''
- self.stream.writeQString('')
-
- res = self.read_stream.readQString()
- self.assertEqual(res, '')
-
- def testQStringNull(self):
- '''QDataStream <<>> QString - null'''
- self.stream.writeQString(None)
-
- res = self.read_stream.readQString()
- self.assertEqual(res, '')
-
- def testQBitArrayNull(self):
- '''QDataStream <<>> QBitArray - null'''
- self.stream << QBitArray()
-
- res = QBitArray()
-
- self.read_stream >> res
- self.assertEqual(res, QBitArray())
-
- def testQBitArrayValid(self):
- '''QDataStream <<>> QBitArray - valid'''
- self.stream << create_bitarray('01010101')
-
- res = QBitArray()
-
- self.read_stream >> res
- self.assertEqual(res, create_bitarray('01010101'))
-
- def testQDateNull(self):
- '''QDataStream <<>> QDate - null'''
- self.stream << QDate()
-
- res = QDate()
-
- self.read_stream >> res
- self.assertEqual(res, QDate())
- self.assertFalse(res.isValid())
- self.assertTrue(res.isNull())
-
- def testQDateValid(self):
- '''QDataStream <<>> QDate - valid'''
- self.stream << QDate(2012, 12, 21)
-
- res = QDate()
-
- self.read_stream >> res
- self.assertEqual(res, QDate(2012, 12, 21))
- self.assertTrue(res.isValid())
- self.assertFalse(res.isNull())
-
-
- def testQTimeNull(self):
- '''QDataStream <<>> QTime - null'''
- self.stream << QTime()
-
- res = QTime()
-
- self.read_stream >> res
- self.assertEqual(res, QTime())
- self.assertFalse(res.isValid())
- self.assertTrue(res.isNull())
-
- def testQTimeValid(self):
- '''QDataStream <<>> QTime - valid'''
- self.stream << QTime(12, 12, 21)
-
- res = QTime()
-
- self.read_stream >> res
- self.assertEqual(res, QTime(12, 12, 21))
- self.assertTrue(res.isValid())
- self.assertFalse(res.isNull())
-
- def testQDateTimeNull(self):
- '''QDataStream <<>> QDateTime - null'''
-
- self.stream << QDateTime()
-
- res = QDateTime()
-
- self.read_stream >> res
- self.assertEqual(res, QDateTime())
- self.assertFalse(res.isValid())
- self.assertTrue(res.isNull())
-
- def testQDateTimeValid(self):
- '''QDataStream <<>> QDateTime - valid'''
- time = QTime(23, 23, 23)
- date = QDate(2009, 1, 1)
-
- self.stream << QDateTime(date, time)
-
- res = QDateTime()
-
- self.read_stream >> res
- self.assertEqual(res, QDateTime(date, time))
- self.assertTrue(res.isValid())
- self.assertFalse(res.isNull())
-
-
-class QDataStreamShiftBitArray(unittest.TestCase):
-
- def _check_bitarray(self, data_set):
- '''Check the >> operator for the given data set'''
-
- for data, expectedStatus, expectedString in data_set:
- stream = QDataStream(data, QIODevice.ReadOnly)
- string = QBitArray()
- stream >> string
-
- self.assertEqual(stream.status(), expectedStatus)
- self.assertEqual(string.size(), expectedString.size())
- self.assertEqual(string, expectedString)
-
- def testOk(self):
- '''QDataStream with valid QBitArray'''
- test_set = [QBitArray()]
- for i in range(1, 7):
- test_set.append(create_bitarray(i * '1'))
- for s in ['0111111', '0000000', '1001110']:
- test_set.append(create_bitarray(s))
-
- data = []
- for expected in test_set:
- data.append((serialize_bitarray(expected), QDataStream.Ok, expected))
- self._check_bitarray(data)
-
- def testPastEnd(self):
- '''QDataStream >> QBitArray reading past the end of the data'''
- serialized = serialize_bitarray(create_bitarray('1001110'))
- serialized.resize(serialized.size() - 2)
- self._check_bitarray([(serialized, QDataStream.ReadPastEnd, QBitArray())])
-
-
-class QDataStreamRawData(unittest.TestCase):
- def testRawData(self):
- data = QDataStream()
- self.assertEqual(data.readRawData(4), None)
-
- ba = QByteArray()
- data = QDataStream(ba, QIODevice.WriteOnly)
- data.writeRawData('AB\x00C')
- self.assertEqual(ba.data(), bytes('AB\x00C', "UTF-8"))
-
- data = QDataStream(ba)
- self.assertEqual(data.readRawData(4), bytes('AB\x00C', "UTF-8"))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qdate_test.py b/sources/pyside2/tests/QtCore/qdate_test.py
deleted file mode 100644
index 911a042b8..000000000
--- a/sources/pyside2/tests/QtCore/qdate_test.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QDate'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class TestQDate (unittest.TestCase):
- def testGetDate(self):
- date = QDate(2009, 22, 9)
- tuple_ = date.getDate()
- self.assertEqual(tuple, tuple_.__class__)
- (y, m, d) = tuple_
- self.assertEqual(date.year(), y)
- self.assertEqual(date.month(), m)
- self.assertEqual(date.day(), d)
-
- def testGetWeekNumber(self):
- date = QDate(2000, 1, 1)
- tuple_ = date.weekNumber()
- self.assertEqual(tuple, tuple_.__class__)
- (week, yearNumber) = tuple_
- self.assertEqual(week, 52)
- self.assertEqual(yearNumber, 1999)
-
- def testBooleanCast(self):
- today = QDate.currentDate()
- self.assertTrue(today)
- nodate = QDate()
- self.assertFalse(nodate)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qdatetime_test.py b/sources/pyside2/tests/QtCore/qdatetime_test.py
deleted file mode 100644
index 4d98156d8..000000000
--- a/sources/pyside2/tests/QtCore/qdatetime_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import datetime
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QDateTime, QDate, QTime
-
-class TestQDate (unittest.TestCase):
- def testDateConversion(self):
- dateTime = QDateTime(QDate(2011, 5, 17), QTime(11, 1, 14, 15))
- dateTimePy = QDateTime(datetime.date(2011, 5, 17), datetime.time(11, 1, 14, 15000))
- self.assertEqual(dateTime, dateTimePy)
-
- def testDateTimeConversion(self):
- dateTime = QDateTime(QDate(2011, 5, 17), QTime(11, 1, 14, 15))
- dateTimePy = QDateTime(datetime.datetime(2011, 5, 17, 11, 1, 14, 15000))
- self.assertEqual(dateTime, dateTimePy)
-
- def testDateTimeNow(self):
- py = datetime.datetime.now()
- qt = QDateTime(py)
- self.assertEqual(qt, py)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qeasingcurve_test.py b/sources/pyside2/tests/QtCore/qeasingcurve_test.py
deleted file mode 100644
index 82d45f978..000000000
--- a/sources/pyside2/tests/QtCore/qeasingcurve_test.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QEasingCurve
-
-def myFunction(progress):
- if progress == 1.0:
- return 100.0
- else:
- return -100.0
-
-class TestQEasingCurve(unittest.TestCase):
- def testCustomType(self):
- ec = QEasingCurve()
- ec.setCustomType(myFunction)
- self.assertEqual(ec.valueForProgress(1.0), 100.0)
- self.assertEqual(ec.valueForProgress(0.5), -100.0)
-
- def testObjectCleanup(self):
- for i in range(100):
- ec = QEasingCurve()
- ec.setCustomType(myFunction)
- self.assertEqual(ec.valueForProgress(1.0), 100.0)
- self.assertEqual(ec.valueForProgress(0.5), -100.0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qenum_test.py b/sources/pyside2/tests/QtCore/qenum_test.py
deleted file mode 100644
index f664087fd..000000000
--- a/sources/pyside2/tests/QtCore/qenum_test.py
+++ /dev/null
@@ -1,243 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QEnum and QFlags'''
-
-import gc
-import os
-import sys
-import pickle
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QIODevice, QObject, QEnum, QFlag
-
-
-class TestEnum(unittest.TestCase):
-
- def testToInt(self):
- self.assertEqual(QIODevice.NotOpen, 0)
- self.assertEqual(QIODevice.ReadOnly, 1)
- self.assertEqual(QIODevice.WriteOnly, 2)
- self.assertEqual(QIODevice.ReadWrite, 1 | 2)
- self.assertEqual(QIODevice.Append, 4)
- self.assertEqual(QIODevice.Truncate, 8)
- self.assertEqual(QIODevice.Text, 16)
- self.assertEqual(QIODevice.Unbuffered, 32)
-
- def testToIntInFunction(self):
- self.assertEqual(str(int(QIODevice.WriteOnly)), "2")
-
- def testOperations(self):
- k = Qt.Key.Key_1
-
- # Integers
- self.assertEqual(k + 2, 2 + k)
- self.assertEqual(k - 2, -(2 - k))
- self.assertEqual(k * 2, 2 * k)
-
- # Floats
- with self.assertRaises(TypeError):
- a = k + 2.0
-
- with self.assertRaises(TypeError):
- a = k - 2.0
-
- with self.assertRaises(TypeError):
- a = k * 2.0
-
- @unittest.skipUnless(getattr(sys, "getobjects", None), "requires --with-trace-refs")
- @unittest.skipUnless(getattr(sys, "gettotalrefcount", None), "requires --with-pydebug")
- def testEnumNew_NoLeak(self):
- gc.collect()
- total = sys.gettotalrefcount()
- for idx in range(1000):
- ret = Qt.Key(42)
-
- gc.collect()
- delta = sys.gettotalrefcount() - total
- print("delta total refcount =", delta)
- if abs(delta) >= 10:
- all = [(sys.getrefcount(x), x) for x in sys.getobjects(0)]
- all.sort(key=lambda x: x[0], reverse=True)
- for ob in all[:10]:
- print(ob)
- self.assertTrue(abs(delta) < 10)
-
-
-class TestQFlags(unittest.TestCase):
- def testToItn(self):
- om = QIODevice.NotOpen
-
- self.assertEqual(om, QIODevice.NotOpen)
- self.assertTrue(om == 0)
-
- self.assertTrue(om != QIODevice.ReadOnly)
- self.assertTrue(om != 1)
-
- def testToIntInFunction(self):
- om = QIODevice.WriteOnly
- self.assertEqual(int(om), 2)
-
- def testNonExtensibleEnums(self):
- try:
- om = QIODevice.OpenMode(QIODevice.WriteOnly)
- self.assertFail()
- except:
- pass
-
-
-# PYSIDE-15: Pickling of enums
-class TestEnumPickling(unittest.TestCase):
- def testPickleEnum(self):
-
- # Pickling of enums with different depth works.
- ret = pickle.loads(pickle.dumps(QIODevice.Append))
- self.assertEqual(ret, QIODevice.Append)
-
- ret = pickle.loads(pickle.dumps(Qt.Key.Key_Asterisk))
- self.assertEqual(ret, Qt.Key.Key_Asterisk)
- self.assertEqual(ret, Qt.Key(42))
-
- # We can also pickle the whole enum class (built in):
- ret = pickle.loads(pickle.dumps(QIODevice))
-
- # This works also with nested classes for Python 3, after we
- # introduced the correct __qualname__ attribute.
-
- # Note: For Python 2, we would need quite strange patches.
- func = lambda: pickle.loads(pickle.dumps(Qt.Key))
- func()
-
-# PYSIDE-957: The QEnum macro
-
-try:
- import enum
- HAVE_ENUM = True
-except ImportError:
- HAVE_ENUM = False
- QEnum = QFlag = lambda x: x
- import types
- class Enum: pass
- enum = types.ModuleType("enum")
- enum.Enum = enum.Flag = enum.IntEnum = enum.IntFlag = Enum
- Enum.__module__ = "enum"
- Enum.__members__ = {}
- del Enum
- enum.auto = lambda: 42
-
-HAVE_FLAG = hasattr(enum, "Flag")
-
-@QEnum
-class OuterEnum(enum.Enum):
- A = 1
- B = 2
-
-class SomeClass(QObject):
-
- @QEnum
- class SomeEnum(enum.Enum):
- A = 1
- B = 2
- C = 3
-
- @QEnum
- class OtherEnum(enum.IntEnum):
- A = 1
- B = 2
- C = 3
-
- class InnerClass(QObject):
-
- @QEnum
- class InnerEnum(enum.Enum):
- X = 42
-
- class SomeEnum(enum.Enum):
- A = 4
- B = 5
- C = 6
-
- QEnum(SomeEnum) # works even without the decorator assignment
-
-
-@unittest.skipUnless(HAVE_ENUM, "requires 'enum' module (use 'pip install enum34' for Python 2)")
-class TestQEnumMacro(unittest.TestCase):
- def testTopLevel(self):
- self.assertEqual(type(OuterEnum).__module__, "enum")
- self.assertEqual(type(OuterEnum).__name__, "EnumMeta")
- self.assertEqual(len(OuterEnum.__members__), 2)
-
- def testSomeClass(self):
- self.assertEqual(type(SomeClass.SomeEnum).__module__, "enum")
- self.assertEqual(type(SomeClass.SomeEnum).__name__, "EnumMeta")
- self.assertEqual(len(SomeClass.SomeEnum.__members__), 3)
- with self.assertRaises(TypeError):
- int(SomeClass.SomeEnum.C) == 6
- self.assertEqual(SomeClass.OtherEnum.C, 3)
-
- @unittest.skipIf(sys.version_info[0] < 3, "we cannot support nested classes in Python 2")
- def testInnerClass(self):
- self.assertEqual(SomeClass.InnerClass.InnerEnum.__qualname__,
- "SomeClass.InnerClass.InnerEnum")
- with self.assertRaises(TypeError):
- int(SomeClass.InnerClass.InnerEnum.X) == 42
-
- @unittest.skipUnless(HAVE_FLAG, "some older Python versions have no 'Flag'")
- def testEnumFlag(self):
- with self.assertRaises(TypeError):
- class WrongFlagForEnum(QObject):
- @QEnum
- class Bad(enum.Flag):
- pass
- with self.assertRaises(TypeError):
- class WrongEnuForFlag(QObject):
- @QFlag
- class Bad(enum.Enum):
- pass
-
- def testIsRegistered(self):
- mo = SomeClass.staticMetaObject
- self.assertEqual(mo.enumeratorCount(), 2)
- self.assertEqual(mo.enumerator(0).name(), "OtherEnum")
- self.assertEqual(mo.enumerator(0).scope(), "SomeClass")
- self.assertEqual(mo.enumerator(1).name(), "SomeEnum")
- moi = SomeClass.InnerClass.staticMetaObject
- self.assertEqual(moi.enumerator(0).name(), "InnerEnum")
- ## Question: Should that scope not better be "SomeClass.InnerClass"?
- ## But we have __qualname__ already:
- self.assertEqual(moi.enumerator(0).scope(), "InnerClass")
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qevent_test.py b/sources/pyside2/tests/QtCore/qevent_test.py
deleted file mode 100644
index a3e4f7116..000000000
--- a/sources/pyside2/tests/QtCore/qevent_test.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QtCore.QEvent'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QEvent
-
-class QEventTypeFlag(unittest.TestCase):
- '''Test case for usage of QEvent.Type flags'''
-
- def testFlagAccess(self):
- #QEvent.Type flags usage
-
- event = QEvent(QEvent.Timer)
- self.assertEqual(event.type(), QEvent.Timer)
-
- event = QEvent(QEvent.Close)
- self.assertEqual(event.type(), QEvent.Close)
-
- event = QEvent(QEvent.IconTextChange)
- self.assertEqual(event.type(), QEvent.IconTextChange)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qfile_test.py b/sources/pyside2/tests/QtCore/qfile_test.py
deleted file mode 100644
index 4617b1b2a..000000000
--- a/sources/pyside2/tests/QtCore/qfile_test.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import tempfile
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QDir, QFile, QIODevice, QSaveFile, QTemporaryDir
-
-class GetCharTest(unittest.TestCase):
- '''Test case for QIODevice.getChar in QFile'''
-
- def setUp(self):
- '''Acquire resources'''
- handle, self.filename = tempfile.mkstemp()
- os.write(handle, bytes('a', "UTF-8"))
- os.close(handle)
-
- def tearDown(self):
- '''release resources'''
- os.remove(self.filename)
-
- def testBasic(self):
- '''QFile.getChar'''
- obj = QFile(self.filename)
- obj.open(QIODevice.ReadOnly)
- try:
- self.assertEqual(obj.getChar(), (True, 'a'))
- self.assertFalse(obj.getChar()[0])
- finally:
- obj.close()
-
- def testBug721(self):
- obj = QFile(self.filename)
- obj.open(QIODevice.ReadOnly)
- try:
- memory = obj.map(0, 1)
- self.assertEqual(len(memory), 1)
- self.assertEqual(memory[0], ord('a'))
- # now memory points to wild bytes... :-)
- # uncommenting this must cause a segfault.
- # self.assertEqual(memory[0], 'a')
- finally:
- obj.unmap(memory)
- obj.close()
-
- def testQSaveFile(self):
- dir = QTemporaryDir(QDir.tempPath() + "/XXXXXX.dir")
- self.assertTrue(dir.isValid())
- saveFile = QSaveFile(dir.path() + "/test.dat")
- self.assertTrue(saveFile.open(QIODevice.WriteOnly))
- saveFile.write(bytes("Test", "UTF-8"))
- self.assertTrue(saveFile.commit())
- self.assertTrue(os.path.exists(QDir.toNativeSeparators(saveFile.fileName())))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qfileinfo_test.py b/sources/pyside2/tests/QtCore/qfileinfo_test.py
deleted file mode 100644
index 07b37cc51..000000000
--- a/sources/pyside2/tests/QtCore/qfileinfo_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import tempfile
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QFile, QFileInfo
-
-class QFileConstructor(unittest.TestCase):
- '''QFileInfo constructor with qfile'''
-
- def testBasic(self):
- '''QFileInfo(QFile)'''
- obj = QFileInfo(QFile())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qfileread_test.py b/sources/pyside2/tests/QtCore/qfileread_test.py
deleted file mode 100644
index 291bf6f54..000000000
--- a/sources/pyside2/tests/QtCore/qfileread_test.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QIODevice, QTemporaryFile
-
-
-class FileChild1(QTemporaryFile):
- pass
-
-class FileChild2(QTemporaryFile):
- def readData(self, maxlen):
- return super(FileChild2, self).readData(maxlen)
- def readLineData(self, maxlen):
- return super(FileChild2, self).readLineData(maxlen)
-
-class readDataTest(unittest.TestCase):
- '''Test case for readData and readLineData'''
-
- def setUp(self):
- '''Acquire resources'''
- self.filename1 = FileChild1()
- self.assertTrue(self.filename1.open())
- self.filename1.write(bytes('Test text for testing', "UTF-8"))
-
- self.filename2 = FileChild2()
- self.assertTrue(self.filename2.open())
- self.filename2.write(bytes('Test text for testing', "UTF-8"))
-
- def tearDown(self):
- '''release resources'''
- pass
-
- def testBasic(self):
- '''QTemporaryFile.read'''
- self.filename1.seek(0)
- s1 = self.filename1.read(50)
- self.assertEqual(s1, 'Test text for testing')
-
-
- def testBug40(self):
- self.filename2.seek(0)
- s2 = self.filename2.read(50)
- self.assertEqual(s2, 'Test text for testing')
-
- self.filename2.seek(0)
- s2 = self.filename2.readLine(22)
- self.assertEqual(s2, 'Test text for testing')
-
- self.filename1.seek(0)
- s1 = self.filename1.read(50)
- self.assertEqual(s1, s2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qflags_test.py b/sources/pyside2/tests/QtCore/qflags_test.py
deleted file mode 100644
index 08a7c55b1..000000000
--- a/sources/pyside2/tests/QtCore/qflags_test.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QFlags'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QTemporaryFile, QFile, QIODevice, QObject
-
-class QFlagTest(unittest.TestCase):
- '''Test case for usage of flags'''
-
- def testCallFunction(self):
- f = QTemporaryFile()
- self.assertTrue(f.open())
- fileName = f.fileName()
- f.close()
-
- f = QFile(fileName)
- self.assertEqual(f.open(QIODevice.Truncate | QIODevice.Text | QIODevice.ReadWrite), True)
- om = f.openMode()
- self.assertEqual(om & QIODevice.Truncate, QIODevice.Truncate)
- self.assertEqual(om & QIODevice.Text, QIODevice.Text)
- self.assertEqual(om & QIODevice.ReadWrite, QIODevice.ReadWrite)
- self.assertTrue(om == QIODevice.Truncate | QIODevice.Text | QIODevice.ReadWrite)
- f.close()
-
-
-class QFlagOperatorTest(unittest.TestCase):
- '''Test case for operators in QFlags'''
-
- def testInvert(self):
- '''QFlags ~ (invert) operator'''
- self.assertEqual(type(~QIODevice.ReadOnly), QIODevice.OpenMode)
-
- def testOr(self):
- '''QFlags | (or) operator'''
- self.assertEqual(type(QIODevice.ReadOnly | QIODevice.WriteOnly), QIODevice.OpenMode)
-
- def testAnd(self):
- '''QFlags & (and) operator'''
- self.assertEqual(type(QIODevice.ReadOnly & QIODevice.WriteOnly), QIODevice.OpenMode)
-
- def testIOr(self):
- '''QFlags |= (ior) operator'''
- flag = Qt.WindowFlags()
- self.assertTrue(Qt.Widget == 0)
- self.assertFalse(flag & Qt.Widget)
- result = flag & Qt.Widget
- self.assertTrue(result == 0)
- flag |= Qt.WindowMinimizeButtonHint
- self.assertTrue(flag & Qt.WindowMinimizeButtonHint)
-
- def testInvertOr(self):
- '''QFlags ~ (invert) operator over the result of an | (or) operator'''
- self.assertEqual(type(~(Qt.ItemIsSelectable | Qt.ItemIsEditable)), Qt.ItemFlags)
-
- def testEqual(self):
- '''QFlags == operator'''
- flags = Qt.Window
- flags |= Qt.WindowMinimizeButtonHint
- flag_type = (flags & Qt.WindowType_Mask)
- self.assertEqual(flag_type, Qt.Window)
-
- self.assertEqual(Qt.KeyboardModifiers(Qt.ControlModifier), Qt.ControlModifier)
-
- def testOperatorBetweenFlags(self):
- '''QFlags & QFlags'''
- flags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
- newflags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
- self.assertTrue(flags & newflags)
-
- def testOperatorDifferentOrder(self):
- '''Different ordering of arguments'''
- flags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
- self.assertEqual(flags | Qt.ItemIsEnabled, Qt.ItemIsEnabled | flags)
-
-class QFlagsOnQVariant(unittest.TestCase):
- def testQFlagsOnQVariant(self):
- o = QObject()
- o.setProperty("foo", QIODevice.ReadOnly | QIODevice.WriteOnly)
- self.assertEqual(type(o.property("foo")), QIODevice.OpenMode)
-
-class QFlagsWrongType(unittest.TestCase):
- def testWrongType(self):
- '''Wrong type passed to QFlags binary operators'''
-
- self.assertRaises(TypeError, Qt.NoItemFlags | '43')
- self.assertRaises(TypeError, Qt.NoItemFlags & '43')
- self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags)
- self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags)
- self.assertRaises(TypeError, Qt.NoItemFlags & QObject())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qhandle_test.py b/sources/pyside2/tests/QtCore/qhandle_test.py
deleted file mode 100644
index 76dfbd32e..000000000
--- a/sources/pyside2/tests/QtCore/qhandle_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QEnum and QFlags'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QThread, Qt
-
-class TestHANDLE(unittest.TestCase):
- def testIntConversion(self):
- i = 0
- h = QThread.currentThreadId()
- i = 0 + int(h)
- self.assertEqual(i, int(h))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
deleted file mode 100644
index f46ace5a0..000000000
--- a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for qInstallMsgHandler'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-param = []
-
-def handler(msgt, ctx, msg):
- global param
- param = [msgt, ctx, msg.strip()]
-
-def handleruseless(msgt, ctx, msg):
- pass
-
-class QInstallMsgHandlerTest(unittest.TestCase):
-
- def tearDown(self):
- # Ensure that next test will have a clear environment
- qInstallMessageHandler(None)
-
- def testNone(self):
- ret = qInstallMessageHandler(None)
- self.assertEqual(ret, None)
-
- def testRet(self):
- ret = qInstallMessageHandler(None)
- self.assertEqual(ret, None)
- refcount = sys.getrefcount(handleruseless)
- retNone = qInstallMessageHandler(handleruseless)
- self.assertEqual(sys.getrefcount(handleruseless), refcount + 1)
- rethandler = qInstallMessageHandler(None)
- self.assertEqual(rethandler, handleruseless)
- del rethandler
- self.assertEqual(sys.getrefcount(handleruseless), refcount)
-
- def testHandler(self):
- rethandler = qInstallMessageHandler(handler)
- if QLibraryInfo.isDebugBuild():
- qDebug("Test Debug")
- self.assertEqual(param[0], QtDebugMsg)
- self.assertEqual(param[2], "Test Debug")
- qWarning("Test Warning")
- self.assertEqual(param[0], QtWarningMsg)
- self.assertEqual(param[2], "Test Warning")
- qCritical("Test Critical")
- self.assertEqual(param[0], QtCriticalMsg)
- self.assertEqual(param[2], "Test Critical")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qjsondocument_test.py b/sources/pyside2/tests/QtCore/qjsondocument_test.py
deleted file mode 100644
index 8ce56d6b9..000000000
--- a/sources/pyside2/tests/QtCore/qjsondocument_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QJsonDocument/nullptr_t'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QJsonDocument
-
-
-class QJsonDocumentTest(unittest.TestCase):
-
- def testToVariant(self):
- a = QJsonDocument.fromJson(b'{"test": null}')
- self.assertIsInstance(a, QJsonDocument)
- self.assertEqual(str(a.toVariant()), "{'test': None}")
-
- b = QJsonDocument.fromJson(b'{"test": [null]}')
- self.assertIsInstance(b, QJsonDocument)
- self.assertEqual(str(b.toVariant()), "{'test': [None]}")
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qlinef_test.py b/sources/pyside2/tests/QtCore/qlinef_test.py
deleted file mode 100644
index 3d7a42296..000000000
--- a/sources/pyside2/tests/QtCore/qlinef_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QLineF'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class TestQLineF (unittest.TestCase):
- def testIntersect(self):
- l1 = QLineF(0, 0, 1, 0)
- l2 = QLineF(1, -1, 1, 1)
- tuple_ = l1.intersects(l2)
- self.assertEqual(tuple, tuple_.__class__)
- (value, p) = tuple_
- self.assertEqual(QLineF.BoundedIntersection, value)
- self.assertEqual(QPointF(1, 0), p)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qlocale_test.py b/sources/pyside2/tests/QtCore/qlocale_test.py
deleted file mode 100644
index 7c797339a..000000000
--- a/sources/pyside2/tests/QtCore/qlocale_test.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QLocale'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QLocale
-
-class QLocaleTestToNumber(unittest.TestCase):
- def testToNumberInt(self):
- obj = QLocale(QLocale.C)
- self.assertEqual((37, True), obj.toInt('37'))
-
- def testToNumberFloat(self):
- obj = QLocale(QLocale.C)
- self.assertEqual((ctypes.c_float(37.109).value, True),
- obj.toFloat('37.109'))
-
- def testToNumberDouble(self):
- obj = QLocale(QLocale.C)
- self.assertEqual((ctypes.c_double(37.109).value, True),
- obj.toDouble('37.109'))
-
- def testToNumberShort(self):
- obj = QLocale(QLocale.C)
- self.assertEqual((ctypes.c_short(37).value, True),
- obj.toShort('37'))
-
- def testToNumberULongLong(self):
- obj = QLocale(QLocale.C)
- self.assertEqual((ctypes.c_ulonglong(37).value, True),
- obj.toULongLong('37'))
-
- def testToNumberULongLongNegative(self):
- obj = QLocale(QLocale.C)
- self.assertTrue(not obj.toULongLong('-37')[1])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qlockfile_test.py b/sources/pyside2/tests/QtCore/qlockfile_test.py
deleted file mode 100644
index 38b6b7c42..000000000
--- a/sources/pyside2/tests/QtCore/qlockfile_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QLockFile'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import QDir, QLockFile, QCoreApplication
-
-class TestQMessageAuthenticationCode (unittest.TestCase):
-
- def setUp(self):
- pid = QCoreApplication.applicationPid()
- self._fileName = "{}/pqlockfiletest{}.tmp".format(QDir.tempPath(), pid)
-
- def tearDown(self):
- if (os.path.exists(self._fileName)):
- os.remove(self._fileName)
-
- def test(self):
- # Merely exercise the API, no locking against another processes.
- lockFile = QLockFile(self._fileName)
- self.assertTrue(lockFile.lock())
- self.assertTrue(lockFile.isLocked())
- lockFile.unlock()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py b/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py
deleted file mode 100644
index 52838c95e..000000000
--- a/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QMessageAuthenticationCode'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCryptographicHash, QMessageAuthenticationCode
-
-class TestQMessageAuthenticationCode (unittest.TestCase):
- def test(self):
- code = QMessageAuthenticationCode(QCryptographicHash.Sha1, bytes('bla', "UTF-8"))
- result = code.result()
- self.assertTrue(result.size() > 0)
- print(result.toHex())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qmetaobject_test.py b/sources/pyside2/tests/QtCore/qmetaobject_test.py
deleted file mode 100644
index d79abb1da..000000000
--- a/sources/pyside2/tests/QtCore/qmetaobject_test.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests for static methos conflicts with class methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class Foo(QFile):
- pass
-
-class DynObject(QObject):
- def slot(self):
- pass
-
-class qmetaobject_test(unittest.TestCase):
- """
- def test_QMetaObject(self):
- qobj = QObject()
- qobj_metaobj = qobj.metaObject()
- self.assertEqual(qobj_metaobj.className(), "QObject")
-
- obj = QFile()
- m = obj.metaObject()
- self.assertEqual(m.className(), "QFile")
- self.assertNotEqual(m.methodCount(), qobj_metaobj.methodCount())
-
- obj = Foo()
- m = obj.metaObject()
- self.assertEqual(m.className(), "Foo")
- f = QFile()
- fm = f.metaObject()
- self.assertEqual(m.methodCount(), fm.methodCount())
- """
-
- def test_DynamicSlotSignal(self):
- o = DynObject()
- o2 = QObject()
-
- o.connect(o2, SIGNAL("bars()"), o.slot)
- self.assertTrue(o2.metaObject().indexOfMethod("bars()") > -1)
- #self.assertTrue(o.metaObject().indexOfMethod("bar()") == -1)
- #self.assertTrue(o.metaObject().indexOfMethod("slot()") > -1)
-
- #slot_index = o.metaObject().indexOfMethod("slot()")
-
- #o.connect(o, SIGNAL("foo()"), o2, SIGNAL("bar()"))
- #signal_index = o.metaObject().indexOfMethod("foo()");
-
- #self.assertTrue(slot_index != signal_index)
-
- # PYSIDE-784, plain Qt objects should not have intermediary
- # metaObjects.
- def test_PlainQObject(self):
- timer = QTimer()
- self.assertEqual(timer.metaObject().superClass().className(),
- "QObject")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qmimedatabase_test.py b/sources/pyside2/tests/QtCore/qmimedatabase_test.py
deleted file mode 100644
index 78ce55328..000000000
--- a/sources/pyside2/tests/QtCore/qmimedatabase_test.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QMimeDatabase'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QMimeDatabase, QLocale
-
-class QMimeDatabaseTest(unittest.TestCase):
- def testMimeTypeForName(self):
- db = QMimeDatabase()
-
- s0 = db.mimeTypeForName("application/x-zerosize")
- self.assertTrue(s0.isValid())
- self.assertEqual(s0.name(), "application/x-zerosize")
- if "en" in QLocale().name():
- self.assertEqual(s0.comment(), "empty document")
-
- s0Again = db.mimeTypeForName("application/x-zerosize")
- self.assertEqual(s0Again.name(), s0.name())
-
- s1 = db.mimeTypeForName("text/plain")
- self.assertTrue(s1.isValid())
- self.assertEqual(s1.name(), "text/plain")
-
- krita = db.mimeTypeForName("application/x-krita")
- self.assertTrue(krita.isValid())
-
- rdf = db.mimeTypeForName("application/rdf+xml")
- self.assertTrue(rdf.isValid())
- self.assertEqual(rdf.name(), "application/rdf+xml")
- if "en" in QLocale().name():
- self.assertEqual(rdf.comment(), "RDF file")
-
- bzip2 = db.mimeTypeForName("application/x-bzip2")
- self.assertTrue(bzip2.isValid())
- if "en" in QLocale().name():
- self.assertEqual(bzip2.comment(), "Bzip archive")
-
- defaultMime = db.mimeTypeForName("application/octet-stream")
- self.assertTrue(defaultMime.isValid())
- self.assertEqual(defaultMime.name(), "application/octet-stream")
- self.assertTrue(defaultMime.isDefault())
-
- doesNotExist = db.mimeTypeForName("foobar/x-doesnot-exist")
- self.assertTrue(not doesNotExist.isValid())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py b/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py
deleted file mode 100644
index 83f9d8486..000000000
--- a/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for QAbstractListModel.createIndex and QModelIndex.internalPointer'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class MyModel (QAbstractListModel):
- pass
-
-class TestQModelIndexInternalPointer(unittest.TestCase):
- ''' Test case for QAbstractListModel.createIndex and QModelIndex.internalPointer'''
-
- def setUp(self):
- #Acquire resources
- self.model = MyModel()
-
- def tearDown(self):
- #Release resources
- del self.model
-
- def testInternalPointer(self):
- #Test QAbstractListModel.createIndex and
- #QModelIndex.internalPointer with regular Python objects
- obj = QObject()
- idx = self.model.createIndex(0, 0, "Hello")
- i = idx.internalPointer()
- self.assertEqual(i, "Hello")
-
- def testReferenceCounting(self):
- #Test reference counting when retrieving data with
- #QModelIndex.internalPointer
- o = [1, 2, 3]
- o_refcnt = sys.getrefcount(o)
- idx = self.model.createIndex(0, 0, o)
- ptr = idx.internalPointer()
- self.assertEqual(sys.getrefcount(o), o_refcnt + 1)
-
-
- def testIndexForDefaultDataArg(self):
- #Test QAbstractListModel.createIndex with a default
- #value for data argument
- idx = self.model.createIndex(0, 0)
- self.assertEqual(None, idx.internalPointer())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py b/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py
deleted file mode 100644
index a5604bb70..000000000
--- a/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for parent-child relationship'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication
-
-class ChildrenCoreApplication(unittest.TestCase):
- '''Test case for calling QObject.children after creating a QCoreApp'''
-
- def testQCoreAppChildren(self):
- #QObject.children() after creating a QCoreApplication
- # Minimal test:
- # 1- Create QCoreApp
- # 2- Create parent and childrens
- # 3- While keeping the children alive, call parent.children()
- # 4- Delete parent
- app = QCoreApplication([])
- parent = QObject()
- children = [QObject(parent) for x in range(25)]
- # Uncomment the lines below to make the test pass
- # del children
- # del child2
- del parent # XXX Segfaults here
- self.assertTrue(True)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py b/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py
deleted file mode 100644
index 5d9d8052c..000000000
--- a/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for QObject::connectNotify()'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-def cute_slot():
- pass
-
-class Obj(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.con_notified = False
- self.dis_notified = False
- self.signal = ""
-
- def connectNotify(self, signal):
- self.con_notified = True
- self.signal = signal
-
- def disconnectNotify(self, signal):
- self.dis_notified = True
-
- def reset(self):
- self.con_notified = False
- self.dis_notified = False
-
-class TestQObjectConnectNotify(UsesQCoreApplication):
- '''Test case for QObject::connectNotify'''
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.called = False
-
- def tearDown(self):
- UsesQCoreApplication.tearDown(self)
-
- def testBasic(self):
- sender = Obj()
- receiver = QObject()
- sender.connect(SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
- self.assertTrue(sender.con_notified)
- # When connecting to a regular slot, and not a python callback function, QObject::connect
- # will use the non-cloned method signature, so connecting to destroyed() will actually
- # connect to destroyed(QObject*).
- self.assertEqual(sender.signal.methodSignature(), "destroyed(QObject*)")
- sender.disconnect(SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
- self.assertTrue(sender.dis_notified)
-
- def testPySignal(self):
- sender = Obj()
- receiver = QObject()
- sender.connect(SIGNAL("foo()"), receiver, SLOT("deleteLater()"))
- self.assertTrue(sender.con_notified)
- sender.disconnect(SIGNAL("foo()"), receiver, SLOT("deleteLater()"))
- self.assertTrue(sender.dis_notified)
-
- def testPySlots(self):
- sender = Obj()
- receiver = QObject()
- sender.connect(SIGNAL("destroyed()"), cute_slot)
- self.assertTrue(sender.con_notified)
- sender.disconnect(SIGNAL("destroyed()"), cute_slot)
- self.assertTrue(sender.dis_notified)
-
- def testpyAll(self):
- sender = Obj()
- receiver = QObject()
- sender.connect(SIGNAL("foo()"), cute_slot)
- self.assertTrue(sender.con_notified)
- sender.disconnect(SIGNAL("foo()"), cute_slot)
- self.assertTrue(sender.dis_notified)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_destructor.py b/sources/pyside2/tests/QtCore/qobject_destructor.py
deleted file mode 100644
index d94779239..000000000
--- a/sources/pyside2/tests/QtCore/qobject_destructor.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-class MyObject(QtCore.QObject):
- def __init__(self, other=None):
- QtCore.QObject.__init__(self, None)
- self._o = other
-
-class TestDestructor(unittest.TestCase):
- def testReference(self):
- o = QtCore.QObject()
- m = MyObject(o)
- self.assertEqual(sys.getrefcount(o), 3)
- del m
- self.assertEqual(sys.getrefcount(o), 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_event_filter_test.py b/sources/pyside2/tests/QtCore/qobject_event_filter_test.py
deleted file mode 100644
index ff46bc79f..000000000
--- a/sources/pyside2/tests/QtCore/qobject_event_filter_test.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject.eventFilter'''
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimerEvent
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class FilterObject(QObject):
- '''Filter object for the basic test'''
- def __init__(self, obj=None, event_type=None, *args):
- #Creates a new filter object
- QObject.__init__(self, *args)
- self.obj = obj
- self.event_type = event_type
- self.events_handled = 0
- self.events_bypassed = 0
-
- def setTargetObject(self, obj):
- #Sets the object that will be filtered
- self.obj = obj
-
- def eventFilter(self, obj, event):
- '''Just checks if is the correct object and event type
- incrementing counter until reaching the limit. After that it
- stops filtering the events for the object.'''
- if (self.obj == obj):
- if isinstance(event, self.event_type) and self.events_handled < 5:
- self.events_handled += 1
- return True
- else:
- self.events_bypassed += 1
- return False
- else:
- return QObject.eventFilter(self, obj, event)
-
-class FilteredObject(QObject):
- '''Class that will be filtered. Quits the app after 5 timer events'''
- def __init__(self, app, *args):
- QObject.__init__(self, *args)
- self.app = app
- self.times_called = 0
-
- def timerEvent(self, evt):
- #Overriden method
- self.times_called += 1
-
- if self.times_called == 5:
- self.app.quit()
-
-class TestQObjectEventFilterPython(UsesQCoreApplication):
- '''QObject.eventFilter - Reimplemented in python
- Filters 5 TimerEvents and then bypasses the other events to the
- timerEvent method. After 5 runs, the timerEvent method will ask
- the core application to exit'''
- def setUp(self):
- #Acquire resources
- UsesQCoreApplication.setUp(self)
- self.obj_filter = FilterObject(event_type=QTimerEvent)
- def tearDown(self):
- #Release resources
- del self.obj_filter
- UsesQCoreApplication.tearDown(self)
-
- def testEventFilter(self):
- #QObject.eventFilter reimplemented in python
- filtered = FilteredObject(self.app)
- filtered.installEventFilter(self.obj_filter)
- self.obj_filter.setTargetObject(filtered)
-
- filtered.startTimer(0)
-
- self.app.exec_()
-
- self.assertEqual(filtered.times_called, 5)
- self.assertEqual(self.obj_filter.events_handled, 5)
-
- def testInstallEventFilterRefCountAfterDelete(self):
- '''Bug 910 - installEventFilter() increments reference count on target object
- http://bugs.pyside.org/show_bug.cgi?id=910'''
- obj = QObject()
- filt = QObject()
-
- self.assertEqual(sys.getrefcount(obj), 2)
- self.assertEqual(sys.getrefcount(filt), 2)
- obj.installEventFilter(filt)
- self.assertEqual(sys.getrefcount(obj), 2)
- self.assertEqual(sys.getrefcount(filt), 2)
-
- wref = weakref.ref(obj)
- del obj
- self.assertEqual(wref(), None)
-
- def testInstallEventFilterRefCountAfterRemove(self):
- # Bug 910
- obj = QObject()
- filt = QObject()
-
- self.assertEqual(sys.getrefcount(obj), 2)
- self.assertEqual(sys.getrefcount(filt), 2)
- obj.installEventFilter(filt)
- self.assertEqual(sys.getrefcount(obj), 2)
- self.assertEqual(sys.getrefcount(filt), 2)
- obj.removeEventFilter(filt)
- self.assertEqual(sys.getrefcount(obj), 2)
- self.assertEqual(sys.getrefcount(filt), 2)
-
- wref = weakref.ref(obj)
- del obj
- self.assertEqual(wref(), None)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_inherits_test.py b/sources/pyside2/tests/QtCore/qobject_inherits_test.py
deleted file mode 100644
index bc6e00654..000000000
--- a/sources/pyside2/tests/QtCore/qobject_inherits_test.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer
-from PySide2.QtWidgets import QApplication, QLabel, QVBoxLayout
-
-is_alive = None
-
-class InheritsCase(unittest.TestCase):
- '''Test case for QObject.inherits'''
-
- def testCppInheritance(self):
- #QObject.inherits() for c++ classes
- #An class inherits itself
- self.assertTrue(QObject().inherits('QObject'))
-
- def testPythonInheritance(self):
- #QObject.inherits() for python classes
-
- class Dummy(QObject):
- #Dummy class
- pass
-
- self.assertTrue(Dummy().inherits('QObject'))
- self.assertTrue(Dummy().inherits('Dummy'))
- self.assertTrue(not Dummy().inherits('FooBar'))
-
- def testPythonMultiInheritance(self):
- #QObject.inherits() for multiple inheritance
- # QObject.inherits(classname) should fail if classname isn't a
- # QObject subclass
-
- class Parent(object):
- #Dummy parent
- pass
- class Dummy(QObject, Parent):
- #Dummy class
- pass
-
- self.assertTrue(Dummy().inherits('QObject'))
- self.assertTrue(not Dummy().inherits('Parent'))
-
- def testSetAttributeBeforeCallingInitOnQObjectDerived(self):
- '''Test for bug #428.'''
- class DerivedObject(QObject):
- def __init__(self):
- self.member = 'member'
- QObject.__init__(self)
- obj0 = DerivedObject()
- # The second instantiation of DerivedObject will generate an exception
- # that will not come to surface immediately.
- obj1 = DerivedObject()
- # The mere calling of the object method causes
- # the exception to "reach the surface".
- obj1.objectName()
-
- def testMultipleInheritance(self):
- def declareClass():
- class Foo(object, QObject):
- pass
-
- self.assertRaises(TypeError, declareClass)
-
- # PYSIDE-11:
- # The takeOwnership() method was relying that the SbkObject
- # had a converter, which it's not the case when multiple
- # inheritance is used.
- # The deleteLater() method uses the takeOwnership() to give
- # control of the object to C++, so it can be remove once
- # the destructor is called.
- # The solution was to add a default case when the object
- # is null under the pythonTypeIsValueType() method in shiboken.
- def testDeleteMultipleInheritance(self):
- app = QApplication(sys.argv)
- class DerivedLabel(QLabel, QObject):
- def __del__(self):
- global is_alive
- is_alive = False
-
- global is_alive
- child = DerivedLabel('Hello')
- is_alive = True
- parent = QVBoxLayout()
- parent.addWidget(child)
- parent.removeWidget(child)
- child.deleteLater()
- self.assertTrue(is_alive)
- del child
- self.assertTrue(is_alive)
- QTimer.singleShot(100, app.quit)
- app.exec_()
- self.assertFalse(is_alive)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py b/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py
deleted file mode 100644
index b2c6305cd..000000000
--- a/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for the bug #378
-http://bugs.openbossa.org/show_bug.cgi?id=378
-'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class ExtQObject(QObject):
- def __init__(self):
- # "foobar" will become a object attribute that will not be
- # listed on the among the type attributes. Thus for bug
- # condition be correctly triggered the "foobar" attribute
- # must not previously exist in the parent class.
- self.foobar = None
- # The parent __init__ method must be called after the
- # definition of "self.foobar".
- QObject.__init__(self)
-
-class TestBug378(unittest.TestCase):
- '''Test case for the bug #378'''
-
- def testBug378(self):
- obj = ExtQObject()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qobject_parent_test.py b/sources/pyside2/tests/QtCore/qobject_parent_test.py
deleted file mode 100644
index 386209e8a..000000000
--- a/sources/pyside2/tests/QtCore/qobject_parent_test.py
+++ /dev/null
@@ -1,292 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for parent-child relationship'''
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class ParentRefCountCase(unittest.TestCase):
- '''Test case for the refcount changes of setParent'''
-
- def setUp(self):
- #Acquire resources
- self.parent = QObject()
- self.child = QObject()
-
- def tearDown(self):
- #Release resources
- del self.child
- del self.parent
-
- def testSetParent(self):
- #QObject.setParent() refcount changes
- self.assertEqual(getrefcount(self.child), 2)
- self.child.setParent(self.parent)
- self.assertEqual(getrefcount(self.child), 3)
-
- def testSetParentTwice(self):
- self.assertEqual(getrefcount(self.child), 2)
- self.child.setParent(self.parent)
- self.assertEqual(getrefcount(self.child), 3)
- self.child.setParent(self.parent)
- self.assertEqual(getrefcount(self.child), 3)
-
- def testConstructor(self):
- #QObject(QObject) refcount changes
- child = QObject(self.parent)
- self.assertEqual(getrefcount(child), 3)
-
-class ParentCase(unittest.TestCase):
- '''Small collection of tests related to parent-child relationship'''
-
- def testSetParent(self):
- #QObject.setParent()
- parent = QObject()
- child = QObject()
- child.setParent(parent)
-
- self.assertEqual(parent, child.parent())
-
- def testParentConstructor(self):
- #QObject(parent)
- parent = QObject()
- child = QObject(parent)
-
- self.assertEqual(parent, child.parent())
-
- orig_repr = repr(child)
- del child
- self.assertEqual(orig_repr, repr(parent.children()[0]))
-
- def testChildren(self):
- #QObject.children()
- parent = QObject()
- children = [QObject(parent) for x in range(25)]
-
- self.assertEqual(parent.children(), children)
-
- def testFindChild(self):
- #QObject.findChild() with all QObject
- parent = QObject()
- name = 'object%d'
- children = [QObject(parent) for i in range(20)]
-
- for i, child in enumerate(children):
- child.setObjectName(name % i)
-
- for i, child in enumerate(children):
- self.assertEqual(child, parent.findChild(QObject, name % i))
-
- def testFindChildWithoutName(self):
- parent = QObject()
- name = 'object%d'
- children = [QObject(parent) for i in range(20)]
-
- for i, child in enumerate(children):
- child.setObjectName(name % i)
-
- child = parent.findChild(QObject)
- self.assertTrue(isinstance(child, QObject))
-
- def testFindChildren(self):
- #QObject.findChildren() with all QObject
- parent = QObject()
- target_name = 'foo'
- children = [QTimer(parent) for i in range(20)]
- children.extend([QObject(parent) for i in range(20)])
-
- for i, child in enumerate(children):
- if i % 5 == 0:
- child.setObjectName(target_name)
- else:
- child.setObjectName(str(i))
-
- # Emulates findChildren with the intended outcome
- target_children = [x for x in children if x.objectName() == target_name]
- test_children = parent.findChildren(QObject, target_name)
- self.assertEqual(target_children, test_children)
-
- # test findChildren default value
- res = parent.findChildren(QTimer)
- self.assertEqual(len(res), 20)
-
- # test findChildren with a QRegularExpression
- res = parent.findChildren(QObject, QRegularExpression("^fo+"))
- self.assertEqual(res, test_children)
-
- def testParentEquality(self):
- #QObject.parent() == parent
- parent = QObject()
- child = QObject(parent)
- self.assertEqual(parent, child.parent())
-
-
-class TestParentOwnership(unittest.TestCase):
- '''Test case for Parent/Child object ownership'''
-
- def testParentDestructor(self):
- parent = QObject()
- self.assertEqual(getrefcount(parent), 2)
-
- child = QObject(parent)
- self.assertEqual(getrefcount(child), 3)
- self.assertEqual(getrefcount(parent), 2)
-
- del parent
- self.assertEqual(getrefcount(child), 2)
-
- # this will fail because parent deleted child cpp object
- self.assertRaises(RuntimeError, lambda :child.objectName())
-
- # test parent with multiples children
- def testMultipleChildren(self):
- o = QObject()
- self.assertEqual(getrefcount(o), 2)
-
- c = QObject(o)
- self.assertEqual(getrefcount(c), 3)
- self.assertEqual(getrefcount(o), 2)
-
- c2 = QObject(o)
- self.assertEqual(getrefcount(o), 2)
- self.assertEqual(getrefcount(c), 3)
- self.assertEqual(getrefcount(c2), 3)
-
- del o
- self.assertEqual(getrefcount(c), 2)
- self.assertEqual(getrefcount(c2), 2)
-
- # this will fail because parent deleted child cpp object
- self.assertRaises(RuntimeError, lambda :c.objectName())
- self.assertRaises(RuntimeError, lambda :c2.objectName())
-
- # test recursive parent
- def testRecursiveParent(self):
- o = QObject()
- self.assertEqual(getrefcount(o), 2)
-
- c = QObject(o)
- self.assertEqual(getrefcount(c), 3)
- self.assertEqual(getrefcount(o), 2)
-
- c2 = QObject(c)
- self.assertEqual(getrefcount(o), 2)
- self.assertEqual(getrefcount(c), 3)
- self.assertEqual(getrefcount(c2), 3)
-
- del o
- self.assertEqual(getrefcount(c), 2)
- self.assertEqual(getrefcount(c2), 2)
-
- # this will fail because parent deleted child cpp object
- self.assertRaises(RuntimeError, lambda :c.objectName())
- self.assertRaises(RuntimeError, lambda :c2.objectName())
-
- # test parent transfer
- def testParentTransfer(self):
- o = QObject()
- self.assertEqual(getrefcount(o), 2)
-
- c = QObject()
- self.assertEqual(getrefcount(c), 2)
-
- c.setParent(o)
- self.assertEqual(getrefcount(c), 3)
-
- c.setParent(None)
- self.assertEqual(getrefcount(c), 2)
-
- del c
- del o
-
-
-class ExtQObject(QObject):
- def __init__(self):
- QObject.__init__(self)
-
-class ReparentingTest(unittest.TestCase):
- '''Test cases for reparenting'''
-
- def testParentedQObjectIdentity(self):
- object_list = []
- parent = QObject()
- for i in range(3):
- obj = QObject()
- object_list.append(obj)
- obj.setParent(parent)
- for child in parent.children():
- self.assertTrue(child in object_list)
-
- def testParentedExtQObjectType(self):
- object_list = []
- parent = QObject()
- for i in range(3):
- obj = ExtQObject()
- object_list.append(obj)
- obj.setParent(parent)
- for orig, child in zip(object_list, parent.children()):
- self.assertEqual(type(orig), type(child))
-
- def testReparentedQObjectIdentity(self):
- object_list = []
- old_parent = QObject()
- new_parent = QObject()
- for i in range(3):
- obj = QObject()
- object_list.append(obj)
- obj.setParent(old_parent)
- for obj in object_list:
- obj.setParent(new_parent)
- for child in new_parent.children():
- self.assertTrue(child in object_list)
-
- def testReparentedExtQObjectType(self):
- object_list = []
- old_parent = QObject()
- new_parent = QObject()
- for i in range(3):
- obj = ExtQObject()
- object_list.append(obj)
- obj.setParent(old_parent)
- for obj in object_list:
- obj.setParent(new_parent)
- for orig, child in zip(object_list, new_parent.children()):
- self.assertEqual(type(orig), type(child))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_property_test.py b/sources/pyside2/tests/QtCore/qobject_property_test.py
deleted file mode 100644
index 0592bf652..000000000
--- a/sources/pyside2/tests/QtCore/qobject_property_test.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject property and setProperty'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Property, Signal
-
-class MyObjectWithNotifyProperty(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self.p = 0
-
- def readP(self):
- return self.p
-
- def writeP(self, v):
- self.p = v
- self.notifyP.emit()
-
- notifyP = Signal()
- myProperty = Property(int, readP, fset=writeP, notify=notifyP)
-
-class PropertyWithNotify(unittest.TestCase):
- def called(self):
- self.called_ = True
-
- def testNotify(self):
- self.called_ = False
- obj = MyObjectWithNotifyProperty()
- obj.notifyP.connect(self.called)
- obj.myProperty = 10
- self.assertTrue(self.called_)
-
- def testHasProperty(self):
- o = MyObjectWithNotifyProperty()
- o.setProperty("myProperty", 10)
- self.assertEqual(o.myProperty, 10)
- self.assertEqual(o.property("myProperty"), 10)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py b/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py
deleted file mode 100644
index 3af811e96..000000000
--- a/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject protected methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QThread, SIGNAL
-
-class Dummy(QObject):
- '''Dummy class'''
- pass
-
-class QObjectReceivers(unittest.TestCase):
- '''Test case for QObject.receivers()'''
-
- def cb(self, *args):
- #Dummy callback
- pass
-
- def testQObjectReceiversExtern(self):
- #QObject.receivers() - Protected method external access
-
- obj = Dummy()
- self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 0)
-
- QObject.connect(obj, SIGNAL("destroyed()"), self.cb)
- self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1)
-
- def testQThreadReceiversExtern(self):
- #QThread.receivers() - Inherited protected method
-
- obj = QThread()
- self.assertEqual(obj.receivers(SIGNAL('destroyed()')), 0)
- QObject.connect(obj, SIGNAL("destroyed()"), self.cb)
- self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_test.py b/sources/pyside2/tests/QtCore/qobject_test.py
deleted file mode 100644
index 47a9869d7..000000000
--- a/sources/pyside2/tests/QtCore/qobject_test.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal, Qt
-
-class Obj(QObject):
- signal = Signal()
- def empty(self):
- pass
-
-class ObjectNameCase(unittest.TestCase):
- '''Tests related to QObject object name'''
-
- def testSimple(self):
- #QObject.objectName(string)
- name = 'object1'
- obj = QObject()
- obj.setObjectName(name)
-
- self.assertEqual(name, obj.objectName())
-
- def testEmpty(self):
- #QObject.objectName('')
- name = ''
- obj = QObject()
- obj.setObjectName(name)
-
- self.assertEqual(name, obj.objectName())
-
- def testDefault(self):
- #QObject.objectName() default
- obj = QObject()
- self.assertEqual('', obj.objectName())
-
- def testUnicode(self):
- name = 'não'
- #FIXME Strange error on upstream when using equal(name, obj)
- obj = QObject()
- obj.setObjectName(name)
- self.assertEqual(obj.objectName(), name)
-
- def testUniqueConnection(self):
- obj = Obj()
- # On first connect, UniqueConnection returns True, and on the second
- # it must return False, and not a RuntimeError (PYSIDE-34)
- self.assertTrue(obj.signal.connect(obj.empty, Qt.UniqueConnection))
- self.assertFalse(obj.signal.connect(obj.empty, Qt.UniqueConnection))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_timer_event_test.py b/sources/pyside2/tests/QtCore/qobject_timer_event_test.py
deleted file mode 100644
index bdf074653..000000000
--- a/sources/pyside2/tests/QtCore/qobject_timer_event_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for QObject.timerEvent overloading'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class Dummy(QObject):
-
- def __init__(self, app):
- super(Dummy, self).__init__()
- self.times_called = 0
- self.app = app
-
- def timerEvent(self, event):
- QObject.timerEvent(self, event)
- event.accept()
- self.times_called += 1
-
- if self.times_called == 5:
- self.app.exit(0)
-
-class QObjectTimerEvent(UsesQCoreApplication):
-
- def setUp(self):
- #Acquire resources
- super(QObjectTimerEvent, self).setUp()
-
- def tearDown(self):
- #Release resources
- super(QObjectTimerEvent, self).tearDown()
-
- def testTimerEvent(self):
- #QObject.timerEvent overloading
- obj = Dummy(self.app)
- timer_id = obj.startTimer(200)
- self.app.exec_()
- obj.killTimer(timer_id)
- self.assertEqual(obj.times_called, 5)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py b/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py
deleted file mode 100644
index bbcd0b99a..000000000
--- a/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QObject's tr static methods.'''
-
-import os
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-#from helper.usesqcoreapplication import UsesQCoreApplication
-
-class QObjectTrTest(unittest.TestCase):
- '''Test case to check if QObject tr static methods could be treated as instance methods.'''
-
- def setUp(self):
- self.obj = QObject()
-
- def tearDown(self):
- del self.obj
-
- def testTrCommonCase(self):
- #Test common case for QObject.tr
- invar1 = 'test1'
- outvar1 = self.obj.tr(invar1)
- invar2 = 'test2'
- outvar2 = self.obj.tr(invar2, 'test comment')
- self.assertEqual((invar1, invar2), (outvar1, outvar2))
-
- def testTrAsInstanceMethod(self):
- #Test QObject.tr as instance
- invar1 = 'test1'
- outvar1 = QObject.tr(self.obj, invar1)
- invar2 = 'test2'
- outvar2 = QObject.tr(self.obj, invar2, 'test comment')
- self.assertEqual((invar1, invar2), (outvar1, outvar2))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py b/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py
deleted file mode 100644
index bd0ba66db..000000000
--- a/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QOperatingSystemVersion
-
-class TestQOperatingSystemVersion(unittest.TestCase):
- def test(self):
- ov = QOperatingSystemVersion.current()
- name = "{} v{}.{}.{}".format(ov.name(), ov.majorVersion(),
- ov.minorVersion(), ov.microVersion())
- print(name)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qpoint_test.py b/sources/pyside2/tests/QtCore/qpoint_test.py
deleted file mode 100644
index e73c37e5b..000000000
--- a/sources/pyside2/tests/QtCore/qpoint_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QPoint and QPointF'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPoint, QPointF
-
-
-class QPointTest(unittest.TestCase):
-
- def testQPointCtor(self):
- point = QPoint(QPoint(10,20))
-
-class QPointFTest(unittest.TestCase):
-
- def testQPointFCtor(self):
- pointf = QPointF(QPoint(10,20))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qprocess_test.py b/sources/pyside2/tests/QtCore/qprocess_test.py
deleted file mode 100644
index 1667f37b3..000000000
--- a/sources/pyside2/tests/QtCore/qprocess_test.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QProcess'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class TestQProcess (unittest.TestCase):
- def testStartDetached(self):
- value, pid = QProcess.startDetached("dir", [], os.getcwd())
- self.assertTrue(isinstance(value, bool))
- self.assertTrue(isinstance(pid, int))
-
- def testPid(self):
- p = QProcess()
- p.start("dir", [])
- p.waitForStarted()
- pid = p.processId()
- # We can't test the pid method result because it returns 0 when the
- # process isn't running
- if p.state() == QProcess.Running:
- self.assertNotEqual(pid, 0)
- p.waitForFinished()
- else:
- print("PROCESS ALREADY DEAD :-/")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qproperty_decorator.py b/sources/pyside2/tests/QtCore/qproperty_decorator.py
deleted file mode 100644
index c845ac6d3..000000000
--- a/sources/pyside2/tests/QtCore/qproperty_decorator.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Property
-
-class MyObject(QObject):
- def __init__(self):
- QObject.__init__(self)
- self._value = None
-
- @Property(int)
- def value(self):
- return self._value
-
- @value.setter
- # Note: The name of property and setter must be the same, because the
- # object changes its identity all the time. `valueSet` no longer works.
- def value(self, value):
- self._value = value
-
-
-class PropertyTest(unittest.TestCase):
- def destroyCB(self, obj):
- self._obDestroyed = True
-
- def testDecorator(self):
- self._obDestroyed = False
- o = MyObject()
- weak = weakref.ref(o, self.destroyCB)
- o.value = 10
- self.assertEqual(o._value, 10)
- self.assertEqual(o.value, 10)
- del o
- self.assertTrue(self._obDestroyed)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qrandomgenerator_test.py b/sources/pyside2/tests/QtCore/qrandomgenerator_test.py
deleted file mode 100644
index 170a31662..000000000
--- a/sources/pyside2/tests/QtCore/qrandomgenerator_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QRandomGenerator, QRandomGenerator64
-
-class QRandomGeneratorTest(unittest.TestCase):
- '''Test case for QRandomGenerator'''
-
- def testGenerator(self):
- self.assertTrue(QRandomGenerator.system())
- self.assertTrue(QRandomGenerator.global_())
- generator = QRandomGenerator()
- r = generator.bounded(10, 20)
- self.assertTrue(r >= 10)
- self.assertTrue(r <= 20)
-
- def testGenerator64(self):
- generator = QRandomGenerator64()
- r = generator.generate()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qrect_test.py b/sources/pyside2/tests/QtCore/qrect_test.py
deleted file mode 100644
index 9116d7b58..000000000
--- a/sources/pyside2/tests/QtCore/qrect_test.py
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QRect'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPoint, QRect, QRectF
-
-class RectConstructor(unittest.TestCase):
-
- def testDefault(self):
- #QRect()
- obj = QRect()
-
- self.assertTrue(obj.isNull())
-
- def testConstructorQPoint(self):
- topLeft = QPoint(3, 0)
- bottomRight = QPoint(0, 3)
-
- rect1 = QRect(topLeft, bottomRight)
- rect2 = QRect(topLeft, bottomRight)
-
- self.assertEqual(rect1, rect2)
-
-class RectOperator(unittest.TestCase):
- '''Test case for QRect operators'''
-
- def testEqual(self):
- '''QRect == QRect
- Note: operator == must be working as it's the main check
- for correctness'''
- rect1 = QRect()
- rect2 = QRect()
- self.assertEqual(rect1, rect2)
-
- rect1 = QRect(0, 4, 100, 300)
- rect2 = QRect(0, 4, 100, 300)
- self.assertEqual(rect1, rect2)
-
- def testNullRectIntersection(self):
- #QRect & QRect for null rects
- rect1 = QRect()
- rect2 = QRect()
- rect3 = rect1 & rect2
- self.assertEqual(rect3, rect1)
- self.assertEqual(rect3, rect2)
-
- def testNoIntersect(self):
- '''QRect & QRect for non-intersecting QRects
- Non-intersecting QRects return a 'null' QRect for operator &'''
- rect1 = QRect(10, 10, 5, 5)
- rect2 = QRect(20, 20, 5, 5)
- rect3 = rect1 & rect2
- self.assertEqual(rect3, QRect())
-
- def testIntersectPartial(self):
- #QRect & QRect for partial intersections
- rect1 = QRect(10, 10, 10, 10)
- rect2 = QRect(15, 15, 10, 10)
- rect3 = rect1 & rect2
- self.assertEqual(rect3, QRect(15, 15, 5, 5))
-
- def testIntersetEnclosed(self):
- #QRect & QRect for a qrect inside another
- rect1 = QRect(10, 10, 20, 20)
- rect2 = QRect(15, 15, 5, 5)
- rect3 = rect1 & rect2
- self.assertEqual(rect3, rect2)
-
- def testNullRectIntersectBounding(self):
- #QRect | QRect for null rects
- rect1 = QRect()
- rect2 = QRect()
- rect3 = rect1 & rect2
- self.assertEqual(rect3, rect1)
- self.assertEqual(rect3, rect2)
-
- def testNoIntersectBounding(self):
- '''QRect | QRect for non-intersecting QRects
- Non-intersecting QRects return a greater QRect for operator |'''
- rect1 = QRect(10, 10, 5, 5)
- rect2 = QRect(20, 20, 5, 5)
- rect3 = rect1 | rect2
- self.assertEqual(rect3, QRect(10, 10, 15, 15))
-
- def testBoundingPartialIntersection(self):
- #QRect | QRect for partial intersections
- rect1 = QRect(10, 10, 10, 10)
- rect2 = QRect(15, 15, 10, 10)
- rect3 = rect1 | rect2
- self.assertEqual(rect3, QRect(10, 10, 15, 15))
-
- def testBoundingEnclosed(self):
- #QRect | QRect for a qrect inside another
- rect1 = QRect(10, 10, 20, 20)
- rect2 = QRect(15, 15, 5, 5)
- rect3 = rect1 | rect2
- self.assertEqual(rect3, rect1)
-
- def testGetCoordsAndRect(self):
- rect1 = QRect(1, 2, 3, 4)
- self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
- self.assertEqual(rect1.getCoords(), (1, 2, 3, 5))
-
- rect1 = QRectF(1, 2, 3, 4)
- self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
- self.assertEqual(rect1.getCoords(), (1, 2, 4, 6))
-
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qregularexpression_test.py b/sources/pyside2/tests/QtCore/qregularexpression_test.py
deleted file mode 100644
index 50c755d0e..000000000
--- a/sources/pyside2/tests/QtCore/qregularexpression_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QRegularExpression'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QRegularExpression, QRegularExpressionMatch, QRegularExpressionMatchIterator
-
-class QRegularExpressionTest(unittest.TestCase):
-
- def testMatch(self):
- re = QRegularExpression('^.*(word2).*$')
- self.assertTrue(re.isValid())
- match = re.match('word1 word2 word3')
- self.assertTrue(match.isValid())
- self.assertEqual(match.captured(1), 'word2')
- self.assertEqual(match.capturedView(1), 'word2')
-
- def testMatchIterator(self):
- re = QRegularExpression('(\w+)')
- self.assertTrue(re.isValid())
- count = 0
- it = re.globalMatch('word1 word2 word3');
- while it.hasNext():
- it.next()
- count = count + 1
- self.assertEqual(count, 3)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qresource_test.py b/sources/pyside2/tests/QtCore/qresource_test.py
deleted file mode 100644
index 3ec925032..000000000
--- a/sources/pyside2/tests/QtCore/qresource_test.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QResource usage'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from PySide2.QtCore import QFile, QIODevice
-import resources_mc
-
-class ResourcesUsage(unittest.TestCase):
- '''Test case for resources usage'''
-
- def testPhrase(self):
- #Test loading of quote.txt resource
- f = open(adjust_filename('quoteEnUS.txt', __file__), "r")
- orig = f.read()
- f.close()
-
- f = QFile(':/quote.txt')
- f.open(QIODevice.ReadOnly) #|QIODevice.Text)
- print("Error:", f.errorString())
- copy = f.readAll()
- f.close()
- self.assertEqual(orig, copy)
-
- def testImage(self):
- #Test loading of sample.png resource
- f = open(adjust_filename('sample.png', __file__), "rb")
- orig = f.read()
- f.close()
-
- f = QFile(':/sample.png')
- f.open(QIODevice.ReadOnly)
- copy = f.readAll()
- f.close()
- self.assertEqual(len(orig), len(copy))
- self.assertEqual(orig, copy)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qsettings_test.py b/sources/pyside2/tests/QtCore/qsettings_test.py
deleted file mode 100644
index 814053a85..000000000
--- a/sources/pyside2/tests/QtCore/qsettings_test.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QDate'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from PySide2.QtCore import QSettings
-
-class TestQSettings(unittest.TestCase):
- def testConversions(self):
- file_path = adjust_filename('qsettings_test.ini', __file__)
- settings = QSettings(file_path, QSettings.IniFormat)
-
- r = settings.value('var1')
- self.assertEqual(type(r), list)
-
- r = settings.value('var2')
- self.assertEqual(type(r), str)
-
- r = settings.value('var2', type=list)
- self.assertEqual(type(r), list)
-
-
- def testDefaultValueConversion(self):
- settings = QSettings('foo.ini', QSettings.IniFormat)
- settings.setValue('zero_value', 0)
- settings.setValue('empty_list', [])
- settings.setValue('bool1', False)
- settings.setValue('bool2', True)
- del settings
-
- # Loading values already set
- settings = QSettings('foo.ini', QSettings.IniFormat)
-
- # Getting value that doesn't exist
- r = settings.value("variable")
- self.assertEqual(type(r), type(None))
-
- # Handling zero value
- r = settings.value('zero_value')
- self.assertEqual(type(r), int)
-
- r = settings.value('zero_value', type=int)
- self.assertEqual(type(r), int)
-
- # Empty list
- r = settings.value('empty_list')
- self.assertTrue(len(r) == 0)
- self.assertEqual(type(r), list)
-
- r = settings.value('empty_list', type=list)
- self.assertTrue(len(r) == 0)
- self.assertEqual(type(r), list)
-
- # Booleans
- r = settings.value('bool1')
- self.assertEqual(type(r), bool)
-
- r = settings.value('bool2')
- self.assertEqual(type(r), bool)
-
- r = settings.value('bool1', type=bool)
- self.assertEqual(type(r), bool)
-
- r = settings.value('bool2', type=int)
- self.assertEqual(type(r), int)
-
- r = settings.value('bool2', type=bool)
- self.assertEqual(type(r), bool)
-
- # Not set variable, but with default value
- r = settings.value('lala', 22, type=bytes)
- self.assertEqual(type(r), bytes)
-
- r = settings.value('lala', 22, type=int)
- self.assertEqual(type(r), int)
-
- r = settings.value('lala', 22, type=float)
- self.assertEqual(type(r), float)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qsize_test.py b/sources/pyside2/tests/QtCore/qsize_test.py
deleted file mode 100644
index 1bf31fae6..000000000
--- a/sources/pyside2/tests/QtCore/qsize_test.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QSize'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QSize
-
-class QSizeOperator(unittest.TestCase):
- def testOperatorMultiply(self):
- #QSize operator * float
- # bug 131
- a = QSize(1, 1)
- x = a * 3.4
- self.assertEqual(QSize(3, 3), x)
-
- def testOperatorRevertedMultiply(self):
- #QSize operator * float, reverted
- # bug 132
- a = QSize(1, 1)
- x = 3.4 * a
- self.assertEqual(QSize(3, 3), x)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qslot_object_test.py b/sources/pyside2/tests/QtCore/qslot_object_test.py
deleted file mode 100644
index 252a09bea..000000000
--- a/sources/pyside2/tests/QtCore/qslot_object_test.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-from PySide2 import QtCore
-
-"""
-This is a simple slot test that was updated to use the qApp "macro".
-It is implicitly in builtins and does not need an import.
-"""
-
-class objTest(QtCore.QObject):
-
- def __init__(self, parent=None):
- QtCore.QObject.__init__(self, parent)
-
- self.ok = False
-
- def slot(self):
- self.ok = True
- qApp.quit()
-
-
-class slotTest(unittest.TestCase):
- def quit_app(self):
- qApp.quit()
-
- def testBasic(self):
- timer = QtCore.QTimer()
- timer.setInterval(100)
-
- my_obj = objTest()
- my_slot = QtCore.SLOT("slot()")
- QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), my_obj, my_slot)
- timer.start(100)
-
- QtCore.QTimer.singleShot(1000, self.quit_app)
- qApp.exec_()
-
- self.assertTrue(my_obj.ok)
-
-
-if __name__ == '__main__':
- QtCore.QCoreApplication()
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qsocketnotifier_test.py b/sources/pyside2/tests/QtCore/qsocketnotifier_test.py
deleted file mode 100644
index cd3d783de..000000000
--- a/sources/pyside2/tests/QtCore/qsocketnotifier_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QUuid'''
-
-import os
-import socket
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication
-from PySide2.QtCore import QSocketNotifier
-
-
-class QSocketNotifierTest(unittest.TestCase):
- def testClass(self):
- app = QApplication([])
- # socketpair is not available on Windows
- if os.name != "nt":
- w_sock, r_sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
-
- self.assertIsInstance(r_sock.fileno(), int)
-
- notifier = QSocketNotifier(r_sock.fileno(), QSocketNotifier.Read)
-
- self.assertIsNotNone(notifier)
-
- w_sock.close()
- r_sock.close()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qsrand_test.py b/sources/pyside2/tests/QtCore/qsrand_test.py
deleted file mode 100644
index 03814c950..000000000
--- a/sources/pyside2/tests/QtCore/qsrand_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import gc
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QRandomGenerator
-
-class OverflowExceptionCollect(unittest.TestCase):
- '''Test case for OverflowError exception during garbage collection. See bug #147'''
-
- def testOverflow(self):
- # NOTE: PyQt4 raises TypeError, but boost.python raises OverflowError
- self.assertRaises(OverflowError, QRandomGenerator, 42415335332353253)
- # should not abort if bug #147 is fixed
- gc.collect()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qstandardpaths_test.py b/sources/pyside2/tests/QtCore/qstandardpaths_test.py
deleted file mode 100644
index 67c7b4a9b..000000000
--- a/sources/pyside2/tests/QtCore/qstandardpaths_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QStandardPaths'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QStandardPaths
-
-class QStandardPathsTest(unittest.TestCase):
- def testTestModeEnabled(self):
- print("QStandardPaths.isTestModeEnabled:", QStandardPaths.isTestModeEnabled())
- sp = True
- QStandardPaths.setTestModeEnabled(sp)
- self.assertEqual(QStandardPaths.isTestModeEnabled(), sp)
- sp = False
- QStandardPaths.setTestModeEnabled(sp)
- self.assertEqual(QStandardPaths.isTestModeEnabled(), sp)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qstorageinfo_test.py b/sources/pyside2/tests/QtCore/qstorageinfo_test.py
deleted file mode 100644
index c7ae14877..000000000
--- a/sources/pyside2/tests/QtCore/qstorageinfo_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QStorageInfo'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QStorageInfo
-
-class QandardPathsTest(unittest.TestCase):
- def testQStorageInfo(self):
- for v in QStorageInfo.mountedVolumes():
- print(v.name(), v.rootPath(), v.device())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qstring_test.py b/sources/pyside2/tests/QtCore/qstring_test.py
deleted file mode 100644
index 59512b5a3..000000000
--- a/sources/pyside2/tests/QtCore/qstring_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QString'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class QStringConstructor(unittest.TestCase):
- '''Test case for QString constructors'''
-
- def testQStringDefault(self):
- obj = QObject()
- obj.setObjectName('foo')
- self.assertEqual(obj.objectName(), 'foo')
- obj.setObjectName('áâãà')
- self.assertEqual(obj.objectName(), 'áâãà')
- obj.setObjectName(None)
- self.assertEqual(obj.objectName(), '')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qsysinfo_test.py b/sources/pyside2/tests/QtCore/qsysinfo_test.py
deleted file mode 100644
index 0f53a9cfa..000000000
--- a/sources/pyside2/tests/QtCore/qsysinfo_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QSysInfo
-
-class TestQSysInfo(unittest.TestCase):
- def testEnumEndian(self):
- self.assertEqual(QSysInfo.BigEndian, 0)
- self.assertEqual(QSysInfo.LittleEndian, 1)
- self.assertTrue(QSysInfo.ByteOrder > -1)
-
- def testEnumSizes(self):
- self.assertTrue(QSysInfo.WordSize > 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qtextstream_test.py b/sources/pyside2/tests/QtCore/qtextstream_test.py
deleted file mode 100644
index 99c231eec..000000000
--- a/sources/pyside2/tests/QtCore/qtextstream_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QTextStream'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray, QTextStream, QIODevice, QFile
-
-class QTextStreamShiftTest(unittest.TestCase):
-
- def setUp(self):
- self.ba = QByteArray()
- self.read = QTextStream(self.ba, QIODevice.ReadOnly)
- self.write = QTextStream(self.ba, QIODevice.WriteOnly)
-
- def testNumber(self):
- '''QTextStream << number'''
-
- self.write << '4'
- self.write.flush()
- res = self.read.readLine()
- self.assertTrue(isinstance(res, str))
- self.assertEqual(res, '4')
-
-class QTextStreamGetSet(unittest.TestCase):
-
- def setUp(self):
- self.obj = QTextStream()
-
- def testDevice(self):
- '''QTextStream get/set Device'''
- device = QFile()
- self.obj.setDevice(device)
- self.assertEqual(device, self.obj.device())
- self.obj.setDevice(None)
- self.assertEqual(None, self.obj.device())
-
-class QTextStreamInitialization(unittest.TestCase):
-
- def testConstruction(self):
- '''QTextStream construction'''
- obj = QTextStream()
-
- self.assertEqual(obj.device(), None)
- self.assertEqual(obj.string(), None)
-
- self.assertTrue(obj.atEnd())
- self.assertEqual(obj.readAll(), '')
-
-class QTextStreamReadLinesFromDevice(unittest.TestCase):
-
- def _check_data(self, data_set):
-
- for data, lines in data_set:
- stream = QTextStream(data)
-
- res = []
- while not stream.atEnd():
- res.append(stream.readLine())
-
- self.assertEqual(res, lines)
-
- def testLatin1(self):
- '''QTextStream readLine for simple Latin1 strings'''
-
- data = []
-
- data.append((QByteArray(), []))
- data.append((QByteArray(bytes('\n', "UTF-8")), ['']))
- data.append((QByteArray(bytes('\r\n', "UTF-8")), ['']))
- data.append((QByteArray(bytes('ole', "UTF-8")), ['ole']))
- data.append((QByteArray(bytes('ole\n', "UTF-8")), ['ole']))
- data.append((QByteArray(bytes('ole\r\n', "UTF-8")), ['ole']))
- data.append((QByteArray(bytes('ole\r\ndole\r\ndoffen', "UTF-8")), ['ole', 'dole', 'doffen']))
-
- self._check_data(data)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py b/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py
deleted file mode 100644
index 9ff62c156..000000000
--- a/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Producer-Consumer test/example with QThread'''
-
-import logging
-import os
-from random import random
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-logging.basicConfig(level=logging.WARNING)
-
-from PySide2.QtCore import QThread, QCoreApplication, QObject, SIGNAL
-
-class Bucket(QObject):
- '''Dummy class to hold the produced values'''
- def __init__(self, max_size=10, *args):
- #Constructor which receives the max number of produced items
- super(Bucket, self).__init__(*args)
- self.data = []
- self.max_size = 10
-
- def pop(self):
- #Retrieves an item
- return self.data.pop(0)
-
- def push(self, data):
- #Pushes an item
- self.data.append(data)
-
-class Producer(QThread):
- '''Producer thread'''
-
- def __init__(self, bucket, *args):
- #Constructor. Receives the bucket
- super(Producer, self).__init__(*args)
- self.runs = 0
- self.bucket = bucket
- self.production_list = []
-
- def run(self):
- #Produces at most bucket.max_size items
- while self.runs < self.bucket.max_size:
- value = int(random()*10) % 10
- self.bucket.push(value)
- self.production_list.append(value)
- logging.debug('PRODUCER - pushed %d' % value)
- self.runs += 1
- self.msleep(5)
-
-
-
-class Consumer(QThread):
- '''Consumer thread'''
- def __init__(self, bucket, *args):
- #Constructor. Receives the bucket
- super(Consumer, self).__init__(*args)
- self.runs = 0
- self.bucket = bucket
- self.consumption_list = []
-
- def run(self):
- #Consumes at most bucket.max_size items
- while self.runs < self.bucket.max_size:
- try:
- value = self.bucket.pop()
- self.consumption_list.append(value)
- logging.debug('CONSUMER - got %d' % value)
- self.runs += 1
- except IndexError:
- logging.debug('CONSUMER - empty bucket')
- self.msleep(5)
-
-class ProducerConsumer(unittest.TestCase):
- '''Basic test case for producer-consumer QThread'''
-
- def setUp(self):
- #Create fixtures
- self.app = QCoreApplication([])
-
- def tearDown(self):
- #Destroy fixtures
- del self.app
-
- def finishCb(self):
- #Quits the application
- self.app.exit(0)
-
- def testProdCon(self):
- #QThread producer-consumer example
- bucket = Bucket()
- prod = Producer(bucket)
- cons = Consumer(bucket)
-
- prod.start()
- cons.start()
-
- QObject.connect(prod, SIGNAL('finished()'), self.finishCb)
- QObject.connect(cons, SIGNAL('finished()'), self.finishCb)
-
- self.app.exec_()
-
- prod.wait(50)
- cons.wait(50)
-
- self.assertEqual(prod.production_list, cons.consumption_list)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qthread_signal_test.py b/sources/pyside2/tests/QtCore/qthread_signal_test.py
deleted file mode 100644
index bb3423bd7..000000000
--- a/sources/pyside2/tests/QtCore/qthread_signal_test.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for connecting signals between threads'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QThread, QObject, SIGNAL, QCoreApplication
-
-thread_run = False
-
-class Source(QObject):
- def __init__(self, *args):
- QObject.__init__(self, *args)
-
- def emit_sig(self):
- self.emit(SIGNAL('source()'))
-
-class Target(QObject):
- def __init__(self, *args):
- QObject.__init__(self, *args)
- self.called = False
-
- def myslot(self):
- self.called = True
-
-class ThreadJustConnects(QThread):
- def __init__(self, source, *args):
- QThread.__init__(self, *args)
- self.source = source
- self.target = Target()
-
- def run(self):
- global thread_run
- thread_run = True
- QObject.connect(self.source, SIGNAL('source()'), self.target.myslot)
-
- while not self.target.called:
- pass
-
-
-
-class BasicConnection(unittest.TestCase):
-
- def testEmitOutsideThread(self):
- global thread_run
-
- app = QCoreApplication([])
- source = Source()
- thread = ThreadJustConnects(source)
-
- QObject.connect(thread, SIGNAL('finished()'), lambda: app.exit(0))
- thread.start()
-
- while not thread_run:
- pass
-
- source.emit_sig()
-
- app.exec_()
- thread.wait()
-
- self.assertTrue(thread.target.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qthread_test.py b/sources/pyside2/tests/QtCore/qthread_test.py
deleted file mode 100644
index 2ba5a536c..000000000
--- a/sources/pyside2/tests/QtCore/qthread_test.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QThread'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QThread, QCoreApplication, QObject, SIGNAL, QMutex, QTimer
-from PySide2.QtCore import QEventLoop
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-mutex = QMutex()
-
-class Dummy(QThread):
- '''Dummy thread'''
- def __init__(self, *args):
- super(Dummy, self).__init__(*args)
- self.called = False
-
- def run(self):
- #Start-quit sequence
- self.qobj = QObject()
- mutex.lock()
- self.called = True
- mutex.unlock()
-
-class QThreadSimpleCase(UsesQCoreApplication):
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.called = False
-
- def tearDown(self):
- UsesQCoreApplication.tearDown(self)
-
- def testThread(self):
- #Basic QThread test
- obj = Dummy()
- obj.start()
- self.assertTrue(obj.wait(100))
-
- self.assertTrue(obj.called)
-
- def cb(self, *args):
- self.called = True
- #self.exit_app_cb()
-
- def abort_application(self):
- if self._thread.isRunning():
- self._thread.terminate()
- self.app.quit()
-
- def testSignalFinished(self):
- #QThread.finished() (signal)
- obj = Dummy()
- QObject.connect(obj, SIGNAL('finished()'), self.cb)
- mutex.lock()
- obj.start()
- mutex.unlock()
-
- self._thread = obj
- QTimer.singleShot(1000, self.abort_application)
- self.app.exec_()
-
- self.assertTrue(self.called)
-
- def testSignalStarted(self):
- #QThread.started() (signal)
- obj = Dummy()
- QObject.connect(obj, SIGNAL('started()'), self.cb)
- obj.start()
-
- self._thread = obj
- QTimer.singleShot(1000, self.abort_application)
- self.app.exec_()
-
- self.assertEqual(obj.qobj.thread(), obj) # test QObject.thread() method
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py b/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py
deleted file mode 100644
index 41fe4ac97..000000000
--- a/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QTimer.singleShot'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer, QCoreApplication, Signal
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class WatchDog(QObject):
- '''Exits the QCoreApplication main loop after sometime.'''
-
- def __init__(self, watched):
- QObject.__init__(self)
- self.times_called = 0
- self.watched = watched
-
- def timerEvent(self, evt):
- self.times_called += 1
- if self.times_called == 20:
- self.watched.exit_app_cb()
-
-class TestSingleShot(UsesQCoreApplication):
- '''Test case for QTimer.singleShot'''
-
- def setUp(self):
- #Acquire resources
- UsesQCoreApplication.setUp(self)
- self.watchdog = WatchDog(self)
- self.called = False
-
- def tearDown(self):
- #Release resources
- del self.watchdog
- del self.called
- UsesQCoreApplication.tearDown(self)
-
- def callback(self):
- self.called = True
- self.app.quit()
-
- def testSingleShot(self):
- QTimer.singleShot(100, self.callback)
- self.app.exec_()
- self.assertTrue(self.called)
-
-class SigEmitter(QObject):
-
- sig1 = Signal()
-
-
-class TestSingleShotSignal(UsesQCoreApplication):
- '''Test case for QTimer.singleShot connecting to signals'''
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.watchdog = WatchDog(self)
- self.called = False
-
- def tearDown(self):
- del self.watchdog
- del self.called
- UsesQCoreApplication.tearDown(self)
-
- def callback(self):
- self.called = True
- self.app.quit()
-
- def testSingleShotSignal(self):
- emitter = SigEmitter()
- emitter.sig1.connect(self.callback)
- QTimer.singleShot(100, emitter.sig1)
- self.app.exec_()
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qtimer_timeout_test.py b/sources/pyside2/tests/QtCore/qtimer_timeout_test.py
deleted file mode 100644
index 4f038ddf1..000000000
--- a/sources/pyside2/tests/QtCore/qtimer_timeout_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for timeout() signals from QTimer object.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer, SIGNAL
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class WatchDog(QObject):
- '''Exits the QCoreApplication main loop after sometime.'''
-
- def __init__(self, watched):
- QObject.__init__(self)
- self.times_called = 0
- self.watched = watched
-
- def timerEvent(self, evt):
- self.times_called += 1
- if self.times_called == 20:
- self.watched.exit_app_cb()
-
-
-class TestTimeoutSignal(UsesQCoreApplication):
- '''Test case to check if the signals are really being caught'''
-
- def setUp(self):
- #Acquire resources
- UsesQCoreApplication.setUp(self)
- self.watchdog = WatchDog(self)
- self.timer = QTimer()
- self.called = False
-
- def tearDown(self):
- #Release resources
- del self.watchdog
- del self.timer
- del self.called
- UsesQCoreApplication.tearDown(self)
-
- def callback(self, *args):
- #Default callback
- self.called = True
-
- def testTimeoutSignal(self):
- #Test the QTimer timeout() signal
- refCount = sys.getrefcount(self.timer)
- QObject.connect(self.timer, SIGNAL('timeout()'), self.callback)
- self.timer.start(4)
- self.watchdog.startTimer(10)
-
- self.app.exec_()
-
- self.assertTrue(self.called)
- self.assertEqual(sys.getrefcount(self.timer), refCount)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qtimezone_test.py b/sources/pyside2/tests/QtCore/qtimezone_test.py
deleted file mode 100644
index f22ce73f9..000000000
--- a/sources/pyside2/tests/QtCore/qtimezone_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimeZone
-
-class TestQTimeZone (unittest.TestCase):
- def testTimeZone(self):
- id = bytes('Europe/Berlin', "UTF-8")
- timeZone = QTimeZone(id)
- self.assertTrue(timeZone.isValid())
- self.assertEqual(timeZone.id(), id)
- name = timeZone.displayName(QTimeZone.GenericTime, QTimeZone.DefaultName)
- self.assertTrue(name)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qtnamespace_test.py b/sources/pyside2/tests/QtCore/qtnamespace_test.py
deleted file mode 100644
index fbf92b6d0..000000000
--- a/sources/pyside2/tests/QtCore/qtnamespace_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test suite for QtCore.Qt namespace'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt
-
-class QtNamespace(unittest.TestCase):
- '''Test case for accessing attributes from Qt namespace'''
-
- def testBasic(self):
- #Access to Qt namespace
- getattr(Qt, 'Horizontal')
- getattr(Qt, 'WindowMaximizeButtonHint')
- self.assertTrue(True)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qurl_test.py b/sources/pyside2/tests/QtCore/qurl_test.py
deleted file mode 100644
index 8c2b43e9a..000000000
--- a/sources/pyside2/tests/QtCore/qurl_test.py
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test suite for QtCore.QUrl'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUrl
-from PySide2.QtCore import QUrlQuery
-
-class QUrlBasicConstructor(unittest.TestCase):
- '''Tests the basic constructors'''
-
- def testBasic(self):
- #Default constructor for QUrl
- url = QUrl()
- self.assertEqual(url.toString(), "")
-
- def testSetAttributes(self):
- #Construct QUrl by set* methods
- url = QUrl()
-
- url.setScheme('ftp')
- self.assertEqual(url.toString(), 'ftp:')
-
- url.setHost('www.google.com')
- self.assertEqual(url.toString(), 'ftp://www.google.com')
-
- url.setPort(8080)
- self.assertEqual(url.toString(), 'ftp://www.google.com:8080')
-
- url.setPath('/mail/view')
- self.assertEqual(url.toString(),
- 'ftp://www.google.com:8080/mail/view')
-
- url.setUserName('john')
- self.assertEqual(url.toString(),
- 'ftp://john@www.google.com:8080/mail/view')
-
- url.setPassword('abc123')
- self.assertEqual(url.toString(),
- 'ftp://john:abc123@www.google.com:8080/mail/view')
-
-class QueryItemsTest(unittest.TestCase):
- '''Test query item management'''
-
- def testQueryItems(self):
- url = QUrl('http://www.google.com/search?q=python&hl=en')
- valid_data = [(('q'), ('python')), (('hl'), ('en'))]
-
- self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
-
- def testEncodedQueryItems(self):
- url = QUrl('http://www.google.com/search?q=python&hl=en')
- valid_data = [(('q'), ('python')), (('hl'), ('en'))]
-
- self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
-
- def testSetQueryItems(self):
- urla = QUrl('http://www.google.com/search?q=python&hl=en')
- urlb = QUrl('http://www.google.com/search')
-
- urlb.setQuery(urla.query())
-
- self.assertEqual(urla, urlb)
-
- def testAddQueryItem(self):
- url = QUrlQuery()
- valid_data = [('hl', 'en'), ('user', 'konqui')]
-
- url.addQueryItem(*valid_data[0])
- self.assertEqual(url.queryItems()[0], valid_data[0])
-
- url.addQueryItem(*valid_data[1])
- self.assertEqual(sorted(url.queryItems()), sorted(valid_data))
-
- def testAllQueryItemsValues(self):
- url = QUrlQuery()
- key = 'key'
- valid_data = ['data', 'valid', 'test']
-
- for i, data in enumerate(valid_data):
- url.addQueryItem(key, data)
- self.assertEqual(url.allQueryItemValues(key),
- list(valid_data[:i+1]))
-
- def testPath(self):
- url = QUrl("http://qt-project.org/images/ban/pgs_front.jpg")
- self.assertEqual(url.path(), "/images/ban/pgs_front.jpg")
-
-# PYSIDE-345: No bindings for QUrlQuery
-class QueryItemsTest(unittest.TestCase):
- '''Test query item management'''
-
- def testQueryItems(self):
- url = QUrl('http://www.google.com/search?q=python&hl=en')
- valid_data = [(('q'), ('python')), (('hl'), ('en'))]
-
- self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
-
- def testEncodedQueryItems(self):
- url = QUrl('http://www.google.com/search?q=python&hl=en')
- valid_data = [(('q'), ('python')), (('hl'), ('en'))]
-
- self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
-
- def testSetQueryItems(self):
- urla = QUrl('http://www.google.com/search?q=python&hl=en')
- urlb = QUrl('http://www.google.com/search')
-
- urlb.setQuery(urla.query())
-
- self.assertEqual(urla, urlb)
-
- def testAddQueryItem(self):
- url = QUrlQuery()
- valid_data = [('hl', 'en'), ('user', 'konqui')]
-
- url.addQueryItem(*valid_data[0])
- self.assertEqual(url.queryItems()[0], valid_data[0])
-
- url.addQueryItem(*valid_data[1])
- self.assertEqual(sorted(url.queryItems()), sorted(valid_data))
-
- def testAllQueryItemsValues(self):
- url = QUrlQuery()
- key = 'key'
- valid_data = ['data', 'valid', 'test']
-
- for i, data in enumerate(valid_data):
- url.addQueryItem(key, data)
- self.assertEqual(url.allQueryItemValues(key),
- list(valid_data[:i+1]))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qurlquery_test.py b/sources/pyside2/tests/QtCore/qurlquery_test.py
deleted file mode 100644
index 6e538c919..000000000
--- a/sources/pyside2/tests/QtCore/qurlquery_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QUrlQuery'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUrlQuery
-
-class QUrlQueryTest(unittest.TestCase):
- def testConstructing(self):
- empty = QUrlQuery()
- self.assertTrue(empty.isEmpty())
-
- empty.clear();
- self.assertTrue(empty.isEmpty())
-
- def testAddRemove(self):
- query = QUrlQuery()
-
- query.addQueryItem("a", "b");
- self.assertTrue(not query.isEmpty())
- self.assertTrue(query.hasQueryItem("a"))
- self.assertEqual(query.queryItemValue("a"), "b")
- self.assertEqual(query.allQueryItemValues("a"), ["b"])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/quuid_test.py b/sources/pyside2/tests/QtCore/quuid_test.py
deleted file mode 100644
index ecb4a9562..000000000
--- a/sources/pyside2/tests/QtCore/quuid_test.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QUuid'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUuid
-
-class QUuidTest(unittest.TestCase):
- def testFromString(self):
- uuidString = '{fc69b59e-cc34-4436-a43c-ee95d128b8c5}'
-# testing overload QUUid::fromString(QStringView)
- uuid = QUuid.fromString(uuidString)
- self.assertTrue(not uuid.isNull())
- self.assertEqual(uuid.toString(), uuidString)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qversionnumber_test.py b/sources/pyside2/tests/QtCore/qversionnumber_test.py
deleted file mode 100644
index e0d734eec..000000000
--- a/sources/pyside2/tests/QtCore/qversionnumber_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QVersionNumber'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QVersionNumber
-
-class QVersionNumberTest(unittest.TestCase):
- def testFromString(self):
- versionString = '5.9.2'
- version = QVersionNumber.fromString(versionString)
- self.assertTrue(not version.isNull())
- self.assertEqual(version.majorVersion(), 5)
- self.assertEqual(version.minorVersion(), 9)
- self.assertEqual(version.microVersion(), 2)
- self.assertEqual(version.toString(), versionString)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/repr_test.py b/sources/pyside2/tests/QtCore/repr_test.py
deleted file mode 100644
index 8a3a1519a..000000000
--- a/sources/pyside2/tests/QtCore/repr_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
-from PySide2.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QPoint, QPointF
-try:
- from PySide2.QtCore import QUuid
- HAVE_Q = True
-except ImportError:
- HAVE_Q = False
-
-class ReprCopyHelper:
- def testCopy(self):
- copy = eval(self.original.__repr__())
- self.assertTrue(copy is not self.original)
- self.assertEqual(copy, self.original)
-
-class QByteArrayReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QByteArray(bytes('the quick brown fox jumps over the lazy dog', "UTF-8"))
-
-
-class QDateReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QDate(2010, 11, 22)
-
-
-class QTimeReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QTime(11, 37, 55, 692)
-
-
-class QDateTimeReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QDateTime(2010, 5, 18, 10, 24, 45, 223, Qt.LocalTime)
-
-
-class QSizeReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QSize(42, 190)
-
-
-class QSizeFReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QSizeF(42.7, 190.2)
-
-class QRectReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QRect(100, 200, 300, 400)
-
-class QRectFReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QRectF(100.33, 200.254, 300.321, 400.123)
-
-class QLineReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QLine(1, 2, 3, 4)
-
-class QLineFReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QLineF(1.1, 2.2, 3.3, 4.4)
-
-class QPointReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QPoint(1, 2)
-
-class QPointFReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QPointF(1.1, 2.2)
-
-class QUuiCopy(ReprCopyHelper, unittest.TestCase):
- @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
- def setUp(self):
- self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/resources_mc.py b/sources/pyside2/tests/QtCore/resources_mc.py
deleted file mode 100644
index 4b29523f5..000000000
--- a/sources/pyside2/tests/QtCore/resources_mc.py
+++ /dev/null
@@ -1,3571 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Resource object code
-#
-# Created: Thu Feb 3 16:09:36 2011
-# by: The Resource Compiler for PySide (Qt v4.6.3)
-#
-# WARNING! All changes made in this file will be lost!
-
-from PySide2 import QtCore
-
-qt_resource_data = b"""\
-\x00\x00\x00\x35\
-\x46\
-\x69\x6e\x65\x21\x20\x44\x69\x73\x68\x6f\x6e\x6f\x72\x21\x20\x44\
-\x69\x73\x68\x6f\x6e\x6f\x72\x20\x6f\x6e\x20\x79\x6f\x75\x2c\x20\
-\x64\x69\x73\x68\x6f\x6e\x6f\x72\x20\x6f\x6e\x20\x79\x61\x20\x63\
-\x6f\x77\x21\x0a\
-\x00\x00\xda\x88\
-\x89\
-\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
-\x00\x00\xb1\x00\x00\x00\xd2\x08\x06\x00\x00\x00\x05\x49\x21\x31\
-\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\
-\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\
-\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\
-\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xda\x03\x0a\
-\x0c\x02\x2e\xb0\x96\x99\x74\x00\x00\x00\x19\x74\x45\x58\x74\x43\
-\x6f\x6d\x6d\x65\x6e\x74\x00\x43\x72\x65\x61\x74\x65\x64\x20\x77\
-\x69\x74\x68\x20\x47\x49\x4d\x50\x57\x81\x0e\x17\x00\x00\x20\x00\
-\x49\x44\x41\x54\x78\xda\x94\xbd\xd9\xaf\x24\xd9\x7a\xdd\xf7\x8b\
-\x21\x33\x77\x44\xe4\x9c\xa7\xaa\xcf\xa9\xb1\xab\x87\x6b\xf2\x92\
-\xd4\x15\x49\x0b\x84\x64\xd9\x22\x64\x3f\xd8\x30\x0c\xd8\x8f\x34\
-\xfc\x68\x43\x7f\x8b\xfe\x04\x02\x06\xfc\x64\xbf\xd1\x06\x04\x13\
-\x7a\x30\x65\x59\x04\x4d\x03\xa4\x48\xba\x29\xf9\x72\xb8\xdd\x5d\
-\x55\x5d\xc3\x39\x75\xea\x9c\x9c\x23\xf6\xce\xcc\x18\xfc\xb0\x87\
-\x88\xc8\xcc\x6a\xd9\xd9\x68\x44\xce\x79\x2a\x73\xc5\x8a\xb5\xd7\
-\xb7\xbe\x2f\xbc\xdf\xff\x17\xbf\x57\x09\x00\x15\x82\xc8\x29\x89\
-\xb0\x97\x24\xaa\x90\x52\x51\x12\x91\x44\x95\xb9\x37\x42\x56\x1e\
-\x91\x97\x91\x4a\xcf\x3d\x27\x8a\x04\x12\x1a\xaf\xd6\xcf\x45\x54\
-\xa0\x3c\x7e\xfc\x22\xeb\xe7\x9b\xeb\xfa\xbd\xea\xdb\x08\x01\x4a\
-\x01\x11\x42\x54\x28\xe5\xe9\x2d\x20\xc0\xdd\x6e\x5e\xdc\x7d\x4a\
-\x02\x7d\x2a\xd1\x73\x8f\x79\x6a\x07\xa2\xa0\x22\xd6\xd7\x81\x24\
-\xdb\xe3\x8d\x87\xad\xf7\xc8\xe3\x12\x80\x30\xf3\xc9\xe3\x92\x30\
-\xf3\x09\x63\x81\x22\x43\x10\x03\x99\x79\x66\x6c\xfe\xce\x12\x94\
-\x5f\xbf\xc1\xd1\xed\x38\x28\xf4\xfb\x85\x11\x79\x2e\xf1\x37\x7d\
-\xb6\xb1\xe4\x61\x76\xe0\xf6\xe5\x82\xc3\x04\x46\xe3\x01\x00\x7d\
-\x42\xb6\xe4\x4c\xbd\x31\xd5\x70\xc3\xc6\xef\x33\x28\xb7\x78\xeb\
-\x01\xeb\x47\x01\x09\x3d\x52\x76\x24\xe8\x7f\x57\x90\x29\x3a\x71\
-\x0f\x45\xfd\x7d\x77\x85\x60\xaf\xd4\xc9\x37\x2e\x44\x81\x52\x01\
-\x82\x0a\x85\x87\xcc\x04\xdf\x7e\xbc\x67\x1c\x06\xfa\xfb\x99\x54\
-\xcc\x98\x50\x72\x4f\x12\x27\x88\x69\x42\x99\x15\x27\xef\xe3\xc7\
-\x41\xeb\xfe\xbd\x52\xc8\x4c\x00\x50\x72\x8f\xcf\x8c\x49\x2c\x29\
-\x45\x84\x1f\x07\x54\x9d\x11\xde\x61\xa5\x1f\xcf\x0a\x56\x73\xb8\
-\x5b\xbc\xa4\x5a\xae\x4f\xde\xdb\x1b\x0f\x19\x52\xf1\xd9\xe3\x11\
-\x4c\x1f\x52\x75\x46\x27\xcf\x79\xf4\xe8\x6b\x42\xfd\x63\x07\x20\
-\x72\x50\x01\xb0\xa7\x2b\xba\xec\x91\xec\xa5\x06\x88\xaf\x0e\x48\
-\x72\x03\x18\x0d\xea\x14\x8f\x3d\x12\x64\xc4\x1e\x40\xda\xfb\x61\
-\x8f\x44\x00\x25\x5e\x8d\x4f\xc0\x47\x52\x12\x31\x2c\x3d\xd6\x7e\
-\xe5\x6e\x83\x47\x15\x65\x78\xd2\xc3\x8f\xa0\x94\xfa\x47\x90\x91\
-\xa4\xb4\x3b\x8a\x52\x06\xd2\x12\x94\x05\xa9\xbe\x47\x99\x5d\x47\
-\x35\x76\x16\x0b\x68\x0d\xe4\x08\xa5\x4a\x03\x66\xe8\x09\xfd\xfc\
-\xca\x00\xaf\x12\x3d\xfa\xf3\x0d\x69\xdc\xa5\xf2\xf5\xeb\x06\xa5\
-\xc7\xc6\xaf\x18\x64\x3e\x79\x2c\xd0\x1f\x1a\x93\xc7\x10\x02\x82\
-\xb8\x01\xe4\x06\x58\x9b\x00\x06\x8a\x2a\x26\x40\x11\x67\x92\x2c\
-\x8e\xc8\x8a\x80\xa2\x27\x98\x50\xd6\xc0\xce\x24\x19\x53\x1e\xbe\
-\x80\x2d\x39\x7d\x42\xd4\x7c\x05\xd3\x11\x7d\x42\xf6\xd5\x16\x56\
-\x1e\x83\xd1\x96\xd5\x6a\x44\x39\xd8\x32\xe2\x82\x42\x1c\x10\xf8\
-\xa0\x34\x80\x01\x14\x1e\x5d\x21\xda\x80\xa5\xa2\x14\x91\x03\x73\
-\x57\x08\x94\x52\xee\x7e\x94\xe2\x2f\x6e\x7e\xce\x24\xeb\xc3\x64\
-\x48\x31\x9a\x10\x2c\x16\x94\x13\x0d\xc2\xae\xf8\x34\xfd\x34\x01\
-\x5c\x55\x63\xba\x62\x09\x68\x20\xfb\xcc\xea\xbf\xc9\x3e\x7f\x59\
-\x12\x24\xf5\x0e\xc0\xbc\x60\xbb\x08\x48\x3c\x48\xab\x09\x89\xb7\
-\x00\x20\x8d\xbb\x24\xcb\x35\x98\x1d\x1a\xc0\x3b\xac\x5a\x40\xf6\
-\x0e\x2b\x92\x7e\x07\xfd\x8d\x0b\xf3\x87\x88\x02\x44\x41\xa6\xe6\
-\x35\x9b\x01\x4a\xe4\x1a\xe8\xe6\xf6\x1e\xc9\x1e\x49\xd7\x80\xa7\
-\x4b\x64\x71\x85\xdf\x40\xed\xbe\x71\xbd\x06\x2c\x6c\xfd\xcc\xec\
-\xa9\x91\x7b\xcc\x93\xb1\x7e\x8e\xf4\xf0\x0d\xeb\x5b\x30\xa7\xd2\
-\x03\xa9\xdc\xbb\xc9\x06\x5f\xcb\x16\x9b\xd7\xcf\x50\xca\xd3\x47\
-\x81\x06\xb8\x85\xa8\xe8\x89\x88\x9d\x92\x20\x0a\xc7\xc0\x9e\xda\
-\xe9\x2f\x30\x38\xb8\x77\xdb\xf8\x15\xd1\x11\xb3\xb7\x18\x3a\x53\
-\xa7\x00\xb6\xc0\xed\x09\xb7\x0d\x76\x35\x80\x5b\xaf\xcf\x25\x59\
-\x11\x10\xb3\x26\x9c\x68\x60\x66\x0c\x99\x7a\x63\xba\x5e\x9f\x7c\
-\x9a\x68\x20\x37\x2e\x87\x95\xa7\x9f\x1f\xea\xf7\x4a\xf0\x89\x18\
-\x20\x44\x41\x11\x0b\x3a\x71\xef\x04\xc0\x80\x06\xea\x19\x66\xb6\
-\xc0\x96\x99\xe0\xe3\xdb\x1c\x80\x65\x5e\x10\xac\x34\x90\x3e\x96\
-\x17\x44\xb1\x3a\x01\xeb\xa7\x2e\x41\xb2\xd1\xdf\x7e\x56\xff\x0d\
-\xf6\xf5\x00\x45\x3a\x20\x48\x36\x54\x9d\x11\x65\x56\x50\xa4\x83\
-\xd6\xe3\x16\xc0\xcb\xaa\x20\xc9\xf6\xa4\x71\xb7\xf5\xfe\x16\xc0\
-\x96\xc9\x01\xd2\xed\x01\x3f\x57\x92\x03\x19\x76\xbb\xc9\x4b\x64\
-\xd8\x63\x93\x97\xe4\x4a\xb2\xc9\x4b\x0e\xee\x90\x69\x7e\x33\x15\
-\x9a\x43\xc7\xbe\x05\x5a\x0b\x72\xcb\x5b\xdd\x86\xb8\x28\x3f\x71\
-\xdd\x8f\x2a\x4a\x22\xfd\x3e\x91\xa8\x81\x6c\xbe\x78\xbb\xb5\xaf\
-\x29\xa5\x57\x33\xf5\xb1\xe4\x70\xd7\x23\x07\xe0\x63\x56\xf6\xcc\
-\xbf\x45\x19\x06\x06\xe8\x77\x05\x24\x29\x69\xd1\x31\xcc\x1c\x18\
-\x00\x1b\x90\x92\x91\xc7\x82\x4c\x1f\x73\xb4\x1c\x88\x85\x79\x9f\
-\x8c\xa2\x8a\xdb\x3f\xe6\x4e\x51\xf4\x04\x83\x3c\xa5\x9f\x45\x2d\
-\x70\x0f\x7b\x5d\x27\x27\xe2\xa0\x60\x3b\xd0\xe0\xf7\x37\x7d\xca\
-\xc1\x96\x65\xe5\xc3\xd8\x27\x9c\x8c\xc8\xa7\x89\xf9\xf4\x5a\xe2\
-\x6c\x07\x3e\x49\x6c\x8f\x44\x01\x3e\x29\x25\x09\x82\xaa\x75\x88\
-\xf7\xe3\xa0\x75\x88\x3f\xbe\xde\x7c\x7e\x3e\xd2\xdf\xe7\x22\xde\
-\x32\x0e\x03\x96\xb9\x06\xec\x67\x7e\xc5\xff\x9f\x4b\x91\x0e\xd8\
-\x2b\xd5\x02\xe6\xb9\xbf\xc1\x3b\xac\xf0\xe3\x80\x20\xd9\x38\xc0\
-\xa7\xd5\x84\x65\x55\xb0\xac\x0a\xc6\x5e\xe0\xe4\x5d\x4b\x5e\x18\
-\xf0\x1e\xcb\x0a\x1f\x40\xe5\xe6\x07\x31\xdb\x6a\xb5\x43\x76\x6f\
-\xc9\x52\xc3\x6b\xf7\x1e\x07\xb1\xa9\x59\x57\xe4\x0e\xa0\xea\x88\
-\x71\xbb\x47\xaa\xf8\xdf\x75\xb1\x80\x6c\x5e\xb7\x4c\xec\x47\x15\
-\xa5\x92\x24\x51\x85\x2f\x22\xf7\xce\xb5\x3e\xaf\xb9\x58\xfe\x88\
-\x0e\x3f\xa7\x97\x05\xe0\x91\x51\x88\x94\x8d\x5f\x69\x20\x43\x83\
-\x7d\x63\xc2\x4c\x19\x29\x11\x1b\x19\x12\xb6\x98\x16\xa0\xd3\x9b\
-\x12\xec\x94\xbb\xff\x18\xa8\x00\x59\x1c\x31\xec\x75\xb5\x84\x88\
-\x43\x26\x71\x5b\x72\x0c\x09\xf0\x1f\x7b\x84\x61\x84\xff\xd8\x63\
-\x1d\x7b\x24\x71\xc2\xe8\xf1\x23\xd4\x24\xc1\x9f\x14\x74\x27\x43\
-\xb6\x03\x9f\x69\xd8\x37\x47\x80\x94\xd5\xfa\xee\x93\x8c\xdb\xbc\
-\x58\x76\xb6\x5b\x61\x8e\xbc\x16\x58\xe1\xaa\x82\xcf\x87\x4c\xb2\
-\xbe\x03\x70\x1b\x24\xe9\x89\x0e\x3e\x77\xf1\xbc\x25\x9d\xde\x65\
-\x8b\x89\x9b\x92\xc6\x32\xb5\x05\x61\x91\x1a\xed\x3f\x29\x38\x70\
-\xe7\xc0\x6b\xc1\x9c\xc6\x5d\x56\xc5\x96\xdc\xdf\x9e\x30\xb1\x05\
-\x74\x52\x76\xf1\xe7\xb1\xbe\x21\xc3\x9e\x03\xef\x7d\x25\x51\xe9\
-\x73\x7d\x7f\xf7\x16\x6f\xd4\xc3\x33\xa0\xd8\x23\x41\x05\x7a\x2b\
-\x0a\xba\x44\x8e\x99\xed\xe3\x25\x91\xd6\xd2\x47\x2c\x7d\x0c\xc0\
-\x13\xc9\xd1\x7c\xcc\xcb\x5a\xbb\x43\xa9\x34\xc3\xfa\x51\x85\x3c\
-\x62\xbe\x7a\x39\x69\x24\x85\xf2\xea\x6d\x53\x52\x58\x80\x9a\x6d\
-\x45\x4c\xa0\x12\x06\xa5\xc7\x76\xaf\xa8\x44\x8f\x4c\x2f\x13\x90\
-\x4a\xb2\xf1\xab\xc6\xc2\x0d\x02\xe5\xd3\x31\x12\xa1\x29\x17\x8a\
-\x9e\xd0\x92\xe2\xdc\x4e\x3a\xd8\xd6\x6c\x1c\xd7\xdf\xd3\x64\x3a\
-\xe3\xb3\xe1\x8c\xd1\xf0\x82\x22\x16\x24\xf4\x98\x4d\x05\x13\x31\
-\x62\x22\x46\x88\x69\x42\x57\x08\x92\x38\x21\x89\x93\x13\xb0\x0a\
-\x62\x46\xc3\x36\x68\x7d\x25\x5b\x00\x6b\x5d\x37\x40\x14\x54\x2d\
-\xe9\xd3\x15\x82\x0f\xa5\xc7\x17\xd5\x80\x7c\x90\x30\x79\xe0\x9f\
-\x2c\x00\x7f\x4c\x07\x37\x3f\xa7\xaa\xc6\x1c\x76\x37\x6e\x51\xd7\
-\x94\x16\xcd\x1d\xcc\x02\xd0\x82\x7a\xbb\xa8\xc1\x0b\xb4\x98\xd8\
-\xf3\xe6\x84\x65\x9f\xd2\x5f\xb4\x64\x84\xdd\x01\x52\x7f\x8f\x2f\
-\x3e\xd6\xd4\xac\x1e\xac\x48\x6f\xbb\x04\xc9\x15\x22\x79\xcd\x32\
-\x1e\x9f\xa7\x4f\x51\x20\x54\x48\x97\x48\x83\x56\x74\xcc\xa2\x50\
-\x33\xb1\x05\xaf\x3a\xf3\xd2\x54\x1e\x39\x15\x91\xa8\xb7\x52\xd5\
-\xb7\x81\x2d\x9a\x85\x25\x90\x44\x42\xbb\x22\x44\x2d\x80\x47\x44\
-\x48\x64\x43\x54\x44\x48\x51\x19\x38\x37\x80\x2c\xaa\xda\xc5\x30\
-\x00\x2e\x44\xda\x62\xe2\x41\xe9\xe1\xa9\x82\x98\x2e\x91\xa8\x18\
-\x94\x9e\x63\xe1\x4e\x4f\xd0\x69\x68\x5d\x0b\x5a\xa7\x7f\xab\x98\
-\x49\xec\x33\xa1\x64\x81\xef\xd8\x36\x0c\x23\xfc\x49\xa1\xc1\x48\
-\x8f\x84\x1e\x13\x31\xd2\x32\x40\x44\x74\x85\xa0\x2b\x84\x5e\xfd\
-\xf7\x8b\x5a\x0a\x64\x6b\xf6\x4a\xb1\x5a\xdf\xb1\x79\xa7\x98\xe7\
-\x5b\xfa\x1b\xf3\x99\xf3\xa5\x01\x98\x80\x78\xe8\x40\x74\xcc\xc4\
-\x4d\xb0\xa5\x94\x27\x2e\x85\xd5\xc7\x0f\xfa\x4b\xe7\x4a\xe4\xe5\
-\xd4\x49\x8a\x7d\xfe\xf6\x64\xa1\xfa\x63\x8b\x3b\xcf\x5b\xb6\x34\
-\xbf\xd5\xc4\x4d\xe9\x52\x75\x46\x0e\x80\xe7\xdc\x06\x56\xa1\x03\
-\xf3\xb2\x2a\xa8\xd6\x93\x16\x13\xdb\xc5\x5d\x90\x6c\xdc\xe7\x86\
-\xcb\x78\xcc\xc4\x82\x2e\x7d\xce\xc5\x58\xb2\x38\x40\xb4\x7f\x48\
-\xd4\x91\xb0\x7f\xe8\x98\x7a\x00\xa0\x02\xba\xa2\x8b\x62\x6f\xd8\
-\x2e\xd0\xc7\xe6\xc6\x1e\x5b\x44\x15\x9e\x8c\xe9\x1e\x31\x6e\xd7\
-\x30\x69\x53\x42\x68\x17\x83\x1a\xc0\x66\x5b\x20\xe9\x13\x21\x1d\
-\xb0\x65\xad\x51\xab\x18\xe9\x65\x0e\xc0\xc7\xf6\x5c\xa4\x3c\x63\
-\xc9\x79\x2d\x69\xa1\x0c\x0b\x6b\xdd\x9e\x11\xa8\x84\xc8\x00\xde\
-\x31\xa4\x88\x0c\x30\x05\x01\x0a\xcf\x80\xf4\x90\x78\x3c\xac\x1a\
-\xd2\xa7\xf3\x04\xff\xb0\xa4\xec\x8c\x19\x1c\x24\x9b\x4e\x04\x87\
-\x25\xe5\xe8\x82\x27\x07\x49\xca\x8e\x72\x74\xc1\x2c\xa8\xce\xda\
-\x52\x30\x84\xac\x60\xaf\x94\x61\xbb\x21\x7e\x39\x39\x79\x6e\x18\
-\x46\x0c\x27\xda\x70\xc3\xab\xd9\x7e\xbf\xbd\xa5\xe4\x33\xba\xfd\
-\x05\x6c\x87\xf8\x86\x89\x89\xfb\x2d\x60\xed\x95\xa2\x10\x07\x22\
-\x06\xec\x51\x28\x3c\x07\xaa\xbd\x52\x74\x85\x60\x53\x44\x2c\xf3\
-\x3b\xc2\x4d\x4a\x10\x06\x5c\x4c\xc6\x6c\xbf\xff\x81\xd7\x6f\x97\
-\x84\xbf\x1e\x31\x11\x33\x67\xa5\x1d\x5b\x6a\xcd\x7f\x93\x9a\xa7\
-\xa4\x59\x0a\xa4\x5a\xe3\x4f\xee\x81\xc4\xd9\x6b\x7a\x61\xb7\x72\
-\xee\x84\x5b\xb0\xd2\x90\x45\xa3\xdc\x5d\x1d\x7b\x01\xde\x70\x01\
-\x8c\xf5\x77\x53\xb6\xdd\x89\xaa\x1a\x6b\x77\xe2\x59\xa4\x57\xe8\
-\x83\xd0\x67\xd2\x91\x6e\xdb\xbc\x0c\x42\x9f\x41\xe8\x23\x1a\x4e\
-\x46\x57\x74\xe9\x12\x39\x3b\xae\x7b\xc6\x69\x00\xa8\xa2\x0c\xdf\
-\x3c\xbe\x8f\x2a\xa7\xa1\xfd\xa8\x62\xdf\x94\x0f\x0d\x00\x97\xd2\
-\xd3\x00\x06\x22\xc3\xcc\xa9\xf4\x88\x3c\xfd\xfc\xc8\xab\xb0\x0a\
-\x39\x32\xff\x39\x96\x76\x87\x15\x0f\x41\xa6\xf7\x2f\x7c\xad\x89\
-\x0d\xa0\x2d\x13\xdb\x45\x5e\x24\x2a\x36\x7e\xe5\x3c\xe1\x09\x25\
-\xe3\x64\xc3\x70\xa2\xd9\xf5\x6a\x1a\xf2\xac\x17\x50\x4e\xa1\xec\
-\x8c\x29\xa7\x10\x07\x6b\x84\xf0\x99\x05\x15\x62\x9a\x30\x0b\x2a\
-\x26\x62\xc4\xe0\x20\xcd\xce\x30\xe2\xc1\xc0\x77\xcc\xea\x18\xb6\
-\xaf\xfd\xd0\xd2\x5f\xe0\xc7\x01\x62\x9a\x68\xe7\x27\xab\xef\xd7\
-\xd2\x63\x48\x21\x0e\x24\x71\x42\x11\x0b\xed\x3e\x3c\xaa\xdc\xf5\
-\x45\x19\x10\x64\x8a\xfd\x5d\x17\x5f\x49\x14\x9e\xf6\x87\xb3\xf5\
-\x09\x80\x03\xd5\x69\xb1\x70\xd3\x47\xde\x2b\xc5\xe0\x20\x19\x87\
-\x01\xf9\x20\x61\xbb\xd0\x7f\xc7\xe7\x5f\x3c\xe3\x65\x01\x7f\xfe\
-\xe7\x6f\xb9\xff\x6e\x89\x9a\xa7\xf8\xa4\xa8\x79\x4a\x31\x5f\x3a\
-\xf6\xf7\xe3\x00\x6f\x34\x85\xf9\x56\x1f\x31\x16\x01\xf3\x45\xc0\
-\xd8\x2b\x9d\x0c\xaa\xaa\xb1\x93\x0f\xe7\xd8\xb7\xc3\x05\xdb\xfd\
-\xde\x31\xb1\x05\xf0\xb2\x2a\x60\x51\x51\x6d\x47\x90\xad\x5b\x1e\
-\x33\x80\x3f\xf6\x49\xb7\x07\x2d\x00\xfd\x20\x01\x34\x80\xed\xed\
-\xc4\x93\x66\xd5\x18\x91\xab\x39\x21\x7d\x54\x83\x6d\xad\x96\x3d\
-\x5e\xc8\x95\x44\x54\x51\x46\xe9\x2c\xb3\x18\x90\x1a\xd4\xb2\x21\
-\x1f\xa4\xd2\xaf\x8d\xaa\x1f\x2d\x7f\x58\xa0\xa6\x46\x9c\xe8\x42\
-\xcb\xe9\x6b\x9a\xf7\x09\x7c\x14\x25\x8a\x58\xb3\x8e\x28\x50\xca\
-\xa3\x27\x22\x3c\x91\x39\x00\x6b\x9f\xb8\xf6\x85\x43\x2a\x2d\x13\
-\xa2\x10\xaf\x6a\xc8\x2c\x55\x32\x13\xa1\x96\xc7\xc1\x9a\x84\x29\
-\x25\x05\x1f\x45\x48\xe2\x57\x06\x80\x09\x92\x0d\x01\x7b\x20\xd1\
-\x2c\x87\x70\xee\x81\x64\x43\xc4\x00\x89\x07\x2c\x49\x08\x80\x35\
-\xc4\x43\x0d\xe4\xf9\x2d\xa8\x00\x21\x02\x4a\x0a\xe8\xaf\x09\x54\
-\x97\x94\x1d\x42\xf8\x04\xaa\x83\xa2\xa6\xb0\xd1\xf0\x82\x0e\x15\
-\x05\x70\xc8\x76\x04\x40\x11\x17\x28\x95\x50\x88\x0d\x81\xea\x18\
-\x1d\xdf\x39\xfb\xfd\x5a\x20\xdb\x62\x47\x31\x9a\xc0\xbd\x66\xc4\
-\xe5\xee\x9a\xe2\xb3\x2b\x7e\xf6\x1b\x3f\x43\xbe\x7a\xcd\xdb\xc5\
-\x9a\x3c\x2f\xf8\xea\xc1\x8c\x7c\xb1\xe4\xe5\xab\x1f\xe8\x7c\xbf\
-\xe6\x97\x7f\xf5\x21\x28\x78\x9b\xdd\xb1\xf9\x7e\xc3\xab\x97\xbf\
-\xa0\x3f\xb9\xe0\xf3\x17\xcf\xd9\x8e\xa7\x4c\xd0\x45\x8e\xaa\xaa\
-\xa5\x80\x95\x03\xf6\xfa\x87\xd2\xe3\xc0\x1d\x7d\x19\x43\x37\x87\
-\x51\x4e\x59\x6d\x59\xd2\xaf\x8f\xec\x71\x41\x27\x9e\xb5\x5e\x5b\
-\xa4\x03\x0e\xbb\xf7\x24\xfd\x8e\x06\xb1\x05\xac\x03\xa5\xbd\xad\
-\x02\x12\x21\x41\x44\x40\x61\xa4\x43\xe1\x00\x9c\x56\x8d\xe7\x36\
-\xfd\x60\x0b\xe0\x06\xa0\x01\x3a\x51\xc6\x41\x2a\x84\x01\xb2\x4f\
-\xd5\xf2\x85\x6d\xd5\xcf\x8f\xaa\x96\x71\x26\x91\x24\x51\xf4\x49\
-\x00\x9f\xfe\x40\x65\xcb\x5a\xb3\xd7\x2b\x2b\x29\x94\x44\x08\xed\
-\x4e\x48\x15\x13\x09\xcd\xc2\x21\x10\x1f\x2a\xaa\x78\xd5\x02\x71\
-\xbe\xde\xf0\x61\x0d\xa3\x61\x44\x21\xba\xa4\x99\xd6\x7e\x0f\xc2\
-\x0a\xca\x09\x29\x25\xb0\xb1\x4b\x57\x53\x45\xcb\x59\xd8\x4a\x20\
-\xf7\x28\x42\x02\x14\x59\x67\xc8\xe0\x70\x57\xaf\x17\x94\x22\x25\
-\x04\x42\xc8\x52\x56\x6b\x49\x18\x2a\x12\xa5\xdf\xc7\xee\x44\xed\
-\x23\x70\x0a\x24\x0e\x88\x6b\x34\xb9\x0c\xb3\x80\x22\xfe\x34\x70\
-\x8f\xdd\x82\x26\x98\x3f\xf3\x2b\x82\x30\x60\x39\x48\x58\xbe\x4b\
-\x11\xd3\x25\x0c\xe0\xf1\x6f\xfe\x1a\xf3\xfb\x35\xb3\xd5\x82\xbb\
-\xc5\x92\x8b\xc9\x98\xce\x62\xcd\xdd\x72\xc1\x9b\x77\x05\x30\xe1\
-\xf5\xea\x7b\xaa\x65\xc8\x7e\xf4\x80\x8b\xf1\x98\x8b\xc9\xf8\x93\
-\x8b\xb9\x26\x08\x83\x64\xc3\x67\x7e\x85\xe4\x82\x03\xcb\x9a\x89\
-\x8d\xa3\x58\x56\x5b\xaa\xf1\x8c\x73\xb5\x96\xc3\xee\x86\x34\x4b\
-\x35\x13\x77\x89\xd8\xab\xba\x4a\x67\x81\xbc\x57\xfb\x96\xce\x75\
-\xa5\xca\xc6\xe1\x3f\x91\xf2\x44\xf3\x5a\x3f\x57\xeb\x62\x08\xa4\
-\x47\x69\xc0\xad\x88\xe8\xe2\x81\x94\x4e\x3e\xf8\x8d\x85\x9c\x2b\
-\x63\x9b\xeb\xbe\xb9\x1e\x9d\x61\x5b\x0b\xee\xa8\xe1\x4e\xb4\xca\
-\xd1\xca\xab\x8b\x1c\xf8\xba\xb8\x41\xa6\xe5\x84\xa8\x1c\x1b\x6b\
-\x49\x11\xb9\xd2\x76\x10\x17\x44\xbd\x09\x4a\x95\x08\xa1\x8f\x4c\
-\x01\x11\xc5\xbb\x94\x70\xbc\x45\x70\xe1\x0e\xf7\x6c\xd7\xa4\xe6\
-\xcb\xd7\x40\xcb\x0d\xa0\xd1\xc0\xcc\x72\x88\x43\x03\x52\x48\xb3\
-\x14\x3f\xde\x91\x66\xf5\xe2\x47\xdb\x70\xfa\x79\xc4\x21\xa1\x71\
-\x32\x52\xeb\x6f\x1a\x47\xc3\x02\xda\x28\x65\xc0\xee\x20\x3d\x86\
-\x04\xac\x29\x28\xe2\xc2\x01\xbc\x59\x8e\xfe\x14\x13\x0b\x2a\xc7\
-\xc4\x51\xac\x28\x4a\xcd\xc6\x77\xcb\x05\x17\xff\x46\x4b\x8a\x7e\
-\xfa\x9a\x89\x0f\xc5\x63\xc1\x40\x1b\x7b\xfc\xf2\xaf\x3e\x44\x66\
-\xcf\xf8\x50\xea\xef\x77\xb6\x78\x00\x63\xf8\x7c\x32\x74\x00\x1e\
-\x4d\x6b\xdd\x1a\x24\x1b\x07\xda\xa6\x1c\xd0\xd2\x62\xce\x61\xb5\
-\xd4\x0c\xbc\x5a\x90\x45\x09\xfd\xf5\x18\x46\x39\xb3\xaa\xa0\xda\
-\x54\xe4\xfe\x96\x90\x87\xad\x85\x9d\x98\x42\xa7\x77\x59\x57\xec\
-\xba\xa2\x7b\x22\x0d\x9c\xe6\x6d\xdc\xa7\xce\xf9\xc0\x0d\x10\x36\
-\x75\x70\x20\x3d\x57\xc0\xd8\x9b\x6d\xb7\xc1\xba\xcd\xd7\x36\xfd\
-\x5f\xd9\xb8\x1e\xb5\x96\x6b\x5a\x4a\x70\x24\x33\xb0\x15\x2a\x03\
-\xdc\xf6\x4e\x57\x39\x37\xc5\x82\xba\x09\xe0\x8a\x18\xd1\x5c\xd1\
-\x2b\xc5\x26\x0b\x90\xbb\x05\x42\xf8\xba\x54\xdd\x94\x4a\xeb\x7a\
-\xa5\x9f\x66\x4b\x94\x52\xa8\xf9\x1e\xb9\x5b\x40\x96\xb3\xf5\x52\
-\x16\x59\xa9\xc1\x9b\x99\x05\x8a\xb9\xbe\x96\x5b\x88\x43\xfd\xb8\
-\x2d\xa1\x14\x0d\xbf\x35\xab\x17\x34\xe5\xa2\xed\xc3\xae\xe5\xf6\
-\x47\x59\xd5\x32\x71\x90\x05\x67\x01\x5c\x88\xc3\x89\x2b\x61\x4b\
-\xce\xda\xae\xab\xe8\x0a\xc1\x6c\x02\x83\x99\x96\x03\x87\xd5\x92\
-\x57\xdf\xff\xc0\xab\x05\x6c\x19\x93\xb2\x73\xef\xbb\xe9\xe8\xef\
-\x2c\x58\x2d\x90\xaf\x5e\xeb\x1d\x72\x90\x70\x31\x19\x73\x98\x8c\
-\x98\x4c\xd3\x56\x15\xaf\xcc\x0a\x67\xa7\x59\x67\x22\x48\x36\x94\
-\x4b\xfd\x5d\xac\xaa\x0a\x56\x21\xfe\x48\x2f\x6c\xcb\xa1\x26\x86\
-\x85\xaf\x8f\x86\x61\xd9\x3f\xa9\xd4\x55\x9d\xd1\x91\x26\x6e\x94\
-\x84\x9b\x8b\xb4\x63\x1f\x57\x57\xe2\x74\x2e\x42\x49\x45\x27\xaa\
-\x38\x48\x75\xe4\x4a\x68\xf6\xb5\x4c\x5b\x36\xae\xfb\x4d\x1b\xad\
-\x11\x2c\x6a\x32\x30\x47\xc0\x75\x60\x3d\x62\xe2\xda\x56\x13\x44\
-\x48\x04\xc2\x1d\x25\xd4\xa7\x02\x47\x8e\xa9\x33\x97\x9b\x50\x4a\
-\x22\x44\x44\x98\xf9\x60\x16\x76\x9b\x2c\x00\x16\xa4\x72\x07\xd9\
-\x54\x33\xe6\x7c\xc5\xbb\x65\xc9\x44\x7e\x64\xdb\xbf\x22\x3e\x54\
-\x06\x88\x3b\xf0\x04\x78\x8a\x78\xe5\x43\x08\x6b\x4f\xd5\xb9\x09\
-\x2f\x63\x58\x09\x5d\xd5\xcb\x72\x5b\x5f\xd2\x36\x5c\xaf\xcb\xda\
-\x53\x0c\xa3\x3e\x6b\xb9\x65\x68\xf3\x06\x93\x7b\x67\x51\x85\x59\
-\xc4\x30\xee\xff\x7f\xab\x98\x19\x26\x4e\x8e\xc4\xc7\x39\x79\x61\
-\xf3\x0c\x7a\xc1\xa7\xaf\x0f\x0e\x92\xd0\x17\x7c\x18\x4d\x18\xfe\
-\x6c\xc2\x37\x7f\xfe\x0d\x37\x7f\xfb\x1d\x00\x3f\x7d\xa8\xa9\xf5\
-\x62\x5c\x3b\x28\x77\xcb\x05\xe3\xa7\x4f\x18\xcc\x2e\xf8\xcc\xaf\
-\x0c\xfb\xae\xb4\x55\x58\x6a\x17\xc3\x3a\x1a\x96\x89\x2d\x98\x2d\
-\x90\xef\xbe\x5f\x3a\x57\xa2\x5c\x2d\xe8\xf3\x80\xb2\xb3\x87\x55\
-\x48\x39\x5c\xe2\x8d\x4a\xe0\x49\x4b\x8a\x34\xb5\x71\xd2\xef\x10\
-\x5a\xd0\xee\x39\x95\x06\x4e\x5a\x44\x15\x5d\xa9\x0b\x08\x5d\x0b\
-\x9d\x48\xa0\x9a\xbe\xae\x54\x1c\xa4\x87\x88\x2a\x0d\x77\x03\x52\
-\xcd\xce\xc2\x95\xa3\x6d\x65\x2e\x89\x04\xa9\xac\x8b\x1c\xf2\x18\
-\xbc\x55\x4c\xe4\x65\xad\x4c\x5b\x1b\xc0\xb5\x3f\x8c\x10\x67\x81\
-\xab\x8e\x00\x7c\x2c\x25\xdc\xfb\x29\x0f\xcf\x4f\xe9\x67\x09\x39\
-\x0a\x01\x7c\x54\x7a\xf7\x2e\x59\x72\xd8\xa4\xe0\x57\x78\xc5\x9c\
-\xc5\xed\x94\x22\x54\xed\x32\xbb\xf1\x52\x33\x51\x12\x28\x05\xf8\
-\xae\x10\x82\xd0\x80\x0d\xbc\x8c\x45\x15\x13\xec\x14\x0b\x63\xdb\
-\xad\x3d\x45\x51\xc5\x2c\xb2\x92\xc0\x33\xc0\x8e\x57\x90\xc1\x26\
-\x4c\x18\xe4\x69\xcd\xd2\x8d\x42\x89\x9f\x8d\x28\xe3\x15\x65\x67\
-\x0c\xc6\x0d\x19\x12\xb0\xce\xb4\x1f\x7d\x4e\x4a\x58\x4f\x58\xa7\
-\xd7\x54\xcb\x62\xf3\x95\x34\xe1\x28\x8f\xd1\x14\xba\xac\x51\xaa\
-\xe4\xef\xfc\xa3\x67\x8c\xdf\x3e\x61\xf9\xdd\x5b\xc6\x4f\x1f\x13\
-\x6e\x52\xc7\xba\x83\xd9\x05\x4f\x79\x6e\x4a\xd3\x95\x29\x35\x9b\
-\x85\xec\x76\xa8\x17\xa7\x8d\x94\x9b\x95\x14\x16\xbc\x45\x3a\xc0\
-\x1f\xfb\x5c\x4c\x0a\xde\x7c\xf8\x6b\x58\xc5\x64\x51\x42\x2c\x3f\
-\x92\x1d\x12\xe2\xe1\x12\xd6\x07\x2a\xff\xe2\x93\xba\xba\xea\x8c\
-\x1a\x9a\xb8\x01\xe4\x26\xa0\x1d\x78\xa5\x76\x85\x9b\x55\xb8\x52\
-\x7a\x0e\x94\x0a\x0c\x2b\x7b\x6e\xa1\x56\x1a\x4f\x58\x57\x1d\x6a\
-\xeb\xcc\x8f\x04\xbe\x94\x86\xcf\x9b\xa0\x6e\xfb\xb5\x78\x59\xcb\
-\xa9\x88\x1a\xce\x44\xdb\x1f\xe6\x4c\x04\xf4\x0c\x98\xcf\x00\xb8\
-\xa5\x8b\x55\x00\x5d\x1d\xb9\x54\x71\xd9\x08\xfa\xf8\x78\xc1\x80\
-\x70\xb1\x26\x1f\x02\x83\xda\x73\x0e\x33\x1f\x11\x0b\x17\x02\x2a\
-\xaa\x98\x40\x64\xa0\x34\x68\x8b\x5e\xac\x41\xdd\x03\x94\xcf\x20\
-\x48\xc9\x08\x08\xcc\xbf\xcd\x66\x2e\x26\xb1\xcf\x5a\xd6\xd2\x61\
-\x90\x14\x4c\xd2\x84\xfc\x53\xc5\x05\x53\x65\x1d\x1c\xa4\xa9\x88\
-\xa5\x4e\x52\x68\x4d\x5c\xeb\x68\x0b\x66\x6b\xb1\xd9\x20\x97\x95\
-\x19\x7b\x05\x5d\x11\xe9\x8a\x9e\x0a\xf0\x95\x24\xeb\x0c\x89\xc5\
-\x9a\x9f\x54\x4f\xf9\xc9\x17\x70\xff\xc5\x0b\xd6\xd5\x8a\x7c\xae\
-\x01\x35\x9b\x98\x52\xb5\x75\x4a\xa6\x38\x8a\x2a\x49\xa8\xaa\x31\
-\x9e\xb7\x3c\xf1\x96\xeb\x62\x48\xe0\x40\xf9\xa1\xf4\x28\xb2\x88\
-\x15\x15\x03\x99\x6a\x4d\x2c\x63\x4a\x99\xc2\xb0\x53\x07\xac\xce\
-\x64\x28\xbc\xc3\x4a\x97\x9d\x8f\x59\xb7\xbd\x72\x52\xee\x7e\x6d\
-\x87\x09\x2d\x3b\x4c\x50\xc7\x79\xbb\x86\x85\x5d\xde\xc1\xea\x61\
-\xf3\x7a\x11\x09\x84\x54\xee\xb1\xa8\xa1\xa3\x65\x83\x89\x9d\x94\
-\x30\x3f\xae\xb4\x8c\x6c\x41\xeb\x65\x48\xf3\x9f\xf3\x87\x95\xd2\
-\xc5\x8d\x63\x8b\xae\x51\xe4\xb0\x9f\x96\x37\xdc\x0a\x17\xc3\x24\
-\x76\xd7\x9b\xf9\x61\xfb\x3a\x1b\xf4\xc9\x5f\x0c\xa9\x82\xa9\xcb\
-\x16\xeb\xc7\x1a\x5f\xae\xf2\x5d\x39\xda\x7e\xe9\xc1\x4e\x11\x07\
-\x85\x03\xad\x8d\x61\x1e\x03\x78\x91\x95\x0c\x23\x2d\x19\x86\x95\
-\xc0\xab\x46\x2c\xf0\x5d\xe6\xb8\xa9\x9b\xfd\x6c\x84\x9f\x8d\x5c\
-\x49\x37\x8a\xef\x19\xd2\xd4\xd0\xc9\x09\x80\xcf\xbb\x13\x29\x89\
-\x0a\x11\x54\x8d\x50\x50\x0a\xa2\xe4\xc1\x21\x23\x62\x40\xb0\xbb\
-\x26\xf0\xde\x71\xe1\xad\xf8\x6a\x2f\xf9\xc9\x45\xc5\x2f\xf5\x33\
-\xfd\x78\xac\x18\x4d\x61\x38\x19\x9f\x94\xb6\x03\xef\xdd\x27\x3f\
-\xb7\x29\x2d\x9a\x21\xa3\xd1\x58\xef\x84\xb1\x4c\x29\xf9\x88\x3f\
-\x9a\x90\x1d\xba\xee\xbb\x3d\x97\x66\xab\x3a\x23\x5d\x76\xb6\xcc\
-\xeb\xd8\xf7\x48\x13\x1f\x87\x75\x2c\x38\x8b\x66\xe5\xcd\x80\xb2\
-\x4b\xa4\xb5\xaf\x88\xe8\x97\x71\xeb\xb1\xd2\x80\xce\x37\x1a\x98\
-\x23\x56\x6f\xb1\xaa\x97\x41\x15\x1b\x49\x51\xb5\x64\xc3\x89\x3f\
-\x7c\x9c\x9b\x68\x2c\x00\x2d\x5b\xdb\x05\x5d\xa0\x12\xc7\xc2\xde\
-\x51\x32\x0f\x60\xbb\x57\x28\x25\x1d\x50\x15\x31\x79\xa6\x1c\x90\
-\xbd\xf1\x90\x62\x90\x10\xc6\x25\x79\xe6\xbb\x14\x1b\xa2\xd4\x91\
-\x55\xfb\x85\xdb\x2f\x5d\x94\x64\x9d\xd3\x1d\xac\xa8\x62\x97\x27\
-\x5e\xcb\xad\x2e\x55\x67\xa5\x06\x34\x1a\xd4\xf6\x71\x1b\x22\x22\
-\xcb\xf1\x99\x69\x19\x61\x98\x38\x8a\x95\x73\x3a\x80\x86\x94\xc8\
-\x29\x3b\xe3\x23\x47\xa3\x1d\x06\x82\xd8\x2d\xec\xba\x42\x80\xf2\
-\xb5\x0f\x6d\xfe\x76\x5f\x69\x8f\xd7\x25\xe5\x6c\x9a\xb0\xb1\x18\
-\xf4\x95\x74\x59\x89\xbd\x52\x2d\x96\xf7\x49\x5d\xd1\xc5\xb2\xb1\
-\xbd\x7e\xbc\xc8\x6b\x16\x39\x36\xd5\x85\xbb\x1d\x77\xf6\x3f\x1a\
-\xc5\xb4\xdb\xb3\x9a\xd8\x8f\x2a\x94\x2d\x46\x9c\xa0\x46\xb3\xaf\
-\x27\xe3\xda\x03\x96\xed\x1d\x20\xf1\x32\xd6\xbe\xe7\xec\xb3\xd2\
-\xd9\x65\xed\xbc\xb0\x05\x78\xd3\xb1\x70\x4c\x6c\xca\xca\x2d\xb8\
-\x2a\x79\x26\xf0\x13\x9d\x08\x0a\x0d\x7c\x88\x84\xae\xcd\x09\x17\
-\x00\xca\xe8\xb5\x0a\x1d\x75\x97\x47\xbf\x2b\xd8\xfa\x29\x42\x44\
-\x48\xe5\x11\xc5\x25\x52\x49\xa2\xb8\x22\x37\x07\x68\x9d\x68\xcb\
-\x34\x58\xe3\x92\xdc\xb2\xbc\xf9\xe1\x85\xcd\x15\xdb\xc3\x9f\xbd\
-\xae\x7c\x17\xa0\x1f\xe4\xa9\x76\x25\x4c\xaa\x6d\x51\xc5\x2c\x4c\
-\x95\x70\x2d\x33\x26\x71\xdf\x69\xe0\x45\x56\x32\xc8\x53\x07\xe4\
-\x32\x5e\x39\x3d\xec\x67\x23\xd2\x78\x75\xe4\x1e\xef\xdc\xfd\xfe\
-\x61\x79\x96\x89\xf7\x4a\x91\xb2\x43\x66\x23\xee\xb3\x05\x33\x26\
-\xdc\xb3\x70\x5d\x1c\x92\x99\x0b\xef\x90\x65\xb5\xf7\x9d\xd5\x8c\
-\x5f\x4b\x17\xa3\xf7\x17\xef\xc8\x33\x9f\x65\x3e\x24\xdc\xdc\xd2\
-\x9f\x0c\xf9\xfa\x71\x8f\xa6\xc1\x7b\x5c\xaa\x76\x60\x36\x05\xca\
-\x55\x55\x31\xf0\xa0\x42\x67\xd9\xb7\x51\x46\xbc\x3e\xc0\xf8\x54\
-\x46\x1c\x83\x3a\x3c\xab\x21\x8d\x0c\x38\x66\x65\x5d\xc8\x88\x8c\
-\xcb\x60\x5d\x88\xca\xad\xc6\x6c\xf8\x27\x95\x6d\x5b\x4e\x44\x15\
-\xd8\x16\xa6\x33\x15\xba\xa8\xe1\x0b\x63\x98\x58\x36\x16\x70\xd1\
-\x89\x5f\xd1\xbe\x1e\xa4\x3e\x45\x22\x8d\xe7\x19\x6b\x29\x61\x74\
-\x70\x33\xb5\xe6\x18\x58\x05\xae\x72\x67\x3b\x3b\xb6\x4a\x01\x01\
-\x0a\x49\x64\x81\xec\x5e\x97\x91\xc7\x75\x2b\x92\x75\x34\x5c\x5b\
-\x92\x05\xaa\xf2\x81\x0c\xa1\xe2\x13\x1d\x67\x3b\x41\x28\xe2\xfa\
-\xc7\xdf\x29\xe7\x50\x60\x1d\x0c\xeb\x5c\x64\x39\x13\x80\x30\x3a\
-\xab\x87\xed\xd6\x7a\xc4\xc7\x8f\xdb\xd6\x25\xc7\xe0\x68\xc7\x63\
-\xbd\xe9\xb3\xdd\x5f\xa3\x78\x8b\x48\x07\xcc\x79\xa9\x19\x90\x0d\
-\x07\xee\xe8\x18\x49\x60\xf3\x0c\x1d\x2e\x38\xf0\x9a\x4e\x12\x41\
-\x9a\x40\x92\x9a\x0c\xf6\x15\xd3\x49\xa1\x8f\x18\x93\x0b\xfc\xde\
-\x88\xa7\xb1\x42\x66\x33\x3e\xbe\xfc\x86\x8f\x3c\xe7\xc1\x63\x23\
-\xad\xe2\xe1\x27\x43\xf5\x77\x8b\x25\xdb\xc5\x1d\xfd\xc9\x45\xeb\
-\xfe\xb8\xa9\x89\x8f\xd8\xfc\xb8\xb3\x23\xb4\xc0\xeb\x1c\x81\xd1\
-\x05\x76\x8c\xfd\xe6\xb6\x51\x45\x81\xc4\x23\xa6\x38\xb2\xd8\xdc\
-\x73\x84\x4e\x9a\xa9\xa3\x50\x8f\x05\x6a\xd4\xd0\xbb\x78\x19\x52\
-\x2a\x92\x48\x1c\x89\x04\xd9\x28\x33\x67\xed\x62\x88\x54\xf4\xcb\
-\x98\xad\x9f\xd1\x2f\x63\xca\x6a\x4b\x90\xf6\x51\x49\x0d\x9c\xc8\
-\x84\x7f\x44\xc3\x9d\xe8\x99\x9e\xb8\x4a\xf4\x4e\xe4\xc4\x09\x13\
-\x8b\x0a\xa9\x3c\x2a\x11\xe0\xa9\x82\x48\x64\xda\x86\x03\xfa\x24\
-\x90\x59\xfd\x9c\x81\x8a\x5d\x44\x53\x19\x50\x2b\xe5\x6b\x66\x36\
-\x92\x43\x58\xd6\xb6\x8f\x99\x85\xdf\xda\xfc\xdb\x16\xf8\x47\x6c\
-\x6c\xe4\xc6\x6e\xcf\xb0\xd7\xa5\x4a\xd2\x56\x15\xd1\xcf\x46\x44\
-\xf1\x3d\xeb\x46\x26\xb9\x20\x27\x25\xac\x01\x6c\x5e\x9f\x67\x2f\
-\x5d\x90\x3f\x8c\x25\xcf\x26\x0f\x5d\xae\x61\xd3\x79\xee\x02\x4c\
-\xb3\xe0\x19\x00\xf7\x85\xc7\xe0\xf0\xb0\xf1\xed\x3c\x44\x66\xc2\
-\x85\xe7\xa7\xfe\xe8\x24\x47\x6c\xfe\x71\x74\x7a\x63\xf2\xc5\x73\
-\xfc\xf9\x1b\x0e\xde\x63\x3a\x8f\x22\x5d\x5e\x27\x71\x0b\xbc\x63\
-\x40\xf7\x27\x17\x8e\x81\x87\x5e\xc9\xba\xf2\x09\xe3\x88\x78\x9d\
-\xe2\x0d\xe6\x28\x9e\x20\x3e\x91\x61\x66\xed\x69\x39\x21\x22\xa1\
-\xcb\xc1\x06\xcc\xbe\xd4\xdb\xbd\xd4\x8f\xf9\x52\xb6\xec\xb2\xc0\
-\x64\x1e\x8a\x06\xe0\xad\xee\xf5\x91\x94\x0a\xfc\x48\xcb\x05\xd1\
-\x14\x00\x86\x69\x2d\x18\x71\xcd\xa6\xfa\x59\x41\xea\xb3\xf6\x2b\
-\x92\x48\xd6\xcc\xac\xe6\x48\xd0\x1a\xdb\xd7\x00\x06\xd8\x26\x3a\
-\xb5\x5c\x50\x12\xa4\x7d\xca\x6a\xeb\x52\x6e\x51\x23\xbd\xa6\x0c\
-\x9b\xf6\x88\xd9\x71\x5e\x4e\xd8\x7e\xba\xfe\xa1\x64\x4b\x0d\x60\
-\xbd\x2d\x88\x44\x85\x52\x92\x64\x69\xbe\xfc\x81\x87\x17\x0c\x1a\
-\x7d\x76\x70\xd8\x29\x02\x51\x82\x52\x28\x15\x23\x0c\x58\x01\xa6\
-\x99\x47\x16\x57\x4e\xd3\x17\x76\xe1\xd7\x70\x60\x02\x2f\x63\x6d\
-\x16\x76\x64\xb9\x03\x35\xa2\x24\x3f\x48\xc2\x34\x69\x34\x9a\xe4\
-\x8e\x71\xf5\xdf\xbf\x65\xed\xf7\xcf\xba\x12\xf3\x6c\xce\xe2\xd5\
-\x86\xc9\xe7\xcf\xe8\x67\xe0\x4f\x6c\x61\x44\x7f\x8f\x63\x63\x44\
-\x0e\xe2\x94\x85\x79\xcb\x32\x97\x6c\x36\x7a\xa1\xb9\x04\x86\xcc\
-\x59\xe3\xb1\xfd\x3e\xa0\x3f\xd1\xa5\x66\xfd\x7b\xcf\x09\xe7\x26\
-\xa7\x3c\x1d\xd1\xf5\xfa\xc0\x9c\xed\xcb\x37\x7a\x31\x3c\x5d\xd2\
-\x7f\xb7\x25\xf9\x72\xd6\x62\x53\xbb\xd5\x72\xe0\xde\x01\x18\x60\
-\x5d\xf9\x0c\xbd\x12\x64\xda\x4e\x3a\x9e\x61\xe2\x32\x2b\x60\x58\
-\x11\x0a\xa0\x40\x22\xf0\x50\xc6\x45\x50\x40\xc7\xbe\x58\x7a\x54\
-\x51\x45\x60\x4b\xc5\xad\x36\xa4\x88\x22\xca\x60\x11\x22\xd8\x3a\
-\xf1\xaf\x5b\x8a\x32\x84\x01\x5c\x5c\x94\x64\x52\xe9\x6d\xe0\xeb\
-\xcc\x6f\xa3\xd8\x11\xa4\x3e\x65\xb5\x65\x1b\xf8\x0c\xcb\x98\xad\
-\x94\xe8\x67\xe9\x2c\x85\x8e\x66\xda\xfc\x80\xd0\xaf\x6f\xf8\x19\
-\x9d\x24\xe3\x90\xf6\x29\x1a\xcd\x97\x3d\x62\x76\x22\x73\xad\x52\
-\x4d\x00\x1f\x5f\x36\xbe\xce\x0e\x6f\x8b\x0e\xd1\xe0\xdf\x91\xcd\
-\x30\x00\xae\x8a\x8d\x0d\x91\x1e\xc9\x89\x1a\xc0\x7a\xab\x8b\x09\
-\xb6\x22\x88\x10\x47\xa5\x08\x0d\x5c\x5b\x20\xb1\xa5\xe6\x49\x96\
-\xb3\xf6\x14\xf1\xa1\x22\x0c\xa3\x9a\x89\x1b\x9e\xb1\x2e\x67\xe7\
-\x2c\xca\x80\xa9\x1f\x38\x56\xd6\xe5\x6f\x28\xdf\x55\x75\x45\x6c\
-\xf1\x3d\x0b\x60\xf5\x32\x60\xe0\xdd\x39\xb0\xcc\x06\x3e\x55\x30\
-\x65\x34\x1e\xb0\x5a\x6e\x1a\x7f\xd5\x7d\xbd\xe6\x32\xdb\x47\x93\
-\x81\x03\x6f\xdf\xe4\x3d\x6e\x57\x25\xbb\x72\x41\x6f\x55\x72\x98\
-\x68\x81\x3b\x1b\xe9\x9d\x77\x38\x99\xb2\x5f\xac\x51\x4a\xd1\x15\
-\xc9\x89\xe5\xe6\x9b\x1d\xd1\x63\x4a\xc5\x9c\x75\xe5\xb7\x81\xdc\
-\xac\x14\xf7\xd7\x94\xdb\xe1\x49\xe8\xdf\x55\xec\x02\x22\x8a\x48\
-\xd2\x95\x1e\x45\x54\x21\xa4\x87\x32\x7a\xb7\x59\x81\x73\x8b\x32\
-\x23\x0f\xb4\x5c\x88\x40\x28\x50\x03\x67\xbb\x95\x52\xea\xae\x65\
-\x22\x7c\x35\x27\x03\xf2\x55\x48\x16\xe7\x70\x00\x9f\xd0\x24\xdb\
-\x42\xed\xc2\x89\x9c\xb8\x71\x84\x89\x8c\xf4\x00\xed\x37\x27\x54\
-\xa7\xb5\x3c\x67\xa1\xe9\x18\xa2\xdc\xef\x89\x92\xb0\x4e\xb1\x19\
-\xf3\x5e\x9d\x69\xf6\xac\xce\xb0\xb1\x2d\x4f\xb7\xb5\x70\xa3\x5d\
-\x49\x05\x78\xe3\x1a\x7e\xc5\x20\xa1\xb0\x5a\x57\x65\x74\x7a\x53\
-\x0e\xbb\x66\x79\x25\xa3\xa8\xa6\xa8\xe5\x9a\x55\xb6\x67\xc4\x80\
-\x2c\xae\xc8\xe7\x7b\xe7\x6e\x0c\x07\x1d\xe6\xc5\x0e\x44\x0d\xe4\
-\xb5\xa7\x40\xc2\x10\xe1\xaa\x82\x6b\x4f\x31\x34\x4c\x6c\xf5\x32\
-\x71\xe8\x4a\xd5\xfd\x4d\xc9\x7a\x52\x34\x98\x38\x24\x5f\x6f\x08\
-\x27\x11\x53\x86\xae\x73\xa2\x3f\x29\x98\x4c\xe0\x62\xf2\x33\xf6\
-\x8b\xef\xf1\x99\x32\xf6\x4a\xf6\x95\x6e\x52\x7d\x61\xed\xb2\xb1\
-\x0f\xcb\x52\x6f\x81\x4e\xdc\xe3\x90\x35\x9c\x8e\xc6\x63\x4f\xbc\
-\x3e\xf0\x14\xc6\x3e\x45\x2c\x08\xde\x67\xfc\xdb\xf9\x96\xc3\x6a\
-\xc9\xaf\x98\x58\x67\x90\x05\xf8\x22\xc5\x25\x7b\x4c\xea\x4f\x4b\
-\x1c\xc9\x76\x71\x47\x32\xf1\x9d\x94\x38\x06\xb2\x00\x28\x27\xae\
-\x80\xd2\x64\x65\x9d\x9d\x30\x01\x74\xeb\x36\x78\xb2\xb6\xc6\x02\
-\x63\x7d\x15\x06\xb8\x2e\xd0\xde\xd0\xb9\x42\x2a\x23\x87\xf2\x96\
-\x13\xa1\x6d\x9a\x43\xa3\xb1\x32\x22\xee\xf4\x28\xc5\x54\x5b\x27\
-\x22\x32\x5b\x3d\xeb\xa2\xea\xc7\x44\x91\xa0\x30\xba\x56\xb7\x31\
-\x45\x6e\xdb\xea\xa8\x33\x00\x96\xe6\xf0\x2c\xa5\x32\x76\x4c\x64\
-\x42\xef\x25\x42\x54\x2e\x3b\x21\x1a\x8b\xba\x73\x00\xf6\xc8\xd8\
-\xf8\x15\xc9\xa1\x3c\xe9\x70\x96\xd6\x6b\x1e\xd7\x11\xff\xad\x9f\
-\x36\x58\x22\x43\x08\xdb\xb2\x94\x35\x58\x58\x7f\x6a\x12\x1c\x60\
-\xe0\xb1\xc6\xd3\x95\x3f\x20\xce\xbc\xba\x64\xed\xa4\x9d\x62\x10\
-\x17\x14\x55\xec\x00\x9d\x15\x01\x59\xc7\xd3\xc9\xba\x24\xd5\x76\
-\x5c\xec\xd7\x00\x8e\xdb\xeb\xf2\x66\x79\x24\x0c\x23\x92\x38\x61\
-\x32\x9d\xd5\x8c\x3f\xe8\xf0\xf4\xf1\x15\xc3\xc9\x98\x07\x5f\x7e\
-\xc1\x83\xc7\x3d\x18\xfb\x74\x27\x43\xc6\x13\x03\x5e\x03\x4e\xb7\
-\x35\x51\xcf\x4e\xdc\x70\x3a\xcc\x63\x55\xb9\x6a\xbd\x26\xc8\x14\
-\xc5\xa3\x98\x27\x13\x0d\x56\xdb\xad\xdd\x89\xf5\x71\xb4\xcc\x0a\
-\x17\x4d\xfd\xb1\x4b\x93\x85\x8f\x17\x76\xc7\x76\x5d\xba\x3d\xe0\
-\x97\xd2\xe3\x60\x80\x77\x68\x54\xdb\x9a\x16\x98\x03\x76\xc3\xdb\
-\x15\x0d\xbd\xdb\x64\xd0\x33\xc7\x5f\x10\x11\xd1\x24\x24\x4b\x2e\
-\xf0\x45\x0d\xd8\xaa\x1f\xeb\x34\x5c\x54\x39\x97\x57\x82\x03\x27\
-\xc7\xc5\x68\x0b\xda\xa6\xa1\x26\x74\x01\x46\xcb\x14\x79\xc6\x6a\
-\xf1\x5a\x1d\xd8\xad\x05\x89\xa9\xd6\x09\x11\xe9\xb6\xfd\x8e\xef\
-\x40\x6b\xc1\x7c\x0c\xea\x3c\x2e\xdb\xa1\x21\xd0\x92\x41\x94\xad\
-\x56\x26\x5b\xec\xf0\x2f\x9e\x52\x0c\x1e\x90\xc7\x25\xfe\xc5\x53\
-\xdd\x35\x1d\x47\x84\xd3\xae\x91\x1e\xb5\x2b\xb1\x34\xbe\xe9\x02\
-\xdf\xb1\x70\x7c\xa8\xc8\x3a\x9e\xc9\x73\x68\x3d\xbc\xc8\xca\x16\
-\x13\x77\x46\x55\x43\x5e\x68\x67\xc2\x76\x44\xef\x95\xe2\xd5\xcb\
-\x5f\xe8\xac\xef\xa6\xc4\xdf\x7e\xa0\xb8\xff\x86\xe2\xfb\xb9\x66\
-\x57\x13\xc2\x71\xdb\x26\xdb\x36\xfe\xdf\x6f\x6f\xf5\x76\xb1\x86\
-\x65\x49\x55\xae\x38\xac\x6a\x0f\xbc\x13\xf7\xdc\xc8\x80\xe9\x17\
-\x9f\xb3\xaa\x2a\x3e\x2e\xee\xe9\x4e\x86\x94\x62\xd6\xc8\x9b\x27\
-\xf8\xe8\x80\x7d\xdd\x28\x7a\xe1\xd8\x37\x59\x04\x2d\x36\x06\xc8\
-\xfd\xad\x2b\xa4\x9c\x6b\x52\x0d\xab\x28\x03\xe9\xd5\xe1\x19\x03\
-\x13\x81\x70\x5e\x71\x2d\x13\xbc\x56\x74\xb2\x95\x87\x20\x42\x52\
-\xb5\x53\x6a\x22\xd7\x93\x85\x9a\xa5\xe4\x46\x93\xe7\x71\xb9\xd8\
-\x39\xbe\x4a\x9d\x3c\x2e\xed\x82\xcd\xde\x67\x26\x02\x49\xa0\x5f\
-\x64\x7a\x87\x20\xd2\xbe\xb0\x69\x41\xe2\x4c\x97\x73\x93\x85\x2d\
-\x2b\x4b\xe5\xe1\x99\xd8\xa9\x05\xad\x95\x15\x76\xf2\x8f\x03\xb0\
-\x59\xcc\xe9\x49\x40\xa5\xb3\xd8\x94\x52\x08\x3b\x94\x44\x98\x8a\
-\x5c\x4f\x03\x39\x30\x56\x5c\xd1\xf0\x92\x6d\x89\x7a\x58\xe9\x06\
-\xad\x45\x55\x7b\xc8\x71\x50\xe0\x6f\xfa\xc4\x83\xed\x89\x76\x76\
-\x0b\xbe\x46\x1a\xee\xb0\xf2\xf4\x5a\xcb\xb1\x73\x6a\x5c\x0a\x78\
-\x9b\x49\x7e\xc8\xde\xf1\x2c\x7e\x4c\xc6\x90\xb2\xd4\xef\xe9\x57\
-\x3e\xf1\x62\x8d\x9a\x24\x0c\x97\x25\xeb\x71\x45\xb9\xd0\x7a\xb7\
-\x4e\xc7\x4d\xdd\xa2\x6e\xbc\xd2\x8b\x39\x7f\x92\xa0\xa8\x28\x17\
-\x23\xfc\x49\x41\xb6\x80\xb7\x8b\x35\x89\xb7\xe0\xd9\xaf\x3c\x41\
-\xc4\x7d\x3e\x6e\x34\x03\xaf\x4d\x85\xf3\x84\x55\x0d\x13\xd7\x8d\
-\xa2\x5a\x4e\x00\xdc\x72\xc0\x67\xc1\xc5\xe2\x21\xc1\xf4\x00\xf8\
-\xe4\x65\xff\xbc\x17\x6c\x41\x3c\xdf\x54\x44\xb9\x42\xe6\x25\x22\
-\x54\xd8\xce\xa4\xb2\x55\x46\x8e\xf0\xe5\xf9\x84\x82\x6a\x65\x2a\
-\xda\xc5\x0d\x0d\xe0\xcd\x49\x41\xc2\x5e\xfb\x54\xde\x41\x0a\x41\
-\xa4\x54\xed\x0f\x3b\xc0\x4a\x22\x21\x74\xa9\xb9\x51\xbd\xcb\x02\
-\x9f\x7e\xea\x53\xcc\xaa\xd6\xdf\x64\xab\x68\x9f\x5a\xd0\x35\xdb\
-\x93\xd4\x32\x68\x69\x62\xeb\x50\x0c\x4e\xfe\xbd\xd9\xc9\x6d\xa1\
-\x62\xc7\xc8\x1a\xc8\x3e\x42\x64\xee\xd8\x65\xc3\x40\x81\x97\xb5\
-\x87\xac\x54\x31\x50\xb2\xde\xed\xb5\x5f\x5c\x04\xf4\xb3\x88\x6d\
-\x2c\xc9\x81\x69\xa3\xec\xdc\x04\xb0\x5d\x04\x0e\x2b\x41\xb9\x08\
-\xd8\x0e\xf4\x2a\xc3\xb2\x73\xea\xe4\x46\x8f\x19\x13\x7e\xfa\xf8\
-\x67\x6e\x41\x96\x15\x11\x79\xa6\x18\x32\xe7\x36\x8e\x18\x02\x6f\
-\xa3\x1d\x43\xba\xf8\x93\x02\x1f\x5d\xf2\x1e\x8d\xa6\x4c\x0f\x4b\
-\xfc\xec\x0b\xc6\x23\x8f\xca\xd7\x12\xc1\x5f\xac\x18\x4e\xc6\xdc\
-\x4f\x2a\xfc\xc5\x8a\xf1\x17\x63\xc2\xc5\x92\xbb\xc5\x90\x37\xef\
-\x16\x4c\x33\xd8\xee\x74\xa5\xed\xcb\xa1\x47\xc7\x24\xeb\x9a\x12\
-\xa2\x29\x29\xf2\xec\x3c\x0a\xd2\x49\xe1\xa6\x6d\x08\x30\xc9\xb8\
-\xba\x68\xd2\x64\xe4\x50\x9b\xfd\x15\x03\x7c\x36\xb9\xa0\x13\xe2\
-\x1a\x3a\x05\xc2\xb8\x13\x19\x05\x10\x50\x39\xc6\x16\x26\x5b\x21\
-\x8e\x18\xd9\xea\xd9\x54\x7a\xf4\x3b\x7b\xb2\xc3\x00\xc8\xd9\x02\
-\x81\x54\x10\x9d\xd6\xdb\x4e\x8a\x1f\x8e\x89\x4d\x5a\xcd\x54\xea\
-\x22\x03\xe6\xd6\x7d\x40\x50\xc6\x4e\x4b\xdb\xe6\xd0\xf6\xac\x89\
-\xcc\xfd\x8d\xc7\x9a\xb8\x32\x0b\x33\x08\x8c\x4c\xa8\x5a\x5a\xf8\
-\xf4\x62\xbc\xe6\x62\xe3\x16\x27\xea\xcc\x0e\xa2\x41\xed\x1b\xfb\
-\x6d\x4e\x60\x3e\xaf\xe8\x09\x0d\xe6\xaa\xd6\xc2\xe0\xeb\xad\xd0\
-\x1d\xde\x76\xc1\xb3\xde\xc1\xb0\x17\x01\xca\x01\xbd\xc9\xca\xa0\
-\x47\x02\x9c\xbb\x24\xb1\xa9\xe0\x21\x18\x3f\x7d\x42\xb8\x49\xe9\
-\x4e\x9e\xd1\x05\xa2\x89\x62\xd3\x89\x74\x03\xd0\xea\x8e\x71\xef\
-\x8a\xe5\xee\x9a\x71\xef\x8a\xbb\xc5\x92\xe9\xa4\x60\xfe\xca\x94\
-\xd2\x78\x69\xaa\x6a\x13\x57\xa3\xbb\x5b\x4c\x18\x32\xe7\x8e\x29\
-\x77\x8b\xa5\x71\x78\x34\x83\x87\xbb\x3d\x79\x16\x71\x31\x9e\x50\
-\x4e\x86\x28\x8a\x13\xd9\x69\x01\x6c\x01\xb9\x1b\x97\xb0\x80\x64\
-\xe2\x73\x28\x3e\xf0\x78\xf1\x84\x74\x52\xb0\xae\xec\x20\x2c\xce\
-\x96\xaf\x7d\x52\x5d\xec\x18\x0c\x62\xa7\xe5\x06\xa6\x75\x48\x49\
-\x2d\x27\xea\x92\x70\x44\x61\xb5\x70\x43\x5b\xda\x38\xa6\x38\x93\
-\x03\xf6\x91\x26\xc0\xb1\xa9\xa1\x6a\x16\x91\xcd\x7e\x0c\x3b\x8c\
-\x30\x6a\x15\x94\xdb\xcd\x49\x91\x59\xb0\x49\x03\xee\x08\xd9\xaa\
-\xf4\xcd\x92\x82\xc2\xf6\xcb\xd9\xd6\xfc\xc6\xce\x55\x11\x23\x0c\
-\xd0\x76\xc6\xd7\x3d\x76\x29\x3c\x91\xa1\x96\x7b\x2a\xd1\x6b\x31\
-\xf1\xd6\x46\x34\xe3\xa3\x24\x55\x30\xe0\xb0\xd9\x20\x06\x89\x03\
-\xb6\xb2\xfa\x18\x9c\x57\x8c\x5b\xe4\x95\x2d\x06\x0e\x3c\x3d\x39\
-\x28\x35\x16\x5d\x62\x99\xdc\x56\xf6\x8c\x55\xb7\x46\xdb\x6c\x04\
-\x85\x8b\x74\x5a\x56\x76\x51\xcd\x66\xb0\xde\xb2\x31\x90\xc4\x39\
-\x12\x1d\x74\x0f\xc2\x80\x57\x1f\xfe\x8a\x7e\x57\x10\xee\x04\x79\
-\x76\xad\xa5\x6f\x3e\xe4\x62\x78\xed\x7a\xeb\xc2\x18\xe6\x8b\x88\
-\x3c\x96\x84\x59\x44\x1e\x0b\x53\xc8\x91\x0d\xfa\x92\x6c\x7a\x13\
-\xf2\x9d\x74\x05\x9d\x61\x35\x61\x34\x9a\xea\x46\xd9\x09\xbc\x01\
-\x62\xd6\x08\x1e\xb4\xfe\xed\xad\x30\x90\x92\x2c\xf3\x82\xa9\x17\
-\xba\x8e\x98\x4e\xf0\x19\xe9\xa4\x40\x72\x4f\xd4\x82\xb0\x0d\x18\
-\x0d\x1b\x8b\xbc\xc4\x44\x31\xed\x62\xce\xe8\x5d\xd5\xe8\x81\xb3\
-\xb2\xa0\x38\xb3\x60\xb2\x61\x20\xa1\x6c\x0f\x5e\x0d\x3e\x69\x3d\
-\x61\x36\x8d\xc7\x3e\x7d\xb1\x15\x38\xcb\xa6\x16\xe6\x91\x6d\xbb\
-\x6f\x48\x15\x07\x6f\xc3\xca\x49\x54\x71\x48\x03\x48\x24\xa8\xa8\
-\x9e\x94\x69\x62\x97\x98\xc5\x9b\x05\x74\xaf\x31\xc9\xd2\x02\xd8\
-\xca\x09\x31\xee\x1a\x56\x8e\x1c\x13\x27\x87\x92\x66\x48\x2c\x63\
-\x4f\x6c\xf4\x71\xb0\xd1\x51\xcd\x30\x36\xa0\xb3\x9f\xd3\x00\xad\
-\x6a\xe6\x2b\x44\xc9\x61\x37\x77\xce\xc5\x61\x37\x87\xa8\x24\x69\
-\xac\x13\x6a\x56\xcf\x48\xbd\x92\x40\xfa\xf8\xa2\x44\x1c\x22\x07\
-\xe0\xb5\xa7\x75\xf6\x49\xca\xed\xf8\x90\x4c\x08\xdc\xb3\xb9\x87\
-\x8b\xe1\x9e\x71\x3c\x26\xcf\x14\x0b\x25\x19\x18\xef\xfa\x62\xb8\
-\x67\xdc\xbb\xa2\x8c\x57\xae\x6b\x63\x70\x90\x04\x19\x74\x26\x3d\
-\x14\xa6\x0b\x64\x3a\xf9\xd1\xdf\xd0\xc6\x2f\x2b\xff\xd2\x84\x82\
-\x16\x74\xbd\x91\x2b\xbf\x5b\x09\xe1\xb6\x26\x60\x34\x0e\x77\xbc\
-\x5d\x94\x8e\x8d\xfd\xc9\x82\x74\x31\x21\x99\xcc\x18\x2c\xbe\x85\
-\xe1\x57\xba\x3d\x69\x7b\xa1\x19\xdc\x3a\x1c\x59\xe2\x2c\xb6\xd0\
-\xfa\xbe\x55\x54\x51\xca\xb8\x66\xd7\x48\xb4\x17\x69\xcd\x85\x9f\
-\x54\xf8\x4d\xf7\x41\x6d\x80\x01\xd2\xa6\x39\xc0\xb0\xf0\xce\x59\
-\x74\x41\x43\x38\x14\x48\x02\x3b\x53\xc2\x14\x43\xb6\x41\xe6\xc8\
-\xd7\x8d\x89\x35\xc5\x01\x54\x04\xaa\xd6\xc3\x56\x7f\x46\xa6\xca\
-\xe7\xba\x76\x45\xd5\x72\x20\x9a\x96\x9a\x65\xdf\xe3\xaa\x9d\x6d\
-\x16\xf5\x44\x81\x5a\xee\x9d\x2e\xb2\x4c\x7c\x2a\x26\x72\x0a\x21\
-\x08\x94\xc2\x0b\x29\xf9\xbd\x95\x00\x00\x20\x00\x49\x44\x41\x54\
-\x06\x6c\xf7\x77\x24\x45\x8f\xce\x80\x46\x67\x89\x72\xec\xac\x7d\
-\xe4\x7a\xf8\xa0\x10\x82\xd4\xcb\x48\x2a\xed\x4c\xf8\x55\xc6\x6e\
-\xa7\x0b\x0b\xc1\x46\x5b\xa9\x5f\x4c\x47\x2c\x6d\x2b\x96\xf9\xda\
-\x8a\x95\x2e\x96\xac\x1b\x9e\xf2\x8f\x01\xb8\xd9\xf2\x14\x74\x57\
-\x14\xbd\x09\x4f\xe2\x88\xee\x95\x68\xb5\xf2\xd7\xbf\x6a\xcf\x65\
-\x94\x01\x96\xa3\x89\xbb\xbe\xc8\x22\x4a\x5b\xf2\x68\xb4\x51\x35\
-\x27\x13\x09\xf1\xce\xe8\x7d\xc9\x3a\x8b\x78\x44\x40\x35\xdc\x00\
-\xbd\x96\x23\xe1\xa4\x84\x19\x66\x68\xc7\x66\xf5\x96\x3e\xfe\x64\
-\x41\xb9\x98\xe0\x4f\x16\xc0\x8c\xcd\xe4\x2b\x2e\x4c\x7b\x52\xd9\
-\x2f\xf0\xb7\xfa\xf5\xf6\x3d\xf6\x4a\xe9\xb2\xb3\xed\xc0\x08\xa4\
-\x6c\x31\x5e\x13\xb4\xcd\x7f\x6a\x57\x7a\x0e\xc0\x71\x51\x92\x89\
-\x9c\xb8\xe8\x91\x1d\x36\x2d\x85\xab\x7d\xdb\x1e\x19\xd0\x27\x62\
-\x6b\x80\x6b\x8b\x2b\x4d\x19\xd2\xeb\x47\xf8\x69\x40\x91\xa4\x48\
-\xe9\x1d\x39\x15\x5e\xad\x9e\x8d\x0e\xce\x84\x47\xac\xac\x7f\xbc\
-\xa3\x93\x14\x3a\xb3\xa0\x70\x4c\x6c\x01\xaa\x27\x60\xd6\x32\xa8\
-\xf7\x09\x9f\xd8\x16\x3b\x6c\x76\xc2\x96\xa3\xb7\x45\x87\x04\xad\
-\x7f\xad\x53\xb1\x53\xb9\x63\xe3\x3e\x17\x1a\xc8\xef\x2b\x78\xd4\
-\x6f\x15\x3b\x9a\x3e\xb2\x65\x66\x9f\x0c\x5d\x14\xcc\xb8\x55\x8a\
-\xe2\xed\x82\x0f\xab\x5b\x76\x77\x7b\x3e\x2c\xdf\xf2\x48\xe4\xfc\
-\xd5\x93\x9f\xf0\xd3\xe7\xda\x76\xaa\x06\x53\x3a\x55\xc2\xd5\x64\
-\x4c\xe0\x95\x40\x41\xbe\x92\x70\x26\xe2\xd9\xb4\xdd\xec\xed\xf5\
-\x22\x73\x76\x1f\x71\xa9\x3b\xb0\x33\x93\xcb\xcb\xd2\xd3\xd7\x34\
-\x0f\xdd\x71\x42\x9a\xa5\x5a\x5f\x37\x82\x44\xee\x08\x9a\x09\xfa\
-\x2c\x59\x2e\x20\x98\xe0\xbc\xe4\x92\x7b\x32\x86\x8c\x58\x81\xf2\
-\x4d\xa1\x83\xf6\xe2\x4e\x49\xba\x22\x22\xdc\xdc\x36\xdc\xa9\x19\
-\xcb\xe2\x9a\x31\x57\xa4\x8b\x92\xab\xa9\xfe\x4b\x9a\x4c\xdc\xf2\
-\x8a\x15\xba\xec\x8c\x49\xa4\x45\xd1\x84\x54\xea\x6a\x91\x30\x76\
-\x1a\x26\x81\x56\x18\xe0\xb9\xd2\x85\x19\xc8\x9d\xf5\xe3\xfa\xe7\
-\x92\xbe\x2b\x2b\x47\x91\x60\x7b\x34\x1c\xb0\xa9\x77\xb7\x48\x44\
-\x14\xd5\x95\x3f\x24\x24\x11\x30\xa5\x44\x11\xa4\x1e\x45\x52\x3a\
-\x2d\x8c\x8a\x9c\x6b\x81\x52\xc4\xf4\x88\x84\x44\xa8\x8c\x83\x9e\
-\xd3\xd3\xea\xa1\xeb\x89\xc8\x01\xd3\x5e\xb7\xba\xb8\x82\x93\xf6\
-\x24\x77\x5b\x05\x48\xea\x8a\x5d\x4e\x45\x1f\xc1\x76\x0f\xc9\x26\
-\x85\x60\xe0\xd8\xb8\xe9\x1b\x57\xfe\x0c\xaf\xeb\xa1\x96\x8a\x24\
-\x38\xb8\xb2\xb4\x17\x0c\x34\xd0\xb7\xd7\x6c\xc3\x09\x87\x4d\xca\
-\xdb\xbb\x0f\x6c\xb2\x15\x3f\x7c\xfb\xbd\xfe\x61\xa3\x4b\xd4\xf5\
-\x3b\xae\xf7\x1a\xe4\x7f\x79\xb7\x81\x3f\xff\xd7\xfc\xcb\x8b\x01\
-\x5f\x3e\xec\x90\x2d\x0b\xe2\x71\xc0\xdf\xfb\xfa\x37\x99\x3d\x0b\
-\x18\x8b\x3e\xb3\xcf\x1e\x30\x59\xc3\x75\x67\x8f\x98\x07\x84\x93\
-\x91\x2e\x96\x78\x05\x1e\xc9\x09\x30\x3d\xb5\x23\x4e\xba\x75\x07\
-\x36\xb0\x5e\x64\xc4\x41\x41\xb6\x08\x18\xf6\xba\x8d\xce\x6b\xbd\
-\x28\x94\xd9\x0c\x50\x8e\x6d\x93\x38\x41\x70\x8f\x6a\x4d\xe0\x94\
-\x2c\xb2\x31\xdb\xf8\x9a\x07\xf1\xd8\xb1\xeb\x7a\xb7\xe7\x89\xd7\
-\x83\x46\x50\xc8\x02\xf8\xb8\xd8\x91\x0f\xea\xeb\xe9\xc2\xca\xc9\
-\x7b\x60\xc2\x87\x6a\xc1\x8c\x19\x61\xb7\x51\x59\xb5\xd5\xbe\x6c\
-\x4d\x57\x24\x86\x89\x5b\xae\x6d\xbb\x4d\xc8\xea\x61\xcb\xa0\x96\
-\x4f\x14\x15\x42\x49\x5d\xc9\x33\x00\xb7\x56\x17\x46\x0a\xb8\x09\
-\xf2\x26\xff\x10\x48\x0f\x19\xd1\x7a\x3f\x5b\x1c\xd1\x96\x9a\xfe\
-\x1b\x92\x08\x48\xeb\x50\x7b\xa4\x1a\xf6\x9c\x93\x17\x0a\x44\x84\
-\x42\xb5\x7a\x1a\x6c\x5e\xa2\x6d\xff\x65\x8d\x83\xe5\xa9\x57\xdc\
-\x6a\x4f\x32\x5e\xf1\x71\xe9\x19\xd0\x63\x5f\x8b\x3b\x44\x3c\x3d\
-\x11\x18\x91\xc8\x08\xd1\xab\xfd\x3c\xee\x12\x66\xba\x2c\x1d\x6c\
-\x36\x04\x1b\xf8\xb6\x90\xdc\xbe\x7b\xc5\xab\x77\x19\xea\xfa\x1d\
-\x37\xcb\x37\xf5\x0e\x14\x6b\x6a\x98\x45\x4f\xb9\x97\x6f\x78\xf6\
-\xf4\xa7\x74\x0b\x0d\xea\xef\x6e\x0f\xa4\x77\x1b\x7e\x7a\x7b\xe0\
-\x7f\xf8\x8b\xff\x91\x17\xcf\x03\xa2\xc7\xff\x21\xff\xf1\x3f\xe8\
-\xf1\x60\xf4\x1f\x10\xcb\x15\x74\x21\xcf\xbb\xf8\x1d\x89\x57\x3d\
-\x04\x8e\x3a\xad\x9b\x15\x3c\x7a\x48\x46\x94\xdc\x33\xec\x75\xf5\
-\x00\xed\xd0\xce\x10\x6e\x57\xd1\xce\x8d\x67\x55\xce\x8d\xa9\x07\
-\xaf\x44\xb1\x62\x9f\x17\x7a\x04\x80\x29\xf5\xf7\xb3\xa8\x36\x33\
-\x1a\x91\xd4\x93\xe9\x9a\x4a\x4f\x1e\x7a\x6b\x6f\x4f\x16\x70\x87\
-\x93\x14\x0f\x17\x0b\x18\xce\xc8\xf7\x99\x03\xb2\x93\x23\xb6\x83\
-\xc5\xdf\xb7\x3d\xe4\x61\xe9\xb1\x95\xd2\x68\x52\xa9\x01\x28\x3d\
-\x8a\xc8\x00\xcf\x68\xe1\x75\x2a\x11\x89\x06\xa6\x02\x02\x93\x58\
-\x3b\x8e\xa7\xdb\x02\x48\xab\xf3\xf6\x9c\xa9\xd6\xd0\x9e\xa9\xf4\
-\xf0\xcd\x02\x4f\x2f\xec\xa4\x0b\xfc\x38\x6b\xad\xe1\x11\x97\xd5\
-\x16\x21\xa6\x28\x2a\x76\x66\xae\x84\x05\x72\xd3\x99\x50\x67\x5c\
-\x89\xe3\xdc\xc4\xb1\xfd\x66\xc3\xf1\x22\xee\x12\x66\x3e\xdb\x3d\
-\xa8\xe5\xbe\x55\x82\x6e\xca\x06\xab\x50\x42\x33\x88\xe5\xa6\x08\
-\xd8\xbc\xbb\x65\x79\x77\xcd\xdf\xbc\xc9\x1d\x38\x89\x1f\xb3\xca\
-\xbf\xe6\x8b\x81\xa2\x5b\xbc\x63\x1f\x3c\x6e\x01\x79\x16\x3d\x65\
-\x16\xa1\x1f\x7b\xfa\x53\xb6\xa6\xdf\xf7\x46\xbe\x81\xd7\x6f\xf8\
-\xfd\x6b\x9f\xaf\x2e\xbf\xe3\xf1\xd3\xdf\xe2\xcb\x9f\x8c\x08\x46\
-\xa5\x8e\x86\xae\x37\x8e\x4d\x5d\x51\x84\x7a\x0e\x73\x9a\xa5\x10\
-\xef\x48\x48\x4c\x6b\x93\x32\x91\xcd\x5e\xeb\x76\x42\xaf\x9e\x7b\
-\xd1\x92\x18\x5a\x4e\x94\x8b\x40\xa7\xe1\x0c\x4b\x87\x8d\xcc\xf3\
-\x49\x37\x89\x25\x9e\x13\x97\xc1\xa7\x14\x11\xdb\xc5\xc7\xd3\xcf\
-\x31\xda\xf8\x76\x82\xd3\xc4\xc7\xaf\xb7\x3a\x3b\x29\xbb\xa6\x65\
-\xdf\xf8\xba\xbe\x99\xe0\x6e\x17\x5c\x76\x3b\xd8\x56\x64\x81\x02\
-\x15\xa2\xa8\x78\x38\x6b\x03\xd1\x2d\xd4\x8e\xfc\x5f\xdf\xee\x08\
-\x8d\x12\x36\x47\xbd\x19\xc7\xd5\xbb\x56\xde\xd8\x31\xaf\x74\xa7\
-\x3a\x88\xec\x8e\x61\xc6\xf5\x1f\xbc\x7e\x63\x9a\x4e\xfb\x3c\x1e\
-\x9f\xb2\xd4\xf2\xa3\x56\xa5\x66\xc3\xa8\x75\x2b\x8e\x2b\x76\xeb\
-\xd8\xc7\xf7\x0b\x50\x92\x30\xbb\x38\xb1\xdc\x74\x9c\x32\xa5\xa8\
-\x12\x96\x4a\xb2\x58\x2c\xb9\xfb\xdb\x1f\x78\x69\xe6\x32\xdc\xef\
-\xeb\xe7\xcf\xa2\xa7\x20\x7f\x01\x3c\xe5\xe3\xc3\xe7\x3c\x0d\xcc\
-\x21\xfe\x16\xc2\x27\x2f\xe0\x5e\xdf\xde\x07\x8f\x99\x8f\x5e\x33\
-\x5d\x3d\x77\xe0\xee\x16\xba\x7f\xed\xdb\x1b\x8f\xf7\xea\xcf\xa8\
-\xe6\x13\x2e\xfe\xee\xd7\x8c\x45\x9f\xac\x0f\x76\xc4\xc4\xc4\x00\
-\x2b\xcf\x22\xbc\xfd\x12\x46\x38\x6d\x2b\x19\x99\xd6\x26\xad\x89\
-\xed\x10\x40\xdb\xea\x94\x92\xb7\xe4\x45\x13\xc0\x76\xa4\xc0\xc9\
-\xbf\x3d\x53\x10\xf7\x74\xff\xdf\xe4\x9e\xa6\xa5\xd3\x94\x0f\xee\
-\xfa\x27\x4e\xa1\xd0\x09\x3e\x63\x77\xf7\x81\xf1\x85\x4f\xba\x98\
-\xe8\xcc\xd0\x51\x83\x41\xf3\xfd\x5a\x4c\xec\x37\x42\xf1\x27\x8b\
-\xdc\xc0\x2e\xe5\x36\x08\x11\x35\x3a\x99\x55\x6d\x7c\x35\x1a\x33\
-\xa3\x33\xe0\x94\xb4\xa5\x84\x3c\x03\xe6\xd6\xb4\x9f\x93\xce\x46\
-\xe3\x25\xab\xfa\xb1\x43\x1a\xd0\x49\x0a\x0a\x0b\x76\x3b\x40\x45\
-\x54\x27\x65\x71\x61\x58\x53\xcf\x24\x6e\x3b\x17\x1a\xac\x09\x1b\
-\xbf\x6a\x8d\xb6\x02\x58\xc7\x3e\x9e\xaa\x88\x45\x0e\x22\x22\x38\
-\x94\xdc\xed\xef\xb9\x60\x76\x02\xe4\x55\xe5\x91\x2f\x17\xbc\x7e\
-\xbb\xe0\xf5\x9f\xfd\x6b\xae\xf7\x25\xe9\xdd\x86\xe4\x62\xd0\x06\
-\x30\xf0\xe2\xab\x7f\x00\xc0\x4f\x2e\x66\xfc\x5f\x87\x11\x7f\xbf\
-\xb3\x82\xce\xbd\xae\x52\x3d\x86\x37\xea\x9a\xd1\x7d\xce\x74\xf5\
-\xfc\x84\xa5\x01\xc6\x83\x1b\xb2\x65\xc1\x1f\x2e\xef\x78\x51\x24\
-\x3c\xfb\xf2\x09\x97\xcf\xd7\x04\xa3\xaf\x48\xb3\x1d\xfd\x2a\x6a\
-\x05\xfe\xf3\x5c\x92\x66\x11\xc4\x21\x65\x76\xcf\xf5\x62\x4f\x1c\
-\x14\x84\x59\xc4\x7a\xb7\xa7\x9f\x45\xa6\x62\xa7\xc1\x3a\x1a\x5e\
-\x1c\xfd\x00\xf7\x46\x72\xd4\xd2\xc3\x4e\x0f\xb2\x2d\x4b\x13\x11\
-\x51\x66\xf7\x67\x17\x89\x9f\xac\xd8\x0d\xda\x32\xe6\x50\x7c\xa0\
-\x77\xd1\x65\x79\x77\x4d\xef\xa2\x0b\xcc\x4c\x05\xf4\x47\xca\xce\
-\x0e\x58\x52\x1d\x85\x79\x2a\xa4\xe9\x4c\xde\x22\xf5\x4c\x09\x67\
-\x87\xe1\xba\x3b\xdc\x20\x6d\x75\xe4\x2a\x9c\x01\x63\xd0\x90\x26\
-\x67\x2b\x75\xe7\xcb\x5e\x8d\xec\x84\x6a\x06\x3c\x5a\xfa\x8c\x46\
-\x07\xc7\xb9\x2a\xa2\x6a\x1c\xfe\x43\x51\x11\x9a\x53\x1f\xb8\x8a\
-\x9d\xef\x52\xbf\x8e\x89\x0b\x91\xd2\x27\x66\x2b\xb4\x0f\xac\x94\
-\xa4\x1f\x0c\x10\x9d\x94\x2d\x29\xa2\x39\x1d\x49\x49\x3e\x2e\x56\
-\xfc\xe2\xdf\x7c\xcf\xcb\xd7\x6f\x48\xef\x74\x2e\x20\xb9\x18\x38\
-\x20\xcf\xa2\xa7\x0c\x1f\xc2\xd7\xbf\xf6\x05\x9f\x5d\x3d\xa5\x5c\
-\xf7\x99\x87\x1e\xff\x19\x70\xb3\xdc\x33\x9e\xe9\x21\x21\xcb\xbf\
-\x79\xcb\x53\x71\x05\x8f\x61\xfd\xae\xd6\xcf\x57\x5d\x9f\x3d\x70\
-\x2f\xdf\x00\x4f\xe9\xa2\x59\xf9\xe5\xab\xd7\x04\xea\x15\xd9\xe1\
-\xef\xf1\xc5\x57\xdf\xe2\x75\x9e\x52\x25\x29\xc5\xca\x07\xfa\x6c\
-\xf7\x8a\xe7\xbe\xaf\xa7\xc5\x65\x39\xf9\x62\x45\x8e\x07\x03\xed\
-\x3b\x8d\x7b\x57\x44\x13\x75\x04\xd6\xf3\xce\x73\x21\xba\x04\x6a\
-\x6f\x8a\x32\x5e\xab\x42\xb8\x57\xaa\x76\x30\x1a\x71\xcd\xba\xf1\
-\x34\x69\x6d\x8b\xde\x15\xe1\xe6\x07\x0e\xc5\x07\xc3\xc0\xba\x5c\
-\x5d\x2e\x26\x74\x02\x78\xb8\xf8\x1e\x86\x33\x42\x7f\xeb\x7e\xcd\
-\xe3\x1d\x22\xe9\x77\x08\x0f\x44\x7a\xa2\x62\x54\xb9\xe8\x65\xad\
-\x65\x95\x03\x30\x91\x3e\xac\x67\x87\x2e\x7e\x60\x60\x7a\x34\x57\
-\xa2\x06\xb0\x6c\xed\x00\x7d\xfb\x63\x2b\xb3\xc3\x44\xc7\x13\x7e\
-\x9a\x4c\xac\x1f\xf1\xb6\x15\xbd\x7e\xa4\xb3\xc2\xa2\x6a\xa5\xd6\
-\x38\x3e\xa5\x55\xe3\xf4\x60\x34\x4f\x0b\x66\xde\x51\x1c\x55\x1a\
-\x43\xe5\x9d\x48\x8a\xe6\xc2\x4e\x29\xdd\x67\x97\x31\x44\xa9\x0d\
-\x7d\x11\xbb\xbe\xba\x9c\xd2\x81\x77\x6b\x5e\x9b\x2f\x7d\x16\x8b\
-\x0d\xdf\xfd\xe5\x1f\xf3\xd2\x2c\xc6\x2c\xfb\x5a\x30\x03\x46\x0a\
-\x3c\x06\x15\xf0\xf9\x64\x4c\x32\xd1\xc5\x85\x70\x55\x71\xff\xc5\
-\x0b\xf2\xfb\x35\x9b\xfb\x3b\xe6\xbf\x35\x63\xf9\xdd\x5b\x6e\xee\
-\xee\x19\x3e\x7e\x0a\x87\x37\xac\x6f\x71\xda\xf9\xaa\xeb\x73\xdd\
-\x90\x17\xfb\xe0\x31\xdf\xde\xbc\xe3\x2b\xfe\x94\xb9\xf7\x35\xd3\
-\x2f\xa1\x58\xfd\xc4\xc8\x81\x85\x9e\xb8\xee\x5f\x81\xc9\xe3\x86\
-\x93\x11\xd3\x46\x77\x74\x84\x72\x5d\xd2\x1a\xc0\xe9\x19\x20\x9b\
-\xd0\x8e\xb2\xc3\x0c\xdb\xcf\x49\x33\x5c\x72\x2e\xcf\x25\x8c\xdb\
-\x3a\xb6\x14\x91\x2b\x70\xd8\xad\x67\xe6\xd8\x5d\x97\x57\x3c\x0b\
-\x4a\x7a\x17\x5d\x76\x77\x7b\xc7\xc6\x37\x8b\x2f\xe8\x15\x77\x84\
-\xe5\xdf\x39\x49\xc1\x95\xa6\x33\x3b\xdd\x1e\x08\x3b\x48\x94\xf4\
-\x10\x78\xad\xc6\xce\x52\x7a\xe6\xd4\x5e\x9e\x69\xee\xd4\x95\x39\
-\xa1\xb4\x1f\xdc\xca\x50\x28\xe9\x5c\x09\xfd\xe3\x5a\x45\xa4\x41\
-\x1b\xa4\x3e\x71\xb5\x25\x13\xa7\x5a\xda\xce\x21\xb6\x47\x02\x89\
-\x47\x5c\x94\xb0\x3e\xe8\x25\x42\x3f\x6e\x2f\x10\x8e\x00\x2c\xa8\
-\x58\xd8\x40\x90\xd2\x3e\xb7\x70\x61\x9c\xc8\x01\x59\x1d\xb1\xf2\
-\x49\x2a\xaa\x31\x3c\x51\x88\xc8\x01\xd4\xc7\xd3\x41\xa0\x32\x21\
-\xa7\x64\x4b\x46\x9f\xd8\x9d\x16\x01\xe0\xe3\xe2\x3d\x2f\x7f\x71\
-\x7d\x16\xc0\xcb\x71\xc4\x78\xa9\xbf\x99\xeb\x7d\xc9\x0b\xe0\x90\
-\xbd\xe3\xcf\xfe\x48\x31\x1e\x8f\x78\xfe\xec\x21\xa3\x2f\x86\x8c\
-\x83\x29\xab\xc9\x03\x1e\x3d\x19\x72\x2b\x61\x91\x57\xa8\x59\x84\
-\xb8\x97\xdc\xdc\xc1\xd0\xb0\xf2\xf7\x1b\xc1\x28\xd4\x32\x46\x33\
-\x32\x5c\x75\x35\x23\xa7\x1f\x0a\xbe\x15\x07\xbe\xe2\x9e\xe9\x97\
-\x7f\xcb\x65\xfc\x33\xe6\x0b\x7d\x3a\xad\xfd\x62\x0d\x93\xc4\x65\
-\x90\xdb\xe7\xc0\x4b\x1b\xdf\x48\xda\x62\xde\x20\x0b\x28\xe2\xa2\
-\x35\x1a\xa0\x5c\x28\xfc\x09\x24\x71\x0d\xe4\xa4\xe1\x82\x4d\xfc\
-\xe2\x6c\x89\xb9\x05\xe4\x26\xa3\x1e\xde\x40\xe7\xb1\x63\x62\xc0\
-\x5c\xff\xc0\x20\xb8\x3a\xab\x89\xf5\x18\x81\xa4\x0e\x00\x75\xa2\
-\xca\x00\x19\x57\x72\xb6\x00\x2d\x4c\x76\x42\x33\x99\x86\x42\x3e\
-\x3f\xd0\x79\x6c\xaa\x70\x91\x30\x2c\xae\x4b\xcd\xbe\xd7\x67\xeb\
-\x7b\xa6\x25\xc9\x27\x8a\xa4\xb9\xad\xa5\x88\x46\x79\xe6\xb4\xb6\
-\x34\xef\x19\x45\xc2\x74\x2d\xeb\x56\x26\x26\x3d\x77\x68\xaf\x27\
-\xbf\xab\x23\xde\xd6\x72\xa2\xc9\xd2\x75\x7b\xbe\x0d\xc4\x47\x2e\
-\x5d\x86\x19\x46\x2d\x84\x40\x2d\x7d\x42\x3b\xab\xd8\x9c\x98\xd1\
-\x2e\xf2\xb6\xa4\x84\xca\xa3\x14\x03\x60\xa3\x47\xbf\xa2\x25\x46\
-\x5f\xc4\x6c\xc9\x88\x22\xc1\x66\xe1\xf1\xf1\xfa\x9a\x6f\xfe\xcf\
-\x6b\xfa\xd7\xdf\x90\xe6\x9d\x16\xfb\xf6\xe3\x35\x49\x38\x68\xc1\
-\xc2\x97\x37\xec\xee\x9e\xc0\xc5\x3d\x72\x79\x4f\x59\x6d\xc9\x8a\
-\xc7\xbc\xb8\x0a\x18\xc7\x43\xf0\x21\x61\xc0\x8b\x9f\x7c\xc9\x57\
-\x8b\x19\x1f\x9e\x7b\xf0\xe7\xdf\x38\x56\xfe\xe2\x9d\x96\x12\x16\
-\xc0\x76\xe7\xd0\x54\x1f\xc2\xab\xd7\x04\x4a\xff\xdb\xfb\xbf\x91\
-\x52\x15\x1b\x92\xac\x42\x7d\xf6\xd0\x2d\xec\xdc\x62\xce\x6c\xb5\
-\x17\xbc\x6b\xf9\xc8\x3e\x82\x92\x94\xf5\x4e\xc2\xae\x4e\x9b\x85\
-\xb1\x84\x18\x86\xb4\x4f\xcf\x65\x99\x78\xb9\xbb\x26\xcf\x46\x8c\
-\x9b\x55\x6a\x53\x72\xf7\x4d\xb1\x4a\x6f\x7d\xf6\x96\x5a\x3a\x4f\
-\x39\x14\xd7\x9f\xd4\xbc\xd6\x62\xb3\x16\x5d\xb3\x62\xe7\xe6\x13\
-\x07\x44\x04\x0d\xae\x2a\x90\x46\xdc\x7a\x04\xd2\xd3\x16\x9a\x05\
-\xb8\xd2\xad\x45\xba\x65\xa9\x69\x9b\x29\x67\x79\xc5\x05\x64\x87\
-\x1d\x1c\xc0\x2b\x7a\x70\x50\xd0\xe9\x21\x03\x45\x54\x98\x25\xd6\
-\x61\x07\x41\xd4\x0a\xd2\x17\xcd\x6e\x65\xdb\xd1\xa1\x38\x93\x38\
-\x6e\x6b\x60\x94\x57\x57\xf7\x8e\xc0\x5b\x7f\x91\xb2\x5e\x8c\x58\
-\x50\x5b\xcf\x58\xc4\xad\xa1\x2a\xa1\xb2\xb2\x6a\x4d\x6c\x40\xdb\
-\xa7\x5e\xec\xf5\x89\xd9\xca\x8c\xc5\x62\xc5\xcb\x5f\x5c\xf3\xc3\
-\x9b\x9f\xb3\xd8\x45\x4c\x7a\xa7\x95\xaf\x77\x79\xce\xe3\xc6\xc2\
-\xee\xbb\xdb\x03\xf0\x96\xcf\xcc\x90\xbc\x1f\xee\xde\xf2\xc3\x77\
-\x6f\xf9\xf0\xe5\x13\xaa\xbe\xc7\x2c\x18\x31\x0a\xfa\x84\x93\x11\
-\xb3\x27\x0f\x39\xa4\x7d\x5e\xfc\xe6\x13\xf8\x33\xb8\xb9\xbb\x67\
-\x35\x0b\xc9\xdf\xbe\x3c\xf9\x9c\xab\xae\xcf\xf5\xbe\xe4\xaa\xeb\
-\xf3\xed\x8d\x07\xfc\x82\xdd\xf8\x92\x8b\xb0\xa0\x1a\x4c\x1d\xd0\
-\x5c\x07\x88\xa9\xc6\xd5\xee\x44\x7d\x6e\xbd\x3c\x53\xe4\xf1\x9e\
-\x4e\x4f\x30\x31\x7e\x72\x39\xb1\x33\x2f\xbc\x06\x7b\x9f\xd7\xce\
-\x3a\x59\xd7\x37\x5d\x21\x01\x9d\x66\x17\x58\x63\x36\x47\xb7\xc1\
-\xc4\x9d\xf8\x31\x87\xe2\x43\xcb\xa5\x38\x14\x1f\xd8\x14\x77\xc0\
-\x17\xad\x79\x1e\x2d\xbf\xd9\x16\x3b\x22\x24\xdb\x48\x77\x70\x54\
-\x64\x6e\xe1\x25\x51\x26\xf7\x50\x03\xa6\x14\x1d\xc8\x34\x7f\xb6\
-\x22\x21\x91\xd0\x0c\xbb\x3e\xc0\xb0\x43\x2c\x4d\x3a\x3f\x2b\x08\
-\xed\xa9\x36\x94\x47\x66\x7c\xc4\xb8\xd3\xa3\x3a\xd3\x09\x22\xcf\
-\x74\x88\xd4\x8b\xba\xe8\x14\xcc\x06\xb8\x91\xad\xd8\x99\x57\x58\
-\xfc\x0a\x4e\xf3\x1f\xe2\x68\xa9\x7b\x5c\xbd\x2b\x44\x4a\xa0\xb4\
-\x36\x54\x4a\x12\xe2\xe9\x69\xa0\xa2\xd6\xc2\x1b\xe5\xb1\xbe\x97\
-\xbc\x7c\xfd\x86\xc5\x4e\x1f\x8a\x6f\x97\xb7\x94\xf2\x23\x7e\xf4\
-\xc0\x6d\xbf\x78\xf4\x81\x2a\x7c\xec\x18\x3a\xb9\x18\xf0\xdd\xed\
-\x81\x6c\xf9\x9a\x78\x5c\xdb\x50\xd7\x3f\xcf\xf9\xfc\x71\xcc\x9b\
-\xbb\x37\x8c\x2f\xae\x18\xce\x03\xbe\x79\xf5\x57\xae\xcb\x66\xd0\
-\xdf\x73\x73\x47\xcb\xa9\x68\x5e\x2c\x1b\x37\x81\x5c\x7c\xf3\x06\
-\xef\xc1\x67\xf4\x1e\xed\x18\x35\x2c\xb3\x34\x83\x3c\xbf\xd3\x43\
-\x5c\x76\x4b\x13\x62\x12\x80\xae\xde\xd1\xeb\xba\x41\x29\x7a\x4c\
-\x86\x76\x1c\x44\x7c\xcf\x21\x0b\x28\x9c\x8c\x48\x5d\x37\x89\x1e\
-\x68\x98\xd6\xbe\xb1\x59\xd8\x75\x6c\xf3\xa4\xcd\x93\xd8\x3c\xb5\
-\x6a\x30\xf1\x99\x8b\x05\xf4\x3e\x9b\xd6\x7e\xbc\x8a\x8f\xa4\xc8\
-\xbd\x2e\x3b\x07\x52\xb3\x58\xd0\x58\x5a\x35\xe3\x92\x4d\xc6\x45\
-\xe9\x54\xdb\x7e\xda\x21\x57\xba\xdf\xcd\x49\x04\x57\xb1\x2b\xf5\
-\xe4\x16\x33\xf8\x62\xb8\x3e\x40\xa7\x47\xd5\x8f\x89\xb7\x86\x81\
-\x2d\x78\xb6\x19\x55\xdf\x33\x59\x63\xcf\x2d\x0e\xcf\xf9\xc7\x38\
-\xcd\x6b\xd8\x3f\xf5\xdb\xc5\x12\xd1\x38\xf5\x97\x09\x17\xc5\x8b\
-\x1d\xea\x51\xd7\xc5\x4a\xad\x25\x77\x3e\xfc\xab\x35\x7f\x61\xea\
-\xfc\x96\x91\x9b\x0b\x40\x3b\xe2\x2a\xc7\x63\x7b\x7d\xcd\x87\xf7\
-\xd7\xbc\x7d\x27\x99\xf4\x72\x07\x64\x3f\x7a\xc0\xf5\xf5\x47\x36\
-\xea\x8a\xe7\xd1\x8e\x6f\xe5\x1b\x1e\x4d\x15\xf1\x44\x90\x5c\x3c\
-\x76\x52\xe3\x26\x5e\x53\xed\x1f\xd7\x8b\xb3\x0d\xfc\xf5\xf5\x2f\
-\xf4\x0e\xbe\x7c\x4b\x19\x5d\x72\xd5\x0b\x29\x67\x0f\x88\xbc\x15\
-\xb2\x1a\x11\x5e\x48\x9e\x7f\xff\x96\x25\x97\xe7\xbd\x83\xbb\x0d\
-\x3f\x0d\x0f\xbc\x1e\x4f\xb9\xea\xfa\x7c\x58\xbe\x25\x50\xaf\x78\
-\x11\x7f\x8d\xba\x1c\x73\x55\x14\xbc\x3b\xe4\x2c\x97\x7b\x67\xbd\
-\x0d\x07\x3d\xc2\x49\xd4\xee\xd7\xcb\x72\xa7\x83\x13\xe7\x03\x07\
-\x1c\x8e\x9c\x8a\x66\x55\x70\x8d\x9e\xc8\x39\x5f\xac\xc9\x83\xc2\
-\x2d\xec\x4e\x98\xd8\xc4\x4c\x5b\x4c\xfc\x23\x72\xa2\x1b\xcf\xeb\
-\x1c\xb7\x28\xcd\xe0\x43\x9b\xc7\x30\x51\x4c\x94\xc4\x13\x15\x92\
-\x18\xdb\xbe\x7f\x30\x4c\x17\x34\x2c\x14\x1b\xc7\x3c\x18\x98\xf5\
-\x85\x0e\xe4\xb4\xea\x5e\x07\x74\xf4\xb2\xd3\x00\xb6\xd5\xb6\x96\
-\x43\x27\x13\x5d\x44\x31\xe0\x97\xd2\xa3\x1f\x09\x88\x6c\x20\x3c\
-\x6a\x49\x85\x48\x19\x77\xa2\xb5\xb0\x93\x14\x89\x66\xd9\xa2\xd1\
-\x0e\xef\x6d\xeb\x10\xfc\xa4\x1f\x71\x28\x63\xca\xed\x96\x83\xa7\
-\xc1\xbb\xf5\x33\xfa\x69\x4c\xc7\x10\x71\x2e\x2a\xba\x4a\x39\xb6\
-\x6b\x9e\x1e\xcc\x56\xe2\xb4\xb4\xd0\x05\x92\x91\x57\x91\x4a\x9f\
-\x74\xb1\xe3\xcd\x56\xb2\xbe\xc5\x49\x88\x49\x2f\x87\xde\x43\x16\
-\xbb\x90\xab\x2b\xa8\xf6\x1b\xe6\xf7\x5b\xa6\xab\x29\xef\xf9\x88\
-\x2f\x1f\xf0\x70\x5c\x3b\x15\x6f\x16\x53\x9e\xf2\x8e\xbf\xcc\x73\
-\x1e\x87\x21\x3a\x81\x6b\xa4\xc1\x12\xf6\x1b\xf0\x07\x6f\x29\x77\
-\x39\xbe\xbc\x71\x39\x8b\x57\xfe\x8e\xe9\x27\xd8\x2b\xb9\x18\xf0\
-\xf3\xbb\x0d\x09\x70\xb3\x7c\xc3\x25\x4f\x79\x3f\x0e\x79\x01\xc4\
-\xdb\x15\xeb\x87\x0f\x61\x1e\x33\x1e\x6b\x54\x0d\x7b\xdd\xd3\x00\
-\x90\xb9\x6e\xa5\xc7\xf5\x42\x03\xfe\xb0\xf9\x08\x9b\x0a\x6f\x3c\
-\x64\xca\xd0\x2c\xe4\x12\x88\x77\xad\xd7\x8f\x99\x50\xb2\x3d\x62\
-\xe2\x8c\x7a\x68\x46\xdc\x8a\x6f\xde\x2d\xbf\x39\x2b\x27\x5c\x46\
-\x32\xb8\x38\x91\x21\x7a\xca\xbd\x19\x8a\x68\x27\xc5\x57\x06\xc0\
-\x56\xdf\x76\x8c\xab\x60\x59\xb6\x38\x1a\xb4\x6d\x17\x73\xba\x63\
-\xb9\xa7\x81\x2b\x22\xa2\x89\x7e\x97\x4d\xdf\xa3\xea\xc7\x8d\x22\
-\x89\x65\xdd\xd8\x2d\xe2\xaa\x7e\xec\x1a\x46\x6d\x17\xf3\xf1\x28\
-\x69\xd9\x3c\x81\x62\xc3\x33\xa6\x51\xec\xa8\xdf\xbf\x7e\xde\xcc\
-\x9c\x07\xad\x93\x14\xf8\x9e\x1d\xac\xa2\x8f\x1a\x4d\x26\x0e\x95\
-\x47\x89\x71\x30\x84\xce\x22\xe7\xa2\x72\x6c\x0c\xf5\xf4\xcc\x50\
-\x79\xa4\xd2\xd7\x67\x7f\x52\x7b\xf2\xeb\x65\xeb\x90\xbe\x10\x6b\
-\xed\x4a\x8c\xe6\x3c\x1c\x3f\xe4\xf9\xe8\x4b\xae\xae\x1e\x70\x3f\
-\xdd\x73\x58\x4d\x9d\xdc\xb0\x8c\x3d\xe9\xe5\x6c\xb3\x21\xe3\xa5\
-\x24\xbd\xdb\xf0\x2e\xcf\xf1\xb2\x77\x4e\x12\x74\x8b\x77\x7c\xef\
-\xef\x50\xd7\xef\xf8\xee\xf6\xc0\x72\x73\xc9\xcb\xd7\x6f\xa8\x6e\
-\xfc\x13\x29\x61\x59\xd8\xca\x95\xf4\x6e\xc3\x36\x1b\x72\xbd\x2f\
-\xc9\xff\xf6\x03\xdf\xbe\x3e\xb0\x54\x5b\x86\x1b\x7d\x62\x9d\xe1\
-\x24\x76\x00\xb6\x13\x36\xc9\x72\xd6\x8b\x8c\xf5\x6e\xc9\x7a\xb7\
-\x67\xbd\xdb\xb3\xc0\x67\xd8\xeb\x52\xf4\x04\x9d\xc1\x03\x3a\x8f\
-\x1e\x32\x9d\x0c\x0d\x6b\x1b\x2b\x2e\xcb\x5b\x91\xd0\x6d\xac\x65\
-\x8b\x8e\x61\x6a\x26\x3e\x2e\xd1\x5b\x39\x71\xd8\xdd\xe0\x4d\xf3\
-\x96\x7c\xb8\xde\xb5\xd7\x15\x5a\x13\x5b\x77\xca\x9e\x8b\xa5\x30\
-\x80\x16\x5a\x13\x7b\xe6\x84\x2c\xf6\x47\xde\x34\xaa\x6a\x59\xe0\
-\x9b\xfb\xda\x05\x85\x8e\xed\xac\x88\x74\xf0\xbc\xe5\xf3\x46\xda\
-\x23\x26\xaa\xbd\xe7\x28\xaa\xb4\x53\x71\xb6\x25\xa9\x2e\x26\xe3\
-\x3a\x38\x4c\x00\x47\x79\xad\xb3\x82\xfe\xd8\xa5\xd7\x8f\x38\xa4\
-\x81\x3e\x59\x49\x30\x45\x71\x40\x50\x19\xd0\x6a\xbf\x59\xdb\x75\
-\x95\x63\x61\xbb\x80\x13\xce\x58\x0e\x40\xe4\x46\x0f\x9f\x9f\x9e\
-\x99\x2e\x76\xac\xd3\x2d\x2f\x5f\xbf\xe1\xed\x3b\xa9\x0d\x9e\xd1\
-\x9c\xd9\x4a\x91\xaa\x0d\x4f\x2e\x1e\x33\x7b\xf0\x94\xd1\x2c\x24\
-\x7f\x1b\xd1\x79\x27\x39\x74\xdf\xd7\x3b\x9e\x7c\xcf\x62\x24\x60\
-\x35\x6d\x2d\x04\xc7\x4b\xc9\x96\x21\x64\x1a\x88\xd7\xfb\x12\x6e\
-\x7c\xbe\xbd\x5b\x91\x5c\x0c\xf8\xe1\xcd\xcf\x1d\x40\xcf\x31\x70\
-\x13\xcc\xcd\xeb\x3f\xc4\x92\x70\xf9\x96\xcd\x5d\x87\x95\xe8\x13\
-\xf7\x2e\x59\x54\xfa\x2c\x2a\xc1\x22\x33\x1d\x29\x99\xcb\x3b\xc7\
-\x41\x8f\x4d\xa8\xc9\x68\xc6\x84\x32\x5e\x31\x01\x7c\xae\xf4\x18\
-\xab\xc3\x52\x0f\x67\xc9\x72\x73\xb6\xd3\x94\xb7\x59\xc2\x73\x3c\
-\x37\x11\x6e\xb8\xf4\x60\x3c\x82\x65\x49\xe7\x51\x55\x47\x52\xdd\
-\x11\xae\x66\xe3\xe1\xa2\x03\x9d\xa7\x80\x96\x13\x57\xbd\xb6\xf9\
-\x19\x6f\x1e\x34\x18\xbc\x31\xb0\x51\x94\x28\x15\xe8\xb2\xb3\x88\
-\x22\xbc\x6d\xd9\x0a\xe8\x34\xcb\xc3\x75\xa5\xad\x6a\xb4\x14\xe9\
-\xdb\xce\x0f\x36\x80\x2b\x90\x6c\x81\x81\x99\xf8\x33\x28\x2a\xb2\
-\xc0\x73\x85\x0f\x3b\x7f\x4d\x7a\x99\xfe\x0c\x13\x78\x2f\x0c\x80\
-\xb7\x48\xfa\xca\x7c\x8a\x01\xef\xa7\x7b\xdd\xda\xee\x84\x12\x11\
-\xba\xe6\x56\x72\x6f\xd4\xdb\x71\x35\x4f\x9f\x0e\x2c\x72\xcc\x5a\
-\x11\xb3\xb3\xc3\x01\x8d\x26\xd6\x3a\x58\x5b\x6c\x42\x44\x4e\x07\
-\x5b\xe0\xef\xd5\x9e\x0f\xef\xaf\xf9\xe3\xbf\x0a\x98\xde\xbf\x61\
-\x5e\xcd\x99\xfa\x8a\x1f\x4a\xc1\xd4\x7f\x03\x7f\x03\xcf\x3f\x7f\
-\xca\x17\xc5\xd7\xdc\x5c\x96\x78\x79\x07\x5e\xb5\xff\xe4\x89\x1a\
-\xb2\x30\xec\xdd\x04\xb3\xf5\x94\xdf\xe5\x39\x95\xfa\xc0\x44\x0d\
-\x5b\xc0\xb4\xdb\xc5\x2e\x74\xaf\x59\x88\x35\xdc\x81\xbf\xbb\xe5\
-\xde\xec\x1c\x33\xde\x53\xf6\xf4\x2c\xb5\x67\xfb\x88\x6c\x59\xb0\
-\x7b\xbb\x64\x79\xb1\xa5\xea\xcc\x49\x3f\xe8\xf7\x19\x8f\xc7\xe6\
-\x7b\x89\xdd\xf9\xa8\x75\x37\x5d\x69\xec\xb8\x7b\xb0\x45\x8c\xf8\
-\x9e\x74\x65\xf3\x17\xd6\x17\xd6\x79\x8b\x60\xa7\xa0\x17\x39\x97\
-\x63\x3d\xae\x18\x2e\x4b\xaa\xe1\x86\x43\x36\xa2\x13\x17\x0e\xc0\
-\x3a\xca\x99\x02\x31\x5d\x21\xf4\x74\xa2\xe6\x02\x75\x97\xb7\x80\
-\x9c\x0d\x3e\x12\x96\xbf\xd6\x98\x2e\xea\xb9\x4e\x99\xd5\xfa\x4e\
-\x0f\xd9\xde\x42\x9d\x0b\x3e\xec\x5a\xb3\x82\x2d\x1b\x47\xad\x13\
-\x82\x73\x02\x78\x54\xed\xd5\xf6\x8f\x78\xb6\x5f\xc6\xee\xf5\x11\
-\xb8\xe1\x80\x7d\xd3\x7a\x14\x89\x8a\x3e\x7a\x28\x76\xdf\x76\xd4\
-\x99\xb3\x7c\x5a\xcb\x2c\xfa\x31\x36\x6e\x9e\x3d\xf4\x4c\x1f\xb5\
-\x70\x27\xe5\x3e\x75\x42\x9a\xd5\x3a\x65\xd8\xa1\xc9\xd0\x4d\x00\
-\x2b\xe5\xb1\x59\x6a\x16\x5e\xdf\xc2\xb3\xe1\x96\xde\x65\x40\x35\
-\xeb\x43\xf5\x88\x72\x5b\x70\xb7\xee\x30\x5f\x49\xfe\x8f\x3f\xff\
-\x53\x7e\xef\x5f\xfc\x3e\xdf\xfe\x6f\x7f\x42\xa5\x4e\x75\xde\xed\
-\xf2\x96\x19\xef\x5b\x00\x5e\xec\x42\x57\x14\x99\x7e\x78\x0d\xab\
-\x5a\xf9\xfa\xbb\x5b\x16\x62\xcd\xed\xf2\x16\x7f\x77\x5b\xdf\xb7\
-\x0b\x99\xad\x14\xb7\xcb\x5b\x6e\x24\xb0\x9a\x72\x90\xef\xdd\xe3\
-\x00\x3f\xcf\x3b\x5c\xef\x4b\xde\xa7\x1f\xd9\xdc\x7d\x44\xca\x1d\
-\x62\xdc\x65\x3c\xee\xba\x93\xa9\x0f\x27\x71\x3b\x58\x7f\x54\x81\
-\xb3\xb7\xab\x24\x35\xce\x86\xe4\xcd\xbb\x35\x2b\x33\xde\x3e\x0e\
-\x0a\x37\x99\x33\x37\x33\xde\x18\xfb\x78\x8d\x3c\xf1\x69\x97\x78\
-\x8d\xb3\x66\x69\xfd\x3c\x51\x95\x4e\x4e\x08\x2a\xe7\x13\x87\x61\
-\x04\xc3\x0a\xdf\xe6\x26\xb4\x7e\xd5\xa3\xa8\x2c\x38\x5d\xde\xb7\
-\xd1\x91\x71\x0c\xe0\xbe\x95\x00\x46\xd3\x7a\xdb\x86\x5d\xd5\x8f\
-\x29\x92\xf4\x44\x40\x44\x46\xe3\x44\x06\x84\x5b\x03\x58\xe9\xca\
-\xd3\xf5\x4e\x11\x35\x18\x59\x8a\x7a\x28\x9f\x2e\x8c\xf4\x5c\xce\
-\x58\x77\x36\x47\x35\x3b\x37\xec\x35\x7d\x52\x6e\x79\xb6\xdf\xaf\
-\x9e\x12\xd4\x5c\xc8\xb5\xf5\x70\x6e\xce\x46\xaa\xa4\xe2\xc3\xc7\
-\x90\xbf\xdc\xd4\x3e\xed\xa3\x6e\xc4\x7c\xf6\xcb\x78\xcf\x47\x5c\
-\x0c\x1e\xc0\x60\x82\x2f\xfe\x3e\x9b\xad\xe0\xc3\x12\xb6\xff\x77\
-\xca\xfb\x7d\xdb\xdb\xee\x44\x8f\xda\x00\x6d\x58\x74\x8b\x5d\xa8\
-\x01\x69\x80\x7d\xbb\xbc\xe5\x9e\x47\x1c\x6e\x14\x9d\x4b\xc1\x8d\
-\xd4\x92\xa4\xb9\x75\x55\xae\xf9\x37\xda\xf9\x90\x70\x3f\x12\x0e\
-\xc8\x5e\xf6\x8e\xf7\x66\xfe\xc7\xa3\xd0\x23\x16\x25\xc3\xde\xb8\
-\x35\xe8\xdb\xe9\xda\xc6\x22\x2d\xcd\xf4\x54\xcd\xd5\x5a\xb2\xde\
-\xed\xa9\xde\x0e\x59\xef\xf6\xb0\xd9\x13\xc6\xc2\x9d\xfd\x29\x2b\
-\x02\x86\x04\x24\xb1\x9e\x32\xf4\xe9\x4b\xbd\xb8\x6b\x4e\xa8\x1f\
-\x3e\x3c\xcf\xc2\x1f\x96\x6f\x19\x04\x17\xe4\xfb\xf3\xdd\xe4\x93\
-\xe9\x4c\x4f\x00\xa2\x15\x93\xdc\x9c\xd8\x5b\xda\xf6\x92\xad\x06\
-\xd1\xe3\x92\x71\xe1\x16\x5c\x7a\x12\x4f\x16\xf8\x66\x52\xbc\x96\
-\x17\x52\xaa\x76\x89\xc2\x02\xce\x16\x0f\x84\xce\x58\x34\x83\xe8\
-\xf2\x18\xf6\x8d\x94\x5c\x6d\xb3\xed\x1c\x08\x95\x63\x62\xd9\x38\
-\x97\x88\x57\x6f\x8f\x00\x9c\x37\x66\xac\x7d\xea\x62\x99\x3a\x37\
-\x9f\xbb\xbe\x97\x70\x78\xc3\x78\xa9\x6d\x35\x0b\xc6\xab\xce\xdf\
-\xf2\xa8\x1b\x39\x66\xfe\xc9\x8b\x9c\xe7\x83\xc7\x9a\xa5\xcf\x79\
-\xa0\x0d\xf0\xdd\x48\x98\xf1\x9e\x83\x7c\x4f\x27\x7a\xe4\x98\xf4\
-\x20\xf5\x7d\x97\x11\xf5\x7d\x37\xaa\xf1\x3b\xe8\x1c\xee\xee\xa6\
-\x70\x5b\x3f\x7a\x50\x7f\x86\x79\xae\x05\xf2\x68\xb5\xe3\x4d\xea\
-\xb1\x54\x5b\x53\x23\x50\xba\x7d\xc9\x53\x0c\x2b\x41\xd6\xf1\xf4\
-\x18\xd8\x5c\x32\x5f\xac\xdd\xe2\x2e\x0e\x0a\xe7\x64\x6c\x63\xc9\
-\xb0\xd7\x25\x9c\x8c\x18\x4e\x62\x9e\xf4\xea\xef\x74\x4d\x41\x90\
-\x05\x84\xc3\x01\x43\x82\xda\x1f\x3e\x26\x8d\x46\xa1\x62\xd3\xd1\
-\xad\xfd\xeb\xdb\x1a\xc0\xea\xf5\x77\xad\xc5\x9d\x5b\xd8\x99\x69\
-\xf6\xd6\x27\x46\x94\xae\x62\xd7\x3a\x19\x42\xdc\xe9\x59\x5b\xa0\
-\x96\x0a\x26\x0b\x61\x2f\x76\x8c\x6b\x33\x3f\x1c\xb4\xc6\x4e\xe9\
-\x05\x62\x91\x94\xce\xff\x2d\xa2\xaa\xb5\x23\x1c\x27\x3e\xb7\x4a\
-\xd1\x17\xa2\xa5\x7f\x23\x23\x31\x4e\xcb\xcd\xb4\x2a\x7c\xee\xac\
-\x49\xcd\x8e\x0e\x57\xe9\x10\x66\xc4\x54\xd5\xaa\xda\xb5\x98\x56\
-\x14\xc0\x96\x24\xeb\xb6\xc1\x7d\xec\x94\xd8\xe2\xcd\xad\x66\xc8\
-\xc5\x4e\x2f\xe8\x2e\x23\xe8\x5c\x8a\x16\x33\x03\xdc\x4f\xf7\x0e\
-\xd8\xf6\xbe\x73\x60\xb6\x40\x6e\xde\x6e\x5e\x9a\x4c\x6b\x19\xbd\
-\x94\x1f\xb9\x09\xfa\xad\xfb\x7b\x97\xc1\x09\xe3\xdf\x48\x28\x7b\
-\x0f\xd9\x66\x43\xfe\x62\x71\x8d\xc8\x7f\x41\x55\x4d\x11\x87\xc8\
-\xb5\x28\x59\x40\xeb\xef\xcc\x1c\x8d\x62\x41\x1c\x14\x3a\xaa\x19\
-\x46\xae\x48\x72\x35\xe9\xd6\x7e\x72\x83\xb1\xe3\xa0\xd0\xc5\x8e\
-\xd8\x33\x1e\xb3\xe0\x90\x05\x7a\x56\xdb\x27\xba\x43\x40\x37\xa5\
-\xde\x2d\x17\x6e\x41\x77\xbd\xcb\x59\x5c\x3e\x6f\xb1\xb1\xb3\xd8\
-\xcc\x6f\x6a\x7d\x62\xd7\xd9\xe1\x98\xb8\x59\xac\x50\x52\x83\xb0\
-\xb1\xb8\xeb\x9b\xd6\x9b\xe2\xf8\x7c\x1e\xa2\x72\x9a\xb8\x99\x47\
-\xab\xfa\x5e\xad\x8f\x1b\x92\x44\x36\xb4\xae\x34\xe0\x75\x5a\xf8\
-\xa8\x25\xc8\xb9\x18\x6a\x61\x2a\x72\xf2\x13\xba\xf8\x4c\x19\xda\
-\x4a\x04\x25\x99\x05\x5d\xed\x3e\x28\x69\x16\x7f\x38\x76\xdd\x39\
-\x9d\xd6\x27\x8d\xf7\x27\x72\xa2\x09\xea\x7b\x29\xf9\xf0\xfe\xda\
-\x49\x89\x83\x7c\xcf\xeb\x1f\x16\xbc\x9f\x7f\x6c\x31\x64\x13\xcc\
-\x16\x54\x96\x2d\x8f\x41\x66\x6f\x37\xc1\xb9\xbb\x29\x78\xbf\x97\
-\x6e\x5b\xca\x8f\x6e\x3b\x9b\x77\xdd\x73\xed\xf5\xe6\x4e\x62\x3f\
-\xd3\xb2\xb4\x95\x28\x76\x81\xb7\xbd\xa9\x48\x8b\x1d\xf3\x62\xa7\
-\x4f\x24\x49\xe6\x66\x28\x5b\x67\x22\xeb\x78\x9a\x6d\x2d\x78\xe3\
-\xd0\x69\xe3\x34\xd3\xe0\xb5\xb7\x8b\x58\x83\xb7\x79\x5e\x11\x9d\
-\x5b\x6e\x58\x94\xe5\x4a\x77\xff\x64\x01\x90\x11\x64\xca\x1c\x21\
-\x33\x3a\xbd\xcb\xb3\x0b\xba\x0f\x4b\xdd\xb0\xf4\xd9\xf8\x09\x9b\
-\xe2\xae\xdd\x63\xd7\xc8\x61\x58\xb9\xe8\xdb\x1f\xdc\x95\x7a\x85\
-\x96\x04\xc1\xd1\x02\x6f\x6b\x40\xe9\xce\x9a\x74\xd4\x56\xa4\xdf\
-\xa7\x1d\x75\xdf\x1a\x95\xdb\x5c\x00\xda\xfb\x11\x95\x5b\xdc\x6d\
-\x1b\x8b\xb4\x02\xc9\x20\xfc\x8e\x87\xe1\x77\x5c\xc9\x3f\xe0\xaa\
-\xfa\x23\xbd\x95\x7f\xc0\x17\xf2\x0f\xce\x80\xb6\xbd\x60\xd3\x80\
-\xf5\x98\x65\x26\x8c\x53\xec\x48\xb2\xae\xfe\xe2\xcc\xde\x9c\x8b\
-\x8a\xb0\xb5\x43\xd4\x4c\x7c\x96\x8d\x8f\x80\x6d\x19\xd3\xbb\xdf\
-\x72\x58\x4d\xb9\xbe\xfe\x78\x02\x9e\x26\x2b\xf7\x2e\x83\xd6\x6d\
-\x0b\x44\x0b\xba\x47\xdd\x88\xdd\x4d\xc1\x61\x35\x75\x0c\x0e\x70\
-\x59\x6c\xf1\xa3\x07\xcc\xe6\x5d\x6e\x82\x3e\x9d\xd1\xdc\x5d\xff\
-\x14\xc3\x3f\xea\x46\x2d\x59\x71\x69\x9e\xf2\x43\x57\x7f\xe6\xc7\
-\x77\x5b\xd4\x72\x6e\x16\xad\x71\x6b\x01\x1c\x86\x91\x9b\x2c\xe4\
-\x16\x79\x59\xee\x0a\x1f\x55\x92\xb6\x16\x7b\x36\xe1\x36\x24\x30\
-\x27\x82\x84\xf5\xe6\x70\x32\x4a\x20\xc8\xb4\xbc\x50\x24\x0d\x99\
-\x11\xbb\x93\xd6\x58\x26\x6e\x82\xf7\x7a\x97\x13\xa8\x57\xec\xb3\
-\x69\x5b\x13\x1f\x9f\x17\x05\x08\x2d\x70\x20\x72\xbe\x6e\x3d\x0c\
-\xbb\x06\x68\xdf\x36\x6c\x46\xed\x2f\x4e\xdb\x64\xb5\x08\xd0\x0f\
-\x6b\xef\x37\x10\xc2\xcc\x1f\xae\x08\x54\xd4\x38\xac\xdb\x05\x9d\
-\xb6\xd9\xfa\x4a\x4b\x87\xad\x52\x7c\x5d\xfd\x11\xdf\x7f\xf7\x03\
-\xbf\xc6\x3f\x6f\x7d\xce\xe8\x57\x61\xf5\x6f\xe1\xea\x19\xcc\x57\
-\x5f\xb1\x0f\x3f\xd3\x96\x9a\xeb\xb9\x33\x21\x24\xa1\x13\x77\xf3\
-\xed\x1c\xdf\x4c\x90\xdf\x99\xf3\x8e\x1e\x33\x71\xcb\xff\x8d\xf7\
-\x66\xf4\x95\x70\xe5\x66\xcb\xca\x12\x49\x59\x64\xac\x6f\xe1\x71\
-\x18\xf2\xd6\x68\xd7\x6a\xd6\x67\x7e\x3f\x67\xea\x4d\x99\xdf\xcf\
-\x39\x78\x53\x3a\x68\x20\xdf\x04\xfd\x13\x90\x59\x0d\xfd\x88\xf7\
-\x0e\xcc\xb3\x79\x97\xf7\x53\xc9\xe5\x68\xcb\x4d\xd0\x77\xb7\x67\
-\x68\xb0\x5e\xca\x8f\xdc\x4f\xfb\x06\xf0\x30\x6b\xec\x0c\xcd\xf7\
-\x3d\x27\x45\xac\xa4\x78\x68\x54\xe2\x7b\x15\xf2\x2b\x71\xce\x78\
-\x3c\xd5\xa3\x18\x7a\x42\xcf\x76\x43\xb9\x59\x16\xf1\xa1\x22\x18\
-\x95\x78\x69\x52\x4b\x06\x03\xe6\x7e\x95\xd4\x21\xa2\x58\xe7\x62\
-\xc8\x20\xcf\xb7\x4c\xb3\xbe\xcb\x2b\xbb\x35\x85\x3f\x72\x92\x42\
-\x19\x3d\x6c\x2d\x36\x45\xd2\x38\x93\x93\x61\x62\x03\xde\x0f\xcb\
-\xb7\x5c\x8d\x9f\xf0\x76\xf7\x84\x17\xf1\xfc\x14\xc0\x26\x47\xe1\
-\x02\x41\x91\xd0\x91\xca\xed\x51\x91\xa3\xa5\x1f\x0d\xe0\xa4\x39\
-\x31\xe3\xb1\x47\xdb\x5c\x74\xe9\xbe\xbc\xa8\x15\xce\x29\x8c\x2e\
-\x2d\x94\x02\xe5\x11\x08\xd1\xf0\x89\x8d\x3b\x61\x98\x7e\xfe\xb1\
-\x38\x01\x30\x68\x00\x03\x24\x3f\xfc\x2e\xcb\xd5\xff\x4e\x37\xfb\
-\x43\xae\xaa\x3f\xa2\x77\xfb\xaf\xb8\x92\x7f\xa0\x65\x07\x92\x37\
-\xd7\xd7\x2c\xae\xaf\x5d\xa2\xae\xea\x7b\x2e\x5c\x6f\x83\xf1\x16\
-\xc0\xa1\x68\x9f\x69\x5e\x34\x0a\x21\xb9\xf2\x50\x4a\x91\x1b\xf6\
-\xbe\x5b\xea\x0a\xdd\xbb\x3c\x77\x8b\xba\x47\xdd\x88\xab\xab\x07\
-\x6e\x41\xd7\xbb\x0c\x9c\x56\xfd\x14\xd0\xec\x02\xce\x3e\xc7\x32\
-\xef\x61\xd5\x2e\x26\x77\x46\x73\x2e\x8b\x1a\xd8\x56\x4e\x58\x56\
-\xb7\x2c\xdb\x89\x1e\x69\xbb\xee\x13\x97\xcb\xa8\x5e\xdc\x7d\x36\
-\x7e\x42\x34\x11\xf8\xa2\x64\x1a\xf4\x18\xe4\xa9\x1b\x4e\x68\xe7\
-\x23\x03\x1a\xc0\x86\x79\x01\x2a\x4f\x03\x71\xeb\xa5\xee\xfe\xe6\
-\x49\xd6\xed\xc2\xae\x5e\x8d\xed\x9d\x94\x68\x6e\x15\x89\x91\x13\
-\x89\x73\x27\xe6\xe6\x24\xe7\x96\x89\x7d\x79\xe3\x98\x78\x72\xf3\
-\xba\xd6\xc4\x67\x2a\xb6\xd8\x28\xa6\x34\x4c\x1c\x34\x67\x12\x5b\
-\xa0\xba\xd3\xde\x4a\xe3\xe1\xd2\x6e\xf8\xb4\xaf\x55\xb5\x7b\x10\
-\x99\x96\x7f\xf7\x9e\x06\xb4\xf5\xb6\x7d\x98\x8e\x44\xc5\x42\xbe\
-\xe7\x4a\xea\x39\x0c\xf3\xee\xbf\xc7\xe8\xcb\x1a\xb4\x2d\xcd\xfe\
-\x52\x11\xbf\x10\x7c\xf9\xf2\x7f\x21\x7e\x21\xe0\x07\x13\x50\xf9\
-\x01\xbe\xe2\x77\x79\x13\xfd\xb7\x26\xe0\x08\x1f\xd7\x01\xdd\x87\
-\xbf\xc9\x58\x3c\xaa\xa7\x55\x9e\xe9\xf0\x68\xc6\x32\xed\x8e\x9b\
-\x2b\xcf\x65\x34\x6e\x17\x92\xb7\x77\x8a\x97\x6f\xdb\x83\xfb\x26\
-\xbd\xdc\x55\xde\x00\x9e\x9b\xaf\xef\x37\xa2\xf7\xdc\xf3\xa5\x73\
-\x16\xee\x47\x82\xd9\x4a\x71\x3f\x9a\xf3\xb0\xf7\x90\x85\x58\x73\
-\xb8\x79\xdf\x3a\xfc\xef\x6e\x0a\xee\xa7\x7b\xb7\x20\x9c\xcd\xbb\
-\xdc\x4c\xfb\x78\xf7\x5b\x2e\xc7\x5b\x6e\xa6\x7d\xa0\xcf\xcc\xb0\
-\xf7\x65\xa1\xff\x96\xf7\x12\x6e\x02\x3d\x69\xbd\x33\x14\x1c\x56\
-\x53\x7a\x97\x81\x4b\xd0\xe9\xfc\x59\x0d\xf2\x40\xbd\xc2\xdb\x3e\
-\x61\xb7\x93\x94\xbd\xb8\x35\x03\x19\x30\xed\x4c\x0d\x26\xad\x46\
-\x3a\xee\x64\x40\xdd\xdc\xda\xa2\x87\x1d\x45\x8b\xe9\x14\xc9\x73\
-\x09\x9b\x3d\x6b\x0a\x06\xe8\xb1\xb3\x76\x7e\xb2\x3d\x4f\x88\x6d\
-\x2a\x3d\x89\x70\x46\x97\x4e\x13\x5f\x8d\x9f\xf0\x61\xd4\xab\xa3\
-\x98\x67\x4a\xd7\xee\x77\x44\x08\x02\x75\x6c\x7f\x09\xe7\x32\x64\
-\x52\x21\xa9\x4f\xba\x58\x34\x7c\xe4\xbe\x10\xe6\x40\x6d\x2b\x6b\
-\x5a\x46\x38\x96\xc5\x04\x77\x94\x4e\x95\x79\x32\x23\x2a\x04\x15\
-\x86\x7d\x8d\x84\x78\xd6\x81\xe4\xbb\xdf\xd5\x9f\xf1\xec\x9f\x38\
-\x00\x5b\x09\x61\xc1\x6b\x81\x7c\x0c\x6a\xbb\x7d\x2a\xff\x7b\xf7\
-\xf8\xf2\xc5\x7f\xc5\x68\xf7\x15\x8a\x47\xda\xa5\x68\xe9\x66\xdd\
-\x8a\xe4\xe6\xa6\x19\x0f\xd9\xc9\x0d\xa5\xe8\x89\x29\xd1\xa3\x29\
-\xdd\xf9\x8a\x57\x7f\xfd\x3d\xa3\xfb\x25\xf7\xa6\x3c\xdc\xac\xbc\
-\xd1\xcb\x5d\xe5\xed\x20\xdf\xa3\x55\xde\x7b\xae\xaf\x3f\xf2\x6e\
-\x5b\xe0\xf7\x03\x0e\x57\x0f\xb8\x44\x11\x4f\x60\xd9\xfd\x8c\xce\
-\xe5\x07\x58\x4d\x79\xbd\xfa\xce\xb1\xb1\x5d\xac\x35\x81\xdc\x19\
-\xe3\x98\xb8\x33\x9a\x73\x33\xed\xb7\x00\x0e\x50\x6d\x57\xcc\xfb\
-\x02\x96\x50\xcd\xf6\xcc\x6e\xba\xf4\x2e\x1f\x38\x16\xbe\x91\xef\
-\xb9\xbf\x14\x4e\xfd\xce\xc6\x25\x1d\xff\x0e\x8f\x08\x3d\xc5\x2a\
-\x26\x0c\x23\x27\x25\xf4\x64\x7a\x13\x5e\x7f\xd7\x67\xc9\x9a\xe1\
-\xa0\x43\x18\x46\x0c\xca\x2d\x8b\x55\xc1\x6a\xb9\xe1\xbb\xa5\xc7\
-\x78\x5c\xb1\xac\x0a\xc6\x5e\xe0\xba\xf3\x96\x4b\x8f\x07\x55\xc5\
-\x43\x42\x16\x14\x84\xf3\x94\xce\x68\xe8\xf4\x73\x1d\x28\xcb\x5a\
-\x79\xe4\xeb\xa3\xa0\xd3\xb1\x3b\x51\xf7\x4c\xc6\x6d\x30\xaf\x3d\
-\xfc\x63\x8a\xce\xf0\x35\x90\x27\x3a\x3e\xe9\xca\xcd\x51\xbd\xea\
-\xb7\x20\x95\x8d\xa0\x4e\xd4\x00\x30\xc6\x3b\x8e\x1a\xa7\x24\x00\
-\x5c\x20\x9e\x46\xd8\xa7\x0f\x6c\xf2\x47\xfc\xe9\xb3\x7f\xca\xe8\
-\x57\xe1\xd1\xf0\x77\x4f\x24\x44\x13\xa8\xe7\xc0\xdc\xbc\x6d\x1f\
-\xff\x35\xfe\x39\xd3\xd1\xb7\x34\xcf\x34\xda\x3e\x12\x79\x47\xb7\
-\xdb\xef\xf7\xd3\xab\x47\xfc\xd2\xc3\x2f\xf8\x8d\x5f\xfa\x75\x7e\
-\xe7\x77\xfe\x4b\x56\xb3\x90\x77\x79\x4e\x3f\x5e\xb7\x42\x3f\x00\
-\x4f\x7d\x78\xf2\x38\xe2\xdf\xff\xb5\xdf\xe6\xeb\xdf\xfe\x4f\x98\
-\x7e\xfe\x9f\xf2\x1f\xfd\xce\xef\xf0\xdb\xff\xdd\x7f\xc3\xb3\x2f\
-\x7e\xc6\xdf\xbe\x0c\xf9\xc3\x9f\x87\x7c\xff\x5e\x31\x5e\x4a\x3c\
-\xf1\x59\x4b\x72\x58\x66\xb5\x60\x76\x7a\x36\xe8\x73\x59\x6c\x5d\
-\x88\xc8\x5e\x9f\xcd\xbb\x54\xb3\x3e\x53\x6f\x8a\xdf\xd7\x00\x9a\
-\x7a\xd3\x13\x0f\xf9\x9e\x47\x3c\x1c\x3f\x74\xe5\x6b\xfd\x47\x57\
-\xf4\x47\x5f\xe9\xe7\xa9\xbe\x9e\xef\xb6\x5b\x12\xcf\x77\xac\x37\
-\x07\x0e\x1f\xef\x79\xfd\xc3\x2d\xab\x37\xf7\xbc\x5c\x7c\xcf\x76\
-\x7f\x07\x1b\xed\x1f\x6f\xfc\x3e\x6b\x3c\x96\x4b\x8f\xd2\x68\x7f\
-\x7b\x26\xd0\x65\x55\xb0\x5c\x7a\x1c\xe6\x4b\x3e\x7a\xfa\xbb\x9d\
-\x8c\xf4\xdf\x76\x58\x79\x14\x71\x61\x1c\x8a\x76\xcf\x9e\x23\x84\
-\x9b\xd7\x94\xd1\x25\x65\x74\xc9\xe4\xe6\xb5\xf3\x8a\xad\x4f\x2c\
-\x5a\xf6\x5c\xe6\x16\x8c\x7a\x8c\x55\x53\xdb\x02\x3d\x95\x91\x89\
-\x18\x5f\x35\xa6\xfb\x98\x98\x64\x60\x9e\x13\x08\x71\x54\xf6\xad\
-\x90\xaa\x06\x70\x20\x84\x9b\xa1\x66\x27\xf8\xc4\x45\xd5\x2a\x61\
-\x7b\xdb\x0a\xb6\xd2\x55\xf6\x22\x35\xe1\x3d\xff\x84\x47\xc3\xdf\
-\x75\x0c\x7c\x8e\x71\xdd\xc2\xf9\x08\xcc\xf6\xf6\xf1\xf5\x41\xfe\
-\x3d\x9b\xfc\x57\x8d\x8f\x6c\x22\x97\x94\x27\x76\x9d\x95\x1b\x5b\
-\xb5\x60\xb0\x6d\x3f\xf6\x60\x1c\xf0\x54\x5c\xf1\xea\xc3\xcf\xd9\
-\xf6\x86\x75\xeb\x51\xfc\x18\xfa\x70\xd9\x1d\x21\xfe\x2e\x7c\xfd\
-\xac\x47\x67\xf6\x80\xc7\x0f\xea\x91\xa4\x6f\xff\xf3\xff\x9a\x5f\
-\x7c\xf3\xcf\xf8\x97\xbf\xf7\x27\xfc\x3f\x3f\xbf\xe5\x5d\xfe\x97\
-\x3c\xfe\xfa\x92\x87\xe3\x87\x2c\x46\x82\xc3\x8d\x72\x8b\x40\x2b\
-\x2b\x66\x8b\x3b\xee\xa7\x17\x8e\x75\x67\xf3\x2e\xf7\xd3\x3d\x97\
-\x05\xee\xba\x77\xbf\xe5\x7e\xa6\x65\x86\xd6\xce\x7b\xed\x66\x5c\
-\x3e\x00\x1e\x98\x00\xcf\x7b\x6e\x96\xf0\x70\xfc\x90\xcf\x86\x07\
-\xde\xab\x90\x17\xc5\x1d\xd5\xeb\x19\xde\xf2\x9e\xc5\x66\x06\xa3\
-\x1c\x56\x21\x25\x1f\xb9\x9e\xc3\xd5\x14\xa6\xe3\x0b\x18\x78\x3c\
-\x0f\xc6\x30\xe8\xba\x12\x6f\x9e\x4b\xa6\x93\x21\x17\x93\x17\x6e\
-\x42\xd0\x33\xcb\xf0\xe6\xc4\x8f\xeb\xdd\x03\xe2\x4c\xa2\x26\x5a\
-\x72\x0c\x67\x03\x9d\x68\xdb\x6e\x29\xfa\xfd\x86\xab\xd1\xee\x0c\
-\x59\x5c\x3e\x67\x7d\x0b\xcf\xcb\xd7\xce\x2b\x56\x37\xbb\xb6\x26\
-\x76\x85\x12\x9d\xc3\xe8\xc4\x45\x7d\xf6\x24\x0b\x60\xcb\xb0\xb1\
-\xd2\xfe\x6f\xd1\x00\x6c\xa0\xa2\xf3\xb6\x93\xd5\xc2\x8d\x60\x50\
-\x64\x16\x82\x36\x47\xe1\x6d\x2b\xb2\xc3\x0e\x2f\xa8\xf0\xb6\xc6\
-\x37\x6e\xb4\x2a\x79\xdb\x8c\xbc\x1f\xf1\x0b\xfe\x21\xac\x39\x01\
-\xb2\x05\x65\x13\x9c\x4d\xf0\x66\x2f\x55\x4b\x72\xb8\x7d\xfd\x87\
-\xdf\x65\xfb\xe5\x3f\x25\x1c\x97\xe4\x4b\x0f\xc4\xe9\x79\x3b\x74\
-\xdf\x5d\xec\x5c\x8e\x3e\x11\x1f\x56\xaf\xd8\x7a\xb7\x88\x43\x42\
-\xd5\x19\x51\x36\xce\x67\xb1\x10\x6b\x9e\xfa\x75\x4b\xd0\xcd\x34\
-\x87\xb9\x8f\xff\x2a\x60\xf9\x17\xff\x8a\xde\xd5\x13\x66\x2f\x4a\
-\x61\xbb\xb5\x57\x00\x00\x20\x00\x49\x44\x41\x54\xae\xa2\xa7\x8c\
-\x7e\xeb\xa7\x5c\x7c\xf9\x1d\xbf\xfe\xe2\x1f\xf1\xd5\x97\xff\x90\
-\x3f\xf9\x9f\xff\x57\xfe\xa7\x7f\xf6\x47\xbc\xfb\xc5\x5b\xf8\xfa\
-\xd4\x53\xbe\x1c\x6d\x99\xcd\xa7\x0e\xc0\x96\x99\xf5\x22\xcf\x30\
-\xf3\x68\xce\x6c\x3e\xa5\x33\x06\xcc\xc2\xaf\x66\xf5\x48\xeb\x70\
-\xf4\x22\xf2\x9e\x47\x5c\x46\xef\x29\x81\x9b\xfc\x73\x7e\x63\xb5\
-\xe3\xe3\xea\x5b\xf6\xd9\x94\x0f\xd5\x82\x08\xf8\xdc\x9b\xc2\xb8\
-\xc2\x1b\x7f\xc1\x97\x9f\x4f\xd8\xc6\x92\x7e\x16\xb5\x86\x77\x5b\
-\x00\xd7\xdb\xfb\x56\xe3\x28\xe8\x89\x43\xd5\x62\x0d\x4c\x58\xa3\
-\x98\x02\xfb\xed\x96\x43\xe5\xd1\x5d\x0f\x5c\x34\xd3\xfa\xcb\x82\
-\x98\x45\x26\x98\xfa\x35\x61\x0c\x1f\xc2\x4a\xf6\xb4\xac\xe8\x3d\
-\x61\x75\xa4\x89\x2d\x1b\x37\xab\x7e\x49\xbf\xa3\xe7\x4e\xf4\x1b\
-\x3e\x30\x4a\x9a\x74\x9a\x6e\x51\xda\x2a\xe9\xdc\x04\x17\x8a\x57\
-\xb2\x66\xe3\x46\x7a\x8d\x08\xe7\x74\x1c\x07\x81\xe2\x4e\x0f\x0a\
-\x5c\x27\x47\x9f\x08\x5b\xc7\x8b\x44\x45\xa0\x3c\x54\xf5\xdd\x59\
-\x5b\xed\xac\xd5\xf6\x5f\x88\x13\x90\x1f\x3f\x0f\x20\x5d\x7f\xcf\
-\x46\xfd\x8a\x61\x5a\x6b\xb5\x35\xcf\x2b\x12\x21\x54\x66\x66\xbb\
-\xd5\xc2\x63\xf1\xcd\x77\x4c\xff\xf1\x18\x8a\x05\xf3\x72\xc4\xcb\
-\x6f\xff\x98\xff\x97\xb1\x37\x0b\x92\xe5\xbe\xce\xfc\x7e\xb9\x55\
-\x65\x66\x65\xd6\xd6\xdd\xb7\xb7\xdb\xb7\xef\x0a\x10\x0b\x09\x82\
-\x94\x48\x88\x04\x29\x8a\xa3\x65\x28\x5b\x33\xf6\x84\x2d\xc6\x48\
-\xb2\x3c\x96\x46\xa1\xa7\x79\x72\xf8\xc1\x0f\x8e\x90\xdf\xec\x07\
-\xdb\x31\xe1\x07\x4d\x8c\x6c\x86\x56\xca\xb2\x3d\x5a\x47\xa4\x16\
-\x8b\x82\x28\x40\x24\x38\x20\x81\x0b\x5c\x2c\xbc\x6b\xef\xcb\xed\
-\xee\xda\x32\x2b\x33\xab\x72\xf3\xc3\x3f\xf3\x5f\x59\xdd\x17\xd2\
-\x54\x44\x47\xd6\xd2\x6b\xf5\xc9\x93\xdf\xf9\xce\x77\xbe\xe3\x3f\
-\xda\x65\xe3\x23\xab\x60\x8f\xc8\xed\x75\x8e\xba\x09\xf9\x91\xca\
-\x51\xb0\x4b\xf0\x28\x12\x8d\x8f\x91\x98\xce\x78\xf9\xda\x0a\xcf\
-\xbc\xb7\xcf\xb5\xa7\x6f\xd1\xf8\x44\x9d\x1f\x7b\xe1\xa3\x5c\xb9\
-\xfc\x4f\x68\xae\x6f\xf0\x6f\x7e\xf5\x77\x99\x1c\x4d\x2e\x74\xd9\
-\x54\x6b\x09\x86\xa9\xc8\xac\x5d\x47\x64\xe4\xce\xa2\xe4\x8f\x4b\
-\xb6\x62\xa5\xd5\x93\x70\x43\x7e\x5d\xb5\x4b\x17\xde\x46\xb5\x96\
-\x04\xed\x56\xfc\x1b\x94\x60\x1f\xea\xab\x2c\xb5\x6e\xf2\xfc\xad\
-\x9b\x1c\x6a\x53\x1a\x76\x1d\x2f\xd0\x64\x61\x97\xe1\x63\x43\x61\
-\xa2\xf2\x84\x2e\xa3\xad\xa3\x07\xc5\x4e\xbd\x71\x63\xee\xd8\x19\
-\x37\xd8\x56\x73\x94\xe8\xf0\x9c\xcd\x17\x4c\x73\x9f\x86\xe3\xc8\
-\xa6\x47\x6a\xa7\x44\x04\x58\xb6\x22\xd9\x89\xce\xd1\x36\xc3\x56\
-\x9d\x81\xb7\x42\xf3\x92\x28\xee\x5a\xc3\x59\x26\x8e\x0b\xae\xd9\
-\xac\x64\xe3\x88\x40\xe8\x89\xb5\x50\xc1\x2f\xf8\x61\xdf\x0a\x71\
-\xfd\x1c\x4d\x53\x29\x5d\x1b\x34\x14\x52\x22\xe2\x02\xf5\x36\x8b\
-\xc9\x8f\x38\x12\xba\xe2\x18\x4b\x2c\x65\xac\x32\x18\x73\x10\x25\
-\xac\x74\xf1\x66\xca\x63\xbf\x38\x6a\x58\xf4\xcb\xd5\x04\xe1\x3c\
-\x26\xae\x06\x63\x15\x23\x97\xcf\x3d\x29\xc8\xcf\x7f\xae\x7f\xe3\
-\x7a\xa5\x30\xb0\x3e\x24\x13\x2b\x17\x5c\x95\xde\x1b\x9d\x31\x79\
-\xf3\xeb\xd4\x59\xe6\xbb\x5b\x31\x7b\xfb\xe1\x1c\xbd\x05\xc0\xc3\
-\x43\xc2\x7e\x24\x33\x5f\x3c\xec\x62\xb4\x7a\xc4\xa3\x88\xdf\xfa\
-\xee\x5b\xb4\xde\x7a\xc4\x0f\x5c\x49\x78\xf9\xc5\x4f\x30\xfe\xcc\
-\xdb\x98\x9f\xfb\x29\x9e\xfb\xe2\x02\x3f\xb3\xff\x32\xaf\xfd\xe5\
-\x5f\x31\x39\x4a\x59\x5b\xb1\x24\x5f\x9c\xb5\x04\x27\xac\x9c\xc1\
-\x4a\xdb\x27\xce\xd7\x80\xe9\x5c\x26\x5e\xe8\xd5\xa0\x35\xc3\xcb\
-\x47\x9a\x23\xdb\xd0\x2b\xa9\x5f\xfc\x0e\x48\x86\xa2\xca\x13\xbf\
-\xd9\x3f\xa4\xf1\x7d\x0d\x77\x71\x49\x0e\x8f\xaa\x40\x69\x53\x6c\
-\xc6\x16\x91\x51\xe8\x4f\x8a\xd6\x74\xd9\x8d\xd3\x5a\x19\x8c\x93\
-\x0b\x2c\x45\x79\x1c\x4d\xa6\x24\x67\x03\x0c\x16\xe9\x2e\xa8\xb8\
-\xc5\x82\x1b\x9f\x84\x4e\x4b\x63\xea\xfb\xe0\x38\x73\xf0\xad\xdf\
-\x33\xa9\x0d\x4f\x24\x9c\x10\x93\x21\x47\xb4\x8e\x26\x98\x9b\x37\
-\x38\x66\x4f\x66\xe2\xb2\x59\x22\x5c\x87\x02\x4c\x02\x89\x89\xd5\
-\x52\x2f\x6c\x15\x81\x7c\x5e\x7a\x59\xbe\x1e\x9e\x2b\x8e\xc2\x22\
-\x80\x0d\x42\x01\x43\x42\x85\xf3\xdb\x23\x7c\x19\xac\x52\x0d\x21\
-\x77\x52\x68\xa6\x39\x73\xdb\xac\x60\xf2\x57\xef\x7c\xe9\x43\x39\
-\xcf\x6a\x40\x97\xb7\x77\xf8\xd2\x85\xe7\x5b\xcf\xc3\xf8\xca\x2f\
-\x33\xbe\xf2\xcb\xc4\xfa\x73\xe8\xd2\x15\xe8\x09\x05\x5e\xa1\xa8\
-\x22\x0a\xa5\xb7\x45\x58\xec\x50\xf6\x92\x35\x72\xb7\xcb\xc9\x83\
-\x37\xd9\x1e\x3e\xb8\xd0\x91\xdb\xcd\x90\x6a\xb2\xb9\x6c\x0a\xb4\
-\xda\x57\xe9\xb6\x2c\x1e\x0e\x5d\xde\xf9\x46\xca\x5f\xbc\xb6\xcd\
-\x5f\xfe\xc5\xd7\x98\xf6\xde\xa7\xfb\x42\x1b\xe7\xda\x06\xdb\x61\
-\x9d\x2c\x3c\x91\x05\x5b\xc9\x50\x2c\x17\xac\x44\x2f\xef\xcd\x15\
-\x79\x25\x4b\x51\x16\x79\xe5\x73\xc7\x83\x59\xf7\xf0\xac\x3b\xe5\
-\x78\x30\xfb\x3d\x56\x2c\x81\xdf\xfd\x60\x56\xdc\x79\xa7\x27\x74\
-\xe2\xc2\x6d\xa7\x68\x3b\x97\x41\x0b\xe0\xe4\x5d\x19\xbc\x25\x0f\
-\xac\x8c\x05\x7d\x56\xed\xc6\x95\x8f\x47\x93\x01\x83\xc1\x00\x86\
-\x3a\x6b\x9d\x84\x8e\x9a\x12\x0f\x15\xfa\xc3\x74\xae\xf1\x51\xe5\
-\x93\xcb\x42\x7a\xda\x5a\x92\x9a\x94\xce\xd1\x36\x03\x6f\x85\xfe\
-\xca\x26\x87\x93\x84\xd6\x70\x32\x47\xa7\x09\x8e\x79\xe6\xad\x37\
-\x8f\x89\x0b\x3c\x6b\x59\x39\xfd\x92\x22\x2b\xe9\xb4\xbe\xe8\x82\
-\x35\x11\x6b\xa6\x47\xe7\xa4\x38\x71\xa8\x88\xe5\xe6\x73\x19\x78\
-\x9e\x0f\x08\xe2\x09\x16\xb6\x80\x29\xc5\x66\xa4\xb9\x56\x6e\x81\
-\xa1\xaf\x18\xf0\xf5\xec\xaf\x78\x99\x7f\xf8\x36\xbc\x23\x82\xb5\
-\x6c\x8c\x54\xb3\xf2\x9d\x07\xff\x92\xda\xda\x75\x3c\xbd\xc0\x52\
-\x91\x52\x09\xe0\xb0\xe8\x4f\xce\xae\x0a\x22\x13\xe7\x33\x2f\x37\
-\x60\x6b\x3f\x00\x8e\xf1\x81\x81\xb7\x22\x03\xb4\x64\x27\xf6\xfc\
-\x7d\x16\x86\x11\x47\x15\x46\xc0\x68\xc1\xe4\x68\x86\x69\x8d\xa6\
-\x08\xc2\x3b\x1c\xb0\xb6\xbd\xc4\x35\x1e\x72\x7a\x3b\xe1\x7e\x07\
-\x94\x65\x03\xf7\xe1\x61\x51\xbd\x77\x61\x8e\x27\x16\x8f\x97\xdb\
-\x70\x7c\xe6\x73\xb4\xe0\x54\x20\x46\x54\x14\x76\xb0\xa0\x9e\xd2\
-\xcb\x4d\xd1\x31\xcc\x7b\xb2\xe0\x5b\x6e\xcf\x32\xf1\x59\xcb\x24\
-\x0b\x9a\xf2\xf7\xbe\x7f\xa4\x70\xed\x69\xe8\x3f\x36\x20\x0c\x51\
-\x34\x17\x02\x95\x49\x2a\x7e\x57\x45\x73\x19\xd9\x03\x6c\xad\x2e\
-\xdb\xc8\xfe\xd4\xa3\x11\x4c\xc1\x15\xef\xcd\xd8\x50\x69\xf4\xd2\
-\x42\x6f\xe2\xd0\xd0\x62\x1a\x41\xce\xb8\xd5\xc1\x01\xe2\x61\xb1\
-\x88\xb1\xdb\x90\x0c\xc5\x88\x94\x06\x62\x0f\x75\x56\x19\x44\x2b\
-\x33\x71\x89\x87\xdb\x1c\xc9\xe0\x19\xb6\xea\x4f\x16\x4e\x15\x90\
-\xc4\x84\x8b\x2a\x36\xc5\xcf\xe5\x3e\x66\x67\x2c\xf4\x13\xb6\x51\
-\x87\xa8\xb0\xb2\xc2\x91\x6b\x99\x9a\xb2\x13\x25\x96\x38\x96\x54\
-\xdc\x05\xb9\x64\x45\x83\xe1\x14\xd4\x5b\x58\x48\x2f\x4b\x41\x50\
-\x58\x60\xd4\x07\xe1\xd6\x1c\x14\xf8\x8f\x09\xe4\x5f\xcf\x6a\x73\
-\x30\xe3\x7b\xfc\x32\x93\x4b\x3f\x4c\x9c\x5c\x17\x2e\x99\xf2\xac\
-\xb7\x3e\x54\x0b\x21\x56\x25\x08\x58\x64\x12\x72\x96\x8b\x77\xf1\
-\x83\x37\xee\xf1\xdd\x3f\xf8\x4d\x6e\x9f\x7c\x5b\x34\x1e\x2c\xf0\
-\x83\x26\xbb\x19\xa2\x81\xc1\x9a\x0c\x60\xd5\x5a\x92\xfa\x86\x95\
-\xd4\x07\xe5\x60\x4e\x69\x76\x14\x42\xb2\x13\x71\x90\xee\x90\x1f\
-\xa9\xb4\x07\x21\xf9\x82\x73\x11\xef\x16\x59\xb9\x7c\x9c\x2f\x08\
-\x6c\x7c\x3c\x10\x54\x5c\x2f\xab\x00\x9f\x5c\xfc\xfc\x32\x63\x97\
-\xd4\x5b\xb5\xfb\x57\xd2\x6b\x65\x26\xb6\xdb\x1a\x93\xbd\x01\x4a\
-\xda\x03\x2f\xa7\xdf\xef\xd3\xef\xf7\x19\x8c\x12\x06\xbb\xd0\xef\
-\xf7\x89\x0f\x7c\x74\xdd\x22\x48\x35\xfc\x69\x44\x7c\x10\x33\xc8\
-\x53\xf0\x72\xc6\xa9\x41\xa3\x27\xb2\xa9\x53\x5b\xa4\x11\x4c\x69\
-\x69\x0e\xe3\xbc\x43\x43\xe9\xe3\x17\x06\xe4\xee\xb5\x26\x9d\x96\
-\x86\xa2\xb6\xc8\x2a\x30\xc2\x53\x1d\x49\xb5\x59\x76\x34\x97\x89\
-\xa9\x24\x8c\x92\x2b\x2e\x31\xb1\xea\xfb\x92\x67\xae\xca\x3c\xc7\
-\x7e\x8c\x9a\x5a\xb9\xd8\x5e\x64\x99\x72\xa6\x4e\xeb\x47\xf8\xd3\
-\x33\x88\x74\x31\xed\x61\x76\x65\xb6\x8d\x11\x03\x95\x71\xe1\x0a\
-\xa4\x95\xc7\x50\x91\x4a\xb7\x92\x27\x76\xe6\x66\xd4\xc2\xf9\x76\
-\x74\xa1\x66\x4b\x09\xb1\x22\xf1\xb5\xee\xc1\x16\xf6\xce\x0f\xf3\
-\xeb\x59\xed\x3f\x2a\x88\xcb\xcf\x7b\x07\x01\x41\x0e\x46\xbf\x5c\
-\xd1\x1f\x5b\xf2\xb2\x25\x3a\x72\x33\x71\x92\x98\xdf\x8b\x8a\x20\
-\xcf\x99\xf8\xe1\xac\x03\x54\x14\xac\xa3\xc7\x62\x60\xf3\x78\x64\
-\xcc\x4d\x59\x94\x19\x2d\xab\x5f\x92\x9d\xb0\xd2\x67\x62\xae\xd5\
-\x9c\xaf\x49\x01\x4f\x19\xe8\xdb\xb5\x75\x8e\x47\x86\x1c\x08\x2d\
-\x1b\x1d\x65\x93\x63\x2e\xdb\x14\x3f\x53\x64\x74\x73\xae\x90\x2b\
-\x3f\xbf\x97\xf7\x24\x5f\x5c\x3e\x5e\xe8\x9f\x62\x14\x85\xdf\x8a\
-\x35\xe3\xb2\xd5\xc9\x63\x82\xbe\x48\x50\x8f\x3b\x1d\xf2\x62\x51\
-\x62\x5b\xd1\xe8\x74\x3a\x74\x3a\x1d\x36\xaf\x3a\x6c\x76\xda\x74\
-\xda\x9b\x24\x89\xd0\x0e\x5f\xae\xad\x72\xe3\xc5\x75\xba\xd7\xaf\
-\xd1\x69\x6f\x72\xb9\xb6\x8a\xd2\xde\xa4\xd3\xde\x04\x3a\x28\xed\
-\x4d\x86\x03\x0f\xa7\x93\xa2\xb4\x9b\x05\x9b\x92\xa3\xa8\xad\x82\
-\x57\x2e\xf4\xc8\x85\x29\x84\x9b\xf9\x32\x8b\x7a\x86\xc5\xd1\xe9\
-\xd9\x9c\x30\x5e\xc2\xb2\xa2\xf1\x51\xf2\xc4\xb3\x13\xa1\x51\xd4\
-\x37\x36\x71\xa0\x89\x4c\xac\x99\x33\x0b\x14\xb9\xaa\xb6\xd3\x01\
-\xd3\xc2\x3f\x27\x92\xb7\xca\x9d\x64\x45\x86\x4b\xcb\x59\x8c\x42\
-\xbe\xa9\xf8\x02\x57\xeb\xa1\x28\x10\xc3\x7e\x84\xd5\xd7\x84\x25\
-\x40\x38\x2b\xf2\x6c\x3f\x28\xd8\x8b\x50\x66\x6a\x13\x13\x6f\xed\
-\x2a\x1f\x78\xdf\x62\xe7\xdd\xda\x3f\x98\x8d\x7f\x3d\xab\xb1\xf3\
-\xae\xf8\x90\x75\xd6\xce\x0e\xd1\x9a\x5a\x74\xe8\x66\xab\x74\x4b\
-\x56\x62\x5e\x64\x6f\x8a\x93\x71\xac\x51\x77\x8a\xe9\x90\x73\x3f\
-\x63\x6f\x3f\xe4\xe1\x41\x84\xff\x68\x97\xe5\xf6\x0c\x07\x5f\x76\
-\xd6\x65\x70\x9c\xc7\xc2\x17\x5a\xa9\x45\x96\x5e\x75\x14\xa9\x61\
-\x38\xaf\x3a\x2b\x71\xec\x4a\xea\xcb\x63\x99\x8d\x7b\x79\x8f\x23\
-\x4d\x04\x6a\xd9\xa5\xeb\xe5\x3d\x19\xb8\x0b\xbd\x9a\xcc\xc4\xcb\
-\x6d\x64\xa6\x2e\x8b\xba\x4e\xd4\xe4\xf1\xe0\x31\x07\xbd\x13\x8e\
-\x42\x21\x8e\xbf\xd4\xef\x33\xb6\xa7\x28\xed\x26\x69\x65\xcf\xc8\
-\xa8\xe8\xcc\x96\xf4\x5a\xd2\x1f\xb2\xab\xf6\xd8\x79\x38\xc6\x3b\
-\x3e\x62\x57\xed\xb1\x37\x3d\x04\xfa\x0c\xe8\xa3\xdb\x21\xba\x1d\
-\x62\xac\x5d\xa2\xe9\x1a\xb4\xe9\xa0\x77\x44\xf0\x96\x7a\x89\x86\
-\xcd\x9c\x9f\x5b\xe6\x38\x73\xf4\xdc\x95\xc2\xde\x61\xf4\x58\x64\
-\xe1\xb6\x3b\xeb\xda\x55\x31\x71\xc9\x2f\x6b\x41\xb9\x3b\x31\x10\
-\xdf\x53\xe8\x89\x43\xd1\x55\x3b\x27\x69\xb4\x2c\x53\x8c\xe0\x9b\
-\x16\xb9\x15\x48\xbf\x09\x2a\xd9\x56\x0b\x15\x69\xc4\xcd\x28\x16\
-\xc6\x28\x51\x28\x9c\x7e\xe2\x09\x49\xa0\x73\x9c\xf7\xc9\x23\xa1\
-\x8c\x3b\xe9\x47\xe8\x61\x48\xa0\xa9\x28\x7e\x40\xd8\x37\xb0\xd3\
-\x8c\xb0\x9f\x90\x0f\xb6\xd8\xe8\xc7\x8c\x57\x27\xbc\xf3\x76\xfd\
-\x43\xb3\xf1\xf0\x0e\xfc\xeb\xb7\x45\xf0\xde\xc9\xc6\x8c\x57\x67\
-\x7f\xe8\xf5\x2b\x57\xb0\x8d\xcf\xcc\x4f\x83\x48\x43\xc1\xf0\x82\
-\x88\x24\x8a\x14\x8c\x46\x4a\x3c\xd6\x64\xb3\xa3\xc4\xc4\x67\xe1\
-\x2e\x71\x78\x20\x29\xb0\x12\x5f\x6e\xa8\x82\xae\xea\x44\x4d\x09\
-\x27\x00\x96\xb5\x53\xb2\xf0\x44\x04\xab\xb5\x24\xb3\xe1\x6a\xa1\
-\xad\x56\x6a\x8b\x4f\xfc\x7b\x26\x47\xa9\xec\xd8\x1d\x0f\xb8\x70\
-\x5c\x6e\x8b\xa2\xad\x5a\xe4\x55\x03\xb9\xcc\xc6\x00\xf1\x28\x9a\
-\x3b\x56\x27\x3b\x0e\xf7\x52\xb2\xf0\x84\x61\xab\x4e\xb8\x7e\x95\
-\x89\x1f\x72\x3a\x0d\xd8\x3f\x1c\xd0\xef\xf7\x39\x9d\x06\xf4\xfb\
-\x7d\x0e\xa6\xa2\x73\x27\xd2\x66\x8d\x8e\x69\xd1\x5e\x37\x30\xdb\
-\x35\x3a\xed\x3a\xed\x95\x26\x7a\xb7\x56\x38\x06\x09\x65\x59\xa9\
-\x3f\x56\x3b\xe9\x1c\x6c\x68\xa2\x31\x0e\x98\x19\xb1\x14\x01\xdd\
-\xb0\x0b\x53\xc7\x61\xce\x4e\x2c\x10\x6d\xdb\x3d\xa2\xed\x1e\x49\
-\x38\x71\xfe\x56\x85\x13\x65\x46\x2e\x23\x56\xad\x96\x38\x98\xf9\
-\x6c\x73\x7d\xa9\x03\xb6\x72\x49\xaf\x11\x46\x62\xea\x23\x54\xf0\
-\xfb\x7d\xfc\x52\xe9\x66\x5a\xc2\x24\xa5\xea\x3f\x61\x5a\x34\x5b\
-\x1a\xcb\xad\x4b\xe2\x44\x70\x14\x1c\xd3\x22\x29\xa4\x9c\xbe\xd6\
-\x10\xcb\x6b\x34\x15\xf0\x38\x1d\x2f\xb2\xdb\x31\x78\x66\xe9\x65\
-\x94\xe7\x7b\xec\xbc\x5b\xe3\x5f\xbf\xfd\xe4\x8c\x5c\x06\x30\x80\
-\x77\xf7\xe7\xe4\xf3\xb7\x13\x95\x38\x3f\x38\x27\x96\xaf\xee\xfc\
-\x50\x66\x27\x6b\x41\xeb\xc5\xc5\xd6\xa6\xb2\x5a\x2e\xc7\x9d\x86\
-\xc9\x2d\x0c\x6b\x0d\xe5\xcc\x97\x01\x59\x36\x39\x72\x7b\x9d\x41\
-\x5b\x78\xaf\x95\x7a\xdd\x43\x3f\x67\xd5\x51\x38\x4e\x17\xc9\xc2\
-\x13\x9e\x1f\xac\xc9\x00\x5e\xd6\x4e\x9f\xf8\x8f\x31\xac\x35\xce\
-\xba\xd3\x39\xec\x5c\x66\x54\xe5\xcc\x27\x5f\x70\x64\x40\x57\xdb\
-\xca\x5d\xb5\x08\x52\x65\xa6\x6b\xee\xaa\x11\xbd\xcc\x64\xb9\x8d\
-\x84\x1f\xcb\xda\x29\x47\x61\x31\xba\x94\x8f\x58\xeb\x2e\xb1\xdc\
-\xbe\xcc\xc6\x92\x41\x77\xa3\xcd\x62\xcd\x66\x7d\xb5\x8d\xbe\xd0\
-\xa6\x6e\x5a\x74\x3a\x1d\xb1\xac\xd1\x36\x09\xd2\x59\x72\x68\xd6\
-\x6b\x98\xa6\x49\x33\x17\x1f\x25\xaf\x5c\x15\x0f\x25\x49\x38\xe7\
-\x22\x94\x24\x21\xa9\x9d\x4a\xaa\xad\x2a\x92\x97\x57\x29\x7b\x76\
-\x7f\xe0\xad\xcc\x65\xe2\x12\x4e\xc8\x02\xd0\x71\x64\x46\x8f\x8b\
-\x8c\x1c\x81\x98\x76\x9e\xf7\x98\x9c\x05\x74\x5a\x04\xad\x16\x2a\
-\x18\x84\x58\x15\x16\x42\xaa\x87\x8a\x06\x41\x69\xa6\x52\x7e\x84\
-\x08\xa3\xc0\xa0\x30\x48\x29\x9d\x35\x2d\x2b\x97\xd3\x1e\xaa\x95\
-\x0b\x45\x9c\x65\xe2\x03\xef\xef\xef\xc2\xe3\x1b\xd4\xf2\xa7\x04\
-\xce\x7d\xbb\x3e\x87\x7b\xab\x85\xdc\x9d\x6c\x4c\x7e\x47\xfc\x53\
-\xdd\xa7\x7e\x7b\x16\x14\xfa\x55\x3a\xd6\xf5\x4a\xf0\x7e\x88\x77\
-\xdb\xdc\x88\x53\x5d\x42\x9d\x30\x8a\x20\x8a\x48\x4e\x5d\x5a\xfa\
-\x3d\xe2\xf0\x80\xd5\xd5\x19\xa6\xdd\xcd\x40\x29\x6c\x54\x85\x6b\
-\x8f\xe8\x8e\x3d\x7b\x68\x08\xfb\x2a\x3f\x97\xd9\xf8\x4e\xfb\x80\
-\xc3\xa2\x7d\x7d\x9c\x8a\x2c\x6c\x77\x4c\x59\x18\xaa\x93\xc7\x42\
-\xe9\x96\xfa\x12\x26\xcc\x06\x24\x45\xa0\x56\x9f\xaf\x66\x62\x59\
-\xdc\xe5\x6b\x17\x9e\x2b\x83\x3e\x0b\x4f\xe4\x09\x75\xea\x9d\xd0\
-\x6d\x59\x3c\xff\xe2\x47\xa8\x2f\xd6\x08\xf4\x06\x69\xde\x40\xef\
-\xd6\x30\xb1\xe9\x98\x16\x1d\xd3\x42\xe9\xb4\xe5\x68\x12\xd8\x72\
-\xca\xa3\x9c\xc3\x4b\x92\x90\x91\x12\x09\xf1\x7c\xbd\x26\xc7\xfc\
-\x47\x93\xa9\x18\x1a\x2d\xf4\xc7\x49\x12\xd2\x6a\x5a\x8c\x03\x91\
-\x91\xcb\x2c\x5c\xc2\x09\xd5\xf7\x81\x06\x99\x21\x30\x5a\xb9\xc2\
-\xa1\x74\xbf\x1f\x78\x2b\x73\x22\xa0\xf3\x90\x22\xb5\x53\x89\xab\
-\xc7\xea\x14\x75\x6c\x65\x33\xea\xa9\xf8\x27\xa6\x15\xac\xca\x39\
-\x3a\xad\x54\x13\x39\xa6\x25\x82\xba\x90\x66\x6a\x17\x2c\x51\x28\
-\x3c\xdd\xaa\xcc\x72\xb9\x70\x3c\xaf\x28\xe6\x20\xd4\xeb\xe8\xab\
-\x6d\xe8\x36\x69\xad\xdc\xa2\x3d\xbc\x89\xf2\x7c\x8f\x3f\xfd\x5d\
-\x97\x7f\xa1\x4e\x2f\xe0\x60\x00\xe5\x79\xf1\x4f\xfd\x49\xe5\x27\
-\x79\xf9\xf9\xaf\x73\x37\xfc\x9f\x41\xb9\x01\x91\x52\xe8\x84\x0b\
-\xe1\x4f\x21\xa9\x94\x59\xb8\xa2\x81\x2e\x2d\x60\xc5\x54\x4b\x51\
-\x08\x86\x17\x47\x8d\x54\x6b\x09\xd5\x5a\xa2\x7b\xb2\x47\x3e\x5d\
-\xe7\xc6\x25\x03\x65\x25\x93\xa6\x25\xef\xad\xc6\x73\x83\x9a\x65\
-\xf0\x96\x99\xb9\xcc\xd6\xbb\x99\x28\x0c\x17\x86\x11\x47\x21\x1c\
-\x1e\x9e\xc8\xa0\x2b\x9b\xb7\x17\x02\xf5\xef\xb9\x9d\x87\x18\xcb\
-\x6d\x24\xb4\x50\xad\x25\x26\x47\x29\x87\x7b\x22\x0b\x3f\xf3\xe2\
-\x2d\x96\xdb\x97\x59\x6e\x5d\xa2\xdd\x6e\x63\x4b\x81\x79\x25\x40\
-\x26\xe2\x6f\x0f\x52\x8d\xb4\x2e\x32\x6e\x1f\x95\xa6\x25\xbe\xa7\
-\xa7\x37\xb0\xe3\x9c\xd1\x64\x4a\xaf\x3f\x62\xe7\xf8\x31\x23\x2f\
-\xc6\x09\x2c\x6c\x2d\x95\x1c\xb2\xae\x8b\x00\x2e\xb3\x70\x19\xc0\
-\xe5\x63\x4f\x75\x80\x31\x6a\x2c\xfe\xf8\xd2\x3c\x3c\x18\xa4\x4c\
-\xb5\x75\xda\xee\x11\x6a\x78\xc4\x61\x3e\xcb\xec\xd3\x02\x4e\x94\
-\x90\x42\x0b\x84\x8f\x6b\xc3\x31\x50\x1b\xa1\x2a\x2b\xf5\x52\xd4\
-\x5e\x06\xb0\x9d\x66\xd8\x69\x86\x1e\x9e\xb3\xb1\x2a\xb2\x6f\x19\
-\xb8\x17\xd6\xe6\x16\x81\x20\x97\x2f\x9a\x22\xdb\x96\x46\x85\x69\
-\x71\xa2\x94\x5f\xdb\x75\x15\xae\x2d\x76\xb1\x2d\x8b\x4e\xd6\xe4\
-\x0b\x9f\xff\xe2\x5c\xe0\x96\x90\xa2\x84\x11\x6f\xbf\x29\x84\x07\
-\x1f\xef\xfc\x02\xfb\x0b\x2b\x1c\x8c\x7e\x19\x4f\xbf\x2e\x5c\x3a\
-\x4d\x93\x64\x30\x28\xe8\xb2\x73\x53\xd2\xe7\x94\x6a\xf2\x14\x33\
-\x73\x4c\xd3\x14\xac\x85\x25\x0a\xdd\xf1\xa9\xc7\x61\xfc\xd4\xdc\
-\x3c\xdc\x5b\x7b\x39\xe3\xe3\x3d\x54\xee\xf1\x63\x2f\x3f\xc5\xad\
-\x97\x3e\x8a\xbb\xfc\x31\x39\x82\x54\x06\xf2\xf1\x40\x60\xd0\x9d\
-\xfd\x0e\x59\x78\xc2\x19\x6b\xd8\x1d\x81\xa7\xcb\x06\x49\xb5\x71\
-\xe2\xf9\x95\x69\x72\x3f\xbd\x10\xd4\xe5\x73\xe2\xd8\xff\xd0\xa0\
-\x3e\x1e\xcc\x98\x8b\xc9\x51\x2a\x83\xbc\xdb\xb2\x58\x6e\xc6\xd4\
-\x17\x6b\xac\x6c\x26\x42\x4f\x1c\xa9\xc2\xc2\xb5\xd0\xf8\x96\xbe\
-\x10\xe5\x73\x79\x7f\xc0\xfe\x78\xca\xc9\xf1\x01\xb7\x1f\xee\xf3\
-\xfa\x07\x77\xb9\xfb\xc1\x07\x7c\xf7\xfe\x2e\x0f\x0e\x0f\xd8\x9d\
-\x84\x44\x64\x82\x9e\xa3\x7f\xa1\x39\x32\x0b\xd6\x99\x87\x85\xa7\
-\x8a\x2c\x5c\xfa\xb8\x95\x16\x5a\x67\xe1\xae\x84\x11\x1f\x76\x53\
-\x9b\x22\x70\xcd\x39\x6a\x54\x50\x6c\x7a\x18\xcd\xfb\x12\x6b\x28\
-\x85\x07\xb1\x27\xc9\x31\x3f\x56\x70\x4a\xf1\x4c\x91\x79\x4b\x5d\
-\xb1\x71\xce\xab\xb8\x2c\x0a\xcb\xc5\xe3\x61\x18\x91\x72\xb1\x19\
-\xe2\x54\x2e\xed\x21\x16\x5a\xa7\x58\xb4\x68\xc1\xb5\xe6\x0f\xf0\
-\xf1\x4e\xc2\xd6\xc6\x37\xd9\x79\x77\x02\x1f\x9d\xf2\xea\x9d\x2f\
-\x71\x27\xfb\x33\x00\x3e\xf6\xe2\x3d\xda\xc3\x9b\x5c\x7d\x41\xe7\
-\xd9\xcd\x97\x85\x01\x92\x9c\x30\x89\xf8\xce\x77\x1e\xb1\x5a\xdf\
-\x25\x5b\x58\xc2\x6e\xc0\xae\x1f\xb2\xe1\x58\x2c\x75\x8a\x00\x0d\
-\x23\x82\x7e\x8f\xb8\x63\x16\x89\x7a\x42\x4c\x9f\x28\x99\x51\x71\
-\x83\xb6\x45\xfe\xf8\xb6\xcc\xd0\x0b\xbd\x1a\x3d\xe0\xad\xbd\x1e\
-\x8d\xe5\xcb\xfc\xd0\x0b\x2a\x57\x3e\xf5\x0c\x2b\x1b\x47\xfc\xed\
-\xff\x73\x83\xbf\x7b\x5f\x83\xfc\x35\xba\x47\x45\x3b\xd7\xd1\xa8\
-\xaf\x68\xac\x58\x4b\x64\x85\x41\x8a\x1f\x34\x89\x07\x8f\x99\x1c\
-\xef\xd2\xcb\x4c\x32\x3f\x65\xcc\x14\xd7\xb1\xe8\x67\x03\xf4\xc0\
-\xc4\x75\x34\xa0\x4f\xe6\x37\x51\x9d\x4e\x11\xb4\x85\x13\x10\x53\
-\x5c\x3a\x78\x7e\x88\xeb\x5c\xd4\x36\x2c\xb7\x41\xb5\x34\x0e\xa6\
-\x8e\x5c\xed\xad\xe6\x23\x36\xaf\x3e\x45\xa3\x2b\x4e\xfc\x47\x7b\
-\x09\x56\x3a\x00\x06\xc5\xea\x62\x70\x6a\xe2\xb8\xaf\x0e\x68\x16\
-\x5a\x06\xe1\xe9\x51\x9c\x58\x51\x48\xa7\xd3\xa4\x5e\xd0\x96\x1d\
-\xd3\x22\xad\x17\x54\xe4\xb0\x8f\x47\x4e\xb3\x08\xde\x20\xd5\xb0\
-\x99\xd9\xc8\xba\x99\x2f\x83\x17\xd5\x21\x73\x1c\x86\xa3\x90\xe5\
-\x26\x8c\x6d\x81\xbb\x17\xac\x0d\x06\x1e\xd4\xd8\x97\xc1\x3c\xf0\
-\x56\xe4\x4e\x12\x80\x24\x73\xd0\x64\xe7\xae\xd0\x26\x17\x7c\xb3\
-\xf4\x27\x0e\xb1\xa4\xbd\x2a\x51\x02\x08\x97\xf4\xf3\x2a\xfa\xf2\
-\x72\x6b\x22\x96\xc8\xb4\xc6\x0d\xfc\x62\x75\x58\xc9\x1d\xfb\x85\
-\x49\x77\x79\xa4\x32\x2c\x5a\xf5\xa8\x28\x67\xec\xac\x88\xd9\x65\
-\x1f\x70\x8d\x3a\xff\xd5\x47\x3f\xc2\xee\xf5\x67\x78\xe5\xe1\xfb\
-\xfc\xf4\xed\xaf\xf0\xbc\xfa\xb7\x02\x37\x0d\x6f\xf2\x85\xcf\x7f\
-\x91\xd6\xca\x2d\xd6\xeb\xcb\x72\xd4\xdf\x2a\x0b\x52\x33\xa4\x7e\
-\xf3\x19\x0e\xef\xbf\x0f\x27\x3a\x6b\xdd\x26\xd7\xcc\x70\x6e\xa8\
-\x54\xb5\x72\x74\x4b\x74\x97\xc4\x89\xd9\x21\xf2\x32\xfa\xb1\xc5\
-\x52\x57\xe7\x23\x2f\x75\x69\x3f\x7d\x99\x77\x6e\xff\x07\xb6\x5e\
-\x7f\x0f\xff\xd1\xee\xec\xd2\xed\xc1\xfb\x6f\xde\xe3\x6b\x03\x8f\
-\x1f\xfc\xcf\xee\xf3\xc9\x4f\x7c\x9a\xab\xbf\xf4\x73\xdc\x7a\xe7\
-\x36\x6f\xbc\x7a\x1d\x9f\xf7\x71\x8e\x37\x50\x96\x0d\x89\x9b\xc5\
-\x7f\x77\x24\xfd\x8b\x7b\x99\x89\xe7\x87\xc4\x4e\x0d\xc3\x17\x99\
-\xb8\xe3\xe4\x78\x45\x56\x6e\xd0\x44\x75\x46\x32\x90\xc7\x84\xb8\
-\x95\x2c\xd1\xa0\x46\x8f\x94\x2e\x33\x2d\x71\x95\x1b\x06\x0b\x56\
-\x80\xbb\x22\x6b\x5f\xbf\x76\x8b\x2b\x37\xaf\x73\xe9\xc6\x66\x31\
-\xc2\x50\x38\x3e\x15\xff\x4b\xbd\x48\x4c\x5d\x20\x9d\xb6\xd0\x6a\
-\x43\x3a\x99\x22\x18\x08\x33\x93\xc5\x5b\x75\x25\x18\x64\xf4\x51\
-\x51\xa2\x09\x4e\xcd\x94\x01\x0c\xa0\x7a\x0e\x74\x52\x19\xc0\x79\
-\x63\x8c\x37\x76\xc4\xe3\xc0\x41\xd7\x2d\x22\x1a\xa8\x81\x29\x33\
-\xf1\x8d\x4b\x06\x03\x6f\x1d\x06\xfb\xd8\x6d\xad\xc0\xc7\xf3\x58\
-\x58\x14\x85\xce\xdc\xf0\xa9\xdc\x63\x27\xc5\xec\x16\x28\xa1\x82\
-\x6a\x26\xb3\x82\xc8\x32\x71\xc2\x48\x76\xe4\xe2\x0a\x56\xd6\x42\
-\x05\x5f\x0d\xb0\xac\xfc\x82\x2d\xab\x66\x9a\xa4\x51\x24\x8f\x16\
-\x33\x75\x5c\x5a\xd1\x50\x94\x41\x1d\x86\x0a\x76\x9a\x0b\x89\x26\
-\x26\x53\x7d\x99\xe5\x16\x7c\xe1\x3a\x6c\x7d\xe3\x26\xbf\xf5\x78\
-\x99\x17\x6f\xbd\xc6\x8f\x7e\xe1\x5f\xb1\x79\x6b\x1d\x3b\x2a\xf6\
-\xdd\x45\x9c\x9b\xc1\x52\x58\x30\x15\xb2\x67\xae\x8a\xb3\xbc\x5b\
-\xc7\x2a\xf7\x89\x16\xda\x08\xcb\x34\xcf\x95\x7c\x39\xb0\x80\xdb\
-\x1f\x01\x36\x86\xe2\x89\xa5\x8f\x4f\xe2\x7d\x95\x26\xbd\xe1\x88\
-\x3f\x7e\x4b\x8c\xee\x7b\x67\x47\x18\xcb\x9f\xe3\xc7\xaf\x2d\xf2\
-\x89\x8d\x0e\xdb\x7b\x1d\x8e\x0f\x0e\x51\xc3\x23\x1e\xaa\x22\xd3\
-\xe4\x47\x2a\x0f\x0f\x22\x26\xc7\xbb\x9c\x8e\x0c\xc6\x14\x12\x4b\
-\x5f\x1c\x5d\x27\xc2\x2b\x24\xaa\xe2\x3e\xb8\x88\xe0\x6d\xf8\xb5\
-\x27\x66\xdd\x6e\x65\x4f\x5c\x2f\xef\xb1\x0c\xac\xac\x3e\x87\x6d\
-\x8f\xb8\xb6\xbe\xce\xa3\xfb\x0f\xe8\xf5\x15\xbe\xf8\x99\x0e\x37\
-\x57\x72\xdc\xee\x0a\x0b\x56\x9d\x34\xb7\x30\xea\x1d\xb4\x49\x84\
-\x55\x0c\xd5\x96\x59\x55\x9b\x44\x60\x4e\x49\x8b\xd7\xc5\x7b\xa6\
-\x0a\x0b\x40\x2d\x9d\x33\x53\xa1\x92\xe6\x3c\x35\xa7\x59\xb0\x18\
-\x49\x12\xe2\xdb\x21\x76\x92\xd2\x47\xa3\xab\x6a\xe4\x5e\x8e\xa7\
-\xce\xe0\xc5\xf9\x9b\xcc\xc4\x45\x81\x57\xb2\x14\xab\x4a\x32\x27\
-\xdf\xd4\x82\x96\x1c\x46\x4d\xed\x14\x83\x27\x6c\x14\xbd\x70\xb3\
-\x4c\x39\xae\x54\xbe\x65\x9a\x55\x32\x17\x8a\x1c\xeb\x11\x2e\x98\
-\x79\xa5\xbd\x6c\x49\x09\x67\xd9\x6e\x0e\x0b\xef\x8a\x92\x97\x4e\
-\x2b\x30\x26\x2c\x27\xac\xe3\x09\xf6\x48\x63\x94\xa7\xe8\x76\x82\
-\x6d\xd4\xd9\xcb\x6a\x74\x9e\xdd\x42\x7b\xa8\x70\x9c\xff\x2c\x97\
-\x17\x4d\x16\xc8\xc0\x9c\x59\xbf\x5a\x91\x22\x8a\xd2\xb2\x33\x17\
-\x28\xa8\x5a\x83\xfa\xa4\x47\xd4\x1f\x48\x08\x24\x3b\x75\x4f\x5a\
-\x8a\x16\xf6\x19\x8d\x43\x9a\x45\x76\x4e\xc7\x27\x6c\x6f\xdd\xe3\
-\xdd\xf7\x1e\xe3\x9a\xf3\x05\x54\xb7\x65\xf1\xa8\x77\xc4\x1f\xbf\
-\xf5\x88\x3f\x7e\xeb\x11\x1f\x7f\xe6\x11\xef\xdf\x5a\xe6\xe6\xa6\
-\x8d\xaa\x7d\x9a\xcb\xf9\x1e\xf7\x07\x0a\x0c\x0e\xd9\xcd\x60\xf2\
-\x68\x97\xe3\x01\x78\x7e\x8e\xeb\x8c\xc0\x37\x49\xec\x09\xf9\x28\
-\xc7\xd0\x4d\x19\xc0\x02\x1f\x8b\xfb\xfd\x6c\x40\xc7\x69\x8b\x23\
-\x6d\x09\x21\x24\x04\xa9\x24\x8c\xae\x1a\xf1\xe9\x85\x15\x8c\xb5\
-\x16\x76\xbb\xcb\x83\xc7\x31\x2b\x16\x1c\x76\x72\x1a\xcb\x97\x49\
-\xcd\xab\x74\xac\x19\x3c\x88\x27\x3d\xb4\xca\xb8\xbe\x36\x11\xc2\
-\x1a\x0d\x5b\x14\xee\x93\xf3\xdb\xa9\x32\xce\x39\x6c\x8b\x91\xa6\
-\x89\x38\x09\x95\x68\x02\x8d\x99\x78\x9e\x54\x58\x5d\xe1\xd6\x18\
-\x91\x92\xbb\x0a\xc5\x8c\xa9\xcc\xce\x42\xe0\x3e\x9f\x89\xcb\xcc\
-\x5b\xf2\xc5\x2d\xb6\x67\xed\xe5\x00\x1a\xc5\x74\x88\x9c\x12\x29\
-\x8a\x3c\xdd\x2a\x27\x94\xad\x52\xe7\x10\xce\x63\xe4\x48\xd0\x68\
-\x46\x45\x7d\xe6\x44\x96\x5c\x18\x63\xa7\x19\x9e\xa3\x14\x7b\x3f\
-\x66\x25\x93\x53\x1d\x5f\x2a\xe6\xed\xca\xad\x19\x56\x14\x51\x6e\
-\x75\x88\xc2\x10\x2b\x35\x45\x00\x17\x2e\x3b\x4d\x25\x23\x34\x73\
-\xea\x96\xc5\xb3\x5a\xc4\xfd\xad\x9f\x27\xdf\x3c\xe6\x27\xba\x75\
-\x0c\xb3\x0f\x74\xa4\x5b\x50\xd5\x2e\x36\x2c\x32\x31\x40\x43\x09\
-\xa1\xd3\x91\x85\x80\x45\x58\x08\x93\x8a\x1d\xd1\x61\xb9\xca\x61\
-\x16\x0c\x4a\xab\xce\x58\xab\x95\x12\x3c\xf2\xe3\x18\xd7\x3c\x94\
-\x4d\x85\xf2\x76\x3a\x32\x68\xb5\x5b\xe0\x41\x2f\x85\xbf\xb9\xf3\
-\x88\xb7\xf6\xca\xae\xd9\x43\xd9\x70\xe8\x65\xe1\x5c\x80\xba\xf9\
-\x2c\xe3\xea\x41\x5d\x2e\x2c\x8a\x93\x08\xa3\xb0\x53\x4d\xec\x09\
-\x7a\x50\xa7\xa3\xb6\x0b\x9c\x5c\x27\x23\x95\xb8\xb9\x85\x5b\x64\
-\x66\xf1\x3e\x74\xd5\x08\xa3\x69\xd2\xb0\x2f\x71\x65\x25\x07\x12\
-\x82\x9a\xca\xdf\x85\xd0\x6d\xde\xe0\xc5\xce\x2a\x37\x37\x0d\x1c\
-\x7d\x4c\x4e\x1d\x3d\x50\xd1\xed\x4c\x14\x74\x72\x99\xa4\x2d\xbb\
-\x60\xe7\xe7\xd8\x6c\xad\x4e\x50\xbc\xa7\xd5\x2c\x2c\xda\xd2\x16\
-\x03\x90\x70\xa2\xba\x85\xb4\x67\xe7\x98\x05\x3e\xee\x78\x39\xfd\
-\x4c\xbc\xe6\xa9\x0e\x49\x12\xa2\x05\xb3\xac\x3c\x3e\xf5\x18\x58\
-\xcf\x4a\x0c\x1c\x0c\x52\xda\xed\x23\x0e\x07\x3a\x3f\xa6\x05\x24\
-\x99\xf3\x44\x48\x21\xdb\xce\x8a\x1f\x40\xa4\xe3\xfa\x79\xe1\x9f\
-\x36\x7f\x4b\x09\x65\x03\x40\x2b\x98\x85\x12\x0a\xd8\x46\x5d\xfa\
-\x53\xa4\x17\xa4\x9a\x4f\x30\x9e\xaa\x70\xb4\xae\x9f\xa3\xf8\x39\
-\x56\x6a\x12\x6a\x11\x4a\x49\xbb\x35\x0d\x68\x1a\x58\xa9\xc9\xc4\
-\x0f\x09\xb1\xb9\x7a\x45\xe7\x85\xee\x9f\x8a\x4b\xb0\xb2\x36\xe7\
-\x16\x54\xde\x0f\x2b\x98\x37\x4b\xc7\x60\x89\x25\x07\x96\x69\xd2\
-\x31\x4d\x30\x3b\x73\x3c\x38\x96\x39\xa3\x11\x73\xf1\x77\xbb\xae\
-\x8d\x6a\x07\x9c\x45\x19\xbd\xdb\x03\x76\x46\xce\x05\x2a\x6b\xe0\
-\x88\xa2\xcd\xf3\x4d\x3c\xe3\x59\xba\xed\x0e\x69\x7b\x83\xde\x00\
-\x86\x83\x21\x77\xdf\x7a\xc8\xab\x6f\x3d\xe2\xf5\x87\x87\xf4\x06\
-\x02\x1e\xc8\x2c\xab\xcc\x02\x35\x4e\x22\xe2\x24\x2a\xf8\x6d\x13\
-\x37\x8f\x64\x70\x27\xf6\x44\x64\x60\x35\xc7\x75\x2c\xc6\x4c\xf1\
-\xfc\x90\x56\xe0\x56\x58\x8a\x59\x00\x7f\x7a\xa1\xcd\xf2\x52\x01\
-\xcf\xcc\xab\x92\x27\xde\xbc\xa6\x61\x6e\xde\x90\xfa\xe1\x34\x6f\
-\xa0\xdb\x99\x18\x0e\xb5\x33\xf4\x40\x9d\x9b\x59\x33\x2f\x4c\x14\
-\xdb\x04\xe9\x64\xae\xb9\x71\xfe\x96\x9b\x75\xfc\x69\x34\x37\x01\
-\x22\xdc\x2b\x6d\xec\x20\x2c\xae\x2a\xb3\xf4\xe6\x66\x42\x5c\x94\
-\xda\xb3\x9f\x56\x2e\x65\x2f\xa9\xb6\xea\xed\x30\xb5\xd1\x55\x1f\
-\x37\xf3\x19\x91\x4a\x0d\x45\x49\xb5\x8d\xfd\x18\x5d\xec\xd0\x98\
-\x10\xc4\x00\x13\xd1\x75\x2b\x60\x82\x53\x66\xd1\xca\xf8\x52\x89\
-\x85\xd3\xc2\x38\x5b\xc2\x85\x62\x1c\xdf\x2a\xee\x5b\x55\xc6\xa0\
-\xc2\x4c\xa4\x73\x6b\x09\x98\x1b\x22\x0d\xac\xc9\xec\x22\x37\x8a\
-\x09\x3b\x29\x9d\xa2\xc3\x77\xd4\xff\x4f\xa1\x53\x4a\x39\x43\xc2\
-\xc2\x26\x40\x40\x89\x19\x33\x21\xbc\x36\x8b\x8c\x62\xe6\xf4\xfb\
-\x03\xa9\xb6\xd3\x0a\xcd\x44\x29\x3e\xc2\x2a\x1d\x3d\x33\xc6\xa1\
-\x45\x03\x11\xf0\x47\xe3\x87\xc2\xae\xea\xf4\x8d\x0f\xc5\xa2\xb1\
-\x53\xa3\xcb\x7b\xe2\xf2\xe7\x37\x41\x2f\xd8\x84\x36\xb4\x80\x1e\
-\x29\x86\x3f\xc5\xf3\x9f\xf0\x8f\x2f\x60\x44\x35\x0b\x97\x01\x5e\
-\xc5\xc7\x5e\x91\x0e\x5c\x27\x2a\x8a\xbc\xb2\xd8\xd3\x8a\x4c\x6c\
-\xb1\xd6\x5d\xa2\x61\x77\xa8\xaf\x2e\xc8\xb1\x7c\x50\x58\xeb\x2e\
-\xcd\x35\x37\xce\x27\x94\xa4\x08\xe0\xf3\x9b\x57\xab\x33\x6c\x60\
-\x4b\x49\xe6\x93\x6e\x65\x61\x57\xcd\xce\xba\x6e\x61\xc7\x62\x0d\
-\x46\x99\x8d\xd7\x8d\xa9\xcc\xc0\x9e\xee\xc8\x79\xb9\xb3\x22\x9e\
-\xce\xef\xad\xb6\xdb\x1a\xc1\x20\x65\x55\x49\xa4\x8a\xad\x6c\x63\
-\xa7\xa4\xa8\xbe\x4f\xe6\x38\x32\x90\xd5\xb2\x55\x2c\x47\xd6\xcb\
-\x82\x26\x0a\x45\xa6\x2c\x2d\x58\x4b\x21\xbb\x29\xba\x73\x8e\xa4\
-\xd3\x84\xd9\xb6\x2c\xd0\x2a\x19\xb2\x0c\x5a\x2b\x52\xb0\xa2\x08\
-\xfb\x34\x94\x43\x98\xaa\xe2\x10\x68\x2a\xb9\x23\xcc\xae\xcb\x6c\
-\x1c\xc4\x93\xb9\xe5\x34\x61\x91\x2d\x57\x3a\xff\x9e\xb5\xcd\x87\
-\x52\xca\x59\x9e\x24\xe5\xb6\xd1\xb4\x82\x75\xad\x64\x22\x03\x35\
-\x26\x60\x74\x16\x72\xb6\x17\xe1\xf7\xfb\x78\xfd\x03\xa2\x28\x62\
-\x2f\x88\xe8\x13\x32\xee\x4f\x88\x22\x85\x2c\x1d\x33\x0e\x22\xa2\
-\xfe\x80\x47\x7b\x3e\xf9\x71\x7c\xa1\xdd\x5b\x75\xb9\xec\xa2\x91\
-\xf9\x4d\xf0\x40\x75\x46\xa8\xf9\x88\xcc\x4f\xf1\xfc\x50\x06\x70\
-\x99\x5d\x65\x51\x98\x1c\x3f\x59\x1f\x9b\x44\x17\x30\xb1\xeb\x44\
-\x73\x59\xbc\x2c\x06\xcb\xf0\xe9\xaa\x16\x57\xd6\x2c\x36\x94\x58\
-\x66\xe1\xd5\x8a\x66\xe2\xfa\x35\xd1\xdc\xb8\xb4\xbe\x8c\x65\xd5\
-\x45\x16\x0e\xc4\xba\x86\x24\x88\xd0\x6d\x93\xa4\x92\x8d\xa3\x39\
-\x18\x81\x84\x0f\x65\xfb\x39\x48\x27\x04\x86\x72\xa1\x39\x92\x9b\
-\x75\x9c\xda\xac\x4d\x5d\xe5\x89\xf5\x40\xc5\xd6\x52\x19\xc0\xe5\
-\xd8\x7f\xc9\xb1\x2c\xcc\xef\xdf\x9a\x5d\x07\x06\x22\x38\x0f\x73\
-\x7d\xe6\x8a\x59\xb4\xac\xcb\x2e\xa0\x9c\x76\x06\xd4\xb2\xf5\x8b\
-\x65\x8a\x0e\xdc\x39\x0b\xd4\x28\x0c\xa5\xc8\xa7\x0c\xd4\xb2\x79\
-\x51\xbe\x5e\x85\x1e\x56\xa4\x10\xa0\x16\xde\x6b\xa2\x71\xa2\xf8\
-\x81\xcc\xbe\x0b\xb9\xd8\xa3\x91\x36\xb2\x62\x0b\xa9\x60\x40\x72\
-\x6c\x49\xfd\xc8\x5f\xba\x02\x3f\x9e\x57\x1b\x1c\x6c\x5f\x97\xc1\
-\x29\x57\xe5\x56\x27\xb0\xab\xcd\x8c\x02\x22\xd8\x96\x45\x73\xbd\
-\xc7\x71\xfa\x06\xdf\xf7\xbe\x0a\xfa\x9b\x8c\x03\x85\x86\x2d\x4c\
-\x62\xfa\x39\x78\x9e\x90\x03\xb6\xfa\x23\x46\x67\x21\xc9\xde\x23\
-\xe2\xf0\x00\x2f\x5a\xc5\x68\xf5\x58\x5d\x5d\x92\xed\xe7\xd5\xd5\
-\xa5\x59\x57\xcc\xd1\xc0\xed\xe0\x45\xcf\x92\x29\x4d\x09\x15\x0c\
-\x7f\x2a\x03\x30\x4e\x22\x19\xbc\xaa\xbe\x4c\x9c\x44\x68\x0c\xe7\
-\x82\xb7\xcc\xca\x25\x6e\x4e\xec\x09\x78\x22\xa0\xdd\x3c\x9a\x73\
-\xdc\x15\xc1\xdc\xc1\x68\x9a\x28\xb5\x45\x1a\xf6\x25\xea\xab\x97\
-\x59\x1d\x45\x1c\x36\x4d\xc6\xc7\x29\x76\x5b\xc3\x5c\x5d\x67\xe9\
-\xa9\x45\xec\x92\x7a\x8c\x14\x92\xca\x25\x3c\x2a\x82\xcc\x53\xf3\
-\xb9\xbd\xd7\x65\x20\x27\x81\x3a\x17\xc0\xb6\x56\x97\xef\x6f\x55\
-\x57\x01\xe0\x4f\xa3\xbf\x37\x63\x97\x81\x5d\x16\x75\xe5\xe3\xb3\
-\xa2\x71\x33\x3e\xf5\x64\x16\xae\x76\xf0\xec\xb6\xc6\xaa\x16\xc8\
-\xef\xe1\xa9\x0e\x0d\x5b\x7c\x9f\xaa\x12\x4e\x8f\x8a\x0e\x9b\x9c\
-\xce\xb0\x2a\xc6\x29\x9a\x0a\x56\x77\xbe\x0d\x1d\x4e\x24\x37\x25\
-\x16\xd3\x98\x78\xc5\xc4\x47\xc7\x34\xf1\xa3\x90\x7a\xd1\xcc\xa8\
-\x0f\x8e\x50\x8a\x3d\x64\x81\x95\xa1\x98\x39\x5b\x96\x85\x43\x26\
-\xa8\xae\x28\x92\xd8\x59\x29\xb7\x29\x99\x39\xa3\xde\x08\xa5\xdb\
-\x04\x84\xcb\xbc\xae\x3e\xc7\x78\x75\xc2\x33\x4b\x0f\x81\x2f\x14\
-\xdb\x94\x94\x73\xeb\xc1\x22\x89\xc6\x75\xd3\x82\xa8\x47\xdf\xdc\
-\xe7\xdd\xdd\x3f\x83\xf4\x35\x00\xde\xef\x89\xbf\xf1\xb9\xa5\xcf\
-\x22\xfc\xf5\x2c\x3a\xb6\x49\x98\x5b\xdc\xed\x8f\x21\xab\x73\x7c\
-\xf8\x16\xc3\xe4\x16\xf0\x80\x9b\x2b\x87\xb2\x95\x6c\x58\x6b\xac\
-\x71\x20\x0d\x00\x0f\x8a\x6e\x82\x72\xe6\xd3\x48\xf6\x64\xa6\x2c\
-\x31\x6d\x6f\x00\xdd\x36\x68\x83\x21\x29\x2d\xd2\x4a\xf1\x56\x3e\
-\x2e\x03\xb8\x84\x14\x71\x12\x41\x1b\x0a\xef\x6b\x12\x7b\x82\x17\
-\x08\x26\xa3\x15\xd4\xc8\xfc\x1a\x6e\x3e\xa2\xab\x2a\xac\x3a\x16\
-\xd7\x36\x35\x16\xb4\x36\x93\xc3\x3d\x0e\x57\x2f\xcb\x69\x88\x35\
-\x33\xc1\x59\xde\xc7\xb4\xae\x91\xb2\xc0\x70\xd8\xc2\x69\x0e\xd0\
-\xbc\x13\x52\x77\xe6\xdd\x90\xd8\xe0\x06\x2a\x04\xc5\xff\xd6\x36\
-\x99\xd9\xbb\x22\x03\x53\xf0\xbf\xa9\x74\xcd\xbc\xe4\x19\xf8\xae\
-\xc8\xd4\x83\x82\x27\x16\x81\x6d\xcb\xe2\x2f\x09\x22\x9a\xe4\xc2\
-\x80\xbb\xd0\x58\xf4\x93\x10\x5d\x9d\xf1\xcd\x79\xbf\x28\xc2\x17\
-\x5d\xa6\xda\x3a\x67\xe1\x2e\xab\x35\x75\x2e\xa0\x0f\x53\x9b\x85\
-\x51\xb1\x6a\xb7\xe0\x99\x1b\x8e\x03\xc1\x0c\x17\xab\x06\xa1\x98\
-\xce\xc0\x22\x0e\x15\xfa\x05\x4e\x09\x34\x55\x72\xc3\xe5\xe4\x72\
-\x75\x49\xa2\x16\x2a\xf2\xd2\xaf\x87\x82\x9a\xb2\xa2\x08\xd7\xcf\
-\xd1\xc3\x10\xe5\x60\xca\xe9\x78\x91\xbc\xf7\x50\x16\x81\x66\xa7\
-\x23\x9c\x30\x9f\xd0\x02\x2e\x0b\x44\xd3\xb2\xb8\xb4\x7e\x95\xc4\
-\xb2\xa4\xa6\xe1\xda\xe5\x90\x56\xf0\xf3\x1c\x6c\x5f\x17\x2a\xb5\
-\x48\xe1\x71\xd8\xe3\x9d\xed\xbf\xe4\xfb\x93\x2d\xfc\xa8\x3f\xd7\
-\x8a\xf4\x92\x8c\x1d\xf5\x88\x77\xb7\xfe\x07\xde\x3f\x79\x55\x06\
-\xaf\xbc\x64\x27\x19\x53\x42\x82\xa8\x47\x18\xf6\xa1\xd0\x8f\x1c\
-\x9d\x9e\x31\x7a\x0c\xde\xf1\xdb\x73\x1a\x61\x63\xc5\x94\x73\x74\
-\x6b\x35\x4b\xb6\x8c\x95\x33\x5f\x52\x5e\x73\xf4\x53\x50\xa7\xab\
-\x41\x6f\x20\x02\xf6\x49\xb0\x41\x14\xca\xc3\x39\x66\x42\x69\x2a\
-\xf4\x33\x05\x75\x34\x00\xb7\x60\x30\x98\x1d\xc7\x4c\xe9\xb6\x2c\
-\x8c\xa6\xc9\x95\x7a\x8b\xfa\x69\x93\x83\x74\x47\x66\xe2\xea\x6d\
-\xa9\x75\x93\xd5\x85\x18\x27\xf6\x69\xeb\x23\xb9\xba\xa1\x84\x0f\
-\x26\xd0\x0d\xce\xd9\xd8\x06\x62\x61\xa2\x5d\x3e\xef\x09\x61\x8f\
-\x1d\x84\x22\x48\xbd\x29\x76\x6f\x82\x4f\x82\x3a\x39\x12\xc1\x3d\
-\x6e\x90\xa7\x9e\xc4\xd8\xd5\xa6\xc7\x79\x46\x63\x3e\x33\x8f\x59\
-\xec\xb4\x65\x26\x06\x61\x81\xf0\x24\x58\xa1\x36\x05\x84\x28\x33\
-\xf1\x38\x10\x22\x7b\xd5\xf7\x05\x3b\x11\x63\xc9\x81\x4f\x2c\x93\
-\xe6\x13\xd8\x89\xaa\x07\x9b\x55\xc2\x0f\xc1\x42\x91\x04\x3a\x56\
-\x2a\x2a\xfd\xb0\x1f\x31\x1a\xa6\x58\x7d\x8d\xe3\xbc\x4f\x53\xc9\
-\x88\x6e\x6c\xca\xc5\x8c\x73\xad\x67\x33\x2f\x4c\xb4\xc5\xd1\xb2\
-\x04\xcd\x56\x62\xe0\x52\x34\x5f\x42\x99\xa1\xfd\x9b\x22\x10\xa2\
-\x0e\x29\x21\x5b\x8f\xbf\xcb\x1f\xde\xfe\xb7\x7c\xf3\xce\x7f\xcf\
-\x7b\xdb\xaf\xe2\x85\x33\x06\x21\x1f\x4e\x38\x39\xfe\xd3\xb9\xe0\
-\xad\xde\x37\xf5\x08\xb3\xd3\xc6\xe9\x74\xb0\x3a\xe2\x32\xd9\x31\
-\x42\x76\xa3\x43\xb1\x5e\xab\xd5\x9b\x5b\x49\x50\xfa\x0f\x67\xe1\
-\x89\x14\xed\x94\x01\x3c\xb4\x3d\xdc\x7c\xc6\x34\x94\xc7\x5e\x3a\
-\x1f\xac\x4f\xba\x95\x01\x5e\x32\x15\xf9\x28\xa7\xa3\xe6\xa8\xfa\
-\xf2\x1c\x35\x57\xb6\x8f\xdd\x5c\xb0\x11\x6b\xdd\x25\xce\xda\x2e\
-\x93\xc5\x11\x6b\xda\x15\xc6\xc7\x29\x87\x85\xfc\x32\x18\xa4\xdc\
-\x3b\x78\xc4\x64\x6f\xc0\xe5\xf6\x0d\x6a\xed\x53\xc8\x66\x7c\x6b\
-\x9e\x7a\x12\x2e\x8c\x2a\x7b\x33\x66\xcf\x47\x8c\x50\x64\x20\x27\
-\x41\xc4\x70\xe0\x11\x1f\xf8\x0c\x07\x1e\xc3\x81\xc7\xe8\x6c\x9b\
-\xfe\x63\x83\x24\x88\x38\x53\x4f\x18\x8c\x12\xf2\xc1\xa8\x08\x76\
-\x4d\xb2\x12\x81\x9d\xcf\x69\x2a\x3a\x6a\x3a\x87\x99\x8f\xb3\xf9\
-\x93\x48\xee\xa8\xae\xdc\xaa\x70\xa2\x84\x11\x25\x53\xe1\xa9\x8e\
-\xb0\xb1\x32\x08\xe5\xe8\xbd\xc1\x6c\x4c\x47\x21\x90\x10\x22\xaa\
-\xd0\x66\xe5\x06\x24\x2c\x13\xc7\xb4\xd0\xed\x44\x70\xbc\xe9\xfc\
-\x2f\xe0\xda\x2d\xd4\x56\x87\xdc\x12\x70\x22\xd4\x22\x29\x34\xaa\
-\x1a\x4b\x95\x38\xdb\x27\xc4\x2a\xb4\x0d\x61\x18\x11\x86\x82\x4b\
-\xb6\x2c\x93\x38\x9a\x15\x00\x86\xd9\xe7\xbd\xed\x57\xb9\x7d\xfa\
-\x15\xa1\x05\xd8\x4f\xb8\x7d\xfa\x15\xee\x9e\xfc\x2e\x3b\x93\xad\
-\x42\xfa\xf8\x06\xef\x9f\xbc\xfa\xa1\x18\xcd\x30\xfb\x95\x6a\xdd\
-\x22\xc2\xe2\x74\x30\x60\xc3\x5c\x2d\x34\x9f\x5d\x28\xda\xb8\x07\
-\xd3\x90\x83\x69\xc8\xfe\xbd\x23\xee\xef\x85\x73\xc5\xd5\x98\x29\
-\x7a\x50\xc7\x53\xcc\x19\x1c\x28\x82\x52\x63\x38\x07\x1f\x3e\x2c\
-\x90\x65\xa1\xa8\x21\xb3\x77\x19\xd4\x55\x1a\xae\x6c\xb2\xac\x3a\
-\x0a\x1f\x69\x74\x58\x6e\xc6\xac\x69\x57\xd0\x33\x31\x6c\x3a\x39\
-\xdc\x93\x9f\xf7\x68\x3b\xe5\x7f\xfc\x3f\xfe\x6f\xfe\xe8\xab\xbf\
-\xc3\x5a\x57\x5c\xa5\x9c\xe4\x54\x0c\x85\x7a\x39\x79\xea\x89\x8f\
-\xc1\x48\x7c\xa4\x9e\x78\xbe\x7c\x3c\x18\x31\x4c\x7d\x46\x28\x34\
-\xc9\xe5\xd8\x51\xab\xed\x16\xc5\xee\xa2\xc4\xc2\x6a\x14\x63\xb0\
-\x28\x5f\x8b\xbd\x93\x4a\x16\xae\xcf\x4d\x48\x97\x54\x5b\x19\xd8\
-\xba\x3a\xdf\x44\x3a\x9f\x89\xed\xb6\xc6\x59\xc7\x44\x2f\x78\xe2\
-\xb2\xa0\x2b\x27\xa7\xdd\xcc\x17\x23\xfb\xf1\x39\xf2\x45\x0b\x15\
-\xcc\x62\x3a\xa3\x1c\x10\x35\x08\xe9\x17\xa3\xf9\x17\x6e\xc5\x42\
-\xc6\xc0\xb1\xc5\x0a\xad\xae\x41\xb0\xd6\x82\x4e\x07\xbf\x58\x38\
-\x5e\x2e\x61\xec\x17\xcd\x94\xf4\x1c\xe3\x21\x99\x0d\x98\xe3\xaa\
-\xa5\x9a\xce\xb2\x68\x05\x3f\xcf\xd0\xfe\x4d\x3c\x7f\x55\x06\x6f\
-\x79\x7b\x6f\x38\xe6\xfd\x93\x57\x19\x1e\xdd\x63\x67\xb2\xc5\xd6\
-\x4e\x32\xf7\xfa\x05\x36\x20\xea\xcc\xf1\xca\x7a\xa7\x49\x72\xea\
-\x32\xda\x9f\x59\xb7\x32\xec\x4a\xfb\x56\xe5\xcc\x67\xe0\x88\xe0\
-\xea\x0d\xfa\x92\xa7\x6d\x30\x6b\x09\x97\x4c\x44\x57\x9b\x65\xd9\
-\x38\x89\x18\x28\xf9\x85\x40\x2e\x9f\xab\x06\x70\x2f\x85\x61\x3a\
-\x9c\x2b\xf4\xca\xa3\x9b\x47\x74\x5b\x16\xd7\x5b\x1e\x57\xea\x2d\
-\x26\x8b\x23\x09\x25\x76\x72\xc1\xa2\xd4\x57\x2f\xcf\x7d\xcf\xfb\
-\x5b\x11\xaf\xff\xc6\x9f\xf1\x27\xbf\xfd\x7d\x8c\x56\x46\x9e\x77\
-\xc9\x07\x23\xc6\x76\x0d\xbc\x5c\x7c\x80\x98\x60\xf6\xf2\xd9\x24\
-\xb3\x5d\x34\x7b\x8a\xd7\xcb\x40\x6e\xb5\x5d\x70\x6b\xb4\x36\x16\
-\x38\x53\x33\x5a\x6d\x17\xa7\xb6\x8a\xd5\x71\x49\xdc\x06\x7a\x4f\
-\xb4\xe4\x5a\x9a\x43\x60\x5b\xb3\xc9\x8f\x0f\x29\xf4\xb4\x40\x23\
-\xc9\xba\x12\x13\x97\x38\xb8\x9a\x8d\x83\x41\x4a\xbd\x7f\x89\x44\
-\xf5\xe7\x98\x8d\x5e\x52\xe1\x2d\x47\x0a\xba\x59\x76\xa3\xc3\x88\
-\x18\x05\x2d\x0a\x49\x02\x5d\xb4\x7d\x43\x55\x58\x3f\x15\x7b\xe8\
-\x64\xfe\x54\x02\xc1\x2f\x16\x63\xfd\x3d\xec\x02\x8e\x88\xa0\xec\
-\x17\xcb\x5c\x3a\x45\x9f\x3b\x04\x52\xcb\x22\xe9\x0b\xa1\x91\x63\
-\xe5\x85\x6e\x19\xe9\x3e\x24\x79\x64\xb2\x42\x46\x54\x6a\x76\xcc\
-\xd9\x04\x09\xc2\x27\x78\x6b\x67\x3e\x40\x9f\x6d\x35\x78\x6f\x38\
-\x06\xbe\xc2\x0b\xfc\x02\x5b\x5b\xdf\x84\x96\x08\xf4\x6b\xeb\x17\
-\x3b\xeb\x7b\xa7\x11\x8b\x49\x0f\x55\x6b\xd0\x98\x4c\x79\xe4\x3f\
-\xe4\xd1\xfd\x77\x8a\xe5\x8a\xd0\x67\xb6\xf5\xb3\xf9\xa1\xce\xa2\
-\x00\x00\x20\x00\x49\x44\x41\x54\xcf\x1a\x9b\x3f\xb4\xc9\x95\xe3\
-\x98\x38\x3c\xe0\xee\x23\x9d\x31\xe0\x72\x28\xcd\xfc\x44\x37\x6d\
-\x02\xa3\x7c\x0e\x46\x9c\xc7\xbf\x29\x2d\x06\x4a\x4e\x3b\x9f\xbf\
-\x8c\xf6\xd2\xd9\xeb\x55\x48\x12\x27\x11\x5d\x8d\x82\xf9\x88\x49\
-\x1a\x62\x9a\xf2\x78\x64\xb0\x10\x3c\x46\xc7\xa4\x7e\xda\x84\x65\
-\x18\x1f\xa7\x34\x96\x35\x29\xd4\x87\x7b\xfc\xd1\xde\x19\xfe\xd7\
-\xfe\x98\x6b\x4f\xdf\xc2\x5d\x54\xa1\x09\x8d\x51\x07\x5c\x05\x45\
-\x73\xc9\x53\x4f\x64\xe7\x36\xa2\x08\x5b\xcb\x59\x0b\x14\x46\x45\
-\x07\xae\xcc\xd0\x07\x76\x8d\x86\x16\xe3\x8f\x1d\xdc\x4c\xa1\xd5\
-\x76\x19\xa6\x3e\x8a\xa6\x30\x0e\x23\x16\xac\xc7\x64\xdd\x0d\xa0\
-\xf7\xa1\x38\xb8\xda\xae\x2e\xa7\x3e\xf4\xa0\x27\x31\xf1\x74\xe3\
-\x59\x59\xd8\x55\x6f\x0e\x3b\xc0\x75\x92\x24\x44\xd1\x5b\x24\xc9\
-\x2c\xa0\x3d\xd5\x99\x37\x4f\x31\x81\xa4\xd8\xf3\xac\xdb\x89\x64\
-\x14\x88\xc2\x79\x5f\x89\x73\x78\x19\x20\x33\x67\xff\x94\x7e\x14\
-\x51\x37\x33\xea\xa5\x1d\x7d\x81\x7b\x35\x2c\xb9\x0f\x3a\xec\x47\
-\x72\xa8\xb4\xc4\xbf\x5a\xa8\x08\x0e\x38\x8c\x24\xa4\x98\x1b\xa8\
-\xdc\x7c\x88\x77\xf7\xe7\x48\xb2\x77\x49\x86\xbf\x07\x20\x03\xf4\
-\xd1\x7e\x22\x03\x79\x6b\x27\x61\xd0\xba\x3f\xbb\xb4\x3e\x21\x23\
-\x5f\x5e\x34\x51\xb5\x06\x1d\x05\x46\x63\xbf\x22\xfa\x3f\x60\x7b\
-\xf8\x00\xff\xd1\x2e\xdb\xc3\x07\xbc\xf5\x78\x9b\x38\x3c\x60\x5d\
-\xd7\xf9\xdc\x67\x9e\xe2\xd6\x17\x7e\x94\x9f\xf8\xb1\x4d\x9e\x7b\
-\xf6\xd2\x1c\xd5\x56\x16\x5f\x55\xaa\x4c\x63\xc8\x40\xc9\x59\xc8\
-\x47\x0c\x94\x5c\x06\xe8\xf9\x00\xae\x06\xf8\x93\x20\x47\xa6\x34\
-\x59\x6c\xc6\x5c\x59\x13\x19\x7f\x67\x32\xfb\x9c\xe3\x91\xc1\x64\
-\x71\x84\x9e\x1d\x62\x5f\x3e\x65\x7c\x3c\x0b\x9e\x9b\x9b\xd7\x71\
-\x17\x37\x79\x63\x47\xe7\x95\x3f\xfa\x6d\xe8\x17\xfc\x7d\x77\x8a\
-\xa2\xb9\x24\x76\x86\xa2\xb9\x45\x07\x4f\x64\xdc\x24\x50\x8b\x2c\
-\x9a\xa1\x17\xaf\x1b\x6b\x0e\x4e\xcd\x44\xd1\x5c\x94\x68\x82\x3f\
-\x15\x18\xb9\xa5\x39\x78\x6a\x8e\x1a\xc5\xe4\x66\x9d\x8c\x1e\x81\
-\x9d\x4b\x03\x42\x89\xe5\x3d\xe7\x89\x74\x1b\x34\xe6\xd8\x89\x5a\
-\xba\x7f\x21\x80\x57\x95\x04\xbf\xb3\x39\xd3\x6a\x90\x0a\x96\xa2\
-\x80\x16\x49\x12\x8a\x4c\x5c\x95\x81\x39\x66\xb1\xe3\xc8\x2c\x3a\
-\x5c\x85\xc8\x47\xc3\x22\x0e\x23\x34\xcb\x9a\x2b\xf6\xca\x72\x6d\
-\x12\x05\xa5\x4e\x4c\x14\x86\x51\x50\x74\xc7\x66\x66\x24\x32\x53\
-\x47\xb3\x8e\x1c\x56\x86\x92\xd6\x09\xe2\x44\xb6\x8d\xe4\xe2\x46\
-\x39\x6d\x91\xe3\x14\x13\xd9\x49\xf2\x2a\xf0\x45\xf4\xd6\x97\x09\
-\xe3\x5f\xe5\x51\xc1\xc4\x5c\x5b\xd7\x79\x6f\x38\xe6\xd9\x56\x83\
-\xb7\xf6\xbf\xc2\xdb\x6f\xde\xe2\x63\x2f\xde\x9b\x0b\x74\x39\xab\
-\x95\x3f\x85\xdb\xe9\x60\x91\x11\x46\x0a\x9b\x37\xdb\x6c\xd2\xe6\
-\xf2\xa2\xc9\x4b\x67\x9f\xe2\x2c\x0f\x49\x0e\x07\x72\xed\xed\xf6\
-\xf0\x01\x93\x57\xef\xf2\xe8\xfe\x03\xae\xdd\xbc\xc1\xb5\x4f\xa9\
-\x2c\xbc\xf3\x14\xb7\x4f\x7a\xb0\x53\x71\xc3\x29\x34\x0f\xe5\xed\
-\x4c\x69\xa2\xa4\x1e\x67\x5a\x93\x85\x7c\x34\xc7\x52\x68\x0c\xe9\
-\x65\x0a\x2d\xb5\xf9\xa1\x01\x5c\xc2\x92\x6e\x33\x96\x33\x73\x92\
-\x2b\x3e\xde\x23\xa8\x2d\x62\x03\xb5\xd1\x63\x76\x9a\x97\xb8\xb2\
-\x03\x8d\x55\x0d\x8e\xc4\xc9\x78\xea\x9d\xb0\xe8\x2e\xd1\x1b\x8d\
-\x38\x7a\xbd\xcf\xdb\x1f\xf9\x16\x9f\xfc\xc9\x97\x60\x0c\x89\x9d\
-\x11\x45\x21\x4e\x31\xfe\x1e\x16\xa6\x7e\x4a\x34\xc1\x2c\x82\xda\
-\x84\x4a\x8b\x5a\x50\x72\x6b\xd4\x19\xa1\x90\x07\x53\x86\xa9\x8f\
-\x65\x37\xe8\x99\x06\x6e\xa6\x10\x14\x63\x4d\xea\xe4\x88\xac\x58\
-\x28\xa3\xeb\x16\x49\x31\x39\x5d\x35\xe3\x2e\x19\x6f\xa5\xa3\x5e\
-\xc8\xc4\x55\x6c\x5c\x4e\x76\x64\x23\x31\x0d\x9a\x24\x21\xa5\x53\
-\x4a\x13\x4d\xe4\xfd\x66\x5e\xf0\xc4\x72\x70\x31\x87\x50\x21\xb4\
-\x72\x0c\x59\xd0\x39\x18\x84\x84\x16\x72\x71\xf9\x6c\x1a\x4f\x3c\
-\x6e\x9e\xc3\xca\xa5\xdc\x32\x2e\x9c\x34\x4d\x29\xd5\x01\x8a\xac\
-\x1d\x10\x02\x2e\x81\x96\x60\x39\x3a\x61\x98\x14\x5d\xc0\x59\x6b\
-\x58\x37\x33\x32\x9a\xd4\x8a\xe0\x1b\xb4\x5e\x01\xbe\x48\x32\xfc\
-\x3d\xac\xac\xce\xb5\x75\x9d\x47\xfb\x02\xff\x3e\xbb\x2e\x32\xb1\
-\x45\x5d\x06\xf0\xf9\xdb\x33\x5d\x85\xd6\xca\x2d\x08\x1b\xf4\x95\
-\x00\xc2\x08\x6f\xff\xa8\x70\xfb\x11\x96\xfb\xc9\x24\x81\xe5\x7d\
-\x7e\x64\xfd\x69\xec\x8f\x76\xc9\xc6\xbf\xc4\x07\xdf\x7e\xc8\xdf\
-\xfe\xcd\x5f\xb1\xb7\x1f\xf2\x77\xbf\xe1\xb0\x6a\xbc\x22\xe9\xb6\
-\x83\x05\xc1\x54\xe8\x41\x1d\x37\x8f\x28\x4b\x15\x25\xf5\xc8\x35\
-\xf7\x42\x00\x0b\x38\xd1\xa2\xa5\xc2\x30\x1b\xa1\x07\x36\x0d\xe7\
-\x43\x8a\x3f\xb7\x03\x44\xc4\xa3\x88\xc3\x0a\xc4\x5a\x75\x14\xf2\
-\xe9\x29\x41\x7f\x91\x40\x69\xa2\x37\xcb\xe0\x4e\x4b\x89\xb8\xa0\
-\xfd\xbc\x13\x16\x9b\x37\x78\x5b\x39\xa0\x7b\xf0\x88\x6b\x0f\x6e\
-\xe1\x5c\x5b\x64\x1c\x8a\x55\xc0\x5e\x34\x9b\x7a\x51\x08\xc8\x4d\
-\x9b\x28\x0a\x30\x4d\x8b\x24\x50\x49\xec\x0c\x93\xa0\xa0\xcf\x54\
-\x02\xdb\xa4\x1d\x58\xf4\x19\xd1\xd2\x1c\x46\x41\x97\x66\x31\xf8\
-\x59\x76\xf7\xec\x69\x97\x32\xa3\xc9\xac\xeb\x4d\xb1\xcf\x65\xe8\
-\x71\x00\x49\xd6\x65\xb4\xbf\x3b\x87\x89\xab\xd9\xb8\x2a\xc5\xac\
-\x4e\x8b\xb8\x99\x4f\x2f\xd3\x68\x35\xad\xc2\x64\xbb\x12\xc0\x31\
-\x16\xe1\x79\xdd\xb0\x99\x12\x87\x0a\x56\xa8\x30\x31\x85\x54\x4f\
-\xc3\xfa\x7b\x2b\xed\xf2\xc4\xc8\x4c\x45\x32\x1e\x73\xf2\x4e\x20\
-\xed\x98\x44\x1d\xbd\xe8\xda\x95\x8d\x13\xf1\x7d\xc7\x56\x46\xcd\
-\x74\x51\x69\x52\x37\x67\x99\xb4\x3d\xbc\xc9\xee\xc1\x26\x7a\xeb\
-\xcb\x73\x50\xa1\xcc\xb6\x96\x2f\xde\xbd\xb7\xdf\xbc\x45\xe8\x4c\
-\x2e\xfc\x5e\x35\xf5\xbf\xc1\x9a\x5e\xe2\xc4\x3f\x65\xb4\xd7\x67\
-\x74\x16\xb2\xb5\x1f\xf0\x68\x7b\x97\xec\xf6\x6d\x1e\x6d\x6d\x13\
-\xee\xff\x2d\xea\x96\xc6\xde\xfd\x3f\x67\xe1\x83\xbf\xe3\x73\x37\
-\x1e\xf3\x33\xff\xf2\x13\xfc\xea\x6f\xfd\x77\xfc\x4f\xff\xe6\x7f\
-\xe7\x67\x7f\xea\xd3\x18\xd6\x1a\x77\x1f\xe9\xdc\x7d\xa4\xe3\x6f\
-\x9f\x48\xa1\xba\xa7\x98\x73\x81\xd8\xce\x67\xae\x8f\xe7\xe1\x03\
-\x40\x4b\x6d\x5e\xa0\xdc\x4a\x96\x02\xb7\x33\x9b\x6a\xfe\x30\xf1\
-\xcd\xf4\x94\xb3\xb6\x2b\x70\xf1\x13\x6e\xca\x66\x4b\x4c\x44\xe7\
-\x6b\xd4\x4f\x9b\xec\xe5\x6d\xc2\xa2\x59\x55\xf2\xc6\x4a\x34\x41\
-\x21\xc0\xc9\x1a\x58\xa6\x58\x38\x5f\x72\xc9\x7a\xa0\x4a\xfe\xb7\
-\xec\xf6\x0d\xe8\xa3\xb4\x9b\x45\x21\xd7\xc7\x60\x71\xd6\xd5\x2b\
-\x68\xb9\xf3\x1d\xbd\xf3\x10\x23\x48\xc5\xd8\xbe\x36\xec\xd3\x5c\
-\xdf\x98\xe3\x89\xab\x85\x5d\x75\xc6\xae\x4a\xd1\x8d\x5c\x85\x8e\
-\x2a\x6c\x00\xc6\xea\x14\xed\x17\xff\xeb\x2f\xff\x8a\x0e\xa8\x89\
-\x82\x9e\x24\xd4\x0c\x71\x22\xd5\x12\x05\x3d\x0a\xd1\x93\x04\xc5\
-\xd5\xd1\x0c\xd0\x93\x18\x8d\x84\x29\x86\xa4\xe5\x94\x22\x1b\xab\
-\x18\xe4\x24\x92\xaa\x8b\xb1\xa8\x25\xb3\xcf\x51\x99\x71\xc5\x96\
-\xa1\x93\x62\x54\x8c\xe0\x22\x62\x55\xc1\x30\x74\x30\x4d\x6c\x1d\
-\x14\xea\xd4\x4d\x9d\x20\xb3\xc8\xb5\x3a\x5e\x36\xe2\x71\xfe\xef\
-\xb8\xba\x92\xe0\x0d\x3b\x1c\xbe\xb1\x8d\x72\xa9\x18\x25\xf2\x32\
-\x3a\x4d\x95\xc3\x3c\xc4\x98\xea\x2c\xaf\xf6\x30\xa6\xfa\x1c\x66\
-\xfe\xcc\x8d\xcf\xd3\x5d\x79\x89\xae\xbd\x44\xbd\x6e\x50\x37\x14\
-\xb2\x85\x36\x76\xb6\xc6\x7e\xf2\x01\x77\xb6\x15\x26\x83\x6d\xa6\
-\x6a\x9d\xfe\x60\x80\x91\x65\xec\xbd\x99\xf3\xc6\x5f\xff\x21\x6a\
-\xf8\x3a\x6b\xa9\x4f\x67\xc1\xe3\xb3\x3f\xb4\xc6\x17\xfe\xe9\x97\
-\x59\x79\xee\x29\x06\x93\x6d\x1e\xef\xe8\x4c\xa3\x13\xe2\x72\xb7\
-\x71\x26\x7e\x66\x3a\x56\x09\xf5\x31\x2d\xb5\xc9\xd8\x8f\xa9\xd5\
-\x04\x3e\x48\xfd\x84\x7a\x2d\xc6\xf7\x35\xac\x9a\x2f\x77\xb4\x69\
-\x0c\xd1\xf5\x36\x75\x37\xa1\x6b\x59\x84\xb9\x8e\x55\xc9\x44\xd9\
-\x24\x91\x1f\x43\x2f\xa1\x55\xac\x9f\x5d\x4d\x14\x8c\xc6\x21\x8e\
-\xd9\x64\xd8\xee\xa3\x9b\x8b\xf8\x9e\x4a\xcf\x88\x51\xce\x7c\x2c\
-\x25\xe1\x99\x4f\xac\xb0\x70\xe3\x32\x2d\xd7\x66\xd5\x5d\xa6\x96\
-\xe5\xc4\x9a\x82\x12\x65\xc5\x32\x4a\xa8\xe5\x35\xd4\x58\xa1\x5e\
-\xc1\xec\xbe\x3a\xa6\x96\x8b\x00\xcc\x8c\x29\x09\x31\x6a\xdc\x25\
-\x1f\x3c\xa6\xd6\x71\x38\xeb\xeb\x9c\xa9\x27\xb4\x8c\x04\xd7\x76\
-\x19\x4d\x5b\x44\xe9\x09\x79\x6a\x52\xaf\x6b\x04\xe9\x04\x63\x9c\
-\x41\x79\x5f\x15\xef\x8d\xa1\xe6\xa4\xa9\x81\x5f\x5f\xe0\xcd\x6f\
-\x7e\x93\xe1\xe8\x84\x49\xbd\xc6\xc2\xd9\x19\x43\xd3\xc2\xd5\x14\
-\xf2\xec\x21\x6b\xaa\xcb\xc6\x33\x9b\xb4\xad\x0e\x51\xae\x12\xe5\
-\x85\x47\x45\x9c\xc9\x8c\xfc\x6b\xff\xe7\x1f\xa1\x0b\x6b\x53\x87\
-\x04\x5f\x98\xc1\x61\x61\x11\xcc\x74\x0b\xa6\x45\x1c\xce\xb2\x68\
-\x35\xb3\x96\xc1\x1a\x57\x38\xd7\x27\x57\xe6\xd6\xdc\x72\x9b\xb0\
-\x92\xad\x6b\xa1\x32\x6f\x08\x57\xb9\x1d\x4c\x32\xd6\xcc\x33\x0e\
-\x22\x91\x05\x1a\x87\x75\x0e\x82\xeb\x5c\xbd\xa2\xf3\xe7\xcf\x7d\
-\x89\x65\x7e\x67\xae\x80\x7b\x76\xbd\xc1\x23\x3f\x99\x7b\xee\xda\
-\xba\xce\x4f\x7e\xfc\x0b\x2c\x2d\xff\x27\x5c\xaa\x5f\x2d\x76\x74\
-\x44\xf2\x0a\xd0\x6f\x4c\x66\x45\xdd\x51\x4a\xef\xf6\xdb\x2c\x6f\
-\x74\x08\xba\x4b\x40\x1f\xbb\xb6\xce\x07\xbf\xb7\xc7\xdf\xd5\xff\
-\x3f\xae\x6f\xbe\x0e\xc0\x47\x3e\xb3\xc6\x27\xd7\x6e\xb1\xf1\x8f\
-\x3f\xc3\x6b\xee\x21\xb7\x4f\x74\xde\x7a\x73\x0b\xc3\x9f\xce\xb1\
-\x0f\x25\xe6\x05\x9b\xb1\x1f\x93\xd8\x21\x2d\xa7\x49\x4a\x8b\xa6\
-\x33\x94\x99\x57\x64\xab\x56\xf1\xae\x74\x8a\x63\xff\x43\xdf\xcf\
-\x72\xa2\xba\xf4\xb5\x98\x36\x2f\x09\xaa\xad\x07\x70\x0f\x75\x22\
-\x0c\x59\x0e\xfd\x14\x9a\xb0\xdc\x8c\x59\x6e\x5f\xe6\xc6\x66\xca\
-\x38\x99\x5c\xd0\xc7\x34\xe2\x0c\xb4\xf3\x97\xed\x1c\x37\x6b\xe0\
-\xa9\xb9\x94\xbd\x8a\x0c\xdd\x07\x57\x11\x8d\x92\xc6\x18\xb5\x1f\
-\x33\xb6\x6c\x8c\x54\xa3\x49\x0f\x34\x87\x51\x01\x21\x12\x54\x90\
-\xf3\x95\x36\x78\xa1\xc8\xca\xde\x94\xc6\xba\x45\x6f\x5f\x70\xd8\
-\x49\xfb\x13\xac\xd6\x1e\xb0\xdd\xee\x4a\x38\xa1\xa8\xd7\x39\xcc\
-\x61\xc2\x31\x70\x4d\xb2\x1a\x1d\x35\x95\x7c\x71\x3f\x2b\xd6\x1d\
-\xa4\x1d\x13\xc2\x14\xbd\xf0\xee\x4d\xa2\x10\xaf\xd2\xc9\xd1\x41\
-\x42\x0c\x2b\x8c\x88\x2d\xeb\x42\x73\xc4\xac\x48\xfa\xce\x5f\x00\
-\x8d\x8a\xb2\x38\x0b\x15\x72\x2b\x90\x01\x3f\xb3\x69\x61\x7e\x2b\
-\x53\xc9\x48\x98\x11\x07\x91\xc9\x42\x9e\x31\x6d\x5d\x63\xaf\xbf\
-\xca\x20\xfb\x0a\xbb\xf7\xbf\xc4\xf2\xc2\xd7\xe7\x0a\xb8\xf2\x76\
-\x6d\x5d\xa7\x15\xfc\xfc\x5c\x97\xaf\x96\x3f\xc5\x7a\x7d\x79\x26\
-\x12\x2a\x30\x77\x33\xea\x73\x82\xc9\x60\xef\x69\xe0\x51\x65\x6a\
-\xb8\x4f\x3c\x8a\x88\x2e\xf5\x78\x6a\xba\xce\x71\xba\xc8\x71\x00\
-\x3b\x77\xf7\x50\x6a\x8b\xfc\x7e\xff\x80\x1f\x68\x6f\xd3\xe8\xde\
-\xa2\xd7\x9a\x70\x39\x5c\x27\x5e\x8d\x78\xf7\xf0\x08\x86\xa2\x62\
-\x6e\x34\x0d\x81\xd7\xba\xcb\x6c\x5c\xb6\x8a\x89\x66\x97\x2c\x39\
-\xa6\xa5\xb5\x80\xd6\x6c\xbe\xc7\x2d\x27\x34\x2c\x7a\x59\x9f\x5e\
-\x56\xdc\x1f\x86\xe0\x96\xcf\x9b\x52\xbd\x56\x8a\xee\x71\x2c\x76\
-\x26\x43\xae\xec\xc0\x6e\x6e\x90\x4f\x4f\x39\xf4\x73\x8e\x07\x42\
-\x73\xac\x3a\x1a\xbd\x6c\x84\xa2\x5e\xe7\xd9\x4f\x6a\xb8\x8b\x9f\
-\x20\x88\x54\xc2\x48\xc1\xcd\x14\xbc\x22\x38\x7d\x03\xdc\xac\x0c\
-\xdc\x2e\xd0\x17\x81\x1b\x08\xad\x76\x29\xa4\x8f\x0a\xd5\x9b\xa2\
-\xb9\x15\xe8\x98\x57\xc4\x43\x8a\xa4\xe6\x02\xb7\x81\x4e\x4e\x80\
-\x8d\x4d\x3a\x5f\xd4\xb9\x35\xe1\x0c\xd4\x12\x05\x7b\x4b\xbf\xc7\
-\xe1\x14\x36\x07\x3d\xb6\xdb\x5d\x09\x2d\x56\x95\x84\x3a\xcb\x73\
-\xf8\xba\xaa\x88\x93\x3c\xb1\xc4\xc3\x61\xb9\xdb\xcd\x22\x26\xc0\
-\x28\xd4\xfe\xfd\x0a\xbd\x16\x5a\x79\x91\x27\xac\x8b\x58\xf7\x5c\
-\xe6\x45\x1a\x70\xcf\xa8\x38\xd5\xca\x49\x8b\x6c\x3f\x1b\x37\x14\
-\x5b\x4a\xcb\x5d\xce\x16\x30\x54\x72\x3a\x39\x1c\x44\x26\x6d\xa3\
-\x41\x3f\xde\x23\xed\x9f\xd1\x79\x76\x8b\x6f\xfe\xfb\x5b\xc0\x7d\
-\xd8\xb9\xf5\xa1\x3f\xff\x6a\x7d\x13\x96\xf7\x99\x2a\x2f\x73\xb0\
-\x7d\x9d\xcb\x9b\x2f\x17\xeb\xc8\x84\x6b\x8c\x19\xaa\x58\x56\x46\
-\x88\x45\x3b\xe8\xd3\xd2\xef\xd1\x2b\xc4\xef\xdd\xd6\xec\x77\x0b\
-\x8e\x2c\x76\xd4\x90\x5e\x76\x57\x9c\x14\x2b\x21\xad\x74\x91\xe5\
-\xe9\x1e\xaf\xeb\x21\xda\xc0\xe0\x8a\xb9\xcf\x6e\xb4\x3e\x87\x83\
-\xc7\xea\x94\x06\x06\x5a\x73\x80\x9b\xb7\x00\x4b\x4e\x63\x64\xfe\
-\x06\xe4\x23\x32\xa5\x89\x8a\x06\x6e\x5f\x06\xf0\xe9\xc8\x60\xb1\
-\x09\xbd\x61\x48\xcf\x35\xc1\x0d\x81\x0e\xbd\x61\xbf\xb8\x2f\xfc\
-\x28\x4a\xac\xbc\x73\x10\x62\x34\x4d\x0e\xfd\x81\xb4\xae\x3a\x1d\
-\x19\xa8\xce\xa8\xe0\x89\xfa\xe0\xc1\x83\xef\x7f\x8b\xef\xbf\x96\
-\xb3\xfe\xdc\x2a\xa1\x16\xe1\x45\x0a\x0e\x2e\x69\x60\x11\xdb\x01\
-\x35\xb3\x26\x0b\xd2\x5e\x69\x09\x30\x84\x86\x65\x62\x4e\x8b\xeb\
-\xa4\x9a\x42\xa4\xc9\x29\x0e\x80\x78\x1c\xa2\x07\x11\x8d\xc5\x18\
-\xa8\x31\xa2\x4b\x93\x1e\x8a\xe6\x62\x07\x82\x6e\x0b\x52\xe4\x5e\
-\xbb\x32\x0b\xe3\xd6\x04\xbb\x30\xec\x33\x5c\xd0\x61\x4f\x04\x6d\
-\x99\x89\x6b\x8f\x4f\x99\x5e\x5a\x64\xd8\xaa\xcb\x4c\x0c\x42\x04\
-\xe4\x5d\x18\x58\x05\x3d\x2e\x38\x62\x2a\x05\x9d\x4b\xe1\xda\x13\
-\x2a\xd2\x97\xb8\xea\x00\x64\x86\x11\x69\x31\xce\x54\xce\xdc\x95\
-\xa3\x97\xd5\xcc\x6b\x5e\x10\xd2\x17\x99\xbb\x42\xbd\x95\x59\x58\
-\x2c\x83\x34\x2f\x64\xe2\x49\x98\xd1\xa1\xc5\x59\x32\xa0\x71\x78\
-\x51\xee\x57\x7a\x50\x7c\xec\xc5\x7b\xb3\xe6\xc6\xf2\x3e\xba\xfa\
-\x1c\x64\x70\xf5\x0a\xe8\xfb\xc7\xec\x2c\x42\x27\x6b\x62\x60\x13\
-\x11\x11\x45\x30\x3a\x13\xfb\x9a\xcb\xc2\x62\xb9\x0d\xc7\x03\x53\
-\x8e\xfe\xe0\x85\xf4\xdc\x70\x2e\xa8\x03\xee\x32\x5c\x09\x79\xf6\
-\xbe\xc1\x6e\xbe\x8b\xb8\x0e\xec\x72\xa4\x39\x28\x99\x37\x33\x27\
-\x18\x29\x33\xff\x5b\x99\x41\x2d\x7a\x4e\xa9\x81\x1d\x81\x27\x5a\
-\xc9\xbd\x61\x48\x8f\x10\xd5\x0d\x39\x1d\x35\x51\xdd\x10\xbc\x7e\
-\x91\xa9\xfb\x32\x53\x0b\xa8\xd1\xa7\x97\xcd\x8a\xbe\xe3\x81\x08\
-\xd4\x4c\x69\x16\xe3\xff\x5a\x45\x38\xdf\xa1\xdb\x8a\xd8\x39\x08\
-\xf9\xf3\xbf\xf9\x36\x3f\x6a\x5e\xe5\xfa\x3f\x5a\x27\x39\x55\x21\
-\x4c\x50\xcc\x84\x1a\x35\x99\x60\xb2\x50\x41\x35\x2d\xb2\x28\xa4\
-\x99\x29\xa4\xc0\x59\x18\xd0\xb0\x4c\xb4\xb3\x29\x69\x23\x23\xee\
-\x87\x0c\x06\x43\x74\xdb\x22\x09\x42\x74\x3b\x11\x41\xab\x19\x40\
-\x4f\x76\xf8\x02\x3b\xc7\xf6\xa6\x42\x5e\x6f\xe7\xd8\x81\x22\x8a\
-\x3f\xb7\x2e\xf6\xdc\xad\x2b\x0c\x4e\x12\x5a\x67\x09\x3b\xa7\x1e\
-\x87\x8b\xae\xcc\xc4\xab\x97\x16\x39\x9c\x66\x7c\x62\x28\x32\x71\
-\xd9\xae\xee\x67\x1a\x64\x33\x83\x96\x8e\x9a\x8a\x41\x51\xbd\x17\
-\x93\x48\x6d\xc4\x19\x16\x0b\xf8\x76\x42\xde\x13\x15\xb4\x62\xb7\
-\x30\x80\x04\xd0\x7b\x3a\xd8\x7d\x30\xad\x8a\x34\x33\x42\x43\x41\
-\xa1\x47\x8e\x2d\x7c\x2b\xe4\x88\x87\x78\x2d\xaa\x9c\x24\x5a\xa8\
-\x88\x0d\x9e\xf9\x03\x31\xbb\x67\xad\x41\xa8\x14\x1c\x74\x3e\x6f\
-\xce\x9d\x2e\xa0\xe1\x61\x53\xc3\xd4\x23\xf4\xd6\x97\xf9\xa8\xf1\
-\x87\xbc\xfb\x5e\x4c\x76\x6b\x85\x5b\x9f\xbb\x83\xe5\xd7\x65\x20\
-\x03\x12\x4a\x04\xf9\x1f\xf0\xb5\xdb\xaf\x70\x6d\x5d\xe7\x36\xd0\
-\x7a\xf8\xf3\x5c\xbd\xa2\x73\xeb\xca\x75\xe2\xa8\x83\x12\x29\x1c\
-\x1f\x1c\xb2\x35\xd9\xa6\x3f\xd1\x67\x01\x51\x09\x96\x7e\x43\x81\
-\x0c\xd4\xd1\x80\x56\xbb\x45\x3f\x53\xe8\xa8\x39\xc1\x3d\x8b\xbf\
-\x56\x4c\x5c\x67\xa6\x9e\xf3\xfd\x90\x3c\xc9\x19\xfb\x31\x8d\xac\
-\x86\xd6\x14\x13\x25\xc3\x74\x48\xcb\x6b\x51\xb2\x6c\xc2\x33\xad\
-\xf4\x93\x80\x5e\x16\x16\x41\xda\x11\x01\xab\xcc\x9a\x1c\xaa\x37\
-\x2a\x68\xb6\xd2\x87\xa2\x2f\x7f\xb7\xed\x91\xd0\x1a\x7b\x8a\x09\
-\x0a\xb8\x8e\x46\x5c\x06\xa4\x53\x99\x84\x2e\x9d\x84\x0e\x42\xee\
-\xbe\xf2\x75\x5e\xfc\xe4\x2f\xf2\xec\xb3\x26\x7b\x87\x42\x28\x5f\
-\x62\x5d\x5f\x1d\x93\x9b\xf6\x1c\xb4\xd3\x81\xba\x69\x15\xd0\xc3\
-\x42\x07\x14\x26\xb4\x25\xdd\x53\xa3\xd3\xe9\x08\x3e\xd9\x9b\xca\
-\x00\x1e\xa1\x08\x28\x61\xe7\x42\xce\x99\x4e\x44\x16\x4e\x27\x82\
-\xb9\xb0\x61\x95\x7a\x11\x55\xf3\x98\x18\xa0\xf6\xf8\x14\xda\x5d\
-\x69\xb2\xdd\x51\x53\x19\xc8\xe5\xfd\xea\x94\x88\xf6\x5f\xfc\xf4\
-\x8f\xfc\x4a\x42\x88\x81\x4d\x42\x48\x42\x08\xf1\x04\x8b\x05\x01\
-\x29\x8c\x0c\x35\xd0\x89\xe3\x3e\x06\x36\xaa\x91\xe1\x27\x09\xd3\
-\x24\xa1\x96\x24\x78\x7a\x4c\x8e\x41\x14\x25\x4c\xf4\x98\x29\x31\
-\x71\x94\x00\x06\x89\xfc\x35\x21\x4b\x14\xb2\x44\x41\xb1\x72\x32\
-\x0c\xe2\xe4\x4d\x3e\xd8\xff\x36\x0b\xcd\x65\x74\xe3\x92\x1c\x63\
-\xb2\x30\x88\x8d\x9c\x3a\x53\xb4\x54\xc1\xa6\x46\x6a\x66\x4c\x26\
-\x3e\x63\xe5\x1b\xdc\x7b\xfb\x98\x93\x93\x4c\xec\x55\xde\xb9\x44\
-\xf3\xd6\x21\x9f\xfb\xd8\x98\xab\xfa\xbf\xe0\xa5\xa7\x7f\x90\xcd\
-\xa7\x9f\x26\x0d\x56\x89\xf9\x80\x7b\x47\x5b\x0c\xbc\x8c\xc3\x3c\
-\x64\x2f\x7b\x83\x3b\xfd\xef\xb0\xa8\x83\x37\x9e\xd2\x4e\x1b\x0c\
-\xec\x2d\xfa\xdf\x07\x6d\x1a\x31\x6d\xa7\xc4\x6c\x31\xad\x5f\x47\
-\x09\x85\x88\x3d\x19\x9b\xb4\xea\x09\x66\x6c\xc2\x14\xa6\xd1\x90\
-\x49\x34\x21\x74\x2d\xd2\x30\x91\x8f\x83\xc8\x44\x53\x75\xb2\x2c\
-\x21\x9e\x66\xc4\x4a\x4a\xbd\x36\x2b\x77\x4d\xd5\x24\xac\x25\x58\
-\x8a\x81\xd1\x34\x71\x4c\xa8\x4f\x15\xc2\x5a\x42\x57\xb5\x08\x73\
-\xb7\xc8\xb8\x1d\x16\xcc\x29\xe1\x28\x41\x71\x6d\xb2\xb8\x86\x52\
-\x1b\x02\x1d\xfc\xe9\x84\xfa\x24\xa1\x6f\x4c\x48\xc6\x85\xb6\x42\
-\xb1\xa9\xa1\x11\xda\x01\xc9\x38\x27\xd7\x03\x42\xc5\xc0\x3a\x57\
-\x2a\x8b\xe9\x14\x97\xb7\xb6\x1f\x92\x3c\x7a\xc4\xf2\xd3\x4b\x58\
-\x96\x42\x10\x66\xc4\x7e\xc8\xd4\xc8\x69\xc4\x19\x5a\xc3\xc0\x0c\
-\xc7\xd4\x95\x3a\x53\x45\x4c\x87\x5b\x53\xc1\x17\x5b\x53\x15\xcd\
-\xca\x31\xb3\x4b\x58\x16\x58\x96\x85\x65\x59\x34\xc9\x31\x62\x85\
-\xc0\xce\x71\xe2\x99\xd6\xc2\x88\x15\x62\x03\x8c\x71\x46\x6c\x40\
-\x9c\xa7\xd8\x81\x78\x0e\x6c\x54\x4b\x25\x1f\x2b\xdc\x79\xff\xfb\
-\x78\x8f\xdf\x66\x52\xaf\xb1\x39\xe8\x31\x34\x2d\x86\xa6\xc5\x8a\
-\xbe\xc5\xd2\xd4\x61\xe3\x99\x4d\x14\x12\xf2\x22\x60\xa3\x5c\xa5\
-\xa3\xa6\x44\xb9\x4a\x96\x25\xfc\xd6\x57\xfe\x10\xd5\x62\x01\xd7\
-\x6e\x11\xd9\x09\xae\xdd\x62\x59\xe9\xe0\xda\x2d\x74\x3b\x41\xb7\
-\x13\xc1\x5c\x74\x0d\xc2\x5c\x7c\x0e\xa6\x45\x6e\xe6\x58\x1d\x13\
-\xc5\xcc\x31\x8a\x49\x00\xdd\xb4\x30\xb0\x31\xb0\xd1\xcd\x99\xfa\
-\x21\x89\x42\x4c\xc0\x8c\x42\xcc\x28\x44\x09\xed\x19\x9e\x4e\x5f\
-\xe3\xde\xce\xc3\x62\x0a\x44\x29\x67\x92\x69\x84\x2a\x2a\x4d\x6c\
-\x12\xd2\xa2\x7d\xed\x98\x1d\xf6\x5f\xbf\xc9\xfe\xc1\x4c\x20\x74\
-\xeb\x73\x77\x24\x0b\xf1\xc2\xa7\x9e\xe1\xd6\xe6\x3f\xe1\x52\xfd\
-\x2a\x97\xd5\x29\x07\xdb\xd7\xe7\xba\x75\x96\x5f\xc7\xf2\xeb\x7c\
-\xed\xad\x57\xf8\xc3\xdb\xff\x96\xbb\xe9\x9f\xb2\xb5\x93\x30\x3e\
-\xf5\x78\x3c\x78\xcc\xe9\xe1\xeb\xb4\x94\x17\x58\xab\x59\x2c\xb7\
-\x3b\xe4\x0b\x1b\x73\xe3\x45\xa5\x26\x42\xd5\x97\xe9\x8c\x73\x94\
-\xa6\x42\x4b\x6b\x15\x45\x1a\x9c\xa4\x21\x03\x25\x27\x76\x75\x9a\
-\xce\x6c\xec\xa0\x7c\xfd\x82\x92\xae\x69\xce\x15\x6c\x42\x1f\xd1\
-\xa7\x37\x0c\xe5\x7d\x31\xf2\xd4\x14\xe3\xfa\x45\xd6\xed\x8c\x73\
-\xc9\x4b\xcf\xae\x3e\xae\x3c\xb6\xfd\xf3\x56\x58\x45\x07\xb1\x3b\
-\xa5\xdb\xbc\xc1\xab\x8f\x8e\xf8\xcb\x5f\xfd\x0e\x4d\x7f\x97\x56\
-\xc3\x43\x35\x81\x48\xc3\x37\x1c\xa2\xc1\x94\xb1\xa1\x12\xa8\xa7\
-\xb8\x99\x82\xe6\x09\x51\x8f\xe6\x8d\x69\x92\x17\x8f\xfb\x52\xe9\
-\x56\xc2\x06\x79\xe5\xb4\x73\x9a\xe4\x0c\x0b\xab\x5a\x5b\xab\xcb\
-\x6c\x6c\x07\x8a\xe4\x8b\xed\x20\x84\x20\x61\x90\xcc\xff\x9e\xdb\
-\xed\x2e\x4a\x20\xda\xcf\x47\x89\x18\x78\x9d\x70\x4c\xab\xf4\x7e\
-\xf6\xa6\xe8\xba\x45\x3f\xd3\xe6\x70\xb1\xaa\xdb\x09\x3e\x60\x06\
-\xe2\x1f\xde\xb3\xc4\x6e\x0d\x1f\xc4\x0a\x00\x53\x00\x7a\xbb\x31\
-\x73\xc1\xb4\x2d\x21\xa0\x4f\x2c\x6b\x0e\xc5\x1a\x56\x8e\x61\xe5\
-\x98\xc5\xe5\xc8\xb4\x4c\x9c\x4e\x47\xf8\xfe\x9a\x16\xe0\xa2\x12\
-\x12\x84\x21\x77\xf3\xff\x55\xd0\x43\xca\x5d\xe2\xfc\xa0\x70\xf0\
-\x11\x05\x9e\x6e\xe6\x4c\xa3\x79\x83\xef\x99\xf1\x21\x64\xb7\x56\
-\xf8\xd8\x8b\xf7\x64\x60\x86\xce\x84\xdb\xdf\x79\x9f\xa4\x7f\x80\
-\xe7\x05\x6c\xed\x07\x24\xc3\xdf\xbb\x80\xa1\xab\x0d\x90\xaf\xbd\
-\xf5\x0a\xca\xde\x1b\x38\xcf\x37\xb8\xfe\xf2\x35\x3e\x7e\xeb\x9f\
-\x61\xac\xcc\x3b\xb2\x8b\x4b\x79\x87\x7e\x43\xa1\xad\x37\x51\xf5\
-\x65\x31\xc8\xa9\x98\x74\xd4\x1c\x4f\x99\x0d\x78\xb6\x73\x45\x52\
-\x6b\x23\xdf\x96\xcd\x8b\x52\x99\x86\x27\xa0\x83\xf4\x10\x2e\x9c\
-\xe0\x05\xb6\xed\xc8\x21\xd0\x4c\x69\xa2\xe6\x23\x7a\x03\x71\xe2\
-\xa8\xf9\x88\x38\x11\x3f\xb3\x2a\xcb\x1c\x33\x65\xcc\x14\x35\x1f\
-\x49\x51\x7e\xf5\xb9\x6a\x20\x1b\xad\xde\x9c\x1b\xfd\x9f\xbf\xfb\
-\x36\xbf\xf3\x17\xc7\x4c\xb3\x45\xda\xed\x36\x0d\x2d\x46\x89\x26\
-\xe4\x66\x9d\x1c\x1b\x3b\x5b\xc4\x57\xc7\x28\x9a\x2b\x8f\x23\x14\
-\x52\xb7\x41\x93\x99\xfa\x6d\x54\x42\xc5\x73\xc3\xa7\x33\x9e\x6e\
-\x3a\xd7\xfc\x28\x1b\x22\x81\x7d\x8e\xe2\x5b\x9c\xb1\x1d\x57\xa6\
-\x16\x87\xd3\x4c\x52\x6d\x25\x3b\x51\x16\x86\x25\x4b\x51\x1e\xc7\
-\xea\x14\xd5\x9f\xfb\x25\x74\x12\x7c\x72\x33\x27\xd4\x45\x00\xf8\
-\x51\x48\x82\x2f\x46\x7e\x0a\x86\x22\x0e\x15\x6a\x85\x68\xc7\x8f\
-\x42\x92\xa2\xfb\x53\x32\x1c\x51\x18\x11\x59\xa6\x38\x16\x18\xcb\
-\x04\x22\x33\x11\x8f\xf5\x37\x61\xbf\x25\xb3\x71\x9c\x6c\x31\xee\
-\x4f\xe4\x40\x7d\x52\x14\x7d\x7e\xb9\xfe\xd4\x6e\xa0\x16\x93\xd5\
-\xed\xa5\xcb\x7c\xfe\x7a\x3e\x17\x94\x65\xa7\xee\xfb\xde\x57\x85\
-\xca\x6d\xb2\xcd\x9d\x6c\xcc\x9d\x6c\x4c\xe8\x4c\xe4\xeb\xe5\xb1\
-\xfc\xba\x37\x1b\x62\x82\xe3\xea\x15\x9d\x5b\x2f\x7d\x94\xab\x1f\
-\x79\x99\xeb\x2f\x5f\x63\xf3\x4a\x87\xfe\xd9\x90\x87\xc3\x1e\xbb\
-\x7b\x8f\xd1\x83\x3a\x63\xa6\x85\x7d\x54\x73\x6e\xa0\xb3\x1a\x58\
-\x4f\x52\xa8\xa5\xb4\x64\xa0\xe3\x09\xe6\xe1\x78\xd0\xe7\xd4\x3b\
-\xe1\x74\x64\x14\xde\x14\x21\x78\x30\x48\x46\x0c\x92\x11\x0f\xb3\
-\xfc\xc2\x15\xa0\xbc\x2a\x9c\x0f\xe6\xf3\x8f\xdd\x3c\x92\xc1\x5f\
-\x1a\x15\x1e\x0f\x90\x8b\x69\xc8\xd7\x20\x5f\xe3\x4f\xff\xe0\x2f\
-\xf9\xf6\x6f\xfc\x11\xb6\x3f\xa4\xbe\x64\xe1\xe8\xc7\x4c\x10\xb3\
-\x86\x83\xa4\x89\x93\x35\xf0\xd5\x31\x4e\xd6\x98\x1b\xfc\x2c\xb3\
-\xac\xd0\x2f\xcc\xe4\x9a\xe5\xe3\x11\x0a\x0b\x43\x45\x66\x66\x91\
-\x79\x95\x0b\x5d\xbb\xb9\x04\x55\x14\xd6\xe3\x53\x4f\x66\xe3\xa3\
-\xc1\xae\x7c\x7d\x58\x9a\x2f\x16\x27\x85\xcc\xc2\xde\x54\x2c\x63\
-\x0c\xc6\x88\x2c\x6b\x27\x24\x81\x4e\x30\x86\xa6\x69\x63\x14\x57\
-\xe2\x50\xaf\xe3\xea\x2a\x5e\x92\x15\x60\xdf\x2d\xce\x79\x11\xbc\
-\x66\xa0\x13\xd9\x09\x49\x14\xe2\x98\x56\x31\x32\x1f\xcd\xfc\xa5\
-\x8a\x63\x64\x99\x85\xdc\x33\xb8\xf0\x47\x6c\x1d\x64\x3c\xbb\x19\
-\x10\x16\xd6\x54\x94\x36\x01\x66\x0e\x4a\x80\xe7\x5b\x50\x04\xf1\
-\xe6\x95\x0e\x3f\xf2\x85\x7f\x0e\xc0\x77\x1f\xff\xb7\xf4\xf7\xaf\
-\xd2\x79\x76\x0b\x02\x38\xd8\xbe\xce\xd5\xba\x28\xa8\xfc\x37\x5f\
-\xc2\x79\xf1\xdb\x32\x70\xcb\xe0\x2d\xb3\x77\xf9\x58\xd9\x7b\x03\
-\xae\xbc\xc4\xfd\xad\xdb\x5c\xcf\xea\xa8\xd7\x5f\xe0\xea\x15\x9d\
-\x1f\xf9\xd1\x7f\xcc\x2b\xaf\xbe\xc9\xd6\xdd\x0f\xe8\x9f\x0d\x45\
-\x23\x23\x19\x61\xf8\x17\xf9\xec\xb1\x1f\xd3\x70\x0c\x19\xc0\x0d\
-\xc7\x28\xda\xcd\x23\x5a\x6a\x53\xe8\x90\x2b\x6a\x35\x06\x14\x9c\
-\x0f\xc5\xfd\x99\xe6\xe2\xc3\x4e\x88\x32\x98\xcf\x4f\x90\x9c\x1f\
-\x7d\xea\x8d\x14\x68\x0a\x49\xa8\xa1\x97\xde\x6e\xa5\x21\xcc\x10\
-\x9a\x33\xac\xfe\xd5\x6f\x7c\x93\xb3\xe3\x01\x3f\xfc\x4f\x3b\x74\
-\x9f\xf9\x0c\xab\x78\x0c\xc7\xa0\xd5\xce\xf0\x58\x40\x89\x34\xa8\
-\x95\xfc\xb1\x22\x8e\xb8\xe4\xc5\xef\x2e\x82\x37\x9f\x0d\x96\xda\
-\x19\xcd\x00\xce\x5a\xb9\x54\x8b\x88\x39\xbd\x69\x25\x0b\xe7\xd8\
-\x41\x48\xa2\xa5\xe8\x5e\xc6\x43\xcf\x94\x9d\x5b\xc7\x1e\x41\x30\
-\x62\xa5\xbd\x51\xb4\x9f\x45\xcc\x65\xf5\x15\x49\xcd\x05\xa9\x26\
-\x1c\x86\x0a\x0f\xa3\xb1\x1f\xa3\xdb\x0d\x70\xcd\x9c\xb8\x67\x10\
-\x72\x46\x57\x59\x90\xdf\x34\x02\x5c\xbd\xe8\xa3\xbb\xe5\x1b\xea\
-\x4b\x52\x7b\xd6\x53\xf7\x67\x9a\x89\x32\x78\x2d\xb3\xb0\x29\x2c\
-\xec\x0a\x8b\xe7\x13\xcb\xe2\xe1\xce\x07\x73\x63\x43\xcf\x2c\xdd\
-\x25\x08\x3f\xc9\x25\x6b\x26\xfe\x91\xbb\xed\x2c\x18\x26\x6f\xb1\
-\x3f\xed\xb1\xe7\xef\x73\xd9\x59\xe7\xda\x62\x39\x46\xff\xbf\xc0\
-\x25\x48\xb2\x77\x79\xe5\x9b\xdf\xe0\x70\xfd\x5d\x86\x76\x03\x6f\
-\xef\xe7\xd8\xbc\xd2\xe1\xf4\x4e\x97\xe8\xa5\x43\x09\x39\x9e\x14\
-\xd0\xb1\xfb\x00\x78\x89\x9b\x57\x5f\x20\xc9\xde\x25\xcb\xde\x85\
-\xe3\x75\x92\xe5\x77\x79\xf9\xc6\x35\x2e\x5f\x56\xd9\xbd\x7f\x48\
-\x7c\x24\x9a\x19\x49\xe6\x49\xdf\x88\x93\x34\x04\x05\xda\xce\xfc\
-\xf8\xd5\x30\x1b\xc9\x8e\x9d\x10\xf9\x58\x45\x70\xb7\x24\x7b\x41\
-\xa1\xc0\x2a\x4f\x80\xea\x11\x57\xa7\x9d\x2b\x4f\xcc\xec\xd5\x00\
-\xd7\x18\x72\xa6\x34\xe7\x3f\xa7\x99\xc3\x48\x41\x6b\x0e\x88\x93\
-\x52\x70\x2f\xe6\xf8\x1a\xd4\x0a\x1e\x59\xa3\xab\x46\xdc\xdf\x8a\
-\xe8\x0d\x5f\xe7\xde\x5e\xc2\x33\x5f\xac\xf1\x23\xff\x68\x93\x56\
-\x0b\x86\x63\x17\x8d\x33\x2c\xad\x4e\x62\xd7\xc4\x30\x69\xa1\xb3\
-\xa0\x36\x7f\x12\x6b\xca\x18\xdd\x6e\x08\xc1\x50\xa0\x32\x2c\x34\
-\xc8\xb4\xcb\xc0\x16\x6c\x84\x1d\x08\xf8\xd1\x0c\x20\xb0\x2d\x6c\
-\x52\x12\xb7\xc1\x75\x37\x62\x67\x20\x78\xe2\xfb\xa7\x4d\x21\x06\
-\x7a\x7c\x8a\x52\x0b\x19\x5e\xba\x4a\xdb\x74\x60\x72\x44\xe6\xae\
-\xcc\x0d\xa3\x06\xe9\x84\xc0\xb6\x05\x13\xf4\x4b\x3f\xfb\xcf\x7e\
-\xc5\x1b\x8d\x04\x2b\x01\x18\xd8\x04\xca\x94\x2c\x31\x41\xcf\x25\
-\x84\xb0\x42\x85\x28\xca\x69\x64\x6a\x05\x50\x1b\x98\x7a\x4e\x4d\
-\x37\x98\x26\x09\x59\x92\xa0\xea\x86\x50\xc1\x85\x29\x86\x21\x9a\
-\x22\x13\x1c\x8c\x24\x2e\x06\x46\xa1\x37\x18\x93\xe6\x6f\x89\x81\
-\x46\x4b\x01\xf5\x0a\x0b\x8d\x8f\xa2\x1a\x16\x49\x92\x60\xe8\x3a\
-\x09\x70\x12\xbe\xcb\x69\xff\x5b\xbc\x7b\xff\x1b\x7c\xf0\xad\xaf\
-\xd2\x7f\xb8\x4c\xf7\xd9\x36\x37\x6e\x3c\x83\xe9\x3a\x2c\x2d\x98\
-\xb8\x8d\x26\x23\xcf\xe2\x7b\xfd\xaf\x62\x4c\x75\x06\x5e\x46\x50\
-\x7b\x0b\x3b\xbc\x45\xbd\x13\xe2\x7a\x97\x88\xcc\x99\x96\xa2\xd3\
-\x54\xe9\x34\x55\x96\xcc\x1a\x9d\xa6\xca\xdd\xd1\x84\xa3\xbb\x43\
-\xf2\xbd\x3b\x74\xd3\x4d\x9e\x6e\xe7\x9c\x3a\x1e\x5b\x3b\x09\xc3\
-\xed\xbf\x62\xab\x77\x9f\xcd\xeb\xcf\xd3\x55\x1f\x60\x2d\x5d\xa1\
-\x33\x99\x72\x96\x4d\x38\x8b\x62\xda\xb9\x82\x89\x08\xb6\xd4\x4f\
-\xa4\x3e\xc2\x54\xea\x4c\xf2\x09\x93\x7c\x82\x1e\x58\x24\x76\x88\
-\x1a\x1b\xc4\x85\xb8\x25\x6c\xf8\xa4\x89\x3a\x7b\xac\x8f\x51\x63\
-\x83\x5a\xa4\x13\x34\x0b\x48\xa6\x5c\xd4\x1e\x0f\xb3\x11\xa6\x52\
-\xc7\x44\x61\x98\x8d\xa8\x29\x2d\xf9\xf3\x4d\x14\xc1\x4d\xd7\x41\
-\xab\x0f\x49\x47\x6d\xa8\x43\x98\x8b\x40\x9e\x2a\x3a\x35\x34\xd4\
-\x7c\x04\x75\x8b\x4b\x2f\xbd\xc4\xca\xd2\x06\x7b\x3d\x9b\x93\x41\
-\xcc\x3b\x6f\xbd\xcd\x69\x3f\xc2\xe8\x8f\x68\x99\x1a\x8e\x69\xa0\
-\x28\x21\xea\x74\x04\xf9\x90\x3c\xd3\xa8\xa9\x19\xe4\x53\x5a\xb6\
-\xcb\x24\x9f\x42\x3e\x45\x49\x5c\xb2\x58\x21\x4f\x3d\x0c\xc7\xc0\
-\x4d\xeb\x4c\xa2\x29\x13\x23\x46\x51\xeb\xa8\x46\x2e\x33\xb0\x13\
-\x97\x9c\x71\x82\xde\x70\xe8\x07\xf0\x17\x6f\xec\xa2\x46\x87\x4c\
-\xea\x35\xe2\x60\x4a\x9d\x53\x06\xee\x32\x18\x4d\xae\x25\x09\x4b\
-\xb7\x56\xc9\xda\x4b\xe8\xc3\x9c\xd8\x00\x3b\x48\x08\xf4\x1a\xb6\
-\xa6\x62\xa8\x39\x5f\xf9\x77\xff\x2f\xba\x17\x0c\x99\x9c\x4e\xa5\
-\x97\x6f\x54\x92\x62\x66\x4a\x68\xe5\x24\x5e\x8e\x8e\x82\x97\x64\
-\xb8\xba\x2a\xf1\x6f\x5e\x30\x13\x11\x08\x88\x50\x39\x41\xad\x0a\
-\x87\x1c\xa3\x80\xe5\x63\x58\x14\x13\xd5\x17\x95\x59\xef\x9f\xbc\
-\xca\xd3\xee\xcf\x90\x5a\x42\x5f\x11\x02\x51\xf8\xee\xdc\xb8\xfd\
-\x9d\x2c\xc6\x9f\x86\xdc\xd2\x6f\x48\xfd\x43\x84\x82\x69\x9a\x34\
-\x2e\x4d\xf9\x78\xe7\x17\xf8\x56\xfc\xab\x32\xdb\xa6\xfa\x3d\xb4\
-\xe4\x16\xa9\x2e\xbc\x8c\x3b\xcf\x6e\xc9\x51\xa6\x6a\x46\x6e\x0f\
-\x6f\x72\xe9\x6c\x83\xef\x05\xb7\xf9\x93\xd7\xfe\x84\xf5\xb5\x80\
-\xc5\xd5\x4f\xf3\x03\xed\x98\x23\xfd\x53\x90\xbc\x22\x26\x45\x10\
-\xf2\x82\xfa\xb5\x0d\x9e\xbf\x15\xb1\xf7\x70\x91\xc1\xc9\x9e\xc8\
-\xca\x5e\x42\xec\xea\x0c\xd3\xd1\xb9\xa9\x67\x6b\xee\x98\xd8\x21\
-\x7a\x60\xc9\xc0\xae\xbe\x06\x30\x74\x86\x18\x9e\x55\x29\xde\x90\
-\x5f\xd7\x52\x9b\xe8\x81\xc5\xc0\x15\x42\xfb\x96\x2a\xb2\x3a\x88\
-\x2b\xc1\xd8\x8f\x69\x34\xcb\x8c\xde\x82\x66\x8e\x36\xe8\xd3\x5a\
-\xe8\xe0\x29\xa6\xf0\xc1\xf0\x22\x70\xe1\xb3\x9f\xdc\xe0\xa7\xff\
-\xf9\x17\x59\x59\xb9\xce\xeb\x6f\xbc\xc7\xb7\xbf\xf5\x1d\xd9\xe6\
-\x3d\x8a\x1e\xb1\xb6\xb7\x44\x6d\x51\x9c\x60\xf5\xfe\x25\xbc\xf4\
-\x14\xb7\xd8\x9b\x93\xe7\x5d\x89\x8b\xe7\xa6\x43\x4a\xec\x5b\x8e\
-\x3c\x15\x18\x39\x28\x47\x9c\x02\x24\x7f\xfc\x61\x37\xa7\xd8\x99\
-\xbd\x39\xe8\xb1\x53\x0b\x69\x5c\x11\x23\x57\xb6\x3f\xc4\xb7\x3b\
-\x12\x9a\x88\x4c\x2c\x06\x52\xc7\x7e\x8c\x6e\xb1\x00\x8b\x67\x34\
-\xbb\x39\x61\x41\x97\xc5\x04\x8c\x73\x0b\x95\x00\xdd\x55\xc8\x02\
-\x1b\x57\x9f\x15\x70\x12\x87\x15\xf8\xb6\xa4\xd9\xb0\x4c\xe2\xb0\
-\x87\x81\x2d\xb3\x77\x39\x64\x12\x87\x63\xa9\xac\xb8\xba\xa6\x72\
-\x77\x6f\x5e\xe7\xfb\x68\xf4\x06\xcf\x76\x5e\x16\xd6\x53\x51\x9f\
-\xbd\x9d\x87\x90\xbd\x26\xa7\x94\xf3\x3b\x5d\x1a\xc6\x5d\x36\xb4\
-\x44\x2e\x89\x29\x27\x4a\x26\xd6\x75\xae\x5e\xb9\xc7\x5b\xb7\x67\
-\xc1\x39\x68\xdd\xa7\x3d\x84\x6c\x6f\x83\x61\x7e\x1b\x10\x94\xcd\
-\x0f\x76\x0e\x41\x05\xbd\xf5\x65\x76\xef\x1f\xb2\xbd\xd3\x67\xff\
-\xec\x84\x7c\xe1\x29\xda\x4b\x00\x77\x39\x3d\x7c\x9d\xdf\x7f\xd3\
-\xc2\x5e\xf9\x1e\x4f\xdb\x2f\xf0\x78\x61\x97\x6b\xba\xcd\x23\x66\
-\x3a\x8d\x95\xd4\x47\x51\x73\xfa\x4d\x85\x58\xd1\x31\xbc\x84\xc4\
-\x9e\x0f\xe0\x32\x68\xcf\x07\x75\xf9\x7c\x62\x87\x44\xc9\x18\x33\
-\x98\x15\x4f\xcd\xc4\x67\x54\x70\xa2\x0d\xc7\x60\x98\x8d\xe8\xaa\
-\x39\xbd\x6c\x44\xcb\x69\x42\x2e\xd8\x8f\xc4\x1e\xd1\x75\x72\xc9\
-\x86\x94\x9f\xab\x63\x49\xec\xad\x2e\xae\x42\x51\x10\xf6\x06\x70\
-\xb3\x6b\xb1\x79\x75\x83\x9b\x57\x63\x56\xf3\x57\xb9\xd4\x35\xf9\
-\xe9\xff\xfc\x26\x2f\xbd\x20\xae\x20\x4d\x7f\x97\x83\xf4\x29\x9c\
-\xf8\x21\xf5\x7e\x8d\xc3\xd4\x66\x3a\x7d\x8d\xc9\xe3\x65\x98\x7e\
-\x1f\xd7\xfa\x2c\x63\x77\x42\x23\x10\x70\x28\x77\xbd\xb9\x40\x3e\
-\x98\x9e\xd2\xd0\xea\x2c\x0c\x15\xce\x5a\xa2\xc8\x23\x50\xd0\xed\
-\x8c\x51\xa0\x8a\xc2\x2f\x50\x19\x21\xbc\x90\x75\x6f\x3c\x6f\xc2\
-\x12\x34\x71\xd8\x67\xbb\xbd\x8e\x12\xec\x73\x10\xe9\x7c\xec\x43\
-\x02\xbe\xd4\x62\x34\x1c\x03\x35\xb2\x13\x8c\xee\x0a\x8f\x13\x93\
-\x98\x00\x2f\xc9\x48\x2c\x0b\xd5\x2e\x46\xa5\xbd\x9c\x2c\x1d\x13\
-\x13\x10\xea\x75\xf2\x8a\xb7\x5a\xc9\x0b\xcf\x04\xf5\x91\xdc\x8e\
-\x94\x05\x76\x25\x33\x8f\xe7\xf5\xc4\x8f\x6f\x80\xf6\xd9\x0b\xe3\
-\xf4\x23\x80\xfe\x84\xbd\xca\x34\x73\xa9\x5e\x7b\x27\x5e\x60\x1c\
-\x3f\xc5\xd6\x64\x1b\xf2\x07\x98\xa6\x89\x1a\x99\xc4\xb9\x4b\xbb\
-\xa3\xa3\xab\xcf\xf1\xf1\xce\x2f\xcc\xd1\x68\x83\xd6\x7d\x86\xf9\
-\x6d\xc6\xf1\x53\xf4\x77\x7b\xf4\x77\x7b\xec\xbc\xf3\x29\xf4\xb3\
-\xcf\x03\xf0\xb9\x2f\x6e\xf0\xc3\x3f\xfe\x53\xac\xff\x60\x84\x7f\
-\x75\x11\x7f\xfb\x84\xbd\xa3\x65\xf6\x8e\x96\xc9\x17\x36\x04\xe3\
-\x11\xdc\x26\xb9\x67\xf2\x60\x4b\xb8\xa5\x2c\x1d\x5a\x64\x7b\x1b\
-\xe8\xb7\x4a\xc5\xd9\xec\xb2\x9f\x6b\xae\xcc\xb4\xd5\xa0\x8d\x92\
-\xf1\xdc\xb1\xfa\xba\xa9\x37\xe4\x6b\x7a\x60\xd1\x6b\x6a\x73\x05\
-\x63\xae\xb9\xa4\xb4\xe4\xd7\x48\x35\x9c\xda\x94\x54\x5e\x62\x87\
-\x0c\x33\x51\x44\x36\x1c\x43\xaa\xe3\x4a\xe7\x21\xd7\x89\xf8\xe2\
-\xf3\x5d\xbe\xf0\xc3\x57\xf9\xf1\x1f\xba\xc9\x0f\x3d\xb3\x49\xef\
-\x24\x25\x7a\xf0\x1e\x83\xb7\xbf\x49\xd3\xdf\xa5\xe9\xef\x32\x8a\
-\x0e\x58\x2b\x46\x6f\xce\x3a\x26\xdd\xd6\x7d\xa8\x3d\x4d\xfd\xd2\
-\x31\xd4\x9e\xc6\x4b\x4f\x31\xf4\x87\x28\x69\x4f\x7c\x28\x3d\xf2\
-\xc1\x48\x4e\x4a\x37\x02\x31\x84\x7a\xd6\xca\x65\x26\x16\x0e\x9c\
-\x42\x40\x34\x42\x11\xd6\x59\xc5\xf4\x48\xe2\x36\x68\xe9\x22\x31\
-\x6c\x0e\x7a\x17\x02\xb5\x35\x9c\x08\x4c\x5c\x72\xce\x55\x9d\x72\
-\x51\xe8\x8d\xfd\x18\xbd\x0c\x4a\xc1\x40\x98\xa2\x90\xab\x24\x5c\
-\x8f\x1c\xdd\x55\x30\x42\x9b\x88\x8c\x28\x31\x71\x4d\x55\x36\x32\
-\xf4\x62\x01\x4d\x49\xaf\x59\xc5\x64\x48\x23\x0c\x67\xc5\xdd\xb9\
-\x25\x36\xc9\xfa\x32\xec\xcc\x67\xe2\xa9\x72\x17\x3d\xfc\x24\x5e\
-\x6f\xc4\x54\xb9\x3b\x17\xdc\x7b\xfd\x55\x3e\x6a\x9c\xb1\x7f\x10\
-\xa2\xec\x05\xa0\x7c\x89\x96\xe9\xd2\x32\x61\xdc\x6d\xc0\x3e\x1c\
-\x65\xef\x4a\x1a\xad\x9c\xf8\x00\xe8\x6c\x74\x19\x3f\x2c\xde\x14\
-\xe5\x05\xb2\xf0\x84\x37\xf7\x0f\x60\x1f\x94\x6b\x97\xd9\xfc\x0c\
-\x5c\xbb\xfc\xaf\xf8\x51\xe0\xfe\xf5\x4b\xec\xde\x3f\x64\xe7\xcd\
-\xb7\xe1\x6c\xc4\x78\xa1\xd8\xd9\x61\xde\xc5\x0d\x61\xb8\x2b\xe4\
-\x31\xe3\xb8\x41\x63\xb7\x07\x95\x3d\x76\x73\x7f\x9f\x1d\xd2\x55\
-\xf3\x22\x63\x86\x5c\x1a\xe5\xf4\xec\x10\x33\x68\xcc\x65\xda\xc4\
-\x0e\xe9\x8e\x52\x1e\xa3\xc8\x60\x3e\xff\x7d\x16\xf2\x9c\x5e\xa6\
-\xa0\x33\x9f\xd1\x35\x47\x48\x3c\x7b\x99\x42\xae\xb9\xf2\x44\xea\
-\x6a\x85\xfb\x66\x1e\xd1\x6a\xb7\x58\x6e\x77\xf8\xec\x8b\x2b\x34\
-\xba\xb7\x78\xea\x6a\xca\x92\x95\xb2\x6a\x6d\x30\x71\x84\x19\xcc\
-\x28\x3a\xa0\x69\x8a\xbf\xa3\x3c\xd6\xfd\x35\x70\x1e\x52\xf7\xd7\
-\x84\xef\x83\xb5\x21\x9d\x81\x0e\x0f\x76\x61\x4d\xc0\x0c\x3f\x69\
-\xd0\x70\x15\x5a\x9a\x23\xe6\xee\xda\xae\xec\xd8\x55\xa9\xb8\x79\
-\x88\xa5\x82\x2d\x5c\xe6\xf3\xbd\x5d\x86\xc9\x2d\x74\xbe\x27\x5a\
-\xce\x15\xaa\xcd\xb1\x91\x83\xaf\x92\x9d\xb0\x2b\x22\xa2\x0a\xc5\
-\xa6\x8a\x3d\x15\x02\x1a\xcc\x18\x08\xe1\x92\x13\x13\xa0\x6a\x0d\
-\x12\x2f\x97\xd0\xc1\xd5\x55\x99\xb1\xcb\x13\x20\x0e\x95\x39\xea\
-\xac\x8a\x89\xcf\x07\x30\x61\x84\x85\xc5\xd3\xee\xcf\xcc\x65\x63\
-\xd2\xd7\xe8\xab\x23\xb6\x92\x7b\x17\x3c\x23\x2e\x77\x0e\x19\xc7\
-\x4f\xd1\x51\x73\x6e\xbc\xfc\x8b\xfc\xc0\x0f\x76\x68\x2d\x6f\x62\
-\x77\x5b\x58\xbd\x43\xa2\xc1\xf7\xd9\x3d\xd8\x64\xf7\xfe\x21\xed\
-\xe1\xcd\x0b\x6f\x5c\xb9\xec\xf0\x60\x1a\xe2\x99\x07\xb8\xd1\x1a\
-\x2d\xe5\x05\xee\xbd\x9f\xf1\xf5\xff\xed\x1b\xfc\xd9\xaf\xfd\x1a\
-\xde\x1b\x7f\xc2\xd5\x2b\x3a\x9f\x7b\xee\x25\x3e\xfb\x5f\xfe\x04\
-\xf9\xc2\x06\xca\xd9\x2e\xca\xd9\x2e\xe3\xf8\x29\xa9\xab\x08\x8e\
-\xd6\x68\x18\x77\x09\x8e\xd6\xe8\x67\x83\xf9\x2e\x5c\x81\x8d\xf5\
-\xc0\x92\x59\x12\x90\x41\x0b\xf0\xb8\xca\xec\x8c\x32\x46\xba\x83\
-\xde\x54\x2f\x40\x8e\xf2\x7e\x2f\x53\xe6\xb2\x70\xa3\x60\x42\xce\
-\x14\x91\x75\x5b\x6a\xf3\x42\x01\x58\x8e\xf8\xbf\x78\xfd\x29\x3e\
-\xfb\xe2\x0a\xb7\xd6\xae\xf1\xd9\x67\xa6\x2c\x59\x29\xdd\x25\x4d\
-\x06\xb0\x0c\xd8\x22\x98\xcb\xdb\xc4\x99\x05\x76\xf9\xb9\x87\xe1\
-\x2e\x87\xe1\x2e\xab\xd6\x06\x0b\xfd\x08\x2f\x3d\xc5\xd1\xc7\x84\
-\xc6\x84\x7d\x75\xd6\xfc\x10\x7a\x11\x5f\x36\x48\x12\xe9\x87\x5c\
-\xb0\x5c\xc5\xfd\x0e\x19\xca\xe5\xf5\x0b\x5c\x71\xb5\xf9\x31\x3e\
-\x4e\x19\x44\x3e\xea\xe4\x68\x46\xd7\x79\x53\x02\x7b\xd6\x29\x1c\
-\xfb\xf1\x6c\xb8\xc2\xc0\xc6\x08\x91\x7c\xb0\xa0\x54\x14\x32\x5d\
-\x5c\x02\xa7\xf9\x02\xa6\x7e\x86\x97\x98\x72\x6a\x2e\x4a\x4c\xa6\
-\x9a\x25\x0c\xad\x8b\x13\xc1\xc0\xe6\x1f\xbc\x85\x11\x56\xc7\xa4\
-\x36\x7a\x8a\xa9\x86\x2c\xde\x3e\xd4\xec\xc4\xbb\xc1\xe6\x95\x0e\
-\x5c\xe9\x70\x79\xd1\x64\xf7\x9e\xce\xc3\x83\xef\x72\xf4\x1f\xfe\
-\x8a\x07\x8f\x63\xf6\xfc\x7d\x36\x54\xb1\xae\x76\x3b\xba\x47\xe3\
-\xb0\xce\xb5\xf5\xd9\xf8\x92\x6a\x2d\x41\x3e\xfb\x27\xa9\xd6\x12\
-\xc3\xfc\x36\x2e\x6b\x44\x97\x7a\x18\xd1\x1a\xbf\xff\xd7\xef\x63\
-\xbf\xff\x3d\x99\xbd\xd7\x6a\x1b\x1c\x54\x02\xb9\x0c\x60\xe8\x13\
-\x1c\x95\x26\xd7\x0a\xf9\x28\x97\xd8\x6c\xec\xc7\x18\x9e\xf8\x99\
-\x4d\x27\x98\x0b\x40\x3d\xb0\x04\xfe\xd5\x1b\x02\x3a\x34\x55\x49\
-\x15\x57\x03\xb7\x84\x16\xd5\xcc\xdc\x74\x82\xb9\x93\x22\x76\x05\
-\x06\xa7\x08\xe8\xaa\x3f\x45\xa9\x3f\x7e\xe6\xc5\x5b\xdc\xbc\x1a\
-\xb3\x62\x5e\x43\xff\x84\x06\xfd\x6c\x2e\x70\x27\xce\x81\xc8\xc2\
-\x8b\x6b\x73\xd9\xb8\x7a\xbf\xbe\x08\x9c\x8a\xcf\xbd\xba\xb8\x21\
-\x02\xdd\x87\xe1\x60\x93\xd5\xf6\x36\x67\x1c\x63\x27\xcb\x88\x66\
-\x6f\x5d\x62\xe3\xb2\xd0\x2b\x1f\x57\x03\xb9\x0c\xe6\x91\x12\x31\
-\xd8\x3d\x45\x1f\x7c\x4f\x06\xee\xf8\xd4\x13\x8b\xd4\x03\x91\x89\
-\xcb\xb6\xb3\xaf\x6f\x80\x2e\x54\x71\x12\x13\x17\x8c\x87\xa0\x7f\
-\x8b\x46\x46\x99\x61\xc1\xc4\x4a\x26\xb2\x63\x27\x05\x4b\xca\x19\
-\x06\x36\x53\x4d\xe0\xe5\xc4\xcb\x31\xf5\x08\x88\xf0\x12\x13\x53\
-\x17\x27\x42\x4c\x80\x11\xb9\xc4\xa6\xf7\xa1\x01\x6d\x58\x82\x2e\
-\xbf\xbc\xf9\x32\xde\xe4\x16\x27\x85\xe3\x69\x47\x7d\x30\x37\x2a\
-\xf9\x4c\x57\x61\xe7\xdd\x1a\x37\xd6\x2e\x91\x6f\xc1\xc3\x83\x88\
-\x0f\xfe\xe2\xbb\x7c\xe5\xbd\xff\x8b\xc3\xc3\x13\xb1\xbc\x25\x89\
-\xb8\xd9\xb9\xc1\xee\xc7\x1b\x6c\x04\xfb\x5c\xbd\xfe\x79\x39\xd2\
-\x2f\xab\xfe\x02\x17\x5f\xbe\x7e\xca\xde\xc3\xa7\x68\x15\x34\xed\
-\x91\xe6\x70\x79\xe3\xff\xe7\xec\x4d\x63\x24\x49\xef\x33\xbf\x5f\
-\x44\x46\x1e\x91\x77\x66\xdd\xdd\x55\xdd\x5d\xd5\xdd\xc3\x69\x0e\
-\x39\x33\xa4\x48\x91\xa2\xa4\x15\xe1\x7e\xba\x07\x00\x00\x20\x00\
-\x49\x44\x41\x54\xb5\xdc\x5d\xd0\xdc\xc5\x7a\xd7\xd2\xae\xbd\x6b\
-\x08\x82\x05\x08\x86\x77\x05\xfb\xc3\x2e\x20\xd8\x1f\x6c\xd9\x30\
-\x60\xaf\xe1\x05\x0c\xfb\x83\xf5\xc1\xb2\x56\xb0\x21\xcb\xd6\xb5\
-\xb2\x6e\xea\xe0\x50\x9a\xa1\x66\x28\x72\x86\x33\x54\x4f\xcf\x74\
-\x75\xd7\xdd\x75\x57\x9e\x11\x19\x79\xc4\xe1\x0f\x6f\xbc\x6f\xbe\
-\x11\x99\xd5\x43\x39\x1b\x8d\xc8\x23\x32\x2b\x33\xe2\x79\x9f\x78\
-\xfe\x77\x93\xa3\x9d\x32\xa5\xd5\x63\x06\xa7\x36\xc5\x55\x0f\x7f\
-\xbb\x00\x5c\x50\x2a\x1c\x53\x5b\x7b\x45\xbd\x5f\x82\xb9\x45\x15\
-\x23\xec\x63\xf6\x3a\xaa\xc0\x53\x1a\x57\x92\x1d\x74\x00\x2b\x2d\
-\x5c\x35\x19\xf6\x04\x80\xfd\x5e\x48\xc1\x2a\x31\xa9\x58\x04\xed\
-\x2e\x05\xab\xa4\x0c\xbe\x82\x25\x64\x47\xab\x9a\x11\x6c\x5c\xf4\
-\xb0\xe2\x85\x22\x19\xbf\x54\xce\xce\x74\xd3\x14\xe9\xa4\x0d\x7e\
-\xf4\xae\xc9\xb8\x3a\x61\xa5\x52\xa4\xbc\x60\xb0\xd4\x8e\xdb\xd4\
-\x2e\x65\x68\x5d\x04\x34\x97\x8e\x15\x98\x7b\x1c\x0b\x50\x3b\x24\
-\x18\x5a\x82\x39\xbf\x08\xce\xe5\xe7\xd9\xeb\x5e\x02\xf7\x58\xcb\
-\x0c\xa8\xd5\xf7\xb5\x90\x76\x48\x8d\x3e\x93\xae\x8b\x63\x2d\x02\
-\xd3\x28\x9f\x9e\x3c\xaf\x87\xa4\x1d\xd3\xe5\x56\x54\x25\x73\x23\
-\x8b\x5f\xff\x34\x56\xe7\x6d\xc5\xc4\x72\x00\xbc\x5a\x70\xac\x50\
-\xf6\xdb\x74\xc6\x0b\x74\x03\xd1\x2a\x40\x06\x56\x40\x4c\x14\xb5\
-\x26\x0c\xa8\x58\x45\xc5\xc6\x43\x62\x99\xe0\x8b\x68\x5d\xc1\x1a\
-\x32\xf4\x0b\x62\x3c\x96\x35\xc0\x2c\x46\x0a\xc0\xe3\x68\x81\x9c\
-\x71\xa5\x34\xb3\x64\x6f\x09\xe0\x34\x33\x67\xed\x88\x81\xe7\xb1\
-\xbd\xff\x6d\x95\x37\x91\x8b\x5e\x20\xc7\x0b\x31\xa3\xdc\x01\x76\
-\x78\xd0\x34\x78\xd4\x8a\x78\xd4\x8a\x28\x01\x2b\x95\x22\x4f\x98\
-\x30\x3a\x3b\xe4\x1b\xc0\xc3\xb7\xb6\xa1\x1a\x51\xb7\xaa\x74\x18\
-\xb2\xdf\x7f\x46\xf8\xb5\x33\x0e\xea\x35\xa2\xbd\x36\xeb\x5b\x6b\
-\xd0\x86\xcd\x8f\xef\xd1\xee\x0a\x66\xe5\xf0\x31\x47\x3b\x2f\x50\
-\xca\x3e\xa6\x1b\x09\x7d\x4c\xf6\x5d\xf5\x9c\x3b\x79\x81\xd5\xba\
-\xc3\xe9\x64\x43\x68\xe0\xe1\x0d\xb5\x00\x2a\xc3\x1b\x50\x78\x0c\
-\xab\x82\x8d\x9b\xb4\x69\xf5\xa6\xbd\xd4\x64\xb9\x91\xce\x96\xba\
-\x77\xc2\xaa\x9a\xe2\x31\x9e\x00\x6b\xbc\x95\x80\xcc\x5a\xa5\x19\
-\x46\xee\x59\x65\x2c\x2d\xb8\x29\xd9\xb8\x54\xce\x2a\x30\x27\x00\
-\x5c\x81\x57\xd7\x9b\x94\x56\xd6\xc9\xdf\x99\x70\xab\x52\xa4\xb9\
-\x30\xa6\x6e\x4f\x73\x28\x5a\x17\x81\x02\xef\x89\x77\x48\x73\xe9\
-\x58\xb1\xf2\x0c\x43\xc7\x6c\x5c\xb8\xfb\x71\x88\xee\xb3\xff\xf6\
-\xb7\x79\xfc\xf4\x9b\x9c\x76\x0e\x19\xb4\x87\x7c\xac\x71\xc5\x6a\
-\xed\x26\x0b\x9f\xda\xe0\xb3\x2f\xdc\x60\x52\xfb\x12\x74\x9f\x10\
-\x45\x4d\x9c\xac\x4b\x69\x12\x2a\xcf\x45\x2d\x53\x4e\xf4\x7d\x2b\
-\x87\x25\x7a\xa3\x31\xe1\xd0\x53\x4c\x3c\xe3\xa5\x28\xf6\x54\x2a\
-\xa6\x72\xd7\x55\x4a\xaa\x89\xfd\x90\xb8\x21\x62\x35\xc2\x32\x86\
-\x06\x7d\x2b\xc9\xc4\x12\xcc\xd2\xd8\x93\xcc\x3c\xf4\x45\x88\xd0\
-\xaa\x18\xe0\xc5\x63\x05\x2c\x12\xba\x57\x56\x86\x48\x00\x2b\x57\
-\x9b\x5d\x60\xe2\x0d\xd9\x3b\xff\x36\xe3\xf0\x17\xb5\x06\x7f\xaf\
-\xf3\xa0\x69\x40\xe6\x07\x79\x78\xf8\x98\x17\x6e\xbc\xc8\x6f\xbd\
-\x97\xf4\x25\x1a\x93\x15\x16\x3a\x8f\xc8\xaf\x6c\xc4\x8d\xfe\xb6\
-\xc9\x16\x3e\x8e\xeb\xef\x28\x36\x32\xad\x15\xba\x9d\x33\xc2\xd0\
-\xa0\x73\x01\x0d\x33\xa2\x7d\x58\xa5\x66\x08\x2f\xc3\x0b\x96\xcd\
-\x99\x61\x63\xae\x37\x09\x8f\x36\xe2\x16\xad\xaf\x50\x09\x2e\x98\
-\xb4\x9b\xb0\xfc\x98\x53\xa6\xc3\x17\xa5\x76\x3e\xcd\x94\xa1\xf0\
-\x98\xc1\xa9\x2d\x74\x32\x87\xb4\x43\x03\xa3\x2a\x3a\xbe\x4f\x23\
-\x72\xc5\x84\xac\xd0\xdd\x6b\x7e\x2f\xc4\x7a\xce\x88\x1f\x25\x0f\
-\x9e\x63\x24\xea\x75\x79\x69\xf6\xd5\x01\x7c\xef\x4e\x72\x42\x4c\
-\xc7\x7b\x46\xdd\x4e\x8e\x11\x10\x00\x16\xac\xbc\x66\x13\x6f\x37\
-\x12\x60\xa6\x20\x00\x5c\x28\x2d\x72\xef\xd3\x5b\x6c\x6d\xdd\xe1\
-\xbd\x6f\xdf\xe7\x7f\xfe\x7f\xdf\xe4\xcd\xf7\xff\x98\x3f\x63\x85\
-\xdb\xb6\xcb\xcb\x5f\xfd\x7d\xde\xff\xd4\x67\xf9\x7b\xff\xc9\x6d\
-\x6e\x37\x36\xd9\x6f\xef\x62\x52\x42\xd5\xed\x6b\xb9\x15\x51\xd0\
-\x27\x5b\x29\x31\xe9\xbb\x50\xc8\xa9\x5c\x62\x1d\xc8\x12\xc0\xd2\
-\x3b\x91\xf8\x8c\x81\x41\x2f\xd6\xd5\xd5\x38\x02\xa8\x34\xb1\x94\
-\x14\xb2\x3a\x5e\xea\x62\x09\x6a\x29\x2d\x0a\xd6\x90\xf1\x60\x21\
-\xd6\xc0\x02\xe8\x82\x79\xa7\x80\xb5\x3c\x4f\xb1\xb0\xa7\x97\x36\
-\x69\x33\xed\x66\x82\x1d\xad\x08\x78\x5d\x19\x78\x0f\x9a\x86\x7a\
-\x7e\xf3\xea\x2e\x23\xff\x28\xae\xd1\xbb\x10\x45\xa9\xd5\x08\xfc\
-\x1d\x35\x81\xc8\xa8\x1a\x58\x83\x3c\xa6\xb5\x42\xcd\x14\xe3\x02\
-\xfa\x40\xeb\x03\x78\x56\xdd\xa6\x61\x46\x84\xf5\x06\xf7\x1f\x5c\
-\x11\xad\xff\x0d\xb8\x03\xd9\xd8\x47\x4c\xa6\x4c\x69\x59\x48\x89\
-\xd2\xaa\xf0\x8a\x48\xe9\x50\xa9\x83\x71\x75\xc8\x20\xfe\xe2\xa5\
-\xec\x63\x06\xd8\x58\x83\xbc\xea\xb3\x56\x37\xab\x74\x2a\x11\x46\
-\xd0\x9f\x31\xca\x54\x40\x03\x21\x23\x0a\x83\x52\x02\xdc\xa5\x30\
-\x87\x6b\x8e\xe7\x02\x58\x0f\x8c\xb4\x8a\x1e\xd6\x60\x42\xb5\x3c\
-\x6d\xac\x22\x73\x29\x9a\x35\xd1\x31\xbe\xbc\x61\xb0\x5c\x10\x12\
-\x02\xa0\xb2\xb0\x4a\xeb\xea\x94\xca\xc2\x2a\x10\x70\xe1\x65\x58\
-\x9a\xc3\xca\x12\xd0\x27\x17\x87\xca\x2b\xd5\xf1\xde\xa4\xb5\x9d\
-\xe3\x07\x2f\xa1\xf0\x37\xff\x46\x9c\x45\x18\xf1\xf2\xf7\xbd\xcc\
-\xff\xd0\xa8\xf2\xcb\x2f\x2e\xf1\xf3\xff\xeb\xff\xc5\xbe\x97\xe7\
-\xd2\x2f\xb3\xf8\xf0\x3d\xdc\x7f\x7d\xce\x57\x7e\xf2\xef\x73\xeb\
-\xd3\x9f\x63\x70\x7c\x86\x1b\x64\x21\x18\x52\xce\x25\x03\x22\x7e\
-\x5c\xa3\x57\x8d\x0a\x5c\x5d\x66\xe7\x06\x3c\x9c\x41\x15\x73\x74\
-\x4e\xe9\xc5\x64\xf5\x6a\x14\xf4\x45\x7f\x65\x2d\x4f\xa3\x54\xce\
-\x92\xf9\x07\x3f\xf9\x4f\x7e\x6e\x1c\x46\xd8\xfe\x88\x61\x6c\xb0\
-\x15\xac\x21\x7e\x68\xe1\x87\x96\xba\x0f\x60\x99\x3e\x93\x20\xc2\
-\x34\x3d\x32\x64\x19\x87\x11\x56\xce\xc7\x18\x1a\x04\xd6\x04\xd3\
-\xf7\x15\x98\xf3\x7e\x0e\x3f\x0b\x96\xe7\x31\xb6\x2d\xe5\xb5\xa8\
-\xd6\x8e\xb8\xea\xbd\xc3\xe5\x35\x25\x7a\x97\x9e\x08\x45\x9f\xbc\
-\xf9\x80\xc2\xd5\x12\xd6\x55\x95\x76\x77\xcc\x5b\x57\x1d\x1e\xef\
-\xed\x91\x5d\xbc\x64\xbf\x56\x63\x6b\xa9\x45\xbf\x9f\x05\x31\x72\
-\x84\x30\xf4\xc9\x98\x16\xe3\xf1\x94\xf2\xc2\xd0\x87\x91\x48\x66\
-\x3f\xef\x44\x5c\x5c\x7a\x8c\x8f\x5b\x2c\xe4\x4f\xa8\xde\xf9\x18\
-\xb7\x22\x1f\x7f\x60\x30\xe2\x8c\x71\x7e\x8b\x5c\xe6\x4a\x80\xb9\
-\x26\x1e\x47\xf9\x3d\x26\xce\x32\xd1\xc2\x12\x86\xd7\x63\xe2\x64\
-\x69\x87\x06\x61\x36\x10\xe3\x4d\x62\x26\x68\xe4\x1c\x26\xee\x34\
-\xe0\x60\x8a\xcc\x6f\xc2\xac\x8f\x35\xb0\x19\x7b\x63\xac\xaa\xa9\
-\x1e\x97\xc2\x1c\x13\x23\x60\x62\xcc\xe6\xfd\x56\x7d\x07\xb7\x1c\
-\xf7\xe5\x9d\x64\xa9\x96\x07\x78\x91\x81\x39\xc9\xaa\xf2\x7e\xaf\
-\x6b\xd0\x2c\x4e\x01\xbc\x75\x7f\x85\x92\x55\xe2\xde\xed\xa9\x9c\
-\x19\x7b\x4e\x0c\x60\x38\x3b\x3b\x67\x7d\xc1\xe6\xc2\xcb\x50\xca\
-\x4e\x89\x65\xcd\xde\xc0\xf1\x7b\x78\x83\xe9\x73\x17\x5e\x86\xde\
-\x69\x95\x0f\xbe\x71\xc8\xd7\x7f\xe5\x6b\x5c\xee\x3f\xe1\x85\x4f\
-\xbe\x82\x5d\x76\x70\x4b\x36\x8d\xb5\x25\xb6\xee\x7f\x8c\xbf\xf3\
-\xf2\x8b\x7c\xf5\xe1\x11\x8e\x13\x50\xb7\x8a\xbc\x7d\x70\x89\xfb\
-\xf5\xd7\x29\xdc\xf4\x78\x61\xf5\x2e\x41\xc9\x20\x37\x09\x31\xcc\
-\x3c\xc8\x10\x75\x2c\x2f\x5c\xcb\xc7\xb0\xb3\xf4\x7a\x97\xbc\xf5\
-\xc6\xeb\xd8\xd6\xd4\xe8\x1c\x4f\xf2\x71\xf3\x19\x97\xd5\x5c\x8d\
-\xad\xcf\x6f\x60\x79\x6b\x8c\x30\xc8\x96\xb3\x54\x07\x06\x79\xc0\
-\x9b\x98\xe4\x81\xff\xe5\xdf\xfc\x3f\x64\x7e\xfc\x27\xfe\xf1\xcf\
-\x01\xf8\x71\x4f\x80\x8a\x9f\x25\xf2\x27\x64\xc3\x80\x6c\x18\x30\
-\xa4\x30\x03\xea\xa1\x5f\xc0\x34\x3d\xfc\xd0\x22\x34\x6a\x64\xb2\
-\x82\x89\x87\x51\x15\xc3\xe8\xe1\x4f\x6a\xe4\x0c\x1f\x7c\x8f\x71\
-\xb4\x40\xd6\xef\x91\xf7\x73\xb8\x91\xcd\x64\xb2\x42\x77\x74\xc5\
-\x52\xe1\x90\x25\xdb\x98\x01\xf3\x83\xa6\xc1\x37\x5e\xbf\x4d\xdd\
-\xbf\x03\x41\x95\xcb\xee\x05\xdf\xba\xff\x2d\x46\x2d\x9f\x83\xf3\
-\x90\x8b\x8b\x90\x4f\xfe\xad\x13\x38\xb7\xa9\x56\x26\xf4\x2e\x85\
-\x81\x13\x95\x03\xc2\x6c\x80\x39\x99\x82\xb8\x15\x4d\x28\x60\xe0\
-\x38\x19\x72\xb9\x0c\x97\x97\x13\xba\x83\x31\x4f\x9e\x9c\x72\xbe\
-\x73\x44\xb8\xde\xc3\xa8\xf6\xa8\x2c\xfc\x6d\xca\xb5\x0f\xb8\xba\
-\xda\x80\x62\x8d\x5c\xe6\x8a\x49\xb8\xc0\x24\x5c\xa0\x54\xdb\xc3\
-\xbf\x18\x08\x29\xe1\xf5\xb0\x0d\x18\x46\x06\x5c\x88\x3c\x85\x41\
-\xde\xa4\xc8\x08\xd7\xf2\x29\x18\x79\x02\xd7\xc4\x2f\x7a\x54\x46\
-\x25\x02\x5f\xdc\xcf\x05\x45\xcc\x49\x16\x73\x92\x55\xec\x7b\xdd\
-\x2d\x5f\xf5\x99\xb8\x62\x7f\xbf\xe8\xe1\xc5\xee\xb3\x4a\xbe\xa8\
-\x6a\xf7\x9a\x8d\x88\x95\x8d\x06\xeb\x0b\x59\xb6\xee\xaf\x50\x69\
-\x42\xde\x86\x72\x7e\xca\x6c\x95\x85\x55\x9c\xd3\x88\x5c\xd9\x20\
-\x5f\x2c\x33\xf0\xcd\x04\x13\x03\x38\x7e\x0f\x72\x1f\x83\xe0\x8a\
-\x0b\x2f\xc3\xf9\x91\x41\xfb\x69\xc0\x37\x8f\x8e\x79\xfb\xd1\x01\
-\x6f\x1c\xfa\xbc\xbb\x7f\xc6\xc1\xaf\x7f\x97\x85\xdb\x11\x77\x6e\
-\x3f\x80\x4c\x01\xdf\xce\x71\xab\xb1\xc8\xf7\xdf\x59\xe6\xd9\x38\
-\xc7\xc3\xed\x03\x26\x66\x95\x67\xe3\x21\xce\xce\x77\xa8\xad\x67\
-\x59\xb9\xd1\x24\x18\x16\x71\xfd\x88\xa5\x6c\x71\x9a\x6b\x91\xa9\
-\x90\xf5\x47\x50\x5c\x64\x6f\xcf\xe3\xfd\x47\x0f\x13\x20\x2e\x17\
-\x7b\x8c\x27\x79\x8c\xc0\xe5\xc1\x8b\x8b\x2c\x2d\xdf\xc2\xce\x07\
-\xe4\x02\x9b\xec\xc4\x50\xd2\x42\x26\xe4\xff\xca\x2f\xfe\xb6\x90\
-\x13\x51\x77\x84\x11\x8b\xe8\xbe\x35\x01\xf2\x6a\x78\x8b\x74\xa5\
-\x29\x39\x11\xbb\xda\x86\x7e\x41\x79\x27\x94\x7f\xcf\xf0\x70\x23\
-\x21\x37\xa4\x26\xce\x1a\x9e\xea\x4b\x11\x06\x2e\x05\x6b\x48\x2e\
-\x12\xae\xb5\x79\x3d\x84\xbf\xf1\xfa\x6d\xc2\xa3\x0d\x06\xf6\x90\
-\x62\xa3\xc0\xc5\x5a\x12\xe5\xe1\xfd\x55\xa0\xcf\x77\x27\x0b\x34\
-\x2f\x3c\x8c\xaa\xf2\xc3\x27\x7a\xa1\x4d\xfc\xa1\x9e\x6c\xa7\xf4\
-\xaa\x0c\xd3\xb6\xc2\x1e\xbb\x7f\xd8\xa3\x5e\xaf\xf1\x62\xf3\x5b\
-\x98\xf6\x06\xeb\x5b\x87\x71\x98\x3a\x96\x0e\xa7\x36\x03\x6c\xe5\
-\x33\x16\xc5\x8a\xb1\x5b\xad\x2a\x00\x95\x35\x27\xf4\x28\xd2\x2c\
-\x0f\x68\xc5\x61\x5f\x6b\x60\xcf\x00\x55\xc9\x88\x6a\xa4\xb5\x01\
-\x4d\xbe\x56\xf5\x45\x7b\x26\xb9\x0c\x65\x16\x5c\xcd\xac\xaa\xcc\
-\xb4\x5a\xa3\xc6\xab\x0f\x9a\xb1\x7c\x58\xa6\x12\x27\xf4\x49\x19\
-\x21\x6d\x08\x80\xc6\xea\x21\x76\xff\xd3\xf4\x2a\xd3\xe1\x2d\xa3\
-\xf3\x15\x11\x81\x53\xd4\xf7\x21\x17\x5e\x06\xe7\x34\x62\xfb\x78\
-\x97\x9d\xed\x33\x0e\x8e\x3d\x2e\x7b\x59\xee\xdd\xbe\x01\xc6\x31\
-\xbf\xb1\xf3\x3a\xc1\x7f\xf1\x88\x27\xff\xf1\x84\x1f\xfb\xf7\xff\
-\x19\xf5\xd2\x15\xbd\x46\x9e\x57\xbf\xf4\x2a\x3f\x7b\xe7\x36\xff\
-\x0a\x78\xf3\x6b\x7f\xcc\x62\x65\x89\x6f\x1e\xc2\x8d\x7f\xfb\x3e\
-\x4b\xb5\x7b\x34\xef\x82\xe7\x56\x38\x26\xa0\xcc\xd4\xed\xf6\xbc\
-\x9b\x33\x98\xed\x66\xd4\xce\xe6\x30\xc6\x86\x32\x12\x25\x80\xfd\
-\x81\x29\x3a\x00\xfd\xf8\x4f\xfc\xe3\x9f\x33\x62\x31\x1c\x75\x47\
-\xc8\xfb\xbe\x69\x29\x76\x96\x00\x1e\xfa\x05\xa2\x68\x02\xa5\x2c\
-\xe1\x18\xc5\xce\x7e\x68\x91\x37\xe3\x9e\x5e\x46\x8f\x0c\x59\x06\
-\x7e\x06\xd3\xf4\x18\xf8\x19\x6c\x33\x27\xf4\x75\x29\x4b\xde\xcf\
-\x51\x2d\x2d\xd1\x77\xc7\x34\x4b\x25\x96\x0a\x87\x5c\x7a\x22\x31\
-\xe7\x62\x34\x21\x30\x7b\xd8\x79\x8b\xe5\xaa\x8f\x91\xe9\x53\xae\
-\x1d\x70\x1e\x4d\x30\x96\x3d\xce\x1f\xe6\x31\x5a\x0e\xcb\x2f\x8d\
-\x59\xbe\x82\x9e\xdb\x24\xeb\x1a\x62\x1c\x97\x33\x62\x6c\x58\x62\
-\xd0\x4b\xe8\xc7\xd5\xd6\x86\x0a\x10\x74\x8c\x88\x8a\x65\x13\x86\
-\x22\xdb\xac\x64\x0c\xc9\x19\x35\x32\xa3\x2e\xdb\xad\x2e\xee\xd5\
-\x33\xce\x2e\x2d\x7c\xf7\x8a\x6c\xd9\xc7\x9d\xbc\x40\xa9\x76\xc6\
-\xc4\xc9\xaa\xad\x04\xb0\xcc\x26\x23\x0f\x93\x71\xa8\x3c\x07\x92\
-\x3d\xf5\x6d\x98\xf5\x15\x0b\x03\x2a\x73\x4d\xbf\xc9\xfd\x27\x41\
-\x49\xed\x27\xf7\xad\xe4\x8b\x8a\x7d\x0b\xb5\x02\xaf\xde\x9d\x05\
-\x30\x40\xc5\x5c\x87\x4c\x1c\xde\xcf\xb8\x8c\x3d\x07\xab\x78\x93\
-\x30\xff\x01\x21\x35\xaa\xfd\x45\xda\xe6\x90\x6a\xbd\x9f\x90\x0e\
-\x03\xdf\xe4\xc9\xde\x0e\xad\xf7\x43\x5e\x3f\x18\xd0\x3a\xbd\xa2\
-\xd5\xf5\x58\xa8\xae\xab\x16\x58\x3f\x52\x1e\xf1\xa7\xc3\x32\x7f\
-\xf0\xbb\xbf\x4d\xdd\x3b\xe6\xe3\x4b\x2f\x61\xaf\x2e\xc7\x95\x29\
-\x79\xbe\xf8\xea\x5d\x1e\x9e\x79\x3c\xdc\x3e\xe0\x46\x29\xcf\xdb\
-\x07\x97\x64\x4e\x0f\xd9\xfa\xf4\x3a\xd5\x8a\xc5\xb0\x6f\x32\xca\
-\xda\x4c\x46\x23\xf2\xd9\x12\xae\x1f\x51\xcc\x5a\x3c\x3b\x1f\xcc\
-\x30\xb1\x39\x3a\x27\xb2\x4a\x18\x81\x8b\xbd\xb4\xcc\xbd\xad\x9b\
-\x64\x73\x8b\x94\x27\x50\x30\x73\x74\x03\x87\xb1\x99\x27\x18\x3a\
-\xd4\xcc\x1c\x3f\xff\xcb\xbf\x4e\xe6\x27\xfe\xc9\xbf\xfb\x73\x12\
-\xac\x45\x2b\xc0\x37\x2d\xda\x13\x1b\x3b\x93\x34\x36\xa4\x2e\x2e\
-\x58\x43\xc2\xac\x00\x71\xc1\x1a\x62\x99\x3e\x7e\x68\x61\x9a\x1e\
-\xc3\xa8\x4a\xc1\x98\x66\xbc\x49\xdd\x6c\x9a\x53\x59\x91\x21\x4b\
-\x86\x2c\xc5\xc5\x5b\x58\x85\x1b\x94\x2a\x5f\xa2\x18\x8d\xd8\x3b\
-\x38\x22\x1b\xeb\xd9\xf6\xe2\x09\x95\x9b\x5d\x0a\x57\x4b\x84\xf9\
-\x36\xa5\x1b\x11\xed\xbf\xa8\x13\x3c\x9d\xe0\xe5\x4d\x4e\xc7\xb7\
-\x39\x0f\x8b\x94\x4f\x9e\x61\x98\x65\xaa\xe3\x0c\x8e\x61\x4c\x75\
-\xb0\x96\x77\x5b\x8d\xd3\x23\x87\x06\xe4\xc2\x80\x8e\x11\x31\x34\
-\xc0\x8b\x53\x1a\x23\x0a\x14\x8c\x3c\x8e\x93\x61\xdc\x17\xc3\x4d\
-\xba\x97\x65\x8a\x91\xd0\xc0\xd0\x60\xe2\xf8\xb4\xa8\xd2\x34\x46\
-\x78\x43\x18\x45\x23\x02\xd7\x24\x37\xb4\xf0\x4a\x42\x0f\x57\xcb\
-\x03\x5c\xcb\x57\x46\x9b\x04\xa3\xdc\x4a\x50\xa7\xf5\xef\xc8\xcc\
-\x4d\xf5\x6f\xac\x87\xa5\xec\x98\x18\x01\xb9\x5c\x46\xe9\xdf\x8f\
-\xdd\xac\xf2\xe2\x8a\x41\xa1\x94\x04\xf0\x4a\xa5\x38\x05\xb0\x26\
-\x27\x44\x5f\x0f\x01\x60\xaf\xf2\x36\x0b\x76\x59\x01\x77\xe0\x9b\
-\x38\xa7\x11\xfd\xed\x23\xbe\xf9\xc1\x84\x6f\x6f\x6f\x73\x76\xe2\
-\x31\x18\x65\x58\xa8\xae\xd3\x8a\x5a\x78\x91\x85\x87\x47\x2f\x73\
-\x83\x62\xbe\x44\x60\x65\xf9\xe3\xd7\xdf\xa0\x7f\xf2\x2e\x9f\xa8\
-\xaf\x53\xdc\x68\x60\xe6\xc6\x14\x16\x1a\x7c\xe1\x07\x3e\xc5\x07\
-\x7b\x1d\x25\x2d\xee\xf6\x73\x9c\x1d\x5c\xf0\xb9\x57\x6d\xfc\xea\
-\x3a\x13\xa7\x4f\x29\x63\xe0\xfa\x11\xa5\xcc\x84\x28\x58\xe4\xb8\
-\xf3\x98\xf7\xdf\xdf\x57\x20\x6e\x8f\x2c\x8a\xf4\x15\x88\xef\x17\
-\x2b\x6c\x7d\x7e\x83\x49\x2f\xcb\xd8\xcc\x33\x0c\x1c\x6a\x99\xb2\
-\xda\xf6\x30\xf8\xc5\x5f\xfe\x35\x61\xd8\x29\xa0\xc6\x60\x96\x00\
-\xd6\x99\x39\x01\xe6\xa0\x44\x3e\xd3\x17\x2e\xb7\x18\xc4\x96\xe9\
-\x13\x50\x24\x67\xf8\xca\xf0\x9b\x30\xc0\x36\x73\x84\x4c\x98\x04\
-\x11\x94\xb2\x0c\x87\x11\x79\x53\xe4\x26\x67\x83\x12\x76\x71\x15\
-\xb7\xd3\x66\x64\xbd\xcb\x49\xe4\xf1\xc2\x52\x01\xe7\x4a\xe4\xfc\
-\x0e\x17\x2e\xd8\x6c\xff\x30\xc1\x59\x91\x61\xc5\xa2\x91\x5b\x22\
-\x6b\x44\xac\xd7\x7a\xdc\x9b\x34\x58\xa8\xd7\x69\x56\xb3\x9c\xf5\
-\xc4\x84\x4e\x59\x71\xac\xae\x1e\x31\x13\x0f\xf2\x26\x0b\x51\x8f\
-\x88\x82\xca\xd3\xd5\xf3\x6f\xe9\x19\xe4\x2a\x22\xbf\xd7\xca\x89\
-\x96\x53\x41\x98\xc1\xf7\x0b\xe4\xd6\x1a\x18\x5e\x06\x9b\x2e\xed\
-\xd0\xa0\x33\x8e\xa8\x1b\x05\x26\xe3\x90\x5c\xc5\xa4\x60\xe4\xf1\
-\x2c\x97\x9c\x51\x23\x70\x67\x1b\x72\x55\xcb\x03\x46\xe3\xec\x5c\
-\x30\x4b\x00\xab\x4b\xbd\x99\x13\x00\x2e\x8b\x86\x78\xb9\x5c\x46\
-\x34\x18\xd4\x3c\x10\x3a\x80\x1b\xed\x2c\xb5\xe5\xd9\x4a\x13\x63\
-\xb2\x42\xa9\x7c\x48\x18\xbb\xe3\xc2\xfc\x07\xd4\xed\x9b\x5c\x78\
-\x62\x41\xf7\xaf\x4e\x19\x7b\x0e\x4f\x8e\x2e\xf8\x83\x0f\x26\x5c\
-\x3d\x3b\x54\xc9\xf2\x46\xce\xc4\x75\x1c\x0c\xad\x3b\xa5\x17\xff\
-\x5b\xc8\x2f\x12\x65\x3c\x3e\x3c\xed\x70\xfa\xfa\x1e\x2f\xdd\xbd\
-\xa4\x72\xe7\x53\x90\x29\x50\x2a\x98\xfc\xc8\x8b\x5b\x3c\x3c\xf3\
-\x38\xda\xdb\xe1\x70\x78\xc4\xc3\xc3\x1d\x16\x7d\x9f\x97\x3f\x96\
-\x21\x30\x8a\xb8\x81\x09\x85\x0c\xb9\x30\xc2\x30\x43\x4e\x5b\x59\
-\xde\x7f\xf4\x90\x61\x60\x62\x5b\x21\xc3\xc0\x64\xb1\x31\x51\x9a\
-\xb8\x76\x67\x95\xad\x1b\xeb\x80\x4d\xcd\xcc\x31\xea\x8d\x18\x65\
-\x27\x22\x57\x23\x70\xc8\x96\xb3\xfc\xc2\x2f\xfd\x7a\x72\x40\xb9\
-\x94\x0c\xea\x60\xd4\xe6\xcf\x26\x0b\x03\x57\x19\x7c\x52\x1b\x0f\
-\xfd\x02\x56\x65\x40\xbf\x2f\x06\x9a\xfb\x95\x08\xbf\x5f\x60\x48\
-\xa8\xc2\xd4\xd3\x28\x5f\xec\x53\x5d\x2a\xe1\x5e\xf4\x55\xc6\xda\
-\xc7\x6b\xa5\x44\x97\xcb\xfa\xe3\x8f\x93\x77\xaa\x2c\x2f\xc2\x32\
-\x90\xdf\xa8\x72\x70\xd7\xe3\xd6\xd8\xe6\x20\xe7\x69\x61\xe4\x21\
-\x27\x8f\x1f\xd3\xd2\x0b\x29\xe3\x5c\x5b\xbf\xe8\xb1\x94\x59\x66\
-\xe2\x0b\x40\xd7\xf5\x2a\x0a\x73\x2c\xf4\xa9\x09\xa5\x5e\x4e\xf4\
-\xbe\x95\x2d\xa8\xa4\x5b\x67\xbf\x8b\x51\x16\x85\x9b\xdd\xb0\x8b\
-\x21\x9a\xe3\xa8\x84\x1c\xd7\x99\x40\x11\xd5\x73\x4d\x0f\x4c\xf8\
-\x45\x2f\xf6\xeb\x4e\x34\x1f\x32\x73\xc3\xc9\x7a\x30\x43\xef\x9e\
-\xd9\xac\xad\x6a\x2e\xb4\x24\x03\xe7\xd7\xd6\x39\xed\xef\x26\xf4\
-\x30\x40\x79\xd5\x60\xc2\xad\xb8\xe8\x20\xa0\xe3\x91\x00\xf0\x59\
-\x7f\xc0\x93\xbd\x2c\x8f\xde\xd9\xe3\xb2\x97\x05\xb2\xaa\x57\x85\
-\x6c\x7f\x95\xbe\xb5\x08\x20\x6a\xd1\xac\xde\x05\xe0\x4f\x7a\x0f\
-\x09\x7e\xf6\x11\x3f\xf5\x9f\xdf\xe6\x85\x7f\xef\xd3\x98\x61\x83\
-\xfa\x66\x93\x7f\xf5\x5f\xff\x34\x3f\x1b\x6b\x64\x80\xff\xe9\xb7\
-\xde\xc3\x37\xd7\xf8\x77\xfe\xe9\x4b\x0c\xfc\x88\xc1\xb0\x4d\x29\
-\xae\x00\x3f\xbd\x14\x35\x7d\x8d\xbc\x20\x9e\x05\x8e\x19\xb4\x81\
-\xfc\xac\x2e\xee\x76\x66\xb5\xb4\x3f\x30\x29\x85\x39\xd1\xa0\xa0\
-\x10\x77\x29\xd6\x01\xac\x1b\x76\xe9\x9b\x7c\x4d\xdf\x5f\x82\x74\
-\x26\x6b\x29\x4e\x2a\xd2\xff\x46\xdf\x0f\xb1\x2a\x06\xa3\xa1\xc9\
-\xe9\xa3\xbd\xb9\x9d\x7d\x00\x96\x0b\xcb\xac\x2c\x79\xdc\xc8\xdc\
-\xe2\x96\x91\x65\x61\xa5\xce\xa7\x1a\x6b\x2c\xac\xd4\xd9\xba\x73\
-\x87\xd5\xfa\x06\xab\xf5\x0d\xbe\xf0\xf1\xfb\xdc\x7a\xe5\x8b\x82\
-\x59\x35\x00\xcb\x04\x99\xce\x9c\x03\x40\xcf\x10\xd1\x2f\xad\x54\
-\x48\x2f\xef\x71\x9d\x89\xf0\x05\xb7\xfa\xb4\x3a\x72\x86\xb0\xad\
-\x52\x2e\xf5\x84\x9c\x74\xee\x43\x2b\x34\xd4\xf3\xf2\xbb\xc8\xfd\
-\xf5\x72\x7e\x3d\xc2\x17\x50\x53\x00\xce\xd0\xa5\x99\x81\x17\xee\
-\xdc\xe1\xf6\x9d\x8d\xb9\x00\x06\x88\xb2\x67\x73\x25\x84\x88\xbe\
-\x8a\x34\xc1\x9d\xa3\x0b\x26\xdc\x22\xcb\x01\xce\x69\xc4\xd3\xc3\
-\x55\xde\x7b\x27\xe0\xd1\xdb\xae\x62\x5f\x09\xda\x16\x02\xc0\xb2\
-\x52\x5a\xaf\x98\x96\xe3\x80\xf7\xfb\xcf\x44\xbb\xaf\xea\x5d\x7e\
-\xe3\x38\xe2\x7f\xff\xef\xfe\x4b\xce\xfe\xf4\x37\x09\xcd\x76\x0c\
-\x44\x83\xff\xf4\xef\x7f\x9e\xca\xfa\x16\x93\xf3\x47\xb4\xda\x06\
-\x6f\x7e\xfb\x77\x79\xfb\xe1\x1f\x51\x2b\x89\xf3\x70\x15\x64\x54\
-\x3a\xa6\x32\xde\x46\x56\x3c\xa6\x41\xef\x00\x15\x5f\x55\x75\x5c\
-\xf5\xa7\x19\x72\x55\x22\xd1\x01\x48\x02\x4b\x67\x61\x19\xa1\x93\
-\xcf\xe9\x85\xa2\x05\x6b\x88\x17\xb3\x70\xdb\xec\x61\x8f\x97\x13\
-\xde\x0b\xc1\xc8\x86\xa8\x08\xa9\xcc\xd6\x87\xc9\x7d\xf2\x85\x22\
-\xfb\xdb\x87\xfc\x9f\xbf\xff\xfb\xac\x6f\xad\xd1\x58\xdb\x4b\xec\
-\xf7\x29\xe7\xa7\xb9\x71\xc3\x8f\xe3\xe7\x00\xeb\xe8\x50\x2f\xe1\
-\xc3\x2a\x1c\x0f\x05\x6b\x7f\x76\xb3\xc4\xc3\xf7\xf2\x74\x3a\xfd\
-\x44\x0e\x83\x1e\x45\x2b\x85\x39\x5c\x67\x9c\xa8\x6f\xc3\x8c\xbd\
-\x16\x3d\x43\x31\xb1\x6b\x8e\xd5\x73\x92\xad\xa5\x6b\x4c\xa6\x3d\
-\x76\xe3\x9c\x5e\x09\x4c\x09\x48\xc9\xb6\x2e\x93\x44\xf2\xbb\x04\
-\x7a\xd0\xab\x53\xad\x76\x14\x53\xcb\x1e\xc5\x72\x41\x64\xe8\x52\
-\xb1\x36\x58\x59\xcf\x70\xff\x81\xc9\x72\x21\x43\xa5\xb9\x3c\x73\
-\x1c\x25\xfb\xea\x2c\xdc\x8f\x83\x1b\x62\x2b\x98\xb8\xb9\x30\xa6\
-\x7d\x1a\x71\x3a\xf4\x79\xb2\x77\xc4\xa3\x77\x44\xfe\xee\x65\x3f\
-\xc9\xbe\x9d\x32\xd4\x1d\x68\x95\x83\x69\x87\x1f\x8d\x99\x25\xa0\
-\xc5\xa4\x54\x9b\x56\xd4\xe2\xde\x9d\x02\xaf\x75\x3d\xf8\xd9\x5f\
-\xe0\xbf\xfd\xd5\x2f\x62\xdd\x01\xb3\x7e\x87\x57\xbf\xf4\x2a\xff\
-\xa2\xd5\xe1\x5f\x03\xfd\xa3\x1d\xbe\xfa\xee\x23\xee\x7f\xf5\x92\
-\xad\xa6\xc1\xda\x9d\x09\xed\xab\x01\xbe\x96\x6f\xde\x1e\x59\x2c\
-\x70\xcc\xa9\x07\x61\x7d\x19\x73\x74\xae\xb2\xd8\x64\xa5\x48\xf6\
-\x20\x62\xd2\x98\x56\x8d\xc8\x6c\x39\x71\x25\x4e\xb1\x6a\xd4\x15\
-\x00\xd6\x99\x58\xa6\x69\x56\x2c\x53\x81\x74\x1c\x2d\x60\x8f\x97\
-\x15\x30\xa3\xee\x68\x86\x99\x93\x12\x62\xea\xae\x6b\x56\x0c\xf6\
-\xb7\x9f\xf1\xdb\xff\xe3\xaf\x13\xed\x8b\x94\x9f\xef\x73\xbe\x28\
-\xfc\xc4\x4b\x3f\xc4\x57\x8c\xaf\xb0\x56\x79\xc6\x8d\x92\x68\x9a\
-\x71\xa3\xb4\x44\x94\x3d\x53\x8f\xcb\xab\x86\xda\xae\xd4\xd7\xb9\
-\x51\xf0\x29\xd6\x33\xd3\xaa\xde\xde\xd4\x2b\x21\x80\x3b\x51\xc0\
-\x95\xcc\x3b\xf7\x75\x9d\x91\xe3\x9e\x06\xfa\xf3\x93\x8a\x85\x11\
-\xf4\x71\x9d\x89\x02\xf0\xa4\x62\xcd\x24\xff\xe8\xee\xbc\xaa\x9f\
-\xf4\xa7\xe9\x9f\x59\x33\xab\x6a\x92\x92\x5c\x34\xb5\x7a\x8d\xb5\
-\xf5\x0c\x37\x9a\x4b\x2c\x17\x96\xe7\x5e\xa1\x56\x2a\x45\xce\xfa\
-\x83\x84\x06\x6e\x2e\x8c\x13\x8c\xdc\xbf\x12\xe9\x8b\xad\xab\x1c\
-\xee\x59\xc0\x77\xde\x5f\xe0\xd1\x3b\xdb\x71\x9b\x80\x42\x42\x32\
-\xc8\xfb\x66\x39\x43\x5d\xfb\xba\x66\x39\x33\x33\x68\x32\x74\x92\
-\x97\xfa\x66\xf5\x2e\xbf\x75\x74\xc5\x6f\xff\x57\xff\x0d\x61\x4b\
-\xb0\x71\xd7\xb0\xf8\x3b\x9f\x79\x99\x97\xee\x8b\x31\xc6\xf5\x66\
-\x85\x3f\x7c\xf8\x1e\x7f\xf1\xb5\xd7\x71\xba\x17\x94\x1a\x79\xfc\
-\x14\x13\x5f\xd5\x0a\x2c\xc7\x00\xbe\xe2\x06\xd1\xf8\x52\xe5\x13\
-\x03\xf8\xd5\x56\x82\x8d\x75\xb7\xa9\x39\x88\x8d\xda\x28\x8e\x53\
-\x4b\x1d\x3c\x70\xd1\x7c\xc1\x02\x8c\x6e\x64\x53\xb0\x44\x8e\xb0\
-\xf4\xf9\xca\xa4\x1f\xa3\x26\x80\xef\xe5\xce\x95\xac\x90\x6c\xac\
-\x12\x88\x62\x1d\x7c\x75\x34\xe4\x6b\xbf\xfe\x4d\x9e\xb4\x9f\xd2\
-\x69\xf5\x59\xbe\xda\xa0\xdf\x12\x40\x2e\xec\x3e\xa0\xb2\xb0\xca\
-\xcd\xdc\x27\xe8\x55\x2e\x15\x70\xe5\xa5\xf2\x46\x69\x89\x6a\x7f\
-\x91\xcd\xcd\x90\x6a\x7f\x91\x8d\x8c\x4b\x79\xd5\x60\xd0\xd1\xb4\
-\x9c\x04\xa2\xce\xaa\x12\x60\xf1\x6b\x0a\xcc\xf1\xeb\x6a\xab\x57\
-\x1d\x6b\x60\xd4\x2b\x98\x75\xb0\xa6\x73\x79\x75\x4d\x2b\x2b\x35\
-\xa6\xd5\xce\xb3\x61\xd6\x7a\xd7\x4c\x04\x31\x5e\x5d\x6f\x72\xff\
-\x81\xc9\xe6\xed\x0c\x95\x26\xb3\x5e\x08\xe0\xa4\x7f\x73\x46\x07\
-\xb7\xae\x72\x54\x16\x56\xc9\x72\xa0\x18\xd9\x39\x8d\x78\xb2\x3f\
-\xe0\x57\xbf\xf5\x4d\xde\xfd\xe6\xeb\xb4\xba\xde\x73\xe5\x42\x2b\
-\x6e\x14\x6e\x96\xc5\xfd\xd0\x09\xa8\x94\x6d\xd5\xbf\xc2\x65\x9c\
-\x78\x7f\x2b\x2c\x80\x71\x4c\x60\x36\x79\xeb\xfd\x6d\xfe\xf2\xb7\
-\xbe\x4a\x14\xec\x51\x8b\x7c\x8c\xad\x65\xfe\xd9\x7f\xf8\x25\x2a\
-\xeb\x5b\xb8\xd6\x3a\x4f\xf6\x86\xfc\xd5\x1f\xfc\x11\x1f\xbe\xf1\
-\x94\xc6\x64\x4c\x33\x35\x0b\x7a\xa1\x3b\xe4\xbc\x73\x4e\x98\x9f\
-\x2e\x5c\x79\x95\x15\x12\xae\x89\x5b\x1c\x27\x6a\xf8\xe4\x79\x30\
-\x8b\x5a\x41\x81\x97\x3b\x57\x60\x96\xcf\xeb\x00\x34\x8b\xc9\xac\
-\xb4\xa1\x9f\x4c\xdb\xf4\xac\x7c\x82\x9d\x6d\x7f\x84\xdf\x8f\x30\
-\x33\xe2\xc3\x2a\x95\x22\x97\xdd\x5d\x7e\xed\xd7\xbe\xce\xc3\xf7\
-\xcf\xa9\x5b\x55\x32\xd5\x0e\xc5\x46\x41\x9d\x24\xa5\x83\x62\xa3\
-\x04\xa0\x57\xb9\xa4\xda\x5f\x54\x4e\xfb\xfc\x7a\x5d\x39\xed\xcf\
-\xe3\x01\x8e\x85\xb5\x9b\xac\xad\x2d\x25\x81\xa2\x81\x59\x3d\xdf\
-\x33\x66\x8c\x3f\xfd\x39\xf9\xfc\xa4\x62\x25\xc0\x6b\x0d\x6c\xb2\
-\x7d\x9f\x6e\xd8\x4b\xfc\x0d\xf9\x19\x72\x2b\xf7\x97\x8f\x9b\x66\
-\xa4\x72\x28\xa4\xa1\x29\x35\xb3\x6e\xc0\xdd\xbb\x53\x60\x65\xa3\
-\xa1\xf4\xef\x3c\xe9\x20\xc1\xbb\x56\x79\x36\xa3\x8d\x9b\x0b\x63\
-\x9c\xd3\x48\x19\x74\x4f\xf6\x76\xf8\xea\x5f\x3c\xe1\xb5\xd7\xc6\
-\x9c\x1d\xb6\x55\xa2\x50\xdf\xf1\x12\xcc\x2b\xb5\x70\xe8\x04\x4a\
-\xf7\xca\xfb\x2e\x63\xda\x61\x87\x12\x39\xd1\x71\x33\x1a\x2a\x40\
-\xeb\x40\xae\x37\x2b\xfc\xc6\x71\xc4\xff\xf1\xab\xbf\x40\xe7\xbd\
-\xdf\xc4\x98\x74\x31\x87\x23\x3e\xfd\xc2\xdd\x04\x1b\xbf\xe6\x85\
-\xfc\xe1\xd7\xdf\xe4\x6c\xf8\x94\x61\xd6\xa3\xf7\xec\x50\x8d\x1b\
-\x96\x7a\xd8\x1c\x9d\xb3\xc0\x31\x46\x6e\x91\x1b\x05\x5f\x94\x27\
-\xf5\x23\x8c\xa0\xa5\x6a\xfb\x66\xfc\xec\xad\x62\x97\xa8\x3b\xc2\
-\x5e\x88\xb0\xc7\xcb\x53\x46\xd5\xf2\x89\x65\xef\x89\x84\x11\x61\
-\x99\x4a\x72\xd8\xfe\x28\x21\x19\x6c\x7f\x84\x77\x65\x24\xbc\x19\
-\x56\xa5\x42\xbf\x3f\xe0\x77\x7f\xe3\x21\x6f\xfc\xd9\x1f\xa9\x95\
-\x5d\xab\x0b\x4b\xd5\x30\xb7\x38\xe9\x8b\x6c\x2b\xe7\x34\xa2\x57\
-\xb9\x64\x74\xbe\xa2\x00\x7c\xec\x5e\xe0\x9c\x46\x1c\xbb\x17\xec\
-\x7e\xb8\x4d\xaf\x72\xc9\xee\xae\xc9\x72\x5b\x9c\xa0\xcf\x7d\xfc\
-\x0e\x9b\xf7\xee\xd2\xac\x37\xa6\xa0\x95\xe0\x8c\x8d\xb5\x19\x03\
-\x4e\xb2\x63\x7c\x5f\x02\x50\xa6\x48\xa6\x8b\x3b\xa5\x51\x27\xb3\
-\xd4\xe6\x97\xdf\xd8\x09\xe3\xad\x15\x1a\x34\x7b\x41\x82\xdd\xa5\
-\x61\x28\xd9\x77\xb3\x29\x3c\x10\x42\x03\x2f\xcf\x30\xf0\x59\x7f\
-\x90\x00\xaf\x8c\xc8\x25\x0c\xa3\xd3\x0d\xa2\xec\x19\xce\x69\xc4\
-\x1b\xdf\x9d\xf0\xee\x5b\x67\xfc\xc9\xdb\x8f\x79\xb2\xbf\x23\x7a\
-\xbb\x55\x44\xd7\x22\xa1\x69\x05\x98\x25\x20\xa5\x84\x90\x4c\x2c\
-\x25\x84\x18\x8c\x5e\x51\xdd\x8f\x64\x27\x23\xd9\x3a\x4b\x02\xd9\
-\x2c\x67\xa8\x37\x2b\xfc\xc9\x3b\x7d\x3e\xf8\x9d\xa7\x30\x38\xa5\
-\x6a\x3a\x98\x75\x93\xff\xe0\x27\xff\x96\x62\xe3\x56\xdb\xa0\xbe\
-\xd7\xe1\xc3\x37\x9e\xd2\xe9\x74\xa8\xce\x57\x4b\x4a\x4e\x1c\x0f\
-\x2d\x3a\x43\xf1\xe5\xda\xe6\xfc\x9e\x76\xa5\x30\x87\xd9\x1c\xd4\
-\x12\xac\x0a\xd0\x2a\x26\xa7\xf8\xb8\x91\xad\x80\xac\x8a\x49\x87\
-\x1e\x52\x8a\x78\x56\x1e\x23\x6e\x3d\x65\xfb\x23\xa2\x41\x97\x62\
-\x49\x48\x12\x2f\x77\x2e\x02\x24\x83\x90\xc7\x5f\xdf\xe3\xaf\xbe\
-\xf6\x8c\x52\x39\x4b\xa5\x70\x42\xa5\x2c\x9a\xf7\xad\x54\x27\xdc\
-\x5b\x8d\x30\xb5\x6a\x62\x09\x58\xb9\x55\x49\x2b\x71\x2f\x33\xe7\
-\x34\x22\xca\x9e\xa9\x7d\x72\xfe\x19\x9b\xb7\x37\x58\x5b\x5b\xc2\
-\x35\xc7\xb8\xce\x44\x48\x84\x58\xf3\xea\xf7\x13\x97\x7e\x4d\x3f\
-\x5b\x03\x5b\x31\xb0\xd2\xb4\x31\x20\x25\x98\xf5\x8c\xb3\x52\x59\
-\x44\xda\xe4\x7f\xdd\xeb\x20\xdf\x57\x33\xab\xb4\xaa\x99\xc4\xdf\
-\x95\x8d\x4f\x64\x16\x5a\xb6\x5a\xa0\xbc\xa1\x95\x86\xb5\x66\x59\
-\x58\x6a\xe0\xb3\xfe\x60\xc6\x2b\x21\x2f\xbd\x4f\xf6\x07\x7c\xf5\
-\x2f\x9e\xf0\xe8\x9d\x6d\xfe\xf4\xaf\x5a\xd4\xad\x2a\xcd\x5b\xf5\
-\x18\xb4\x05\x35\xfd\xb4\xef\x78\x54\xca\xb6\x92\x0a\x92\x91\x75\
-\x3d\x1c\x3a\x81\x6a\xdf\x25\x81\xad\xb7\xd2\x2a\x91\xa3\xa3\x8d\
-\xa8\x5b\xac\x2c\x11\x98\x4d\xfe\xed\x6f\xbe\x46\x6b\xe7\xf7\x94\
-\xb7\xe2\x53\x5b\x9b\x8a\x8d\xb3\xcb\x0f\x78\xcd\x0b\xd9\x3e\xde\
-\x65\x10\x57\xac\x67\xed\x1b\xca\xc5\x96\xbe\xe9\x57\xe5\x46\xd8\
-\x15\x72\xa2\x1f\x89\x0c\x39\xcd\xc6\x30\x13\xec\x19\xb3\xaf\x3d\
-\x5e\x4e\x30\x6b\x18\xb8\xaa\x82\x59\x37\xde\x24\x50\x75\x46\xf6\
-\xac\x3c\x5e\x54\x13\x9a\x7a\xa9\x4b\x25\x7f\x17\xdf\xb6\x79\xeb\
-\xdd\x0f\xf9\xed\xaf\xfe\x2a\xf8\x3b\x82\x2d\xe5\x17\x6d\x2e\x61\
-\x98\x5b\x1c\x0f\x2d\x56\x0b\x9b\x73\xf5\x90\xfa\xc2\x67\x01\xdf\
-\xce\x95\x67\x72\x04\xa2\xec\x19\x3b\x3b\xaf\xf3\xe2\xca\x33\x3e\
-\xf3\xc9\x2f\x2a\x00\xea\x5a\x77\x86\x7d\xe3\x4b\x7e\xa7\x16\x26\
-\x58\x52\xa5\x48\xc6\xc0\xd6\xfd\xb8\xe9\x5c\x07\x99\x4b\x9c\x76\
-\xb1\xe9\xef\x93\x0b\x60\x5e\x32\x7b\xf3\x56\xc4\xad\x1b\x36\x9f\
-\x5b\xa8\xb3\x5c\x58\x9e\x61\xe1\x46\x3b\xab\xc0\xbb\x5a\xd8\xe4\
-\xac\x3f\x48\x1c\x23\x63\xb2\xc2\x49\xff\x26\x67\xfd\x01\x3b\x7b\
-\x7b\xec\x6c\x9f\xf1\xed\xf7\x4e\xb9\xec\x65\xb5\x63\xdc\x8e\xbd\
-\x0a\xb6\xca\xfd\x10\x3d\xe5\x82\x84\x34\x90\x60\x95\xc0\x34\xcb\
-\x19\xfc\xe2\x28\xf6\x04\xe5\x14\x78\xf5\x4e\xa1\x4d\x6d\xd0\x47\
-\x2b\x6a\x29\xc9\xf0\x07\xff\xf7\x5b\x0c\xdd\x0f\x31\x26\x5d\x72\
-\x8d\xbc\xd2\xc6\x20\xfa\x2e\x77\xbf\x66\x72\xfe\x6c\xba\x10\xcf\
-\x3b\x42\x42\xcc\xbb\x45\x91\xd0\xc2\x41\xc7\x10\x72\xa2\x62\x50\
-\xca\x4c\x12\xc6\x9d\x39\x70\x85\x31\x37\x70\x3f\xba\x34\x4e\xd6\
-\xd2\xcd\xfc\xa1\x41\x97\x81\x2b\x00\x5d\xe8\x9d\x2b\x03\x51\xea\
-\xe3\xc9\xd1\x90\xdf\xfd\xc5\xd7\x68\x1d\x74\xd4\xc1\x14\xa5\x34\
-\xb0\x79\x3b\x43\xb9\xbe\xc3\x8d\x82\xaf\x80\x7b\x3c\xb4\x58\x68\
-\xef\xf1\xe4\xd4\xe0\x78\x68\xe1\x9e\x05\x9c\x0e\x77\xe9\xd6\xf2\
-\x98\x6c\xe3\x9e\x05\xea\x79\x79\x32\x8d\xc9\x0a\xce\x69\xc4\xc7\
-\x36\x2c\x9a\xf5\x06\x43\xdf\xa5\x63\x44\x09\x46\xcd\xd0\x55\x79\
-\x14\x12\xa4\xd9\xbe\xaf\x3c\x04\x7e\xd1\x23\xdb\xf7\x67\x8c\x3c\
-\xdd\xa7\x2b\x1f\xcb\x82\xd0\x34\x0b\x57\xcb\x83\x19\xd7\x9e\x5c\
-\x00\x19\xba\x6a\x18\x8d\xac\x44\x2e\x6f\x18\xb4\x96\x7b\x09\x16\
-\x96\xff\xdb\x8d\xe9\xc2\x3a\x1d\x8a\xa0\x46\x94\x3d\x53\xc0\x3e\
-\x1e\x5a\x98\x6c\xc7\x81\x8b\x6d\xde\xfe\xc0\x4f\x30\xa9\x04\x6d\
-\xa7\x2c\x1e\xf7\x1d\x8f\x86\x59\xc7\x65\xac\x58\x57\x9e\x0f\x09\
-\x54\xf9\x7c\xdf\xf1\x54\x42\x95\x64\x61\xd9\x9d\x53\x7d\xd7\x94\
-\x3e\x5e\xac\x2c\xd1\x6a\x1b\xbc\xfe\xce\xdb\x0c\x9f\xbe\x4f\x68\
-\xb6\xa9\x45\x7e\x42\x1b\x77\x5a\x7d\xde\x31\x77\x78\xed\x8f\xff\
-\x94\xe1\xc9\xb3\xb9\x78\x6a\xe4\x7d\x4e\x9c\x78\x40\xa4\x21\xb4\
-\x70\xaf\x59\xc5\x08\x5a\x49\x16\x0e\x46\xc2\x3b\x21\x19\xb4\x58\
-\x42\x79\x17\xd2\x99\x6b\xba\xac\xb0\x2a\x15\xac\x8a\x81\x67\x09\
-\xe0\x17\x4b\x60\x23\x7a\x32\xd8\x46\x57\xf4\x31\x5e\xea\xaa\x40\
-\x47\x7f\xf4\x94\x5f\xfb\xb5\xaf\x33\x39\x7f\x44\x76\xf9\xc1\x74\
-\x15\x9b\x43\xc5\xc2\x21\xa2\xd3\xbb\x04\xa8\xdb\xda\xe6\x20\x9a\
-\x10\x85\x3b\xd4\xba\x23\xba\xb5\x7c\x82\x81\xba\xb5\xbc\x7a\x5e\
-\xf7\x27\xde\x28\x2d\x51\x7e\x39\xc3\xad\xad\x57\xf0\x82\x20\x61\
-\x60\x89\xcc\xb5\x38\x49\x29\xe8\xab\xdc\x5f\xf9\x58\x82\x52\x37\
-\xd8\x66\x18\x3a\x7e\x6c\x0d\x6c\x8c\xa0\x9f\xe8\xe2\x23\x75\xae\
-\xac\xbc\xd0\x17\x81\xde\xea\x35\x43\x97\x5a\x46\x00\xf8\xfe\x03\
-\x53\x05\x75\x94\xad\xd1\x64\x46\x13\x57\xba\xb7\x66\xdc\x6a\x67\
-\xfd\x01\x6e\x6b\x9b\xf7\xde\x09\x78\xe3\xdb\xef\xf1\x64\x6f\xa8\
-\x64\x41\xb7\xd8\x57\x8c\x1a\x99\x15\xb2\xce\x58\xe9\x5a\x09\x38\
-\xc9\xbc\xb2\x62\x5b\xea\x5c\xf9\xbc\xde\xff\x58\xb2\xb0\x5e\x4d\
-\xa2\x7f\x9e\x32\x10\xa3\xa7\x64\xaa\x1d\xbe\x75\x60\xf1\xc1\xef\
-\x3c\xc5\x74\x46\xc2\xc8\xd3\xb4\x71\x76\xf9\x01\x97\x3d\xb1\xe8\
-\x5e\xff\xf6\x37\x94\x61\x97\x0e\x7c\xac\x95\x0d\xdc\xb3\x80\xa8\
-\xd2\xc4\x08\x5a\xd0\x8d\x65\x5e\x26\x36\xa4\x8b\x39\x4a\x99\xbc\
-\xf0\x4e\xd8\x46\x97\x68\xd0\x55\x6e\xb5\xc2\x45\x2d\x61\xbc\xc9\
-\x66\x28\x6e\x24\xaa\x9a\xc3\x41\xa8\x5e\x93\x72\xa2\x15\xf9\x71\
-\xe2\xce\x94\x81\xbd\xdc\x39\xfd\xd1\x19\x5f\xff\x8d\x90\x87\xef\
-\x9f\x93\x5d\x7e\x40\xa5\x70\xa2\x19\x3c\xe2\xa0\xe4\xce\x2f\x71\
-\x5b\xdb\x6c\x1f\xef\xd2\x6f\x4d\x07\xf0\x19\xe6\xd6\xf4\x72\x11\
-\x6b\xe5\x5a\x77\x44\xc8\xfd\x84\x76\x06\xd1\x9f\xe0\x46\x69\x89\
-\x5e\xe5\x92\xd5\xae\xc9\x46\xa3\x45\x79\xb1\xa9\xdc\x57\xd2\xa3\
-\x20\x7d\xbb\x72\x4b\xaa\xf8\x72\x52\xb1\xa6\x9a\x38\x96\x14\x92\
-\x45\xab\xbe\x93\x78\x8f\x94\x11\x12\xf8\xf5\xc8\x98\x61\xef\xf4\
-\x63\x05\xe0\x8d\x86\x1a\xdf\x25\x01\x2c\x41\x2b\x59\xb8\xd1\x9e\
-\x32\x4e\x71\xfd\x32\xa1\x89\x85\xf7\x21\xab\xe4\x03\x7d\x61\xfd\
-\xcb\xa0\x85\x6c\xb6\xdd\x29\x43\xd6\x19\x33\x29\xe7\x14\xf0\x74\
-\x90\x96\xc8\x29\xb6\x95\x3a\x57\xbe\x26\x41\x9a\xbe\xf5\x8d\x02\
-\x7e\x71\xa4\x5e\x4b\xba\xec\xaa\x6c\x36\x57\xe9\x5e\xb5\x79\x6b\
-\xcf\x65\xec\xff\x99\xd2\xc6\x77\x63\x6d\x3c\x39\x7f\x84\x6b\xad\
-\x27\x5b\x2a\xd8\x70\x9a\xba\xc8\x1b\xb9\x45\x4a\x2b\x19\x8c\x7e\
-\x8b\x28\xd3\x24\xac\x76\x84\x9b\x2d\x66\xe2\xd2\x60\x3c\xf5\x13\
-\x7b\x51\x2d\xa1\x71\x8b\x25\x91\x18\x5f\xb1\x4c\xdc\xc8\x06\xca\
-\x98\x99\x92\xea\x02\x34\xf5\xaf\x65\x12\x39\x16\xc5\x12\x4a\x3e\
-\xb4\x27\x36\x95\xfc\x0a\xdd\x77\x07\x22\x86\xee\xef\x30\x29\x1c\
-\x29\x57\x4e\x8b\x80\xa6\x39\xe4\xd4\x83\x0f\xdc\x36\x67\xbd\x2c\
-\x67\x3d\xf1\xe5\xa2\x70\x87\xb3\x5e\x56\x0c\xe3\xcb\xdc\x4a\xb0\
-\x70\xb7\x96\xe7\x46\xc1\x27\xe4\x7e\xc2\x11\x0e\x28\xe3\xef\xd0\
-\x35\x58\xad\x6f\x24\x7c\xc0\xf3\xd8\x75\x5e\x70\xc2\x08\xfa\x09\
-\xc3\xad\xea\x3b\x8a\x59\x7b\x56\x99\x52\x39\xab\xc0\xac\x03\x35\
-\xad\x87\x75\x2f\x87\xee\xda\xab\x65\x6a\x34\x6b\x36\x6b\x65\x43\
-\xb9\xd2\xce\x87\xe7\x09\x63\x4e\xb2\xf0\x41\x34\x49\xb0\xae\x2e\
-\x37\x9e\xec\x65\x79\xf2\xf4\x30\x21\x1f\x24\x40\xa5\x1c\x70\x19\
-\x2b\x00\xeb\x06\x9b\x04\xb4\xce\xc6\xe9\xed\xdc\x3a\x40\x5f\x74\
-\xd6\x9c\xf8\x43\xd5\x99\x3e\xbd\x7f\xa7\x4c\x9c\x8b\x01\x27\xef\
-\xfc\x25\x7f\xf5\x97\x21\x70\x85\x31\xe9\x72\xb7\x9e\xe1\xcb\x3f\
-\xf4\x22\xcd\x4f\xff\xdd\xf8\x12\x71\x83\xb3\xb8\x6d\x47\x1a\xc0\
-\x13\xef\x38\xf1\x9c\x11\xb4\x30\x0d\x69\x0b\x39\xb8\x41\x16\xb7\
-\x38\x0d\x6c\x99\x00\x5e\x54\x53\x8d\xb5\x3d\x2b\x8f\x9b\xcf\x29\
-\xc0\xda\x9e\x8b\x59\x14\x4d\x54\xb2\x14\x09\x03\x57\x05\x33\xa4\
-\x9c\x90\x1e\x0a\x29\x45\x1a\x59\x8f\xd3\xc3\x36\x7f\xfe\x8d\xc7\
-\xe0\xef\x80\x15\x5b\xa7\xce\x98\x6e\xb1\x2f\x1c\xeb\x61\x81\x95\
-\xcc\x34\x59\x7b\x83\x67\x9c\xf5\xb2\xe4\x2f\xab\xac\xc4\x3d\x74\
-\x4b\x2b\x99\x84\x85\x7a\xa3\x20\x1a\xde\x01\x8c\x4e\x8e\x66\x13\
-\xaa\x4f\x23\x96\xdb\xed\xc4\x68\xd5\xeb\x8a\x2f\x55\xb2\x79\xec\
-\x41\x90\x2d\xa3\x74\xab\x37\x30\x9b\x33\xb9\x0f\x41\xbd\x81\x5f\
-\xf4\x12\x0b\x62\x52\xb1\x12\xbe\x66\xe9\x86\xd3\x17\x49\xa6\xda\
-\x49\x64\xa3\xe9\xf9\x21\x69\x26\xd6\x1f\xa7\x75\xf2\xee\x7e\xc0\
-\xa3\x77\xb6\x39\x39\x0a\x12\xec\x28\x99\x31\xcd\xb4\x52\x4a\x28\
-\xd7\xa1\x33\x9e\xd9\x6f\xc6\x80\x8e\x35\x70\x1a\xa4\x12\xc8\x66\
-\xd4\x4b\x68\x6f\xa9\xb9\xf5\xc5\xf2\x9a\x17\xf2\xc1\x6b\x5f\xe3\
-\xea\xd1\xd5\x54\xeb\xbe\xf2\xb2\x62\xe3\xcb\xfe\x85\xaa\x9b\xd4\
-\x6f\xa7\x9e\xf0\x58\xe8\xd8\x88\x32\xcd\x79\xe9\xf3\x74\x7a\x3e\
-\x54\x23\x21\x27\x8a\xa5\x64\x32\x4f\x18\xb8\x62\xc8\x4c\x51\x54\
-\x2d\xdb\x9e\x41\xce\xb8\x4a\xf8\x81\x7d\x1c\x8c\x5a\x1e\x8b\xa9\
-\xb7\x40\x32\xf1\x65\xa7\xc3\x77\x7e\xe7\x1b\x3c\x7c\xef\x4d\x4a\
-\xe4\x98\x14\x8e\x14\x2b\x58\x83\x7c\xac\xc3\xda\x53\xf1\x9e\x7b\
-\xc6\x21\xc2\x47\x3c\x5a\x14\xc3\x03\x6f\x64\x6e\xcd\xb8\x90\xdc\
-\xb3\x80\x4a\xf7\x16\x83\x4e\x40\xbb\x31\xa1\xd6\x1d\x71\x3a\xdc\
-\x4d\x78\x32\x0e\x83\x52\xa2\x9b\x4c\x3a\xa0\x21\xc1\xaa\x4b\x0a\
-\xf9\x5a\xda\x7d\xe6\x9a\x63\xaa\xe5\x41\xc2\x78\xd3\xc1\x2e\x19\
-\xb7\x1e\x89\xd2\xf1\x6e\xd8\x4b\x84\x91\x75\xc6\xae\xd5\x6b\x6c\
-\xd5\xfa\x8a\x81\xd3\x01\x0d\xdd\xad\x26\xef\x4b\xe0\x02\x9c\xf5\
-\xb2\xec\xee\x07\xca\xfb\xa0\x03\x71\xe2\xcf\x02\x2e\x0d\x52\xe9\
-\x69\x90\x7e\x62\x5d\x36\xcc\xc4\x00\xa2\xa4\x01\xa7\x37\xf4\x96\
-\xc6\x9d\x94\x1b\x69\xf6\x07\xa8\x2c\xde\xa6\x7b\xd5\xe6\xf5\x77\
-\xde\xc6\x3f\x79\x08\x03\x11\x02\xff\xfc\xed\x1a\xaf\xbe\xb8\x44\
-\x76\xf9\x01\xae\xb5\x4e\x7f\xb8\xc6\xa4\x37\x64\x74\x3a\x5d\x90\
-\x2b\x99\x4b\xa5\x93\xd3\x1e\x2a\x11\xb1\x2b\x53\x1a\x8c\x99\xb8\
-\x19\xea\x55\x2b\xd6\xc4\x2c\x10\x0d\xba\x2a\x60\x21\xdd\x65\x22\
-\xe1\xa7\xac\x65\x45\x15\x15\x3b\x5b\x94\x45\x07\x79\x3f\x1b\x97\
-\x33\x25\xb3\xd6\x76\x8f\x1c\x5e\x7f\xa7\x05\xd6\x56\x22\x46\xdf\
-\x8c\x5b\xde\x34\xcc\x88\x96\xd6\x01\xaa\x79\x3e\x8d\xc7\x4b\x29\
-\x71\x1c\x1c\x70\x3c\xb4\x14\x48\x4d\xb6\x39\x89\x2c\x8e\x83\x03\
-\xa2\x70\x87\x7e\x0b\x8e\x83\x03\x2a\xdd\x5b\xca\x7a\xd7\xeb\xb4\
-\xb2\x7d\x3f\xd9\xc0\x4f\x73\xaf\xc9\xfc\x07\xbd\xe2\xb8\x14\xe6\
-\xe6\x06\x30\xf4\x26\x28\x52\x2f\x4b\xc3\x50\x06\x36\xf4\x90\xb4\
-\x0c\x43\xeb\x4c\xdd\xac\xc3\x67\x1a\x3e\x85\x17\x85\x4b\x50\x4a\
-\x88\xe7\xdd\x74\x50\x9f\xf5\x84\x7c\xf8\xf6\x7b\xa7\x74\xfc\xa4\
-\x01\xe6\x32\x4e\x34\x51\xd1\x8d\x2e\xb9\x9f\xae\x7d\xe7\x01\x3d\
-\xdd\x02\x40\xba\xd2\x74\x96\x96\x7f\x23\x6b\x89\xd7\x24\x53\xeb\
-\xfe\x62\xfd\x6f\x06\x66\x93\x6f\x1d\x58\xec\xbe\xf9\x94\x8b\xc3\
-\x7d\x8c\x89\xb0\xbb\xbe\xf0\x7d\x2f\x2b\x77\x5b\xc9\x3f\x52\xa1\
-\xeb\xd0\xbb\x20\xf4\x2e\x30\x72\x8b\xb3\xdf\x33\x0e\x37\x8b\x88\
-\x9d\x43\x27\x0a\xc8\x96\xa6\xc0\x37\x3b\x97\x27\x4a\x1a\x78\x57\
-\x46\x22\xf9\xc7\xf2\x2e\x54\x98\x59\x6f\x6f\x35\x4d\x49\x9b\xad\
-\xd6\xbd\x68\x89\x1f\x5b\xbe\xd9\x67\x52\x38\xa2\xef\x78\xea\x12\
-\xd6\x8e\xbd\x03\x7d\x47\x4c\xa3\x97\xfd\xcd\x74\x17\x93\x3c\x69\
-\xf9\xcb\x2a\x6e\x6b\x9b\x7e\x4b\x18\x74\xfd\x96\xd0\xcb\x72\xa2\
-\xbc\xdc\x9e\x44\x02\xe0\x12\xcc\x1b\x19\x97\xa8\x78\x53\x01\x4e\
-\xca\x87\xeb\x72\x22\x54\x10\xc4\x1c\xcf\x78\x27\xd2\x59\x68\x3a\
-\x78\x3b\x46\xa4\xb2\xd7\xa6\x33\x9c\x67\x33\xe7\x36\x6a\x59\x56\
-\xea\x0d\xfc\xd2\xb2\x92\x0f\xd7\x25\xf6\x28\xbf\x69\x0c\xf2\xf3\
-\xe1\xb9\x02\xf0\xd9\x61\x5b\x8c\x5b\xb0\x92\xb3\x42\xd2\x63\x0f\
-\xd2\x0c\xab\xdf\xaf\x94\x87\x6a\xd6\xc8\x3c\xcd\xab\xfa\x18\xc7\
-\x21\x6a\x1d\xe4\xb2\x45\x01\x88\x76\x01\x62\xc2\xd3\x73\x16\x45\
-\x4c\x1a\x27\x1f\x3e\xc3\xcd\xf7\x08\xcd\x36\x95\x7c\x86\xc6\x0b\
-\x5b\xca\xdd\xe6\xb4\xe4\x57\x92\x00\x00\x20\x00\x49\x44\x41\x54\
-\x5a\xeb\xca\x28\x3c\xeb\x88\xf6\x62\x69\x7d\x3c\xe2\x4c\x85\x9b\
-\xaf\x8a\x13\x26\x6e\x66\x0a\xe0\x58\xd6\x9a\xe1\xc2\x92\x72\x8f\
-\xd9\x86\x08\x41\xcb\x00\x86\xcc\xfd\x95\x00\x96\x92\x43\xb2\x6f\
-\x1a\xd8\x51\x77\x44\xe0\x4e\x3d\x10\xd9\xe1\xba\xba\x94\x4d\xfc\
-\x61\x82\x0d\x4c\x6b\x05\xfa\x10\x8d\x2f\x71\xcf\x16\x18\xb4\x87\
-\x0c\xda\xe2\x00\x0e\xda\x43\x3e\x70\xdb\xf8\x07\x43\xce\x7a\x59\
-\x8e\x83\x69\x0b\xcd\x83\x9c\xc7\x59\x2f\xcb\x68\xb1\xa7\x0c\xc1\
-\x4a\xf7\x16\xfd\x9a\x60\xee\x5e\xe5\x92\xcd\xdb\x1b\x2c\x65\x92\
-\xbd\x80\x75\x60\xea\x9a\x55\x07\x72\x9a\x89\xd3\x41\x8c\x74\xe2\
-\x8f\x8c\xcc\xb9\xce\x44\x19\x80\xd5\xf2\x80\x6c\xdf\x27\x43\x97\
-\x6a\x79\x30\x63\xc8\xcd\xbb\x55\x9a\x49\xe0\x4a\x83\xcf\x3d\x5b\
-\x50\x00\x16\x33\x38\x0a\x33\xc0\x9b\x07\x64\x1d\x4c\xba\x97\xa1\
-\xef\x14\x94\xbf\xf7\x3a\xa3\x4d\xee\xa3\x0f\xd6\x91\x7f\xb7\x1e\
-\x19\xea\xb1\x7e\x25\xa8\x3b\xd3\xbf\x23\x3f\xbb\x6e\x55\xe9\x06\
-\x5d\x1e\x05\x63\xf2\x7b\x87\xca\xc0\x03\x78\xf5\xc5\xa5\x44\xa4\
-\x4f\xca\xa3\xe3\xb1\xa7\xb4\xf0\x89\x13\x71\xa3\xe0\x33\xf1\xb7\
-\xb8\x8a\x9b\xa9\x64\x5c\x93\x6c\x29\xa0\x34\xc8\x31\x71\x33\x8a\
-\xa1\x55\xc4\xce\x8b\x6a\x78\x51\x0d\xdb\xe8\xce\x00\x73\xc6\x8f\
-\x37\xb1\x67\xb6\x97\x9d\x0e\x57\x91\xc7\xee\x91\xc3\xde\x5b\xef\
-\x63\x5c\x39\x4c\x0a\x47\x31\x18\xf2\xea\x80\xe8\x07\xb0\x1b\x74\
-\x39\x71\xa2\x38\xed\xee\x4a\x01\x58\xe9\xdb\x28\x8b\x91\x7b\xa6\
-\xd8\xf9\xac\x97\xe5\xd6\xd8\xe6\xd6\xd8\x56\xde\x0c\xc3\xdc\xe2\
-\x38\x38\xc0\xe9\x6c\xb1\xd0\xde\xe3\x9d\xb7\x77\x18\x9e\x3c\x53\
-\x56\xb8\x0e\x44\x09\x60\xd1\x10\xdb\x4b\xe4\x44\x74\x6a\xa1\x8a\
-\xac\xcd\xcb\x87\x48\x34\x3d\x29\x67\xc9\x74\xda\xca\x07\xac\xbf\
-\xa7\x15\x1a\xca\x2d\x27\x73\x22\x9e\x07\xe0\xf3\xe1\x79\x42\x3a\
-\xc8\xe7\x9c\xc3\x88\xe3\xd6\x05\x8f\xf7\xf6\x12\x43\x67\xf4\x63\
-\x98\xb5\x0a\x33\xcc\x3c\x4f\xc7\xea\xa0\xee\x1b\x05\x05\x58\xf9\
-\x3f\x6b\x15\x08\xfd\xb3\x29\x90\x8d\xe7\xb3\xfd\x75\x8b\xa6\xe3\
-\xf7\x94\x7d\x61\x46\x3d\xe8\x84\x1c\xb7\xb6\xd9\xdb\x1f\x13\xb6\
-\x62\x9f\xb8\x0d\xab\x8b\x0b\x4a\x52\xe8\x89\x48\x0b\xed\x4b\xce\
-\x02\x21\x27\xa4\x0b\x72\xc8\x10\xc3\x89\x08\x4a\x71\x43\x1f\x37\
-\xa3\xe4\xc4\xc4\xcd\x4c\x2b\x3b\x8e\xc2\x9c\x02\xaf\x04\xb2\x8c\
-\xbe\x19\xb5\xfc\x0c\x90\x0b\xa5\x7d\xe5\x85\xf0\x72\xe7\x34\xb2\
-\x02\x08\x12\xc0\x0f\xdf\x7b\x93\x16\xc2\x5a\xd5\x5d\x3a\xfa\x41\
-\x50\x07\xa8\x37\xe4\xc4\x89\x70\x0e\x93\x55\x21\xd1\x58\xac\xc8\
-\xf5\xb1\x00\xb0\xf4\x58\xe8\x65\x49\x80\x1a\x15\x15\x85\x3b\x7c\
-\xcb\x13\x1e\x8e\xa7\x1f\xfe\x85\x00\x9f\xd6\x32\x55\xca\x00\x1d\
-\xc0\x7a\x80\x43\x1a\x75\xe9\xe0\xc6\x3c\x9d\x2c\xbd\x14\x7a\x25\
-\xb5\x9e\x23\x0c\x62\x08\xa3\x34\xe4\x74\xc6\xfd\x28\xf9\x20\x82\
-\x37\x0b\x7c\xe7\xa8\xc5\xd9\x61\x5b\x31\xbc\xce\xc2\xcf\x03\xae\
-\x0e\xcc\x79\x52\x43\x67\x57\xfd\x33\x03\x6a\xaa\x29\xb7\xfe\x19\
-\xe9\x5b\xa2\x03\xe7\x75\xee\xb8\xd6\x48\xc9\x8d\xc3\x68\x89\x63\
-\xf7\x82\xf6\xd9\xd4\x0b\x51\xbf\xbb\xce\xad\xaa\xa3\xc2\xd5\x7a\
-\xec\x40\xf7\x56\x1c\x0f\x2d\x2a\xd6\x31\xa6\x51\x26\xe3\x9a\x04\
-\xa5\x90\xba\x91\x21\x28\x85\xd3\x8c\xb6\x6a\x24\x40\xbc\x60\xd8\
-\xd0\xac\xce\x0f\x29\xc7\x3d\x29\xa4\xfb\xac\x3d\xb1\x95\x17\x22\
-\xea\x8e\x18\xba\xb7\xb9\xec\x08\x2b\xcd\x3f\xda\x65\xbf\xfb\x14\
-\xac\x2d\x31\x32\xab\x3c\xbb\x72\x3b\x86\x68\x3b\x25\x0f\x5c\xab\
-\x3b\x1d\x50\x28\x81\xab\xdf\x0e\xb9\xc9\x4a\x75\x32\x03\xe4\x85\
-\x4e\x9f\xdd\x7d\x41\x51\xbb\xfb\x01\xbb\xfb\x01\xcd\xf3\x2a\xee\
-\xd9\x11\x7f\xfe\xc1\x00\x3a\xbd\x19\x8d\xab\x1b\x67\x12\xd0\xcf\
-\x73\xc3\xc9\xe8\x9c\x0e\x64\x09\x6c\xf9\x79\x3a\x80\xd3\xfe\xe0\
-\xc2\x8b\x2b\x09\x0d\xac\x33\xee\xf9\xf0\x3c\x61\xe0\x45\xe3\x38\
-\x83\xef\x30\x62\x7f\xef\x50\x69\xcf\xeb\xd8\xef\xa3\x9e\xbf\x8e\
-\x34\xd2\x8b\x20\x0d\xe4\x34\x18\xaf\xfb\x7b\x92\xad\x13\x2e\x3a\
-\x2d\x53\x50\x1a\x77\x67\x87\x6d\xe5\x0e\x0d\xcd\x27\x54\xf2\x19\
-\x6e\xd7\x16\xa8\xac\x88\x41\x06\xd1\x82\x00\x49\x7f\xb8\xa6\x48\
-\x4d\x77\xa9\x4e\xfc\x2d\xea\x46\x3c\xd0\x87\x88\x4e\x14\x90\x71\
-\x4d\xc5\xc6\xae\x33\xc1\x1c\x2e\x75\xb9\x8a\x3c\x91\x37\xbc\x94\
-\x64\x63\x19\x42\x8e\xba\x23\x15\xc9\x2b\x94\xf6\x13\x09\xf4\x6b\
-\x76\x5b\xb1\xf0\xd1\x33\x0f\xe7\x59\x05\xfc\x1d\x2a\x65\x9b\xc6\
-\x42\x8d\x97\xd6\x56\x55\x7a\xa4\xd4\x55\xed\x7e\x98\x90\x14\xad\
-\xae\xa7\xdc\x6d\x3a\x90\xa3\xf1\x25\x46\xee\x19\xfe\xc1\x50\x49\
-\x0a\x29\x39\x0e\xa3\xd8\x30\x3b\x9b\xfa\x8b\x0f\x46\xe2\xfb\x77\
-\x3a\x7d\xae\x3a\x9d\xb9\x27\x54\x7a\x0f\xd2\x0c\xab\x3f\xd6\x19\
-\x3a\x1d\x8e\xd6\x47\x7a\xc9\x5c\x0b\x23\xe8\x8b\xdf\x17\x37\x38\
-\x59\xd9\x68\x70\xfb\xce\xc6\x47\x1a\x6e\xd3\xc4\xa6\x05\x8c\xdc\
-\x33\x9e\xee\x2d\x70\xe2\x44\xec\xb6\x4e\x13\xde\x9b\xff\x3f\xc0\
-\x9d\x07\xc4\xb4\x1c\x79\xee\xe7\xc5\xf3\xf0\x5c\x67\x22\x16\xaa\
-\xe6\x07\xd7\x59\x5e\x77\xf3\x51\x8d\x12\x95\x31\xcd\x46\x44\xf7\
-\xaa\xcd\x69\xf7\x19\xfe\xc9\x43\x25\x29\xac\x85\x29\x61\x3a\xcf\
-\x84\xbb\x52\x46\x73\x2f\x7b\x59\x46\xa7\x41\xc2\x4b\xd1\x89\x02\
-\x25\x25\x80\x84\xb4\x28\x95\xb3\x98\x7a\x98\x59\x32\xac\x04\xb0\
-\xfe\x9c\x64\x63\xf9\x58\x26\xd0\xb7\x4d\x21\xba\xf7\xf7\xb6\x71\
-\x76\x0f\x15\x80\xa3\x85\x32\xb7\x6f\x35\xd8\xbc\x77\x97\x5b\x5b\
-\xaf\xd0\xa9\x85\x73\xfd\xb1\x41\xaf\x1e\x5b\xa7\xc2\x6f\x7c\xe2\
-\x44\x09\x0b\xd5\x39\x8c\x38\x8c\xb2\x0c\xda\x43\xdc\xb3\x23\xdc\
-\xb3\x23\xa2\xf1\xa5\xfa\x2f\xc1\x2e\xef\x97\x56\xd6\xe7\xea\x5a\
-\xbf\xe8\x31\xa9\x58\x89\x82\xcf\x79\x60\xd6\xbf\x9f\x5f\xf4\x04\
-\x40\xb5\x1c\x60\x1d\xc0\x51\xa6\x92\xa8\x93\xcb\x54\x3b\xa2\xbc\
-\xa8\x6c\x50\x5a\xb9\x9a\x09\x64\xe8\x00\x96\xf2\x49\xdf\x9e\x9c\
-\x3c\xe6\xd1\x9e\x90\x10\x59\xab\x90\x60\xf9\xef\xe5\xfe\x5f\x07\
-\xe8\xcf\xf3\x6e\x48\x63\x57\x5e\x6d\x16\xa2\x5e\x02\x9c\xcf\xfb\
-\x6c\x5d\x8e\xf5\x8d\x02\xd4\x4d\x06\x9d\x2a\xef\xb5\x8e\xe3\x64\
-\xad\x2e\xb5\xb0\x97\x30\xee\xd2\x49\x4b\x18\xc7\x1c\xb7\xa6\xb2\
-\x22\x8c\x92\x25\x5e\x19\xad\x35\x82\xeb\x4c\x84\x9c\x58\x37\xc7\
-\x44\xdd\x91\x48\x8e\x37\xba\x1c\xc5\xa5\x3b\x92\x99\xa5\x2e\x96\
-\x00\x1e\x2e\x75\x29\x5c\xd4\x54\x9e\x84\x7f\xd2\x21\x3a\x9b\xb0\
-\xdf\x7f\x06\xd6\x16\x2b\x75\xb8\x91\x13\x27\xdb\x58\x0d\xb9\xf3\
-\xb9\x8f\xb3\x94\x7f\x89\xa3\xc9\xe5\xcc\x6a\xcf\x54\x3b\x62\xfe\
-\x71\x1f\xe5\x72\x5b\xc9\x08\x81\x2f\x45\xbe\x0e\x52\x79\x93\xcc\
-\x9d\xde\xee\x1c\x0f\xa1\x5e\x55\x1d\xd9\x75\x90\xea\x7a\x38\x3d\
-\x1c\x66\x1e\x2b\xeb\xaf\xe9\xc0\x4e\xcb\x11\xd7\x99\x90\x09\x5b\
-\x6c\x36\x57\x79\x75\xbd\xa9\x74\xb0\x1e\x85\x3b\xeb\x65\x95\xc1\
-\x26\x81\xbb\xeb\x0f\xd4\xef\xfb\xce\x51\x04\xfd\x24\xc8\xe4\x40\
-\x46\x79\x05\xd1\xef\xcf\x2b\x8f\x9a\x07\xe8\x4e\x2d\x7c\x2e\xd8\
-\xaf\x03\xa2\xaa\x02\x8f\x8d\xd5\xef\x65\x41\xe8\x59\x83\x7a\x6e\
-\xf5\x71\x4b\xe4\xba\x48\x5d\x1c\x99\xd5\x19\xe3\x4e\x37\xf0\x2e\
-\x7b\x59\x65\xd8\x95\xad\x64\x7a\xa5\x04\xb4\xdc\x2a\xc3\x4e\xca\
-\x07\xc9\xc0\x0b\x86\x9d\xd0\xc4\x51\x77\x34\x95\x1a\xb9\x73\x05\
-\x60\xc9\xc6\xbb\xfb\x87\x7c\x67\x47\xf4\x98\xbd\x6d\x8f\x30\xed\
-\x25\xb2\xab\x05\xd6\xcb\x37\xb9\x73\xcb\xe2\xde\xc7\xee\xf3\x89\
-\x1f\xbd\x49\x79\xb1\xa9\x26\xd1\xab\xd0\x6e\xac\xc3\xe4\x20\x6f\
-\xc9\xc8\xd2\xf9\x2d\xd9\x19\xe0\x2c\x58\x54\xf7\xd3\x80\x9e\xf4\
-\x86\x1c\x1c\x7b\x9c\x9c\x3c\xc6\x08\x45\x86\x59\x7a\x98\x8b\xee\
-\x61\x90\x1e\x04\xbf\xe8\xcd\x14\x73\x4a\xd6\x95\xfb\xcb\x13\xa3\
-\xfb\x8d\xf5\xc7\x55\xdf\xa1\xb6\xd0\x48\x78\x22\x96\x0b\xcb\xf4\
-\x5b\x53\xe6\x35\x72\xcf\x70\x0e\x23\x1e\xfb\xcf\xd4\x6f\xf0\xb7\
-\x0b\x9c\x38\x11\xdf\x39\x6a\xd1\x0e\x3b\x4a\x03\x77\x8c\x68\x2e\
-\xe8\x74\x20\xab\x63\x28\x2f\xf7\xa9\xd7\x75\xf9\xa6\x6f\xbf\x57\
-\x30\xa7\xf3\x4e\xbe\x17\xb6\xd7\x17\x94\x7c\x6d\xe8\xbb\xec\x74\
-\x2b\x38\xa7\x11\x9d\xa1\x43\x68\xb6\x29\xd8\x49\xe3\x4e\xea\x61\
-\x3d\xc3\x4e\x1e\xa3\xab\x8e\x99\x00\xad\x69\x94\x09\x23\x47\xe5\
-\x52\xa8\xa4\x78\xf3\xea\x82\xa3\x30\xc7\xe8\x72\xac\xbc\x14\x57\
-\x91\xa7\x74\xb0\x64\x5c\xc9\xc6\x92\x99\x0b\x17\x35\xae\x22\x8f\
-\xa3\x67\x22\xa0\x51\x29\xdb\x64\x6b\x49\x7f\xd1\xde\x81\x4f\xe0\
-\x9e\xb0\xbe\x6e\x26\x58\x2d\x1d\x7c\xe8\x39\x45\xba\x9d\xee\x8c\
-\xb8\xd7\x81\x2a\x2d\x57\xf9\x03\x0f\x8e\x85\x51\x38\xe9\x0d\x69\
-\x85\x9e\xf8\xdf\x81\x4e\xa7\xab\x66\x64\x5c\xc7\xb4\x3d\xa7\x48\
-\xd5\x77\xc4\x90\x18\x6d\x30\xcc\xdc\xf0\x73\xaa\xbf\x84\xee\x72\
-\xab\x96\x07\x50\x37\x55\x7d\x5c\x22\x68\xb3\x28\x02\x30\x6f\x39\
-\x7b\x42\x2e\x38\x11\x85\x73\x41\xcf\x8f\xfd\x67\x6a\xd1\x02\x6a\
-\xf6\x47\x1a\xb0\x3a\x30\x5d\x67\xa2\x80\x22\xbf\xe3\x44\x1b\xa1\
-\x9b\xb8\x55\x93\x8f\xd3\x2c\x9e\xce\xed\xb8\x8e\x91\xd3\x36\x41\
-\x22\xd3\xac\x6a\x24\x5d\x79\x73\x3e\x6b\x99\x88\x56\xd7\x53\xc6\
-\x9d\xe9\x8c\xa8\xe4\x33\x34\xfd\x48\x19\x77\xa5\xb8\xff\xb4\x64\
-\xe2\x79\x9e\x0f\x09\x5a\x09\x60\x5d\x62\x98\x57\x91\xc7\x45\xb3\
-\xcc\xba\x29\xa6\x8a\x1e\x85\x39\xae\x22\x8f\x75\x73\xcc\x55\xe4\
-\xa9\x5c\x08\xdb\x17\x6c\xdc\x9e\xd8\xca\xb0\x1b\x2e\x75\xf1\x2f\
-\x2b\xec\x77\x9f\x72\x11\x78\x44\x0b\x65\xf2\x9b\x1b\x64\x57\x85\
-\xe5\x6a\x0c\x9e\xc1\xce\x09\x4f\xf6\xde\xe5\xe8\x28\xa4\x5e\xab\
-\xcd\xd5\x4f\x32\xdf\xb6\x15\x1a\x74\x3b\x5d\x76\x5b\xa7\x2a\xc3\
-\x49\x02\xba\x5f\x38\x56\xf7\xd3\xc0\xdd\xef\x45\xf4\x9d\x42\xa2\
-\xc9\x89\x1c\xee\x22\x07\x1e\x02\x34\x7b\x41\x82\x8d\x75\xf0\xce\
-\xd3\xc9\x7a\x7e\xc5\xf3\xea\xea\x36\x9b\xab\x33\xa9\x95\xe7\xc3\
-\x73\x31\xfc\x1c\x31\x10\xf2\xc4\x89\x38\xeb\xb4\x69\x85\x62\xe1\
-\x15\xce\x9b\x9c\x75\xda\xb4\x43\x23\x61\xc4\xe9\x40\xd5\xb7\x7a\
-\xf1\xaa\x7e\x5f\x26\xf5\x1b\x41\x3f\x31\x0b\x5a\xff\xde\xf2\x33\
-\x25\x6b\xcf\x63\x58\xd7\x99\x90\xa1\x9b\xcc\xc0\x0b\x73\x2a\x45\
-\x75\x1e\x80\x75\x03\x7d\x26\x33\xb0\x27\x00\x1e\xd4\x1b\xca\xb8\
-\xeb\x5f\x5e\xe0\x8f\xe3\x29\x5c\x0b\x9a\xe1\xd6\xea\x27\x24\x45\
-\xdf\x28\xa8\x73\xed\xc5\x73\xf5\xc2\xc8\x49\x00\x58\x07\xb2\x59\
-\x5a\x1e\xb3\x58\xaf\x2b\x1d\xbc\x6e\x8e\x59\x30\x6c\x8e\xc2\x9c\
-\x02\xf2\x82\x61\x73\xe8\x08\x66\x96\x3e\x62\x10\xb9\xc7\xd6\x62\
-\x1f\xc3\x78\x85\x7a\x64\x28\x1d\xac\xdc\x63\xa1\xd0\xa8\x3b\xaf\
-\xef\x32\xde\x13\xef\x93\x39\xbe\xe9\x03\x23\x67\xba\x49\x40\x77\
-\x3b\x7b\x89\x93\x2e\x26\x16\x4d\x99\xab\x15\x7a\xf1\x7e\x5d\x11\
-\x12\xed\xf4\x13\x4c\x20\x87\xbb\xe8\x33\x33\xa8\x9b\x33\x2e\xb3\
-\xe7\x69\x61\xfd\xf3\xf4\xf2\x24\x7d\x9f\x5a\xa6\xa6\x1a\x5d\x8b\
-\x61\xe7\xd3\xdb\xae\x3f\xc0\x39\x8c\xe8\x46\xef\x72\xd6\x69\xd3\
-\x34\x6d\xf5\xdd\xe5\x55\xc3\xec\x25\xdd\x10\x93\x8a\x95\x60\x5e\
-\x1d\x20\x69\x2d\xac\x57\x5e\xeb\xad\x04\xe6\x85\xd8\xd3\x9f\x21\
-\x35\xaf\x9e\x52\xaa\xe7\x89\x7c\x94\xa4\x88\x7a\x11\x8d\x8a\x99\
-\x04\x70\x2c\x61\x4a\x61\x4e\x15\xe7\x36\xe3\xd4\x99\x41\xa7\xca\
-\xe8\xa8\xc3\x38\x3f\xf5\xcc\x2c\xdc\x11\x57\x93\xec\xf2\x03\x42\
-\x27\x50\xff\x2b\x91\x20\xa8\xed\xe3\x5d\x6a\xb1\xc7\xc9\x34\xca\
-\x0c\x26\xb9\x19\x4d\x0c\x60\x95\x82\x4d\x42\x5c\x16\xeb\xf5\x38\
-\x42\xb2\x0c\xdd\x11\x8b\xf5\x3a\x5e\x77\xc4\x82\x21\x18\x37\xe3\
-\xde\xc6\xc8\x7a\xb8\xe7\x39\xec\x7a\x9e\xcb\x4e\x87\x05\xc3\x66\
-\xf7\xc8\x81\xcb\x37\x68\xd6\x1b\x64\x57\x0b\x6c\x98\x02\xbc\x93\
-\xd3\x21\xc7\x63\x0f\xe3\x2a\x76\x6a\x13\x40\xa7\x07\x18\xb1\x6b\
-\xca\x9e\xd1\xaa\x3d\x0b\xd5\xa3\xb7\xe6\xd4\x68\x11\x89\xd6\xfe\
-\x15\x0f\xfa\xd0\x8a\xfb\xf1\xb7\xf0\xe8\x06\x5d\x4c\x6b\x85\xe0\
-\x9a\xcb\x98\x35\xb0\xd5\x9c\x0c\xc5\xbc\xf1\x02\xb9\xee\xf2\x38\
-\x0f\xd4\x7a\xe7\x1e\x2b\x6e\x7c\x22\x07\x2a\x6e\xd4\xb2\x09\x19\
-\x71\x73\xf2\x03\x89\x80\xc5\xd2\x38\xe2\xe0\xd8\x63\x10\xda\x89\
-\x85\xd7\x77\xa6\x2e\x2a\x11\xf1\x43\xb1\xa8\x94\x06\x7a\xc7\xa2\
-\x49\xc5\x82\x48\xb8\xf7\x6a\xe5\xaa\x72\xf5\xa9\x2b\x45\x0c\x7c\
-\xc9\x9a\x92\x9d\xb3\xf1\xa2\x70\xfb\xc9\xb4\xd1\x7a\x39\x0b\x44\
-\x33\x75\x85\x35\x6a\x22\x73\x2f\xfe\x7d\x32\x37\xba\x6e\x56\x67\
-\x02\x1e\x13\x7f\x48\xbb\x1f\xb2\x64\xd9\x94\xca\x4c\x7b\x7c\xf4\
-\x72\x64\xc2\x16\x41\x3c\x6d\x55\x04\x3d\xda\x1c\xb7\xb6\x39\x76\
-\x1f\x70\xef\xc0\xa0\xb8\x71\x48\x73\xe1\x06\x1b\x85\x35\x2a\xeb\
-\x5b\xf4\x8f\x76\xa6\x0b\xc7\x5a\x07\x7f\x87\x70\x6f\x9a\xbe\x30\
-\x98\x8c\x80\x1c\xe5\x5c\x0e\x34\xbf\xb4\x33\x8e\x87\x31\xca\x22\
-\xd0\xc4\xa5\x22\x2e\xfb\x31\x6a\x79\x8c\x5a\x9e\x52\xb0\xa9\xa2\
-\x72\xeb\x8b\x05\xa2\x18\xe4\x99\xa6\xd0\x77\x6b\x6b\x4b\xdc\xda\
-\x7a\x85\xf5\xf2\x4d\x8e\x72\x2b\xd0\x15\xcf\x1b\x57\x0e\x2d\x02\
-\x5a\x9d\x36\x74\x7a\xaa\x79\xc9\x3c\x36\x94\x9e\x04\x31\x35\xc8\
-\x26\x13\xb6\xa0\x67\x08\x3f\x72\x47\x38\xfe\xf5\xff\x00\xe1\xe5\
-\xc9\xb5\x9a\x4e\x4a\x88\x19\x63\x44\xbb\x02\xa4\x59\xa6\x66\x56\
-\x67\xa2\x79\x7e\xd1\x13\xf9\x11\x5a\xe7\x9e\x9e\x55\xa6\xea\x3b\
-\x34\x6b\xb6\x2a\x31\x4a\xdf\x8e\x5b\x17\x1c\x1c\x7b\x0a\xb8\xf2\
-\xaa\xd1\xea\x24\x93\x69\xea\xf5\x4a\xe2\x72\x4f\xcf\x50\x60\xec\
-\xd4\x42\xda\xa3\x5e\x3c\x61\xa9\xa0\xd8\x56\xce\x7b\x56\xa0\xbc\
-\xc6\xf7\x7d\x9d\x9f\x3c\x1d\x95\xd4\x0d\x6d\xf9\xfb\x24\x53\xeb\
-\x5d\x8a\xd2\x40\x96\xb9\x14\xfa\x42\x70\xcd\x31\x41\xbd\x41\xa6\
-\xd3\xa6\xd9\x10\x41\x8f\x8b\x74\x2b\xbc\xe1\xec\x31\x53\x7a\xb8\
-\x70\x42\x25\x1a\x52\x5b\x68\x88\x1c\x99\x23\x71\xa5\x2a\x66\xc7\
-\x38\xe3\xb1\x60\xe0\xb8\x54\xa9\x98\x15\x6e\x40\xeb\xf4\xd1\x1e\
-\xd6\x5a\xfd\xda\x1f\xbd\x51\xb6\x19\x65\x4a\x1a\x38\x0a\x88\x41\
-\x19\x60\x37\x61\x73\xbd\x8c\x7f\xef\xae\x72\xa7\xdd\x3c\xb5\xd8\
-\xf5\xf6\x39\x39\xb9\x50\xec\xab\x0e\x76\xcc\x2c\xe9\xc1\xdd\x69\
-\xf0\x15\xac\x52\xac\x57\xc7\xe0\x14\x81\x79\x40\x2d\xe2\x57\x3d\
-\xfc\x9e\xcb\x72\xdd\xe0\xbc\x13\x25\xe6\x24\xa7\x3f\x4f\x2d\xd0\
-\xa0\x0f\xd8\x73\x0d\x11\x31\x89\x47\x78\x23\xdc\xfe\x34\x8b\xed\
-\xaa\x62\x91\xc5\x9f\xeb\x8d\x90\x3a\x58\x67\xe0\xe3\xd6\x85\xd2\
-\xec\xf4\xa7\x9e\x17\x7d\xe6\x5d\x5d\x16\x9c\xfa\x43\xc5\x92\xa3\
-\xb6\xc3\xc6\x9d\x06\x5f\x7a\xe5\x25\x8a\xdf\x27\xaa\x59\x8e\x8e\
-\x42\xf6\xb7\xf3\x1c\x7e\xe7\x37\xa7\xa9\x9d\x65\x31\x2a\xb7\x16\
-\x7f\xcf\x6e\xd1\x83\x38\x47\xba\x1b\xf4\x00\x9b\x7a\xd7\xc4\x35\
-\xe7\x87\xd3\x67\xec\x92\x8a\x35\x3b\x82\xa1\x1a\x7d\xcf\x5e\x09\
-\xd7\x99\x88\x6c\x39\xf9\x19\x3d\x43\x68\xe1\xa0\x4b\x00\x2c\x55\
-\x60\xa7\x5b\xe1\x4b\xf2\x9c\x30\x20\xdb\xee\xb2\xba\xb8\xc0\xad\
-\xaa\xc3\x43\x92\xdd\x88\xfa\x86\xc8\xe5\x70\xcf\x8e\x38\x76\xd7\
-\x69\x70\x87\xc1\x24\x37\x35\xf0\x6a\x3e\x61\xe4\x30\x98\xe4\xc4\
-\x1c\x3b\x00\xff\xa4\x43\xef\x9c\xb9\xcd\x2c\x76\xe9\x70\x18\x5c\
-\xb0\x21\x9b\x6e\x67\x37\xb0\x16\x3d\xe8\x78\x5c\x76\x3a\xec\x1e\
-\x39\x18\xab\x21\xcd\xee\x6d\x5a\xec\xab\x6c\xa4\x76\x0c\x60\x79\
-\x59\xcb\xf6\x7d\xa8\x66\xc1\x99\x3f\x81\x3e\x7d\x19\x97\xc3\x0a\
-\xa5\x81\xa6\xef\x2b\x81\xe9\xf7\x42\xac\xaa\xc9\x79\x27\x54\xc3\
-\x0c\xf5\xf7\xa5\x01\x3c\x2f\x99\x67\x9e\x7c\x90\xd3\xea\x6b\x66\
-\x95\x6e\xb1\x47\xb6\x9f\x7c\x4f\x6d\xa1\x41\xf1\xbe\x37\x53\x62\
-\x24\x3c\x10\x17\x42\xb7\xc7\xe0\xad\xc5\x6d\x4c\x45\xc6\x5b\x72\
-\x68\xa3\x94\x00\x2a\x21\x7c\x73\x8d\x4f\xbd\x7c\x8b\xaf\xfc\xa3\
-\xaf\x50\xfa\xc4\x0b\x5c\x99\xd0\xde\x1e\xf1\x27\xfc\x1e\x3b\x4f\
-\x2d\xba\x81\x90\x13\xad\xd0\x88\x67\x47\xcb\xdc\x0d\x21\x21\xba\
-\x7a\xc6\x5e\x0c\x28\x29\x2f\x66\x7e\x73\xdc\xc2\xb6\x1b\x4e\x7f\
-\x9f\x3c\x76\x69\x43\x4d\x77\x9d\x49\x29\xa1\x8c\xc8\x9e\x41\xb5\
-\x3a\xa0\xe7\xa4\xdc\x73\x64\x45\x20\x4b\xef\x6d\x17\x8f\xb9\x5d\
-\x2a\x14\xe8\x67\x8d\x19\x26\x56\xa5\x6b\xe5\x21\xdd\x8e\xf0\x42\
-\x1d\x0f\x2d\x36\x8d\x0e\x9d\x48\xe4\x87\x86\x91\x83\xd9\xab\x63\
-\xd6\x62\x92\xab\x46\x58\x7f\xfe\xf0\x4d\x8c\xc2\x0a\x37\x2d\x8b\
-\xab\x7d\xc1\xa6\xd1\xa9\x89\xb5\xbe\x49\xe0\x3f\xa5\xd9\xbd\xcd\
-\xed\xca\x11\xa1\x1d\xb7\x0d\x9d\x1c\xb2\x7b\x64\xb1\x91\xf1\x39\
-\x0c\x2c\x02\x5f\x18\x33\xad\xda\x3e\xd1\xa9\xc9\x33\x3f\x3e\x29\
-\x12\xc0\x9a\x2b\xa8\x1b\xf4\xa0\x48\xa2\xc0\x52\x19\x53\xd2\x10\
-\xd3\xb6\x0c\x50\xc3\x0b\x67\x46\xca\x0e\x52\xef\x21\xf6\xe1\x22\
-\x64\x49\x61\x30\x7f\xe0\xb7\xc8\x62\x9b\x0f\xe0\x9a\x53\x4b\x9c\
-\x7c\xb7\x2f\x98\x59\xf7\x0f\x37\x7b\x01\xcd\xda\x0d\x3e\xbe\xb9\
-\x30\x13\x42\x96\xfe\x6a\x9d\x7d\xbb\x41\x37\x1e\x30\x8e\xda\xaa\
-\x4b\x7b\xd7\x84\x6a\x96\x97\x1e\xbc\xc0\xe6\xbd\xbb\xdc\x5d\xce\
-\x72\xeb\xde\x16\xc5\x9b\x2b\x74\xdb\x01\xa7\xef\x74\x78\xfd\x83\
-\x3f\x63\xef\xf1\x07\x64\xfb\x3e\xf5\xfa\x72\x9c\xd2\x6a\x43\x6c\
-\x68\x4a\x26\x15\xfa\xf5\xfa\xe8\xa3\xf4\x77\x2b\xad\x1d\x77\xfb\
-\x94\xbf\x6f\x26\x27\x79\x4e\xee\x35\xc0\x45\xe0\xb1\x64\xd9\xd4\
-\x25\x1b\x57\xa3\x69\x3b\x83\xf8\x73\xab\xe5\x81\xf0\xff\xc7\x00\
-\x0e\xea\x0d\x76\x5b\xa7\x1c\x07\x07\x94\xdb\xfb\x30\xfc\x24\x64\
-\xcb\x2c\xad\x5b\xc2\xcd\xf6\xfe\x1f\xd3\x1f\xae\x51\xe2\x48\x54\
-\x89\x94\x1b\x10\xe7\x9b\xd7\x52\xc9\x67\x83\x49\x8e\x62\xb5\xc3\
-\x60\x3c\x6d\x0c\x69\xad\x97\x6f\x2a\xe0\x3d\xf3\x7d\x38\x82\x68\
-\x78\x02\x1f\x3c\x8b\x13\x70\x4e\xe0\x02\x8c\x82\xf8\xa1\x37\x63\
-\x6b\x69\x37\x96\x0f\x00\xd1\xa9\xd0\x38\x47\xcf\x3c\x26\xde\x31\
-\xce\xb3\x8a\xd0\x4c\xfe\x90\x4e\xcc\x04\xf5\xc8\x48\x8c\xbc\xd5\
-\xe7\xb4\xc9\xc7\x12\xb0\x0a\x9c\x96\x60\xdd\x4c\xa6\x06\x74\xa7\
-\xcc\x1a\x3b\x0a\x74\xd0\x4b\x26\x2e\x0c\x4a\x0c\x7b\x2e\x3e\x42\
-\x52\xe8\x4c\x2c\x80\xd8\x67\xe8\x4f\xf7\x6f\xf6\x02\xa5\xc3\x25\
-\x80\xf5\x74\x4d\x6b\x20\x18\xd9\x65\x42\xd3\x8c\xa8\xdd\x91\x79\
-\x11\x57\x8a\x85\xa5\x0f\x58\x67\xe0\x80\x9a\xca\xb3\xf0\x7d\xf1\
-\x7d\xe4\x1c\x3b\xc8\xaa\xb6\xb2\x9f\xb9\xb3\xcc\xdf\xfc\xa7\xf7\
-\xb9\x63\xdd\xc7\x66\x81\xca\x4d\x8b\x63\xe0\xe8\x9b\xdf\xe5\xe7\
-\xff\xb7\xd7\x79\xba\x2d\x86\xf3\x98\xc5\x08\x3a\x02\x28\xa5\x6a\
-\x36\x31\x9c\xd1\xed\x4f\x70\x99\x02\x52\x1a\x7c\x89\x81\x90\x45\
-\x0f\xd7\x91\xe0\x1c\xcf\x18\xae\x3a\x0b\xeb\x4c\x3d\x4f\x53\x5f\
-\x04\x1e\x75\x8c\x44\x74\xcf\x35\xc7\x6a\xa8\x8e\x34\x56\xe9\x19\
-\x64\x9b\x79\x2a\xd1\x90\xee\x55\x88\x7f\x30\xe4\x24\x28\xb2\x64\
-\x3a\xc0\x22\x8d\xc1\xd4\xc5\x39\x29\x1c\x81\x13\xbb\xd8\x1c\x8f\
-\x5a\xa6\x46\xb7\xd3\xe5\x38\x38\xe0\x13\xbc\x48\x31\x9b\x67\x30\
-\x11\x3a\x58\x4a\x0b\x95\x9d\xa8\x03\x53\x6e\x29\xdf\x9c\x7b\x99\
-\x7f\xe6\xfb\x18\x83\x67\xc2\x78\x03\x38\x12\xef\x79\xe6\xfb\xd4\
-\x3b\x1e\xfb\xdd\xfd\xb8\x55\xeb\x98\x8b\xc0\x03\x63\x3a\x87\x58\
-\x9d\xd0\x39\xab\x3e\x5d\x41\xa1\xef\x53\xb0\x4a\xd0\xf7\x09\xe2\
-\xfb\xf3\xe4\x85\x3c\xf8\xe9\xc9\x9d\x72\x7f\xc9\xf4\x69\x5f\xb0\
-\xf4\x88\xe8\x60\x96\xba\xd9\x2f\x6a\x03\x15\x7b\x39\xaa\xa1\x43\
-\x2d\xd3\x88\x27\x77\x4e\x01\x7c\x30\xbc\xc9\xc8\x39\x54\x00\x6e\
-\xb5\x0d\x5c\x53\xe8\x78\x0b\x9b\xf1\xf8\x04\x62\x83\x4c\xaf\xd3\
-\x93\x03\xcc\xd7\xca\x06\x7b\x07\x3e\x66\xb8\xc3\xa0\xb3\xcd\xe9\
-\x1f\x1f\xf2\x03\xaf\xfe\x10\x00\x9f\xf8\xd1\x9b\xdc\xb6\x3f\x4b\
-\x6b\xe1\x81\xb2\xe0\xcf\xb6\xdf\xa0\x49\x53\x63\xc0\x89\x02\xae\
-\x3c\xc6\x6e\x6c\x43\xc8\xb6\x5c\xfa\xa0\x48\x1d\x74\x7a\xf0\x46\
-\x12\x86\x3c\x4e\x99\xb8\x87\xf2\xdc\x4e\x9e\xb1\x8c\x90\x19\xe9\
-\x72\xf1\xcf\xb8\xf4\xaa\x59\x91\x9f\x1c\x67\xca\x1d\x8c\xba\x30\
-\xfe\x10\xf8\x7e\x16\x32\x11\x7b\x95\x12\x5b\x95\x21\x0f\xd7\xb7\
-\xe8\xef\xed\x28\xcf\x83\xe8\xfb\x86\x60\xe3\x5e\x96\x43\xd7\xa0\
-\x52\x14\x03\x0b\x07\x13\x7d\x5e\x74\x9c\x69\x28\xe5\x43\x7a\x9b\
-\x06\xef\x4d\xcb\xe2\xa6\x65\x11\x59\x37\xb9\xa9\x3d\x0f\x10\x9d\
-\x4d\x78\x77\xe7\x21\x51\xdc\x0e\xe9\x22\xf0\x94\x1f\xd3\x2f\x82\
-\x3b\xe7\xb2\x95\x98\x7d\x9c\x9a\x44\x6f\x61\xce\x68\x59\x09\xc8\
-\xb4\xbc\x60\x30\xdf\xf8\x48\x03\x7e\xd8\x73\xa7\x2e\x37\x8d\xe9\
-\xe5\xdf\xed\x59\x82\xe5\xba\xe5\x6e\xa2\xb3\x8f\x72\xb1\x99\x4d\
-\x56\x36\xea\xca\x9d\x26\x2b\x2f\x46\xad\x29\x80\x0f\xbb\x13\x86\
-\xa1\x0b\xa1\xb6\x80\x62\x00\xcb\xef\x2a\xbd\x1d\x3d\x47\x8c\x0d\
-\x33\x72\x8b\xac\x5c\x1e\xf0\xd4\xbf\xc3\x07\xaf\x3f\x06\xe3\x98\
-\xa8\x78\x93\xfb\x9f\xff\x24\x3f\x76\xe3\x0b\x14\xbf\xfc\x05\x26\
-\x8d\x02\x17\xad\x2f\xf1\xd6\x1f\xee\xf2\x26\x30\x39\x7f\x04\x3d\
-\x03\xbf\xec\xc5\xda\xb8\x88\xcb\xac\xf4\x91\x25\x55\x69\x3b\x20\
-\x13\xb6\xf0\xcb\x99\xc4\x00\xf5\x82\x55\x12\x83\xd1\x7b\x0e\xe7\
-\xb8\xe0\x94\x66\xd2\x2b\xf5\xec\x36\xf5\x58\x6b\x40\x9e\x96\x23\
-\xea\xbd\x71\x0e\x89\xe5\x9e\xb3\xbb\x6b\xb2\xb1\x75\xc1\xc2\xc6\
-\x6d\x2a\x0b\x8b\x74\x17\xe4\x49\xd8\xc2\x2c\x9c\x28\x03\xaf\x44\
-\x8e\x7e\x27\x6e\xec\xee\x6f\x03\x9f\xc1\x1f\x58\x58\xc5\x3e\x50\
-\x49\x78\x44\x4c\x80\xae\x7f\x7f\xea\xc4\x8e\x01\x6c\xac\x86\x82\
-\x79\x57\x43\x6e\x5a\x96\x92\x0e\xfa\x56\x32\xf7\x7e\xf7\x29\xad\
-\x83\x4e\x02\xc0\x1d\x23\xa2\x66\x56\xe7\xb2\xaf\x1e\x54\x48\xaf\
-\x74\x69\xb0\xe9\x46\x9c\x6e\xa4\xe9\xa1\x64\xfd\x73\xd3\x9a\x59\
-\x37\xfe\x74\x50\xfb\xbd\x90\x28\x53\x51\x72\x42\x06\x32\xfc\xa2\
-\x97\x00\x70\xa2\x8a\x23\x14\x5d\xd1\xd7\xca\xd3\x0a\x8d\x83\xe1\
-\x4d\x8e\x5b\xc2\x88\x6b\x75\x62\x00\xfb\xee\xdc\x2b\x80\xba\x52\
-\xc4\x7f\xaf\x15\x0a\x5f\x79\xd0\xab\x73\xdc\xba\xc0\xfe\xf4\x16\
-\x3f\x7c\xcb\xe0\xc1\x8f\xdf\xe3\xc5\x1f\xfc\x22\x9b\xb7\x37\xf0\
-\x4f\x3a\x7c\xeb\xf0\x82\x77\xdf\x38\xe1\xfd\xdf\xd9\x65\xcd\xdb\
-\xe7\x1f\xfc\x0d\x93\x2f\xff\xc4\x06\xd9\xe5\x07\x1c\x4d\x2e\x89\
-\x32\x95\x44\xcf\x37\xfd\x7b\xcf\xdb\xca\xbf\x9f\x0e\xb3\xeb\x84\
-\x71\x8e\x91\x78\xec\x9a\x63\x5c\x73\x3c\x75\xb3\x69\x1d\x46\x13\
-\xb3\x4f\xb4\x9b\x1e\xf5\xd3\x0d\xbb\x9d\xae\x00\xdf\xd9\xf0\x29\
-\xe3\xe1\x15\x99\x6e\x9b\x8d\xc2\x9a\xc8\xa1\xf0\x77\x66\xab\x45\
-\xea\x26\x83\xf6\x90\x6a\x7f\x91\xfe\xa0\x8b\x55\xf4\xf1\x07\x96\
-\x62\x61\x95\x3b\x11\x9d\x9a\xd4\xd7\x3f\x4c\x80\x57\x82\xba\xcc\
-\x83\x19\x46\x4e\x3f\xb6\xd6\x37\xb9\x5d\xbb\x4b\xb6\x99\xe7\x22\
-\xf0\x44\xda\x5e\x2a\x14\x19\x65\x2a\x89\x18\xbc\x7e\x40\xf5\x01\
-\x31\xd7\x01\x53\x02\x21\x0d\x50\xc9\xdc\x12\x2c\x2a\xd4\xdc\x0b\
-\x67\x16\x8d\xee\xa9\xd0\xf5\xae\xcc\xa3\xb8\xce\x53\xe2\x3a\x13\
-\x6a\x77\xa6\xc9\x3d\x52\x03\x37\x2f\x8e\x14\x80\xaf\x3a\x9d\x04\
-\x9b\xe9\xdf\x5b\x7e\x17\x1d\x60\x7a\x7f\x8b\xb3\xc3\x36\x7b\xaf\
-\x1d\x52\x5e\x35\xf8\xe2\x67\x3e\xc7\x8f\xfe\xbd\xcf\xf2\xf2\x27\
-\x57\xb9\x73\xb3\xc8\x46\xc6\xe7\x5b\xdf\x7d\x8d\xdf\xfa\x8d\x5f\
-\xe1\xf7\x7e\xf5\xf7\x38\x0a\x73\xdc\xbb\xf3\x0a\xad\x07\x1b\x34\
-\xf2\xd5\x99\x06\xdf\xd7\x79\x5c\x12\x55\xdf\x73\x8e\xb1\x7e\x7f\
-\x99\x48\x91\x46\x22\x76\x10\xf4\xe7\xba\xe9\xd2\xcf\xa5\xcf\xab\
-\xee\x92\x6b\x75\x3d\xa2\xec\x19\x79\x56\x70\x49\x85\xb2\xad\x64\
-\xb9\x52\x89\x1c\x01\x35\xd1\xe2\xd5\xbd\x60\xa3\x34\xdf\xe5\x57\
-\x2a\x67\xb1\xee\x7f\xfe\x93\xf8\x97\x15\xac\xcf\xf7\x45\xf4\x0d\
-\x78\xf5\xee\x90\xc3\xe0\x2e\x0b\x77\x7c\x02\x1f\x16\xec\x0d\x5a\
-\xec\xc7\xa0\xfe\x50\x31\xf6\xfa\xba\xa8\xe6\x30\x56\xb2\xe2\x4b\
-\x04\x0f\x55\x56\x5a\x3d\x32\xe8\xc4\x91\x26\x79\x49\x13\xee\x9e\
-\xf9\x2e\xae\xb4\x3e\x53\x46\x9a\xef\x42\x0f\x7c\xdc\x84\x11\x37\
-\x57\x0f\xc7\xd2\x41\xee\x3b\xec\xb9\x09\xa3\x45\x07\xb2\x6e\xd0\
-\x28\x3d\x88\xa9\x5c\x4d\xcd\xfa\x40\x15\x82\x16\x57\x93\x25\x56\
-\x8f\xfd\x67\x14\xce\x9b\x74\x3b\x5d\xdc\x98\x09\x75\xf6\x95\x2c\
-\xaf\xff\x16\x7d\xe1\xd6\x23\x43\xc8\x8c\x6a\xc4\xf6\x55\x87\xee\
-\xaf\x7f\x9d\x47\xef\xdc\xa0\xfc\xca\x21\x0b\x5d\xd1\x19\xe9\x0b\
-\x1f\xbf\x4f\xb1\x9e\x61\xf3\xde\x5d\x8e\xc7\x1e\x61\x7e\x19\x3f\
-\x7c\x88\x65\xbe\xc4\x0f\x1b\x23\xde\x90\x2e\xba\x39\x2c\x7c\x5d\
-\xe4\x32\x7d\xac\xf5\xab\x97\xce\xc4\x46\x3f\x22\xdf\x28\xcf\x1c\
-\x2f\x5d\xeb\xea\xe4\x23\xc9\x44\x12\x4b\xda\xd5\x26\xd9\xbf\x06\
-\x8c\x0f\x26\xf0\xfd\x10\x19\x5d\x20\x98\x1b\xf4\x90\x92\xa2\xa9\
-\x35\x79\xba\x74\x45\xae\x85\x55\xf4\x29\x7a\x2e\x7d\x16\x89\x68\
-\x09\x4d\xbc\xba\xb1\x81\xb3\x50\xa6\x5c\x74\x58\xdd\x00\xbf\x2f\
-\xc2\x2b\x2b\xdd\x51\x9c\x00\xf4\x4a\x2c\x6b\xea\xf8\xf9\x0e\xd6\
-\xda\x2b\xec\x5a\x9a\x53\x70\x1d\xd6\xfd\xa7\xec\xaf\x6f\xb1\xfb\
-\xd6\x9f\x53\xcf\x2e\xaa\x4b\x88\x8c\x0e\xd5\xca\xc2\xdf\x0a\x95\
-\x19\x8b\x39\x7d\x5f\xd7\xc9\xc2\xa8\x22\x21\x23\xa4\x0b\x2d\xed\
-\x47\x96\x5e\x09\xaa\xe2\x3d\xfa\xeb\xe9\x13\xb6\x4c\xa4\x2e\x9b\
-\xcb\x44\xf4\x00\x33\xec\x01\x75\xc2\x4e\x87\xe5\x66\x4d\x65\xb9\
-\xd5\xea\x0d\x5e\xb0\xa6\x39\xc2\xdb\x8f\x42\x0a\xbd\x26\xbb\xad\
-\x53\x7a\x4e\x51\x7d\xae\x6e\xc0\x0d\xfd\xa9\x27\xc2\x1a\xd8\x6a\
-\xa1\xc8\xdf\xa4\x8f\xba\x2d\x58\x25\x7a\xc0\x5b\x3b\x27\x98\x4f\
-\x3e\x24\x72\x2b\x2c\x55\x44\x7f\xb2\xf5\x7b\x5f\x64\xf3\xde\x06\
-\x5f\x78\x61\x93\x93\x70\x0d\xcb\x14\x44\xf3\xf0\xfd\xf3\x99\x2b\
-\xca\x75\x41\xa3\x79\x72\x4b\x5e\xb9\xe8\xcd\x46\x36\x0b\x56\x89\
-\x11\xce\xcc\xfe\x05\xab\x94\x18\xb2\xa3\x37\x57\xd4\xf7\xd5\xff\
-\xa6\x0c\x9b\x97\xca\x62\xd0\x7a\x37\x80\x9d\xfd\x3e\x2f\x5e\x5e\
-\xd0\xb8\xb5\xc5\x62\x63\x13\xd8\x4b\xba\xd9\xfc\x23\x05\xe4\xbe\
-\x51\x50\x19\x8b\x1e\x57\x71\xe3\xca\x0a\xbd\xc8\xc3\x2a\x7a\xf8\
-\x72\x1c\xb2\x4d\x0e\x8a\x5a\x32\x45\x25\xbe\xd4\x55\x2a\xac\x02\
-\x36\x01\x1e\x19\xc2\x41\x48\x18\xe7\x57\xc8\x3c\x8b\x28\x06\xfa\
-\xf2\xc2\x57\xc8\x58\x1f\xb2\xf3\xb4\x09\x5d\xe1\x10\x97\xda\x78\
-\x52\xb1\xe8\x10\x51\x37\xab\x74\x88\x34\x46\xf6\x67\xee\xa7\xa5\
-\x86\xce\x64\xf2\x80\x4b\xb6\x4d\xb0\xb5\xe6\x52\x4b\xeb\x69\xdd\
-\x90\x93\x8f\x7b\x56\x19\x7c\x97\xaa\xef\x08\x30\x03\x8b\x66\x85\
-\x16\x90\xcb\xad\xd1\x73\x44\x7e\x44\xed\x4e\x43\x25\xb9\xef\xfa\
-\x03\xc2\xa3\x0d\xfa\x85\x77\x39\xd9\x1b\x27\xb4\xa8\x34\xe0\x74\
-\x06\x4e\xe8\xd3\xd8\xaf\x9d\xce\x8e\x2b\x55\xb3\x4c\x0c\x8b\x7a\
-\xd7\xa4\x64\xe6\xa0\x5e\xa7\xb9\x04\x9f\x7a\xe5\x05\x3e\xf1\xa9\
-\x17\x09\xef\x3c\xc3\xdc\x3b\xe5\x1b\xe7\x13\x16\x6c\x9f\xab\x27\
-\x87\xbc\xf1\xfe\x5f\x31\x39\x3f\x52\x75\xea\xfa\x15\x4e\xff\x3e\
-\xf2\x6f\xa6\x01\xac\xa2\x9a\xbd\x59\x90\x0e\x7d\x97\x51\xdb\x21\
-\xaa\x18\x62\xa1\xa7\x5e\x5b\x26\xa2\xe7\x94\x67\xe4\x42\x9a\xcd\
-\xe5\xdf\xc9\x84\x2d\x4a\xd5\xc6\x34\x5a\xd9\x11\x39\x14\xa3\xa3\
-\x0e\xd1\xfa\x39\xb9\x8d\x06\x37\x3e\x56\xe5\x3b\x1f\xc4\x55\x1c\
-\xbe\xf0\x50\xa8\x4e\x9b\x8e\xc8\x58\x3c\x1e\x5a\xdc\x02\xaa\x46\
-\xc8\x80\x3e\x90\x4c\x1d\xb0\x3c\xc6\xe4\x0b\x21\xa3\xa1\x39\xb3\
-\x55\x65\x4b\xe4\xe2\x39\x83\x7a\xf5\xab\x07\x95\x05\xb2\xb4\xa8\
-\x34\x96\xf9\xdb\x1b\x77\xf9\xb3\x3f\x3a\x10\xe1\x51\x3f\x62\xc9\
-\xb2\x55\x75\x82\x14\xfb\x75\xb3\x4a\x27\x8e\xf5\xcb\xe8\x92\x9e\
-\xb4\xa2\x07\x23\x54\x07\xf6\x5e\x88\x15\x9f\xb1\x82\x55\x52\x5e\
-\x06\xc9\x76\x09\x66\xd1\xa4\x83\x7c\x6f\xda\x9f\x2c\x13\x78\x86\
-\x18\x0a\xcc\xca\xa0\x89\x43\xca\x3d\xab\x4c\x50\x6f\xb0\x12\x37\
-\xaa\xde\xf5\x07\x2c\x9d\xd8\x7c\xe7\xe4\x31\x7d\xa7\x41\xcf\xe9\
-\xcf\x8d\x06\x8e\xc7\x27\xe4\x58\x9b\x0b\x64\xfd\x52\xde\x2d\x8a\
-\xc8\x9b\xeb\x4c\xc8\x02\xae\x29\x82\x2b\x5b\xa6\x41\xf1\xbe\x17\
-\x03\x58\x5c\x52\x9f\x9e\x4f\x78\xfd\xf7\xdf\x10\x9d\x7f\x34\xf7\
-\x98\xee\x49\xd1\x43\xe9\xba\x27\x64\x9e\x4e\x4f\x3f\x97\x5e\xf0\
-\x51\x3c\xd4\xe5\x42\x73\x02\x0c\xf5\x63\x74\x8d\x7c\x49\x2f\x08\
-\x19\xe4\xd0\x23\x7f\xd4\xc5\x39\xea\x55\x2e\x31\x96\x97\xb1\xa9\
-\xf0\xc9\xdb\x9f\xe1\x83\xca\x43\xe1\x75\xf1\x87\x98\x75\x5b\x25\
-\xc8\xcb\x71\x63\x2a\xd0\x61\x87\xf8\x03\x8b\xaa\x11\xd2\x1b\x78\
-\x58\x45\x5b\x34\x14\xb4\xc9\x61\x0e\x23\x6c\x02\xcc\x61\x3c\x93\
-\x21\xde\xe6\x0b\x61\xfc\x21\xde\x14\xb8\x6a\x2b\x9e\xb7\xb1\xf1\
-\xdb\x67\xd8\x35\x9f\x9f\xfa\x99\x2f\x51\x5f\x7c\x85\xa3\xab\x2b\
-\x2e\x02\x4f\x95\x85\x4b\x4f\x85\x9e\xef\x2a\x19\x44\x4f\xc8\x49\
-\x07\x19\x74\x9d\xab\x07\x44\xae\xab\x8f\xd3\x25\x84\xae\x9d\x75\
-\x00\x5b\x55\x53\x49\x89\x79\x9a\xb0\x67\x95\xa9\x96\x07\xdc\x6b\
-\x8a\xa6\x27\x17\x6b\x1e\x4b\x27\x36\x8f\xfd\x67\xa2\x61\x75\x47\
-\x00\xd8\x0c\x7b\x33\x97\xe1\x5c\x6e\x6d\xae\xaf\x3b\xed\x03\xd7\
-\x7f\x8f\xdc\x2f\xdb\xf7\x69\x05\x70\xf6\xa4\xc1\xd7\x77\xf6\xf8\
-\xf3\x3f\x3d\xe4\x4f\x7f\x79\x9b\x3f\xfc\xfd\xaf\xb1\xb3\xbb\xaf\
-\x0a\x5f\xe7\x75\x2c\x92\xbf\x4d\x97\x4e\xba\x36\x9f\xe7\xb9\x19\
-\xfa\xae\xea\xe1\x5c\xb0\x4a\x18\xfd\x88\x65\xa6\xc6\x53\x54\x31\
-\xbe\xa7\xec\x3e\xdd\x08\xd4\x8f\xa5\xde\x6d\xbf\x63\x88\x3e\x75\
-\x74\x42\x0e\x23\x31\xfd\xaa\x7d\xb0\xc3\x78\x78\x45\x34\x39\xa6\
-\x7a\x73\x43\x94\x2a\xf5\x0c\xfa\xc3\x35\xd5\xa4\xb0\xef\x14\x68\
-\x85\x1e\x6e\x5c\xde\x24\x3d\x13\x03\x3b\xc4\x88\xfd\x76\x71\x65\
-\x87\x97\x64\x57\x5d\x64\x0f\x0b\x78\xaa\xf1\xc6\x75\x40\x06\x8f\
-\x0c\xfe\xf1\x29\x9b\xf7\xef\xf3\x77\xff\xa3\x2f\xb2\x79\xf3\x87\
-\x45\x3a\x60\xa7\x4f\xa7\xd3\xa7\x51\x31\x67\xaa\x14\xd2\xae\x35\
-\xc9\xc6\x3a\xa8\x25\xf8\xfc\xa2\x37\xd7\xeb\x20\x73\x85\x75\xb6\
-\x9d\x77\x40\x75\x40\xeb\xde\x82\x74\xd8\xbb\xea\x3b\x54\xcb\x03\
-\x6a\xf5\x1a\xc3\xe5\x16\x17\x6b\x9e\x0a\x27\x9f\x3d\x69\x24\x72\
-\x7f\x43\xb3\x3a\xa3\x27\xa5\x6e\xd7\x7f\x83\xee\x19\xf0\x8b\xc2\
-\xaf\x2b\xaf\x4c\x52\xfb\x27\x4a\x8d\x3a\x7d\xfe\xe4\x37\xff\x8c\
-\xd7\x5e\x7b\x97\x6f\xfe\xe5\x43\x26\xad\x11\xcd\x5a\x93\x4c\xa3\
-\x96\x30\x98\x66\x02\x42\x73\xb4\x70\x9a\x69\xd3\xc7\xd0\xce\x64\
-\xd4\x6b\x51\xc5\x48\x64\x9b\x49\x80\x7b\x41\xa0\xfe\xeb\xbf\x51\
-\xff\xdb\xf3\x58\x58\x5d\x2d\xc2\x1e\xf5\xc8\x20\xca\x54\xb8\x0c\
-\xfb\x42\x1e\xc4\x6d\x78\x33\x83\x0c\x4e\x2f\x69\x34\xcb\x86\x3b\
-\x6a\x94\xc2\x9c\x61\xb0\xfe\xc0\x22\xa2\x05\xf4\xa7\x7e\x62\xfd\
-\x66\x93\xc3\x63\xac\x6d\x03\xf5\x8a\xbe\xd7\x8c\x21\xd1\xee\xe0\
-\x84\x7d\x7e\xe0\x2b\x3f\xcc\x7f\xf6\xdf\xff\x34\x5f\xfe\x47\xff\
-\x82\x8d\x57\xff\x21\xed\x51\x0f\x6b\x90\x57\x6d\xa5\x9e\x5b\xb3\
-\x15\x03\x59\x4f\x85\xd4\x99\x38\x11\x42\xd6\xc0\x9b\x8e\xc8\xa5\
-\xc1\xec\x05\xc1\x5c\xd9\x31\xb3\x30\xea\x26\xb5\x7a\x8d\xe2\xaa\
-\xc7\x0b\xd6\x4d\xda\x87\x2d\xfc\xed\x02\x1f\xb4\x3a\x84\xfe\x19\
-\xe7\x9d\x48\x81\xc4\x0c\x7b\xea\x04\xea\x27\x54\x46\xc8\xa2\x4c\
-\x25\xb9\xc8\xa4\x8f\x36\x9e\x24\xaa\x03\x41\x56\x54\xeb\x9f\xa3\
-\xb2\xcf\xcc\x31\x9d\x5a\x98\x58\xe0\xba\x54\x4a\xbf\x4f\x6f\x18\
-\x93\xf0\xfa\xa4\xae\x46\x33\xe9\xb7\xfd\x28\xc1\xbe\x12\xe0\xe9\
-\xed\xf3\x5c\x74\xf2\xb1\x5e\x64\xaa\x8f\x06\xce\xe5\xd6\xa6\x87\
-\xba\x50\x26\x73\xcb\xa4\xb1\x24\xbe\xcb\xad\xaa\x43\x76\xf9\x81\
-\xea\xdb\xa7\x7c\xce\x41\x57\xb5\x6a\x98\xbd\x55\x24\x13\xdb\x0a\
-\x98\x1e\x19\x60\xda\x0d\x5e\x00\xd8\x4e\x30\xee\x3c\x36\xb6\xc9\
-\xe1\xd9\x25\xec\xf6\x19\xe5\x41\xc8\xe6\xfd\xfb\x7c\xf9\x67\x5e\
-\xe4\x9f\xff\xcb\x1f\xe3\xe5\xcf\xfd\x24\x9d\x4e\x5f\xc9\x0b\x29\
-\x27\xae\x3a\x1d\xd5\xb3\x21\x68\x77\x71\x2e\x5b\x04\xed\x6e\xe2\
-\xc4\xea\x27\xbb\x69\x46\x89\xcb\xa5\x7e\x72\xd2\x60\xd4\x41\xdf\
-\x1e\xf5\x68\x68\x03\xaf\xf5\x13\x19\x76\x3a\x0a\x84\x4d\x33\x4a\
-\x00\xf8\xb1\xff\x8c\xca\xf0\x06\x67\x9d\x36\x51\x6f\x9a\xe4\x22\
-\x59\x47\x67\x62\x9d\x89\xa4\x91\xaa\x03\x53\xff\xbe\xf3\x6a\xd6\
-\x9e\x97\xa4\xaf\x2f\x6c\x3d\x99\x67\x1e\xdb\xa6\x0d\xdb\xb4\x4f\
-\x5d\x2e\x3a\xf9\xf7\x24\xbb\xea\xf2\xc1\x48\xcd\xe7\xf6\x82\x20\
-\x01\x60\x3d\xb2\x9a\x06\xb2\xdc\x66\xc2\x56\x02\xc8\xba\xcd\xd0\
-\x0a\x45\xbd\x5d\x67\xe8\x60\x3a\x19\x36\x1b\x9b\xd4\x3f\xb6\x7e\
-\xed\xef\xaf\x65\x6a\x2c\x74\xfa\x8c\x2e\xc7\xca\xc5\x66\x15\x7d\
-\x15\xf0\x50\x33\x3b\x04\x1c\x05\xeb\xba\x03\x83\x52\x31\x96\x11\
-\xde\x50\x03\xab\x27\x0c\x3c\x6f\xa8\xc0\xec\x69\xd3\x73\x04\x73\
-\x67\x70\x46\x2d\x9c\xab\xef\xb2\x10\xc2\xda\xcd\x02\x3f\xf5\x33\
-\x5f\x62\xe3\xd5\x7f\x48\xb6\xef\xb3\x7b\xf6\x8c\xa3\xab\x2b\x8e\
-\xae\xae\xf0\x82\x80\xd2\xfa\x02\x77\xee\xbf\xc4\xbd\xef\xfb\x24\
-\xeb\x77\x37\x71\xfb\x22\x09\xbc\xdf\x9e\xa8\xd2\x22\x79\x70\x64\
-\xbe\xb0\xae\x8b\xd3\x72\x61\x1e\x2b\xd8\x99\x4c\xe2\x79\x9d\x89\
-\xc3\x38\x09\x5e\x3e\x27\xcb\x87\x54\x75\x75\xa7\x1d\xfb\x82\x27\
-\x73\x3d\x1e\x73\xfd\xd5\x73\xca\xfd\xf5\xe8\xa0\x7e\xa5\xf9\x5e\
-\x92\xf8\xf5\x54\xcd\x79\x85\x04\x69\x37\xe2\x75\x36\x42\x3a\xfa\
-\x79\xdd\x4d\x67\x63\xa3\x1f\xcd\x00\xf8\xba\x9b\xfc\xfd\x32\x17\
-\x5c\x8f\xe2\x49\xe9\x98\xcb\xad\xd1\xed\x74\x39\x88\x26\x71\xbd\
-\xdd\x25\xad\xb0\xcb\x6a\x7d\xda\x11\x68\x5e\x4f\x8b\xc3\x28\xcb\
-\xbd\xdb\x59\x0d\xbc\xe2\xd8\x55\x8d\x30\xce\x01\xf7\xda\x60\x17\
-\x94\x7c\x28\x15\x03\xdc\xc1\x90\x52\xb1\x00\xb6\x94\x14\x36\xee\
-\x60\x88\x59\x1c\x63\xdb\x0d\x6c\xaf\x0d\x76\x43\xe4\x73\xe2\x29\
-\x30\xdb\x71\x02\x87\x07\x74\xdb\x5d\x6c\xc6\xbc\xd0\x28\xf1\xcf\
-\xff\xe5\x8f\xf1\xdd\x77\x6f\x71\xb5\x67\xe1\xf0\x88\x9b\x96\x85\
-\xb5\xbe\xc9\x67\x3f\xb1\x8e\x99\x29\x31\xa0\x8a\x37\xec\xf0\xe4\
-\xc3\x6d\xf6\xf7\xb6\xd9\x7b\xfc\x01\xbb\x3b\x07\xb4\x2f\x5b\x84\
-\x03\x71\x50\x6f\x7d\xf2\x8e\xb8\xbc\x1e\x5d\x25\x4f\x60\x2f\x19\
-\xd8\x90\xec\x5b\x69\x64\x67\x2e\xb9\x72\xff\x74\x35\x87\x9c\x66\
-\x34\x5c\x6e\x51\x19\xde\xa0\x5f\x38\x56\x35\x7d\x22\x78\x33\x99\
-\x3d\x61\xd7\xe4\x6c\xe8\x41\x81\x04\xd8\x52\xa9\xa1\xba\x57\x26\
-\xed\x39\x98\xe7\xf9\x98\x97\x0b\x3d\xcf\x38\xd5\x17\xb8\xf4\x5f\
-\x17\x72\x6b\x33\x57\x8d\x79\x0c\x9b\x96\x14\xcf\x33\xee\xae\x5b\
-\x78\xfa\x77\xd7\x93\xe4\xeb\x55\xa0\x9c\x85\x4e\xc8\xce\xf6\x19\
-\xfc\x28\x84\x3d\xb0\xcc\x88\xe5\xf6\xd4\xc5\x9b\x2d\x7c\x1c\xfc\
-\xa3\x69\x92\x7c\xec\x21\x79\xb2\x3f\x41\x14\x8f\x57\xa8\x1a\x2e\
-\x66\xad\xa1\x65\xb1\xd9\x0d\x3c\xc6\x84\x83\x21\xa5\x62\x14\x33\
-\x71\x14\x3f\x17\x0a\x30\x7b\x6d\x4a\xc5\x06\x78\x6d\x3c\x1b\xc2\
-\xc8\xa6\xa4\x71\xb0\x8d\x87\x3b\x30\xa0\x88\x02\xbd\x40\xf3\x90\
-\xb6\x9d\x61\xed\x66\x85\xd5\xfa\x97\xe1\x8b\x7d\x9a\x93\x2f\xd1\
-\x0f\xce\xc0\x8e\x2d\xea\xa1\x41\x35\x9f\x63\x62\x98\x6c\xae\x7e\
-\x19\x7e\xe4\xcb\x9c\x76\xae\x28\x5c\x79\x9c\x5e\x5e\x71\x38\x14\
-\xb5\x56\x9b\xeb\x65\x7e\xe9\x17\xdf\xe7\xe8\xe9\x2f\x51\x5e\x6c\
-\x52\xe8\x97\x12\x8c\xa3\x4b\x0a\x3b\x93\xc1\xef\x85\xea\x44\xa5\
-\xfd\xc4\x89\xbc\x64\x50\x32\xa2\x70\xde\xa4\xbf\x3c\x05\xf0\xe1\
-\xd1\x64\xd6\xf7\x0a\xd3\x54\xd0\x54\xb4\x4a\x82\x37\x51\xb0\x3a\
-\x27\x62\x26\xdf\x2b\x7d\xbb\xe9\xab\xc8\x3c\x00\x4f\xa5\x85\x3d\
-\x03\xd8\xeb\x8c\xbb\xa1\xef\xce\x05\xf0\xf3\x58\x38\x0d\x64\xf9\
-\xf8\xa3\xde\x3b\x6f\x11\x59\x55\x93\x9a\x53\x9b\xe6\x5b\x68\x79\
-\x14\x17\xdd\x27\x74\xbd\x4d\x8a\x1b\x4d\xce\xdb\x65\x95\xcd\x76\
-\xf8\x9d\xdf\x84\x7a\x45\x25\x01\xb5\x3a\x43\xa2\xf1\x25\x3b\x3b\
-\x5f\xe3\xac\x73\x9f\xd0\x5e\x65\x3d\x3a\x22\xb8\xb8\x43\x36\xb3\
-\x22\x98\x38\xe7\x0d\x71\x23\x62\xe0\x66\x00\xe1\x56\x93\xa0\x06\
-\x31\x39\xc9\x64\x0c\x76\x89\x9a\x17\x32\x2e\x16\x14\x5b\x0b\xd0\
-\xa2\xee\xd7\xbc\x90\x76\x24\x24\x89\x1b\x89\xa1\x20\xfd\xf6\x1e\
-\x50\xc6\x26\x47\xbf\xd0\x87\xe1\x90\xf6\x50\x04\x50\xcc\xa2\x09\
-\x23\xd1\x7f\x78\xc4\x3e\xe5\x7c\x93\xb5\x9b\x05\xa2\x46\x8e\xca\
-\x46\x86\xef\x2f\x2c\xd1\x8b\x2a\x74\xfc\x08\x78\x7f\x06\x54\x32\
-\x32\x96\x0e\x47\x5b\x55\x13\xbb\x97\xd4\x89\xfa\x89\x58\x26\x02\
-\x33\xa2\xa6\x55\x66\x65\xab\x05\x5a\xa7\x36\xa1\x53\xa5\xef\x1f\
-\xe2\x17\x0d\xf5\xb9\x7a\x16\x5a\x9a\x19\x25\xcb\xce\x1b\x1b\x76\
-\x2d\x60\x32\x15\xfc\x62\x7f\xc6\x68\xbd\x8e\x85\x75\x69\x31\x6f\
-\xdf\xeb\xd8\x3c\x0d\x60\xb9\xbd\x4e\x26\xa4\xd9\x57\x02\x7b\x58\
-\x71\x3f\x52\xfa\xa4\x33\xe2\x7c\x3c\x55\x3c\xaa\x1b\xcf\x27\x4e\
-\x84\x73\x1a\xc1\x4b\x50\x2a\xd6\xb9\x5d\x0b\xf9\xa3\x85\xe9\x24\
-\x57\xd5\x7d\xde\x11\x81\xb3\x13\x27\x62\x0b\x18\x74\x02\xe8\x3c\
-\xe3\xcf\xc7\x11\x6b\xb9\x7d\x8a\xf5\xb8\x5f\x45\x5b\x03\xb0\x60\
-\xde\x08\xbc\x36\x66\xd1\x14\xec\x8a\x18\xc2\x68\x93\xc3\xf6\x5c\
-\xc6\x76\x21\x96\x1d\x05\xc5\xd6\x60\x83\xd7\x26\x1c\x84\x8c\xed\
-\x82\x00\xf0\x60\x48\xc3\x40\x19\x89\xe0\xe0\xd1\xa2\xdf\x3e\xe6\
-\x6a\x60\x88\xbf\xa5\x0d\x77\xb4\x3c\x0f\xbf\xdf\xa7\x73\xb9\x4f\
-\xfb\x60\x97\x5e\xfb\x12\x77\x30\xe4\xe0\xa2\x45\xd6\xe8\xd3\xbe\
-\x10\x6e\x99\x46\xbe\x4a\xb6\xef\x27\x12\x80\xfc\x5e\x48\xa6\x51\
-\x4b\xe8\xbd\xb4\x81\x93\x28\x1f\xf3\x1d\xe1\x89\x88\x4b\x87\xa4\
-\x16\x96\xed\x00\x3a\x7e\x8f\x80\x5a\xc2\x80\x92\x4c\x28\x8b\x35\
-\x96\x90\x1f\x66\x00\x00\x19\x9b\x49\x44\x41\x54\xe7\xb9\x08\xe7\
-\x25\xc4\x3c\x4f\xeb\x5e\x67\x20\x3d\xef\x52\x7d\x1d\xeb\x5d\x07\
-\xfc\x8f\x62\xe0\xb4\x21\xa7\x3f\x27\xb7\x12\xd8\xba\xee\x7d\xde\
-\xad\xea\x3b\x33\xae\x38\x55\x84\xea\x14\x55\x4f\x89\xce\xd0\x81\
-\x81\x60\x1a\x99\xcd\xe6\x3a\x13\x5c\x6b\x3d\x31\x7b\x6f\xd2\x1b\
-\xb2\xbb\x1f\xcc\x0c\x14\x1a\x74\x82\x69\x8d\x1d\xde\x90\x30\xb2\
-\x63\xe0\xc6\xa0\x8c\x41\xe6\x61\x12\x46\x36\x0c\x86\x94\x8a\x0d\
-\xdc\x81\xec\x86\x28\xb6\x42\x82\x88\xd7\x4a\x5e\x1b\x77\x20\x58\
-\x19\x40\x2e\x10\x77\x50\xc4\x2c\x9a\x84\x83\x90\x6c\xd1\x66\x3c\
-\x20\x66\xf9\x82\x08\x67\x07\x11\x54\x6c\xcc\x81\x18\x76\x03\x65\
-\x6c\xcf\x8d\x47\x90\x4d\x6f\xfb\x95\x09\x81\x66\xad\xeb\xae\x23\
-\xe9\xd9\x98\x77\xc2\x66\x0c\xbf\x38\x72\xd4\xac\xd9\x0c\x97\x5b\
-\xb4\x4e\x81\xd3\xe9\xd8\x58\x59\xf9\xa0\x97\xb9\x8b\xf1\x60\x36\
-\xa8\xd6\xae\x3c\xb7\x4e\xf0\x3a\x69\x90\x0e\x76\xcc\x2b\xa3\x9a\
-\xc7\xa6\x32\xd7\xa1\xea\x3b\x60\x25\x93\x73\x9e\xc7\xb8\xd7\x45\
-\xe6\xa4\x67\xc2\xae\x64\x66\xa4\x83\x64\xdf\x8f\x5a\x44\xd7\xdd\
-\xf4\x48\x68\x42\x1b\xc7\x00\x6f\x75\xb3\x6c\x1f\xef\xb2\x79\x79\
-\x9f\x71\xe3\x52\xb5\x42\x00\xa8\x2f\xbe\x42\xc9\x3f\xc2\x25\x1e\
-\x96\x33\xc8\x89\xb9\x1e\xbb\x01\xd9\xd6\x9b\xec\xda\xa2\x11\xe1\
-\x51\x3c\x13\xda\x35\xc7\x98\x25\xc3\xc3\xb3\x93\x07\x52\x32\xa4\
-\x1b\xd9\x53\x76\x8e\x3d\x18\xf2\x35\x09\x54\x8f\x0c\x0d\x03\xdc\
-\xc1\x50\x0d\x6c\x74\x07\x43\x4a\x86\x17\x33\xb2\x91\x60\x64\xc9\
-\xee\xf2\x7e\xc3\x40\xcc\xc9\x1b\x08\x17\x56\x38\x28\xe2\xf7\xfb\
-\x49\x00\x7b\x31\xe8\x1e\x1d\x26\x00\x3c\x4f\x1b\xea\x27\x49\xfa\
-\x88\xf5\xe7\x97\xeb\xa2\x7f\xb0\x64\xe1\xc1\xa9\xad\x98\xb8\x1d\
-\x1a\x89\x80\x86\x3e\x3a\x37\xca\x54\x54\x85\x8a\x2c\xed\x7f\x5e\
-\x33\xc2\xeb\x4e\xb6\xfe\x9e\x66\x2f\x98\x49\x50\xba\xee\xf3\xf4\
-\xae\x45\x32\x8f\x61\xde\x71\x78\x1e\x80\x13\xf1\x80\x4c\x86\xe2\
-\xc0\x9c\x6b\xd4\x49\x00\xe7\x1b\xe5\x6b\x3d\x10\xcf\x5b\xb4\x55\
-\xdf\x99\xd9\x47\x36\x9f\x39\xc7\x80\x0a\xdc\xc8\xdc\xe2\xa2\xfb\
-\x84\xbd\xfd\x0e\xbd\x6e\x3c\x7f\x7a\xe5\x65\x2e\x46\x0f\xd5\xb0\
-\xc6\x86\x99\x5c\x48\xa6\x3d\xed\xa4\xe9\xec\x1e\x72\x7a\xf2\x50\
-\x04\x3b\xdc\xc8\xc6\xf6\xc4\x0f\x95\xdb\x34\x03\xba\x03\x43\x4d\
-\x13\x75\x23\x7b\xca\xbe\x31\xa0\xc7\x78\x94\x8a\x51\xac\x83\x05\
-\xa3\x7b\x76\x09\x3c\xf1\xe5\xc6\x76\x21\x01\x7c\x01\x74\x61\x40\
-\xb6\x23\x68\x18\xc9\xc5\x63\x66\x4a\x94\x46\xf1\xb0\x14\x3f\xcb\
-\x85\x35\x4d\xb6\xb9\x6a\xf7\xa7\x8d\xb2\xb5\x88\x5e\xfa\xe0\xea\
-\x4e\xfa\x99\x83\x5f\x11\xff\x5b\xa1\x47\x71\x75\xda\x1b\xc2\xec\
-\x75\x12\x1d\x20\x65\xc8\x54\xef\x9c\x23\x9d\xf7\x69\x00\xeb\x3e\
-\xdc\xeb\xf2\x79\xd3\xcf\x5d\x35\xea\xcf\xcd\x6b\xd0\xfd\xbb\xe9\
-\x08\x9d\x04\xf3\x3c\x59\x91\xce\xd8\xfb\x28\xe0\x49\x00\x4b\xf0\
-\x0e\x8a\x21\x51\xc5\x60\xd4\x76\xe6\x12\xc4\xbc\x85\xa1\x7f\x87\
-\x73\x66\xbd\x1a\x7a\xc2\x14\x7d\x31\xf9\xaa\xda\x5f\xa4\x13\x05\
-\xf8\x57\x1d\x98\x1c\xe2\xf0\x88\xa5\xfc\x4b\x94\xfc\xa3\x78\xe4\
-\x6e\x35\x96\x7b\x43\xd5\xe3\x2f\x6b\xdf\x10\xf2\xe3\xc5\x35\xf2\
-\xcd\x57\x66\x99\x58\x6e\x15\xdb\x1a\x1e\x66\xd1\x14\xa0\x8b\xc1\
-\x39\x05\x60\x41\x81\xdd\x8d\x6c\xc1\xb0\xb1\x96\x0e\x07\x21\x36\
-\x39\xf5\x1e\x25\x41\xe4\x56\xbe\x2f\x66\xe5\x31\xde\xdc\xc5\x03\
-\xe0\xe6\x73\x54\x02\x97\xd1\xbe\x33\x17\x30\xb2\x7a\xe3\x3a\x37\
-\x93\xbc\x2d\x13\xcd\xb4\xa2\x6a\x9a\xb6\xf2\x44\xb4\x3a\x71\xc5\
-\x45\x2f\xbc\x36\x39\x7e\x12\x57\x15\xfb\x45\xef\xb9\x1d\x23\x75\
-\xc0\xe9\x06\x67\xda\xaf\x7d\x9d\x7b\x6d\x1e\xe8\x54\x37\xcf\x54\
-\x07\xcf\xe7\xb1\xb8\xd1\x8f\x54\x15\x87\x7e\x2c\xe6\x49\x85\x74\
-\xb8\x59\x6a\xe1\x51\xdb\xf9\x6b\xc9\xa5\xe7\x2d\x98\x8e\x21\xf2\
-\x33\x64\x14\xee\xbc\xd1\x20\xec\xb6\xe9\x76\x32\xaa\xcc\x2d\x51\
-\xd9\x11\xdf\x5a\x61\x41\xb1\xf0\x02\xc7\x0a\xc8\xf2\x78\x98\xe2\
-\x12\x2e\xf4\x6f\x9a\x89\xa5\x9c\xf0\xec\x52\x82\x89\xcd\xa2\xa9\
-\x58\x56\x86\xa5\x25\xa8\xed\xd4\x84\x4a\x7b\xce\xc4\x4a\x7d\x91\
-\xc8\xbf\xa3\xd8\x38\x66\x60\x37\x9f\x53\xf7\x3d\xc6\xec\xd6\x44\
-\xe6\xff\x42\xa3\x32\xc3\x70\x69\x97\xd9\xbc\xa0\x87\x3c\x99\xb5\
-\x7a\x4d\x3b\x38\x9e\x92\x11\x19\xba\x09\x43\x4e\xea\xe1\x79\x7d\
-\x81\xf5\x46\x83\xf3\x2a\x52\x94\xd7\x42\x0b\x80\xa4\x81\x36\xa9\
-\x58\xcf\xf5\x0f\xa7\x75\x6c\xba\xb4\xe8\xa3\x64\x83\xcc\x87\x98\
-\xb7\x28\x74\x57\x5a\x7a\x2b\xaf\x5e\x12\xcc\xd7\xf9\x8a\xd3\xdf\
-\xf3\xa3\x8c\xd2\xb9\x8d\xcf\x8f\x1e\xd3\x8b\xe2\xcc\x36\xd9\xf9\
-\xc0\xdf\xa1\x53\x4e\x8e\x2e\x6b\x9a\xc3\x04\x0b\x37\xf2\x3e\xed\
-\x91\xc5\x02\xc7\x04\xf5\x86\x90\x13\x20\xc6\x79\xa5\xb5\x31\xa0\
-\x98\x55\xc8\x88\x82\x02\xae\x7c\x2c\xa5\x86\x64\x59\xe1\x53\x2e\
-\xcc\xb0\xaf\xee\x89\x50\xab\x2d\xd6\xd0\xd2\x08\xd4\x6f\xe9\xf6\
-\x5a\xd6\xd9\x1b\x62\xbf\x51\x4f\x85\x6e\xf5\x26\x29\xcf\x0b\xdf\
-\xce\x63\xe1\x04\x43\x74\xba\x2a\xa7\x61\xe8\xbb\xc9\x71\xb7\x1a\
-\xf3\xcb\x06\x7e\xb2\x86\xec\xa3\x52\x2e\xe7\x45\x14\x25\xb8\xf5\
-\xa6\xdd\xd7\xe5\xe3\xea\xb5\x85\xf3\xa2\x92\x69\x00\xeb\x3a\xf9\
-\xa3\x02\x13\x12\x9c\x69\x20\xeb\x00\x46\x15\x0b\x7c\xf4\xe7\xc9\
-\x4c\xb8\xf4\x3e\x7e\xd1\x53\x19\x6d\xd9\xbe\xaf\x16\xa1\x7b\x76\
-\xc4\xf1\xd0\xc2\xe3\x0a\xa7\x7d\x39\x53\xa6\x24\x01\x6c\x96\x7b\
-\x6a\x98\xfd\x02\xc7\x84\xf9\x65\xda\x23\x8b\x46\xde\x27\xcc\x2f\
-\x4f\x3b\xc5\x9b\x45\x13\x33\x33\xdf\xb8\xd3\x5d\x61\x52\x07\xeb\
-\xc0\x35\x8b\xa6\x02\xa3\xbc\xaf\x22\x7e\x29\xb6\xd5\xc1\x3b\x0f\
-\xc8\x92\x81\xa5\x2e\x96\xf7\xfd\x8c\x88\xce\x5c\x8c\x1e\x62\x67\
-\x32\x89\xde\x63\x7a\xd2\xcb\x75\x01\x83\x56\x35\x33\xc3\xc2\xea\
-\xb5\xce\x34\x2f\x43\x26\xec\xa4\xdb\x94\xca\x7e\x65\x52\x0f\xeb\
-\x35\x72\xe9\x44\xfe\x79\x57\x89\x79\x85\xab\xf3\xea\x04\xe7\xb1\
-\x9d\x9e\x4e\xfa\xbc\x80\x48\xc1\x2a\x71\x8e\xf1\x91\x9e\x83\x79\
-\x6e\xb4\xa8\x62\x60\x86\x3d\x06\xc5\x10\x33\xec\x29\x7b\xc2\x0b\
-\x02\x42\xb3\xfa\x91\x52\xc2\xe8\x47\x8a\xf9\xd3\x0b\x2c\x3d\xcd\
-\x55\xbf\xdd\x28\xf8\x6a\xac\x86\xaa\x7a\xf6\x77\xd4\xd4\x2d\x39\
-\x57\x0f\x44\xa5\x4b\x98\x5f\xa6\x5c\xec\x61\xac\x64\x69\x8f\x2c\
-\x95\xf2\x99\x70\xa0\x4a\x0f\x82\xd4\xc0\xf3\x40\xa7\xd8\x3a\x36\
-\xd6\xa4\x04\xf1\xec\xd2\xf4\xfd\xb1\xe1\x97\xd8\xff\x1a\x49\x91\
-\xfe\x7c\x9d\x81\xe5\x7d\xb3\x7f\xc5\xd5\x9e\xa5\x0e\x9c\xbc\xbc\
-\xcf\x6b\xa4\x9d\xbe\xcc\x59\x55\x53\xa5\x3f\xa6\x6f\x7d\xa7\x80\
-\xeb\x4c\x12\x46\x87\x04\x64\xba\x87\x82\x64\x4e\xe9\xad\x78\x9e\
-\xd7\x21\xed\x5f\x4e\x97\x52\xcd\x73\x8b\xa5\xa3\x6f\x33\x69\x94\
-\xa9\x36\x5e\x69\x40\xcb\x1c\xe7\xef\xc5\x90\x9b\xc7\xc8\xa1\x59\
-\xc5\xce\x64\x12\xa0\x95\x60\xfe\x28\x36\x5e\xaa\x3c\x5f\x13\xcf\
-\x1b\x95\x06\x60\xad\xbf\xc0\xa7\x6f\xaf\x50\xb9\x5b\xa7\x76\xe5\
-\x2b\x26\x96\x03\x1e\xd5\x64\xa7\xbe\x90\xae\xe5\x4f\x94\x60\x6b\
-\x8d\xdb\x77\xee\xf3\xd9\xcd\x12\xa5\xc5\xca\xb4\x53\xfc\x34\x20\
-\xc1\xb5\x06\x56\x1a\xe8\xd2\x28\x93\xfb\xea\x9f\xa1\xbb\xd1\xd2\
-\x9f\xad\x33\xf3\x3c\x89\x61\x66\x4a\x53\xf0\x66\x4a\x94\x8a\x05\
-\x5a\x65\xe3\xda\xa4\x98\x8f\xd2\x63\x12\xc0\xf3\x58\x78\xe2\x0f\
-\x67\xda\x01\xe8\x80\xd4\x2b\x7c\xd3\x63\x76\xe7\x31\x70\x5a\x23\
-\x26\x7a\x65\x68\xef\xb9\xce\x00\x4d\x4b\x88\x99\x56\x05\xda\x02\
-\x48\xef\x2f\x13\x6c\xce\x31\x54\xc5\xf2\xf3\x58\x78\x50\x0c\x31\
-\xfa\x11\x46\x3f\xc2\x0b\x82\x84\x14\xf8\xeb\x24\xfe\x48\x9d\x2e\
-\x17\xe2\x75\x6e\x3d\x69\x5f\xe8\xb2\xce\x3f\x7a\x8c\x1b\x8c\x58\
-\x08\x97\xa8\xde\x14\xd3\xa6\x26\xc3\xf7\x13\xb3\x0f\x27\xfe\x90\
-\xee\x55\x9b\x17\x4b\x0d\xbe\xb8\xf5\x80\x2f\x6e\x3d\x60\x73\xbd\
-\x4c\xf9\xd3\x2f\xf1\x23\x0f\x3e\x2f\x70\x62\x16\xcd\x84\xfe\xd5\
-\x19\x30\x6d\x80\x5d\xf7\xdc\x75\x9a\xf7\x3a\xf0\xce\x63\xfb\x34\
-\x90\x81\xff\xaf\xb3\xab\xeb\x71\x1c\x4b\xcb\x8f\x3f\x52\x89\xed\
-\x38\x76\x52\x55\xdd\xd5\xbd\xdd\x3d\x3d\xd5\x3b\x2b\xcd\xdc\xec\
-\x0a\x84\x84\xd0\x08\x81\x10\xdc\x00\x17\x08\xc1\x25\xab\x15\x3f\
-\x8a\x0b\x7e\x01\x3f\x61\xaf\xd1\x0a\xd0\x22\x56\xa3\xd5\xd0\x30\
-\x3d\xd3\xd3\x1f\xc5\x54\x77\x57\x25\x71\xe2\xd8\x49\x2a\x8e\xcd\
-\x85\xfd\x9e\xbc\xe7\xe4\x1c\x27\xbd\x96\x4a\x49\x1c\x97\x93\xd8\
-\x8f\x1f\x3f\xef\x37\xc6\xab\xa6\x4d\xd6\xed\x16\x0b\x3c\x97\xc0\
-\xcb\x0d\x23\xe9\xea\x66\xd1\x39\x77\x60\xd7\x43\x06\x07\xfb\x5d\
-\x3f\x67\x49\xdd\x15\x5d\xe7\x9e\x6a\x9b\xa8\xa4\xba\xd7\xa2\x96\
-\xdb\xad\x64\x74\x2a\xd5\x29\x3a\x26\xd5\xbd\x56\x93\xfb\xdb\x3e\
-\xe7\xee\xee\x1a\xf7\x50\xe1\x26\x05\x4e\xed\x61\xab\x3b\xcd\xcf\
-\x6d\xe1\x4a\xf3\x73\x5b\xf2\x11\xab\xc1\x0e\x93\xa4\x20\x1d\x4c\
-\x1e\x0c\xd3\x9d\x45\x92\x6f\xa5\x05\x34\x4d\x51\xfa\x17\x16\xa6\
-\xd3\x04\x63\xfb\x46\xe4\xc8\x74\x7a\x5f\x88\x9c\xe2\x00\x27\x82\
-\x8d\xdf\x9c\x2c\xf1\x38\xa8\x30\x18\x0d\xf0\x69\xff\x1c\xbf\xef\
-\x04\x88\x7e\x14\x34\x77\x0a\xca\x5f\x60\xac\x49\x20\xca\x2a\x0f\
-\xe5\x36\xd3\x4a\x0b\x0e\x46\x13\x7b\x9b\x24\x03\xdf\x77\xdb\x32\
-\xec\x2c\xd1\xeb\x55\xb0\xe3\x33\xbc\x7e\xd1\x95\xd8\xb0\x93\x16\
-\x72\xbe\xac\x26\x49\x9e\x32\xd4\x86\x1a\x39\xc1\x07\x0f\x9a\xdc\
-\x59\x6d\xc1\x0c\x5d\x7f\x85\xb6\x5c\x02\xae\x89\x75\x40\x36\x25\
-\xd3\xa8\x91\xb9\x36\x6f\x46\x69\x0f\x30\x77\xfb\xe8\x0e\xfb\x18\
-\x97\xd3\x83\x49\x3e\x7e\x6e\x4b\x46\x9c\xc9\xf5\x66\xb3\x8b\x9d\
-\x3f\xae\xa7\x0b\x8c\xa2\x91\xf0\x82\x1c\x23\x61\x22\x7b\x20\x6c\
-\x94\xc5\xbb\x0a\xb1\x95\xe0\xb4\x3c\xc7\xe3\x5e\x9d\x30\x9f\xdc\
-\x7e\xa5\x77\x71\xbe\xbf\xc2\xcd\xec\x5b\x54\x2b\x0b\x3d\x58\xc8\
-\xbd\xa0\x69\xba\x0d\xbd\x9c\x90\x4e\x68\x18\x1e\x05\x4e\x1d\x5b\
-\xb7\xc9\x12\x21\x17\x0c\x0c\x4e\xeb\x57\x2b\x0b\xdd\x55\x61\x4c\
-\x7b\x54\xcb\x8e\xf8\x42\x29\x96\x3a\x16\xe6\xe5\xe6\x87\xa2\x5b\
-\x5c\x4e\xb4\x01\xfc\x90\x05\xaf\xf6\x66\x30\xb5\xa0\x6d\x03\x83\
-\x29\xe0\xc0\xc1\x7c\x48\x4a\x70\x20\x7b\x8e\x23\x5e\xe7\x7e\xa9\
-\xdd\x9e\x17\x00\xf0\x7d\xd3\xc5\x62\xa5\x15\x4e\xed\xa1\xd6\x87\
-\x2d\xce\x67\x79\x02\xcc\x6b\x77\xe5\x68\xbe\xbb\x70\xd6\xf1\x05\
-\x56\x41\x0a\x6c\xde\x8a\xb0\xb3\xd4\xb8\x1b\x27\x98\x0c\x9c\x5d\
-\xd2\x10\x80\xfe\xd2\x97\x71\x74\xe8\x44\x50\x1f\x0a\x2e\x33\x38\
-\x38\xdb\xbc\x0f\x6d\x12\x43\x27\x2f\x74\xeb\x9d\x6e\xff\xa3\x4f\
-\x28\x19\x73\xe5\x20\xde\xab\xd1\x22\x6b\x57\xa7\xa5\xdb\xc0\xc3\
-\x5d\x62\xba\xd0\xb2\x09\x54\x26\x69\xa0\x93\x1c\x3a\x3d\x7d\x28\
-\xc0\x70\xcc\x05\xa8\x33\xe4\x48\x13\xab\x12\x43\xf5\x19\x5b\x41\
-\x6a\xbc\xc0\x28\xa2\x57\x85\x16\xc6\xe5\x54\x44\xea\xb4\x9a\xb8\
-\xe9\x9a\x19\x57\x16\x6e\xcb\x54\x14\x1e\x58\x8b\x0a\xae\x7d\x01\
-\x74\x1e\x0b\x26\x56\x67\x4a\x47\xf6\x00\xef\x93\x29\x7e\x58\xd5\
-\x44\xb2\xf0\x72\xf4\x4f\x4e\x76\xe3\x0e\x4c\x7e\x59\x93\xa1\xc5\
-\xb7\xe5\x52\xc3\xe4\x07\x36\x01\xd8\x24\x47\xf8\x7a\xfa\xbc\xe5\
-\x2a\x41\x55\x7d\x85\xc5\xed\x44\x5b\x11\xa1\xde\xea\x46\x76\x85\
-\x2d\x22\x0c\xed\x4a\xf4\x09\x16\xbf\xb3\x78\x2f\x9a\x9e\x1c\xcb\
-\xa0\x1c\xb8\xbc\x01\xe2\x31\xc1\x0a\x9d\x34\x30\x19\x83\xba\x10\
-\xef\xa1\x7c\x08\xca\x55\x38\xd6\xad\x46\x86\x1c\x01\x3a\x4b\x4b\
-\x01\xdc\x05\xaa\x3d\x4d\xac\x2b\xc3\x22\x29\x41\x5d\x82\xb8\x0c\
-\xe1\x79\x13\xf4\x3b\x85\x6b\x6d\x6e\x69\x35\x76\x95\xbe\x16\x9a\
-\x38\x3e\xfb\xe9\x3e\x81\xb8\x3d\xcc\x5e\x4d\x61\xe3\x05\xfc\xa5\
-\x5d\x8f\x3e\xb0\x73\xb1\x4f\x5b\x07\x56\x93\xa1\xa5\xbe\xe6\x72\
-\xc0\xe4\x6d\x38\xa4\x8f\x4d\x40\x27\xcd\xbc\x5d\xdf\xe0\x7f\x92\
-\x7b\x62\x06\xb0\xc9\x88\x53\xd7\x39\x4d\x37\x64\x92\x13\xb3\x64\
-\x86\x69\x69\xed\x0d\xe1\x3e\x74\xfb\xe7\xc0\x55\xf5\xb0\x4e\x27\
-\x9a\x7c\xb9\x52\x89\x94\xc6\x43\xa1\x0b\x39\x1f\xca\x0f\xa6\x85\
-\x3c\x12\x26\x39\xa2\xa6\x54\xf2\x10\x73\x1f\x96\xa4\x8b\x89\xa1\
-\x4d\x99\x6c\x5c\x4a\x10\x80\xb9\x51\xc8\x7d\xd5\x54\xc9\x2d\xec\
-\x86\x66\x56\x34\xff\xae\xf5\x50\x19\x08\x4d\x4c\x8d\x05\x33\xdc\
-\x21\x73\x1f\x89\x74\xcc\xe8\x74\x88\x45\x72\x89\x13\x7f\x52\xf7\
-\x27\x5e\xb9\x40\xaf\xd8\x97\x13\x2a\x58\x0f\x81\x51\x35\xd0\xd2\
-\xc2\xac\xad\x0f\x19\x7e\xba\x0b\x20\x74\x6d\x2c\xe1\x88\x68\xdd\
-\xa1\x88\x11\xdd\x7a\xa2\x38\x92\xc0\x4b\x60\xb6\xe7\x89\xdc\xb1\
-\x11\xfa\xea\x08\xde\x9c\xf0\x90\xc1\x67\xca\xf1\x35\x05\x2e\x78\
-\xd4\x4e\xa7\xc7\x8f\xc9\x44\xe3\xeb\x88\xf9\x78\xd2\x8d\x29\x3a\
-\xc7\x75\x30\xf9\x81\xe9\xf5\x02\x15\x82\xd0\x86\x9f\xdb\x22\x7b\
-\x4d\x05\x3d\x81\x76\x3d\x5d\xec\x35\x5b\xa1\xe7\x04\x50\x5e\x38\
-\x1b\xf4\x3b\x52\xab\xd7\xb9\xdb\x17\x9d\x7d\xd2\x7c\x86\xc5\xdd\
-\x9d\xd0\xc4\x70\x2f\x77\x43\xd5\x8b\x97\x08\x58\xda\x42\x55\xbe\
-\x44\x52\xc5\x20\x8d\xd8\x2f\xfd\xda\x4f\xcc\xa5\x81\xca\xc4\x3a\
-\x66\xe6\xa0\xa5\xff\x21\x16\xe7\x6c\xae\xfb\x5f\x75\x5d\x1b\x23\
-\x93\xe4\x28\x9c\x21\xc6\xaf\x5c\xdc\xac\xbf\x16\x09\xf1\x04\x34\
-\x35\xb9\x66\xd0\xcf\x05\x03\x73\xf0\x4e\x4b\x0b\xd3\xd2\x92\x58\
-\xd0\x94\xa3\xa0\x1a\x89\x26\xd9\xa1\x36\x25\x31\xe5\x2f\xe8\xa4\
-\x0f\xaf\x34\x69\xd3\xf9\xc7\x48\x14\x62\xbe\x7b\xa8\x8e\xce\x54\
-\xb3\xd2\x4a\xd4\x2e\x02\x40\xd6\x0c\x55\xcc\xd2\x12\xb9\x5f\x4a\
-\x12\x41\x65\xe3\x2a\xb4\xf6\x52\x34\xf9\x42\x17\x13\x97\x4d\x62\
-\x74\xef\xa0\x42\x1c\x87\x75\xdf\x3a\x40\x8c\x32\xd8\xe6\x1e\xe6\
-\x1f\x80\x37\xf3\x7a\xbf\x34\x8f\x5a\x32\xc6\xc7\x53\x56\xba\x5f\
-\xdf\x95\xcb\x6a\xb1\x1f\xb1\xe3\x4c\x5c\x6e\x33\xac\x9c\x07\xe2\
-\x39\x25\xe3\x98\x34\xb3\xee\x71\x2f\xf2\xe6\x1c\x17\x45\x22\x56\
-\x0f\xfc\x1e\xec\x74\xbc\xe7\x21\x20\xa0\xf1\x6e\x36\xc4\x00\x94\
-\x27\xcc\xbd\x12\xd5\xbc\x12\x65\xf7\xc7\x30\x27\x67\x60\xb5\x5a\
-\x58\xcd\xef\xd5\xb9\xcb\xa6\xeb\xb9\x36\x02\xa7\x7e\xd6\xa1\xd4\
-\x46\x1d\x90\x4d\xf2\xa3\x2d\xe4\xcc\x75\x2f\x31\x67\x1f\xb5\x1e\
-\x26\x90\xda\x7e\x65\xcc\xad\x38\x74\x17\x54\x2f\x16\x0a\xb6\xf0\
-\x1e\xcf\xd4\x5d\x7e\x53\xac\x44\xff\x89\x34\x7a\x03\x0f\xa7\x70\
-\x46\x29\x06\xf7\xea\xde\x13\x9b\x0f\xcf\x45\x90\x83\xe7\x50\x44\
-\xa7\x43\x3c\xb9\xf3\x90\xe6\x33\xf8\x4d\x94\x38\xdf\xd4\x43\x1f\
-\x6d\x1d\x5b\x12\x08\x7b\xdb\xeb\xbd\x9c\x86\x43\x40\x56\xf5\xb5\
-\x0a\xe8\x63\x16\xce\xd8\x39\x06\x58\xe0\xf9\x5e\xa4\x8e\x17\x86\
-\xf6\xdc\x40\x54\x6b\x88\x26\xe2\xe9\x8e\x8d\x3f\xc6\x0d\x26\xf9\
-\x9a\x59\x36\x9a\xc8\xd3\x50\xf4\x2c\x15\xa0\xf2\xfc\x8d\x61\x77\
-\xd0\x9a\xa8\xa3\x03\xe4\xb1\x9e\x97\x63\xa2\x94\x7b\xb2\x2d\xb4\
-\xb5\xd9\x6a\x41\x68\x0b\x19\xc1\x81\x6c\x62\x61\xdd\xf7\xe5\x7a\
-\x1a\x00\x46\xd1\x68\x3f\x9f\x98\x9a\x72\x37\x15\x1c\xd4\x7f\x22\
-\x9c\x3d\xc1\x12\xe3\x5a\xdf\x36\xde\x89\xce\xbd\xcf\xb5\x61\xfd\
-\xd9\x76\x86\xbb\x7b\x75\x7b\x57\xca\x7c\x13\x86\x9d\x0a\x3c\xdb\
-\x09\x5a\x59\x15\xa8\x13\xd5\xf9\x63\x9b\xf1\xf7\x31\x80\xe5\xa0\
-\xa7\x7d\x2f\x57\x09\x5e\xbf\xe8\x4a\x4c\xcc\x7b\xad\xf1\xdb\x96\
-\xea\x13\x8e\xe2\x08\xe9\xa2\xb7\x37\xb3\x58\x3d\x31\x6a\x6e\x00\
-\x35\x64\x59\x15\x19\x2a\x27\x6c\xad\x6d\xa3\xfe\x13\x62\xe2\x53\
-\xc3\xc4\xea\xc9\xd5\xb5\x5a\x35\x19\x74\x2a\x60\x8e\xc9\x37\x6e\
-\xf3\x31\x9b\xd2\x2e\xad\xb4\x12\x00\x0f\xac\x4c\xfc\x71\xe3\x8e\
-\xf6\x69\x0a\x65\xf3\xf0\xb4\x95\x56\x7b\x41\x96\x41\xb1\xa8\xbb\
-\xcd\xb3\xa0\x50\x69\x0f\x44\x62\x7c\xe8\x47\xf0\x86\xf5\x7b\xd6\
-\xfd\x8e\xf0\x29\xd3\xa8\x31\x00\xb0\xab\x39\x22\x27\xc2\x03\xab\
-\x80\x87\xd3\xba\x91\x20\x73\xdd\xd9\x6d\x40\xe2\x8f\x92\x5b\xad\
-\x61\xe5\x36\x76\x3e\x96\x85\x4d\xe0\x4f\xdd\xfa\x87\x79\xbd\x58\
-\x62\x61\x5d\x57\x47\xea\xde\x23\x5f\x69\x35\x1b\x17\xfe\x5a\x78\
-\x24\x4c\xc5\x97\xaa\xcb\x27\x9d\xee\x32\xd5\xac\x6d\x6a\x94\x01\
-\xc4\xda\xab\x22\x83\x33\x8c\x04\x83\xf7\xcf\x46\xe2\xe4\xea\x12\
-\x7e\xd4\x0b\xc1\xf4\x5c\x17\xbc\x38\x54\x1c\xba\xd7\xe1\xbd\x69\
-\x98\xcd\x41\x29\xb4\x71\x90\x0a\xb6\xcd\xaa\x00\x0b\x00\x55\x16\
-\x0a\x83\x8f\xef\x53\xf5\x80\x50\x24\xaf\xcd\xfb\xc1\xf3\xb8\xd5\
-\x0c\xb6\x51\x54\x03\x31\xb6\x12\x5c\xc4\x0f\x1b\x89\x53\x4f\x26\
-\xe8\x8c\xba\x3b\xe3\xae\xd1\xc3\x3f\xfb\x7c\x84\xde\x27\xcf\xe4\
-\xa8\x6b\xd3\xe3\xc3\x2e\xb7\x19\xa6\x9b\xa6\xc6\x6c\xe3\xed\x19\
-\x66\x5c\xcf\x92\x4e\x56\x0d\x3b\xf5\xaf\x8d\x6d\xdb\x0c\x3f\x75\
-\x7d\xea\x04\x48\xfe\xf7\x4a\xb0\x9b\xe9\x24\xaa\x00\x9e\x25\x33\
-\x31\x8a\xcb\x9e\x27\xda\x72\xa2\xb6\x25\x1c\x76\x44\xe1\x69\xe5\
-\x84\x98\xae\xe7\xa8\x9c\x50\xea\xe9\xa6\xea\x67\x5e\xa8\xba\xb8\
-\x9d\xec\x49\x13\xf5\xf6\x7f\x6c\x95\xb3\xca\xde\x26\xa3\xd4\xc4\
-\xcc\x54\x9d\x41\xc0\xa5\x3b\xc4\x02\x75\x24\x6e\x01\x26\x2f\xb2\
-\x50\x44\xed\x74\xee\x35\x1e\xcc\xa0\x48\x9e\x49\x37\xab\x44\x43\
-\x4c\xdc\x71\x7b\xe8\xb9\x01\xbe\x7f\xf9\xc3\xee\x77\x01\xf8\x9c\
-\x0d\x02\x4d\x92\x54\xcc\x09\x21\x36\x0e\xee\x3f\x42\xf7\xec\x44\
-\x74\x01\x02\x00\xa7\xc9\x36\xb4\x6d\x27\xc0\x13\xab\x40\xb9\xcd\
-\x30\xec\xd4\x01\x06\x02\x35\x67\x47\x4a\xc6\xf1\x31\x17\x60\xa7\
-\x6d\x49\x82\x70\x29\x62\x02\xb0\xca\xbc\x6d\xbe\xe9\x55\xba\xc1\
-\xdb\xd5\x35\xd2\xab\x97\xc2\x33\xc1\xbd\x02\x34\x89\x48\xa6\xd1\
-\x06\xd4\xe1\x2e\x47\x42\x57\xe7\xd6\x6a\x54\x4e\x37\x12\x38\x3d\
-\xc7\xc1\x76\x3a\x43\xff\x6c\x64\xd4\xcf\x1c\x58\xbc\xf7\x9b\x8e\
-\x41\x75\xfe\xed\x36\xcd\xae\x6e\xdf\x16\x1c\x31\x7d\x2e\x67\xe2\
-\xe5\x76\x0b\xdb\xaf\xa4\x47\x8a\xd6\x95\xb9\xa5\xf5\x13\x93\x57\
-\xc3\xc4\xba\x26\xf0\xaa\x9d\xe3\x37\x93\xb5\x08\xce\x90\xb7\xe1\
-\x7c\xd4\x81\xfb\xf0\x3e\x2e\x43\x16\x6e\xe6\x29\xaf\xb1\x8d\xcb\
-\xa7\x4f\x11\xfa\x35\x59\xd1\xd0\x19\xda\xa7\x5d\x6e\x33\xbc\xa9\
-\x5c\x09\x54\x34\x8c\xdc\xe4\x5d\xa0\xf7\xc7\xab\x12\xa7\x3d\x5b\
-\xcb\xae\xe3\x55\x89\xb0\xe8\x68\xe5\x84\x6e\x7b\x95\xf1\x29\x29\
-\xe9\xd5\x7f\xfc\x37\x92\xdb\xaf\x76\x1d\x21\x99\xf6\x34\xc9\x08\
-\x62\x62\x0a\x7a\xb4\xb1\x30\x6f\x61\x4a\x07\xdc\x73\x1c\x09\xc8\
-\xa2\x69\x34\x63\x5b\x1d\x38\x4d\xef\xa9\xcc\xad\x26\xc6\xb7\xe9\
-\x5a\x3e\x35\x95\xeb\xec\x63\x42\xcd\x94\xac\xce\x41\xe7\x39\x8e\
-\xa4\x63\xcb\x7c\xe7\x27\x26\xaf\x05\x07\x28\xff\xcc\xee\xb0\x2f\
-\x12\xe7\x4d\xe0\x35\x1d\x17\xd2\xaf\x99\x7d\x87\xb9\xdb\xc7\x74\
-\x36\x13\x49\x3d\x6f\x5f\xbe\x07\x92\x7a\x9f\xe1\xa3\xcb\xfa\x5c\
-\xcf\x2d\xc9\x1b\x95\x4d\x5e\x20\xcd\xeb\xe3\xef\xfa\x1e\xb6\x6c\
-\xfc\xaf\x7c\x89\x27\xbb\x94\x45\xce\xc6\xd3\x8d\x27\x01\x97\xc0\
-\x36\xec\x2c\xf7\xf4\xf3\x78\x55\x8a\xf7\x52\x77\x63\xf4\x1f\x9b\
-\xc0\x4d\xfb\x2f\x9c\x21\x7e\xfb\xd5\xaf\xa5\xf9\x14\x1c\xc8\xa6\
-\x89\xf2\xb3\xa4\x4e\xfa\x99\x34\xc7\x7e\x52\xb6\x57\x3b\x70\xc7\
-\x3f\xf5\x28\xa3\x5e\xc0\xe9\x74\x23\xf5\x2e\xd3\x55\x90\xe8\xc0\
-\xcb\x53\x13\xb9\xe1\xa8\x1a\x80\x87\x5c\x6f\x9c\xe9\x8b\x79\xa9\
-\xcd\xf1\x6d\xbb\x68\x54\x23\x8e\x83\x92\xfc\xc4\xc4\xc4\x7d\xec\
-\xb6\x25\xd7\x1b\xe5\x53\xa8\xbf\xab\xca\x42\x2d\x78\x75\xe7\xc4\
-\x24\x73\x86\x51\x84\x37\x3f\x2c\xf1\xcd\x2b\x07\xd3\x69\x82\x22\
-\x5f\x8a\xea\x8e\x7a\x0e\x78\x25\x6a\x1a\x89\xb5\xd7\xb7\x77\x28\
-\x72\x17\x45\xbe\x84\x43\x21\x6d\xf2\x13\x13\x40\xa7\xc1\x4e\x4c\
-\x8b\x75\x0a\x80\x9f\x58\xc5\x4e\x3b\x37\xa0\x27\xe0\x11\x8b\x1b\
-\x83\x26\x49\xbc\x97\x2b\xac\x3e\x17\x92\xe6\xe6\x46\x04\x39\xc8\
-\x33\xc1\xdb\x38\x71\x16\x1e\xd9\x9e\x08\x66\x94\x83\x18\xb3\x64\
-\x06\x07\xcd\x4c\xe5\x23\xb4\x30\xf7\x04\x78\x8e\x83\xc5\xed\x04\
-\x9e\xe3\x48\xae\x32\xea\xef\xa6\x7a\x1b\x54\xef\x01\xe5\x14\xd0\
-\xfe\xee\xee\xae\x85\x5f\xd4\x54\x2f\xf7\x31\x52\x47\xc7\xc2\x6a\
-\x6f\x0d\x2e\x21\xd4\xe8\x1b\x4f\xbf\x24\x16\xa6\x8b\x83\x00\x4c\
-\x2e\xb7\xe5\x76\x2b\x19\x81\x3c\xeb\x4d\x07\x50\xb5\x7b\x3c\xfd\
-\x51\x47\x20\x7e\xec\x6e\xcb\x14\x9d\x41\x0f\x0f\x7b\x05\xfc\x4e\
-\x17\xae\xef\x89\xea\x8e\x4d\xe8\x8a\x2a\x90\x4d\xe8\x8a\xfc\xe3\
-\x9a\x85\x8b\x66\x9e\xdd\x52\x61\xe2\x44\x49\x1a\x67\xaf\x87\x9d\
-\xa5\xc4\xca\xa9\xbb\xc1\x30\xeb\x4a\xa0\xa7\x6d\xc2\xa2\x23\x19\
-\x89\x7c\x5f\xd3\x8d\x07\xc4\x89\x00\x2c\xdf\xaf\x90\x2f\xcd\xb6\
-\x54\x9f\xf7\xf5\x8b\x97\xcd\x60\xee\x70\x2f\x5a\xc6\x17\x5e\xb5\
-\x6c\xcf\x13\x91\x04\xcf\x7b\x1a\xb7\x2d\x9c\x39\x97\xdb\x2d\x86\
-\xdd\x81\x30\xe2\x74\x8d\xab\xd5\xb4\x47\xee\xfe\xe2\x21\x5e\xd5\
-\xc3\xa0\xba\xca\x78\x9e\x6e\x9b\xdc\xd1\x31\x35\xff\x0e\x04\x42\
-\xd5\xe8\x35\x95\xdc\x7b\x8e\x03\xdb\xaf\xa4\x80\x07\xb9\xd5\x82\
-\xd0\x16\xc1\x11\x62\xe1\x2a\xb4\xe0\xa4\xb2\x8c\x30\x75\x16\xd2\
-\x1d\x6f\x6e\x10\xf2\xf7\x29\xf4\x3c\x9f\x6d\xb1\xcd\x3d\x89\x89\
-\xa9\x8e\x52\xf5\x19\xd7\x4c\xec\xa2\xf0\x7b\x58\xa1\xaa\x99\x98\
-\xc0\x35\xdd\x78\x78\x68\x25\xe0\xaf\x09\x58\xc3\xce\x52\x7a\x44\
-\x5c\x77\xc9\x89\xf3\x44\xda\x86\xdc\x62\x61\xd1\xc1\xb0\xb3\xac\
-\x7d\xbd\xcd\xb6\xc4\xb0\x62\x7d\x12\xe3\xb4\x67\xcb\xc0\x0f\xd6\
-\xe2\xf9\xfa\xf5\x02\xe9\xd5\x4b\x6c\x42\xb7\x9e\x13\xcd\x0e\x1e\
-\x6f\x88\x0d\xd4\x15\x0c\x43\xbb\xc2\x30\x6b\xa2\x4f\x4d\x17\x9f\
-\x0f\x49\x75\xf0\xd6\x46\x27\x9b\x9f\x60\x95\xd1\x78\x78\x5b\x6d\
-\x72\xa2\x73\xfc\x4f\xd7\x73\xb1\x4f\x62\x61\x9d\xaf\xf7\xa4\xe9\
-\x58\xa9\xfa\x94\x55\xc0\x91\x67\x86\x03\xfa\x90\x71\xa7\xcb\x6d\
-\xa0\xd7\x64\xc8\x91\x06\xe6\x79\x14\xdc\x77\x4c\xdb\x02\xc0\x26\
-\x8a\x85\x37\x42\x0d\x7a\x98\xc2\xee\xf7\xb0\x33\x04\x79\x5e\x8a\
-\x64\xc0\xe3\x05\x96\x18\xa3\xc2\x04\xd1\xb8\xc0\x93\xc1\x02\x71\
-\x1c\xd6\x4c\x3c\xdf\x7d\xf7\x7c\xba\x82\xb3\x7a\x25\xd8\xb8\xd3\
-\x74\x8c\x92\x34\xf1\xb0\xb3\xc4\x0f\x55\x2c\x58\x31\xce\x77\x80\
-\xae\x57\xb0\xc7\x86\x31\x13\x3f\x16\xeb\x38\xab\xbe\xa9\x5c\x20\
-\x89\x05\xa8\xa7\x1b\x0f\x48\x62\x90\x3b\x2f\xeb\x9e\x88\xfd\xa5\
-\x8b\x40\x7c\xe6\xb0\xb3\xac\x2f\x06\x27\xd8\x95\xab\xa4\x85\xf9\
-\xb6\xfa\x61\x04\x60\x2a\x45\x75\x48\x62\xf0\x4e\x3e\xba\xe2\x51\
-\xf5\x64\xab\xc6\x0a\x9f\x67\xa1\x03\xa0\x3a\x70\x85\x77\xa4\xe7\
-\xda\xd5\x94\x3e\xc9\x3f\xbb\xad\x9e\x8d\xbe\xab\x3b\xb0\xb5\x17\
-\x98\x2e\x24\xdd\xa6\x45\xa9\x7e\x8e\x7a\xae\x99\x32\xdd\x4c\x59\
-\x6c\xc7\x32\x30\x65\xb4\xd1\xfe\x74\xc3\x1a\x01\x20\x9d\x00\xeb\
-\xdb\x3b\x3c\xff\xb0\x5b\x77\xb3\x5d\xd6\xe3\x31\x06\x95\xe8\x38\
-\x5f\xdd\xdd\x4a\x6c\x4c\xe7\x37\x28\x4f\x60\x13\x58\xab\xd9\x5a\
-\x32\xe4\xac\xea\x3e\x86\x9d\x65\xbd\x3e\x89\xa5\x6d\xb8\x8c\xa8\
-\x66\x6b\xa1\x9b\xf9\x73\xa1\xaf\x1b\x96\xe6\xff\x43\x7a\xba\xdc\
-\x66\x98\x06\xeb\x5a\x27\x33\xd9\xb1\x4a\x37\x42\x0f\xab\xbd\x1f\
-\x82\x7e\x47\x00\x75\x75\x6f\xe7\x8f\xa5\x64\x77\x0a\x35\xeb\xe6\
-\x7c\xa8\xc6\x12\x3f\xe0\x6a\xc0\xc3\x04\x5c\x93\x1b\x8c\x33\xa6\
-\xee\x7d\xce\xda\xc7\x74\xb1\xe4\xdf\x55\xd5\xe3\x6d\x81\x91\x43\
-\x2e\xb7\xdc\x2f\xf7\x0a\x43\xb9\xeb\x4d\x8d\xf2\x05\x96\x5c\x37\
-\xa7\x76\xea\xa7\x7e\x77\x6a\xdf\x09\x7e\x81\xa8\x13\xaf\x7a\x6e\
-\x80\xb3\x51\x84\xce\xa0\x07\xcb\xbe\xc4\xf5\xba\x10\x59\x6c\x6f\
-\xe6\x7d\x9c\x3b\x1e\x36\x93\xb5\x48\x8e\x9f\xbb\x7d\x5c\x2f\x2a\
-\x91\x14\x0f\x00\x61\x3f\x93\x99\x78\xd8\x59\x0a\x56\x15\x60\x66\
-\x8c\x8b\x38\x91\xb6\x91\xc0\x1e\x75\x85\xac\x48\xfc\x58\x68\x5d\
-\xa1\x79\xe3\x64\xef\x7f\x54\x23\xb2\xdc\x66\x62\xbb\xd3\x9e\x8d\
-\xe5\x2a\x11\x7a\x58\x5d\x28\x4b\x0d\x80\x68\x41\x35\x2d\x2d\x94\
-\xc5\x7b\x6d\x29\xd2\xa1\x72\x1d\xdd\x49\xe4\x27\xf3\x10\xe0\x38\
-\x33\xf2\x7e\x0d\xa6\x6d\x0f\x75\x83\xd7\x7d\x66\xdb\x76\x1f\xb3\
-\x88\x64\xf8\x06\x98\xdc\x73\x91\xfb\x25\xfc\xdc\xde\x63\xe4\xa1\
-\xfb\xc9\x9e\xf1\xa6\x16\x26\x70\x03\xd8\x14\x45\xa4\xa1\x3c\x6e\
-\xee\xe1\xee\xee\x1a\x5b\x44\x78\x38\xaa\x5b\x53\x3d\xe8\xd6\xb9\
-\x13\xe3\xe5\x5b\x3c\xe8\x7c\x03\xb8\x97\x75\xd4\xae\x09\x74\x6c\
-\xc7\xff\xb7\xb7\x4f\x92\x13\x41\x79\x02\xdb\x8a\xba\x98\x6e\x3c\
-\xc4\x79\xb2\x0f\xe6\x38\x01\xbd\x2f\x69\x60\x0e\x76\x26\x2b\x88\
-\xd5\x25\x0d\xdd\x6c\xab\xfa\x9e\xd5\x85\x1b\x8f\xdb\xec\x7a\xcf\
-\x23\x41\x57\x31\x01\x95\x06\x25\x72\x0d\x4c\x2c\xbc\x45\xf4\xd1\
-\x27\x98\x37\x0d\x51\x83\x15\x6d\xfd\x21\xda\xc0\xac\xbb\x05\x9b\
-\x52\x37\x75\xb9\x16\x6d\x6e\xbc\x63\xbd\x18\x5a\x49\x51\x05\x70\
-\xcb\x99\x30\xe6\x72\x7f\xe7\xbe\xb3\x82\x54\x7c\x9f\x2c\x2d\x31\
-\x99\x4d\x8c\x95\xd3\x04\x4c\x7a\xce\xbd\x32\xfc\x58\xf1\xc1\xf0\
-\x94\x3b\x31\x72\x00\x7f\xd8\x83\x1f\x37\xc7\xaa\x61\xe2\xeb\xcd\
-\x4f\x10\x14\x57\x52\xd8\x79\xd3\x74\x42\x27\xfd\x4c\x72\xd1\xcd\
-\x57\x75\x16\x1b\x81\x31\xf1\x63\x09\x98\x56\xd4\x05\x92\x58\x0b\
-\x56\xf1\x3e\x03\x28\x67\x65\x6e\x1c\x56\xb3\xb5\xb4\x6f\xba\x10\
-\x54\xc6\xa6\xf5\x81\xdf\xc3\x8b\xcd\x4f\x91\x5e\xbd\x14\x09\xd5\
-\xf4\xe3\x79\x13\x14\x6a\x88\x4d\xae\x35\xce\xc2\x6a\x05\xf2\x31\
-\x27\x5f\x95\x13\x3a\xad\xa9\xb2\x3a\x4f\xb9\x34\x4d\x33\x32\x25\
-\xfb\xa8\x6c\x7b\xc8\x07\x7c\x28\xa0\xa2\x3e\xaa\x1d\x83\xd4\x8b\
-\x64\x13\xc5\x52\xa9\x3e\x00\xb8\xe5\x0c\xcf\xce\x9f\xe0\xcf\xfe\
-\xe6\x8f\xf1\x57\x7f\xfe\xb7\x78\xf6\xd9\x97\x58\xa0\xc2\x64\x36\
-\x91\x59\xb0\x39\x2f\x9b\x66\x3a\xec\x26\x74\xb5\xd3\x92\xd4\x7e\
-\x74\x52\x0e\x45\x08\x5c\x3e\x7d\x8a\xfb\x71\x1d\x4e\x06\x80\x59\
-\xf1\x19\x46\xe3\xe7\xc8\x70\x87\xce\xa8\xdb\x64\x10\xb1\xd6\x01\
-\xf8\x0c\x1e\x4e\x51\xf8\x3d\x0c\xed\xb1\x38\xd7\x76\xe2\xc7\x12\
-\xc3\x72\x46\xad\xac\xf7\x42\x22\x70\x30\x73\xff\xb1\xca\xc2\x56\
-\xd4\x15\x4c\xfc\xc4\x2a\x60\x45\x5d\xf1\xa8\x03\x3f\xbf\x28\xaa\
-\xd9\x1a\xa9\x13\xe0\xd3\xd9\x4b\xc1\xc4\xbc\x13\x4f\x14\x47\xa2\
-\x97\x30\x67\x61\xf2\x0d\xeb\x0e\xde\xa1\x5b\xab\x89\x05\x8f\xd1\
-\xc2\xdc\xd0\x3a\xc4\xfc\x87\x7a\x4d\xa8\xdf\xe1\x50\x51\xa9\xe9\
-\xbb\xea\xa6\x37\xa9\xfb\x26\xd9\xc0\x8d\x37\x4a\x8c\xbf\xff\x78\
-\x88\xbf\xff\xbd\x2f\xf1\x77\xff\xf8\x17\xf8\xcb\x5f\xfc\x09\x7e\
-\xf6\xa7\xff\x00\xfb\x49\x2c\x7d\x26\x75\xf3\x21\x37\x58\x5c\xd5\
-\xf3\x38\xa8\x6b\xa8\xea\x37\xe6\xcf\xe9\x7c\xde\x8f\x87\xb0\x51\
-\x4f\x0a\x0d\x47\x17\xf5\x36\xc9\x7f\xe1\xf5\xb2\xbb\xbb\x58\x9a\
-\x69\xb4\x3c\xf1\x68\x89\x31\xdc\x7c\x85\x69\xb9\xcb\x66\xb3\xe3\
-\x3c\x41\xe2\xc7\xd8\x66\xd7\x20\x40\xab\x8f\xfc\x56\xcf\x19\x95\
-\x18\x94\xc0\x4b\x86\xdc\x6d\x92\xe0\xdd\xed\x18\xf3\x6c\x81\xb0\
-\xe8\xe0\xa4\x77\x82\x6a\xb6\xc6\xbb\xe7\xaf\x50\xcd\xd6\x38\xef\
-\x9f\xc1\x19\x8d\xa4\x30\x36\xff\x0c\xee\x99\xa0\x36\xaa\xd6\xc0\
-\x92\x7c\xc2\x94\x27\x51\x0e\x62\xa9\x31\xb6\xea\x4b\xd6\x25\xed\
-\x10\x00\x45\xb7\x74\xc7\x39\xe8\xb3\x35\xe9\x5c\x75\x3d\x1f\x35\
-\xdb\xa6\x5f\x0f\x31\xf1\x31\x3d\x29\xd4\x46\x31\x3c\x22\x48\x39\
-\x17\x6d\xee\x3b\x49\x62\x04\xb5\x3f\xf9\xe1\xe8\x1c\xdd\x2f\xde\
-\x62\xf4\x49\x81\x3f\xf8\xf2\x8f\xf0\xf3\x5f\x7c\x81\xcb\x67\x7f\
-\x2d\xa2\x98\xab\x22\xdb\xeb\x16\x9a\x58\x95\x54\xa1\x4c\x2c\xad\
-\x66\xaf\xd1\x7a\xf2\x04\x95\xf8\xac\x66\xe0\xef\xd6\x78\xbb\x75\
-\x45\x7f\x35\xee\x52\xe5\x7e\x66\x11\x17\xa8\x0a\x8c\xec\x4a\xcc\
-\xb1\x73\x09\xa8\x63\xc3\x8f\x13\xc6\x9a\x06\xe0\xdb\xec\x1a\x56\
-\x1c\x23\x9e\x25\xb8\xad\x96\x38\x8b\x81\x69\x00\xfc\xe7\x2f\x57\
-\xf8\xfa\xdf\xfe\x19\x0f\x1e\xd4\xc2\xbd\x73\xd1\xc3\xe6\xdd\xae\
-\x3d\xe7\xa3\x1f\x79\xf8\xf4\x93\x3a\x09\xda\x7d\x10\xe3\xd3\xfe\
-\x39\x42\xab\x40\x1a\x75\x11\xbb\x8a\x5f\xd3\x09\x81\x0a\xda\x06\
-\x28\xa9\xd5\x83\x3d\x7f\x2f\xaa\x39\x26\xdb\x9d\xe1\xc7\xa7\x27\
-\x1d\x0a\x39\x93\x9c\xd0\x59\xfc\xe4\x3e\x53\xf7\x43\xfb\x56\xd7\
-\x07\x56\x86\x12\x83\xdf\xc9\xe8\x52\x0d\xa4\x43\xcf\x79\xe4\x8f\
-\x86\xb5\x8b\x01\x39\xa0\xca\x8a\x8d\xf4\x7b\xd5\x32\x25\x71\x9c\
-\xb3\x3e\x86\x91\x05\x7f\xd8\x03\x3e\x3c\x83\x5b\x14\xf0\x56\x2f\
-\xf0\xfd\xd5\x02\xb8\xfd\x55\x3d\x30\xb3\xf9\xcd\xab\x22\x03\x16\
-\x01\x3a\x00\xd0\x54\x6d\x6c\x8a\x15\x62\x58\x02\xcc\x71\xb1\xaa\
-\x47\x7e\x35\xc6\x17\xc9\x82\x78\x66\xc3\x19\x45\x78\xd0\xb4\x26\
-\xeb\x3d\x39\x87\x0b\x1f\xd1\xaf\x6a\xc9\x78\xb3\xfe\x5a\x9a\x3e\
-\x1b\x57\x96\x16\x9b\x1b\x3f\x87\x9b\x03\x98\x5b\x70\xd7\xaf\x17\
-\x18\x9f\x2d\x85\x41\x35\x06\x80\x6c\x29\x1e\x01\xe0\xdd\x6d\x08\
-\xf7\xcc\xf0\xde\xb7\x5b\xb8\xcd\xff\xdf\x26\x09\xbe\xbf\xba\xc2\
-\xbf\xfe\xcb\x3f\xc9\x9f\x78\x0d\x54\xa7\x7d\x5c\x6c\x17\x58\x2f\
-\x6f\xf0\xdd\x04\xf8\xee\xb7\xff\x2e\xde\xfe\xf1\xb3\xc7\x78\xfa\
-\xf9\x1f\xe2\xfe\xc3\x07\x58\x84\x13\x49\x73\xf6\xc3\x11\x46\x0d\
-\x4e\x46\xb6\x27\x98\x38\x5d\xf4\x10\x56\x2b\xc0\x89\x30\x99\x5a\
-\x70\x06\x89\x18\x0d\xe9\xe6\x1e\x0a\xec\x2a\x2c\x3e\x66\x0c\x80\
-\xae\x2f\x9a\xee\x42\xe0\x51\x32\xbe\xaf\xf2\x40\x5b\x2b\xb3\xc6\
-\xcd\x8c\xc6\x5c\x5b\x11\x29\x00\x9c\xc6\x31\x12\xab\xc2\x69\x15\
-\x8b\xdb\xfc\xc6\x8a\x80\xb4\x10\xc0\xad\x13\x78\x02\xac\xb1\xd8\
-\xab\x50\xf6\x1c\xa7\xc9\xfa\xab\xf0\xfc\x37\x2f\x90\x4f\x57\x78\
-\xb7\x04\xae\xaf\x6f\x90\x2e\x96\x78\xff\xfd\x35\x2c\x00\xc3\xa1\
-\xdc\x44\xe5\x34\x8e\xa5\xe4\xf5\xd8\x1d\xd4\x53\x8f\x00\xc4\x8b\
-\x7a\x02\x52\xbc\x00\xb2\xd1\x9d\x28\xf8\xcc\x46\x77\x08\xfb\x11\
-\x82\xfb\x8f\x50\x7a\x17\xb8\xd7\xe9\x22\x0f\xa2\xba\x17\xdb\xb7\
-\xdf\xd4\xd2\xc4\xbd\xc4\xa6\x77\x85\x78\x01\xc0\x3d\x81\x13\xcf\
-\xf0\x70\x74\x8e\xd2\xbb\x80\x87\x53\x78\x16\x50\x34\x8c\x8c\x41\
-\x85\xff\x07\x5b\x53\xe4\xea\xf5\xd8\xe3\x94\x00\x00\x00\x00\x49\
-\x45\x4e\x44\xae\x42\x60\x82\
-"""
-
-qt_resource_name = b"""\
-\x00\x09\
-\x06\xa8\xaa\x74\
-\x00\x71\
-\x00\x75\x00\x6f\x00\x74\x00\x65\x00\x2e\x00\x74\x00\x78\x00\x74\
-\x00\x0a\
-\x07\x2b\x67\xc7\
-\x00\x73\
-\x00\x61\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
-"""
-
-qt_resource_struct = b"""\
-\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\
-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
-\x00\x00\x00\x18\x00\x00\x00\x00\x00\x01\x00\x00\x00\x39\
-"""
-
-def qInitResources():
- QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-def qCleanupResources():
- QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
-
-qInitResources()
diff --git a/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py b/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py
deleted file mode 100644
index 2d208cb69..000000000
--- a/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer
-
-
-class SetPropOnCtorTest(unittest.TestCase):
- def testIt(self):
- timer = QTimer(interval = 42)
- self.assertEqual(timer.interval(), 42);
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/snake_prop_feature_test.py b/sources/pyside2/tests/QtCore/snake_prop_feature_test.py
deleted file mode 100644
index b53a1f0a5..000000000
--- a/sources/pyside2/tests/QtCore/snake_prop_feature_test.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-from PySide2.support import __feature__
-
-"""
-snake_prop_feature_test.py
---------------------------
-
-Test the snake_case and true_property feature.
-
-This works now, including class properties.
-"""
-
-class Window(QtWidgets.QWidget):
- def __init__(self):
- super(Window, self).__init__()
-
-
-class FeatureTest(unittest.TestCase):
- def setUp(self):
- qApp or QtWidgets.QApplication()
- __feature__.set_selection(0)
-
- def tearDown(self):
- __feature__.set_selection(0)
- qApp.shutdown()
-
- def testRenamedFunctions(self):
- window = Window()
- window.setWindowTitle('camelCase')
-
- # and now the same with snake_case enabled
- from __feature__ import snake_case
-
- # Works with the same window! window = Window()
- window.set_window_title('snake_case')
-
- def testPropertyAppearVanish(self):
- window = Window()
-
- self.assertTrue(callable(window.isModal))
- with self.assertRaises(AttributeError):
- window.modal
-
- from __feature__ import snake_case, true_property
-
- self.assertTrue(isinstance(QtWidgets.QWidget.modal, property))
- self.assertTrue(isinstance(window.modal, bool))
- with self.assertRaises(AttributeError):
- window.isModal
-
- # switching back
- __feature__.set_selection(0)
-
- self.assertTrue(callable(window.isModal))
- with self.assertRaises(AttributeError):
- window.modal
-
- def testClassProperty(self):
- from __feature__ import snake_case, true_property
- # We check the class...
- self.assertEqual(type(QtWidgets.QApplication.quit_on_last_window_closed), bool)
- x = QtWidgets.QApplication.quit_on_last_window_closed
- QtWidgets.QApplication.quit_on_last_window_closed = not x
- self.assertEqual(QtWidgets.QApplication.quit_on_last_window_closed, not x)
- # ... and now the instance.
- self.assertEqual(type(qApp.quit_on_last_window_closed), bool)
- x = qApp.quit_on_last_window_closed
- qApp.quit_on_last_window_closed = not x
- self.assertEqual(qApp.quit_on_last_window_closed, not x)
- # make sure values are equal
- self.assertEqual(qApp.quit_on_last_window_closed,
- QtWidgets.QApplication.quit_on_last_window_closed)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/staticMetaObject_test.py b/sources/pyside2/tests/QtCore/staticMetaObject_test.py
deleted file mode 100644
index bb5c5d189..000000000
--- a/sources/pyside2/tests/QtCore/staticMetaObject_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Slot, QMetaObject
-
-class MyObject(QObject):
- @Slot(int, str)
- def slot1(self, a, b):
- pass
-
-class testAttribute(unittest.TestCase):
- def testBug896(self):
- mo = MyObject.staticMetaObject
- self.assertTrue(isinstance(mo, QMetaObject))
- self.assertEqual(mo.className(), 'MyObject')
- self.assertTrue(mo.indexOfSlot('slot1(int,QString)') > -1)
-
- def testDuplicateSlot(self):
- mo = MyObject.staticMetaObject
- self.assertEqual(mo.indexOfSignal('destroyed(void)'), -1)
- self.assertTrue(mo.indexOfSignal('destroyed()') > -1)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/static_method_test.py b/sources/pyside2/tests/QtCore/static_method_test.py
deleted file mode 100644
index e3a7e1798..000000000
--- a/sources/pyside2/tests/QtCore/static_method_test.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for overloads involving static and non-static versions of a method.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QFile
-
-class StaticNonStaticMethodsTest(unittest.TestCase):
- '''Test cases for overloads involving static and non-static versions of a method.'''
-
- def setUp(self):
- filename = 'somefile%d.txt' % os.getpid()
- self.existing_filename = os.path.join(os.path.curdir, filename)
- self.delete_file = False
- if not os.path.exists(self.existing_filename):
- f = open(self.existing_filename, 'w')
- for line in range(10):
- f.write('sbrubbles\n')
- f.close()
- self.delete_file = True
-
- self.non_existing_filename = os.path.join(os.path.curdir, 'inexistingfile.txt')
- i = 0
- while os.path.exists(self.non_existing_filename):
- i += 1
- filename = 'inexistingfile-%d.txt' % i
- self.non_existing_filename = os.path.join(os.path.curdir, filename)
-
- def tearDown(self):
- if self.delete_file:
- os.remove(self.existing_filename)
-
- def testCallingStaticMethodWithClass(self):
- '''Call static method using class.'''
- self.assertTrue(QFile.exists(self.existing_filename))
- self.assertFalse(QFile.exists(self.non_existing_filename))
-
- def testCallingStaticMethodWithInstance(self):
- '''Call static method using instance of class.'''
- f = QFile(self.non_existing_filename)
- self.assertTrue(f.exists(self.existing_filename))
- self.assertFalse(f.exists(self.non_existing_filename))
-
- def testCallingInstanceMethod(self):
- '''Call instance method.'''
- f1 = QFile(self.non_existing_filename)
- self.assertFalse(f1.exists())
- f2 = QFile(self.existing_filename)
- self.assertTrue(f2.exists())
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/thread_signals_test.py b/sources/pyside2/tests/QtCore/thread_signals_test.py
deleted file mode 100644
index 61cbcc53f..000000000
--- a/sources/pyside2/tests/QtCore/thread_signals_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for QObject.signalsBlocked() and blockSignal()'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, QFile, QThread, QTimer, Qt
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class MyThread(QThread):
-
- def run(self):
- self.emit(SIGNAL("test(const QString&)"), "INdT - PySide");
-
-class TestThreadSignal(UsesQCoreApplication):
-
- __called__ = True
- def _callback(self, msg):
- self.assertEqual(msg, "INdT - PySide")
- self.__called__ = True
- self.app.quit()
-
- def testThread(self):
- t = MyThread()
- QObject.connect(t, SIGNAL("test(const QString&)"), self._callback);
- t.start()
-
- self.app.exec_()
- t.wait()
- self.assertTrue(self.__called__);
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/tr_noop_test.py b/sources/pyside2/tests/QtCore/tr_noop_test.py
deleted file mode 100644
index 369db9fc9..000000000
--- a/sources/pyside2/tests/QtCore/tr_noop_test.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QT_TR_NOOP, QT_TR_NOOP_UTF8
-from PySide2.QtCore import QT_TRANSLATE_NOOP, QT_TRANSLATE_NOOP3, QT_TRANSLATE_NOOP_UTF8
-
-class QtTrNoopTest(unittest.TestCase):
-
- def setUp(self):
- self.txt = 'Cthulhu fhtag!'
-
- def tearDown(self):
- del self.txt
-
- def testQtTrNoop(self):
- refcnt = sys.getrefcount(self.txt)
- result = QT_TR_NOOP(self.txt)
- self.assertEqual(result, self.txt)
- self.assertEqual(sys.getrefcount(result), refcnt + 1)
-
- def testQtTrNoopUtf8(self):
- refcnt = sys.getrefcount(self.txt)
- result = QT_TR_NOOP_UTF8(self.txt)
- self.assertEqual(result, self.txt)
- self.assertEqual(sys.getrefcount(result), refcnt + 1)
-
- def testQtTranslateNoop(self):
- refcnt = sys.getrefcount(self.txt)
- result = QT_TRANSLATE_NOOP(None, self.txt)
- self.assertEqual(result, self.txt)
- self.assertEqual(sys.getrefcount(result), refcnt + 1)
-
- def testQtTranslateNoopUtf8(self):
- refcnt = sys.getrefcount(self.txt)
- result = QT_TRANSLATE_NOOP_UTF8(self.txt)
- self.assertEqual(result, self.txt)
- self.assertEqual(sys.getrefcount(result), refcnt + 1)
-
- def testQtTranslateNoop3(self):
- refcnt = sys.getrefcount(self.txt)
- result = QT_TRANSLATE_NOOP3(None, self.txt, None)
- self.assertEqual(result, self.txt)
- self.assertEqual(sys.getrefcount(result), refcnt + 1)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/translation_test.py b/sources/pyside2/tests/QtCore/translation_test.py
deleted file mode 100644
index beca3a717..000000000
--- a/sources/pyside2/tests/QtCore/translation_test.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests to test QTranslator and translation in general.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTranslator, QCoreApplication
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class TranslationTest(UsesQCoreApplication):
- '''Test case for Qt translation facilities.'''
-
- def setUp(self):
- super(TranslationTest, self).setUp()
- self.trdir = os.path.join(os.path.dirname(__file__), 'translations')
-
- def testLatin(self):
- #Set string value to Latin
- translator = QTranslator()
- translator.load(os.path.join(self.trdir, 'trans_latin.qm'))
- self.app.installTranslator(translator)
-
- obj = QObject()
- obj.setObjectName(obj.tr('Hello World!'))
- self.assertEqual(obj.objectName(), 'Orbis, te saluto!')
-
- def testRussian(self):
- #Set string value to Russian
- translator = QTranslator()
- translator.load(os.path.join(self.trdir, 'trans_russian.qm'))
- self.app.installTranslator(translator)
-
- obj = QObject()
- obj.setObjectName(obj.tr('Hello World!'))
- self.assertEqual(obj.objectName(), 'привет мир!')
-
- def testUtf8(self):
- translator = QTranslator()
- translator.load(os.path.join(self.trdir, 'trans_russian.qm'))
- self.app.installTranslator(translator)
-
- obj = QObject()
- obj.setObjectName(obj.tr('Hello World!'))
- self.assertEqual(obj.objectName(), 'привет мир!')
-
- def testTranslateWithNoneDisambiguation(self):
- value = 'String here'
- obj = QCoreApplication.translate('context', value, None)
- self.assertTrue(isinstance(obj, str))
- self.assertEqual(obj, value)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/unaryoperator_test.py b/sources/pyside2/tests/QtCore/unaryoperator_test.py
deleted file mode 100644
index 2fd06cd4b..000000000
--- a/sources/pyside2/tests/QtCore/unaryoperator_test.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests the presence of unary operator __neg__ on the QPoint class'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPoint
-
-class NegUnaryOperatorTest(unittest.TestCase):
- '''Tests the presence of unary operator __neg__ on the QPoint class'''
-
- def setUp(self):
- #Acquire resources
- self.x, self.y = 10, 20
- self.neg_x, self.neg_y = -self.x, -self.y
- self.qpoint = QPoint(self.x, self.y)
-
- def tearDown(self):
- #Release resources
- del self.qpoint
- del self.x
- del self.y
- del self.neg_x
- del self.neg_y
-
- def testNegUnaryOperator(self):
- #Test __neg__ unary operator on QPoint class
- __neg__method_exists = True
- try:
- neg_qpoint = -self.qpoint
- except:
- __neg__method_exists = False
-
- self.assertTrue(__neg__method_exists)
- self.assertEqual(self.qpoint, -neg_qpoint)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/unicode_test.py b/sources/pyside2/tests/QtCore/unicode_test.py
deleted file mode 100644
index 28bbafbb0..000000000
--- a/sources/pyside2/tests/QtCore/unicode_test.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QString conversion to/from Python Unicode'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from PySide2.QtCore import QByteArray
-
-class UnicodeConversion(unittest.TestCase):
- '''Test case for QString to/from Python Unicode conversion'''
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testSetRegularStringRetrieveUnicode(self):
- #Set regular Python string retrieve unicode
- obj = QObject()
- obj.setObjectName('test')
- self.assertEqual(obj.objectName(), 'test')
-
- def testSetUnicodeRetrieveUnicode(self):
- #Set Python unicode string and retrieve unicode
- obj = QObject()
- obj.setObjectName('ümlaut')
- self.assertEqual(obj.objectName(), 'ümlaut')
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/versioninfo_test.py b/sources/pyside2/tests/QtCore/versioninfo_test.py
deleted file mode 100644
index c682dbbdc..000000000
--- a/sources/pyside2/tests/QtCore/versioninfo_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-
-class TestVersionInfo(unittest.TestCase):
- def testIt(self):
-
- v = PySide2.__version_info__
- self.assertEqual(type(v), tuple)
- self.assertEqual(len(v), 5)
- self.assertEqual(type(v[0]), int)
- self.assertEqual(type(v[1]), int)
- self.assertEqual(type(v[2]), int)
- self.assertEqual(type(v[3]), str)
- self.assertEqual(type(v[4]), str)
-
- self.assertEqual(type(PySide2.__version__), str)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py b/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py
deleted file mode 100644
index af6e5f5d5..000000000
--- a/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QtDataVisualization'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqguiapplication import UsesQGuiApplication
-from PySide2.QtCore import QTimer
-from PySide2.QtDataVisualization import QtDataVisualization
-
-def dataToBarDataRow(data):
- result = []
- for d in data:
- result.append(QtDataVisualization.QBarDataItem(d))
- return result
-
-def dataToBarDataArray(data):
- result = []
- for row in data:
- result.append(dataToBarDataRow(row))
- return result
-
-class QtDataVisualizationTestCase(UsesQGuiApplication):
- '''Tests related to QtDataVisualization'''
-
- def testBars(self):
- self.bars = QtDataVisualization.Q3DBars()
- self.columnAxis = QtDataVisualization.QCategory3DAxis()
- self.columnAxis.setTitle('Columns')
- self.columnAxis.setTitleVisible(True)
- self.columnAxis.setLabels(['Column1', 'Column2'])
-
- self.rowAxis = QtDataVisualization.QCategory3DAxis()
- self.rowAxis.setTitle('Rows')
- self.rowAxis.setTitleVisible(True)
- self.rowAxis.setLabels(['Row1', 'Row2'])
-
- self.valueAxis = QtDataVisualization.QValue3DAxis()
- self.valueAxis.setTitle('Values')
- self.valueAxis.setTitleVisible(True)
- self.valueAxis.setRange(0, 5);
-
- self.bars.setRowAxis(self.rowAxis)
- self.bars.setColumnAxis(self.columnAxis)
- self.bars.setValueAxis(self.valueAxis)
-
- self.series = QtDataVisualization.QBar3DSeries()
- self.arrayData = [[1, 2], [3, 4]]
- self.series.dataProxy().addRows(dataToBarDataArray(self.arrayData))
-
- self.bars.setPrimarySeries(self.series)
-
- self.bars.show()
- QTimer.singleShot(500, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_1091.py b/sources/pyside2/tests/QtGui/bug_1091.py
deleted file mode 100644
index 74c0000ac..000000000
--- a/sources/pyside2/tests/QtGui/bug_1091.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1091 '''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtGui
-
-class QPainterTestCase(unittest.TestCase):
- def testIt(self):
- self.assertTrue("PixmapFragment" in dir(QtGui.QPainter))
- self.assertTrue("drawPixmapFragments" in dir(QtGui.QPainter))
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_300_test.py b/sources/pyside2/tests/QtGui/bug_300_test.py
deleted file mode 100644
index d5da0a418..000000000
--- a/sources/pyside2/tests/QtGui/bug_300_test.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QModelIndex, QStringListModel
-
-
-class TestQAbstractItemModelSignals(unittest.TestCase):
- def sigCallback(self, index, r, c):
- self._called = True
-
- def testSignals(self):
- self._called = False
- m = QStringListModel()
- m.rowsAboutToBeInserted[QModelIndex,int,int].connect(self.sigCallback)
- m.insertRows(0, 3)
- self.assertTrue(self._called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_367.py b/sources/pyside2/tests/QtGui/bug_367.py
deleted file mode 100644
index 5080295bf..000000000
--- a/sources/pyside2/tests/QtGui/bug_367.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 367: http://bugs.openbossa.org/show_bug.cgi?id=367'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2 import QtCore,QtGui
-
-class BugTest(UsesQApplication):
- def testCase(self):
- model = QtGui.QStandardItemModel()
- parentItem = model.invisibleRootItem()
- for i in range(10):
- item = QtGui.QStandardItem()
- rcount = sys.getrefcount(item)
- parentItem.appendRow(item)
- self.assertEqual(rcount+1, sys.getrefcount(item))
- parentItem = item
-
- self.assertTrue(True)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_480.py b/sources/pyside2/tests/QtGui/bug_480.py
deleted file mode 100644
index 41b83e10d..000000000
--- a/sources/pyside2/tests/QtGui/bug_480.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-
-class BuggyWidget(QtWidgets.QWidget):
- def setup(self):
- self.verticalLayout = QtWidgets.QVBoxLayout(self)
- self.gridLayout = QtWidgets.QGridLayout()
- self.lbl = QtWidgets.QLabel(self)
- self.gridLayout.addWidget(self.lbl, 0, 1, 1, 1)
-
- # this cause a segfault during the ownership transfer
- self.verticalLayout.addLayout(self.gridLayout)
-
-class LayoutTransferOwnerShip(unittest.TestCase):
- def testBug(self):
- app = QtWidgets.QApplication([])
- w = BuggyWidget()
- w.setup()
- w.show()
- self.assertTrue(True)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/bug_606.py b/sources/pyside2/tests/QtGui/bug_606.py
deleted file mode 100644
index 4f2a4b46e..000000000
--- a/sources/pyside2/tests/QtGui/bug_606.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2.QtGui import QVector2D, QVector3D, QVector4D
-from PySide2.QtGui import QColor
-
-class testCases(unittest.TestCase):
- def testQVector2DToTuple(self):
- vec = QVector2D(1, 2)
- self.assertEqual((1, 2), vec.toTuple())
-
- def testQVector3DToTuple(self):
- vec = QVector3D(1, 2, 3)
- self.assertEqual((1, 2, 3), vec.toTuple())
-
- def testQVector4DToTuple(self):
- vec = QVector4D(1, 2, 3, 4)
- self.assertEqual((1, 2, 3, 4), vec.toTuple())
-
- def testQColorToTuple(self):
- c = QColor(0, 0, 255)
- c.setRgb(1, 2, 3)
- self.assertEqual((1, 2, 3, 255), c.toTuple())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_617.py b/sources/pyside2/tests/QtGui/bug_617.py
deleted file mode 100644
index 32e1fc05e..000000000
--- a/sources/pyside2/tests/QtGui/bug_617.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QEvent
-from PySide2.QtGui import QColor
-
-
-class MyEvent(QEvent):
- def __init__(self):
- QEvent.__init__(self, QEvent.Type(999))
-
-
-class Bug617(unittest.TestCase):
- def testRepr(self):
- c = QColor.fromRgb(1, 2, 3, 4)
- s = c.spec()
- self.assertEqual(repr(s), repr(QColor.Rgb))
-
- def testOutOfBounds(self):
- e = MyEvent()
- self.assertEqual(repr(e.type()), 'PySide2.QtCore.QEvent.Type(999)')
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_652.py b/sources/pyside2/tests/QtGui/bug_652.py
deleted file mode 100644
index c80709f98..000000000
--- a/sources/pyside2/tests/QtGui/bug_652.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import *
-
-class MyData(QTextBlockUserData):
- def __init__(self, data):
- QTextBlockUserData.__init__(self)
- self.data = data
-
- def getMyNiceData(self):
- return self.data
-
-class TestBug652(unittest.TestCase):
- """Segfault when using QTextBlock::setUserData due to missing ownership transfer"""
- def testIt(self):
- td = QTextDocument()
- tc = QTextCursor(td)
- tc.insertText("Hello world")
- heyHo = "hey ho!"
- tc.block().setUserData(MyData(heyHo))
- self.assertEqual(type(tc.block().userData()), MyData)
- self.assertEqual(tc.block().userData().getMyNiceData(), heyHo)
-
- del tc
- tc = QTextCursor(td)
- blk = tc.block()
- self.assertEqual(type(blk.userData()), MyData)
- self.assertEqual(blk.userData().getMyNiceData(), heyHo)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_660.py b/sources/pyside2/tests/QtGui/bug_660.py
deleted file mode 100644
index 066387498..000000000
--- a/sources/pyside2/tests/QtGui/bug_660.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QStandardItemModel, QStandardItem
-
-class MyItemModel(QStandardItemModel):
- def __init__(self,parent=None):
- super(MyItemModel,self).__init__(parent)
- self.appendRow([QStandardItem('Item 1'),])
-
- def mimeTypes(self):
- mtypes = super(MyItemModel,self).mimeTypes()
- mtypes.append('application/my-form')
- return mtypes
-
- def mimeData(self,indexes):
- self.__mimedata = super(MyItemModel,self).mimeData(indexes)
- self.__mimedata.setData('application/my-form',bytes('hi', "UTF-8"))
- return self.__mimedata
-
-class TestBug660(unittest.TestCase):
- '''QMimeData type deleted prematurely when overriding mime-type in QStandardItemModel drag and drop'''
- def testIt(self):
- model = MyItemModel()
- model.mimeData([model.index(0, 0)]) # if it doesn't raise an exception it's all right!
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_716.py b/sources/pyside2/tests/QtGui/bug_716.py
deleted file mode 100644
index d68b11d0e..000000000
--- a/sources/pyside2/tests/QtGui/bug_716.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import Qt, QPersistentModelIndex, QStringListModel
-
-if __name__ == '__main__':
- stringListModel = QStringListModel(['one', 'two'])
- idx = stringListModel.index(1, 0)
- persistentModelIndex = QPersistentModelIndex(idx)
- stringListModel.data(persistentModelIndex, Qt.DisplayRole)
-
diff --git a/sources/pyside2/tests/QtGui/bug_740.py b/sources/pyside2/tests/QtGui/bug_740.py
deleted file mode 100644
index 456749eaa..000000000
--- a/sources/pyside2/tests/QtGui/bug_740.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QSize
-from PySide2.QtGui import QBitmap, QImage
-
-class TestQBitmap(UsesQApplication):
- def testFromDataMethod(self):
- dataBits = bytes('\x38\x28\x38\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\xfe\xfe\x7c\x7c\x38\x38\x10\x10', "UTF-8")
- bim = QBitmap.fromData(QSize(8, 48), dataBits, QImage.Format_Mono) # missing function
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_743.py b/sources/pyside2/tests/QtGui/bug_743.py
deleted file mode 100644
index 2ad0a0612..000000000
--- a/sources/pyside2/tests/QtGui/bug_743.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QMatrix4x4
-
-class TestQMatrix(unittest.TestCase):
- def testOperator(self):
- m = QMatrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
- v = 1
- for x in range(4):
- for y in range(4):
- self.assertEqual(m[x,y], v)
- v += 1
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_991.py b/sources/pyside2/tests/QtGui/bug_991.py
deleted file mode 100644
index 1af304a27..000000000
--- a/sources/pyside2/tests/QtGui/bug_991.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from PySide2.QtGui import QPen, QBrush
-
-class TestBug991 (unittest.TestCase):
- def testReprFunction(self):
- reprPen = repr(QPen())
- self.assertTrue(reprPen.startswith("<PySide2.QtGui.QPen"))
- reprBrush = repr(QBrush())
- self.assertTrue(reprBrush.startswith("<PySide2.QtGui.QBrush"))
- reprObject = repr(QObject())
- self.assertTrue(reprObject.startswith("<PySide2.QtCore.QObject"))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py b/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py
deleted file mode 100644
index f050008a7..000000000
--- a/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for PYSIDE-344, imul/idiv are used instead of mul/div, modifying the argument passed in'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-
-def testList():
- return [QPoint(10, 10), QPointF(1, 1), QSize(10, 10), QSizeF(1, 1),
- QMargins(10, 10, 10, 10),
- QTransform(), QMatrix4x4(),
- QVector2D(1, 1), QVector3D(1, 1, 1), QVector4D(1, 1, 1, 1),
- QQuaternion(1, 1, 1, 1)]
-
-class TestMulDiv(unittest.TestCase):
-
- def testMultiplication(self):
- fails = ''
- for a in testList():
- mul = (a * 2)
- if a == mul:
- fails += ' ' + type(a).__name__
- self.assertEqual(fails, '')
-
- def testDivision(self):
- fails = ''
- for a in testList():
- div = (a * 2)
- if a == div:
- fails += ' ' + type(a).__name__
- self.assertEqual(fails, '')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py b/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py
deleted file mode 100644
index 15967a512..000000000
--- a/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# TODO:
-# move this to QtCore -- QStringListModel is part of QtGui and there is no
-# simple model class appropriate for this test in QtCore.
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-
-
-class TestBugPYSIDE41(unittest.TestCase):
-
- def testIt(self):
-
- # list of single-character strings
- strings = list('abcdefghijklmnopqrstuvwxyz')
-
- model = QStringListModel(strings)
-
- # Test hashing of both QModelIndex and QPersistentModelIndex
- indexFunctions = []
- indexFunctions.append(model.index)
- indexFunctions.append(lambda i: QPersistentModelIndex(model.index(i)))
-
- for indexFunction in indexFunctions:
-
- # If two objects compare equal, their hashes MUST also be equal. (The
- # reverse is not a requirement.)
- for i, _ in enumerate(strings):
- index1 = indexFunction(i)
- index2 = indexFunction(i)
- self.assertEqual(index1, index2)
- self.assertEqual(hash(index1), hash(index2))
-
- # Adding the full set of indexes to itself is a no-op.
- allIndexes1 = set(indexFunction(i) for i, _ in enumerate(strings))
- allIndexes2 = set(indexFunction(i) for i, _ in enumerate(strings))
- allIndexesCombined = allIndexes1 & allIndexes2
- self.assertEqual(allIndexes1, allIndexesCombined)
- self.assertEqual(allIndexes2, allIndexesCombined)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/deepcopy_test.py b/sources/pyside2/tests/QtGui/deepcopy_test.py
deleted file mode 100644
index 0fa82150f..000000000
--- a/sources/pyside2/tests/QtGui/deepcopy_test.py
+++ /dev/null
@@ -1,151 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from copy import deepcopy
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPoint
-from PySide2.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
-from PySide2.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
-from PySide2.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
-from PySide2.QtGui import QVector2D, QVector3D, QVector4D
-from PySide2.QtGui import QColor, QTransform, QKeySequence, QQuaternion
-from PySide2.QtGui import QPolygon
-
-class DeepCopyHelper:
- def testCopy(self):
- copy = deepcopy([self.original])[0]
- self.assertTrue(copy is not self.original)
- self.assertEqual(copy, self.original)
-
-class DeepCopyColorHelperF:
- def testCopy(self):
- copy = deepcopy([self.original])[0]
- self.assertTrue(copy is not self.original)
- self.assertEqual(copy.spec(), self.original.spec())
- # impossible to compare float point
- # self.assertEqual(copy, self.original)
-
-
-class QColorDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QColor("red")
-
-class QColorRGBDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
- def setUp(self):
- self.original = QColor.fromRgbF(0.2, 0.3, 0.4, 0.5)
-
-class QColorHSLDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
- def setUp(self):
- self.original = QColor.fromHslF(0.2, 0.3, 0.4, 0.5)
-
-class QColorHSVDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
- def setUp(self):
- self.original = QColor.fromHsvF(0.2, 0.3, 0.4, 0.5)
-
-class QColorCMYKDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
- def setUp(self):
- self.original = QColor.fromCmykF(0.2, 0.3, 0.4, 0.5, 0.6)
-
-class QTransformDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
-
-class QKeySequenceDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QKeySequence("Ctrl+P")
-
-class QQuaternionDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QQuaternion(1, 2, 3, 4)
-
-class QVector2DDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector2D(1, 2)
-
-class QVector3DDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector3D(1, 2, 3)
-
-class QVector4DDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector4D(1, 2, 3, 4)
-
-class QPolygonDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QPolygon([QPoint(1, 2), QPoint(3, 4), QPoint(5, 6)])
-
-
-# Avoid these tests until get gcc fixed
-# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
-"""
-class QMatrix2x2DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x2([1, 2, 3, 4])
-
-class QMatrix2x3DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x3([1, 2, 3, 4, 5, 6])
-
-class QMatrix2x4DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x4([1, 2, 3, 4, 5, 6, 7, 8])
-
-class QMatrix3x2DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x2([1, 2, 3, 4, 5, 6])
-
-class QMatrix3x3DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x3([1, 2, 3, 4, 5, 6, 7, 8, 9])
-
-class QMatrix3x4DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
-
-class QMatrix4x2DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x2([1, 2, 3, 4, 5, 6, 7, 8])
-
-class QMatrix4x3DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x3([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
-
-class QMatrix4x4DeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
-"""
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py b/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py
deleted file mode 100644
index 5e8747a0c..000000000
--- a/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QImage'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QImage, qRgb
-
-from helper.usesqapplication import UsesQApplication
-
-class SetPixelFloat(UsesQApplication):
- '''Test case for calling setPixel with float as argument'''
-
- def setUp(self):
- #Acquire resources
- super(SetPixelFloat, self).setUp()
- self.color = qRgb(255, 0, 0)
- self.image = QImage(200, 200, QImage.Format_RGB32)
-
- def tearDown(self):
- #Release resources
- del self.color
- del self.image
- super(SetPixelFloat, self).tearDown()
-
- def testFloat(self):
- #QImage.setPixel(float, float, color) - Implicit conversion
- self.image.setPixel(3.14, 4.2, self.color)
- self.assertEqual(self.image.pixel(3.14, 4.2), self.color)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qcolor_reduce_test.py b/sources/pyside2/tests/QtGui/qcolor_reduce_test.py
deleted file mode 100644
index adb07fbf1..000000000
--- a/sources/pyside2/tests/QtGui/qcolor_reduce_test.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import pickle
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QColor
-
-class TestQColor (unittest.TestCase):
- def reduceColor(self, c):
- p = pickle.dumps(c)
- c2 = pickle.loads(p)
- self.assertEqual(c.spec(), c2.spec())
- self.assertEqual(c, c2)
-
- def testReduceEmpty(self):
- self.reduceColor(QColor())
-
- def testReduceString(self):
- self.reduceColor(QColor('gray'))
-
- def testReduceRGB(self):
- self.reduceColor(QColor.fromRgbF(0.1, 0.2, 0.3, 0.4))
-
- def testReduceCMYK(self):
- self.reduceColor(QColor.fromCmykF(0.1, 0.2, 0.3, 0.4, 0.5))
-
- def testReduceHsl(self):
- self.reduceColor(QColor.fromHslF(0.1, 0.2, 0.3, 0.4))
-
- def testReduceHsv(self):
- self.reduceColor(QColor.fromHsvF(0.1, 0.2, 0.3, 0.4))
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qcolor_test.py b/sources/pyside2/tests/QtGui/qcolor_test.py
deleted file mode 100644
index 22955d86e..000000000
--- a/sources/pyside2/tests/QtGui/qcolor_test.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import colorsys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QColor, QColorConstants
-
-
-class QColorGetTest(unittest.TestCase):
-
- def setUp(self):
- self.color = QColor(20, 40, 60, 80)
-
- def testGetRgb(self):
- self.assertEqual(self.color.getRgb(), (20, 40, 60, 80))
-
- def testGetHslF(self):
- hls = colorsys.rgb_to_hls(20.0/255, 40.0/255, 60.0/255)
- hsla = hls[0], hls[2], hls[1], self.color.alphaF()
- for x, y in zip(self.color.getHslF(), hsla): # Due to rounding problems
- self.assertTrue(x - y < 1/100000.0)
-
- def testGetHsv(self):
- hsv = colorsys.rgb_to_hsv(20.0/255, 40.0/255, 60.0/255)
- hsva = int(hsv[0]*360.0), int(hsv[1]*255), int(hsv[2]*256), self.color.alpha()
- self.assertEqual(self.color.getHsv(), hsva)
-
- def testGetCmyk(self): # not supported by colorsys
- self.assertEqual(self.color.getCmyk(), (170, 85, 0, 195, 80))
-
- def testGetCmykF(self): # not supported by colorsys
- for x, y in zip(self.color.getCmykF(), (170/255.0, 85/255.0, 0, 195/255.0, 80/255.0)):
- self.assertTrue(x - y < 1/10000.0)
-
-
-class QColorQRgbConstructor(unittest.TestCase):
- '''QColor(QRgb) constructor'''
- # Affected by bug #170 - QColor(QVariant) coming before QColor(uint)
- # in overload sorting
-
- def testBasic(self):
- '''QColor(QRgb)'''
- color = QColor(255, 0, 0)
- #QRgb format #AARRGGBB
- rgb = 0x00FF0000
- self.assertEqual(QColor(rgb), color)
-
-
-class QColorEqualGlobalColor(unittest.TestCase):
-
- def testEqualGlobalColor(self):
- '''QColor == Qt::GlobalColor'''
- self.assertEqual(QColor(255, 0, 0), Qt.red)
-
-
-class QColorCopy(unittest.TestCase):
-
- def testDeepCopy(self):
- '''QColor deepcopy'''
-
- from copy import deepcopy
-
- original = QColor(0, 0, 255)
- copy = deepcopy([original])[0]
-
- self.assertTrue(original is not copy)
- self.assertEqual(original, copy)
- del original
- self.assertEqual(copy, QColor(0, 0, 255))
-
- def testEmptyCopy(self):
- from copy import deepcopy
-
- original = QColor()
- copy = deepcopy([original])[0]
- self.assertTrue(original is not copy)
- self.assertEqual(original, copy)
- del original
- self.assertEqual(copy, QColor())
-
-
-class QColorRepr(unittest.TestCase):
- def testReprFunction(self):
- # QColorConstants are disabled for MSVC/5.15, fixme: Check Qt 6
- c = QColorConstants.Yellow if sys.platform != 'win32' else QColor(100, 120, 200)
- c2 = eval(c.__repr__())
- self.assertEqual(c, c2)
-
- def testStrFunction(self):
- c = QColor('red')
- c2 = eval(c.__str__())
- self.assertEqual(c, c2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qcursor_test.py b/sources/pyside2/tests/QtGui/qcursor_test.py
deleted file mode 100644
index 7adc34788..000000000
--- a/sources/pyside2/tests/QtGui/qcursor_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test for Bug 630 - Fails to resolve overload for QCursor(QBitmap, QBitmap, int, int)
-http://bugs.openbossa.org/show_bug.cgi?id=630
-'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QBitmap, QCursor, QPixmap
-from helper.usesqapplication import UsesQApplication
-
-class TestQCursor(UsesQApplication):
- def testQCursorConstructor(self):
- bmp = QBitmap(16, 16)
- cursor = QCursor(bmp, bmp, 16, 16)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py b/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py
deleted file mode 100644
index c9b5c16a5..000000000
--- a/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QDataStream, QByteArray, QIODevice, Qt
-from PySide2.QtGui import QPixmap, QColor
-
-from helper.usesqapplication import UsesQApplication
-
-class QPixmapQDatastream(UsesQApplication):
- '''QDataStream <<>> QPixmap'''
-
- def setUp(self):
- super(QPixmapQDatastream, self).setUp()
- self.source_pixmap = QPixmap(100, 100)
- self.source_pixmap.fill(Qt.red)
- self.output_pixmap = QPixmap()
- self.buffer = QByteArray()
- self.read_stream = QDataStream(self.buffer, QIODevice.ReadOnly)
- self.write_stream = QDataStream(self.buffer, QIODevice.WriteOnly)
-
- def testStream(self):
- self.write_stream << self.source_pixmap
-
- self.read_stream >> self.output_pixmap
-
- image = self.output_pixmap.toImage()
- pixel = image.pixel(10,10)
- self.assertEqual(pixel, QColor(Qt.red).rgba())
- self.assertEqual(self.source_pixmap.toImage(), self.output_pixmap.toImage())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qdesktopservices_test.py b/sources/pyside2/tests/QtGui/qdesktopservices_test.py
deleted file mode 100644
index 97bf97de1..000000000
--- a/sources/pyside2/tests/QtGui/qdesktopservices_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QDesktopServices'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QDesktopServices
-from PySide2.QtCore import QUrl
-
-class QDesktopServicesTest(unittest.TestCase):
- def testOpenUrl(self):
- # At the bare minimum check that they return false for invalid url's
- url = QUrl()
- self.assertEqual(QDesktopServices.openUrl(url), False)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qfontmetrics_test.py b/sources/pyside2/tests/QtGui/qfontmetrics_test.py
deleted file mode 100644
index 4380eae85..000000000
--- a/sources/pyside2/tests/QtGui/qfontmetrics_test.py
+++ /dev/null
@@ -1,233 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests for inject codes and modifications on QFontMetrics
- and QFontMetricsF'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QFont, QFontMetrics, QFontMetricsF
-from PySide2.QtCore import QRect, QRectF, Qt, QSize, QSizeF
-from helper.usesqapplication import UsesQApplication
-
-
-class QFontMetricsTest(UsesQApplication):
- '''Base class for QFontMetrics tests'''
-
- def setUp(self):
- super(QFontMetricsTest, self).setUp()
- self.font = QFont()
- self.metrics = QFontMetrics(self.font)
-
- def tearDown(self):
- del self.metrics
- del self.font
- super(QFontMetricsTest, self).tearDown()
-
-
-class BoundingRectTest(QFontMetricsTest):
- '''Tests for QFontMetrics.boundingRect inject code'''
-
- def testIntDefault(self):
- '''QFontMetrics.boundingRect(int, int, int, int, ...) - default args'''
- rect = self.metrics.boundingRect(0, 0, 0, 0,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT')
- self.assertTrue(isinstance(rect, QRect))
-
- def testIntWithArg(self):
- '''QFontMetrics.boundingRect(int, int, int, int, ...) - single arg'''
- rect = self.metrics.boundingRect(0, 0, 0, 0,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 2)
- self.assertTrue(isinstance(rect, QRect))
-
- def testIntWithFull(self):
- '''QFontMetrics.boundingRect(int, int, int, int, ...) - all argss'''
- rect = self.metrics.boundingRect(0, 0, 0, 0,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, [1, 2, 3, 4, 5])
- self.assertTrue(isinstance(rect, QRect))
-
- def testIntTypeError(self):
- '''QFontMetrics.boundingRect(int, int, int, int, ...) - type error'''
- self.assertRaises(TypeError, self.metrics.boundingRect, 0, 0, 0, 0,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, ['aaaa', 'ase'])
-
- def testQRectDefault(self):
- '''QFontMetrics.boundingRect(QRect, ...) - default args'''
- arg = QRect(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT')
- self.assertTrue(isinstance(rect, QRect))
-
- def testQRectWithArg(self):
- '''QFontMetrics.boundingRect(QRect, ...) - only tabstops'''
- arg = QRect(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 2)
- self.assertTrue(isinstance(rect, QRect))
-
- def testQRectWithFull(self):
- '''QFontMetrics.boundingRect(QRect, ...) - all arguments'''
- arg = QRect(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20,
- [1, 2, 3, 4, 5])
- self.assertTrue(isinstance(rect, QRect))
-
- def testQRectTypeError(self):
- '''QFontMetrics.boundingRect(QRect, ...) - type error'''
- arg = QRect(0, 0, 100, 200)
- self.assertRaises(TypeError, self.metrics.boundingRect, arg,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, ['aaaa', 'ase'])
-
-
-class SizeTest(QFontMetricsTest):
- '''Tests for QFontMetrics.size inject code'''
-
- def testDefault(self):
- '''QFontMetrics.size - default arguments'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT')
- self.assertTrue(isinstance(size, QSize))
-
- def testWithTabStops(self):
- '''QFontMetrics.size - only tabstops'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT', 2)
- self.assertTrue(isinstance(size, QSize))
-
- def testFull(self):
- '''QFontMetrics.size - all arguments'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT', 2, [1, 2, 3, 4])
- self.assertTrue(isinstance(size, QSize))
-
- def testTypeError(self):
- '''QFontMetrics.size - type error'''
- self.assertRaises(TypeError, self.metrics.size,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, ['aaaa', 'ase'])
-
-
-class QFontMetricsFTest(UsesQApplication):
- '''Base class for QFontMetrics tests'''
-
- def setUp(self):
- super(QFontMetricsFTest, self).setUp()
- self.font = QFont()
- self.metrics = QFontMetricsF(self.font)
-
- def tearDown(self):
- del self.metrics
- del self.font
- super(QFontMetricsFTest, self).tearDown()
-
-
-class FBoundingRectTest(QFontMetricsFTest):
- '''Tests for QFontMetricsF.boundingRect inject code'''
-
- def testQRectDefault(self):
- '''QFontMetricsF.boundingRect(QRectF, ...) - default args'''
- arg = QRectF(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT')
- self.assertTrue(isinstance(rect, QRectF))
-
- def testQRectWithArg(self):
- '''QFontMetricsF.boundingRect(QRectF, ...) - only tabstops'''
- arg = QRectF(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 2)
- self.assertTrue(isinstance(rect, QRectF))
-
- def testQRectWithFull(self):
- '''QFontMetricsF.boundingRect(QRectF, ...) - all arguments'''
- arg = QRectF(0, 0, 100, 200)
- rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20,
- [1, 2, 3, 4, 5])
- self.assertTrue(isinstance(rect, QRectF))
-
- def testQRectTypeError(self):
- '''QFontMetricsF.boundingRect(QRectF, ...) - type error'''
- arg = QRectF(0, 0, 100, 200)
- self.assertRaises(TypeError, self.metrics.boundingRect, arg,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, ['aaaa', 'ase'])
-
-
-class FSizeTest(QFontMetricsFTest):
- '''Tests for QFontMetricsF.size inject code'''
-
- def testDefault(self):
- '''QFontMetricsF.size - default arguments'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT')
- self.assertTrue(isinstance(size, QSizeF))
-
- def testWithTabStops(self):
- '''QFontMetricsF.size - only tabstops'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT', 2)
- self.assertTrue(isinstance(size, QSizeF))
-
- def testFull(self):
- '''QFontMetricsF.size - all arguments'''
- size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
- 'PySide by INdT', 2, [1, 2, 3, 4])
- self.assertTrue(isinstance(size, QSizeF))
-
- def testTypeError(self):
- '''QFontMetricsF.size - type error'''
- self.assertRaises(TypeError, self.metrics.size,
- Qt.TextExpandTabs | Qt.AlignLeft,
- 'PySide by INdT', 20, ['aaaa', 'ase'])
-
-
-class QCharTest(QFontMetricsFTest):
-
- def testBoundingRect(self):
- retCh = self.metrics.boundingRectChar('a')
- self.assertEqual(type(retCh), QRectF)
-
- def testWith(self):
- retCh = self.metrics.horizontalAdvance('a')
- self.assertTrue(retCh > 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qguiapplication_test.py b/sources/pyside2/tests/QtGui/qguiapplication_test.py
deleted file mode 100644
index b761cf242..000000000
--- a/sources/pyside2/tests/QtGui/qguiapplication_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QGuiApplication
-
-class TestQGuiApplication(unittest.TestCase):
- def testNoArguments(self):
- app = QGuiApplication()
- self.assertIsInstance(app, QGuiApplication)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qicon_test.py b/sources/pyside2/tests/QtGui/qicon_test.py
deleted file mode 100644
index f3ad498e6..000000000
--- a/sources/pyside2/tests/QtGui/qicon_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.timedqapplication import TimedQApplication
-from PySide2.QtGui import QIcon
-
-
-class QIconCtorWithNoneTest(TimedQApplication):
- '''Test made by seblin, see Bug #944: http://bugs.pyside.org/show_bug.cgi?id=944'''
-
- def testQIconCtorWithNone(self):
- icon = QIcon(None)
- pixmap = icon.pixmap(48, 48)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qitemselection_test.py b/sources/pyside2/tests/QtGui/qitemselection_test.py
deleted file mode 100644
index 8e9639a31..000000000
--- a/sources/pyside2/tests/QtGui/qitemselection_test.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QItemSelection
-from PySide2.QtGui import QStandardItemModel
-
-class QItemSelectionTest(UsesQApplication):
- def testLen(self):
- model = QStandardItemModel(2, 2)
- model.insertRow(0)
- model.insertRow(1)
- model.insertColumn(0)
- model.insertColumn(1)
- selection = QItemSelection(model.index(0,0), model.index(1,1))
- self.assertEqual(len(selection), 1)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qkeysequence_test.py b/sources/pyside2/tests/QtGui/qkeysequence_test.py
deleted file mode 100644
index 226793400..000000000
--- a/sources/pyside2/tests/QtGui/qkeysequence_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QKeySequence
-
-from helper.usesqapplication import UsesQApplication
-
-class QKeySequenceTest(UsesQApplication):
-
- def testGetItemOperator(self):
- # bug #774
- ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
- self.assertEqual(ks[0], Qt.SHIFT)
- self.assertEqual(ks[1], Qt.CTRL)
- self.assertEqual(ks[2], Qt.Key_P)
- self.assertEqual(ks[3], Qt.Key_R)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qpainter_test.py b/sources/pyside2/tests/QtGui/qpainter_test.py
deleted file mode 100644
index d86e69b64..000000000
--- a/sources/pyside2/tests/QtGui/qpainter_test.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QPainter, QLinearGradient
-from PySide2.QtCore import QLine, QLineF, QPoint, QPointF, QRect, QRectF, Qt
-
-class QPainterDrawText(unittest.TestCase):
-
- def setUp(self):
- self.painter = QPainter()
- self.text = 'teste!'
-
- def tearDown(self):
- del self.text
- del self.painter
-
- def testDrawText(self):
- # bug #254
- rect = self.painter.drawText(100, 100, 100, 100,
- Qt.AlignCenter | Qt.TextWordWrap,
- self.text)
- self.assertTrue(isinstance(rect, QRect))
-
- def testDrawTextWithRect(self):
- # bug #225
- rect = QRect(100, 100, 100, 100)
- newRect = self.painter.drawText(rect, Qt.AlignCenter | Qt.TextWordWrap,
- self.text)
-
- self.assertTrue(isinstance(newRect, QRect))
-
- def testDrawTextWithRectF(self):
- '''QPainter.drawText(QRectF, ... ,QRectF*) inject code'''
- rect = QRectF(100, 52.3, 100, 100)
- newRect = self.painter.drawText(rect, Qt.AlignCenter | Qt.TextWordWrap,
- self.text)
-
- self.assertTrue(isinstance(newRect, QRectF))
-
- def testDrawOverloads(self):
- '''Calls QPainter.drawLines overloads, if something is
- wrong Exception and chaos ensues. Bug #395'''
- self.painter.drawLines([QLine(QPoint(0,0), QPoint(1,1))])
- self.painter.drawLines([QPoint(0,0), QPoint(1,1)])
- self.painter.drawLines([QPointF(0,0), QPointF(1,1)])
- self.painter.drawLines([QLineF(QPointF(0,0), QPointF(1,1))])
- self.painter.drawPoints([QPoint(0,0), QPoint(1,1)])
- self.painter.drawPoints([QPointF(0,0), QPointF(1,1)])
- self.painter.drawConvexPolygon([QPointF(10.0, 80.0),
- QPointF(20.0, 10.0),
- QPointF(80.0, 30.0),
- QPointF(90.0, 70.0)])
- self.painter.drawConvexPolygon([QPoint(10.0, 80.0),
- QPoint(20.0, 10.0),
- QPoint(80.0, 30.0),
- QPoint(90.0, 70.0)])
- self.painter.drawPolygon([QPointF(10.0, 80.0),
- QPointF(20.0, 10.0),
- QPointF(80.0, 30.0),
- QPointF(90.0, 70.0)])
- self.painter.drawPolygon([QPoint(10.0, 80.0),
- QPoint(20.0, 10.0),
- QPoint(80.0, 30.0),
- QPoint(90.0, 70.0)])
- self.painter.drawPolyline([QPointF(10.0, 80.0),
- QPointF(20.0, 10.0),
- QPointF(80.0, 30.0),
- QPointF(90.0, 70.0)])
- self.painter.drawPolyline([QPoint(10.0, 80.0),
- QPoint(20.0, 10.0),
- QPoint(80.0, 30.0),
- QPoint(90.0, 70.0)])
-
-class SetBrushWithOtherArgs(unittest.TestCase):
- '''Using qpainter.setBrush with args other than QBrush'''
-
- def testSetBrushGradient(self):
- painter = QPainter()
- gradient = QLinearGradient(0, 0, 0, 0)
- painter.setBrush(gradient)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qpdfwriter_test.py b/sources/pyside2/tests/QtGui/qpdfwriter_test.py
deleted file mode 100644
index aae636d31..000000000
--- a/sources/pyside2/tests/QtGui/qpdfwriter_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QPageLayout, QPageSize, QPdfWriter, QTextDocument
-from PySide2.QtCore import QDir, QMarginsF, QTemporaryFile
-
-class QPdfWriterTest(UsesQApplication):
-
- def testWrite(self):
- temporaryFile = QTemporaryFile(QDir.tempPath() + "/pdfwriter_test_XXXXXX.pdf")
- self.assertTrue(temporaryFile.open())
- pdfWriter = QPdfWriter(temporaryFile)
- pdfWriter.setPageLayout(QPageLayout(QPageSize(QPageSize.A4), QPageLayout.Portrait, QMarginsF(10, 10, 10, 10)))
- doc = QTextDocument("Some text")
- doc.print_(pdfWriter)
- temporaryFile.close()
- self.assertTrue(temporaryFile.size() > 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qpixelformat_test.py b/sources/pyside2/tests/QtGui/qpixelformat_test.py
deleted file mode 100644
index 30ea213d6..000000000
--- a/sources/pyside2/tests/QtGui/qpixelformat_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for QPixelFormat'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QSize, Qt
-from PySide2.QtGui import QColor, QImage, QPixelFormat
-
-class QPixelFormatTest(UsesQApplication):
- def test(self):
- image = QImage(QSize(200, 200), QImage.Format_ARGB32)
- image.fill(QColor(Qt.red))
- pixelFormat = image.pixelFormat()
- print(pixelFormat.greenSize())
- self.assertEqual(pixelFormat.alphaSize(), 8)
- self.assertEqual(pixelFormat.redSize(), 8)
- self.assertEqual(pixelFormat.greenSize(), 8)
- self.assertEqual(pixelFormat.blueSize(), 8)
- self.assertEqual(pixelFormat.bitsPerPixel(), 32)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qpixmap_test.py b/sources/pyside2/tests/QtGui/qpixmap_test.py
deleted file mode 100644
index 7d2d75bc3..000000000
--- a/sources/pyside2/tests/QtGui/qpixmap_test.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import *
-from PySide2.QtCore import *
-
-class QPixmapTest(UsesQApplication):
- def testQVariantConstructor(self):
- obj = QObject()
- pixmap = QPixmap()
- obj.setProperty('foo', pixmap)
- self.assertEqual(type(obj.property('foo')), QPixmap)
-
- def testQSizeConstructor(self):
- pixmap = QPixmap(QSize(10,20))
- self.assertTrue(pixmap.size().height(), 20)
-
- def testQStringConstructor(self):
- pixmap = QPixmap("Testing!")
-
- def testQPixmapLoadFromDataWithQFile(self):
- f = QFile(os.path.join(os.path.dirname(__file__), 'sample.png'))
- self.assertTrue(f.open(QIODevice.ReadOnly))
- data = f.read(f.size())
- f.close()
- pixmap = QPixmap()
- self.assertTrue(pixmap.loadFromData(data))
-
- def testQPixmapLoadFromDataWithPython(self):
- data = open(os.path.join(os.path.dirname(__file__),'sample.png'),'rb').read()
- pixmap = QPixmap()
- self.assertTrue(pixmap.loadFromData(data))
-
-
-class QPixmapToImage(UsesQApplication):
-
- def testFilledImage(self):
- '''QPixmap.fill + toImage + image.pixel'''
- pixmap = QPixmap(100, 200)
- pixmap.fill(Qt.red) # Default Qt.white
-
- self.assertEqual(pixmap.height(), 200)
- self.assertEqual(pixmap.width(), 100)
-
- image = pixmap.toImage()
-
- self.assertEqual(image.height(), 200)
- self.assertEqual(image.width(), 100)
-
- pixel = image.pixel(10,10)
- self.assertEqual(pixel, QColor(Qt.red).rgba())
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qpixmapcache_test.py b/sources/pyside2/tests/QtGui/qpixmapcache_test.py
deleted file mode 100644
index 672ea79d5..000000000
--- a/sources/pyside2/tests/QtGui/qpixmapcache_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QPixmapCache, QPixmap
-
-
-class QPixmapCacheTest(UsesQApplication):
-
- def testWithString(self):
- pm1 = QPixmap()
- ok = QPixmapCache.find('img', pm1)
- self.assertFalse(ok)
-
- self.assertEqual(QPixmapCache.find('img'), None)
-
- pm2 = QPixmap()
- ok = QPixmapCache.insert('img', pm2)
- self.assertTrue(ok)
-
- pm3 = QPixmap()
- ok = QPixmapCache.find('img', pm3)
- self.assertTrue(ok)
- b1 = QPixmapCache.find('img').toImage().bits()
- b2 = pm3.toImage().bits()
- self.assertEqual(QPixmapCache.find('img').toImage().bits(), pm3.toImage().bits())
-
- def testWithKey(self):
- pm1 = QPixmap()
- ok = QPixmapCache.find(QPixmapCache.Key(), pm1)
- self.assertFalse(ok)
-
- self.assertEqual(QPixmapCache.find(QPixmapCache.Key()), None)
-
- pm2 = QPixmap()
- key = QPixmapCache.insert(pm2)
-
- pm3 = QPixmap()
- ok = QPixmapCache.find(key, pm3)
- self.assertTrue(ok)
-
- self.assertEqual(QPixmapCache.find(key).toImage().bits(), pm3.toImage().bits())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qpolygonf_test.py b/sources/pyside2/tests/QtGui/qpolygonf_test.py
deleted file mode 100644
index d39b44827..000000000
--- a/sources/pyside2/tests/QtGui/qpolygonf_test.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPoint, QPointF
-from PySide2.QtGui import QPolygon, QPolygonF
-
-
-class QPolygonFNotIterableTest(unittest.TestCase):
- """Test if a QPolygonF is iterable"""
-
- def testIt(self):
- points = []
- for i in range(0, 4):
- points.append(QPointF(float(i), float(i)))
-
- p = QPolygonF(points)
- self.assertEqual(len(p), 4)
-
- i = 0
- for point in p:
- self.assertEqual(int(point.x()), i)
- self.assertEqual(int(point.y()), i)
- i += 1
-
- def testPolygonShiftOperators(self):
- p = QPolygon()
- self.assertEqual(len(p), 0)
- p << QPoint(10, 20) << QPoint(20, 30) << [QPoint(20, 30), QPoint(40, 50)]
- self.assertEqual(len(p), 4)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qradialgradient_test.py b/sources/pyside2/tests/QtGui/qradialgradient_test.py
deleted file mode 100644
index 728a721f9..000000000
--- a/sources/pyside2/tests/QtGui/qradialgradient_test.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QRadialGradient
-from PySide2.QtCore import QPointF
-
-class QRadialGradientConstructor(unittest.TestCase):
- def _compare(self, qptf, tpl):
- self.assertEqual((qptf.x(), qptf.y()), tpl)
-
- def _assertValues(self, grad):
- self._compare(grad.center(), (1.0, 2.0))
- self._compare(grad.focalPoint(), (3.0, 4.0))
- self.assertEqual(grad.radius(), 5.0)
-
- def testAllInt(self):
- grad = QRadialGradient(1, 2, 5, 3, 4)
- self._assertValues(grad)
-
- def testQPointF(self):
- grad = QRadialGradient(QPointF(1, 2), 5, QPointF(3, 4))
- self._assertValues(grad)
-
- def testSetQPointF(self):
- grad = QRadialGradient()
- grad.setCenter(QPointF(1, 2))
- self._compare(grad.center(), (1.0, 2.0))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qrasterwindow_test.py b/sources/pyside2/tests/QtGui/qrasterwindow_test.py
deleted file mode 100644
index f18ceaaf4..000000000
--- a/sources/pyside2/tests/QtGui/qrasterwindow_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for QBackingStore, QRasterWindow and QStaticText'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QEvent, QPoint, QRect, QSize, QTimer, Qt
-from PySide2.QtGui import QColor, QBackingStore, QPaintDevice, QPainter, QWindow, QPaintDeviceWindow, QRasterWindow, QRegion, QStaticText
-
-# QWindow rendering via QBackingStore
-class TestBackingStoreWindow(QWindow):
- def __init__(self):
- super(TestBackingStoreWindow, self).__init__()
- self.backingStore = QBackingStore(self)
- self.text = QStaticText("BackingStoreWindow")
-
- def event(self, event):
- if event.type() == QEvent.Resize:
- self.backingStore.resize(self.size())
- self.render()
- elif event.type() == QEvent.UpdateRequest or event.type() == QEvent.Expose:
- self.backingStore.flush(QRegion(QRect(QPoint(0, 0), self.size())))
-
- return QWindow.event(self, event)
-
- def render(self):
- clientRect = QRect(QPoint(0, 0), self.size())
- painter = QPainter(self.backingStore.paintDevice())
- painter.fillRect(clientRect, QColor(Qt.green))
- painter.drawStaticText(QPoint(10, 10), self.text)
-
-# Window using convenience class QRasterWindow
-class TestRasterWindow(QRasterWindow):
- def __init__(self):
- super(TestRasterWindow, self).__init__()
- self.text = QStaticText("QRasterWindow")
-
- def paintEvent(self, event):
- clientRect = QRect(QPoint(0, 0), self.size())
- painter = QPainter(self)
- painter.fillRect(clientRect, QColor(Qt.red))
- painter.drawStaticText(QPoint(10, 10), self.text)
-
-class QRasterWindowTest(UsesQApplication):
- def test(self):
- rasterWindow = TestRasterWindow()
- rasterWindow.setFramePosition(QPoint(100, 100))
- rasterWindow.resize(QSize(400, 400))
- rasterWindow.show()
- backingStoreWindow = TestBackingStoreWindow()
- backingStoreWindow.setFramePosition(QPoint(600, 100))
- backingStoreWindow.resize(QSize(400, 400))
- backingStoreWindow.show()
-
- QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qregion_test.py b/sources/pyside2/tests/QtGui/qregion_test.py
deleted file mode 100644
index 3e05617ef..000000000
--- a/sources/pyside2/tests/QtGui/qregion_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QRegion
-from PySide2.QtCore import QPoint
-from helper.usesqapplication import UsesQApplication
-
-class QRegionTest(UsesQApplication):
-
- def testFunctionUnit(self):
- r = QRegion(0, 0, 10, 10)
- r2 = QRegion(5, 5, 10, 10)
-
- ru = r.united(r2)
- self.assertTrue(ru.contains(QPoint(0,0)))
- self.assertTrue(ru.contains(QPoint(5,5)))
- self.assertTrue(ru.contains(QPoint(10,10)))
- self.assertTrue(ru.contains(QPoint(14,14)))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qstylehints_test.py b/sources/pyside2/tests/QtGui/qstylehints_test.py
deleted file mode 100644
index 3cecfa60b..000000000
--- a/sources/pyside2/tests/QtGui/qstylehints_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for QStyleHints'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QStyleHints
-
-class QStyleHintsTest(UsesQApplication):
- def test(self):
- styleHints = self.app.styleHints()
- self.assertTrue(styleHints.startDragDistance() > 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qtextdocument_functions.py b/sources/pyside2/tests/QtGui/qtextdocument_functions.py
deleted file mode 100644
index bd1462049..000000000
--- a/sources/pyside2/tests/QtGui/qtextdocument_functions.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import Qt
-
-
-class QTextDocumentFunctions(unittest.TestCase):
-
- def testFunctions(self):
- self.assertFalse(Qt.mightBeRichText('bla'))
- self.assertTrue(Qt.mightBeRichText('<html><head/><body><p>bla</p></body></html>'))
- html = Qt.convertFromPlainText("A & B", Qt.WhiteSpaceNormal)
- self.assertEqual(html, '<p>A &amp; B</p>')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py b/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py
deleted file mode 100644
index 1cbb8ff29..000000000
--- a/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QTextDocument, QTextCursor
-
-class QTextDocumentTest(unittest.TestCase):
-
- def testUndoRedo(self):
- text = 'foobar'
- doc = QTextDocument(text)
-
- self.assertFalse(doc.isRedoAvailable())
- self.assertTrue(doc.isUndoAvailable())
- self.assertEqual(doc.toPlainText(), text)
-
- cursor = QTextCursor(doc)
- doc.undo(cursor)
-
- self.assertTrue(doc.isRedoAvailable())
- self.assertFalse(doc.isUndoAvailable())
- self.assertEqual(doc.toPlainText(), '')
-
- doc.redo(cursor)
-
- self.assertFalse(doc.isRedoAvailable())
- self.assertTrue(doc.isUndoAvailable())
- self.assertEqual(doc.toPlainText(), text)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py b/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py
deleted file mode 100644
index 7c825b62f..000000000
--- a/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QTextDocumentWriter, QTextDocument
-from PySide2.QtCore import QBuffer
-
-
-class QTextDocumentWriterTest(unittest.TestCase):
-
- def testWrite(self):
- text = 'foobar'
- doc = QTextDocument(text)
- b = QBuffer()
- b.open(QBuffer.ReadWrite)
- writer = QTextDocumentWriter(b, bytes("plaintext", "UTF-8"));
- writer.write(doc);
- b.close()
- self.assertEqual(b.buffer(), text)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/qtextline_test.py b/sources/pyside2/tests/QtGui/qtextline_test.py
deleted file mode 100644
index 92af7b823..000000000
--- a/sources/pyside2/tests/QtGui/qtextline_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QTextLayout
-from helper.usesqapplication import UsesQApplication
-
-class QTextLineTest(UsesQApplication):
-
- def testCursorToX(self):
- textLayout = QTextLayout()
- textLayout.beginLayout()
- line = textLayout.createLine()
- self.assertTrue(line.isValid())
- x, cursorPos = line.cursorToX(0)
- self.assertEqual(type(x), float)
- self.assertEqual(type(cursorPos), int)
- x, cursorPos = line.cursorToX(1)
- self.assertEqual(type(x), float)
- self.assertEqual(type(cursorPos), int)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qtransform_test.py b/sources/pyside2/tests/QtGui/qtransform_test.py
deleted file mode 100644
index 29f9b86bb..000000000
--- a/sources/pyside2/tests/QtGui/qtransform_test.py
+++ /dev/null
@@ -1,108 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPointF
-from PySide2.QtGui import QTransform, QPolygonF, QPolygonF
-
-class QTransformTest(unittest.TestCase):
-
- def testMap(self):
- transform = QTransform()
- values = (10.0, 20.0)
- tx, ty = transform.map(*values)
- self.assertTrue(isinstance(tx, float))
- self.assertTrue(isinstance(ty, float))
- self.assertEqual((tx, ty), values)
-
- def testquadToQuad(self):
- q1 = QPolygonF()
- q1.append(QPointF(10.0, 10.0))
- q1.append(QPointF(20.0, 10.0))
- q1.append(QPointF(10.0, -10.0))
- q1.append(QPointF(20.0, -10.0))
-
- q2 = QPolygonF()
- q2.append(QPointF(20.0, 20.0))
- q2.append(QPointF(30.0, 20.0))
- q2.append(QPointF(20.0, -20.0))
- q2.append(QPointF(30.0, -20.0))
-
- t1 = QTransform()
- r1 = QTransform.quadToQuad(q1, q2, t1)
- r2 = QTransform.quadToQuad(q1, q2)
-
- self.assertTrue(r1)
- self.assertTrue(r2)
-
- self.assertEqual(t1, r2)
-
- def testquadToSquare(self):
- q1 = QPolygonF()
- q1.append(QPointF(10.0, 10.0))
- q1.append(QPointF(20.0, 10.0))
- q1.append(QPointF(10.0, -10.0))
- q1.append(QPointF(20.0, -10.0))
-
- t1 = QTransform()
- r1 = QTransform.quadToSquare(q1, t1)
- r2 = QTransform.quadToSquare(q1)
-
- self.assertTrue(r1)
- self.assertTrue(r2)
-
- self.assertEqual(t1, r2)
-
-
- def testsquareToQuad(self):
- q1 = QPolygonF()
- q1.append(QPointF(10.0, 10.0))
- q1.append(QPointF(20.0, 10.0))
- q1.append(QPointF(10.0, -10.0))
- q1.append(QPointF(20.0, -10.0))
-
- t1 = QTransform()
- r1 = QTransform.squareToQuad(q1, t1)
- r2 = QTransform.squareToQuad(q1)
-
- self.assertTrue(r1)
- self.assertTrue(r2)
-
- self.assertEqual(t1, r2)
-
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/repr_test.py b/sources/pyside2/tests/QtGui/repr_test.py
deleted file mode 100644
index 6e632b68d..000000000
--- a/sources/pyside2/tests/QtGui/repr_test.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2.QtCore import QPoint
-from PySide2.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
-from PySide2.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
-from PySide2.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
-from PySide2.QtGui import QVector2D, QVector3D, QVector4D
-from PySide2.QtGui import QColor, QTransform, QKeySequence, QQuaternion
-from PySide2.QtGui import QPolygon
-
-class ReprCopyHelper:
- def testCopy(self):
- copy = eval(self.original.__repr__())
- self.assertTrue(copy is not self.original)
- self.assertEqual(copy, self.original)
-
-class QTransformReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
-
-class QQuaternionReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QQuaternion(1, 2, 3, 4)
-
-class QVector2DReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector2D(1, 2)
-
-class QVector3DReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector3D(1, 2, 3)
-
-class QVector4DReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QVector4D(1, 2, 3, 4)
-
-
-# Avoid these tests until get gcc fixed
-# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
-"""
-class QMatrix2x2ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x2([1, 2, 3, 4])
-
-class QMatrix2x3ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x3([1, 2, 3, 4, 5, 6])
-
-class QMatrix2x4ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix2x4([1, 2, 3, 4, 5, 6, 7, 8])
-
-class QMatrix3x2ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x2([1, 2, 3, 4, 5, 6])
-
-class QMatrix3x3ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x3([1, 2, 3, 4, 5, 6, 7, 8, 9])
-
-class QMatrix3x4ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix3x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
-
-class QMatrix4x2ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x2([1, 2, 3, 4, 5, 6, 7, 8])
-
-class QMatrix4x3ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x3([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
-
-class QMatrix4x4ReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix4x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
-"""
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py b/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py
deleted file mode 100644
index 1f873fa02..000000000
--- a/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.timedqapplication import TimedQApplication
-from PySide2.support import deprecated
-from PySide2.support.signature import importhandler
-from PySide2 import QtGui
-
-
-class TestTimedApp(TimedQApplication):
- '''Simple test case for TimedQApplication'''
-
- def testFoo(self):
- #Simple test of TimedQApplication
- self.app.exec_()
-
-
-def fix_for_QtGui(QtGui):
- QtGui.something = 42
-
-class TestPatchingFramework(unittest.TestCase):
- """Simple test that verifies that deprecated.py works"""
-
- deprecated.fix_for_QtGui = fix_for_QtGui
-
- def test_patch_works(self):
- something = "something"
- self.assertFalse(hasattr(QtGui, something))
- importhandler.finish_import(QtGui)
- self.assertTrue(hasattr(QtGui, something))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtHelp/help_test.py b/sources/pyside2/tests/QtHelp/help_test.py
deleted file mode 100644
index 42814a30f..000000000
--- a/sources/pyside2/tests/QtHelp/help_test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtHelp import QHelpEngine
-
-from helper.usesqapplication import UsesQApplication
-
-class QHelpEngineCreation(UsesQApplication):
-
- def testConstructor(self):
- helpEngine = QHelpEngine('mycollection.qch')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtHelp/helpsearchengine_test.py b/sources/pyside2/tests/QtHelp/helpsearchengine_test.py
deleted file mode 100644
index 54f74b8fc..000000000
--- a/sources/pyside2/tests/QtHelp/helpsearchengine_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtHelp import QHelpEngineCore, QHelpSearchEngine, QHelpSearchResult
-
-from helper.usesqapplication import UsesQApplication
-
-class QHelpSearchEngineTest(UsesQApplication):
-
- def testQHelpSearchEngine(self):
- helpEngineCore = QHelpEngineCore('')
- helpSearchEngine = QHelpSearchEngine(helpEngineCore)
- helpSearchResult = helpSearchEngine.searchResults(0, 0)
- self.assertEqual(len(helpSearchResult), 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtLocation/location.py b/sources/pyside2/tests/QtLocation/location.py
deleted file mode 100644
index 151470a22..000000000
--- a/sources/pyside2/tests/QtLocation/location.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for Location'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtLocation import QGeoServiceProvider
-
-
-class QLocationTestCase(unittest.TestCase):
- def test(self):
- geoServiceProvider = QGeoServiceProvider("none")
- self.assertEqual(geoServiceProvider.errorString(),
- 'The geoservices provider none is not supported.')
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtMultimedia/audio_test.py b/sources/pyside2/tests/QtMultimedia/audio_test.py
deleted file mode 100644
index f242865f1..000000000
--- a/sources/pyside2/tests/QtMultimedia/audio_test.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QHttp'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqguiapplication import UsesQGuiApplication
-from PySide2.QtCore import *
-from PySide2.QtMultimedia import *
-
-class testAudioDevices(UsesQGuiApplication):
-
- def testListDevices(self):
- valid = False
- devices = QAudioDeviceInfo.availableDevices(QAudio.AudioOutput)
- if not len(devices):
- return
-
- valid = True
- for devInfo in devices:
- if devInfo.deviceName() == 'null':
- # skip the test if the only device found is a invalid device
- if len(devices) == 1:
- return
- else:
- continue
- fmt = QAudioFormat()
- for codec in devInfo.supportedCodecs():
- fmt.setCodec(codec)
- for frequency in devInfo.supportedSampleRates():
- fmt.setSampleRate(frequency)
- for channels in devInfo.supportedChannelCounts():
- fmt.setChannelCount(channels)
- for sampleType in devInfo.supportedSampleTypes():
- fmt.setSampleType(sampleType)
- for sampleSize in devInfo.supportedSampleSizes():
- fmt.setSampleSize(sampleSize)
- for endian in devInfo.supportedByteOrders():
- fmt.setByteOrder(endian)
- if devInfo.isFormatSupported(fmt):
- return
- self.assertTrue(False)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py b/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py
deleted file mode 100644
index f7ad812eb..000000000
--- a/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QtMultimediaWidgets'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtMultimediaWidgets import QGraphicsVideoItem, QVideoWidget
-from PySide2.QtWidgets import QGraphicsScene, QGraphicsView, QVBoxLayout, QWidget
-from PySide2.QtCore import QTimer
-
-class MyWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- layout = QVBoxLayout(self)
- layout.addWidget(QVideoWidget())
-
- graphicsScene = QGraphicsScene()
- graphicsView = QGraphicsView(graphicsScene)
- graphicsScene.addItem(QGraphicsVideoItem())
- layout.addWidget(graphicsView)
-
-class QMultimediaWidgetsTest(UsesQApplication):
- def testMultimediaWidgets(self):
- w = MyWidget()
- w.show()
-
- timer = QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/accessManager_test.py b/sources/pyside2/tests/QtNetwork/accessManager_test.py
deleted file mode 100644
index 12ed25317..000000000
--- a/sources/pyside2/tests/QtNetwork/accessManager_test.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QHttp'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtNetwork import *
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-from httpd import TestServer
-
-class AccessManagerCase(UsesQCoreApplication):
-
- def setUp(self):
- super(AccessManagerCase, self).setUp()
- self.httpd = TestServer()
- self.httpd.start()
- self.called = False
-
- def tearDown(self):
- super(AccessManagerCase, self).tearDown()
- if self.httpd:
- self.httpd.shutdown()
- self.httpd = None
-
- def goAway(self):
- self.httpd.shutdown()
- self.app.quit()
- self.httpd = None
-
- def slot_replyFinished(self, reply):
- self.assertEqual(type(reply), QNetworkReply)
- self.called = True
- self.goAway()
-
- def testNetworkRequest(self):
- manager = QNetworkAccessManager()
- manager.finished.connect(self.slot_replyFinished)
- manager.get(QNetworkRequest(QUrl("http://127.0.0.1:%s" % self.httpd.port())))
- self.app.exec_()
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/bug_1084.py b/sources/pyside2/tests/QtNetwork/bug_1084.py
deleted file mode 100644
index cd8dd7621..000000000
--- a/sources/pyside2/tests/QtNetwork/bug_1084.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1084 '''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtNetwork
-
-
-class QTcpSocketTestCase(unittest.TestCase):
- def setUp(self):
- self.sock = QtNetwork.QTcpSocket()
- self.sock.connectToHost('127.0.0.1', 25)
-
- def testIt(self):
- self.sock.write(bytes('quit', "UTF-8"))
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/bug_446.py b/sources/pyside2/tests/QtNetwork/bug_446.py
deleted file mode 100644
index 7e7242515..000000000
--- a/sources/pyside2/tests/QtNetwork/bug_446.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtNetwork import *
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class HttpSignalsCase(UsesQCoreApplication):
- '''Test case for launching QHttp signals'''
- DATA = bytes("PySide rocks", "UTF-8")
-
- def onError(self):
- self.assertTrue(False)
-
- def onNewConnection(self):
- self.serverConnection = self.server.nextPendingConnection()
- self.serverConnection.errorOccurred.connect(self.onError)
- self.serverConnection.write(HttpSignalsCase.DATA)
- self.server.close()
-
- def onReadReady(self):
- data = self.client.read(100)
- self.assertEqual(len(data), len(HttpSignalsCase.DATA))
- self.assertEqual(data, HttpSignalsCase.DATA)
- self.done()
-
- def onClientConnect(self):
- self.client.readyRead.connect(self.onReadReady)
-
- def initServer(self):
- self.server = QTcpServer()
- self.server.newConnection.connect(self.onNewConnection)
- self.assertTrue(self.server.listen())
- self.client = QTcpSocket()
- self.client.connected.connect(self.onClientConnect)
- self.client.connectToHost(QHostAddress(QHostAddress.LocalHost), self.server.serverPort())
-
- def done(self):
- self.serverConnection.close()
- self.client.close()
- self.app.quit()
-
- def testRun(self):
- self.initServer()
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/dnslookup_test.py b/sources/pyside2/tests/QtNetwork/dnslookup_test.py
deleted file mode 100644
index 3a8b7a2d7..000000000
--- a/sources/pyside2/tests/QtNetwork/dnslookup_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QDnsLookup'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication
-from PySide2.QtNetwork import QDnsLookup
-
-class DnsLookupTestCase(unittest.TestCase):
- '''Test case for QDnsLookup'''
-
- def setUp(self):
- self._app = QCoreApplication([])
- self._lookup = QDnsLookup(QDnsLookup.ANY, 'www.qt.io')
- self._lookup.finished.connect(self._finished)
-
- def tearDown(self):
- del self._lookup
-
- def _finished(self):
- if self._lookup.error() == QDnsLookup.NoError:
- nameRecords = self._lookup.canonicalNameRecords()
- if nameRecords:
- print(nameRecords[0].name())
- self._app.quit()
-
- def testLookup(self):
- self._lookup.lookup()
- self._app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/qipv6address_test.py b/sources/pyside2/tests/QtNetwork/qipv6address_test.py
deleted file mode 100644
index 046d4d850..000000000
--- a/sources/pyside2/tests/QtNetwork/qipv6address_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QIPv6Address'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtNetwork import *
-
-class QIPv6AddressGetItemTest(unittest.TestCase):
- def testLength(self):
- ip = QIPv6Address()
- self.assertEqual(len(ip), 16)
-
- def testSetItemNegativeIndex(self):
- ip = QIPv6Address()
- ip[-1] = 8
- self.assertEqual(ip[-1], 8)
-
- def testSetItemLargeIndex(self):
- ip = QIPv6Address()
- self.assertRaises(IndexError, ip.__setitem__, 32, 16)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py b/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py
deleted file mode 100644
index 13da3e733..000000000
--- a/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QPasswordDigestor'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray, QCryptographicHash
-from PySide2.QtNetwork import QPasswordDigestor
-
-class TestPasswordDigestor(unittest.TestCase):
- def test(self):
- b = QPasswordDigestor.deriveKeyPbkdf1(QCryptographicHash.Sha1,
- b'test', b'saltnpep', 10, 20)
- self.assertEqual(b.size(), 20)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/tcpserver_test.py b/sources/pyside2/tests/QtNetwork/tcpserver_test.py
deleted file mode 100644
index 9a047e5c6..000000000
--- a/sources/pyside2/tests/QtNetwork/tcpserver_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QTCPServer'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtNetwork import QTcpServer
-
-class ListenDefaultArgsCase(unittest.TestCase):
- '''Test case for TcpServer.listen with default args'''
-
- def setUp(self):
- #Acquire resources
- self.server = QTcpServer()
-
- def tearDown(self):
- #Release resources
- del self.server
-
- def testDefaultArgs(self):
- # @bug 108
- #Default arguments for QTcpServer.listen
- self.server.listen()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/udpsocket_test.py b/sources/pyside2/tests/QtNetwork/udpsocket_test.py
deleted file mode 100644
index 7ef567294..000000000
--- a/sources/pyside2/tests/QtNetwork/udpsocket_test.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QUdpSocket'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUrl, QObject, SIGNAL, QCoreApplication, QTimer
-from PySide2.QtNetwork import QUdpSocket, QHostAddress
-
-
-class HttpSignalsCase(unittest.TestCase):
- '''Test case for bug #124 - readDatagram signature
-
- QUdpSocket.readDatagram must return a tuple with the datagram, host and
- port, while receiving only the max payload size.'''
-
- def setUp(self):
- #Acquire resources
- self.called = False
- self.app = QCoreApplication([])
-
- self.socket = QUdpSocket()
-
- self.server = QUdpSocket()
- self.server.bind(QHostAddress(QHostAddress.LocalHost), 45454)
-
- def tearDown(self):
- #Release resources
- del self.socket
- del self.server
- del self.app
-
- def sendPackage(self):
- addr = QHostAddress(QHostAddress.LocalHost)
- self.socket.writeDatagram(bytes('datagram', "UTF-8"), addr, 45454)
-
- def callback(self):
- while self.server.hasPendingDatagrams():
- datagram, host, port = self.server.readDatagram(self.server.pendingDatagramSize())
- self.called = True
- self.app.quit()
-
- def testDefaultArgs(self):
- #QUdpSocket.readDatagram pythonic return
- # @bug 124
- QObject.connect(self.server, SIGNAL('readyRead()'), self.callback)
- self.sendPackage()
- self.app.exec_()
-
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py b/sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py
deleted file mode 100644
index 5500c7c57..000000000
--- a/sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit tests for QOpenGLBuffer'''
-
-import ctypes
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QOffscreenSurface, QOpenGLContext, QSurface, QWindow
-from PySide2.QtOpenGL import QOpenGLBuffer
-
-def createSurface(surfaceClass):
- if surfaceClass == QSurface.Window:
- window = QWindow()
- window.setSurfaceType(QWindow.OpenGLSurface)
- window.setGeometry(0, 0, 10, 10)
- window.create()
- return window
- elif surfaceClass == QSurface.Offscreen:
- # Create a window and get the format from that. For example, if an EGL
- # implementation provides 565 and 888 configs for PBUFFER_BIT but only
- # 888 for WINDOW_BIT, we may end up with a pbuffer surface that is
- # incompatible with the context since it could choose the 565 while the
- # window and the context uses a config with 888.
- format = QSurfaceFormat
- if format.redBufferSize() == -1:
- window = QWindow()
- window.setSurfaceType(QWindow.OpenGLSurface)
- window.setGeometry(0, 0, 10, 10)
- window.create()
- format = window.format()
- offscreenSurface = QOffscreenSurface()
- offscreenSurface.setFormat(format)
- offscreenSurface.create()
- return offscreenSurface
- return 0
-
-class QOpenGLBufferTest(UsesQApplication):
- def testBufferCreate(self):
- surface = createSurface(QSurface.Window)
- ctx = QOpenGLContext()
- ctx.create()
- ctx.makeCurrent(surface)
-
- buf = QOpenGLBuffer()
-
- self.assertTrue(not buf.isCreated())
-
- self.assertTrue(buf.create())
- self.assertTrue(buf.isCreated())
-
- self.assertEqual(buf.type(), QOpenGLBuffer.VertexBuffer)
-
- buf.bind()
- buf.allocate(128)
- self.assertEqual(buf.size(), 128)
-
- buf.release()
-
- buf.destroy()
- self.assertTrue(not buf.isCreated())
-
- ctx.doneCurrent()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtOpenGL/qopenglwindow_test.py b/sources/pyside2/tests/QtOpenGL/qopenglwindow_test.py
deleted file mode 100644
index 22f7fd202..000000000
--- a/sources/pyside2/tests/QtOpenGL/qopenglwindow_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for QOpenGLContext, QOpenGLTexture, QOpenGLWindow and related classes'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import QSize, QTimer, Qt
-from PySide2.QtGui import (QColor, QGuiApplication, QImage, QOpenGLContext,
- QSurfaceFormat)
-from PySide2.QtOpenGL import (QOpenGLTexture, QOpenGLWindow)
-
-
-try:
- from OpenGL import GL
-except ImportError:
- print("Skipping test due to missing OpenGL module")
- sys.exit(0)
-
-class OpenGLWindow(QOpenGLWindow):
- def __init__(self):
- super(OpenGLWindow, self).__init__()
-
- self.m_functions = None
- self.m_texture = None
- self.visibleChanged.connect(self.slotVisibleChanged)
-
- def slotVisibleChanged(self, visible):
- if not visible and self.m_texture is not None and self.context().makeCurrent(self):
- self.m_texture = None
- self.context().doneCurrent()
-
- def initializeGL(self):
- self.m_functions = self.context().functions()
- self.m_functions.initializeOpenGLFunctions()
- image = QImage(QSize(200, 200), QImage.Format_RGBA8888)
- image.fill(QColor(Qt.red))
- self.m_texture = QOpenGLTexture(image)
-
- def paintGL(self):
- GL.glMatrixMode(GL.GL_MODELVIEW);
- GL.glLoadIdentity();
-
- GL.glMatrixMode(GL.GL_PROJECTION);
- GL.glLoadIdentity();
- GL.glOrtho(0, 1, 1, 0, -1, 1);
-
- self.m_functions.glClear(GL.GL_COLOR_BUFFER_BIT)
- self.m_functions.glEnable(GL.GL_TEXTURE_2D);
- self.m_texture.bind()
-
- d = 0.5
- GL.glBegin(GL.GL_QUADS)
- GL.glTexCoord2f(0, 0)
- GL.glVertex2f(0, 0)
- GL.glTexCoord2f(d, 0)
- GL.glVertex2f(d, 0)
- GL.glTexCoord2f(d, d)
- GL.glVertex2f(d, d)
- GL.glTexCoord2f(0, d)
- GL.glVertex2f(0, d)
- GL.glEnd()
- self.m_texture.release()
-
- def resizeGL(self, w, h):
- self.m_functions.glViewport(0, 0, self.width(), self.height())
-
-class QOpenGLWindowTest(UsesQApplication):
- # On macOS, glClear(), glViewport() are rejected due to GLbitfield/GLint not being resolved properly
- def test(self):
- openGlWindow = OpenGLWindow()
- openGlWindow.resize(640, 480)
- openGlWindow.show()
- QTimer.singleShot(100, openGlWindow.close)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtPositioning/positioning.py b/sources/pyside2/tests/QtPositioning/positioning.py
deleted file mode 100644
index 8b9b715c1..000000000
--- a/sources/pyside2/tests/QtPositioning/positioning.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Unit test for Positioning'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtPositioning import QGeoPositionInfoSource
-
-
-class QPositioningTestCase(unittest.TestCase):
- def test(self):
- source = QGeoPositionInfoSource.createDefaultSource(None)
- self.assertTrue(source is not None)
- name = source.sourceName()
- print('QtPositioning source: {}'.format(name))
- self.assertTrue(name)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtPrintSupport/bug_500.py b/sources/pyside2/tests/QtPrintSupport/bug_500.py
deleted file mode 100644
index 43146d021..000000000
--- a/sources/pyside2/tests/QtPrintSupport/bug_500.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtPrintSupport import *
-from helper.usesqapplication import UsesQApplication
-
-class NeverDiesTest(UsesQApplication):
-
- def testIt(self):
- QPrintDialog()
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
deleted file mode 100644
index 1c9ee918d..000000000
--- a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QTextCursor
-from PySide2.QtPrintSupport import QPrinter, QPrinterInfo
-from PySide2.QtWidgets import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem
-
-from helper.usesqapplication import UsesQApplication
-
-class Layout(QLayout):
- def __init__(self):
- QLayout.__init__(self)
-
-class GraphicsLayout(QGraphicsLayout):
- def __init__(self):
- QGraphicsLayout.__init__(self)
-
-class GraphicsLayoutItem(QGraphicsLayoutItem):
- def __init__(self):
- QGraphicsLayoutItem.__init__(self)
-
-class ReturnsQuadruplesOfNumbers(UsesQApplication):
- def compareTuples(self, ta, tb):
- for va,vb in zip(ta, tb):
- if round(va) != round(vb):
- return False
- return True
-
- def testQGraphicsLayoutGetContentsMargins(self):
- obj = GraphicsLayout()
- values = (10.0, 20.0, 30.0, 40.0)
- obj.setContentsMargins(*values)
- self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
-
- def testQGraphicsLayoutItemGetContentsMargins(self):
- obj = GraphicsLayoutItem()
- self.assertTrue(self.compareTuples(obj.getContentsMargins(), (0.0, 0.0, 0.0, 0.0)))
-
- def testQLayoutGetContentsMargins(self):
- obj = Layout()
- values = (10, 20, 30, 40)
- obj.setContentsMargins(*values)
- self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
-
- def testQTextCursorSelectedTableCells(self):
- obj = QTextCursor()
- self.assertEqual(obj.selectedTableCells(), (-1, -1, -1, -1))
-
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtQml/bug_1029.py b/sources/pyside2/tests/QtQml/bug_1029.py
deleted file mode 100644
index 36306e4a2..000000000
--- a/sources/pyside2/tests/QtQml/bug_1029.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import gc
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickView, QQuickItem
-
-def register_qml_types():
- class TestClass(QQuickItem):
- def __init__(self, parent = None):
- QQuickItem.__init__(self, parent)
-
- qmlRegisterType(TestClass, "UserTypes", 1, 0, "TestClass")
-
-def main():
- app = QGuiApplication([])
-
- # reg qml types here
- register_qml_types()
-
- # force gc to run
- gc.collect()
-
- view = QQuickView()
- url = QUrl(__file__.replace(".py", ".qml"))
- view.setSource(url)
-
-if __name__ == "__main__":
- main()
diff --git a/sources/pyside2/tests/QtQml/bug_451.py b/sources/pyside2/tests/QtQml/bug_451.py
deleted file mode 100644
index f87680638..000000000
--- a/sources/pyside2/tests/QtQml/bug_451.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''
-Test bug 451: http://bugs.openbossa.org/show_bug.cgi?id=451
-
-An archive of said bug:
-https://srinikom.github.io/pyside-bz-archive/451.html
-'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2 import QtCore, QtGui, QtQuick
-
-class PythonObject(QtCore.QObject):
- def __init__(self):
- QtCore.QObject.__init__(self, None)
- self._called = ""
- self._arg1 = None
- self._arg2 = None
-
- def setCalled(self, v):
- self._called = v
-
- def setArg1(self, v):
- self._arg1 = v
-
- def setArg2(self, v):
- self._arg2 = v
-
- def getCalled(self):
- return self._called
-
- def getArg1(self):
- return self._arg1
-
- def getArg2(self):
- return self._arg2
-
- called = QtCore.Property(str, getCalled, setCalled)
- arg1 = QtCore.Property(int, getArg1, setArg1)
- arg2 = QtCore.Property('QVariant', getArg2, setArg2)
-
-class TestBug(unittest.TestCase):
- def testQMLFunctionCall(self):
- app = QtGui.QGuiApplication(sys.argv)
- view = QtQuick.QQuickView()
-
- obj = PythonObject()
- context = view.rootContext()
- context.setContextProperty("python", obj)
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_451.qml', __file__)))
- root = view.rootObject()
- root.simpleFunction()
- self.assertEqual(obj.called, "simpleFunction")
-
- root.oneArgFunction(42)
- self.assertEqual(obj.called, "oneArgFunction")
- self.assertEqual(obj.arg1, 42)
-
- root.twoArgFunction(10, app)
- self.assertEqual(obj.called, "twoArgFunction")
- self.assertEqual(obj.arg1, 10)
- self.assertEqual(obj.arg2, app)
-
- rvalue = root.returnFunction()
- self.assertEqual(obj.called, "returnFunction")
- self.assertEqual(rvalue, 42)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_456.py b/sources/pyside2/tests/QtQml/bug_456.py
deleted file mode 100644
index a99ce2b80..000000000
--- a/sources/pyside2/tests/QtQml/bug_456.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2 import QtCore, QtGui, QtQuick
-
-class RotateValue(QtCore.QObject):
- def __init__(self):
- super(RotateValue,self).__init__()
-
- @QtCore.Slot(result=int)
- def val(self):
- return 100
-
- def setRotation(self, v):
- self._rotation = v
-
- def getRotation(self):
- return self._rotation
-
- rotation = QtCore.Property(int, getRotation, setRotation)
-
-class TestConnectionWithInvalidSignature(TimedQApplication):
-
- def testSlotRetur(self):
- view = QtQuick.QQuickView()
- rotatevalue = RotateValue()
-
- timer = QtCore.QTimer()
- timer.start(2000)
-
- context = view.rootContext()
- context.setContextProperty("rotatevalue", rotatevalue)
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_456.qml', __file__)))
- root = view.rootObject()
- button = root.findChild(QtCore.QObject, "buttonMouseArea")
- view.show()
- button.entered.emit()
- self.assertEqual(rotatevalue.rotation, 100)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_557.py b/sources/pyside2/tests/QtQml/bug_557.py
deleted file mode 100644
index 20892475f..000000000
--- a/sources/pyside2/tests/QtQml/bug_557.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlEngine, QQmlComponent
-
-app = QGuiApplication(sys.argv)
-
-engine = QQmlEngine()
-component = QQmlComponent(engine)
-
-# This should segfault if the QDeclarativeComponent has not QQmlEngine
-component.loadUrl(QUrl.fromLocalFile(adjust_filename('foo.qml', __file__)))
-
diff --git a/sources/pyside2/tests/QtQml/bug_726.py b/sources/pyside2/tests/QtQml/bug_726.py
deleted file mode 100644
index 795d8a13f..000000000
--- a/sources/pyside2/tests/QtQml/bug_726.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2 import QtCore, QtGui, QtQuick
-
-class ProxyObject(QtCore.QObject):
- def __init__(self):
- super(ProxyObject,self).__init__()
- self._o = None
- self._receivedName = ""
-
- @QtCore.Slot(result='QObject*')
- def getObject(self):
- if self._o:
- return self._o
-
- self._o = QtCore.QObject()
- self._o.setObjectName("PySideObject")
- return self._o
-
- @QtCore.Slot(str)
- def receivedObject(self, name):
- self._receivedName = name
-
-
-class TestConnectionWithInvalidSignature(TimedQApplication):
-
- def testSlotRetur(self):
- view = QtQuick.QQuickView()
- proxy = ProxyObject()
-
- context = view.rootContext()
- context.setContextProperty("proxy", proxy)
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_726.qml', __file__)))
- root = view.rootObject()
- button = root.findChild(QtCore.QObject, "buttonMouseArea")
- view.show()
- button.entered.emit()
- self.assertEqual(proxy._receivedName, "PySideObject")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_814.py b/sources/pyside2/tests/QtQml/bug_814.py
deleted file mode 100644
index c6f0b8441..000000000
--- a/sources/pyside2/tests/QtQml/bug_814.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Copyright (C) 2011 Thomas Perl <m@thp.io>
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Test case for PySide bug 814
-# http://bugs.pyside.org/show_bug.cgi?id=814
-# archive:
-# https://srinikom.github.io/pyside-bz-archive/814.html
-# 2011-04-08 Thomas Perl <m@thp.io>
-# Released under the same terms as PySide itself
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2.QtCore import QUrl, QAbstractListModel, QModelIndex, Qt
-from PySide2.QtQuick import QQuickView
-
-class ListModel(QAbstractListModel):
- def __init__(self):
- QAbstractListModel.__init__(self)
-
- def roleNames(self):
- return { Qt.DisplayRole: b'pysideModelData' }
-
- def rowCount(self, parent = QModelIndex()):
- return 3
-
- def data(self, index, role):
- if index.isValid() and role == Qt.DisplayRole:
- return 'blubb'
- return None
-
-class TestBug814(TimedQApplication):
- def testAbstractItemModelTransferToQML(self):
- view = QQuickView()
- model = ListModel()
- view.rootContext().setContextProperty("pythonModel", model)
- view.setSource(QUrl.fromLocalFile(adjust_filename('bug_814.qml', __file__)))
- root = view.rootObject()
- view.show()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtQml/bug_825.py b/sources/pyside2/tests/QtQml/bug_825.py
deleted file mode 100644
index 019653e93..000000000
--- a/sources/pyside2/tests/QtQml/bug_825.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import Qt, QUrl, QTimer
-from PySide2.QtGui import QGuiApplication, QPen
-from PySide2.QtWidgets import QGraphicsItem
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickView, QQuickItem, QQuickPaintedItem
-
-paintCalled = False
-
-class MetaA(type):
- pass
-
-class A(object):
- __metaclass__ = MetaA
-
-MetaB = type(QQuickPaintedItem)
-B = QQuickPaintedItem
-
-class MetaC(MetaA, MetaB):
- pass
-
-class C(A, B):
- __metaclass__ = MetaC
-
-class Bug825 (C):
- def __init__(self, parent = None):
- QQuickPaintedItem.__init__(self, parent)
-
- def paint(self, painter):
- global paintCalled
- pen = QPen(Qt.black, 2)
- painter.setPen(pen);
- painter.drawPie(self.boundingRect(), 0, 128);
- paintCalled = True
-
-class TestBug825 (unittest.TestCase):
- def testIt(self):
- global paintCalled
- app = QGuiApplication([])
- qmlRegisterType(Bug825, 'bugs', 1, 0, 'Bug825')
- self.assertRaises(TypeError, qmlRegisterType, A, 'bugs', 1, 0, 'A')
-
- view = QQuickView()
- view.setSource(QUrl.fromLocalFile(adjust_filename('bug_825.qml', __file__)))
- view.show()
- QTimer.singleShot(250, view.close)
- app.exec_()
- self.assertTrue(paintCalled)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_847.py b/sources/pyside2/tests/QtQml/bug_847.py
deleted file mode 100644
index ac5836459..000000000
--- a/sources/pyside2/tests/QtQml/bug_847.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Copyright (C) 2011 Thomas Perl <m@thp.io>
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Testcase for PySide bug 847
-# Released under the same terms as PySide itself
-# 2011-05-04 Thomas Perl <m@thp.io>
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import Slot, Signal, QUrl, QTimer, QCoreApplication
-from PySide2.QtQuick import QQuickView
-
-class View(QQuickView):
- def __init__(self):
- QQuickView.__init__(self)
-
- called = Signal(int, int)
-
- @Slot(int, int)
- def blubb(self, x, y):
- self.called.emit(x, y)
-
-class TestQML(UsesQApplication):
- def done(self, x, y):
- self._sucess = True
- self.app.quit()
- print("done called")
-
- def testPythonSlot(self):
- self._sucess = False
- view = View()
-
- # Connect first, then set the property.
- view.called.connect(self.done)
- view.setSource(QUrl.fromLocalFile(adjust_filename('bug_847.qml', __file__)))
- while view.status() == QQuickView.Loading:
- self.app.processEvents()
- self.assertEqual(view.status(), QQuickView.Ready)
- self.assertTrue(view.rootObject())
- view.rootObject().setProperty('pythonObject', view)
-
- view.show()
- while not view.isExposed():
- self.app.processEvents()
-
- # Essentially a timeout in case method invocation fails.
- QTimer.singleShot(30000, QCoreApplication.instance().quit)
- self.app.exec_()
- self.assertTrue(self._sucess)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtQml/bug_915.py b/sources/pyside2/tests/QtQml/bug_915.py
deleted file mode 100644
index 9c888b4ae..000000000
--- a/sources/pyside2/tests/QtQml/bug_915.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.timedqapplication import TimedQApplication
-
-from PySide2.QtQuick import QQuickView, QQuickItem
-
-class TestBug915(TimedQApplication):
- def testReturnPolicy(self):
- view = QQuickView()
-
- item1 = QQuickItem()
- item1.setObjectName("Item1")
- item1.setParentItem(view.contentItem())
- self.assertEqual(item1.objectName(), "Item1") # check if the item still valid
-
- item2 = QQuickItem()
- item2.setObjectName("Item2")
- item2.setParentItem(view.contentItem())
- item1 = None
- self.assertEqual(item2.objectName(), "Item2") # check if the item still valid
-
- view = None
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/QtQml/bug_926.py b/sources/pyside2/tests/QtQml/bug_926.py
deleted file mode 100644
index 0764b8e97..000000000
--- a/sources/pyside2/tests/QtQml/bug_926.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import QUrl, QTimer, QObject, Signal, Property
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickView
-
-class MyClass (QObject):
-
- def __init__(self):
- super(MyClass,self).__init__()
- self.__url = QUrl()
-
- def getUrl(self):
- return self.__url
-
- def setUrl(self,value):
- newUrl = QUrl(value)
- if (newUrl != self.__url):
- self.__url = newUrl
- self.urlChanged.emit()
-
- urlChanged = Signal()
- urla = Property(QUrl, getUrl, setUrl, notify = urlChanged)
-
-class TestBug926 (unittest.TestCase):
- def testIt(self):
- app = QGuiApplication([])
- qmlRegisterType(MyClass,'Example',1,0,'MyClass')
- view = QQuickView()
- view.setSource(QUrl.fromLocalFile(adjust_filename('bug_926.qml', __file__)))
- self.assertEqual(len(view.errors()), 0)
- view.show()
- QTimer.singleShot(0, app.quit)
- app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_951.py b/sources/pyside2/tests/QtQml/bug_951.py
deleted file mode 100644
index 8919f5880..000000000
--- a/sources/pyside2/tests/QtQml/bug_951.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2.QtCore import QUrl
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickItem, QQuickView
-
-class MyItem(QQuickItem):
- COMPONENT_COMPLETE_CALLED = False
- def __init__(self,parent=None):
- super(MyItem, self).__init__(parent)
- self.setObjectName("myitem")
-
- def componentComplete(self):
- MyItem.COMPONENT_COMPLETE_CALLED = True
- super(MyItem, self).componentComplete()
-
-class TestRegisterQMLType(TimedQApplication):
- def setup(self):
- TimedQApplication.setup(self, 100 * 3) # 3s
-
- def testSignalEmission(self):
- qmlRegisterType(MyItem, "my.item", 1, 0, "MyItem")
-
- view = QQuickView()
- view.setSource(QUrl.fromLocalFile(adjust_filename('bug_951.qml', __file__)))
-
- self.app.exec_()
- self.assertTrue(MyItem.COMPONENT_COMPLETE_CALLED)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_995.py b/sources/pyside2/tests/QtQml/bug_995.py
deleted file mode 100644
index 945cd5bcc..000000000
--- a/sources/pyside2/tests/QtQml/bug_995.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
-
-app = QGuiApplication([])
-view = QQuickView(adjust_filename('bug_995.qml', __file__))
-view.show()
-view.resize(200, 200)
-contentItem = view.contentItem()
-item = contentItem.childAt(100, 100)
-
-# it CAN NOT crash here
-print(item)
-
diff --git a/sources/pyside2/tests/QtQml/bug_997.py b/sources/pyside2/tests/QtQml/bug_997.py
deleted file mode 100644
index 597e253e5..000000000
--- a/sources/pyside2/tests/QtQml/bug_997.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-from PySide2 import QtCore, QtQml, QtQuick
-
-class TestBug(UsesQApplication):
- def testQMLFunctionCall(self):
- ownerData = QtQml.QQmlPropertyMap()
- ownerData.insert('name', 'John Smith')
- ownerData.insert('phone', '555-5555')
- ownerData.insert('newValue', '')
-
- view = QtQuick.QQuickView()
- ctxt = view.rootContext()
- ctxt.setContextProperty('owner', ownerData)
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_997.qml', __file__)))
- view.show()
- QtCore.QTimer.singleShot(1000, self.app.quit)
- self.app.exec_()
- self.assertEqual(ownerData.value('newName'), ownerData.value('name'))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/connect_python_qml.py b/sources/pyside2/tests/QtQml/connect_python_qml.py
deleted file mode 100644
index 22134efe7..000000000
--- a/sources/pyside2/tests/QtQml/connect_python_qml.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''
-Test case for bug #442
-
-archive:
-https://srinikom.github.io/pyside-bz-archive/442.html
-'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2 import QtCore, QtGui, QtQuick
-
-class TestConnectionWithInvalidSignature(TimedQApplication):
- def onButtonClicked(self):
- self.buttonClicked = True
- self.app.quit()
-
- def onButtonFailClicked(self):
- pass
-
- def testFailConnection(self):
- self.buttonClicked = False
- self.buttonFailClicked = False
- view = QtQuick.QQuickView()
- view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('connect_python_qml.qml', __file__)))
- root = view.rootObject()
- button = root.findChild(QtCore.QObject, "buttonMouseArea")
- self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('entered()'), self.onButtonFailClicked])
- button.entered.connect(self.onButtonClicked)
- button.entered.emit()
- view.show()
- self.app.exec_()
- self.assertTrue(self.buttonClicked)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/javascript_exceptions.py b/sources/pyside2/tests/QtQml/javascript_exceptions.py
deleted file mode 100644
index a5e6a4b43..000000000
--- a/sources/pyside2/tests/QtQml/javascript_exceptions.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import Slot, Property, Signal, QObject, QUrl
-from PySide2.QtQml import QJSEngine, qmlRegisterType
-from PySide2.QtQuick import QQuickView
-
-test_error_message = "This is an error."
-
-method_test_string = """
-(function (obj) {
- obj.methodThrows();
-})
-"""
-
-property_test_string = """
-(function (obj) {
- obj.propertyThrows;
-})
-"""
-
-test_1 = False
-test_2 = False
-
-class TestClass(QObject):
- @Slot()
- def methodThrows(self):
- raise TypeError(test_error_message)
-
- @Property(str)
- def propertyThrows(self):
- raise TypeError(test_error_message)
-
- @Slot(int)
- def passTest(self, test):
- global test_1, test_2
-
- if test == 1:
- test_1 = True
- else:
- test_2 = True
-
-class JavaScriptExceptionsTest(UsesQApplication):
- def test_jsengine(self):
- engine = QJSEngine()
- test_object = TestClass()
- test_value = engine.newQObject(test_object)
-
- result_1 = engine.evaluate(method_test_string).call([test_value])
-
- self.assertTrue(result_1.isError())
- self.assertEqual(result_1.property('message').toString(), test_error_message)
- self.assertEqual(result_1.property('name').toString(), 'TypeError')
-
- result_2 = engine.evaluate(property_test_string).call([test_value])
-
- self.assertTrue(result_2.isError())
- self.assertEqual(result_2.property('message').toString(), test_error_message)
- self.assertEqual(result_2.property('name').toString(), 'TypeError')
-
- def test_qml_type(self):
- qmlRegisterType(TestClass, 'JavaScriptExceptions', 1, 0, 'JavaScriptExceptions');
-
- view = QQuickView()
- qml_url = QUrl.fromLocalFile(adjust_filename('javascript_exceptions.qml', __file__))
-
- view.setSource(qml_url)
-
- self.assertTrue(test_1)
- self.assertTrue(test_2)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/listproperty.py b/sources/pyside2/tests/QtQml/listproperty.py
deleted file mode 100644
index 6337e5fa4..000000000
--- a/sources/pyside2/tests/QtQml/listproperty.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import unittest
-
-from PySide2.QtCore import QObject
-from PySide2.QtQml import ListProperty
-
-class InheritsQObject(QObject):
- pass
-
-def dummyFunc():
- pass
-
-class TestListProperty(unittest.TestCase):
- def testIt(self):
-
- # Verify that type checking works properly
- type_check_error = False
-
- try:
- ListProperty(QObject)
- ListProperty(InheritsQObject)
- except:
- type_check_error = True
-
- self.assertFalse(type_check_error)
-
- try:
- ListProperty(int)
- except TypeError:
- type_check_error = True
-
- self.assertTrue(type_check_error)
-
- # Verify that method validation works properly
- method_check_error = False
-
- try:
- ListProperty(QObject, append=None, at=None, count=None, replace=None, clear=None, removeLast=None) # Explicitly setting None
- ListProperty(QObject, append=dummyFunc)
- ListProperty(QObject, count=dummyFunc, at=dummyFunc)
- except:
- method_check_error = True
-
- self.assertFalse(method_check_error)
-
- try:
- ListPropery(QObject, append=QObject())
- except:
- method_check_error = True
-
- self.assertTrue(method_check_error)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py b/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py
deleted file mode 100644
index f33d852a7..000000000
--- a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import QObject, QUrl, Slot, QTimer
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlIncubationController, VolatileBool
-from PySide2.QtQuick import QQuickView
-
-class CustomIncubationController(QObject, QQmlIncubationController):
- def __init__(self, test):
- QObject.__init__(self)
- QQmlIncubationController.__init__(self)
- self.test = test
- self.interrupted = False
-
- # Incubate every 50 milliseconds
- self.startTimer(50)
- self.incubationShouldContinue = VolatileBool(True)
- self.test.assertEqual(self.incubationShouldContinue.get(), True)
-
- @Slot()
- def interrupter(self):
- if not self.interrupted:
- self.interrupted = True
- self.incubationShouldContinue.set(False)
- self.test.assertEqual(self.incubationShouldContinue.get(), False)
- QTimer.singleShot(0, QGuiApplication.instance().quit)
-
- def timerEvent(self, ev):
- # Incubate items for 2000 milliseconds, or until the volatile bool is set to false.
- self.incubateWhile(self.incubationShouldContinue, 2000)
-
-class TestBug(unittest.TestCase):
- def testIncubateWhileCall(self):
- app = QGuiApplication(sys.argv)
- view = QQuickView()
- controller = CustomIncubationController(self)
- view.engine().setIncubationController(controller)
- view.setResizeMode(QQuickView.SizeRootObjectToView)
- view.setSource(QUrl.fromLocalFile(adjust_filename('qqmlincubator_incubateWhile.qml',
- __file__)))
- view.show()
-
- root = view.rootObject()
- # The QML code will issue an interrupt signal after half of its items are loaded.
- root.shouldInterrupt.connect(controller.interrupter)
- res = app.exec_()
-
- itemsToCreate = root.property("itemsToCreate")
- loadedItems = root.property("loadedItems")
- self.assertEqual(loadedItems, itemsToCreate / 2)
-
- # Finish incubating the remaining items.
- controller.incubateFor(1000)
- loadedItems = root.property("loadedItems")
- self.assertEqual(loadedItems, itemsToCreate)
-
- # Deleting the view before it goes out of scope is required to make sure all child QML
- # instances are destroyed in the correct order.
- del view
- del app
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qqmlnetwork_test.py b/sources/pyside2/tests/QtQml/qqmlnetwork_test.py
deleted file mode 100644
index 2cc273431..000000000
--- a/sources/pyside2/tests/QtQml/qqmlnetwork_test.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QQmlNetwork'''
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QUrl
-from PySide2.QtQuick import QQuickView
-from PySide2.QtQml import QQmlNetworkAccessManagerFactory
-from PySide2.QtNetwork import QNetworkAccessManager
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-
-class CustomManager(QNetworkAccessManager):
- def createRequest(self, op, req, data = None):
- print(">> createRequest ", self, op, req.url(), data)
- return QNetworkAccessManager.createRequest(self, op, req, data)
-
-class CustomFactory(QQmlNetworkAccessManagerFactory):
- def create(self, parent = None):
- return CustomManager()
-
-class TestQQmlNetworkFactory(TimedQApplication):
- def setUp(self):
- TimedQApplication.setUp(self, timeout=1000)
-
- def testQQuickNetworkFactory(self):
- view = QQuickView()
- self.factory = CustomFactory()
- view.engine().setNetworkAccessManagerFactory(self.factory)
-
- url = QUrl.fromLocalFile(adjust_filename('hw.qml', __file__))
-
- view.setSource(url)
- view.show()
-
- self.assertEqual(view.status(), QQuickView.Ready)
-
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py b/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py
deleted file mode 100644
index 6735d5230..000000000
--- a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2 import QtCore, QtGui, QtQuick
-
-class TestGrabToSharedPointerImage(TimedQApplication):
- def setUp(self):
- TimedQApplication.setUp(self, 1000)
-
- def testQQuickItemGrabToImageSharedPointer(self):
- view = QtQuick.QQuickView()
- view.setSource(QtCore.QUrl.fromLocalFile(
- adjust_filename('qquickitem_grabToImage.qml', __file__)))
- view.show()
-
- # Get the QQuickItem objects for the blue Rectangle and the Image item.
- root = view.rootObject()
- blueRectangle = root.findChild(QtQuick.QQuickItem, "blueRectangle")
- imageContainer = root.findChild(QtQuick.QQuickItem, "imageContainer")
-
- # Start the image grabbing.
- grabResultSharedPtr = blueRectangle.grabToImage()
-
- # Implicit call of operator bool() of the smart pointer, to check that it holds
- # a valid pointer.
- self.assertTrue(grabResultSharedPtr)
-
- self.grabbedColor = None
- def onGrabReady():
- # Signal early exit.
- QtCore.QTimer.singleShot(0, self.app.quit)
-
- # Show the grabbed image in the QML Image item.
- imageContainer.setProperty("source", grabResultSharedPtr.url())
-
- # Wait for signal when grabbing is complete.
- grabResultSharedPtr.ready.connect(onGrabReady)
- self.app.exec_()
-
- # Get the first pixel color of the grabbed image.
- self.image = grabResultSharedPtr.image()
- self.assertTrue(self.image)
- self.grabbedColor = self.image.pixelColor(0,0)
- self.assertTrue(self.grabbedColor.isValid())
-
- # Compare the grabbed color with the one we set in the rectangle.
- blueColor = QtGui.QColor("blue")
- self.assertEqual(self.grabbedColor, blueColor)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qquickview_test.py b/sources/pyside2/tests/QtQml/qquickview_test.py
deleted file mode 100644
index 9694cf56e..000000000
--- a/sources/pyside2/tests/QtQml/qquickview_test.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QQuickView'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2.QtCore import QUrl, QObject, Property, Slot
-from PySide2.QtQml import QtQml, QQmlEngine
-from PySide2.QtQuick import QQuickView
-
-class MyObject(QObject):
- def __init__(self, text, parent=None):
- QObject.__init__(self, parent)
- self._text = text
-
- def getText(self):
- return self._text
-
-
- @Slot(str)
- def qmlText(self, text):
- self._qmlText = text
-
- title = Property(str, getText)
-
-
-class TestQQuickView(TimedQApplication):
-
- def testQQuickViewList(self):
- view = QQuickView()
-
- dataList = ["Item 1", "Item 2", "Item 3", "Item 4"]
-
- ctxt = view.rootContext()
- ctxt.setContextProperty("myModel", dataList)
-
- url = QUrl.fromLocalFile(adjust_filename('view.qml', __file__))
- view.setSource(url)
- view.show()
-
- self.assertEqual(view.status(), QQuickView.Ready)
- rootObject = view.rootObject()
- self.assertTrue(rootObject)
- context = QQmlEngine.contextForObject(rootObject)
- self.assertTrue(context)
- self.assertTrue(context.engine())
-
- def testModelExport(self):
- view = QQuickView()
- dataList = [MyObject("Item 1"), MyObject("Item 2"), MyObject("Item 3"), MyObject("Item 4")]
-
- ctxt = view.rootContext()
- ctxt.setContextProperty("myModel", dataList)
-
- url = QUrl.fromLocalFile(adjust_filename('viewmodel.qml', __file__))
- view.setSource(url)
- view.show()
-
- self.assertEqual(view.status(), QQuickView.Ready)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/registersingletontype.py b/sources/pyside2/tests/QtQml/registersingletontype.py
deleted file mode 100644
index fe3f749f5..000000000
--- a/sources/pyside2/tests/QtQml/registersingletontype.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import Property, Signal, QTimer, QUrl, QObject
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import qmlRegisterSingletonType
-from PySide2.QtQuick import QQuickView
-
-finalResult = 0
-
-class SingletonQObject(QObject):
- def __init__(self, parent = None):
- QObject.__init__(self, parent)
- self._data = 100
-
- def getData(self):
- return self._data
-
- def setData(self, data):
- global finalResult
- finalResult = self._data = data
-
- data = Property(int, getData, setData)
-
-def singletonQObjectCallback(engine):
- obj = SingletonQObject()
- obj.setData(50)
- return obj
-
-def singletonQJSValueCallback(engine):
- return engine.evaluate("new Object({data: 50})")
-
-class TestQmlSupport(unittest.TestCase):
- def testIt(self):
- app = QGuiApplication([])
-
- qmlRegisterSingletonType(SingletonQObject, 'Singletons', 1, 0, 'SingletonQObjectNoCallback')
- qmlRegisterSingletonType(SingletonQObject, 'Singletons', 1, 0, 'SingletonQObjectCallback',
- singletonQObjectCallback)
-
- qmlRegisterSingletonType('Singletons', 1, 0, 'SingletonQJSValue', singletonQJSValueCallback)
-
- view = QQuickView()
- view.setSource(QUrl.fromLocalFile(adjust_filename('registersingletontype.qml', __file__)))
- view.show()
- QTimer.singleShot(250, view.close)
- app.exec_()
- self.assertEqual(finalResult, 200)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/registertype.py b/sources/pyside2/tests/QtQml/registertype.py
deleted file mode 100644
index 2c0577fe3..000000000
--- a/sources/pyside2/tests/QtQml/registertype.py
+++ /dev/null
@@ -1,125 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import Property, QObject, QTimer, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QColor, QPainter
-from PySide2.QtQml import qmlRegisterType, ListProperty, QmlElement
-from PySide2.QtQuick import QQuickView, QQuickItem, QQuickPaintedItem
-
-QML_IMPORT_NAME = "Charts"
-QML_IMPORT_MAJOR_VERSION = 1
-
-@QmlElement
-class PieSlice (QQuickPaintedItem):
- def __init__(self, parent = None):
- QQuickPaintedItem.__init__(self, parent)
- self._color = QColor()
- self._fromAngle = 0
- self._angleSpan = 0
-
- def getColor(self):
- return self._color
-
- def setColor(self, value):
- self._color = value
-
- def getFromAngle(self):
- return self._angle
-
- def setFromAngle(self, value):
- self._fromAngle = value
-
- def getAngleSpan(self):
- return self._angleSpan
-
- def setAngleSpan(self, value):
- self._angleSpan = value
-
- color = Property(QColor, getColor, setColor)
- fromAngle = Property(int, getFromAngle, setFromAngle)
- angleSpan = Property(int, getAngleSpan, setAngleSpan)
-
- def paint(self, painter):
- global paintCalled
- pen = QPen(self._color, 2)
- painter.setPen(pen);
- painter.setRenderHints(QPainter.Antialiasing, True);
- painter.drawPie(self.boundingRect(), self._fromAngle * 16, self._angleSpan * 16);
- paintCalled = True
-
-@QmlElement
-class PieChart (QQuickItem):
- def __init__(self, parent = None):
- QQuickItem.__init__(self, parent)
- self._name = ''
- self._slices = []
-
- def getName(self):
- return self._name
-
- def setName(self, value):
- self._name = value
-
- name = Property(str, getName, setName)
-
- def appendSlice(self, _slice):
- global appendCalled
- _slice.setParentItem(self)
- self._slices.append(_slice)
- appendCalled = True
-
- slices = ListProperty(PieSlice, append=appendSlice)
-
-appendCalled = False
-paintCalled = False
-
-class TestQmlSupport(unittest.TestCase):
-
- def testIt(self):
- app = QGuiApplication([])
-
- view = QQuickView()
- view.setSource(QUrl.fromLocalFile(adjust_filename('registertype.qml', __file__)))
- view.show()
- QTimer.singleShot(250, view.close)
- app.exec_()
- self.assertTrue(appendCalled)
- self.assertTrue(paintCalled)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/registeruncreatabletype.py b/sources/pyside2/tests/QtQml/registeruncreatabletype.py
deleted file mode 100644
index 820dc6cc1..000000000
--- a/sources/pyside2/tests/QtQml/registeruncreatabletype.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import Property, QObject, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import qmlRegisterUncreatableType, QQmlEngine, QQmlComponent
-
-noCreationReason = 'Cannot create an item of type: Uncreatable (expected)';
-
-class Uncreatable(QObject):
- def __init__(self, parent = None):
- QObject.__init__(self, parent)
- self._name = 'uncreatable'
-
- def getName(self):
- return self._name
-
- def setName(self, value):
- self._name = value
-
- name = Property(str, getName, setName)
-
-class TestQmlSupport(unittest.TestCase):
-
- def testIt(self):
- app = QGuiApplication([])
-
- self.assertTrue(qmlRegisterUncreatableType(Uncreatable, 'Charts', 1, 0,
- 'Uncreatable', noCreationReason) != -1);
-
- engine = QQmlEngine()
- component = QQmlComponent(engine, QUrl.fromLocalFile(adjust_filename('registeruncreatable.qml', __file__)))
-
- # Check that the uncreatable item produces the correct error
- self.assertEqual(component.status(), QQmlComponent.Error)
- errorFound = False
- for e in component.errors():
- if noCreationReason in e.toString():
- errorFound = True
- break
- self.assertTrue(errorFound)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtQml/signal_arguments.py b/sources/pyside2/tests/QtQml/signal_arguments.py
deleted file mode 100644
index 16257a22f..000000000
--- a/sources/pyside2/tests/QtQml/signal_arguments.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-from PySide2.QtQuick import QQuickView
-from PySide2.QtCore import QObject, Signal, Slot, QUrl, QTimer, Property
-
-class Obj(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.value = 0
-
- sumResult = Signal(int, name="sumResult", arguments=['sum'])
-
- @Slot(int, int)
- def sum(self, arg1, arg2):
- self.sumResult.emit(arg1 + arg2)
-
- @Slot(str)
- def sendValue(self, s):
- self.value = int(s)
-
-
-class TestConnectionWithQml(TimedQApplication):
-
- def testSignalArguments(self):
- view = QQuickView()
- obj = Obj()
-
- context = view.rootContext()
- context.setContextProperty("o", obj)
- view.setSource(QUrl.fromLocalFile(adjust_filename('signal_arguments.qml', __file__)))
- root = view.rootObject()
- self.assertTrue(root)
- button = root.findChild(QObject, "button")
- self.assertTrue(button)
- view.show()
- button.clicked.emit()
- self.assertEqual(obj.value, 42)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtScxml/test_dynamic.py b/sources/pyside2/tests/QtScxml/test_dynamic.py
deleted file mode 100644
index 51672a9bb..000000000
--- a/sources/pyside2/tests/QtScxml/test_dynamic.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.timedqapplication import TimedQApplication
-from PySide2.QtCore import QObject, SIGNAL
-from PySide2.QtScxml import QScxmlStateMachine
-
-class testDynamicStateMachine(TimedQApplication):
- def setUp(self):
- super(testDynamicStateMachine, self).setUp()
- filePath = os.path.join(os.path.dirname(__file__), 'trafficlight.scxml')
- self.assertTrue(os.path.exists(filePath))
- self._machine = QScxmlStateMachine.fromFile(filePath)
- self._machine.reachedStableState.connect(self._reachedStable())
- self.assertTrue(not self._machine.parseErrors())
- self.assertTrue(self._machine)
-
- def _reachedStable(self):
- self.app.quit()
-
- def test(self):
- self._machine.start()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtSensors/sensors.py b/sources/pyside2/tests/QtSensors/sensors.py
deleted file mode 100644
index 360d68999..000000000
--- a/sources/pyside2/tests/QtSensors/sensors.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QSensor'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtSensors import QSensor, QSensorReading
-
-
-class QSensorTest(unittest.TestCase):
- def test(self):
- for sensorType in QSensor.sensorTypes():
- identifiers = QSensor.sensorsForType(sensorType)
- values = []
- usedIdentifier = None
- for identifier in identifiers:
- sensor = QSensor(sensorType, None);
- sensor.setIdentifier(identifier)
- if sensor.connectToBackend():
- usedIdentifier = identifier
- reading = sensor.reading()
- for i in range(0, reading.valueCount()):
- values.append(reading.value(i))
- break
- if usedIdentifier:
- print('Sensor ', sensorType, usedIdentifier, values)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtSerialPort/serial.py b/sources/pyside2/tests/QtSerialPort/serial.py
deleted file mode 100644
index 7c0839d8e..000000000
--- a/sources/pyside2/tests/QtSerialPort/serial.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QSerialPort'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtSerialPort import QSerialPort, QSerialPortInfo
-from PySide2.QtCore import QIODevice
-
-class QSerialPortTest(unittest.TestCase):
- def testDefaultConstructedPort(self):
- serialPort = QSerialPort()
-
- self.assertEqual(serialPort.error(), QSerialPort.NoError)
- self.assertTrue(not serialPort.errorString() == "")
-
- # properties
- defaultBaudRate = QSerialPort.Baud9600
- self.assertEqual(serialPort.baudRate(), defaultBaudRate)
- self.assertEqual(serialPort.baudRate(QSerialPort.Input), defaultBaudRate)
- self.assertEqual(serialPort.baudRate(QSerialPort.Output), defaultBaudRate)
- self.assertEqual(serialPort.dataBits(), QSerialPort.Data8)
- self.assertEqual(serialPort.parity(), QSerialPort.NoParity)
- self.assertEqual(serialPort.stopBits(), QSerialPort.OneStop)
- self.assertEqual(serialPort.flowControl(), QSerialPort.NoFlowControl)
-
- self.assertEqual(serialPort.pinoutSignals(), QSerialPort.NoSignal)
- self.assertEqual(serialPort.isRequestToSend(), False)
- self.assertEqual(serialPort.isDataTerminalReady(), False)
-
- # QIODevice
- self.assertEqual(serialPort.openMode(), QIODevice.NotOpen)
- self.assertTrue(not serialPort.isOpen())
- self.assertTrue(not serialPort.isReadable())
- self.assertTrue(not serialPort.isWritable())
- self.assertTrue(serialPort.isSequential())
- self.assertEqual(serialPort.canReadLine(), False)
- self.assertEqual(serialPort.pos(), 0)
- self.assertEqual(serialPort.size(), 0)
- self.assertTrue(serialPort.atEnd())
- self.assertEqual(serialPort.bytesAvailable(), 0)
- self.assertEqual(serialPort.bytesToWrite(), 0)
-
- def testOpenExisting(self):
- allportinfos = QSerialPortInfo.availablePorts()
- for portinfo in allportinfos:
- serialPort = QSerialPort(portinfo)
- self.assertEqual(serialPort.portName(), portinfo.portName())
-
-
-class QSerialPortInfoTest(unittest.TestCase):
- def test_available_ports(self):
- allportinfos = QSerialPortInfo.availablePorts()
- for portinfo in allportinfos:
- portinfo.description()
- portinfo.hasProductIdentifier()
- portinfo.hasVendorIdentifier()
- portinfo.isNull()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtSql/bug_1013.py b/sources/pyside2/tests/QtSql/bug_1013.py
deleted file mode 100644
index 3cade31f4..000000000
--- a/sources/pyside2/tests/QtSql/bug_1013.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtSql import *
-
-
-class TestBug1013 (unittest.TestCase):
-
- def someSlot(self, row, record):
- record.setValue(0, 2)
- self._wasCalled = True
-
- def testIt(self):
- app = QCoreApplication([])
- db = QSqlDatabase.addDatabase('QSQLITE')
- db.setDatabaseName(':memory:')
- db.open()
- query = QSqlQuery()
- query.exec_('CREATE TABLE "foo" (id INT);')
- model = QSqlTableModel()
- model.setTable('foo')
-
- self._wasCalled = False
- model.primeInsert.connect(self.someSlot)
- model.select()
- QTimer.singleShot(0,lambda: model.insertRow(0) and app.quit())
- app.exec_()
- self.assertTrue(self._wasCalled)
- self.assertEqual(model.data(model.index(0, 0)), 2)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py b/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py
deleted file mode 100644
index 7db28b992..000000000
--- a/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QtSql database creation, destruction and queries'''
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtSql
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class Foo(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.model = QtSql.QSqlTableModel()
-
-class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase):
- '''Test cases for QtSql database creation, destruction and queries'''
-
- def setUp(self):
- #Acquire resources
- self.assertFalse(not QtSql.QSqlDatabase.drivers(), "installed Qt has no DB drivers")
- self.assertTrue("QSQLITE" in QtSql.QSqlDatabase.drivers(), "\"QSQLITE\" driver not available in this Qt version")
- self.db = QtSql.QSqlDatabase.addDatabase("QSQLITE")
- self.db.setDatabaseName(":memory:")
- self.assertTrue(self.db.open())
-
- def tearDown(self):
- #Release resources
- self.db.close()
- QtSql.QSqlDatabase.removeDatabase(":memory:")
- del self.db
-
- def testTableCreationAndDestruction(self):
- #Test table creation and destruction
- query = QtSql.QSqlQuery()
- query.exec_("CREATE TABLE dummy(id int primary key, dummyfield varchar(20))")
- query.exec_("DROP TABLE dummy")
- query.clear()
-
- def testTableInsertionAndRetrieval(self):
- #Test table creation, insertion and retrieval
- query = QtSql.QSqlQuery()
- query.exec_("CREATE TABLE person(id int primary key, "
- "firstname varchar(20), lastname varchar(20))")
- query.exec_("INSERT INTO person VALUES(101, 'George', 'Harrison')")
- query.prepare("INSERT INTO person (id, firstname, lastname) "
- "VALUES (:id, :firstname, :lastname)")
- query.bindValue(":id", 102)
- query.bindValue(":firstname", "John")
- query.bindValue(":lastname", "Lennon")
- query.exec_()
-
- lastname = ''
- query.exec_("SELECT lastname FROM person where id=101")
- self.assertTrue(query.isActive())
- query.next()
- lastname = query.value(0)
- self.assertEqual(lastname, 'Harrison')
-
- def testTableModelDeletion(self):
- app = QApplication([])
-
- bar = Foo()
- model = bar.model
- del bar
- del app
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtSql/qvarianttype_test.py b/sources/pyside2/tests/QtSql/qvarianttype_test.py
deleted file mode 100644
index 05d456e28..000000000
--- a/sources/pyside2/tests/QtSql/qvarianttype_test.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QVariant::Type converter'''
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtSql import QSqlField
-
-class QVariantTypeTest(unittest.TestCase):
- def testQVariantType(self):
- f = QSqlField("name", str)
- self.assertEqual(f.type(), str)
-
- f = QSqlField("name", "QString")
- self.assertEqual(f.type(), str)
-
- f = QSqlField("name", "double")
- self.assertEqual(f.type(), float)
-
- f = QSqlField("name", float)
- self.assertEqual(f.type(), float)
-
- f = QSqlField("name", int)
- self.assertEqual(f.type(), int)
-
- f = QSqlField("name", None)
- self.assertEqual(f.type(), None)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtSvg/qsvggenerator_test.py b/sources/pyside2/tests/QtSvg/qsvggenerator_test.py
deleted file mode 100644
index e4680f6ca..000000000
--- a/sources/pyside2/tests/QtSvg/qsvggenerator_test.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QBuffer
-from PySide2.QtSvg import QSvgGenerator
-
-class QSvgGeneratorTest(unittest.TestCase):
-
- def testRefCountOfTOutputDevice(self):
- generator = QSvgGenerator()
- iodevice1 = QBuffer()
- refcount1 = getrefcount(iodevice1)
-
- generator.setOutputDevice(iodevice1)
-
- self.assertEqual(generator.outputDevice(), iodevice1)
- self.assertEqual(getrefcount(generator.outputDevice()), refcount1 + 1)
-
- iodevice2 = QBuffer()
- refcount2 = getrefcount(iodevice2)
-
- generator.setOutputDevice(iodevice2)
-
- self.assertEqual(generator.outputDevice(), iodevice2)
- self.assertEqual(getrefcount(generator.outputDevice()), refcount2 + 1)
- self.assertEqual(getrefcount(iodevice1), refcount1)
-
- del generator
-
- self.assertEqual(getrefcount(iodevice2), refcount2)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py b/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py
deleted file mode 100644
index 3dd5b61f6..000000000
--- a/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QFile
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtSvg import QSvgRenderer
-
-class QSvgRendererTest(unittest.TestCase):
-
- def testLoad(self):
- tigerPath = os.path.join(os.path.dirname(__file__), 'tiger.svg')
- app = QGuiApplication([])
-
- fromFile = QSvgRenderer(tigerPath)
- self.assertTrue(fromFile.isValid())
-
- tigerFile = QFile(tigerPath)
- tigerFile.open(QFile.ReadOnly)
- tigerData = tigerFile.readAll()
- fromContents = QSvgRenderer(tigerData)
- self.assertTrue(fromContents.isValid())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtSvgWidgets/qsvgwidget_test.py b/sources/pyside2/tests/QtSvgWidgets/qsvgwidget_test.py
deleted file mode 100644
index a3749c0ee..000000000
--- a/sources/pyside2/tests/QtSvgWidgets/qsvgwidget_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QFile, QFileInfo, QDir
-from PySide2.QtWidgets import QApplication
-from PySide2.QtSvgWidgets import QSvgWidget
-
-class QSvgWidgetTest(unittest.TestCase):
-
- def testLoad(self):
- dir = os.path.dirname(__file__)
- tigerPath = QDir.cleanPath("{}/../QtSvg/tiger.svg".format(dir))
- self.assertTrue(QFileInfo.exists(tigerPath))
-
- app = QApplication([])
- fromFile = QSvgWidget()
- fromFile.load(tigerPath)
- self.assertTrue(fromFile.renderer().isValid())
-
- tigerFile = QFile(tigerPath)
- tigerFile.open(QFile.ReadOnly)
- tigerData = tigerFile.readAll()
- fromContents = QSvgWidget()
- fromContents.load(tigerData)
- self.assertTrue(fromContents.renderer().isValid())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtTest/click_test.py b/sources/pyside2/tests/QtTest/click_test.py
deleted file mode 100644
index 8b3be38ea..000000000
--- a/sources/pyside2/tests/QtTest/click_test.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''QtTest mouse click functionalities'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QObject
-from PySide2.QtWidgets import QPushButton, QLineEdit
-from PySide2.QtTest import QTest
-
-from helper.usesqapplication import UsesQApplication
-
-class MouseClickTest(UsesQApplication):
-
- def testBasic(self):
- '''QTest.mouseClick with QCheckBox'''
- button = QPushButton()
- button.setCheckable(True)
- button.setChecked(False)
-
- QTest.mouseClick(button, Qt.LeftButton)
- self.assertTrue(button.isChecked())
-
- QTest.mouseClick(button, Qt.LeftButton)
- self.assertFalse(button.isChecked())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtTest/eventfilter_test.py b/sources/pyside2/tests/QtTest/eventfilter_test.py
deleted file mode 100644
index 6ca61c36b..000000000
--- a/sources/pyside2/tests/QtTest/eventfilter_test.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests for QKeyEvent'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QObject, QEvent
-from PySide2.QtGui import QKeyEvent
-from PySide2.QtWidgets import QLineEdit
-from PySide2.QtTest import QTest
-
-from helper.usesqapplication import UsesQApplication
-
-
-class KeyEventFilter(QObject):
-
- def __init__(self, widget, eventType, key):
- QObject.__init__(self)
-
- self.widget = widget
- self.eventType = eventType
- self.key = key
-
- self.processed = False
-
- def eventFilter(self, obj, event):
- if self.widget == obj and event.type() == self.eventType and \
- isinstance(event, QKeyEvent) and event.key() == self.key:
- self.processed = True
- return True
-
- return False
-
-class EventFilterTest(UsesQApplication):
-
- def testKeyEvent(self):
- widget = QLineEdit()
- key = Qt.Key_A
- eventFilter = KeyEventFilter(widget, QEvent.KeyPress, key)
- widget.installEventFilter(eventFilter)
-
- QTest.keyClick(widget, key)
-
- self.assertTrue(eventFilter.processed)
-
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtTest/qvalidator_test.py b/sources/pyside2/tests/QtTest/qvalidator_test.py
deleted file mode 100644
index 021e455f2..000000000
--- a/sources/pyside2/tests/QtTest/qvalidator_test.py
+++ /dev/null
@@ -1,140 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
-from PySide2.QtTest import *
-
-from helper.usesqapplication import UsesQApplication
-
-class MyValidator1(QValidator):
- def fixup(self, input):
- return "fixed"
-
- def validate(self, input, pos):
- return (QValidator.Acceptable, "fixed", 1)
-
-class MyValidator2(QValidator):
- def fixup(self, input):
- return "fixed"
-
- def validate(self, input, pos):
- return (QValidator.Acceptable, "fixed")
-
-class MyValidator3(QValidator):
- def fixup(self, input):
- return "fixed"
-
- def validate(self, input, pos):
- return (QValidator.Acceptable,)
-
-class MyValidator4(QValidator):
- def fixup(self, input):
- return "fixed"
-
- def validate(self, input, pos):
- return QValidator.Acceptable
-
-class MyValidator5(QValidator):
- def validate(self, input, pos):
- if input.islower():
- return (QValidator.Intermediate, input, pos)
- else:
- return (QValidator.Acceptable, input, pos)
-
- def fixup(self, input):
- return "22"
-
-class QValidatorTest(UsesQApplication):
- def testValidator1(self):
- line = QLineEdit()
- line.setValidator(MyValidator1())
- line.show()
- line.setText("foo")
-
- QTimer.singleShot(0, line.close)
- self.app.exec_()
-
- self.assertEqual(line.text(), "fixed")
- self.assertEqual(line.cursorPosition(), 1)
-
- def testValidator2(self):
- line = QLineEdit()
- line.setValidator(MyValidator2())
- line.show()
- line.setText("foo")
-
- QTimer.singleShot(0, line.close)
- self.app.exec_()
-
- self.assertEqual(line.text(), "fixed")
- self.assertEqual(line.cursorPosition(), 3)
-
- def testValidator3(self):
- line = QLineEdit()
- line.setValidator(MyValidator3())
- line.show()
- line.setText("foo")
-
- QTimer.singleShot(0, line.close)
- self.app.exec_()
-
- self.assertEqual(line.text(), "foo")
- self.assertEqual(line.cursorPosition(), 3)
-
- def testValidator4(self):
- line = QLineEdit()
- line.setValidator(MyValidator4())
- line.show()
- line.setText("foo")
-
- QTimer.singleShot(0, line.close)
- self.app.exec_()
-
- self.assertEqual(line.text(), "foo")
- self.assertEqual(line.cursorPosition(), 3)
-
- def testValidator5(self):
- line = QLineEdit()
- line.show()
- line.setValidator(MyValidator5())
- line.setText("foo")
- QTest.keyClick(line, Qt.Key_Return)
- self.assertEqual(line.text(), "22")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtTest/touchevent_test.py b/sources/pyside2/tests/QtTest/touchevent_test.py
deleted file mode 100644
index 8f9b88461..000000000
--- a/sources/pyside2/tests/QtTest/touchevent_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtWidgets import QWidget
-from PySide2.QtCore import QPoint, QTimer, Qt, QEvent
-from PySide2.QtGui import QTouchDevice
-from PySide2.QtTest import QTest
-
-class MyWidget(QWidget):
- def __init__(self, parent = None):
- QWidget.__init__(self, parent)
- self._sequence = []
- # Fixme (Qt 5): The device needs to be registered (using
- # QWindowSystemInterface::registerTouchDevice()) for the test to work
- self._device = QTouchDevice()
- self.setAttribute(Qt.WA_AcceptTouchEvents)
- QTimer.singleShot(200, self.generateEvent)
-
- def event(self, e):
- self._sequence.append(e.type())
- return QWidget.event(self, e)
-
- def generateEvent(self):
- o = QTest.touchEvent(self, self._device)
- o.press(0, QPoint(10, 10))
- o.commit()
- del o
-
- QTest.touchEvent(self, self._device).press(0, QPoint(10, 10))
- QTest.touchEvent(self, self._device).stationary(0).press(1, QPoint(40, 10))
- QTest.touchEvent(self, self._device).move(0, QPoint(12, 12)).move(1, QPoint(45, 5))
- QTest.touchEvent(self, self._device).release(0, QPoint(12, 12)).release(1, QPoint(45, 5))
- QTimer.singleShot(200, self.deleteLater)
-
-
-class TouchEventTest(UsesQApplication):
- def testCreateEvent(self):
- w = MyWidget()
- w.show()
- self.app.exec_()
- # same values as C++
- self.assertEqual(w._sequence.count(QEvent.Type.TouchBegin), 2)
- self.assertEqual(w._sequence.count(QEvent.Type.TouchUpdate), 2)
- self.assertEqual(w._sequence.count(QEvent.Type.TouchEnd), 1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py b/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py
deleted file mode 100644
index 4881bd25a..000000000
--- a/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QTextToSpeech methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import QTimer
-
-try:
- from PySide2.QtTextToSpeech import QTextToSpeech, QVoice
-except ImportError:
- print("Skipping test due to missing QtTextToSpeech module")
- sys.exit(0)
-
-class QTextToSpeechTestCase(UsesQApplication):
- '''Tests related to QTextToSpeech'''
- def testSay(self):
- engines = QTextToSpeech.availableEngines()
- if not engines:
- print('No QTextToSpeech engines available')
- else:
- speech = QTextToSpeech(engines[0])
- speech.stateChanged.connect(self._slotStateChanged)
- speech.say("Hello, PySide2")
- QTimer.singleShot(5000, self.app.quit)
- self.app.exec_()
-
- def _slotStateChanged(self, state):
- if (state == QTextToSpeech.State.Ready):
- self.app.quit()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_1060.py b/sources/pyside2/tests/QtUiTools/bug_1060.py
deleted file mode 100644
index f60912780..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_1060.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1060 '''
-
-import os
-import sys
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from PySide2.QtWidgets import QApplication
-from PySide2.QtUiTools import QUiLoader
-
-
-class MyQUiLoader(QUiLoader):
- def __init__(self):
- super(MyQUiLoader, self).__init__()
-
- def createWidget(self, *args):
- return super(MyQUiLoader, self).createWidget(*args)
-
-if __name__ == "__main__":
- app = QApplication([])
-
- ui = MyQUiLoader().load(adjust_filename("bug_1060.ui", __file__))
- ui.show()
diff --git a/sources/pyside2/tests/QtUiTools/bug_360.py b/sources/pyside2/tests/QtUiTools/bug_360.py
deleted file mode 100644
index 8d15f2730..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_360.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2 import QtCore, QtWidgets
-from PySide2.QtUiTools import QUiLoader
-
-class MyQUiLoader(QUiLoader):
- def __init__(self, baseinstance):
- QUiLoader.__init__(self)
- self.baseinstance = baseinstance
- self._widgets = []
-
- def createWidget(self, className, parent=None, name=""):
- widget = QUiLoader.createWidget(self, className, parent, name)
- self._widgets.append(widget)
- if parent is None:
- return self.baseinstance
- else:
- setattr(self.baseinstance, name, widget)
- return widget
-
-class ButTest(UsesQApplication):
- def testCase(self):
- w = QtWidgets.QWidget()
- loader = MyQUiLoader(w)
-
- filePath = os.path.join(os.path.dirname(__file__), 'minimal.ui')
- ui = loader.load(filePath)
-
- self.assertEqual(len(loader._widgets), 1)
- self.assertEqual(type(loader._widgets[0]), QtWidgets.QFrame)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtUiTools/bug_376.py b/sources/pyside2/tests/QtUiTools/bug_376.py
deleted file mode 100644
index 264faad7f..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_376.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2 import QtCore, QtWidgets
-from PySide2.QtUiTools import QUiLoader
-
-class BugTest(UsesQApplication):
- def testCase(self):
- w = QtWidgets.QWidget()
- loader = QUiLoader()
-
- filePath = os.path.join(os.path.dirname(__file__), 'test.ui')
- result = loader.load(filePath, w)
- self.assertTrue(isinstance(result.child_object, QtWidgets.QFrame))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtUiTools/bug_392.py b/sources/pyside2/tests/QtUiTools/bug_392.py
deleted file mode 100644
index 1a049b89e..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_392.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QComboBox, QWidget
-from PySide2.QtUiTools import QUiLoader
-
-class MyWidget(QComboBox):
- def __init__(self, parent=None):
- QComboBox.__init__(self, parent)
-
- def isPython(self):
- return True
-
-class BugTest(UsesQApplication):
- def testCase(self):
- w = QWidget()
- loader = QUiLoader()
-
- filePath = os.path.join(os.path.dirname(__file__), 'action.ui')
- result = loader.load(filePath, w)
- self.assertTrue(isinstance(result.actionFoo, QAction))
-
- def testPythonCustomWidgets(self):
- w = QWidget()
- loader = QUiLoader()
- loader.registerCustomWidget(MyWidget)
- self.assertTrue('MyWidget' in loader.availableWidgets())
-
- filePath = os.path.join(os.path.dirname(__file__), 'pycustomwidget.ui')
- result = loader.load(filePath, w)
- self.assertTrue(isinstance(result.custom, MyWidget))
- self.assertTrue(result.custom.isPython())
-
- def testPythonCustomWidgetsTwice(self):
- w = QWidget()
- loader = QUiLoader()
- loader.registerCustomWidget(MyWidget)
- self.assertTrue('MyWidget' in loader.availableWidgets())
-
- filePath = os.path.join(os.path.dirname(__file__), 'pycustomwidget2.ui')
- result = loader.load(filePath, w)
- self.assertTrue(isinstance(result.custom, MyWidget))
- self.assertTrue(isinstance(result.custom2, MyWidget))
- self.assertTrue(result.custom.isPython())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtUiTools/bug_426.py b/sources/pyside2/tests/QtUiTools/bug_426.py
deleted file mode 100644
index 488ba5c8d..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_426.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer
-from PySide2.QtGui import QAction, QActionGroup
-from PySide2.QtWidgets import QApplication, QWidget
-from PySide2.QtUiTools import QUiLoader
-
-
-class Window(object):
- def __init__(self):
- loader = QUiLoader()
- filePath = os.path.join(os.path.dirname(__file__), 'bug_426.ui')
- self.widget = loader.load(filePath)
- self.group = QActionGroup(self.widget)
- self.widget.show()
- QTimer.singleShot(0, self.widget.close)
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
- win = Window()
- sys.exit(app.exec_())
diff --git a/sources/pyside2/tests/QtUiTools/bug_552.py b/sources/pyside2/tests/QtUiTools/bug_552.py
deleted file mode 100644
index be42789cf..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_552.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-from PySide2 import QtWidgets, QtCore
-from PySide2.QtUiTools import QUiLoader
-
-class View_1(QtWidgets.QWidget):
-
- def __init__(self):
- QtWidgets.QWidget.__init__(self)
- loader = QUiLoader()
- widget = loader.load(adjust_filename('bug_552.ui', __file__), self)
- self.children = []
- for child in widget.findChildren(QtCore.QObject, None):
- self.children.append(child)
- self.t = widget.tabWidget
- self.t.removeTab(0)
-
-app = QtWidgets.QApplication([])
-window = View_1()
-window.show()
-
-# If it doesn't crash it works :-)
diff --git a/sources/pyside2/tests/QtUiTools/bug_797.py b/sources/pyside2/tests/QtUiTools/bug_797.py
deleted file mode 100644
index 454699196..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_797.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2 import QtUiTools
-from PySide2 import QtCore
-from PySide2 import QtWidgets
-
-
-app = QtWidgets.QApplication([])
-loader = QtUiTools.QUiLoader()
-file = QtCore.QFile(adjust_filename('bug_552.ui', __file__))
-w = QtWidgets.QWidget()
-# An exception can't be thrown
-mainWindow = loader.load(file, w)
diff --git a/sources/pyside2/tests/QtUiTools/bug_909.py b/sources/pyside2/tests/QtUiTools/bug_909.py
deleted file mode 100644
index 9831b6b0e..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_909.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QFile
-from PySide2.QtWidgets import QTabWidget
-from PySide2.QtUiTools import QUiLoader
-
-from helper.usesqapplication import UsesQApplication
-from helper.helper import adjust_filename
-
-class TestDestruction(UsesQApplication):
- def testBug909(self):
- fileName = QFile(adjust_filename('bug_909.ui', __file__))
- loader = QUiLoader()
- main_win = loader.load(fileName)
- self.assertEqual(sys.getrefcount(main_win), 2)
- fileName.close()
-
- tw = QTabWidget(main_win)
- main_win.setCentralWidget(tw)
- main_win.show()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_913.py b/sources/pyside2/tests/QtUiTools/bug_913.py
deleted file mode 100644
index 3e2ca818b..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_913.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.helper import adjust_filename
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-from PySide2.QtUiTools import *
-
-class TestBug913 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
-
- loader = QUiLoader()
- widget = loader.load(adjust_filename('bug_913.ui', __file__))
- widget.tabWidget.currentIndex() # direct child is available as member
- widget.le_first.setText('foo') # child of QTabWidget must also be available!
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_958.py b/sources/pyside2/tests/QtUiTools/bug_958.py
deleted file mode 100644
index 98ac16189..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_958.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets, QtUiTools
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-class Gui_Qt(QtWidgets.QMainWindow):
- def __init__(self, parent=None):
- super(Gui_Qt, self).__init__(parent)
-
- lLoader = QtUiTools.QUiLoader()
-
- # this used to cause a segfault because the old inject code used to destroy the parent layout
- self._cw = lLoader.load(adjust_filename('bug_958.ui', __file__), self)
-
- self.setCentralWidget(self._cw)
-
-class BugTest(TimedQApplication):
- def testCase(self):
- lMain = Gui_Qt()
- lMain.show()
- self.app.exec_()
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_965.py b/sources/pyside2/tests/QtUiTools/bug_965.py
deleted file mode 100644
index 217f948af..000000000
--- a/sources/pyside2/tests/QtUiTools/bug_965.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtUiTools import QUiLoader
-
-from helper.usesqapplication import UsesQApplication
-from helper.helper import adjust_filename
-
-class MyQUiLoader(QUiLoader):
- def __init__(self):
- super(MyQUiLoader, self).__init__()
-
- def createWidget(self, className, parent=None, name=""):
- return None
-
-class BugTest(UsesQApplication):
- def testCase(self):
- loader = MyQUiLoader()
- self.assertRaises(RuntimeError, loader.load, adjust_filename('bug_965.ui', __file__))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/loadUiType_test.py b/sources/pyside2/tests/QtUiTools/loadUiType_test.py
deleted file mode 100644
index 9a3756376..000000000
--- a/sources/pyside2/tests/QtUiTools/loadUiType_test.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtWidgets import QWidget, QFrame, QPushButton
-from PySide2.QtUiTools import loadUiType
-
-class loadUiTypeTester(UsesQApplication):
- def testFunction(self):
- filePath = os.path.join(os.path.dirname(__file__), "minimal.ui")
- loaded = loadUiType(filePath)
- self.assertNotEqual(loaded, None)
-
- # (<class '__main__.Ui_Form'>, <class 'PySide2.QtWidgets.QFrame'>)
- generated, base = loaded
-
- # Generated class contains retranslateUi method
- self.assertTrue("retranslateUi" in dir(generated))
-
- # Base class instance will be QFrame for this example
- self.assertTrue(isinstance(base(), QFrame))
-
- anotherFileName = os.path.join(os.path.dirname(__file__), "test.ui")
- another = loadUiType(anotherFileName)
- self.assertNotEqual(another, None)
-
- generated, base = another
- # Base class instance will be QWidget for this example
- self.assertTrue(isinstance(base(), QWidget))
-
- w = base()
- ui = generated()
- ui.setupUi(w)
-
- self.assertTrue(isinstance(ui.child_object, QFrame))
- self.assertTrue(isinstance(ui.grandson_object, QPushButton))
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtUiTools/ui_test.py b/sources/pyside2/tests/QtUiTools/ui_test.py
deleted file mode 100644
index 6705bb0be..000000000
--- a/sources/pyside2/tests/QtUiTools/ui_test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtUiTools import QUiLoader
-
-from helper.usesqapplication import UsesQApplication
-
-class QUiLoaderCreation(UsesQApplication):
-
- def testConstructor(self):
- loader = QUiLoader()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/uiloader_test.py b/sources/pyside2/tests/QtUiTools/uiloader_test.py
deleted file mode 100644
index 2fceb45c1..000000000
--- a/sources/pyside2/tests/QtUiTools/uiloader_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtWidgets import QWidget
-from PySide2.QtUiTools import QUiLoader
-
-
-class OverridingLoader(QUiLoader):
- def createWidget(self, class_name, parent=None, name=''):
- if class_name == 'QWidget':
- w = QWidget(parent)
- w.setObjectName(name)
- return w
- return QUiLoader.createWidget(self, class_name, parent, name)
-
-
-class QUiLoaderTester(UsesQApplication):
- def setUp(self):
- UsesQApplication.setUp(self)
- self._filePath = os.path.join(os.path.dirname(__file__), 'test.ui')
-
- def testLoadFile(self):
- loader = QUiLoader()
- parent = QWidget()
- w = loader.load(self._filePath, parent)
- self.assertNotEqual(w, None)
-
- self.assertEqual(len(parent.children()), 1)
-
- child = w.findChild(QWidget, "child_object")
- self.assertNotEqual(child, None)
- self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
-
-
- def testLoadFileOverride(self):
- # PYSIDE-1070, override QUiLoader::createWidget() with parent=None crashes
- loader = OverridingLoader()
- w = loader.load(self._filePath)
- self.assertNotEqual(w, None)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py b/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py
deleted file mode 100644
index 1f0482f96..000000000
--- a/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer
-from PySide2.QtWebEngine import QtWebEngine
-from PySide2.QtWidgets import QApplication
-
-
-class MainTest(unittest.TestCase):
- def test_initializePresent(self):
- app = QApplication([])
- QtWebEngine.initialize()
- QTimer.singleShot(2000, app.quit)
- app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py b/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py
deleted file mode 100644
index 9604e957c..000000000
--- a/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QBuffer, Qt, QTimer
-from PySide2.QtWidgets import QApplication, QWidget, QVBoxLayout
-from PySide2.QtWebEngine import QtWebEngine
-from PySide2.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile
-from PySide2.QtWebEngineCore import (QWebEngineUrlScheme,
- QWebEngineUrlSchemeHandler)
-
-class TestSchemeHandler(QWebEngineUrlSchemeHandler):
- def requestStarted(self, request):
- if request.requestUrl() == "testpy:hello":
- request.redirect("testpy:goodbye")
- return
-
- self.buffer = QBuffer()
- self.buffer.setData(bytes("Really nice goodbye text.", "UTF-8"))
- self.buffer.aboutToClose.connect(self.buffer.deleteLater)
- request.reply(bytes("text/plain;charset=utf-8", "UTF-8"), self.buffer)
-
-
-class MainTest(unittest.TestCase):
- def test_SchemeHandlerRedirect(self):
- self._loaded = False
- QApplication.setAttribute(Qt.AA_ShareOpenGLContexts);
- QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
- QtWebEngine.initialize()
- app = QApplication([])
-
- scheme_name = bytes("testpy", "UTF-8")
- scheme = QWebEngineUrlScheme(scheme_name)
- scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
- QWebEngineUrlScheme.registerScheme(scheme)
- handler = TestSchemeHandler()
- profile = QWebEngineProfile.defaultProfile()
- profile.installUrlSchemeHandler(scheme_name, handler)
-
- top_level_widget = QWidget()
- top_level_widget.setWindowTitle('web_engine_custom_scheme.py')
- top_level_widget.resize(400, 400)
- layout = QVBoxLayout(top_level_widget)
- view = QWebEngineView()
- layout.addWidget(view)
-
- view.loadFinished.connect(self._slot_loaded)
- QTimer.singleShot(5000, app.quit)
-
- top_level_widget.show()
- view.load("testpy:hello")
- app.exec_()
-
- self.assertTrue(self._loaded)
- self.assertEqual(view.url(), "testpy:goodbye")
-
- def _slot_loaded(self):
- self._loaded = True
- QApplication.quit()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py b/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
deleted file mode 100644
index c650a21d0..000000000
--- a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-from functools import partial
-import os
-import sys
-import unittest
-
-TEST_DIR = os.path.dirname(os.path.abspath(__file__))
-
-sys.path.append(os.path.dirname(TEST_DIR))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication, QSize, QUrl, Qt
-from PySide2.QtWidgets import QApplication, QVBoxLayout, QWidget
-from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
-
-
-class MainTest(unittest.TestCase):
-
- def test_WebEngineView_findText_exists(self):
- QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
- app = QApplication.instance() or QApplication()
- top_level = QWidget()
- layout = QVBoxLayout(top_level)
- self._view = QWebEngineView()
- self._view.loadFinished.connect(self.loaded)
- self._view.load(QUrl.fromLocalFile(os.path.join(TEST_DIR, "fox.html")))
- self._view.setMinimumSize(QSize(400, 300))
- self._callback_count = 0
- layout.addWidget(self._view)
- top_level.show()
- app.exec_()
-
- def found_callback(self, found):
- self.assertTrue(found)
- self._callback_count += 1
- if self._callback_count == 2:
- QCoreApplication.quit()
-
- def javascript_callback(self, result):
- self.assertEqual(result, "Title")
- self._callback_count += 1
- if self._callback_count == 2:
- QCoreApplication.quit()
-
- def loaded(self, ok):
- self.assertTrue(ok)
- if not ok:
- QCoreApplication.quit()
- self._view.page().runJavaScript("document.title", 1,
- partial(self.javascript_callback))
- self._view.findText("fox", QWebEnginePage.FindFlags(),
- partial(self.found_callback))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/action_clear.py b/sources/pyside2/tests/QtWidgets/action_clear.py
deleted file mode 100644
index ed8150493..000000000
--- a/sources/pyside2/tests/QtWidgets/action_clear.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QMenu, QWidget, QMenuBar, QToolBar
-from helper.usesqapplication import UsesQApplication
-
-
-class TestQActionLifeCycle(UsesQApplication):
- def actionDestroyed(self, act):
- self._actionDestroyed = True
-
- def testMenu(self):
- self._actionDestroyed = False
- w = QWidget()
- menu = QMenu(w)
- act = menu.addAction("MENU")
- _ref = weakref.ref(act, self.actionDestroyed)
- act = None
- self.assertFalse(self._actionDestroyed)
- menu.clear()
- self.assertTrue(self._actionDestroyed)
-
- def testMenuBar(self):
- self._actionDestroyed = False
- w = QWidget()
- menuBar = QMenuBar(w)
- act = menuBar.addAction("MENU")
- _ref = weakref.ref(act, self.actionDestroyed)
- act = None
- self.assertFalse(self._actionDestroyed)
- menuBar.clear()
- self.assertTrue(self._actionDestroyed)
-
- def testToolBar(self):
- self._actionDestroyed = False
- w = QWidget()
- toolBar = QToolBar(w)
- act = toolBar.addAction("MENU")
- _ref = weakref.ref(act, self.actionDestroyed)
- act = None
- self.assertFalse(self._actionDestroyed)
- toolBar.clear()
- self.assertTrue(self._actionDestroyed)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/add_action_test.py b/sources/pyside2/tests/QtWidgets/add_action_test.py
deleted file mode 100644
index d4af8b5d1..000000000
--- a/sources/pyside2/tests/QtWidgets/add_action_test.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests for QMenuBar.addAction(identifier, callback) calls'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import SLOT
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QMenuBar, QPushButton
-
-from helper.usesqapplication import UsesQApplication
-
-
-class AddActionTest(UsesQApplication):
- '''QMenuBar addAction'''
-
- def tearDown(self):
- try:
- del self.called
- except AttributeError:
- pass
- super(AddActionTest, self).tearDown()
-
- def _callback(self):
- self.called = True
-
- def testBasic(self):
- '''QMenuBar.addAction(id, callback)'''
- menubar = QMenuBar()
- action = menubar.addAction("Accounts", self._callback)
- action.activate(QAction.Trigger)
- self.assertTrue(self.called)
-
- def testWithCppSlot(self):
- '''QMenuBar.addAction(id, object, slot)'''
- menubar = QMenuBar()
- widget = QPushButton()
- widget.setCheckable(True)
- widget.setChecked(False)
- action = menubar.addAction("Accounts", widget, SLOT("toggle()"))
- action.activate(QAction.Trigger)
- self.assertTrue(widget.isChecked())
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/api2_test.py b/sources/pyside2/tests/QtWidgets/api2_test.py
deleted file mode 100644
index 379d3e997..000000000
--- a/sources/pyside2/tests/QtWidgets/api2_test.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for PySide API2 support'''
-
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QIntValidator, QValidator
-from PySide2.QtWidgets import QWidget, QSpinBox, QApplication
-
-from helper.usesqapplication import UsesQApplication
-
-class WidgetValidatorQInt(QWidget, QIntValidator):
- def __init__(self, parent=None):
- QWidget.__init__(self, parent)
- QIntValidator.__init__(self, parent)
-
-class WidgetValidatorQSpinBox(QSpinBox):
- def __init__(self, parent=None):
- QSpinBox.__init__(self, parent)
-
- def fixup(self, text):
- print("It was called!")
-
-class DoubleQObjectInheritanceTest(UsesQApplication):
-
- def testDouble(self):
- '''Double inheritance from QObject classes'''
-
- obj = WidgetValidatorQInt()
-
- #QIntValidator methods
- state, string, number = obj.validate('Test', 0)
- self.assertEqual(state, QValidator.Invalid)
- state, string, number = obj.validate('33', 0)
- self.assertEqual(state, QValidator.Acceptable)
-
- def testQSpinBox(self):
- obj = WidgetValidatorQSpinBox()
-
- obj.setRange(1, 10)
- obj.setValue(0)
- self.assertEqual(obj.value(), 1)
-
-class QClipboardTest(UsesQApplication):
-
- def testQClipboard(self):
- #skip this test on MacOS because the clipboard is not available during the ssh session
- #this cause problems in the buildbot
- if sys.platform == 'darwin':
- return
- clip = QApplication.clipboard()
- clip.setText("Testing this thing!")
-
- text, subtype = clip.text("")
- self.assertEqual(subtype, "plain")
- self.assertEqual(text, "Testing this thing!")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/application_test.py b/sources/pyside2/tests/QtWidgets/application_test.py
deleted file mode 100644
index a5b949ec6..000000000
--- a/sources/pyside2/tests/QtWidgets/application_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestObject
-from PySide2.QtWidgets import QApplication
-from PySide2 import __all__ as all
-
-class QApplicationInstance(unittest.TestCase):
-
- def appDestroyed(self):
- self.assertTrue(False)
-
- def testInstanceObject(self):
- self.assertEqual(type(qApp), type(None))
- TestObject.createApp()
- app1 = QApplication.instance()
- app2 = QApplication.instance()
- app1.setObjectName("MyApp")
- self.assertEqual(app1, app2)
- self.assertEqual(app2.objectName(), app1.objectName())
- # We no longer support qApp when embedding
- # if len(all) > 3:
- # # an import triggers qApp initialization
- # __import__("PySide2." + all[-1])
- # self.assertEqual(app1, qApp)
- app1.destroyed.connect(self.appDestroyed)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_1002.py b/sources/pyside2/tests/QtWidgets/bug_1002.py
deleted file mode 100644
index 2810ca07f..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_1002.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QWidget, QPushButton
-
-from helper.usesqapplication import UsesQApplication
-
-class TestBug1002 (UsesQApplication):
- def testReturnWindow(self):
- widget = QWidget()
- button = QPushButton(widget)
- self.assertEqual(sys.getrefcount(widget), 2)
- window = button.window()
- self.assertEqual(sys.getrefcount(widget), 3)
- self.assertEqual(sys.getrefcount(window), 3)
-
- del widget
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_1006.py b/sources/pyside2/tests/QtWidgets/bug_1006.py
deleted file mode 100644
index f7d4af804..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_1006.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import QDialog, QLabel, QGridLayout, QHBoxLayout, QWidget
-
-from helper.timedqapplication import TimedQApplication
-
-class LabelWindow(QDialog):
- def __init__(self, parent):
- super(LabelWindow, self).__init__(parent)
-
- self.test_layout = QGridLayout()
- label = QLabel("Label")
- self.test_layout.addWidget(label, 0, 0)
- self.setLayout(self.test_layout)
- self._destroyCalled = False
-
-
- def replace(self, unit):
- old_item = self.test_layout.itemAtPosition(0, 0)
- old_label = old_item.widget()
- ref = weakref.ref(old_item, self._destroyed)
-
- self.test_layout.removeWidget(old_label)
- unit.assertRaises(RuntimeError, old_item.widget)
- del old_item
-
- label = QLabel("Label New")
- old_label.deleteLater()
- label.setAlignment(Qt.AlignCenter)
- self.test_layout.addWidget(label, 0, 0)
-
- def _destroyed(self, obj):
- self._destroyCalled = True
-
-class TestBug1006 (TimedQApplication):
-
- def testLayoutItemLifeTime(self):
- window = LabelWindow(None)
- window.replace(self)
- self.assertTrue(window._destroyCalled)
- self.app.exec_()
-
- def testParentLayout(self):
- def createLayout():
- label = QLabel()
- layout = QHBoxLayout()
- layout.addWidget(label)
-
- widget = QWidget()
- widget.setLayout(layout)
- return (layout, widget)
- (layout, widget) = createLayout()
- item = layout.itemAt(0)
- self.assertTrue(isinstance(item.widget(), QWidget))
-
- def testRemoveOrphanWidget(self):
- widget = QLabel()
- layout = QHBoxLayout()
- layout.addWidget(widget)
- self.assertEqual(sys.getrefcount(widget), 3)
-
- layout.removeWidget(widget)
- widget.setObjectName("MyWidget")
- self.assertEqual(sys.getrefcount(widget), 2)
-
- def testRemoveChildWidget(self):
- parent = QLabel()
- widget = QLabel(parent)
- self.assertEqual(sys.getrefcount(widget), 3)
-
- layout = QHBoxLayout()
- layout.addWidget(widget)
- self.assertEqual(sys.getrefcount(widget), 3)
-
- layout.removeWidget(widget)
- widget.setObjectName("MyWidget")
- self.assertEqual(sys.getrefcount(widget), 3)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_1048.py b/sources/pyside2/tests/QtWidgets/bug_1048.py
deleted file mode 100644
index 1b2189a7a..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_1048.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtWidgets
-
-a = QtWidgets.QApplication([])
-
-w = QtWidgets.QWidget()
-l = QtWidgets.QGridLayout(w)
-
-l.itemAtPosition(0, 0)
diff --git a/sources/pyside2/tests/QtWidgets/bug_1077.py b/sources/pyside2/tests/QtWidgets/bug_1077.py
deleted file mode 100644
index cb3bf70c4..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_1077.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' unit test for BUG #1077 '''
-
-import os
-import sys
-import time
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtCore, QtGui, QtWidgets
-
-
-class Highlighter(QtGui.QSyntaxHighlighter):
- def __init__(self, parent, mode):
- QtGui.QSyntaxHighlighter.__init__(self, parent)
- self.tstamp = time.time()
-
-if __name__ == "__main__":
- app = QtWidgets.QApplication([])
- python = QtWidgets.QTextEdit()
- python.setWindowTitle("python")
- hl = Highlighter(python.document(), "python")
- python.show()
- text = hl.document()
diff --git a/sources/pyside2/tests/QtWidgets/bug_172.py b/sources/pyside2/tests/QtWidgets/bug_172.py
deleted file mode 100644
index c9cc8d088..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_172.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtWidgets import *
-
-if __name__ == '__main__':
- app = QApplication([])
-
- wdg = QWidget()
-
- hbox = QHBoxLayout()
-
- vbox = QVBoxLayout()
- vbox.addLayout(hbox)
-
- wdg.setLayout(vbox)
diff --git a/sources/pyside2/tests/QtWidgets/bug_243.py b/sources/pyside2/tests/QtWidgets/bug_243.py
deleted file mode 100644
index bf5fa2eaa..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_243.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 243: http://bugs.openbossa.org/show_bug.cgi?id=243'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication, QMainWindow, QLayout
-
-class QAppPresence(unittest.TestCase):
-
- def testBug(self):
- app = QApplication(sys.argv)
- window = QMainWindow()
- l = window.layout()
- self.assertTrue(isinstance(l, QLayout))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_307.py b/sources/pyside2/tests/QtWidgets/bug_307.py
deleted file mode 100644
index d3e8ba9df..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_307.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import colorsys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import SIGNAL
-from PySide2.QtWidgets import QPushButton, QApplication
-
-
-class Test (QApplication) :
- def __init__(self, argv) :
- super(Test, self).__init__(argv)
- self._called = False
-
- def called(self):
- self._called = True
-
-
-class QApplicationSignalsTest(unittest.TestCase):
- def testQuit(self):
- app = Test([])
- button = QPushButton("BUTTON")
- app.connect(button, SIGNAL("clicked()"), app.called)
- button.click()
- self.assertTrue(app._called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_324.py b/sources/pyside2/tests/QtWidgets/bug_324.py
deleted file mode 100644
index c6e5a757a..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_324.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 324: http://bugs.openbossa.org/show_bug.cgi?id=324'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class QBug( QObject ):
- def __init__(self, parent = None):
- QObject.__init__(self, parent)
-
- def check(self):
- self.done.emit("abc")
-
- done = Signal(str)
-
-class Bug324(unittest.TestCase):
-
- def on_done(self, val):
- self.value = val
-
- def testBug(self):
- app = QApplication([])
- bug = QBug()
- self.value = ''
- bug.done.connect(self.on_done)
- bug.check()
- self.assertEqual(self.value, 'abc')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_338.py b/sources/pyside2/tests/QtWidgets/bug_338.py
deleted file mode 100644
index ca095a617..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_338.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 338: http://bugs.openbossa.org/show_bug.cgi?id=338'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-class DiagramItem(QtWidgets.QGraphicsPolygonItem):
- def __init__(self, parent=None, scene=None):
- super(DiagramItem, self).__init__(parent, scene)
-
- def itemChange(self, change, value):
- return value
-
-
-class BugTest(unittest.TestCase):
- def test(self):
- app = QtWidgets.QApplication(sys.argv)
- scene = QtWidgets.QGraphicsScene()
- item = DiagramItem()
- item2 = DiagramItem()
- #this cause segfault
- scene.addItem(item)
- scene.addItem(item2)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_389.py b/sources/pyside2/tests/QtWidgets/bug_389.py
deleted file mode 100644
index dcc4a5df7..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_389.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 389: http://bugs.openbossa.org/show_bug.cgi?id=389'''
-
-import sys
-import os
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2 import QtCore, QtGui, QtWidgets
-
-class BugTest(UsesQApplication):
- def testCase(self):
- s = QtWidgets.QWidget().style()
- i = s.standardIcon(QtWidgets.QStyle.SP_TitleBarMinButton)
- self.assertEqual(type(i), QtGui.QIcon)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_400.py b/sources/pyside2/tests/QtWidgets/bug_400.py
deleted file mode 100644
index 03f82a149..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_400.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 400: http://bugs.openbossa.org/show_bug.cgi?id=400'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtWidgets import QTreeWidgetItemIterator, QTreeWidgetItem, QTreeWidget
-
-class BugTest(UsesQApplication):
- def testCase(self):
- treeWidget = QTreeWidget()
- treeWidget.setColumnCount(1)
- items = []
- for i in range(10):
- items.append(QTreeWidgetItem(None, ["item: %i" % i]))
-
- treeWidget.insertTopLevelItems(0, items);
- _iter = QTreeWidgetItemIterator(treeWidget)
- index = 0
- while(_iter.value()):
- item = _iter.value()
- self.assertTrue(item is items[index])
- index += 1
- _iter += 1
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_429.py b/sources/pyside2/tests/QtWidgets/bug_429.py
deleted file mode 100644
index 9b2fb9c42..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_429.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-
-app = QApplication(sys.argv)
-scene = QGraphicsScene()
-label = QLabel("hello world")
-label.show()
-QTimer.singleShot(0, label.close)
-exit(app.exec_())
diff --git a/sources/pyside2/tests/QtWidgets/bug_430.py b/sources/pyside2/tests/QtWidgets/bug_430.py
deleted file mode 100644
index 81a8d34f6..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_430.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class ListModel(QAbstractListModel):
- def rowCount(self, parent = QModelIndex()):
- return 0
-
-app = QApplication([])
-model = ListModel()
-v = QListView()
-v.setModel(model)
-QTimer.singleShot(0, v.close)
-app.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/bug_433.py b/sources/pyside2/tests/QtWidgets/bug_433.py
deleted file mode 100644
index ab316db1e..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_433.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtCore, QtWidgets
-
-class Test(QtWidgets.QGraphicsView):
- def __init__(self, parent=None):
- super(Test, self).__init__(parent)
- self.s = QtWidgets.QGraphicsScene()
- self.setScene(self.s)
-
-a = QtWidgets.QApplication(sys.argv)
-t = Test()
-t.show()
-QtCore.QTimer.singleShot(0, t.close)
-sys.exit(a.exec_())
diff --git a/sources/pyside2/tests/QtWidgets/bug_467.py b/sources/pyside2/tests/QtWidgets/bug_467.py
deleted file mode 100644
index ee2da71dc..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_467.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 367: http://bugs.openbossa.org/show_bug.cgi?id=467'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtWidgets import QMainWindow, QApplication
-
-class MyWidget(QMainWindow):
- def __init__(self, parent = None):
- QMainWindow.__init__(self, parent)
-
-
-class BugTest(UsesQApplication):
- def testCase(self):
- w = MyWidget()
- widgets = QApplication.allWidgets()
- self.assertTrue(w in widgets)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_493.py b/sources/pyside2/tests/QtWidgets/bug_493.py
deleted file mode 100644
index a981952fb..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_493.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QEvent
-from PySide2.QtGui import QKeyEvent, QKeySequence
-from PySide2.QtWidgets import QApplication
-
-
-class TestBug493(unittest.TestCase):
-
- def testIt(self):
- # We need a qapp otherwise Qt will crash when trying to detect the
- # current platform
- app = QApplication([])
- ev1 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Delete, Qt.NoModifier)
- ev2 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Copy, Qt.NoModifier)
- ks = QKeySequence.Delete
-
- self.assertTrue(ev1.matches(ks))
- self.assertFalse(ev2.matches(ks))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_512.py b/sources/pyside2/tests/QtWidgets/bug_512.py
deleted file mode 100644
index 45f127c73..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_512.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 512: http://bugs.openbossa.org/show_bug.cgi?id=512'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class BugTest(UsesQApplication):
- def testCase(self):
- w = QWidget(None)
- lbl = QLabel("Hello", w);
- g = QGridLayout()
- g.addWidget(lbl, 0, 0)
- w.setLayout(g)
- w.show()
-
- t = g.getItemPosition(0)
- self.assertEqual(type(t), tuple)
- self.assertEqual(t, (0,0,1,1))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_525.py b/sources/pyside2/tests/QtWidgets/bug_525.py
deleted file mode 100644
index bb0244497..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_525.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication
-from PySide2.QtWidgets import QMenu
-
-class M2(QMenu):
- def __init__(self,parent=None):
- super(M2,self).__init__(parent)
- self.setTitle(self.tr("M2"))
-
-class TestMenuDerivedClass(unittest.TestCase):
- def aboutToShowHandler(self):
- pass
-
- def testConnectSignal(self):
- app = QApplication([])
- m2 = M2()
- # Test if the aboutToShow signal was translated to correct type
- m2.aboutToShow.connect(self.aboutToShowHandler)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_546.py b/sources/pyside2/tests/QtWidgets/bug_546.py
deleted file mode 100644
index 3fadcfaef..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_546.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-class TestBug546(unittest.TestCase):
-
- """Test to check a crash at exit"""
- def testIt(self):
- app = QApplication([])
- textEdit = QPlainTextEdit()
- completer = QCompleter(("foo", "bar"), textEdit)
- completer.setWidget(textEdit)
-
-if __name__=='__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_547.py b/sources/pyside2/tests/QtWidgets/bug_547.py
deleted file mode 100644
index 070b2f81a..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_547.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-""" Unittest for bug #547 """
-""" http://bugs.openbossa.org/show_bug.cgi?id=547 """
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-
-class MyMainWindow(unittest.TestCase):
- app = QtWidgets.QApplication(sys.argv)
- def testCase1(self):
- self._tree = QtWidgets.QTreeWidget()
- self._tree.setColumnCount(2)
- self._i1 = None
- self._i11 = None
-
- self._updateTree()
- self.assertEqual(sys.getrefcount(self._i1), 3)
- self.assertEqual(sys.getrefcount(self._i11), 3)
-
- self._i11.parent().setExpanded(True)
- self._i11.setExpanded(True)
-
- self._updateTree()
- self.assertEqual(sys.getrefcount(self._i1), 3)
- self.assertEqual(sys.getrefcount(self._i11), 3)
-
- def testCase2(self):
- self._tree = QtWidgets.QTreeWidget()
- self._tree.setColumnCount(2)
- self._i1 = None
- self._i11 = None
-
- self._updateTree()
- self.assertEqual(sys.getrefcount(self._i1), 3)
- self.assertEqual(sys.getrefcount(self._i11), 3)
-
- self._i11.parent().setExpanded(True)
- self._i11.setExpanded(True)
-
- self.assertEqual(sys.getrefcount(self._i1), 3)
- self.assertEqual(sys.getrefcount(self._i11), 3)
-
- def _updateTree(self):
- self._tree.clear()
- if self._i1 and self._i11:
- self.assertEqual(sys.getrefcount(self._i1), 2)
- self.assertEqual(sys.getrefcount(self._i11), 2)
-
- self._i1 = QtWidgets.QTreeWidgetItem(self._tree, ['1', ])
- self.assertEqual(sys.getrefcount(self._i1), 3)
- self._i11 = QtWidgets.QTreeWidgetItem(self._i1, ['11', ])
- self.assertEqual(sys.getrefcount(self._i11), 3)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_549.py b/sources/pyside2/tests/QtWidgets/bug_549.py
deleted file mode 100644
index 7da9cca8f..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_549.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-class TestBug549(unittest.TestCase):
- def testBug(self):
- app = QApplication([])
- w = QGraphicsWidget()
- w.setContentsMargins(1, 2, 3, 4)
- self.assertEqual(w.getContentsMargins(), (1, 2, 3, 4))
- w.setWindowFrameMargins(5, 6, 7, 8)
- self.assertEqual(w.getWindowFrameMargins(), (5, 6, 7, 8))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_569.py b/sources/pyside2/tests/QtWidgets/bug_569.py
deleted file mode 100644
index cf95467c6..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_569.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-
-class TestBug569(unittest.TestCase):
-
- def testIt(self):
- types = (QTableWidgetItem, QListWidgetItem, QTreeWidgetItem)
- for t in types:
- a = t()
- a.__lt__ = lambda other : True
- b = t()
- b.__lt__ = lambda other : False
- self.assertTrue(a < b)
- self.assertFalse(b < a)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_575.py b/sources/pyside2/tests/QtWidgets/bug_575.py
deleted file mode 100644
index 425a659e2..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_575.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-""" Unittest for bug #575 """
-""" http://bugs.openbossa.org/show_bug.cgi?id=575 """
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication, QPlainTextEdit, QTextEdit
-
-
-class Bug575(unittest.TestCase):
- def testPropertyValues(self):
- app = QApplication(sys.argv)
- textEdit = QPlainTextEdit()
- textEdit.insertPlainText("PySide INdT")
- selection = QTextEdit.ExtraSelection()
- selection.cursor = textEdit.textCursor()
- selection.cursor.setPosition(2)
- self.assertEqual(selection.cursor.position(), 2)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_576.py b/sources/pyside2/tests/QtWidgets/bug_576.py
deleted file mode 100644
index 9674f7a9d..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_576.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-""" Unittest for bug #576 """
-""" http://bugs.openbossa.org/show_bug.cgi?id=576 """
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-class Bug576(unittest.TestCase):
- def onButtonDestroyed(self, button):
- self._destroyed = True
- self.assertTrue(isinstance(button, QtWidgets.QPushButton))
-
- def testWidgetParent(self):
- self._destroyed = False
- app = QtWidgets.QApplication(sys.argv)
- w = QtWidgets.QWidget()
-
- b = QtWidgets.QPushButton("test")
- b.destroyed[QtCore.QObject].connect(self.onButtonDestroyed)
- self.assertEqual(sys.getrefcount(b), 2)
- b.setParent(w)
- self.assertEqual(sys.getrefcount(b), 3)
- b.parent()
- self.assertEqual(sys.getrefcount(b), 3)
- b.setParent(None)
- self.assertEqual(sys.getrefcount(b), 2)
- del b
- self.assertTrue(self._destroyed)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_585.py b/sources/pyside2/tests/QtWidgets/bug_585.py
deleted file mode 100644
index a0e5c0b5e..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_585.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test bug 585: http://bugs.openbossa.org/show_bug.cgi?id=585'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-class Bug585(unittest.TestCase):
- def testCase(self):
- app = QtWidgets.QApplication([])
- self._tree = QtWidgets.QTreeWidget()
- self._tree.setColumnCount(2)
- i1 = QtWidgets.QTreeWidgetItem(self._tree, ['1', ])
- i2 = QtWidgets.QTreeWidgetItem(self._tree, ['2', ])
- refCount = sys.getrefcount(i1)
-
- # this function return None
- # because the topLevelItem does not has a parent item
- # but still have a TreeWidget as a parent
- self._tree.topLevelItem(0).parent()
-
- self.assertEqual(refCount, sys.getrefcount(i1))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_589.py b/sources/pyside2/tests/QtWidgets/bug_589.py
deleted file mode 100644
index 8f81384a7..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_589.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# trimmed down diagramscene.py to demonstrate crash in sizeHint()
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-
-class CustomWidget(QtWidgets.QGraphicsProxyWidget):
- def itemChange(self, eventType, value):
- QtWidgets.QGraphicsProxyWidget.itemChange(self, eventType, value)
-
-class Bug589(unittest.TestCase):
- def testCase(self):
- widget = QtWidgets.QGraphicsProxyWidget()
- custom = CustomWidget()
- custom.setParentItem(widget)
-
-if __name__ == "__main__":
- app = QtWidgets.QApplication(sys.argv)
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_635.py b/sources/pyside2/tests/QtWidgets/bug_635.py
deleted file mode 100644
index 6707c3f05..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_635.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 635: http://bugs.openbossa.org/show_bug.cgi?id=635'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import QApplication, QToolBar
-
-
-class testQToolBar(unittest.TestCase):
- def callback(self):
- self._called = True
-
- def testAddAction(self):
- bar = QToolBar()
- self._called = False
- a = bar.addAction("act1", self.callback)
- a.trigger()
- self.assertTrue(self._called)
-
- def testAddActionWithIcon(self):
- bar = QToolBar()
- self._called = False
- icon = QIcon()
- a = bar.addAction(icon, "act1", self.callback)
- a.trigger()
- self.assertTrue(self._called)
-
-if __name__ == '__main__':
- app = QApplication(sys.argv)
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_640.py b/sources/pyside2/tests/QtWidgets/bug_640.py
deleted file mode 100644
index 13d98aa47..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_640.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-
-class Bug640(unittest.TestCase):
- def testIt(self):
- option = QStyleOptionGraphicsItem()
- a = option.state # crash!?
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_653.py b/sources/pyside2/tests/QtWidgets/bug_653.py
deleted file mode 100644
index df7dbacdb..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_653.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class TestBug653(unittest.TestCase):
- """Crash after calling QWizardPage.wizard()"""
- def testIt(self):
- app = QApplication([])
-
- wizard = QWizard()
- page = QWizardPage()
- wizard.addPage(page)
- page.wizard() # crash here if the bug still exists due to a circular dependency
- wizard.show()
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_662.py b/sources/pyside2/tests/QtWidgets/bug_662.py
deleted file mode 100644
index 7fb97deb6..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_662.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 662: http://bugs.openbossa.org/show_bug.cgi?id=662'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-from PySide2.QtGui import QTextCharFormat
-from PySide2.QtWidgets import QTextEdit, QApplication
-import sys
-
-class testQTextBlock(unittest.TestCase):
- def tesIterator(self):
- edit = QTextEdit()
- cursor = edit.textCursor()
- fmt = QTextCharFormat()
- frags = []
- for i in range(10):
- fmt.setFontPointSize(i+10)
- frags.append("block%d"%i)
- cursor.insertText(frags[i], fmt)
-
- doc = edit.document()
- block = doc.begin()
-
- index = 0
- for i in block:
- self.assertEqual(i.fragment().text(), frags[index])
- index += 1
-
-if __name__ == '__main__':
- app = QApplication(sys.argv)
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_667.py b/sources/pyside2/tests/QtWidgets/bug_667.py
deleted file mode 100644
index cbbd57c20..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_667.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import QTimer, QPointF
-from PySide2.QtWidgets import QApplication, QGraphicsView, QGraphicsScene, QGraphicsEllipseItem
-
-class Ball(QGraphicsEllipseItem):
- def __init__(self, d, parent=None):
- super(Ball, self).__init__(0, 0, d, d, parent)
- self.vel = QPointF(0,0) #commenting this out prevents the crash
-
-class Foo(QGraphicsView):
- def __init__(self):
- super(Foo, self).__init__(None)
- self.scene = QGraphicsScene(self.rect())
- self.setScene(self.scene)
- self.scene.addItem(Ball(10))
-
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
- w = Foo()
- w.show()
- w.raise_()
- QTimer.singleShot(0, w.close)
- sys.exit(app.exec_())
diff --git a/sources/pyside2/tests/QtWidgets/bug_668.py b/sources/pyside2/tests/QtWidgets/bug_668.py
deleted file mode 100644
index 42d956257..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_668.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# coding: utf-8
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-
-class A(QMainWindow):
- def __init__(self, parent=None):
- super(A, self).__init__(parent)
- a = QFileSystemModel(self)
- a.setRootPath(QDir.homePath())
-
- v = QTreeView(self)
- v.setModel(a)
- self.setCentralWidget(v)
- # Test index() method (see PYSIDE-570, PYSIDE-331)
- index = a.index(0, 0, QModelIndex())
-
-app = QApplication([])
-m = A()
-m.show()
-QTimer.singleShot(0, m.close)
-app.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/bug_674.py b/sources/pyside2/tests/QtWidgets/bug_674.py
deleted file mode 100644
index 1c8f55338..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_674.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-
-class TestBug679(unittest.TestCase):
- '''QGraphicsScene::clear() is missing'''
- def testIt(self):
- app = QApplication([])
-
- scene = QGraphicsScene()
- hello = scene.addText("Hello")
- scene.addText("World")
-
- self.assertEqual(sys.getrefcount(hello), 3)
- scene.clear()
- self.assertEqual(sys.getrefcount(hello), 2)
- self.assertEqual(len(scene.items()), 0)
- self.assertRaises(RuntimeError, hello.isVisible) # the C++ object was deleted
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_675.py b/sources/pyside2/tests/QtWidgets/bug_675.py
deleted file mode 100644
index 1e54f1b8f..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_675.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-app = QApplication([])
-
-scene = QGraphicsScene()
-
-# don't segfault due to lack of keepReferenceCall
-textEdit = scene.addWidget(QTextEdit())
-
-layout = QGraphicsLinearLayout()
-layout.addItem(textEdit)
-
-view = QGraphicsView(scene)
-view.show()
diff --git a/sources/pyside2/tests/QtWidgets/bug_688.py b/sources/pyside2/tests/QtWidgets/bug_688.py
deleted file mode 100644
index 97d62e2c9..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_688.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test bug 688: http://bugs.openbossa.org/show_bug.cgi?id=688'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QTextFrame, QTextCursor, QTextCharFormat, QFont, QTextFrameFormat
-from PySide2.QtWidgets import QTextEdit
-
-class BugTest(UsesQApplication):
- def testCase(self):
- editor = QTextEdit()
- cursor = QTextCursor(editor.textCursor())
- cursor.movePosition(QTextCursor.Start)
-
- mainFrame = cursor.currentFrame()
-
- plainCharFormat = QTextCharFormat()
- boldCharFormat = QTextCharFormat()
- boldCharFormat.setFontWeight(QFont.Bold);
- cursor.insertText("""
- Text documents are represented by the
- QTextDocument class, rather than by QString objects.
- Each QTextDocument object contains information about
- the document's internal representation, its structure,
- and keeps track of modifications to provide undo/redo
- facilities. This approach allows features such as the
- layout management to be delegated to specialized
- classes, but also provides a focus for the framework.""",
- plainCharFormat)
-
- frameFormat = QTextFrameFormat()
- frameFormat.setMargin(32)
- frameFormat.setPadding(8)
- frameFormat.setBorder(4)
- cursor.insertFrame(frameFormat)
-
- cursor.insertText("""
- Documents are either converted from external sources
- or created from scratch using Qt. The creation process
- can done by an editor widget, such as QTextEdit, or by
- explicit calls to the Scribe API.""",
- boldCharFormat)
-
- cursor = mainFrame.lastCursorPosition()
- cursor.insertText("""
- There are two complementary ways to visualize the
- contents of a document: as a linear buffer that is
- used by editors to modify the contents, and as an
- object hierarchy containing structural information
- that is useful to layout engines. In the hierarchical
- model, the objects generally correspond to visual
- elements such as frames, tables, and lists. At a lower
- level, these elements describe properties such as the
- style of text used and its alignment. The linear
- representation of the document is used for editing and
- manipulation of the document's contents.""",
- plainCharFormat)
-
-
- frame = cursor.currentFrame()
-
- items = []
-
- #test iterator
- for i in frame:
- items.append(i)
-
- #test __iadd__
- b = frame.begin()
- i = 0
- while not b.atEnd():
- self.assertEqual(b, items[i])
- self.assertTrue(b.parentFrame(), items[i].parentFrame())
- b.__iadd__(1)
- i += 1
-
- #test __isub__
- b = frame.end()
- i = 0
- while i > 0:
- self.assertEqual(b, items[i])
- self.assertTrue(b.parentFrame(), items[i].parentFrame())
- b.__isub__(1)
- i -= 1
-
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_693.py b/sources/pyside2/tests/QtWidgets/bug_693.py
deleted file mode 100644
index 68d19e00f..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_693.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-
-class MyModel (QAbstractListModel):
-
- stupidLine = QLine(0, 0, 10, 10)
-
- def rowCount(self, parent):
- return 1
-
- def data(self, index, role):
- return self.stupidLine
-
-class TestBug693(unittest.TestCase):
- def testIt(self):
- app = QApplication([])
- model = MyModel()
- view = QListView()
- view.setModel(model)
- view.show()
-
- # This must NOT throw the exception:
- # RuntimeError: Internal C++ object (PySide2.QtCore.QLine) already deleted.
- MyModel.stupidLine.isNull()
-
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_696.py b/sources/pyside2/tests/QtWidgets/bug_696.py
deleted file mode 100644
index abd4246a5..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_696.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtWidgets import QMainWindow, QMenu, QApplication
-
-class MainWindow(QMainWindow):
- def __init__(self, *args):
- self._menu = QMenu(self.dontexist) # attribute called with invalid C++ object
-
-class MainWindow2(QMainWindow):
- def __init__(self):
- self.show()
-
-class Bug696(UsesQApplication):
- def testContructorInitialization(self):
- self.assertRaises(AttributeError, MainWindow)
-
- def testContructorInitializationAndCPPFunction(self):
- self.assertRaises(RuntimeError, MainWindow2)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_711.py b/sources/pyside2/tests/QtWidgets/bug_711.py
deleted file mode 100644
index 3898e23f5..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_711.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QToolBar, QApplication, QToolButton
-
-try:
- xrange
-except NameError:
- xrange = range # py3k
-
-class TestLabelPixmap(unittest.TestCase):
- def testReference(self):
- toolbar = QToolBar()
-
- for i in xrange(20):
- toolbar.addAction(QAction("Action %d" % i, None))
-
- buttons = toolbar.findChildren(QToolButton, "")
- toolbar.clear()
-
- for b in buttons:
- self.assertRaises(RuntimeError, b.objectName)
-
-if __name__ == '__main__':
- app = QApplication([])
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_722.py b/sources/pyside2/tests/QtWidgets/bug_722.py
deleted file mode 100644
index 7eae897dc..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_722.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtWidgets import QDoubleSpinBox, QGraphicsBlurEffect
-
-class TestSignalConnection(UsesQApplication):
- def testFloatSignal(self):
- foo1 = QDoubleSpinBox()
- foo2 = QDoubleSpinBox()
- foo1.valueChanged[float].connect(foo2.setValue)
- foo2.valueChanged[float].connect(foo1.setValue)
- foo1.setValue(0.42)
- self.assertEqual(foo1.value(), foo2.value())
-
- def testQRealSignal(self):
- foo1 = QDoubleSpinBox()
- effect = QGraphicsBlurEffect()
- effect.blurRadiusChanged['qreal'].connect(foo1.setValue) # check if qreal is a valid type
- effect.setBlurRadius(0.42)
- self.assertAlmostEqual(foo1.value(), effect.blurRadius())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_728.py b/sources/pyside2/tests/QtWidgets/bug_728.py
deleted file mode 100644
index 5cd39b66f..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_728.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
-
-# Periodically check for the file dialog to appear and close it
-dialog = None
-def timerHandler():
- global dialog
- if dialog is not None:
- dialog.reject()
- else:
- for widget in QApplication.topLevelWidgets():
- if isinstance(widget, QDialog) and widget.isVisible():
- dialog = widget
-
-app = QApplication([])
-QTimer.singleShot(30000, app.quit) # emergency
-timer = QTimer()
-timer.setInterval(50)
-timer.timeout.connect(timerHandler)
-timer.start()
-
-# This test for a dead lock in QFileDialog.getOpenFileNames, the test fail with a timeout if the dead lock exists.
-QFileDialog.getOpenFileNames(None, "caption", QDir.homePath(), None, "", QFileDialog.DontUseNativeDialog)
diff --git a/sources/pyside2/tests/QtWidgets/bug_736.py b/sources/pyside2/tests/QtWidgets/bug_736.py
deleted file mode 100644
index 4e040f965..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_736.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class TestBug736 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
- slider = QSlider(Qt.Horizontal)
- slider2 = QSlider(Qt.Horizontal)
-
- slider2.setMaximum(10)
- slider.valueChanged[int].connect(slider2.setMaximum)
- slider.valueChanged[int].emit(100)
- self.assertEqual(slider2.maximum(), 100)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_750.py b/sources/pyside2/tests/QtWidgets/bug_750.py
deleted file mode 100644
index 20f2d5d58..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_750.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import QTimer
-from PySide2.QtGui import QPainter, QFont, QFontInfo
-from PySide2.QtWidgets import QWidget
-
-class MyWidget(QWidget):
- def paintEvent(self, e):
- p = QPainter(self)
- self._info = p.fontInfo()
- self._app.quit()
-
-
-class TestQPainter(UsesQApplication):
- def testFontInfo(self):
- w = MyWidget()
- w._app = self.app
- w._info = None
- QTimer.singleShot(300, w.show)
- self.app.exec_()
- self.assertTrue(w._info)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_778.py b/sources/pyside2/tests/QtWidgets/bug_778.py
deleted file mode 100644
index 148ae5ae5..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_778.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtWidgets import QTreeWidget, QTreeWidgetItem, QTreeWidgetItemIterator
-
-class QTreeWidgetItemIteratorTest(UsesQApplication):
- def testWidgetIterator(self):
- treeWidget = QTreeWidget()
- treeWidget.setColumnCount(1)
- items = []
- for i in range(10):
- items.append(QTreeWidgetItem(None, ['item: %d' % i]))
- treeWidget.insertTopLevelItems(0, items)
-
- index = 0
- for it in QTreeWidgetItemIterator(treeWidget):
- self.assertEqual(it.value().text(0), 'item: %d' % index)
- index += 1
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_785.py b/sources/pyside2/tests/QtWidgets/bug_785.py
deleted file mode 100644
index ba18a99a1..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_785.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QItemSelection
-from PySide2.QtGui import QStandardItemModel, QStandardItem
-from PySide2.QtWidgets import QApplication
-class Bug324(unittest.TestCase):
- def testOperators(self):
- model = QStandardItemModel()
- for i in range(100):
- model.appendRow(QStandardItem("Item: %d"%i))
-
- first = model.index(0, 0)
- second = model.index(10, 0)
- third = model.index(20, 0)
- fourth = model.index(30, 0)
-
- sel = QItemSelection(first, second)
- sel2 = QItemSelection()
- sel2.select(third, fourth)
-
- sel3 = sel + sel2 #check operator +
- self.assertEqual(len(sel3), 2)
- sel4 = sel
- sel4 += sel2 #check operator +=
- self.assertEqual(len(sel4), 2)
- self.assertEqual(sel4, sel3)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_793.py b/sources/pyside2/tests/QtWidgets/bug_793.py
deleted file mode 100644
index 37eddfd57..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_793.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer
-from PySide2.QtWidgets import QWidget, QApplication
-
-class TestW1(QWidget):
- def __init__(self, parent = None):
- super(TestW1, self).__init__(parent)
- TestW2(parent, self)
-
-class TestW2(QWidget):
- def __init__(self, ancestor, parent = None):
- super(TestW2, self).__init__(parent)
- self.ancestor_ref = ancestor
-
-class Test(QWidget):
- def __init__(self):
- super(Test, self).__init__()
- TestW1(self)
-
-class TestQApplicationDestrcutor(unittest.TestCase):
- def testDestructor(self):
- w = Test()
- w.show()
- QTimer.singleShot(0, w.close)
-
-if __name__ == '__main__':
- app = QApplication(sys.argv)
- unittest.main()
- sys.exit(app.exec_())
diff --git a/sources/pyside2/tests/QtWidgets/bug_811.py b/sources/pyside2/tests/QtWidgets/bug_811.py
deleted file mode 100644
index fd618fba3..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_811.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtGui import QTextBlockUserData, QTextCursor
-from PySide2.QtWidgets import QTextEdit
-
-class TestUserData(QTextBlockUserData):
- def __init__(self, data):
- super(TestUserData, self).__init__()
- self.data = data
-
-class TestUserDataRefCount(UsesQApplication):
- def testRefcount(self):
- textedit = QTextEdit()
- textedit.setReadOnly(True)
- doc = textedit.document()
- cursor = QTextCursor(doc)
- cursor.insertText("PySide Rocks")
- ud = TestUserData({"Life": 42})
- self.assertEqual(sys.getrefcount(ud), 2)
- cursor.block().setUserData(ud)
- self.assertEqual(sys.getrefcount(ud), 3)
- ud2 = cursor.block().userData()
- self.assertEqual(sys.getrefcount(ud), 4)
- self.udata = weakref.ref(ud, None)
- del ud, ud2
- self.assertEqual(sys.getrefcount(self.udata()), 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_834.py b/sources/pyside2/tests/QtWidgets/bug_834.py
deleted file mode 100644
index 9dba711ed..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_834.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2 import QtCore, QtWidgets
-
-class Window(QtWidgets.QMainWindow):
- def childEvent(self, event):
- super(Window, self).childEvent(event)
-
-app = QtWidgets.QApplication([])
-window = Window()
-
-dock1 = QtWidgets.QDockWidget()
-dock2 = QtWidgets.QDockWidget()
-window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock1)
-window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock2)
-window.tabifyDockWidget(dock1, dock2)
-
-window.show()
-QtCore.QTimer.singleShot(0, window.close)
-app.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/bug_836.py b/sources/pyside2/tests/QtWidgets/bug_836.py
deleted file mode 100644
index 4d995ddcb..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_836.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class Mixin1(object):
- pass
-
-class Mixin2(object):
- pass
-
-class Mixin3(object):
- pass
-
-class MainWindow(Mixin1, Mixin2, Mixin3, QFrame):
- def __init__(self):
- super(MainWindow, self).__init__()
-
-def main():
- app = QApplication([])
- # if it doesn't crash it should pass
- w = MainWindow()
- w.show()
- QTimer.singleShot(0, w.close)
- app.exec_()
-
-if __name__ == "__main__":
- main()
-
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_844.py b/sources/pyside2/tests/QtWidgets/bug_844.py
deleted file mode 100644
index a14e3afc3..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_844.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import os
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtWidgets import *
-from PySide2.QtCore import *
-
-class QtKeyPressListener(QObject):
- def __init__(self, obj):
- QObject.__init__(self)
- obj.installEventFilter(self)
-
- def eventFilter(self, obj, event):
- # This used to crash here due to a misbehaviour of type discovery!
- return QObject.eventFilter(self, obj, event)
-
-app = QApplication([])
-key_listener = QtKeyPressListener(app)
-w = QLabel('Hello')
-w.show()
-QTimer.singleShot(0, w.close)
-app.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/bug_854.py b/sources/pyside2/tests/QtWidgets/bug_854.py
deleted file mode 100644
index acfa1c270..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_854.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QTableView, QVBoxLayout, QApplication
-from PySide2.QtCore import QAbstractItemModel
-
-from helper.usesqapplication import UsesQApplication
-
-
-class VirtualList(QAbstractItemModel):
- def __getitem__(self, index):
- self._getItemCalled = True
- pass
-
- def rowCount(self, parent):
- return 5000
-
- def columnCount(self, parent):
- return 3
-
- def index(self, row, column, parent):
- return self.createIndex(row, column)
-
- def parent(self, index):
- return QModelIndex()
-
- def data(self, index, role):
- return "(%i, %i)" % (index.row(), index.column())
-
-
-class TestQAbstractItemModel(UsesQApplication):
- def testSetModel(self):
- model = VirtualList()
- model._getItemCalled = False
- table = QTableView()
- table.setModel(model)
- table.show()
- self.assertFalse(model._getItemCalled)
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_860.py b/sources/pyside2/tests/QtWidgets/bug_860.py
deleted file mode 100644
index 483973fdb..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_860.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QSignalMapper
-from PySide2.QtWidgets import QCheckBox
-
-from helper.usesqapplication import UsesQApplication
-
-class MultipleSlotTest(UsesQApplication):
- def cb_changed(self, i):
- self._changed = True
-
- def cb_changedVoid(self):
- self._changed = True
-
- def testSignalMapper(self):
- checkboxMapper = QSignalMapper()
- box = QCheckBox('check me')
- box.stateChanged.connect(checkboxMapper.map)
-
- checkboxMapper.setMapping(box, box.text())
- checkboxMapper.mappedString[str].connect(self.cb_changed)
- self._changed = False
- box.setChecked(True)
- self.assertTrue(self._changed)
-
- def testSimpleSignal(self):
- box = QCheckBox('check me')
- box.stateChanged[int].connect(self.cb_changedVoid)
- self._changed = False
- box.setChecked(True)
- self.assertTrue(self._changed)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_862.py b/sources/pyside2/tests/QtWidgets/bug_862.py
deleted file mode 100644
index 96aeb6f14..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_862.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-
-#
-# Test for bug 862, original description was:
-#
-# print seems to be broken at least for QGraphicsItems-derived objects. The
-# attached code shows:
-#
-# <__main__.MyQObject object at 0xf99f38>
-# <__main__.MyQWidget object at 0xf99f38>
-# <PySide.QtGui.MyQGraphicsObject (this = 0x11c0d60 , parent = 0x0 , pos =
-# QPointF(0, 0) , z = 0 , flags = ( ) ) at 0xf99f38>
-# <PySide.QtGui.QGraphicsItem (this = 0x11c2e60 , parent = 0x0 , pos = QPointF(0,
-# 0) , z = 0 , flags = ( ) ) at 0xf99f38>
-#
-# Where it should be showing something like:
-#
-# <__main__.MyQObject object at 0x7f55cf226c20>
-# <__main__.MyQWidget object at 0x7f55cf226c20>
-# <__main__.MyQGraphicsObject object at 0x7f55cf226c20>
-# <__main__.MyQGraphicsItem object at 0x7f55cf226c20>
-#
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from PySide2.QtWidgets import *
-import PySide2.QtCore
-
-
-class MyQObject(QObject):
- def __init__(self):
- QObject.__init__(self)
-
-class MyQWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
-class MyQGraphicsObject(QGraphicsObject):
- def __init__(self):
- QGraphicsObject.__init__(self)
-
-class MyQGraphicsItem(QGraphicsItem):
- def __init__(self):
- QGraphicsItem.__init__(self)
-
-class TestRepr (unittest.TestCase):
-
- def testIt(self):
-
- app = QApplication([])
-
- self.assertEqual("<__main__.MyQObject(0x", repr(MyQObject())[:22])
- self.assertEqual("<__main__.MyQWidget(0x", repr(MyQWidget())[:22])
- self.assertEqual("<__main__.MyQGraphicsObject(0x", repr(MyQGraphicsObject())[:30])
- self.assertEqual("<__main__.MyQGraphicsItem(0x", repr(MyQGraphicsItem())[:28])
-
- self.assertEqual("<PySide2.QtCore.QObject(0x", repr(QObject())[:26])
- self.assertEqual("<PySide2.QtCore.QObject(0x", repr(PySide2.QtCore.QObject())[:26])
- self.assertEqual("<PySide2.QtWidgets.QWidget(0x", repr(QWidget())[:29])
- self.assertEqual("<PySide2.QtWidgets.QGraphicsWidget(0x", repr(QGraphicsWidget())[:37])
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_871.py b/sources/pyside2/tests/QtWidgets/bug_871.py
deleted file mode 100644
index 4a53b98aa..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_871.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QValidator, QIntValidator
-from PySide2.QtWidgets import QLineEdit
-
-'''Bug #871 - http://bugs.pyside.org/show_bug.cgi?id=871'''
-
-
-class BlankIntValidator(QIntValidator):
- def validate(self,input,pos):
- if input == '':
- return QValidator.Acceptable, input, pos
- else:
- return QIntValidator.validate(self,input,pos)
-
-
-class Bug871Test(UsesQApplication):
- def testWithoutValidator(self):
- edit = QLineEdit()
- self.assertEqual(edit.text(), '')
- edit.insert('1')
- self.assertEqual(edit.text(), '1')
- edit.insert('a')
- self.assertEqual(edit.text(), '1a')
- edit.insert('2')
- self.assertEqual(edit.text(), '1a2')
-
- def testWithIntValidator(self):
- edit = QLineEdit()
- edit.setValidator(BlankIntValidator(edit))
- self.assertEqual(edit.text(), '')
- edit.insert('1')
- self.assertEqual(edit.text(), '1')
- edit.insert('a')
- self.assertEqual(edit.text(), '1')
- edit.insert('2')
- self.assertEqual(edit.text(), '12')
-
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_879.py b/sources/pyside2/tests/QtWidgets/bug_879.py
deleted file mode 100644
index 981be0390..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_879.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication, QTimer, QEvent, Qt
-from PySide2.QtWidgets import QApplication, QSpinBox
-from PySide2.QtGui import QKeyEvent
-
-class MySpinBox(QSpinBox):
-
- def validate(self,text,pos):
- return QSpinBox.validate(self,text,pos)
-
-class TestBug879 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
- self.box = MySpinBox()
- self.box.show()
-
- QTimer.singleShot(0, self.sendKbdEvent)
- QTimer.singleShot(100, app.quit)
- app.exec_()
-
- self.assertEqual(self.box.text(), '0')
-
- def sendKbdEvent(self):
- ev = QKeyEvent(QEvent.KeyPress, Qt.Key_A, Qt.NoModifier, 'a')
- QCoreApplication.sendEvent(self.box, ev)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_919.py b/sources/pyside2/tests/QtWidgets/bug_919.py
deleted file mode 100644
index 40ba94d2e..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_919.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.timedqapplication import TimedQApplication
-from PySide2.QtCore import Signal, QTimer
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QPushButton, QStyleOptionButton, QApplication, QStyle
-
-class MyWidget(QPushButton):
- def __init__(self, parent = None):
- QPushButton.__init__(self, parent)
- self._painted = False
-
- def _emitPainted(self):
- self.paintReceived.emit()
-
- def paintEvent(self, e):
- p = QPainter(self)
- style = QApplication.style()
- option = QStyleOptionButton()
- style.drawControl(QStyle.CE_PushButton, option, p)
- self._painted = True
- QTimer.singleShot(0, self._emitPainted)
-
- paintReceived = Signal()
-
-class TestBug919(TimedQApplication):
- def setUp(self):
- TimedQApplication.setUp(self, 2000)
-
- def testFontInfo(self):
- w = MyWidget()
- w.paintReceived.connect(self.app.quit)
- w.show()
- self.app.exec_()
- self.assertTrue(w._painted)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_921.py b/sources/pyside2/tests/QtWidgets/bug_921.py
deleted file mode 100644
index 56abe0970..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_921.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-from helper.timedqapplication import TimedQApplication
-
-class Signaller(QtCore.QObject):
- s1 = QtCore.Signal()
- s2 = QtCore.Signal()
- s3 = QtCore.Signal()
-
-class Window(object):
-
- def __init__(self, s):
- self._window = QtWidgets.QMainWindow()
- self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
- self._window.setWindowTitle("Demo!")
-
- self._s = s
- self._s.s1.connect(self._on_signal)
- self._s.s2.connect(self._on_signal)
-
- def show(self):
- self._window.show()
-
- def _on_signal(self):
- self._window.setWindowTitle("Signaled!")
-
-class TestTimedApp(TimedQApplication):
- def testSignals(self):
- s = Signaller()
- w = Window(s)
- w.show()
-
- def midleFunction():
- def internalFunction():
- pass
- s.s3.connect(internalFunction)
-
- midleFunction()
- self.app.exec_()
- del w
-
- s.s1.emit()
- s.s2.emit()
- s.s3.emit()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_941.py b/sources/pyside2/tests/QtWidgets/bug_941.py
deleted file mode 100644
index 074fde8e6..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_941.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-def foo(a, b):
- pass
-
-class TestBug941 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
- view = QHeaderView(Qt.Horizontal)
- self.assertTrue(view.sortIndicatorChanged.connect(foo))
- view.sortIndicatorChanged.emit(0, Qt.Vertical) # this can't raise an exception!
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_964.py b/sources/pyside2/tests/QtWidgets/bug_964.py
deleted file mode 100644
index a160afd1b..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_964.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
-
-class TestBug964 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
- model = QStringListModel(["1", "2"])
- view = QListView()
- view.setModel(model)
- view.setCurrentIndex(model.index(0,0))
- newCursor = view.moveCursor(QAbstractItemView.MoveDown, Qt.NoModifier)
- self.assertEqual(newCursor.row(), 1)
- self.assertEqual(newCursor.column(), 0)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_967.py b/sources/pyside2/tests/QtWidgets/bug_967.py
deleted file mode 100644
index 19d6b1e43..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_967.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-class TestBug967 (unittest.TestCase):
-
- def callback(self, arg):
- self.arg = arg
-
- def testIt(self):
- self.arg = None
- app = QApplication([])
- obj = QComboBox()
- obj.currentIndexChanged.connect(self.callback)
- obj.currentIndexChanged.emit(5)
- self.assertEqual(self.arg, 5)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_972.py b/sources/pyside2/tests/QtWidgets/bug_972.py
deleted file mode 100644
index 15bf949a8..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_972.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QSizeF
-from PySide2.QtWidgets import QGraphicsProxyWidget, QSizePolicy, QPushButton, QGraphicsScene, QGraphicsView
-
-from helper.timedqapplication import TimedQApplication
-
-def createItem(minimum, preferred, maximum, name):
- w = QGraphicsProxyWidget()
-
- w.setWidget(QPushButton(name))
- w.setMinimumSize(minimum)
- w.setPreferredSize(preferred)
- w.setMaximumSize(maximum)
- w.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
-
- return w
-
-class TestBug972 (TimedQApplication):
-
- # Test if the function QGraphicsProxyWidget.setWidget have the correct behavior
- def testIt(self):
- scene = QGraphicsScene()
-
- minSize = QSizeF(30, 100)
- prefSize = QSizeF(210, 100)
- maxSize = QSizeF(300, 100)
-
- a = createItem(minSize, prefSize, maxSize, "A")
- b = createItem(minSize, prefSize, maxSize, "B")
- c = createItem(minSize, prefSize, maxSize, "C")
- d = createItem(minSize, prefSize, maxSize, "D")
-
- view = QGraphicsView(scene)
- view.show()
- self.app.exec_()
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_979.py b/sources/pyside2/tests/QtWidgets/bug_979.py
deleted file mode 100644
index c5d65c361..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_979.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtWidgets import QDialog
-from import_test import PysideImportTest2
-
-class PysideImportTest1(QDialog, PysideImportTest2):
- pass
-
-if __name__ == '__main__':
- quit()
-
diff --git a/sources/pyside2/tests/QtWidgets/bug_988.py b/sources/pyside2/tests/QtWidgets/bug_988.py
deleted file mode 100644
index 93c2cc1aa..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_988.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-class TestBug988 (unittest.TestCase):
-
- def callback(self, arg):
- self.arg = arg
-
- def testIt(self):
- self.arg = None
- app = QApplication([])
- obj = QTabWidget()
- obj.currentChanged.connect(self.callback)
- obj.currentChanged.emit(5)
- self.assertEqual(self.arg, 5)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_998.py b/sources/pyside2/tests/QtWidgets/bug_998.py
deleted file mode 100644
index 7c7587dd2..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_998.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication
-
-class TestBug998 (unittest.TestCase):
- def testNoFocusWindow(self):
- widget = QApplication.focusWidget()
- self.assertTrue(widget == None)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/customproxywidget_test.py b/sources/pyside2/tests/QtWidgets/customproxywidget_test.py
deleted file mode 100644
index 7082fb12c..000000000
--- a/sources/pyside2/tests/QtWidgets/customproxywidget_test.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QLabel
-from PySide2.QtWidgets import QGraphicsScene, QGraphicsView, QGraphicsItem, QGraphicsProxyWidget
-
-class CustomProxy(QGraphicsProxyWidget):
- def __init__(self, parent=None, wFlags=0):
- QGraphicsProxyWidget.__init__(self, parent, wFlags)
-
-class CustomProxyWidgetTest(UsesQApplication):
- def testCustomProxyWidget(self):
- scene = QGraphicsScene()
-
- proxy = CustomProxy(None, Qt.Window)
- widget = QLabel('Widget')
- proxy.setWidget(widget)
- proxy.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
- scene.addItem(proxy)
- scene.setSceneRect(scene.itemsBoundingRect())
-
- view = QGraphicsView(scene)
- view.setRenderHints(QPainter.Antialiasing|QPainter.SmoothPixmapTransform)
- view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
- view.show()
-
- timer = QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/event_filter_test.py b/sources/pyside2/tests/QtWidgets/event_filter_test.py
deleted file mode 100644
index fe18a3646..000000000
--- a/sources/pyside2/tests/QtWidgets/event_filter_test.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QObject, QEvent
-from PySide2.QtWidgets import QWidget
-
-class MyFilter(QObject):
- def eventFilter(self, obj, event):
- if event.type() == QEvent.KeyPress:
- pass
- return QObject.eventFilter(self, obj, event)
-
-
-class EventFilter(UsesQApplication):
- def testRefCount(self):
- o = QObject()
- filt = MyFilter()
- o.installEventFilter(filt)
- self.assertEqual(sys.getrefcount(o), 2)
-
- o.installEventFilter(filt)
- self.assertEqual(sys.getrefcount(o), 2)
-
- o.removeEventFilter(filt)
- self.assertEqual(sys.getrefcount(o), 2)
-
- def testObjectDestructorOrder(self):
- w = QWidget()
- filt = MyFilter()
- filt.app = self.app
- w.installEventFilter(filt)
- w.show()
- w.close()
- w = None
- self.assertTrue(True)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/grandparent_method_test.py b/sources/pyside2/tests/QtWidgets/grandparent_method_test.py
deleted file mode 100644
index 6b8fcbab5..000000000
--- a/sources/pyside2/tests/QtWidgets/grandparent_method_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests for calling methods further than the direct parent'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QPushButton, QWidget
-
-from helper.usesqapplication import UsesQApplication
-
-class Dummy(QPushButton):
-
- def show(self):
- QWidget.show(self)
- self.called = True
-
-class GrandParentMethod(UsesQApplication):
- def testMethod(self):
- obj = Dummy()
- obj.show()
- self.assertTrue(obj.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/hashabletype_test.py b/sources/pyside2/tests/QtWidgets/hashabletype_test.py
deleted file mode 100644
index 0c3f045ce..000000000
--- a/sources/pyside2/tests/QtWidgets/hashabletype_test.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for __hash__'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QTreeWidgetItem
-from helper.usesqapplication import UsesQApplication
-
-class HashableTest(UsesQApplication):
-
- def testQTreeWidgetItemHash(self):
- h = {}
- obj = QTreeWidgetItem()
- h[obj] = 2
- self.assertTrue(h.get(obj), 2)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/keep_reference_test.py b/sources/pyside2/tests/QtWidgets/keep_reference_test.py
deleted file mode 100644
index c0139ed9f..000000000
--- a/sources/pyside2/tests/QtWidgets/keep_reference_test.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from sys import getrefcount
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import *
-from PySide2.QtWidgets import QTableView
-
-class TestModel(QAbstractTableModel):
- def __init__(self, parent=None):
- QAbstractTableModel.__init__(self, parent)
- def rowCount(self, parent):
- return 0
- def columnCount(self, parent):
- return 0
- def data(self, index, role):
- return None
-
-class KeepReferenceTest(UsesQApplication):
-
- def testModelWithoutParent(self):
- view = QTableView()
- model = TestModel()
- view.setModel(model)
- samemodel = view.model()
- self.assertEqual(model, samemodel)
-
- def testModelWithParent(self):
- view = QTableView()
- model = TestModel(None)
- view.setModel(model)
- samemodel = view.model()
- self.assertEqual(model, samemodel)
-
- def testReferenceCounting(self):
- '''Tests reference count of model object referred by view objects.'''
- model1 = TestModel()
- refcount1 = getrefcount(model1)
- view1 = QTableView()
- view1.setModel(model1)
- self.assertEqual(getrefcount(view1.model()), refcount1 + 1)
-
- view2 = QTableView()
- view2.setModel(model1)
- self.assertEqual(getrefcount(view2.model()), refcount1 + 2)
-
- model2 = TestModel()
- view2.setModel(model2)
- self.assertEqual(getrefcount(view1.model()), refcount1 + 1)
-
- def testReferenceCountingWhenDeletingReferrer(self):
- '''Tests reference count of model object referred by deceased view object.'''
- model = TestModel()
- refcount1 = getrefcount(model)
- view = QTableView()
- view.setModel(model)
- self.assertEqual(getrefcount(view.model()), refcount1 + 1)
-
- del view
- self.assertEqual(getrefcount(model), refcount1)
-
- def testReferreedObjectSurvivalAfterContextEnd(self):
- '''Model object assigned to a view object must survive after getting out of context.'''
- def createModelAndSetToView(view):
- model = TestModel()
- model.setObjectName('created model')
- view.setModel(model)
- view = QTableView()
- createModelAndSetToView(view)
- model = view.model()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/missing_symbols_test.py b/sources/pyside2/tests/QtWidgets/missing_symbols_test.py
deleted file mode 100644
index 064ed0b7c..000000000
--- a/sources/pyside2/tests/QtWidgets/missing_symbols_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''(Very) Simple test case for missing names from QtGui and QtWidgets'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtGui
-from PySide2 import QtWidgets
-
-class MissingClasses(unittest.TestCase):
- def testQDrag(self): # Bug 222
- getattr(QtGui, 'QDrag')
-
- def testQDropEvent(self): # Bug 255
- getattr(QtGui, 'QDropEvent')
-
-class MissingMembers(unittest.TestCase):
-
- def testQFontMetricsSize(self): # Bug 223
- QtGui.QFontMetrics.size
-
- def testQLayoutSetSpacing(self): # Bug 231
- QtWidgets.QLayout.setSpacing
-
- def testQImageLoad(self): # Bug 257
- QtGui.QImage.load
-
- def testQStandardItemModelinsertRow(self): # Bug 227
- QtGui.QStandardItemModel.insertRow
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/paint_event_test.py b/sources/pyside2/tests/QtWidgets/paint_event_test.py
deleted file mode 100644
index d57a523eb..000000000
--- a/sources/pyside2/tests/QtWidgets/paint_event_test.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test paint event override in python'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimerEvent
-from PySide2.QtWidgets import QApplication, QWidget
-
-from helper.usesqapplication import UsesQApplication
-
-class MyWidget(QWidget):
- '''Sample widget'''
-
- def __init__(self, app=None):
- #Creates a new widget
- if app is None:
- app = QApplication([])
-
- super(MyWidget, self).__init__()
- self.app = app
- self.runs = 0
- self.max_runs = 5
- self.paint_event_called = False
-
- def timerEvent(self, event):
- #Timer event method
- self.runs += 1
-
- if self.runs == self.max_runs:
- self.app.quit()
-
- if not isinstance(event, QTimerEvent):
- raise TypeError('Invalid event type. Must be QTimerEvent')
-
- def paintEvent(self, event):
- #Empty paint event method
- # XXX: should be using super here, but somehow PyQt4
- # complains about paintEvent not present in super
- QWidget.paintEvent(self, event)
- self.paint_event_called = True
-
-
-class PaintEventOverride(UsesQApplication):
- '''Test case for overriding QWidget.paintEvent'''
-
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(PaintEventOverride, self).setUp()
- self.widget = MyWidget(self.app)
-
- def tearDown(self):
- #Release resources
- del self.widget
- super(PaintEventOverride, self).tearDown()
-
- def testPaintEvent(self):
- #Test QWidget.paintEvent override
- timer_id = self.widget.startTimer(100)
- self.widget.show()
- self.app.exec_()
-
- self.widget.killTimer(timer_id)
-
- self.assertTrue(self.widget.paint_event_called)
- self.assertEqual(self.widget.runs, 5)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/parent_method_test.py b/sources/pyside2/tests/QtWidgets/parent_method_test.py
deleted file mode 100644
index ef8e9ca8c..000000000
--- a/sources/pyside2/tests/QtWidgets/parent_method_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QTimer, QThread
-from PySide2.QtWidgets import *
-
-class Foo(QTableView):
- def __init__(self, parent=None):
- QTableView.__init__(self, parent)
-
-from helper.usesqapplication import UsesQApplication
-
-class TestParentType(UsesQApplication):
-
- def testParentType(self):
- # Test the problem with calling QObject.parent from a QWidget
- # when the parent is a python class derived from a QWidget-derived
- # class. The method was returning the last C++ class in the hierarchy
- parent = Foo()
- w2 = QWidget(parent)
- self.assertTrue(isinstance(w2.parentWidget(), Foo))
- self.assertTrue(isinstance(w2.parent(), Foo))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/private_mangle_test.py b/sources/pyside2/tests/QtWidgets/private_mangle_test.py
deleted file mode 100644
index 75545537b..000000000
--- a/sources/pyside2/tests/QtWidgets/private_mangle_test.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-This is the example from https://bugreports.qt.io/browse/PYSIDE-772
-with no interaction as a unittest.
-"""
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Signal
-from PySide2.QtWidgets import QApplication, QWidget
-from PySide2 import QtWidgets
-
-class Harness(QWidget):
- clicked = Signal()
-
- def __init__(self):
- QWidget.__init__(self)
- self.clicked.connect(self.method)
- self.clicked.connect(self._method)
- self.clicked.connect(self.__method)
-
- def method(self): # Public method
- self.method_result = self.sender()
-
- def _method(self): # Private method
- self.method__result = self.sender()
-
- def __method(self): # Name mangled method
- self.method___result = self.sender()
-
-
-class _Under(QWidget):
- clicked = Signal()
-
- def __init__(self):
- QWidget.__init__(self)
- self.clicked.connect(self.method)
- self.clicked.connect(self._method)
- self.clicked.connect(self.__method)
-
- def method(self): # Public method
- self.method_result = self.sender()
-
- def _method(self): # Private method
- self.method__result = self.sender()
-
- def __method(self): # Name mangled method
- self.method___result = self.sender()
-
-
-class TestMangle(unittest.TestCase):
-
- def setUp(self):
- QApplication()
-
- def tearDown(self):
- qApp.shutdown()
-
- def testPrivateMangle(self):
- harness = Harness()
- harness.clicked.emit()
- self.assertEqual(harness.method_result, harness)
- self.assertEqual(harness.method__result, harness)
- self.assertEqual(harness.method___result, harness)
- self.assertTrue("method" in type(harness).__dict__)
- self.assertTrue("_method" in type(harness).__dict__)
- self.assertFalse("__method" in type(harness).__dict__)
- self.assertTrue("_Harness__method" in type(harness).__dict__)
-
- def testPrivateMangleUnder(self):
- harness = _Under()
- harness.clicked.emit()
- self.assertEqual(harness.method_result, harness)
- self.assertEqual(harness.method__result, harness)
- self.assertEqual(harness.method___result, harness)
- # make sure that we skipped over the underscore in "_Under"
- self.assertTrue("method" in type(harness).__dict__)
- self.assertTrue("_method" in type(harness).__dict__)
- self.assertFalse("__method" in type(harness).__dict__)
- self.assertTrue("_Under__method" in type(harness).__dict__)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/python_properties_test.py b/sources/pyside2/tests/QtWidgets/python_properties_test.py
deleted file mode 100644
index fb1679297..000000000
--- a/sources/pyside2/tests/QtWidgets/python_properties_test.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-class Properties(unittest.TestCase):
-
- def testStaticProperty(self):
- self.assertEqual(QtWidgets.QGraphicsItem.UserType, 65536)
-
- def testInstanceProperty(self):
- p = QtWidgets.QStyleOptionViewItem()
- self.assertTrue(isinstance(p.locale, QtCore.QLocale))
-
- # PSYIDE-304, can assign to a "const QWidget *" field
- p.widget = None
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py b/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py
deleted file mode 100644
index 8699c7971..000000000
--- a/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QSizeF, QTimer
-from PySide2.QtGui import QTextFormat, QTextCharFormat, QPyTextObject
-from PySide2.QtWidgets import QTextEdit
-from helper.usesqapplication import UsesQApplication
-
-class Foo(QPyTextObject):
- called = False
-
- def intrinsicSize(self, doc, posInDocument, format):
- Foo.called = True
- return QSizeF(10, 10)
-
- def drawObject(self, painter, rect, doc, posInDocument, format):
- pass
-
-class QAbstractTextDocumentLayoutTest(UsesQApplication):
-
- objectType = QTextFormat.UserObject + 1
-
- def foo(self):
- fmt = QTextCharFormat()
- fmt.setObjectType(QAbstractTextDocumentLayoutTest.objectType)
-
- cursor = self.textEdit.textCursor()
- cursor.insertText(chr(0xfffc), fmt)
- self.textEdit.setTextCursor(cursor)
- self.textEdit.close()
-
- def testIt(self):
-
- self.textEdit = QTextEdit()
- self.textEdit.show()
-
- interface = Foo()
- self.textEdit.document().documentLayout().registerHandler(QAbstractTextDocumentLayoutTest.objectType, interface)
-
- QTimer.singleShot(0, self.foo)
- self.app.exec_()
-
- self.assertTrue(Foo.called)
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qaction_test.py b/sources/pyside2/tests/QtWidgets/qaction_test.py
deleted file mode 100644
index d587a59b1..000000000
--- a/sources/pyside2/tests/QtWidgets/qaction_test.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QWidget
-from helper.usesqapplication import UsesQApplication
-
-class QPainterDrawText(UsesQApplication):
-
- def _cb(self):
- self._called = True
-
- def testSignal(self):
- o = QWidget()
- act = QAction(o)
- self._called = False
- act.triggered.connect(self._cb)
- act.trigger()
- self.assertTrue(self._called)
-
- def testNewCtor(self):
- o = QWidget()
- self._called = False
- myAction = QAction("&Quit", o, triggered=self._cb)
- myAction.trigger()
- self.assertTrue(self._called)
-
-
-class SetShortcutTest(UsesQApplication):
-
- def testSetShortcut(self):
- # Somehow an exception was leaking from the constructor
- # and appearing in setShortcut.
- o = QWidget()
- action = QAction('aaaa', o)
- shortcut = 'Ctrl+N'
- action.setShortcut(shortcut)
- s2 = action.shortcut()
- self.assertEqual(s2, shortcut)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qapp_issue_585.py b/sources/pyside2/tests/QtWidgets/qapp_issue_585.py
deleted file mode 100644
index d7afdec3a..000000000
--- a/sources/pyside2/tests/QtWidgets/qapp_issue_585.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-The bug was caused by this commit:
-"Support the qApp macro correctly, final version incl. debug"
-e30e0c161b2b4d50484314bf006e9e5e8ff6b380
-2017-10-27
-
-The bug was first solved by this commit:
-"Fix qApp macro refcount"
-b811c874dedd14fd8b072bc73761d39255216073
-2018-03-21
-
-This test triggers the refcounting bug of qApp, issue PYSIDE-585.
-Finally, the real patch included more changes, because another error
-was in the ordering of shutdown calls. It was found using the following
-Python configuration:
-
- In Python 3.6 create a directory 'debug' and cd into it.
-
- ../configure --with-pydebug --prefix=$HOME/pydebug/ --enable-shared
-
-Then a lot more refcounting errors show up, which are due to a bug in
-the code position of the shutdown procedure.
-The reason for the initial refcount bug was that the shutdown code is once
-more often called than the creation of the qApp wrapper.
-Finally, it was easiest and more intuitive to simply make the refcount of
-qApp_content equal to that of Py_None, which is also not supposed to be
-garbage-collected.
-
-For some reason, the test does not work as a unittest because it creates
-no crash. We leave it this way.
-"""
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtCore import QTimer
-from PySide2 import QtWidgets
-
-app_instance = QtWidgets.QApplication([])
-# If the following line is commented, application doesn't crash on exit anymore.
-app_instance2 = app_instance
-QTimer.singleShot(0, qApp.quit)
-app_instance.exec_()
diff --git a/sources/pyside2/tests/QtWidgets/qapp_test.py b/sources/pyside2/tests/QtWidgets/qapp_test.py
deleted file mode 100644
index cda34be77..000000000
--- a/sources/pyside2/tests/QtWidgets/qapp_test.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test the presence of qApp Macro'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-
-class QAppPresence(unittest.TestCase):
-
- def testQApp(self):
- #QtGui.qApp variable is instance of QApplication
- self.assertTrue(isinstance(qApp, QApplication))
-
-def main():
- app = QApplication([])
- unittest.main()
-
-if __name__ == '__main__':
- main()
diff --git a/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py b/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py
deleted file mode 100644
index f70086460..000000000
--- a/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication, QPushButton, QWidget, QSpinBox
-
-class QApplicationDelete(unittest.TestCase):
- '''Test for segfault when deleting a QApplication before a QWidget'''
-
- def testQPushButton(self):
- #QApplication deleted before QPushButton
- a = QApplication([])
- b = QPushButton('aaaa')
- del a
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qapplication_test.py b/sources/pyside2/tests/QtWidgets/qapplication_test.py
deleted file mode 100644
index 0fc174e8f..000000000
--- a/sources/pyside2/tests/QtWidgets/qapplication_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication
-
-class TestQApplication(unittest.TestCase):
- def testNoArguments(self):
- app = QApplication()
- self.assertIsInstance(app, QApplication)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qbrush_test.py b/sources/pyside2/tests/QtWidgets/qbrush_test.py
deleted file mode 100644
index 97b1e824a..000000000
--- a/sources/pyside2/tests/QtWidgets/qbrush_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QBrush'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QColor, QBrush
-from PySide2.QtWidgets import QApplication
-
-from helper.usesqapplication import UsesQApplication
-
-class Constructor(UsesQApplication):
- '''Test case for constructor of QBrush'''
-
- def testQColor(self):
- #QBrush(QColor) constructor
- color = QColor('black')
- obj = QBrush(color)
- self.assertEqual(obj.color(), color)
-
- obj = QBrush(Qt.blue)
- self.assertEqual(obj.color(), Qt.blue)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qcolormap_test.py b/sources/pyside2/tests/QtWidgets/qcolormap_test.py
deleted file mode 100644
index 1123b0d21..000000000
--- a/sources/pyside2/tests/QtWidgets/qcolormap_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QColormap
-from helper.usesqapplication import UsesQApplication
-
-
-class QColormapTest(UsesQApplication):
-
- def testQColormap(self):
- qc = QColormap.instance()
- self.assertEqual(qc.size(), -1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qdynamic_signal.py b/sources/pyside2/tests/QtWidgets/qdynamic_signal.py
deleted file mode 100644
index 4b9f76333..000000000
--- a/sources/pyside2/tests/QtWidgets/qdynamic_signal.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from PySide2.QtWidgets import QInputDialog
-
-from helper.usesqapplication import UsesQApplication
-
-class DynamicSignalTest(UsesQApplication):
-
- def cb(self, obj):
- self._called = True
-
- def testQDialog(self):
- dlg = QInputDialog()
- dlg.setInputMode(QInputDialog.TextInput)
- lst = dlg.children()
- self.assertTrue(len(lst))
- obj = lst[0]
- self._called = False
- obj.destroyed[QObject].connect(self.cb)
- obj = None
- del dlg
- self.assertTrue(self._called)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py b/sources/pyside2/tests/QtWidgets/qfontdialog_test.py
deleted file mode 100644
index b9706e4e7..000000000
--- a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-from PySide2 import QtGui
-from PySide2 import QtWidgets
-
-from helper.timedqapplication import TimedQApplication
-
-class TestFontDialog(TimedQApplication):
-
- def testGetFont(self):
- QtWidgets.QFontDialog.getFont()
-
- def testGetFontQDialog(self):
- QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10))
-
- def testGetFontQDialogQString(self):
- QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10), None, "Select font")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qformlayout_test.py b/sources/pyside2/tests/QtWidgets/qformlayout_test.py
deleted file mode 100644
index ff5a13aeb..000000000
--- a/sources/pyside2/tests/QtWidgets/qformlayout_test.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QFormLayout, QWidget
-
-from helper.usesqapplication import UsesQApplication
-
-class QFormLayoutTest(UsesQApplication):
-
- def testGetItemPosition(self):
- formlayout = QFormLayout()
- row, role = formlayout.getItemPosition(0)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, -1)
-
- widget = QWidget()
- formlayout.addRow(widget)
- row, role = formlayout.getItemPosition(0)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, 0)
- self.assertEqual(role, QFormLayout.SpanningRole)
-
- def testGetWidgetPosition(self):
- formlayout = QFormLayout()
- widget = QWidget()
- row, role = formlayout.getWidgetPosition(widget)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, -1)
-
- formlayout.addRow(widget)
- row, role = formlayout.getWidgetPosition(widget)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, 0)
- self.assertEqual(role, QFormLayout.SpanningRole)
-
- def testGetLayoutPosition(self):
- formlayout = QFormLayout()
- layout = QFormLayout()
- row, role = formlayout.getLayoutPosition(layout)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, -1)
-
- formlayout.addRow(layout)
- row, role = formlayout.getLayoutPosition(layout)
- self.assertTrue(isinstance(row, int))
- self.assertTrue(isinstance(role, QFormLayout.ItemRole))
- self.assertEqual(row, 0)
- self.assertEqual(role, QFormLayout.SpanningRole)
-
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py
deleted file mode 100644
index e40dff6f6..000000000
--- a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-from PySide2 import QtGui
-from PySide2 import QtWidgets
-from helper.usesqapplication import UsesQApplication
-
-class Item(QtWidgets.QGraphicsItem):
-
- def __init__(self):
- QtWidgets.QGraphicsItem.__init__(self)
-
- def boundingRect(self):
- return QtCore.QRectF(0, 0, 100, 100)
-
- def paint(self, painter, option, widget):
- painter.setBrush(QtGui.QColor(255, 255, 255))
- painter.drawRect(0, 0, 100, 100)
-
-
-class QGraphicsViewIsBlockedTest(UsesQApplication):
-
- def testIsBlockedByModalPanel(self):
- (first, second) = Item().isBlockedByModalPanel()
- self.assertFalse(first)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py
deleted file mode 100644
index 27d543a7f..000000000
--- a/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test cases related to QGraphicsItem and subclasses'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QPolygonF, QColor, QBrush
-from PySide2.QtWidgets import QGraphicsScene
-
-from helper.usesqapplication import UsesQApplication
-
-class QColorOnSetBrush(UsesQApplication):
- '''Test case for passing a QColor directly to setBrush'''
-
- def setUp(self):
- #Acquire resources
- super(QColorOnSetBrush, self).setUp()
-
- self.scene = QGraphicsScene()
- poly = QPolygonF()
- self.item = self.scene.addPolygon(poly)
- self.color = QColor('black')
-
- def tearDown(self):
- #Release resources
- del self.color
- del self.item
- del self.scene
- super(QColorOnSetBrush, self).tearDown()
-
- def testQColor(self):
- #QGraphicsAbstractShapeItem.setBrush(QColor)
- self.item.setBrush(self.color)
- self.assertEqual(QBrush(self.color), self.item.brush())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py
deleted file mode 100644
index 46569cc1e..000000000
--- a/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test cases related to QGraphicsItem and subclasses'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QGraphicsObject, QGraphicsWidget
-from PySide2.QtCore import QRectF
-
-from helper.usesqapplication import UsesQApplication
-
-class GObjA(QGraphicsObject):
- def paint(self, *args):
- pass
-
- def boundingRect(self):
- return QRectF()
-
- def itemChange(self, *args):
- return QGraphicsObject.itemChange(self, *args)
-
-class GObjB(QGraphicsObject):
- def paint(self, *args):
- pass
-
- def boundingRect(self):
- return QRectF()
-
-class QGraphicsObjectReimpl(UsesQApplication):
- '''Test case for reimplementing QGraphicsObject'''
-
- def testReimplementationTypes(self):
- w = QGraphicsWidget()
-
- # PYSIDE-86:
- # This case failed because GObjA was reimplementing
- # the method itemChange() from QGraphicsItem,
- # and then the QVariant was not associated with
- # a QGraphicsItem but a QObjectItem because the base
- # class was a QObject.
- gobjA = GObjA()
- gobjA.setParentItem(w)
- self.assertIs(type(w), type(gobjA.parentItem()))
-
- gobjB = GObjB()
- gobjB.setParentItem(w)
- self.assertIs(type(w), type(gobjB.parentItem()))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py
deleted file mode 100644
index 54f95880e..000000000
--- a/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QLabel
-from PySide2.QtWidgets import QGraphicsScene, QGraphicsView, QGraphicsItem, QGraphicsProxyWidget
-
-class QGraphicsProxyWidgetTest(UsesQApplication):
- def testQGraphicsProxyWidget(self):
- scene = QGraphicsScene()
-
- proxy = QGraphicsProxyWidget(None, Qt.Window)
- widget = QLabel('Widget')
- proxy.setWidget(widget)
- proxy.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
- scene.addItem(proxy)
- scene.setSceneRect(scene.itemsBoundingRect())
-
- view = QGraphicsView(scene)
- view.setRenderHints(QPainter.Antialiasing|QPainter.SmoothPixmapTransform)
- view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
- view.show()
-
- timer = QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py
deleted file mode 100644
index cb1867b88..000000000
--- a/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py
+++ /dev/null
@@ -1,224 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Basic test cases for QGraphicsScene'''
-
-import gc
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QPointF
-from PySide2.QtGui import QPolygonF, QPixmap, QPainterPath, QTransform, QWindow
-from PySide2.QtWidgets import QApplication, QPushButton
-from PySide2.QtWidgets import QGraphicsScene
-from PySide2.QtWidgets import QGraphicsEllipseItem, QGraphicsLineItem
-from PySide2.QtWidgets import QGraphicsPathItem, QGraphicsPixmapItem
-from PySide2.QtWidgets import QGraphicsPolygonItem, QGraphicsRectItem
-from PySide2.QtWidgets import QGraphicsSimpleTextItem, QGraphicsTextItem
-from PySide2.QtWidgets import QGraphicsProxyWidget, QGraphicsView
-
-from helper.usesqapplication import UsesQApplication
-
-class Constructor(unittest.TestCase):
- '''QGraphicsScene constructor'''
-
- def testConstructor(self):
- #QGraphicsScene constructor
- obj = QGraphicsScene()
- self.assertTrue(isinstance(obj, QGraphicsScene))
-
-# Test for PYSIDE-868: Test whether painter.device() can be accessed
-# correctly. This was crashing when the underlying QPaintDevice was a
-# QWidget due to handling multiple inheritance incorrectly.
-class CustomScene(QGraphicsScene):
- def __init__(self, parent = None):
- super(CustomScene, self).__init__(parent)
- self.dpi = 0
-
- def drawBackground(self, painter, rect):
- self.dpi = painter.device().physicalDpiX()
-
- def drawForeground(self, painter, rect):
- self.dpi = painter.device().physicalDpiX()
-
-class ConstructorWithRect(unittest.TestCase):
- '''QGraphicsScene qrect constructor and related sizes'''
-
- def setUp(self):
- #Acquire resources
- # PyQt4 doesn't accept a QRect as argument to constructor
- self.scene = QGraphicsScene(0, 200, 150, 175)
-
- def tearDown(self):
- #Release resources
- del self.scene
-
- def testHeight(self):
- #QGraphicsScene.height()
- self.assertEqual(self.scene.height(), 175)
-
- def testWidth(self):
- #QGraphicsScene.width()
- self.assertEqual(self.scene.width(), 150)
-
-
-class AddItem(UsesQApplication):
- '''Tests for QGraphicsScene.add*'''
-
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(AddItem, self).setUp()
- self.scene = QGraphicsScene()
- # While the scene does not inherits from QWidget, requires
- # an application to make the internals work.
-
- def tearDown(self):
- #Release resources
- del self.scene
- super(AddItem, self).tearDown()
-
- def testEllipse(self):
- #QGraphicsScene.addEllipse
- item = self.scene.addEllipse(100, 100, 100, 100)
- self.assertTrue(isinstance(item, QGraphicsEllipseItem))
-
- def testLine(self):
- #QGraphicsScene.addLine
- item = self.scene.addLine(100, 100, 200, 200)
- self.assertTrue(isinstance(item, QGraphicsLineItem))
-
- def testPath(self):
- #QGraphicsScene.addPath
- item = self.scene.addPath(QPainterPath())
- self.assertTrue(isinstance(item, QGraphicsPathItem))
-
- def testPixmap(self):
- #QGraphicsScene.addPixmap
- item = self.scene.addPixmap(QPixmap())
- self.assertTrue(isinstance(item, QGraphicsPixmapItem))
-
- def testPolygon(self):
- #QGraphicsScene.addPolygon
- points = [QPointF(0, 0), QPointF(100, 100), QPointF(0, 100)]
- item = self.scene.addPolygon(QPolygonF(points))
- self.assertTrue(isinstance(item, QGraphicsPolygonItem))
-
- def testRect(self):
- #QGraphicsScene.addRect
- item = self.scene.addRect(100, 100, 100, 100)
- self.assertTrue(isinstance(item, QGraphicsRectItem))
-
- def testSimpleText(self):
- #QGraphicsScene.addSimpleText
- item = self.scene.addSimpleText('Monty Python 42')
- self.assertTrue(isinstance(item, QGraphicsSimpleTextItem))
-
- def testText(self):
- #QGraphicsScene.addText
- item = self.scene.addText('Monty Python 42')
- self.assertTrue(isinstance(item, QGraphicsTextItem))
-
- def testWidget(self):
- #QGraphicsScene.addWidget
- # XXX: printing some X11 error when using under PyQt4
- item = self.scene.addWidget(QPushButton())
- self.assertTrue(isinstance(item, QGraphicsProxyWidget))
-
-
-class ItemRetrieve(UsesQApplication):
- '''Tests for QGraphicsScene item retrieval methods'''
-
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(ItemRetrieve, self).setUp()
- self.scene = QGraphicsScene()
-
- self.topleft = QGraphicsRectItem(0, 0, 100, 100)
- self.topright = QGraphicsRectItem(100, 0, 100, 100)
- self.bottomleft = QGraphicsRectItem(0, 100, 100, 100)
- self.bottomright = QGraphicsRectItem(100, 100, 100, 100)
-
- self.items = [self.topleft, self.topright, self.bottomleft,
- self.bottomright]
-
- for item in self.items:
- self.scene.addItem(item)
-
- def tearDown(self):
- #Release resources
- del self.scene
- super(ItemRetrieve, self).tearDown()
-
- def testItems(self):
- #QGraphicsScene.items()
- items = self.scene.items()
- for i in items:
- self.assertTrue(i in self.items)
-
- def testItemAt(self):
- #QGraphicsScene.itemAt()
- self.assertEqual(self.scene.itemAt(50, 50, QTransform()), self.topleft)
- self.assertEqual(self.scene.itemAt(150, 50, QTransform()), self.topright)
- self.assertEqual(self.scene.itemAt(50, 150, QTransform()), self.bottomleft)
- self.assertEqual(self.scene.itemAt(150, 150, QTransform()), self.bottomright)
-
-class TestGraphicsGroup(UsesQApplication):
- def testIt(self):
- scene = QGraphicsScene()
- i1 = QGraphicsRectItem()
- scene.addItem(i1)
- i2 = QGraphicsRectItem(i1)
- i3 = QGraphicsRectItem()
- i4 = QGraphicsRectItem()
- group = scene.createItemGroup((i2, i3, i4))
- scene.removeItem(i1)
- del i1 # this shouldn't delete i2
- self.assertEqual(i2.scene(), scene)
- scene.destroyItemGroup(group)
- self.assertRaises(RuntimeError, group.type)
-
- def testCustomScene(self): # For PYSIDE-868, see above
- scene = CustomScene()
- view = QGraphicsView(scene)
- view.show()
- while scene.dpi == 0:
- QApplication.instance().processEvents()
- view.hide()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qimage_test.py b/sources/pyside2/tests/QtWidgets/qimage_test.py
deleted file mode 100644
index 11b9d2193..000000000
--- a/sources/pyside2/tests/QtWidgets/qimage_test.py
+++ /dev/null
@@ -1,309 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QImage'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-xpm = [
- "27 22 206 2",
- " c None",
- ". c #FEFEFE",
- "+ c #FFFFFF",
- "@ c #F9F9F9",
- "# c #ECECEC",
- "$ c #D5D5D5",
- "% c #A0A0A0",
- "& c #767676",
- "* c #525252",
- "= c #484848",
- "- c #4E4E4E",
- "; c #555555",
- "> c #545454",
- ", c #5A5A5A",
- "' c #4B4B4B",
- ") c #4A4A4A",
- "! c #4F4F4F",
- "~ c #585858",
- "{ c #515151",
- "] c #4C4C4C",
- "^ c #B1B1B1",
- "/ c #FCFCFC",
- "( c #FDFDFD",
- "_ c #C1C1C1",
- ": c #848484",
- "< c #616161",
- "[ c #5E5E5E",
- "} c #CECECE",
- "| c #E2E2E2",
- "1 c #E4E4E4",
- "2 c #DFDFDF",
- "3 c #D2D2D2",
- "4 c #D8D8D8",
- "5 c #D4D4D4",
- "6 c #E6E6E6",
- "7 c #F1F1F1",
- "8 c #838383",
- "9 c #8E8E8E",
- "0 c #8F8F8F",
- "a c #CBCBCB",
- "b c #CCCCCC",
- "c c #E9E9E9",
- "d c #F2F2F2",
- "e c #EDEDED",
- "f c #B5B5B5",
- "g c #A6A6A6",
- "h c #ABABAB",
- "i c #BBBBBB",
- "j c #B0B0B0",
- "k c #EAEAEA",
- "l c #6C6C6C",
- "m c #BCBCBC",
- "n c #F5F5F5",
- "o c #FAFAFA",
- "p c #B6B6B6",
- "q c #F3F3F3",
- "r c #CFCFCF",
- "s c #FBFBFB",
- "t c #CDCDCD",
- "u c #DDDDDD",
- "v c #999999",
- "w c #F0F0F0",
- "x c #2B2B2B",
- "y c #C3C3C3",
- "z c #A4A4A4",
- "A c #D7D7D7",
- "B c #E7E7E7",
- "C c #6E6E6E",
- "D c #9D9D9D",
- "E c #BABABA",
- "F c #AEAEAE",
- "G c #898989",
- "H c #646464",
- "I c #BDBDBD",
- "J c #CACACA",
- "K c #2A2A2A",
- "L c #212121",
- "M c #B7B7B7",
- "N c #F4F4F4",
- "O c #737373",
- "P c #828282",
- "Q c #4D4D4D",
- "R c #000000",
- "S c #151515",
- "T c #B2B2B2",
- "U c #D6D6D6",
- "V c #D3D3D3",
- "W c #2F2F2F",
- "X c #636363",
- "Y c #A1A1A1",
- "Z c #BFBFBF",
- "` c #E0E0E0",
- " . c #6A6A6A",
- ".. c #050505",
- "+. c #A3A3A3",
- "@. c #202020",
- "#. c #5F5F5F",
- "$. c #B9B9B9",
- "%. c #C7C7C7",
- "&. c #D0D0D0",
- "*. c #3E3E3E",
- "=. c #666666",
- "-. c #DBDBDB",
- ";. c #424242",
- ">. c #C2C2C2",
- ",. c #1A1A1A",
- "'. c #2C2C2C",
- "). c #F6F6F6",
- "!. c #AAAAAA",
- "~. c #DCDCDC",
- "{. c #2D2D2D",
- "]. c #2E2E2E",
- "^. c #A7A7A7",
- "/. c #656565",
- "(. c #333333",
- "_. c #464646",
- ":. c #C4C4C4",
- "<. c #B8B8B8",
- "[. c #292929",
- "}. c #979797",
- "|. c #EFEFEF",
- "1. c #909090",
- "2. c #8A8A8A",
- "3. c #575757",
- "4. c #676767",
- "5. c #C5C5C5",
- "6. c #7A7A7A",
- "7. c #797979",
- "8. c #989898",
- "9. c #EEEEEE",
- "0. c #707070",
- "a. c #C8C8C8",
- "b. c #111111",
- "c. c #AFAFAF",
- "d. c #474747",
- "e. c #565656",
- "f. c #E3E3E3",
- "g. c #494949",
- "h. c #5B5B5B",
- "i. c #222222",
- "j. c #353535",
- "k. c #D9D9D9",
- "l. c #0A0A0A",
- "m. c #858585",
- "n. c #E5E5E5",
- "o. c #0E0E0E",
- "p. c #9A9A9A",
- "q. c #6F6F6F",
- "r. c #868686",
- "s. c #060606",
- "t. c #1E1E1E",
- "u. c #E8E8E8",
- "v. c #A5A5A5",
- "w. c #0D0D0D",
- "x. c #030303",
- "y. c #272727",
- "z. c #131313",
- "A. c #1F1F1F",
- "B. c #757575",
- "C. c #F7F7F7",
- "D. c #414141",
- "E. c #080808",
- "F. c #6B6B6B",
- "G. c #313131",
- "H. c #C0C0C0",
- "I. c #C9C9C9",
- "J. c #0B0B0B",
- "K. c #232323",
- "L. c #434343",
- "M. c #3D3D3D",
- "N. c #282828",
- "O. c #7C7C7C",
- "P. c #252525",
- "Q. c #3A3A3A",
- "R. c #F8F8F8",
- "S. c #1B1B1B",
- "T. c #949494",
- "U. c #3B3B3B",
- "V. c #242424",
- "W. c #383838",
- "X. c #6D6D6D",
- "Y. c #818181",
- "Z. c #939393",
- "`. c #9E9E9E",
- " + c #929292",
- ".+ c #7D7D7D",
- "++ c #ADADAD",
- "@+ c #DADADA",
- "#+ c #919191",
- "$+ c #E1E1E1",
- "%+ c #BEBEBE",
- "&+ c #ACACAC",
- "*+ c #9C9C9C",
- "=+ c #B3B3B3",
- "-+ c #808080",
- ";+ c #A8A8A8",
- ">+ c #393939",
- ",+ c #747474",
- "'+ c #7F7F7F",
- ")+ c #D1D1D1",
- "!+ c #606060",
- "~+ c #5C5C5C",
- "{+ c #686868",
- "]+ c #7E7E7E",
- "^+ c #787878",
- "/+ c #595959",
- ". . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / . . + + ",
- ". ( + _ : < [ & } | 1 2 $ 3 4 5 3 6 7 + + 8 9 + . + . ",
- ". + 0 9 a ( 3 a b c d e c f g h i g j $ k + l m + . + ",
- "+ 2 8 n o p | ( q r s . # t + + + u ^ v e w + x + + + ",
- "+ y z . @ A k B 7 n + ( s | p 8 C D 2 E 4 + + F G + . ",
- "# H I $ J G K L - M N . 2 O P Q R R S T U s s V W j + ",
- "X Y Z @ o ` _ g ...+.( 4 @.#.m G $.%.7 &.X *.=.-.;.&.",
- "Q >.C ,.'.} e + ).!.k + . + + . ~.{.> ].x f 7 ^./.k (.",
- "_.:.4 @ <.[.}.|.1.2.+ + + >.} 4 B + ( @ _ 3.4.5.6.r 7.",
- "3.8.9.~ 0.+ a.Q b.+ + c.d.#.=.$ |.b #.e.z ^ ; ^. .f.g.",
- "-.h.+ i.S M + # p j.% n 9.5.k.H l.m.V ^.n.o.M + M p.q.",
- "7 r.N s.1.R t.<.|.| u.v.~ w.x.E + s y.z.A.B.C.+ 5 D.q ",
- ").p.2 E.0.9 F.%.O {._ @.+ + i { [ i.G.H.P I.+ s q.} + ",
- ").p.6 J.R b.K.L.M.A.! b.g.K [.R M k + N.I + + >.O.+ . ",
- ").8.9.N.P...R R R R E.t.W n.+ Q.R.6 @.| + . + S.+ + . ",
- "n }.w T.U.B.<.i.@ Y + + U.+ c u V.= B B 7 u.W.c + . + ",
- "N T.# + }.X.Y.,.8.F.8 Z.[.`. +.+}.4 ++@+O.< ~.+ ( . + ",
- "d #+1 + _ ~.u.$+b $.y @+| $+%+I.&+k.h W +.9.+ ( . + . ",
- "w 0 |.*+. >.<.=+++++p a.p -+;+5.k.>+,+@ + . . + . + + ",
- "q '+9.R.^ I.t b %.I.)+4 $+n.I.,+ .|.+ . . . + . + + + ",
- ". p !+( + + + + + + E 0. .-+8.f.+ + . . + + . + + + + ",
- ". ( A ~+{+]+^+l > /+D f.c q . + . . + + . + + + + + + "
-]
-
-class QImageTest(UsesQApplication):
- '''Test case for calling setPixel with float as argument'''
-
- def testQImageStringBuffer(self):
- '''Test if the QImage signatures receiving string buffers exist.'''
- img0 = QImage(adjust_filename('sample.png', __file__))
-
- # btw let's test the bits() method
- img1 = QImage(img0.bits(), img0.width(), img0.height(), img0.format())
- self.assertEqual(img0, img1)
- img2 = QImage(img0.bits(), img0.width(), img0.height(), img0.bytesPerLine(), img0.format())
- self.assertEqual(img0, img2)
-
- ## test scanLine method
- data1 = img0.scanLine(0)
- data2 = img1.scanLine(0)
- self.assertEqual(data1, data2)
-
- def testEmptyBuffer(self):
- img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32)
-
- def testEmptyStringAsBuffer(self):
- img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32)
-
- def testXpmConstructor(self):
- label = QLabel()
- img = QImage(xpm)
- self.assertFalse(img.isNull())
- self.assertEqual(img.width(), 27)
- self.assertEqual(img.height(), 22)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py b/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py
deleted file mode 100644
index 0aaf548c9..000000000
--- a/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-from helper.timedqapplication import TimedQApplication
-
-class TestInputDialog(TimedQApplication):
-
- def testGetDouble(self):
- self.assertEqual(QtWidgets.QInputDialog.getDouble(None, "title", "label"), (0.0, False))
-
- def testGetInt(self):
- self.assertEqual(QtWidgets.QInputDialog.getInt(None, "title", "label"), (0, False))
-
- def testGetItem(self):
- (item, bool) = QtWidgets.QInputDialog.getItem(None, "title", "label", ["1", "2", "3"])
- self.assertEqual(str(item), "1")
-
- def testGetText(self):
- (text, bool) = QtWidgets.QInputDialog.getText(None, "title", "label")
- self.assertEqual(str(text),"")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py b/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py
deleted file mode 100644
index 150eb3d31..000000000
--- a/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QKeySequenceEdit.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer
-from PySide2.QtWidgets import QKeySequenceEdit
-
-from helper.usesqapplication import UsesQApplication
-
-class QKeySequenceEditTest(UsesQApplication):
- def testKeySequence(self):
- keySequenceEdit = QKeySequenceEdit()
- keySequenceEdit.show()
- QTimer.singleShot(0, keySequenceEdit.close)
- self.app.exec_()
- print(keySequenceEdit.keySequence())
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlabel_test.py b/sources/pyside2/tests/QtWidgets/qlabel_test.py
deleted file mode 100644
index 322e18b7c..000000000
--- a/sources/pyside2/tests/QtWidgets/qlabel_test.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QLabel'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from PySide2.QtGui import QPixmap
-from PySide2.QtWidgets import QLabel
-import shiboken6 as shiboken
-
-from helper.usesqapplication import UsesQApplication
-
-class QLabelTest(UsesQApplication):
- '''Test case for calling QLabel.setPixmap'''
-
- def setUp(self):
- super(QLabelTest, self).setUp()
- self.label = QLabel()
-
- def tearDown(self):
- del self.label
- super(QLabelTest, self).tearDown()
-
- def testSetPixmap(self):
-
- p1 = QPixmap(5, 5)
- p2 = QPixmap(10, 10)
-
- self.label.setPixmap(p1)
- self.assertIsNotNone(self.label.pixmap())
-
-
- # PYSIDE-150:
- # When a new QPixmap is assigned to a QLabel,
- # the previous one needs to be cleared.
- # This means we should not keep a copy of the QPixmap
- # on Python-side.
-
- # Getting pointer to the QPixmap
- ret_p = self.label.pixmap()
- self.assertIsNot(p1, ret_p)
- # Save the address of the pointer
- ret_p_addr = shiboken.getCppPointer(ret_p)
- # Remove the QPixmap
- del ret_p
- # Set new QPixmap
- self.label.setPixmap(p2)
-
- # There should be no pointers remaining with the same
- # address that our QPixmap p1 because it was deleted
- # using `del ret_p`
- self.assertTrue(all(shiboken.getCppPointer(o) != ret_p_addr
- for o in shiboken.getAllValidWrappers()))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py b/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py
deleted file mode 100644
index 9f0b4cca3..000000000
--- a/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py
+++ /dev/null
@@ -1,185 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QLayout handling of child widgets references'''
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget
-from PySide2.QtWidgets import QStackedLayout, QFormLayout
-from PySide2.QtWidgets import QApplication, QPushButton, QLabel
-
-from helper.usesqapplication import UsesQApplication
-
-class SaveReference(UsesQApplication):
- '''Test case to check if QLayout-derived classes increment the refcount
- of widgets passed to addWidget()'''
-
- # Adding here as nose can't see the qapplication attrib we inherit
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(SaveReference, self).setUp()
- self.widget1 = QPushButton('click me')
- self.widget2 = QLabel('aaa')
-
- def tearDown(self):
- #Release resources
- del self.widget2
- del self.widget1
- super(SaveReference, self).tearDown()
-
- def checkLayoutReference(self, layout):
- #Checks the reference cound handling of layout.addWidget
- self.assertEqual(getrefcount(self.widget1), 2)
- layout.addWidget(self.widget1)
- self.assertEqual(getrefcount(self.widget1), 3)
-
- self.assertEqual(getrefcount(self.widget2), 2)
- layout.addWidget(self.widget2)
- self.assertEqual(getrefcount(self.widget2), 3)
-
- # Check if doesn't mess around with previous widget refcount
- self.assertEqual(getrefcount(self.widget1), 3)
-
- def testMoveLayout(self):
- l = QHBoxLayout()
- self.assertEqual(getrefcount(self.widget1), 2)
- l.addWidget(self.widget1)
- self.assertEqual(getrefcount(self.widget1), 3)
-
- w = QWidget()
- w.setLayout(l)
- self.assertEqual(getrefcount(self.widget1), 3)
-
-
- def testHBoxReference(self):
- #QHBoxLayout.addWidget reference count
- w = QWidget()
- self.checkLayoutReference(QHBoxLayout(w))
-
- def testVBoxReference(self):
- #QVBoxLayout.addWidget reference count
- w = QWidget()
- self.checkLayoutReference(QVBoxLayout(w))
-
- def testGridReference(self):
- #QGridLayout.addWidget reference count
- w = QWidget()
- self.checkLayoutReference(QGridLayout(w))
-
- def testFormReference(self):
- #QFormLayout.addWidget reference count
- w = QWidget()
- self.checkLayoutReference(QFormLayout(w))
-
- def testStackedReference(self):
- #QStackedLayout.addWidget reference count
- w = QWidget()
- self.checkLayoutReference(QStackedLayout(w))
-
-class MultipleAdd(UsesQApplication):
- '''Test case to check if refcount is incremented only once when multiple
- calls to addWidget are made with the same widget'''
-
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(MultipleAdd, self).setUp()
- self.widget = QPushButton('click me')
- self.win = QWidget()
- self.layout = QHBoxLayout(self.win)
-
- def tearDown(self):
- #Release resources
- del self.widget
- del self.layout
- del self.win
- super(MultipleAdd, self).tearDown()
-
- def testRefCount(self):
- #Multiple QLayout.addWidget calls on the same widget
- self.assertEqual(getrefcount(self.widget), 2)
- self.layout.addWidget(self.widget)
- self.assertEqual(getrefcount(self.widget), 3)
- self.layout.addWidget(self.widget)
- self.assertEqual(getrefcount(self.widget), 3)
- self.layout.addWidget(self.widget)
- self.assertEqual(getrefcount(self.widget), 3)
-
-class InternalAdd(UsesQApplication):
- def testInternalRef(self):
- mw = QWidget()
- w = QWidget()
- ow = QWidget()
-
- topLayout = QGridLayout()
-
- # unique reference
- self.assertEqual(getrefcount(w), 2)
- self.assertEqual(getrefcount(ow), 2)
-
- topLayout.addWidget(w, 0, 0)
- topLayout.addWidget(ow, 1, 0)
-
- # layout keep the referemce
- self.assertEqual(getrefcount(w), 3)
- self.assertEqual(getrefcount(ow), 3)
-
- mainLayout = QGridLayout()
-
- mainLayout.addLayout(topLayout, 1, 0, 1, 4)
-
- # the same reference
- self.assertEqual(getrefcount(w), 3)
- self.assertEqual(getrefcount(ow), 3)
-
- mw.setLayout(mainLayout)
-
- # now trasfer the ownership to mw
- self.assertEqual(getrefcount(w), 3)
- self.assertEqual(getrefcount(ow), 3)
-
- del mw
-
- # remove the ref and invalidate the widget
- self.assertEqual(getrefcount(w), 2)
- self.assertEqual(getrefcount(ow), 2)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlayout_test.py b/sources/pyside2/tests/QtWidgets/qlayout_test.py
deleted file mode 100644
index 3882761ea..000000000
--- a/sources/pyside2/tests/QtWidgets/qlayout_test.py
+++ /dev/null
@@ -1,145 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class MyLayout(QLayout):
- def __init__(self, parent=None):
- QLayout.__init__(self, parent)
- self._list = []
-
- def addItem(self, item):
- self.add(item)
-
- def addWidget(self, widget):
- self.add(QWidgetItem(widget))
-
- def itemAt(self, index):
- if index < len(self._list):
- return self._list[index]
-
- return None
-
- def count(self):
- return len(self._list)
-
- def add(self, item):
- self._list.append(item)
-
-class MissingItemAtLayout(QLayout):
- def __init__(self, parent=None):
- QLayout.__init__(self, parent)
- self._list = []
-
- def addItem(self, item):
- self.add(item)
-
- def addWidget(self, widget):
- self.add(QWidgetItem(widget))
-
- def count(self):
- return len(self._list)
-
- def add(self, item):
- self._list.append(item)
-
-#Test if a layout implemented in python, the QWidget.setLayout works
-#fine because this implement som layout functions used in glue code of
-#QWidget, then in c++ when call a virtual function this need call the QLayout
-#function implemented in python
-
-class QLayoutTest(UsesQApplication):
- def testOwnershipTransfer(self):
- b = QPushButton("teste")
- l = MyLayout()
-
- l.addWidget(b)
-
- self.assertEqual(sys.getrefcount(b), 2)
-
- w = QWidget()
-
- #transfer ref
- w.setLayout(l)
-
- self.assertEqual(sys.getrefcount(b), 3)
-
-
- def testReferenceTransfer(self):
- b = QPushButton("teste")
- l = QHBoxLayout()
-
- # keep ref
- l.addWidget(b)
- self.assertEqual(sys.getrefcount(b), 3)
-
- w = QWidget()
-
- # transfer ref
- w.setLayout(l)
-
- self.assertEqual(sys.getrefcount(b), 3)
-
- # release ref
- del w
-
- self.assertEqual(sys.getrefcount(b), 2)
-
- def testMissingFunctions(self):
- w = QWidget()
- b = QPushButton("test")
- l = MissingItemAtLayout()
-
- l.addWidget(b)
-
- self.assertRaises(RuntimeError, w.setLayout, l)
-
- def testQFormLayout(self):
- w = QWidget()
- formLayout = QFormLayout()
- spacer = QSpacerItem(100, 30)
- formLayout.setItem(0, QFormLayout.SpanningRole, spacer)
- w.setLayout(formLayout)
- w.show()
- QTimer.singleShot(10, w.close)
- self.app.exec_()
- del w
- self.assertRaises(RuntimeError, spacer.isEmpty)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py b/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py
deleted file mode 100644
index e079d6dd5..000000000
--- a/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication, QLCDNumber
-
-class QLCDNumberOverflow(unittest.TestCase):
- '''Test case for unhandled overflow on QLCDNumber() numDigits argument (see bug #215).'''
-
- def setUp(self):
- self.app = QApplication([])
-
- def testnumDigitsOverflow(self):
- # NOTE: PyQt4 raises TypeError, but boost.python raises OverflowError
- self.assertRaises(OverflowError, QLCDNumber, 840835495615213080)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlistwidget_test.py b/sources/pyside2/tests/QtWidgets/qlistwidget_test.py
deleted file mode 100644
index 732f3859c..000000000
--- a/sources/pyside2/tests/QtWidgets/qlistwidget_test.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets, QtCore
-from helper.usesqapplication import UsesQApplication
-
-class QListWidgetTest(UsesQApplication):
-
- def populateList(self, lst):
- o = QtCore.QObject()
- o.setObjectName("obj")
-
- item = QtWidgets.QListWidgetItem("item0")
- item.setData(QtCore.Qt.UserRole, o)
- #item._data = o
- self.assertTrue(sys.getrefcount(o), 3)
- self.assertTrue(sys.getrefcount(item), 2)
- lst.addItem(item)
- self.assertTrue(sys.getrefcount(item), 3)
-
- def checkCurrentItem(self, lst):
- item = lst.currentItem()
- self.assertTrue(sys.getrefcount(item), 3)
-
- def checkItemData(self, lst):
- item = lst.currentItem()
- o = item.data(QtCore.Qt.UserRole)
- self.assertTrue(sys.getrefcount(o), 4)
- self.assertEqual(o, item._data)
- self.assertTrue(sys.getrefcount(o), 2)
-
- def testConstructorWithParent(self):
- lst = QtWidgets.QListWidget()
- self.populateList(lst)
- self.checkCurrentItem(lst)
- i = lst.item(0)
- self.assertTrue(sys.getrefcount(i), 3)
-
- del lst
- self.assertTrue(sys.getrefcount(i), 2)
- del i
-
- def testIt(self):
- lst = QtWidgets.QListWidget()
- lst.show()
- slot = lambda : lst.removeItemWidget(lst.currentItem())
- lst.addItem(QtWidgets.QListWidgetItem("foo"))
- QtCore.QTimer.singleShot(0, slot)
- QtCore.QTimer.singleShot(0, lst.close)
- self.app.exec_()
- self.assertEqual(lst.count(), 1)
-
- def testClear(self):
- lst = QtWidgets.QListWidget()
- lst.addItem("foo")
- item = lst.item(0)
- self.assertIsNone(lst.clear())
- self.assertRaises(RuntimeError, lambda: item.text())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py b/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py
deleted file mode 100644
index b23852698..000000000
--- a/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-
-from helper.usesqapplication import UsesQApplication
-
-class QListWidgetItemConstructor(UsesQApplication):
-
- def setUp(self):
- super(QListWidgetItemConstructor, self).setUp()
- self.widgetList = QtWidgets.QListWidget()
-
- def tearDown(self):
- del self.widgetList
- super(QListWidgetItemConstructor, self).tearDown()
-
- def testConstructorWithParent(self):
- # Bug 235 - QListWidgetItem constructor not saving ownership
- QtWidgets.QListWidgetItem(self.widgetList)
- item = self.widgetList.item(0)
- self.assertEqual(item.listWidget(), self.widgetList)
-
- def testConstructorWithNone(self):
- # Bug 452 - QListWidgetItem() not casting NoneType to null correctly.
- item = QtWidgets.QListWidgetItem(None, 123)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qmainwindow_test.py b/sources/pyside2/tests/QtWidgets/qmainwindow_test.py
deleted file mode 100644
index c1cd106bd..000000000
--- a/sources/pyside2/tests/QtWidgets/qmainwindow_test.py
+++ /dev/null
@@ -1,118 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-from PySide2 import QtCore
-
-from helper.usesqapplication import UsesQApplication
-
-class MainWindow(QtWidgets.QMainWindow):
- def __init__(self):
- QtWidgets.QMainWindow.__init__(self)
-
- self.createToolbar()
-
- def createToolbar(self):
- pointerButton = QtWidgets.QToolButton()
- pointerToolbar = self.addToolBar("Pointer type")
- pointerToolbar.addWidget(pointerButton)
-
-class MyButton(QtWidgets.QPushButton):
- def __init__(self, parent=None):
- QtWidgets.QPushButton.__init__(self)
- self._called = False
-
- def myCallback(self):
- self._called = True
-
-
-class TestMainWindow(UsesQApplication):
-
- def testCreateToolbar(self):
- w = MainWindow()
- w.show()
- QtCore.QTimer.singleShot(1000, self.app.quit)
- self.app.exec_()
-
- def objDel(self, obj):
- self.app.quit()
-
- def testRefCountToNull(self):
- w = QtWidgets.QMainWindow()
- c = QtWidgets.QWidget()
- self.assertEqual(sys.getrefcount(c), 2)
- w.setCentralWidget(c)
- self.assertEqual(sys.getrefcount(c), 3)
- wr = weakref.ref(c, self.objDel)
- w.setCentralWidget(None)
- c = None
- self.app.exec_()
-
- def testRefCountToAnother(self):
- w = QtWidgets.QMainWindow()
- c = QtWidgets.QWidget()
- self.assertEqual(sys.getrefcount(c), 2)
- w.setCentralWidget(c)
- self.assertEqual(sys.getrefcount(c), 3)
-
- c2 = QtWidgets.QWidget()
- w.setCentralWidget(c2)
- self.assertEqual(sys.getrefcount(c2), 3)
-
- wr = weakref.ref(c, self.objDel)
- w.setCentralWidget(None)
- c = None
-
- self.app.exec_()
-
- def testSignalDisconect(self):
- w = QtWidgets.QMainWindow()
- b = MyButton("button")
- b.clicked.connect(b.myCallback)
- w.setCentralWidget(b)
-
- b = MyButton("button")
- b.clicked.connect(b.myCallback)
- w.setCentralWidget(b)
-
- b.click()
- self.assertEqual(b._called, True)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qmenu_test.py b/sources/pyside2/tests/QtWidgets/qmenu_test.py
deleted file mode 100644
index 9c5b12b25..000000000
--- a/sources/pyside2/tests/QtWidgets/qmenu_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QMenu
-from PySide2.QtGui import QKeySequence, QIcon
-from PySide2.QtCore import SLOT
-
-from helper.usesqapplication import UsesQApplication
-
-class QMenuAddAction(UsesQApplication):
-
- def setUp(self):
- super(QMenuAddAction, self).setUp()
- self.menu = QMenu()
-
- def tearDown(self):
- del self.menu
- super(QMenuAddAction, self).tearDown()
-
- def testAddActionWithoutKeySequenceCallable(self):
- # bug #280
- action = self.menu.addAction(self.app.tr('aaa'), lambda : 1)
-
- def testAddActionKeySequenceCallable(self):
- # bug #228
- action = self.menu.addAction(self.app.tr('aaa'), lambda : 1,
- QKeySequence(self.app.tr('Ctrl+O')))
-
- def testAddActionKeySequenceSlot(self):
- action = self.menu.addAction('Quit', self.app, SLOT('quit()'),
- QKeySequence('Ctrl+O'))
-
-class QMenuAddActionWithIcon(UsesQApplication):
-
- def setUp(self):
- super(QMenuAddActionWithIcon, self).setUp()
- self.menu = QMenu()
- self.icon = QIcon()
-
- def tearDown(self):
- del self.menu
- del self.icon
- super(QMenuAddActionWithIcon, self).tearDown()
-
- def testAddActionWithoutKeySequenceCallable(self):
- # bug #280
- action = self.menu.addAction(self.icon, self.app.tr('aaa'), lambda : 1)
-
- def testAddActionKeySequenceCallable(self):
- # bug #228
- action = self.menu.addAction(self.icon, self.app.tr('aaa'), lambda : 1,
- QKeySequence(self.app.tr('Ctrl+O')))
-
- def testAddActionKeySequenceSlot(self):
- action = self.menu.addAction(self.icon, 'Quit', self.app, SLOT('quit()'),
- QKeySequence('Ctrl+O'))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qmenuadd_test.py b/sources/pyside2/tests/QtWidgets/qmenuadd_test.py
deleted file mode 100644
index f4ecbb398..000000000
--- a/sources/pyside2/tests/QtWidgets/qmenuadd_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test the QMenu.addAction() method'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-
-from helper.usesqapplication import UsesQApplication
-
-class QMenuAddAction(UsesQApplication):
-
- def openFile(self, *args):
- self.arg = args
-
- def testQMenuAddAction(self):
- fileMenu = QtWidgets.QMenu("&File")
-
- addNewAction = fileMenu.addAction("&Open...", self.openFile)
- addNewAction.trigger()
- self.assertEqual(self.arg, ())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qobject_mi_test.py b/sources/pyside2/tests/QtWidgets/qobject_mi_test.py
deleted file mode 100644
index 6934229cd..000000000
--- a/sources/pyside2/tests/QtWidgets/qobject_mi_test.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for multiple inheritance from 2 QObjects'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-from PySide2.QtGui import *
-from PySide2.QtWidgets import *
-
-from helper.usesqapplication import UsesQApplication
-
-class WidgetValidator(QWidget, QIntValidator):
- def __init__(self, parent=None):
- QWidget.__init__(self, parent)
- QIntValidator.__init__(self, parent)
-
-
-class DoubleQObjectInheritanceTest(UsesQApplication):
-
- def testDouble(self):
- '''Double inheritance from QObject classes'''
-
- obj = WidgetValidator()
-
- #QObject methods
- obj.setObjectName('aaaa')
- self.assertEqual(obj.objectName(), 'aaaa')
-
- #QWidget methods
- obj.setVisible(False)
- self.assertFalse(obj.isVisible())
-
- #QIntValidator methods
- state, string, number = obj.validate('aaaa', 0)
- self.assertEqual(state, QValidator.Invalid)
- state, string, number = obj.validate('33', 0)
- self.assertEqual(state, QValidator.Acceptable)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qpen_test.py b/sources/pyside2/tests/QtWidgets/qpen_test.py
deleted file mode 100644
index 0acb8c27b..000000000
--- a/sources/pyside2/tests/QtWidgets/qpen_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QPen, QPainter
-from PySide2.QtWidgets import QWidget
-
-class Painting(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.penFromEnum = None
- self.penFromInteger = None
-
- def paintEvent(self, event):
- painter = QPainter(self)
- painter.setPen(Qt.NoPen)
- self.penFromEnum = painter.pen()
- painter.setPen(int(Qt.NoPen))
- self.penFromInteger = painter.pen()
-
-
-class QPenTest(UsesQApplication):
-
- def testCtorWithCreatedEnums(self):
- '''A simple case of QPen creation using created enums.'''
- width = 0
- style = Qt.PenStyle(0)
- cap = Qt.PenCapStyle(0)
- join = Qt.PenJoinStyle(0)
- pen = QPen(Qt.blue, width, style, cap, join)
-
- def testSetPenWithPenStyleEnum(self):
- '''Calls QPainter.setPen with both enum and integer. Bug #511.'''
- w = Painting()
- w.show()
- QTimer.singleShot(1000, self.app.quit)
- self.app.exec_()
- self.assertEqual(w.penFromEnum.style(), Qt.NoPen)
- self.assertEqual(w.penFromInteger.style(), Qt.SolidLine)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qpicture_test.py b/sources/pyside2/tests/QtWidgets/qpicture_test.py
deleted file mode 100644
index 3a5747e4a..000000000
--- a/sources/pyside2/tests/QtWidgets/qpicture_test.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import QTimer
-from PySide2.QtGui import QPicture, QPainter
-from PySide2.QtWidgets import QWidget
-
-class MyWidget(QWidget):
- def paintEvent(self, e):
- p = QPainter(self)
- p.drawPicture(0, 0, self._picture)
- self._app.quit()
-
-class QPictureTest(UsesQApplication):
- def testFromData(self):
- picture = QPicture()
- painter = QPainter()
- painter.begin(picture)
- painter.drawEllipse(10,20, 80,70)
- painter.end()
-
- data = picture.data()
- picture2 = QPicture()
- picture2.setData(data)
-
- self.assertEqual(picture2.data(), picture.data())
-
- w = MyWidget()
- w._picture = picture2
- w._app = self.app
-
- QTimer.singleShot(300, w.show)
- self.app.exec_()
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py b/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py
deleted file mode 100644
index 38f9b4adc..000000000
--- a/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py
+++ /dev/null
@@ -1,285 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QPixmap
-from PySide2.QtWidgets import QLabel
-
-from helper.usesqapplication import UsesQApplication
-
-xpm = [
- "27 22 206 2",
- " c None",
- ". c #FEFEFE",
- "+ c #FFFFFF",
- "@ c #F9F9F9",
- "# c #ECECEC",
- "$ c #D5D5D5",
- "% c #A0A0A0",
- "& c #767676",
- "* c #525252",
- "= c #484848",
- "- c #4E4E4E",
- "; c #555555",
- "> c #545454",
- ", c #5A5A5A",
- "' c #4B4B4B",
- ") c #4A4A4A",
- "! c #4F4F4F",
- "~ c #585858",
- "{ c #515151",
- "] c #4C4C4C",
- "^ c #B1B1B1",
- "/ c #FCFCFC",
- "( c #FDFDFD",
- "_ c #C1C1C1",
- ": c #848484",
- "< c #616161",
- "[ c #5E5E5E",
- "} c #CECECE",
- "| c #E2E2E2",
- "1 c #E4E4E4",
- "2 c #DFDFDF",
- "3 c #D2D2D2",
- "4 c #D8D8D8",
- "5 c #D4D4D4",
- "6 c #E6E6E6",
- "7 c #F1F1F1",
- "8 c #838383",
- "9 c #8E8E8E",
- "0 c #8F8F8F",
- "a c #CBCBCB",
- "b c #CCCCCC",
- "c c #E9E9E9",
- "d c #F2F2F2",
- "e c #EDEDED",
- "f c #B5B5B5",
- "g c #A6A6A6",
- "h c #ABABAB",
- "i c #BBBBBB",
- "j c #B0B0B0",
- "k c #EAEAEA",
- "l c #6C6C6C",
- "m c #BCBCBC",
- "n c #F5F5F5",
- "o c #FAFAFA",
- "p c #B6B6B6",
- "q c #F3F3F3",
- "r c #CFCFCF",
- "s c #FBFBFB",
- "t c #CDCDCD",
- "u c #DDDDDD",
- "v c #999999",
- "w c #F0F0F0",
- "x c #2B2B2B",
- "y c #C3C3C3",
- "z c #A4A4A4",
- "A c #D7D7D7",
- "B c #E7E7E7",
- "C c #6E6E6E",
- "D c #9D9D9D",
- "E c #BABABA",
- "F c #AEAEAE",
- "G c #898989",
- "H c #646464",
- "I c #BDBDBD",
- "J c #CACACA",
- "K c #2A2A2A",
- "L c #212121",
- "M c #B7B7B7",
- "N c #F4F4F4",
- "O c #737373",
- "P c #828282",
- "Q c #4D4D4D",
- "R c #000000",
- "S c #151515",
- "T c #B2B2B2",
- "U c #D6D6D6",
- "V c #D3D3D3",
- "W c #2F2F2F",
- "X c #636363",
- "Y c #A1A1A1",
- "Z c #BFBFBF",
- "` c #E0E0E0",
- " . c #6A6A6A",
- ".. c #050505",
- "+. c #A3A3A3",
- "@. c #202020",
- "#. c #5F5F5F",
- "$. c #B9B9B9",
- "%. c #C7C7C7",
- "&. c #D0D0D0",
- "*. c #3E3E3E",
- "=. c #666666",
- "-. c #DBDBDB",
- ";. c #424242",
- ">. c #C2C2C2",
- ",. c #1A1A1A",
- "'. c #2C2C2C",
- "). c #F6F6F6",
- "!. c #AAAAAA",
- "~. c #DCDCDC",
- "{. c #2D2D2D",
- "]. c #2E2E2E",
- "^. c #A7A7A7",
- "/. c #656565",
- "(. c #333333",
- "_. c #464646",
- ":. c #C4C4C4",
- "<. c #B8B8B8",
- "[. c #292929",
- "}. c #979797",
- "|. c #EFEFEF",
- "1. c #909090",
- "2. c #8A8A8A",
- "3. c #575757",
- "4. c #676767",
- "5. c #C5C5C5",
- "6. c #7A7A7A",
- "7. c #797979",
- "8. c #989898",
- "9. c #EEEEEE",
- "0. c #707070",
- "a. c #C8C8C8",
- "b. c #111111",
- "c. c #AFAFAF",
- "d. c #474747",
- "e. c #565656",
- "f. c #E3E3E3",
- "g. c #494949",
- "h. c #5B5B5B",
- "i. c #222222",
- "j. c #353535",
- "k. c #D9D9D9",
- "l. c #0A0A0A",
- "m. c #858585",
- "n. c #E5E5E5",
- "o. c #0E0E0E",
- "p. c #9A9A9A",
- "q. c #6F6F6F",
- "r. c #868686",
- "s. c #060606",
- "t. c #1E1E1E",
- "u. c #E8E8E8",
- "v. c #A5A5A5",
- "w. c #0D0D0D",
- "x. c #030303",
- "y. c #272727",
- "z. c #131313",
- "A. c #1F1F1F",
- "B. c #757575",
- "C. c #F7F7F7",
- "D. c #414141",
- "E. c #080808",
- "F. c #6B6B6B",
- "G. c #313131",
- "H. c #C0C0C0",
- "I. c #C9C9C9",
- "J. c #0B0B0B",
- "K. c #232323",
- "L. c #434343",
- "M. c #3D3D3D",
- "N. c #282828",
- "O. c #7C7C7C",
- "P. c #252525",
- "Q. c #3A3A3A",
- "R. c #F8F8F8",
- "S. c #1B1B1B",
- "T. c #949494",
- "U. c #3B3B3B",
- "V. c #242424",
- "W. c #383838",
- "X. c #6D6D6D",
- "Y. c #818181",
- "Z. c #939393",
- "`. c #9E9E9E",
- " + c #929292",
- ".+ c #7D7D7D",
- "++ c #ADADAD",
- "@+ c #DADADA",
- "#+ c #919191",
- "$+ c #E1E1E1",
- "%+ c #BEBEBE",
- "&+ c #ACACAC",
- "*+ c #9C9C9C",
- "=+ c #B3B3B3",
- "-+ c #808080",
- ";+ c #A8A8A8",
- ">+ c #393939",
- ",+ c #747474",
- "'+ c #7F7F7F",
- ")+ c #D1D1D1",
- "!+ c #606060",
- "~+ c #5C5C5C",
- "{+ c #686868",
- "]+ c #7E7E7E",
- "^+ c #787878",
- "/+ c #595959",
- ". . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / . . + + ",
- ". ( + _ : < [ & } | 1 2 $ 3 4 5 3 6 7 + + 8 9 + . + . ",
- ". + 0 9 a ( 3 a b c d e c f g h i g j $ k + l m + . + ",
- "+ 2 8 n o p | ( q r s . # t + + + u ^ v e w + x + + + ",
- "+ y z . @ A k B 7 n + ( s | p 8 C D 2 E 4 + + F G + . ",
- "# H I $ J G K L - M N . 2 O P Q R R S T U s s V W j + ",
- "X Y Z @ o ` _ g ...+.( 4 @.#.m G $.%.7 &.X *.=.-.;.&.",
- "Q >.C ,.'.} e + ).!.k + . + + . ~.{.> ].x f 7 ^./.k (.",
- "_.:.4 @ <.[.}.|.1.2.+ + + >.} 4 B + ( @ _ 3.4.5.6.r 7.",
- "3.8.9.~ 0.+ a.Q b.+ + c.d.#.=.$ |.b #.e.z ^ ; ^. .f.g.",
- "-.h.+ i.S M + # p j.% n 9.5.k.H l.m.V ^.n.o.M + M p.q.",
- "7 r.N s.1.R t.<.|.| u.v.~ w.x.E + s y.z.A.B.C.+ 5 D.q ",
- ").p.2 E.0.9 F.%.O {._ @.+ + i { [ i.G.H.P I.+ s q.} + ",
- ").p.6 J.R b.K.L.M.A.! b.g.K [.R M k + N.I + + >.O.+ . ",
- ").8.9.N.P...R R R R E.t.W n.+ Q.R.6 @.| + . + S.+ + . ",
- "n }.w T.U.B.<.i.@ Y + + U.+ c u V.= B B 7 u.W.c + . + ",
- "N T.# + }.X.Y.,.8.F.8 Z.[.`. +.+}.4 ++@+O.< ~.+ ( . + ",
- "d #+1 + _ ~.u.$+b $.y @+| $+%+I.&+k.h W +.9.+ ( . + . ",
- "w 0 |.*+. >.<.=+++++p a.p -+;+5.k.>+,+@ + . . + . + + ",
- "q '+9.R.^ I.t b %.I.)+4 $+n.I.,+ .|.+ . . . + . + + + ",
- ". p !+( + + + + + + E 0. .-+8.f.+ + . . + + . + + + + ",
- ". ( A ~+{+]+^+l > /+D f.c q . + . . + + . + + + + + + "
-]
-
-class QStringSequenceTest(UsesQApplication):
- def testQPixmapConstructor(self):
- label = QLabel()
- pixmap1 = QPixmap(xpm)
- self.assertFalse(pixmap1.isNull())
- self.assertEqual(pixmap1.width(), 27)
- self.assertEqual(pixmap1.height(), 22)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qpushbutton_test.py b/sources/pyside2/tests/QtWidgets/qpushbutton_test.py
deleted file mode 100644
index 896d4935c..000000000
--- a/sources/pyside2/tests/QtWidgets/qpushbutton_test.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtWidgets import QPushButton, QMenu, QWidget
-from PySide2.QtCore import QTimer
-
-class MyWidget(QWidget):
- def __init__(self):
- QWidget.__init__(self)
-
- m = QMenu(self)
- b = QPushButton("Hello", self)
- b.setMenu(m)
-
-
-class QPushButtonTest(UsesQApplication):
- def createMenu(self, button):
- m = QMenu()
- button.setMenu(m)
-
- def testSetMenu(self):
- w = MyWidget()
- w.show()
-
- timer = QTimer.singleShot(100, self.app.quit)
- self.app.exec_()
-
- def buttonCb(self, checked):
- self._clicked = True
-
- def testBoolinSignal(self):
- b = QPushButton()
- b.setCheckable(True)
- self._clicked = False
- b.toggled[bool].connect(self.buttonCb)
- b.toggle()
- self.assertTrue(self._clicked)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qshortcut_test.py b/sources/pyside2/tests/QtWidgets/qshortcut_test.py
deleted file mode 100644
index dbe99167c..000000000
--- a/sources/pyside2/tests/QtWidgets/qshortcut_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test the QShortcut constructor'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QKeySequence, QShortcut
-from PySide2.QtWidgets import QApplication, QWidget
-
-class Foo(QWidget):
- def __init__(self):
- QWidget.__init__(self)
- self.ok = False
- self.copy = False
-
- def slot_of_foo(self):
- self.ok = True
-
- def slot_of_copy(self):
- self.copy = True
-
-class MyShortcut(QShortcut):
- def __init__(self, keys, wdg, slot):
- QShortcut.__init__(self, keys, wdg, slot)
-
- def emit_signal(self):
- self.activated.emit()
-
-class QAppPresence(unittest.TestCase):
-
- def testQShortcut(self):
- self.qapp = QApplication([])
- f = Foo()
-
- self.sc = MyShortcut(QKeySequence(Qt.Key_Return), f, f.slot_of_foo)
- self.scstd = MyShortcut(QKeySequence.Copy, f, f.slot_of_copy)
- QTimer.singleShot(0, self.init);
- self.qapp.exec_()
- self.assertEqual(f.ok, True)
- self.assertEqual(f.copy, True)
-
- def init(self):
- self.sc.emit_signal();
- self.scstd.emit_signal();
- self.qapp.quit()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qsplitter_test.py b/sources/pyside2/tests/QtWidgets/qsplitter_test.py
deleted file mode 100644
index f375c820d..000000000
--- a/sources/pyside2/tests/QtWidgets/qsplitter_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QSplitter
-
-from helper.usesqapplication import UsesQApplication
-
-class QSplitterTest(UsesQApplication):
-
- def testGetRange(self):
- splitter = QSplitter()
- _min, _max = splitter.getRange(0)
- self.assertTrue(isinstance(_min, int))
- self.assertTrue(isinstance(_max, int))
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py
deleted file mode 100644
index 851231c42..000000000
--- a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QStandardItemModel, QStandardItem
-from PySide2.QtWidgets import QWidget
-import shiboken6 as shiboken
-
-from helper.usesqapplication import UsesQApplication
-
-
-class QStandardItemModelTest(UsesQApplication):
-
- def setUp(self):
- super(QStandardItemModelTest, self).setUp()
- self.window = QWidget()
- self.model = QStandardItemModel(0, 3, self.window)
-
- def tearDown(self):
- del self.window
- del self.model
- super(QStandardItemModelTest, self).tearDown()
-
- def testInsertRow(self):
- # bug #227
- self.model.insertRow(0)
-
- def testClear(self):
-
- model = QStandardItemModel()
- root = model.invisibleRootItem()
- model.clear()
- self.assertFalse(shiboken.isValid(root))
-
-
-class QStandardItemModelRef(UsesQApplication):
- def testRefCount(self):
- model = QStandardItemModel(5, 5)
- items = []
- for r in range(5):
- row = []
- for c in range(5):
- row.append(QStandardItem("%d,%d" % (r,c)) )
- self.assertEqual(sys.getrefcount(row[c]), 2)
-
- model.insertRow(r, row)
-
- for c in range(5):
- ref_after = sys.getrefcount(row[c])
- # check if the ref count was incremented after insertRow
- self.assertEqual(ref_after, 3)
-
- items.append(row)
- row = None
-
- for r in range(3):
- my_row = model.takeRow(0)
- my_row = None
- for c in range(5):
- # only rest 1 reference
- self.assertEqual(sys.getrefcount(items[r][c]), 2)
-
- my_i = model.item(0,0)
- # ref(my_i) + parent_ref + items list ref
- self.assertEqual(sys.getrefcount(my_i), 4)
-
- model.clear()
- # ref(my_i)
- self.assertEqual(sys.getrefcount(my_i), 3)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py b/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py
deleted file mode 100644
index a8b572d05..000000000
--- a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Tests conversions of QString to and from QKeySequence.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtGui import QAction, QKeySequence
-
-
-class QStringQKeySequenceTest(UsesQApplication):
- '''Tests conversions of QString to and from QKeySequence.'''
-
- def testQStringFromQKeySequence(self):
- '''Creates a QString from a QKeySequence.'''
- keyseq = 'Ctrl+A'
- a = QKeySequence(keyseq)
- self.assertEqual(a, keyseq)
-
- def testPythonStringAsQKeySequence(self):
- '''Passes a Python string to an argument expecting a QKeySequence.'''
- keyseq = 'Ctrl+A'
- action = QAction(None)
- action.setShortcut(keyseq)
- shortcut = action.shortcut()
- self.assertTrue(isinstance(shortcut, QKeySequence))
- self.assertEqual(shortcut.toString(), keyseq)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qstyle_test.py b/sources/pyside2/tests/QtWidgets/qstyle_test.py
deleted file mode 100644
index 60130a14c..000000000
--- a/sources/pyside2/tests/QtWidgets/qstyle_test.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-
-from PySide2.QtGui import QWindow
-from PySide2.QtWidgets import (QApplication, QFontComboBox, QLabel, QProxyStyle,
- QStyleFactory, QWidget)
-
-class ProxyStyle(QProxyStyle):
-
- def __init__(self, style):
- QProxyStyle.__init__(self, style)
- self.polished = 0
-
- def polish(self, widget):
- self.polished = self.polished + 1
- super(ProxyStyle, self).polish(widget)
-
-
-class SetStyleTest(UsesQApplication):
- '''Tests setting the same QStyle for all objects in a UI hierarchy.'''
-
- def testSetStyle(self):
- '''All this test have to do is not break with some invalid Python wrapper.'''
-
- def setStyleHelper(widget, style):
- widget.setStyle(style)
- widget.setPalette(style.standardPalette())
- for child in widget.children():
- if isinstance(child, QWidget):
- setStyleHelper(child, style)
-
- container = QWidget()
- # QFontComboBox is used because it has an QLineEdit created in C++ inside it,
- # and if the QWidget.setStyle(style) steals the ownership of the style
- # for the C++ originated widget everything will break.
- fontComboBox = QFontComboBox(container)
- label = QLabel(container)
- label.setText('Label')
- style = QStyleFactory.create(QStyleFactory.keys()[0])
- setStyleHelper(container, style)
-
- def testSetProxyStyle(self):
- label = QLabel("QtWidgets/ProxyStyle test")
- baseStyle = QStyleFactory.create(QApplication.instance().style().objectName())
- self.assertTrue(baseStyle)
- proxyStyle = ProxyStyle(baseStyle)
- label.setStyle(proxyStyle)
- label.show()
- while not label.windowHandle().isExposed():
- QApplication.instance().processEvents()
- self.assertTrue(proxyStyle.polished > 0)
-
- def testSetStyleOwnership(self):
- style = QStyleFactory.create(QStyleFactory.keys()[0])
- self.assertEqual(sys.getrefcount(style), 2)
- QApplication.instance().setStyle(style)
- self.assertEqual(sys.getrefcount(style), 3)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qtableview_test.py b/sources/pyside2/tests/QtWidgets/qtableview_test.py
deleted file mode 100644
index 040f8b91a..000000000
--- a/sources/pyside2/tests/QtWidgets/qtableview_test.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QAbstractTableModel
-from PySide2.QtWidgets import QTableWidget
-from helper.usesqapplication import UsesQApplication
-
-class QPenTest(UsesQApplication):
-
- def testItemModel(self):
- tv = QTableWidget()
-
- self.assertEqual(type(tv.model()), QAbstractTableModel)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qtabwidget_test.py b/sources/pyside2/tests/QtWidgets/qtabwidget_test.py
deleted file mode 100644
index fc4f98c1d..000000000
--- a/sources/pyside2/tests/QtWidgets/qtabwidget_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import *
-from helper.timedqapplication import TimedQApplication
-
-def makeBug643(tab):
- button = QPushButton('Foo')
- tab.insertTab(0, button, 'Foo')
-
-class RemoveTabMethod(TimedQApplication):
- def setUp(self):
- TimedQApplication.setUp(self)
- self.tab = QTabWidget()
-
- def tearDown(self):
- del self.tab
- TimedQApplication.tearDown(self)
-
-
- def testRemoveTabPresence(self):
- self.assertTrue(getattr(self.tab, 'removeTab'))
-
- def testInsertTab(self):
- makeBug643(self.tab)
- self.assertEqual(self.tab.count(), 1)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py b/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py
deleted file mode 100644
index c0c25d955..000000000
--- a/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QMainWindow, QTabWidget, QTextEdit, QSplitter
-from helper.usesqapplication import UsesQApplication
-
-class TabWidgetClear(QMainWindow):
- def __init__(self):
- QMainWindow.__init__(self)
- self.tabWidget = QTabWidget(self)
- self.setCentralWidget(self.tabWidget)
- self.editBox = QTextEdit(self)
- self.tabWidget.addTab(self.getSplitter(), 'Test')
-
- def getSplitter(self):
- splitter = QSplitter()
- splitter.addWidget(self.editBox)
- return splitter
-
- def toggle(self):
- self.tabWidget.clear()
- self.getSplitter()
-
-class TestTabWidgetClear(UsesQApplication):
-
- def testClear(self):
- self.window = TabWidgetClear()
- self.window.show()
- try:
- self.window.toggle()
- except RuntimeError as e:
- # This should never happened, PYSIDE-213
- raise e
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py b/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py
deleted file mode 100644
index aef06448b..000000000
--- a/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-from helper.usesqapplication import UsesQApplication
-
-
-class MyWindow(QtWidgets.QMainWindow):
- appendText = QtCore.Signal(str)
-
- @QtCore.Slot()
- def onButtonPressed(self):
- self.appendText.emit("PySide")
-
- def __init__(self, parent=None):
- super(MyWindow, self).__init__(parent)
-
- self.textEdit = QtWidgets.QTextEdit()
- self.btn = QtWidgets.QPushButton("ClickMe")
- self.btn.clicked.connect(self.onButtonPressed)
- self.appendText.connect(self.textEdit.append)
-
- def start(self):
- self.btn.click()
-
- def text(self):
- return self.textEdit.toPlainText()
-
-
-class testSignalWithCPPSlot(UsesQApplication):
-
- def testEmission(self):
- w = MyWindow()
- w.start()
- self.assertEqual(w.text(), "PySide")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qtextedit_test.py b/sources/pyside2/tests/QtWidgets/qtextedit_test.py
deleted file mode 100644
index d06cb4f83..000000000
--- a/sources/pyside2/tests/QtWidgets/qtextedit_test.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QTextEdit and ownership problems.'''
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QTextEdit
-
-from helper.usesqapplication import UsesQApplication
-
-class DontTouchReference(UsesQApplication):
- '''Check if the QTextTable returned by QTextCursor.insertTable() is not
- referenced by the QTextCursor that returns it.'''
-
- def setUp(self):
- super(DontTouchReference, self).setUp()
- self.editor = QTextEdit()
- self.cursor = self.editor.textCursor()
- self.table = self.cursor.insertTable(1, 1)
-
- def testQTextTable(self):
- # methods which return QTextTable should not increment its reference
- self.assertEqual(getrefcount(self.table), 2)
- f = self.cursor.currentFrame()
- del f
- self.assertEqual(getrefcount(self.table), 2)
- # destroying the cursor should not raise any "RuntimeError: internal
- # C++ object already deleted." when accessing the QTextTable
- del self.cursor
- self.assertEqual(getrefcount(self.table), 2)
- cell = self.table.cellAt(0, 0)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py b/sources/pyside2/tests/QtWidgets/qtoolbar_test.py
deleted file mode 100644
index a70305c4a..000000000
--- a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QToolbar'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import QToolBar, QMainWindow
-
-from helper.usesqapplication import UsesQApplication
-
-class AddActionText(UsesQApplication):
- '''Test case for calling QToolbar.addAction passing a text'''
-
- def setUp(self):
- #Acquire resources
- super(AddActionText, self).setUp()
- self.window = QMainWindow()
- self.toolbar = QToolBar()
- self.window.addToolBar(self.toolbar)
-
- def tearDown(self):
- #Release resources
- super(AddActionText, self).tearDown()
- del self.toolbar
- del self.window
-
- def testText(self):
- #QToolBar.addAction(text) - add a QToolButton
- self.toolbar.addAction('aaaa')
- self.assertEqual(len(self.toolbar.actions()), 1)
- action = self.toolbar.actions()[0]
- self.assertTrue(isinstance(action, QAction))
- self.assertEqual(action.text(), 'aaaa')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtoolbox_test.py b/sources/pyside2/tests/QtWidgets/qtoolbox_test.py
deleted file mode 100644
index 9fdd53958..000000000
--- a/sources/pyside2/tests/QtWidgets/qtoolbox_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import QToolBox, QWidget
-
-from helper.usesqapplication import UsesQApplication
-
-class OwnershipControl(UsesQApplication):
-
- def setUp(self):
- super(OwnershipControl, self).setUp()
- self.toolbox = QToolBox()
-
- def tearDown(self):
- del self.toolbox
- super(OwnershipControl, self).tearDown()
-
- def testAddItem(self):
- # Was losing ownership of the widget.
- index = self.toolbox.addItem(QWidget(), 'item')
- item = self.toolbox.widget(index)
- self.assertTrue(isinstance(item, QWidget))
-
- def testAddItemWithIcon(self):
- index = self.toolbox.addItem(QWidget(), QIcon(), 'item')
- item = self.toolbox.widget(index)
- self.assertTrue(isinstance(item, QWidget))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtreeview_test.py b/sources/pyside2/tests/QtWidgets/qtreeview_test.py
deleted file mode 100644
index 8824088d4..000000000
--- a/sources/pyside2/tests/QtWidgets/qtreeview_test.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QStandardItemModel
-from PySide2.QtWidgets import (QWidget, QTreeView, QVBoxLayout,
- QStyledItemDelegate, QHeaderView)
-from PySide2.QtCore import Qt
-from helper.usesqapplication import UsesQApplication
-
-class Widget(QWidget):
- def __init__(self, parent=None):
- QWidget.__init__(self, parent)
- self.treeView = QTreeView(self)
- layout = QVBoxLayout()
- layout.addWidget(self.treeView)
- self.setLayout(layout)
- self.treeView.setModel(QStandardItemModel())
-
- self.treeView.model().setHorizontalHeaderLabels(('3', '1', '5'))
-
-class QWidgetTest(UsesQApplication):
-
- def testDelegates(self):
- widget = Widget()
- t = widget.treeView
-
- # When calling setItemDelegateForColumn using a separate variable
- # for the second argument (QAbstractItemDelegate), there was no problem
- # on keeping the reference to this object, since the variable was kept
- # alive (case A)
- # Contrary, when instantiating this argument on the function call
- # Using QStyledItemDelegate inside the call the reference of the
- # object was lost, causing a segfault. (case B)
-
- # Case A
- d = QStyledItemDelegate()
- # Using QStyledItemDelegate from a variable so we keep the reference alive
- # and we encounter no segfault.
- t.setItemDelegateForColumn(0, d)
- # This raised the Segmentation Fault too, because manually destroying
- # the object caused a missing refrence.
- del d
-
- # Getting the delegates
- a = t.itemDelegateForColumn(0)
- self.assertIsInstance(a, QStyledItemDelegate)
-
- # Case B
- t.setItemDelegateForColumn(1, QStyledItemDelegate())
-
- # Getting the delegates
- b = t.itemDelegateForColumn(1)
- self.assertIsInstance(b, QStyledItemDelegate)
-
- # Test for Rows
- t.setItemDelegateForRow(0, QStyledItemDelegate())
- self.assertIsInstance(t.itemDelegateForRow(0), QStyledItemDelegate)
-
- # Test for general delegate
- t.setItemDelegate(QStyledItemDelegate())
- self.assertIsInstance(t.itemDelegate(), QStyledItemDelegate)
-
- def testHeader(self):
- tree = QTreeView()
- tree.setHeader(QHeaderView(Qt.Horizontal))
- self.assertIsNotNone(tree.header())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtreewidget_test.py b/sources/pyside2/tests/QtWidgets/qtreewidget_test.py
deleted file mode 100644
index 6700f82c9..000000000
--- a/sources/pyside2/tests/QtWidgets/qtreewidget_test.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QTreeWidget, QTreeWidgetItem, QPushButton
-from helper.usesqapplication import UsesQApplication
-
-class QTreeWidgetTest(UsesQApplication):
-
- # PYSIDE-73:
- # There was a problem when adding items to a QTreeWidget
- # when the Widget was being build on the method call instead
- # of as a separate variable.
- # The problem was there was not ownership transfer, so the
- # QTreeWidget did not own the QWidget element
- def testSetItemWidget(self):
-
- treeWidget = QTreeWidget()
- treeWidget.setColumnCount(2)
-
- item = QTreeWidgetItem(['text of column 0', ''])
- treeWidget.insertTopLevelItem(0, item)
- # Adding QPushButton inside the method
- treeWidget.setItemWidget(item, 1,
- QPushButton('Push button on column 1'))
-
- # Getting the widget back
- w = treeWidget.itemWidget(treeWidget.itemAt(0,1), 1)
- self.assertIsInstance(w, QPushButton)
-
- p = QPushButton('New independent button')
- # Adding QPushButton object from variable
- treeWidget.setItemWidget(item, 0, p)
- w = treeWidget.itemWidget(treeWidget.itemAt(0,0), 0)
- self.assertIsInstance(w, QPushButton)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qtreewidgetitem_test.py b/sources/pyside2/tests/QtWidgets/qtreewidgetitem_test.py
deleted file mode 100644
index 115bce4b7..000000000
--- a/sources/pyside2/tests/QtWidgets/qtreewidgetitem_test.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of PySide2.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-Unit tests for QTreeWidgetItem
-------------------------------
-
-This test is actually meant for all types which provide `tp_richcompare`
-but actually define something without providing `==` or `!=` operators.
-QTreeWidgetItem for instance defines `<` only.
-
-PYSIDE-74: We redirect to type `object`s handling which is anyway the default
- when `tp_richcompare` is undefined.
-"""
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-
-
-class QTreeWidgetItemTest(unittest.TestCase):
- def testClass(self):
- app = QtWidgets.QApplication([])
- treewidget = QtWidgets.QTreeWidget()
- item = QtWidgets.QTreeWidgetItem(["Words and stuff"])
- item2 = QtWidgets.QTreeWidgetItem(["More words!"])
- treewidget.insertTopLevelItem(0, item)
-
- dummy_list = ["Numbers", "Symbols", "Spam"]
- self.assertFalse(item in dummy_list)
- self.assertTrue(item not in dummy_list)
- self.assertFalse(item == item2)
- self.assertTrue(item != item2)
- treewidget.show()
- QtCore.QTimer.singleShot(500, app.quit)
- app.exec_()
-
-
-if __name__ == "__main__":
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qvariant_test.py b/sources/pyside2/tests/QtWidgets/qvariant_test.py
deleted file mode 100644
index d4da7d4b2..000000000
--- a/sources/pyside2/tests/QtWidgets/qvariant_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import (QApplication, QComboBox, QGraphicsScene,
- QGraphicsRectItem)
-
-from helper.usesqapplication import UsesQApplication
-
-class MyDiagram(QGraphicsScene):
- pass
-
-class MyItem(QGraphicsRectItem):
- def itemChange(self, change, value):
- return value;
-
-class Sequence(object):
- # Having the __getitem__ method on a class transform the Python
- # type to a PySequence.
- # Before the patch: aa75437f9119d997dd290471ac3e2cc88ca88bf1
- # "Fix QVariant conversions when using PySequences"
- # one could not use an object from this class, because internally
- # we were requiring that the PySequence was finite.
- def __getitem__(self, key):
- raise IndexError()
-
-class QGraphicsSceneOnQVariantTest(UsesQApplication):
- """Test storage ot QGraphicsScene into QVariants"""
- def setUp(self):
- super(QGraphicsSceneOnQVariantTest, self).setUp()
- self.s = MyDiagram()
- self.i = MyItem()
- self.combo = QComboBox()
-
- def tearDown(self):
- del self.s
- del self.i
- del self.combo
- super(QGraphicsSceneOnQVariantTest, self).tearDown()
-
- def testIt(self):
- self.s.addItem(self.i)
- self.assertEqual(len(self.s.items()), 1)
-
- def testSequence(self):
- # PYSIDE-641
- self.combo.addItem("test", userData=Sequence())
- self.assertTrue(isinstance(self.combo.itemData(0), Sequence))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py b/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py
deleted file mode 100644
index 4ac9e4e04..000000000
--- a/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QWidget, QVBoxLayout, QPushButton, QApplication, QHBoxLayout
-from helper.usesqapplication import UsesQApplication
-
-class QWidgetTest(UsesQApplication):
-
- def test_setLayout(self):
- layout = QVBoxLayout()
- btn1 = QPushButton("button_v1")
- layout.addWidget(btn1)
-
- btn2 = QPushButton("button_v2")
- layout.addWidget(btn2)
-
- layout2 = QHBoxLayout()
-
- btn1 = QPushButton("button_h1")
- layout2.addWidget(btn1)
-
- btn2 = QPushButton("button_h2")
- layout2.addWidget(btn2)
-
- layout.addLayout(layout2)
-
- widget = QWidget()
- widget.setLayout(layout)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/qwidget_test.py b/sources/pyside2/tests/QtWidgets/qwidget_test.py
deleted file mode 100644
index e2f7e5ed1..000000000
--- a/sources/pyside2/tests/QtWidgets/qwidget_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import sys
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QWidget, QMainWindow
-from helper.usesqapplication import UsesQApplication
-
-class QWidgetInherit(QMainWindow):
- def __init__(self):
- QWidget.__init__(self)
-
-class NativeEventTestWidget(QWidget):
-
- nativeEventCount = 0
-
- def __init__(self):
- QWidget.__init__(self)
-
- def nativeEvent(self, eventType, message):
- self.nativeEventCount = self.nativeEventCount + 1
- return [False, 0]
-
-class QWidgetTest(UsesQApplication):
-
- def testInheritance(self):
- self.assertRaises(TypeError, QWidgetInherit)
-
-class QWidgetVisible(UsesQApplication):
-
- def testBasic(self):
- # Also related to bug #244, on existence of setVisible'''
- widget = NativeEventTestWidget()
- self.assertTrue(not widget.isVisible())
- widget.setVisible(True)
- self.assertTrue(widget.isVisible())
- self.assertTrue(widget.winId() is not 0)
- # skip this test on macOS since no native events are received
- if sys.platform == 'darwin':
- return
- for i in range(10):
- if widget.nativeEventCount > 0:
- break
- self.app.processEvents()
- self.assertTrue(widget.nativeEventCount > 0)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/reference_count_test.py b/sources/pyside2/tests/QtWidgets/reference_count_test.py
deleted file mode 100644
index a6ba302f9..000000000
--- a/sources/pyside2/tests/QtWidgets/reference_count_test.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for Reference count when the object is created in c++ side'''
-
-import gc
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Qt, QPointF
-from PySide2.QtGui import QPolygonF
-from PySide2.QtWidgets import QApplication, QGraphicsScene, QGraphicsRectItem, QGraphicsPolygonItem, QGraphicsRectItem
-
-from helper.usesqapplication import UsesQApplication
-
-destroyedRect = False
-destroyedPol = False
-
-def rect_del(o):
- global destroyedRect
- destroyedRect = True
-
-def pol_del(o):
- global destroyedPol
- destroyedPol = True
-
-class ReferenceCount(UsesQApplication):
-
- def setUp(self):
- super(ReferenceCount, self).setUp()
- self.scene = QGraphicsScene()
-
- def tearDown(self):
- super(ReferenceCount, self).tearDown()
-
- def beforeTest(self):
- points = [QPointF(0, 0), QPointF(100, 100), QPointF(0, 100)]
- pol = self.scene.addPolygon(QPolygonF(points))
- self.assertTrue(isinstance(pol, QGraphicsPolygonItem))
- self.wrp = weakref.ref(pol, pol_del)
-
- #refcount need be 3 because one ref for QGraphicsScene, and one to rect obj
- self.assertEqual(sys.getrefcount(pol), 3)
-
- def testReferenceCount(self):
- global destroyedRect
- global destroyedPol
-
- self.beforeTest()
-
- rect = self.scene.addRect(10.0, 10.0, 10.0, 10.0)
- self.assertTrue(isinstance(rect, QGraphicsRectItem))
-
- self.wrr = weakref.ref(rect, rect_del)
-
- #refcount need be 3 because one ref for QGraphicsScene, and one to rect obj
- self.assertEqual(sys.getrefcount(rect), 3)
-
- del rect
- #not destroyed because one ref continue in QGraphicsScene
- self.assertEqual(destroyedRect, False)
- self.assertEqual(destroyedPol, False)
-
- del self.scene
-
- #QGraphicsScene was destroyed and this destroy internal ref to rect
- self.assertEqual(destroyedRect, True)
- self.assertEqual(destroyedPol, True)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/signature_test.py b/sources/pyside2/tests/QtWidgets/signature_test.py
deleted file mode 100644
index 57fcf3874..000000000
--- a/sources/pyside2/tests/QtWidgets/signature_test.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2.QtCore
-import PySide2.QtWidgets
-from shibokensupport.signature import inspect
-
-
-class PySideSignatureTest(unittest.TestCase):
- def testSignatureExist(self):
- t1 = type(PySide2.QtCore.QObject.children.__signature__)
- self.assertEqual(t1, inspect.Signature)
- t2 = type(PySide2.QtCore.QObject.__dict__["children"].__signature__)
- self.assertEqual(t2, t1)
- obj = PySide2.QtWidgets.QApplication.palette
- t3 = type(obj.__signature__)
- self.assertEqual(t3, list)
- self.assertEqual(len(obj.__signature__), 3)
- for thing in obj.__signature__:
- self.assertEqual(type(thing), inspect.Signature)
- sm = PySide2.QtWidgets.QApplication.__dict__["palette"]
- self.assertFalse(callable(sm))
- self.assertEqual(sm.__func__, obj)
- self.assertTrue(hasattr(sm, "__signature__") and
- sm.__signature__ is not None)
-
- def testSignatureIsCached(self):
- # see if we get the same object
- ob1 = PySide2.QtCore.QObject.children.__signature__
- ob2 = PySide2.QtCore.QObject.children.__signature__
- self.assertTrue(ob1 is ob2)
- # same with multi signature
- ob1 = PySide2.QtWidgets.QApplication.palette.__signature__
- ob2 = PySide2.QtWidgets.QApplication.palette.__signature__
- self.assertTrue(ob1 is ob2)
-
- def testModuleIsInitialized(self):
- self.assertTrue(PySide2.QtWidgets.QApplication.__signature__ is not None)
-
- def test_NotCalled_is_callable_and_correct(self):
- # A signature that has a default value with some "Default(...)"
- # wrapper is callable and creates an object of the right type.
- sig = PySide2.QtCore.QByteArray().toPercentEncoding.__signature__
- called_default = sig.parameters["exclude"].default()
- self.assertEqual(type(called_default), PySide2.QtCore.QByteArray)
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/standardpixmap_test.py b/sources/pyside2/tests/QtWidgets/standardpixmap_test.py
deleted file mode 100644
index 12a5bea8e..000000000
--- a/sources/pyside2/tests/QtWidgets/standardpixmap_test.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtGui import QPixmap
-from PySide2.QtWidgets import QStyle
-
-from helper.usesqapplication import UsesQApplication
-
-class StandardPixmapTest(UsesQApplication):
- def testDefaultOptions(self): # Bug 253
- pixmap = self.app.style().standardPixmap(QStyle.SP_DirClosedIcon)
- self.assertTrue(isinstance(pixmap, QPixmap))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/test_module_template.py b/sources/pyside2/tests/QtWidgets/test_module_template.py
deleted file mode 100644
index 175004800..000000000
--- a/sources/pyside2/tests/QtWidgets/test_module_template.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths()
-
-from PySide2.QtWidgets import QWidget
-from PySide2.QtCore import QObject
-
-class MyQObject(QObject):
- pass
-
-class MyQWidget(QWidget):
- pass
-
-class Sentinel():
- value = 10
-
diff --git a/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py b/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py
deleted file mode 100644
index 4e6651cec..000000000
--- a/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for overriding inherited protected virtual methods'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimerEvent
-from PySide2.QtWidgets import QApplication, QSpinBox
-
-from helper.usesqapplication import UsesQApplication
-
-class MySpinButton(QSpinBox):
- '''Simple example class of overriding QObject.timerEvent'''
-
- def __init__(self, max_runs=5, app=None):
- #Creates a new spinbox that will run <max_runs> and quit <app>
- super(MySpinButton, self).__init__()
-
- if app is None:
- app = QApplication([])
-
- self.app = app
- self.max_runs = max_runs
- self.runs = 0
-
- def timerEvent(self, event):
- #Timer event method
- self.runs += 1
-
- self.setValue(self.runs)
-
- if self.runs == self.max_runs:
- self.app.quit()
-
- if not isinstance(event, QTimerEvent):
- raise TypeError('Invalid event type. Must be TimerEvent')
-
-class TimerEventTest(UsesQApplication):
- '''Test case for running QObject.timerEvent from inherited class'''
-
- qapplication = True
-
- def setUp(self):
- #Acquire resources
- super(TimerEventTest, self).setUp()
- self.widget = MySpinButton(app=self.app)
-
- def tearDown(self):
- #Release resources
- del self.widget
- super(TimerEventTest, self).tearDown()
-
- def testMethod(self):
- #QWidget.timerEvent overrinding (protected inherited)
- timer_id = self.widget.startTimer(0)
-
- self.app.exec_()
-
- self.widget.killTimer(timer_id)
-
- self.assertTrue(self.widget.runs >= self.widget.max_runs)
-
-
-if __name__ == '__main__':
- unittest.main()
- #app = QApplication([])
- #widget = MySpinButton(app=app)
- #widget.startTimer(500)
- #widget.show()
- #app.exec_()
-
diff --git a/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py b/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py
deleted file mode 100644
index 78ad04043..000000000
--- a/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QGraphicsScene, QGraphicsRectItem, QGraphicsView, QApplication
-from PySide2.QtGui import QBrush, QColor
-from PySide2.QtCore import QTimer
-from helper.usesqapplication import UsesQApplication
-
-qgraphics_item_painted = False
-
-class RoundRectItem(QGraphicsRectItem):
-
- def __init__(self, x, y, w, h):
- QGraphicsRectItem.__init__(self, x, y, w, h)
-
- def paint(self, painter, qstyleoptiongraphicsitem, qwidget):
- global qgraphics_item_painted
- qgraphics_item_painted = True
-
-
-class QGraphicsItemTest(UsesQApplication):
-
- def createRoundRect(self, scene):
- item = RoundRectItem(10, 10, 100, 100)
- item.setBrush(QBrush(QColor(255, 0, 0)))
- scene.addItem(item)
- return item
-
- def quit_app(self):
- self.app.quit()
-
- def test_setParentItem(self):
- global qgraphics_item_painted
-
- scene = QGraphicsScene()
- scene.addText("test")
- view = QGraphicsView(scene)
-
- rect = self.createRoundRect(scene)
- view.show()
- QTimer.singleShot(1000, self.quit_app)
- self.app.exec_()
- self.assertTrue(qgraphics_item_painted)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWidgets/wrong_return_test.py b/sources/pyside2/tests/QtWidgets/wrong_return_test.py
deleted file mode 100644
index 27b5309e9..000000000
--- a/sources/pyside2/tests/QtWidgets/wrong_return_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for Virtual functions with wrong return type'''
-
-import os
-import sys
-import unittest
-import warnings
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtWidgets
-from helper.usesqapplication import UsesQApplication
-
-
-warnings.simplefilter('error')
-
-
-class MyWidget(QtWidgets.QWidget):
- def __init__(self, parent=None):
- super(MyWidget, self).__init__(parent)
-
- def sizeHint(self):
- pass
-
-class testCase(UsesQApplication):
-
- def testVirtualReturn(self):
- w = MyWidget()
- self.assertWarns(RuntimeWarning, w.show)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtXml/qdomdocument_test.py b/sources/pyside2/tests/QtXml/qdomdocument_test.py
deleted file mode 100644
index 37774288c..000000000
--- a/sources/pyside2/tests/QtXml/qdomdocument_test.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QByteArray
-from PySide2.QtXml import QDomDocument, QDomElement
-
-
-class QDomDocumentTest(unittest.TestCase):
-
- def setUp(self):
- self.dom = QDomDocument()
-
- self.goodXmlData = QByteArray(bytes('''
- <typesystem package="PySide2.QtXml">
- <value-type name="QDomDocument"/>
- <value-type name="QDomElement"/>
- </typesystem>
- ''', "UTF-8"))
-
- self.badXmlData = QByteArray(bytes('''
- <typesystem package="PySide2.QtXml">
- <value-type name="QDomDocument">
- </typesystem>
- ''', "UTF-8"))
-
- def tearDown(self):
- del self.dom
- del self.goodXmlData
- del self.badXmlData
-
- def testQDomDocumentSetContentWithBadXmlData(self):
- '''Sets invalid xml as the QDomDocument contents.'''
- ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.badXmlData, True)
- self.assertFalse(ok)
- self.assertEqual(errorStr, 'Opening and ending tag mismatch.')
- self.assertEqual(errorLine, 4)
- self.assertEqual(errorColumn, 21)
-
- def testQDomDocumentSetContentWithGoodXmlData(self):
- '''Sets valid xml as the QDomDocument contents.'''
- ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.goodXmlData, True)
- self.assertTrue(ok)
- self.assertEqual(errorStr, '')
- self.assertEqual(errorLine, 0)
- self.assertEqual(errorColumn, 0)
-
- def testQDomDocumentData(self):
- '''Checks the QDomDocument elements for the valid xml contents.'''
-
- def checkAttribute(element, attribute, value):
- self.assertTrue(isinstance(root, QDomElement))
- self.assertFalse(element.isNull())
- self.assertTrue(element.hasAttribute(attribute))
- self.assertEqual(element.attribute(attribute), value)
-
- ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.goodXmlData, True)
- root = self.dom.documentElement()
- self.assertEqual(root.tagName(), 'typesystem')
- checkAttribute(root, 'package', 'PySide2.QtXml')
-
- child = root.firstChildElement('value-type')
- checkAttribute(child, 'name', 'QDomDocument')
-
- child = child.nextSiblingElement('value-type')
- checkAttribute(child, 'name', 'QDomElement')
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/init_paths.py b/sources/pyside2/tests/init_paths.py
deleted file mode 100644
index c0a9cd984..000000000
--- a/sources/pyside2/tests/init_paths.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-
-SRC_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(SRC_DIR)),
- 'shiboken6', 'tests'))
-from shiboken_paths import (get_dir_env_var, get_build_dir, add_python_dirs,
- add_lib_dirs, shiboken_paths)
-
-
-def _get_qt_dir():
- """Retrieve the location of Qt."""
- result = None
- try:
- result = get_dir_env_var('QT_DIR')
- except Exception:
- # This is just a convenience for command line invocation independent
- # of ctest. Normally, QT_DIR should be set to avoid repetitive patch
- # searches.
- print('The environment variable QT_DIR is not set; falling back to path search',
- file=sys.stderr)
- qmake = 'qmake.exe' if sys.platform == 'win32' else 'qmake'
- for path in os.environ.get('PATH').split(os.pathsep):
- if path and os.path.isfile(os.path.join(path, qmake)):
- result = os.path.dirname(path)
- break
- if not result:
- raise ValueError('Unable to locate Qt. Please set the environment variable QT_DIR')
- print('Qt as determined by path search: {}'.format(result), file=sys.stderr)
- return result
-
-
-def _get_qt_lib_dir():
- """Retrieve the location of the Qt library directory."""
- sub_dir = 'bin' if sys.platform == 'win32' else 'lib'
- return os.path.join(_get_qt_dir(), sub_dir) # For testbinding
-
-
-def _init_test_paths(shiboken_tests=False, testbindings_module=False):
- """Sets the correct import paths (Python modules and C++ library paths)
- for PySide tests and shiboken6 tests using depending on the environment
- variables BUILD_DIR and QT_DIR pointing to the build directory and
- Qt directory, respectively."""
- src_dir = os.path.dirname(os.path.abspath(__file__))
-
- python_dirs = [os.path.join(src_dir, 'util')] # Helper module
-
- pyside_build_dir = os.path.join(get_build_dir(), 'pyside2')
- python_dirs.append(pyside_build_dir) # for PySide2
- lib_dirs = [os.path.join(pyside_build_dir, 'libpyside')]
-
- if testbindings_module:
- python_dirs.append(os.path.join(pyside_build_dir,
- 'tests', 'pysidetest'))
- lib_dirs.append(_get_qt_lib_dir())
-
- shiboken_path_tuple = shiboken_paths(shiboken_tests)
- python_dirs.extend(shiboken_path_tuple[0])
- lib_dirs.extend(shiboken_path_tuple[1])
-
- add_python_dirs(python_dirs)
- add_lib_dirs(lib_dirs)
-
-
-def init_test_paths(testbindings_module=False):
- """Sets the correct import paths for PySide2 tests, optionally including
- testbindings."""
- _init_test_paths(False, testbindings_module)
-
-
-def init_all_test_paths():
- """Sets the correct import paths for PySide2 and shiboken6 tests
- (for registry checking only)."""
- _init_test_paths(True, True)
diff --git a/sources/pyside2/tests/mac/qmacstyle_test.py b/sources/pyside2/tests/mac/qmacstyle_test.py
deleted file mode 100644
index 091f9591b..000000000
--- a/sources/pyside2/tests/mac/qmacstyle_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# Qt5: this is gone: from PySide2.QtGui import QMacStyle
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtWidgets import QApplication, QLabel, QStyleFactory
-from PySide2.QtCore import QObject
-
-from helper.usesqapplication import UsesQApplication
-
-class QMacStyleTest(UsesQApplication):
- def setUp(self):
- UsesQApplication.setUp(self)
- self.QMacStyle = type(QStyleFactory.create('Macintosh'))
-
- def testWidgetStyle(self):
- w = QLabel('Hello')
- self.assertTrue(isinstance(w.style(), self.QMacStyle))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/manually/bug_841.py b/sources/pyside2/tests/manually/bug_841.py
deleted file mode 100644
index 6a3af9422..000000000
--- a/sources/pyside2/tests/manually/bug_841.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import sys
-
-from PySide2.QtGui import QStandardItem, QStandardItemModel
-from PySide2.QtWidgets import QMainWindow, QTreeView, QAbstractItemView, QApplication, QMessageBox
-
-class Item(QStandardItem):
- def __init__(self, text):
- super(Item, self).__init__()
- self.setText(text)
- self.setDragEnabled(True)
- self.setDropEnabled(True)
-
- def clone(self):
- ret = Item(self.text())
- return ret
-
-class Project(QStandardItemModel):
- def __init__(self):
- super(Project, self).__init__()
- self.setItemPrototype(Item("Prototype"))
- # add some items so we have stuff to move around
- self.appendRow(Item("ABC"))
- self.appendRow(Item("DEF"))
- self.appendRow(Item("GHI"))
-
-class MainWindow(QMainWindow):
- def __init__(self):
- super(MainWindow, self).__init__()
-
- self.model = Project()
- self.view = QTreeView(self)
- self.view.setModel(self.model)
- self.view.setDragEnabled(True)
- self.view.setDragDropMode(QAbstractItemView.InternalMove)
- self.setCentralWidget(self.view)
-
- def mousePressEvent(self, e):
- print(e.x(), e.y())
- return QMainWindow.mousePressEvent(self, e)
-
-def main():
- app = QApplication(sys.argv)
- w = MainWindow()
- w.show()
- QMessageBox.information(None, "Info", "Just drag and drop the items.")
- sys.exit(app.exec_())
-
-if __name__ == "__main__":
- main()
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
deleted file mode 100644
index e969e13c9..000000000
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ /dev/null
@@ -1,173 +0,0 @@
-project(pysidetest)
-project(testbinding)
-
-cmake_minimum_required(VERSION 3.16)
-
-set(QT_USE_QTCORE 1)
-# no more supported: include(${QT_USE_FILE})
-
-# removed after qtbase/054b66a65748c9ebfafeca88bf31669a24994237, is this required?
-# add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
-
-add_definitions(-DQT_SHARED)
-add_definitions(-DRXX_ALLOCATOR_INIT_0)
-
-find_package(Qt${QT_MAJOR_VERSION}Widgets)
-
-set(pysidetest_SRC
-flagstest.cpp
-testobject.cpp
-testview.cpp
-hiddenobject.cpp
-)
-
-set(pysidetest_MOC_HEADERS
-flagstest.h
-testobject.h
-testview.h
-hiddenobject.h
-)
-
-qt_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
-
-set(testbinding_SRC
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/flagsnamespace_classforenum_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/testobject_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/intvalue_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobjectwithnamespace_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobject2withnamespace_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp2_testobjectwithoutnamespace_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/testview_wrapper.cpp
-${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp
-)
-
-# Get per module include dirs.
-# There are usually 3 paths there:
-# ./qt/include/; ./qt/include/QtCore ; ./qt/mkspecs/linux-g++
-# on framework build they are:
-# ./qt/lib/QtCore.framework; ./qt/lib/QtCore.framework/Headers ; ./qt/mkspecs/macx-clang
-# Thus we use the second direct path, which contains the actual header files.
-
-if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- set(Qt6Core_DIRECT_INCLUDE_DIR ${Qt6Core_INCLUDE_DIRS})
- set(Qt6Gui_DIRECT_INCLUDE_DIR ${Qt6Gui_INCLUDE_DIRS})
- set(Qt6Widgets_DIRECT_INCLUDE_DIR ${Qt6Widgets_INCLUDE_DIRS})
-else()
- list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_DIRECT_INCLUDE_DIR)
- list(GET Qt5Gui_INCLUDE_DIRS 1 Qt5Gui_DIRECT_INCLUDE_DIR)
- list(GET Qt5Widgets_INCLUDE_DIRS 1 Qt5Widgets_DIRECT_INCLUDE_DIR)
-endif()
-
-# Adjust include headers paths for frameworks.
-set(shiboken_framework_include_dirs_option "")
-if(CMAKE_HOST_APPLE AND QtCore_is_framework)
- set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
- set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
-endif()
-
-make_path(testbinding_include_dirs ${pyside2_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../../shiboken6/libshiboken
- ${CMAKE_CURRENT_SOURCE_DIR}/../../PySide2
- ${CMAKE_CURRENT_SOURCE_DIR}/../../libpyside
- ${QT_INCLUDE_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_DIRECT_INCLUDE_DIR}
- ${Qt${QT_MAJOR_VERSION}Gui_DIRECT_INCLUDE_DIR}
- ${Qt${QT_MAJOR_VERSION}Widgets_DIRECT_INCLUDE_DIR}
- )
-
-make_path(testbinding_typesystem_path ${pyside2_SOURCE_DIR}
- ${pyside2_BINARY_DIR})
-
-add_custom_command(
-OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
- BYPRODUCTS ${testbinding_SRC}
- COMMAND Shiboken6::shiboken6 ${GENERATOR_EXTRA_FLAGS}
- ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h
- --include-paths=${testbinding_include_dirs}
- ${shiboken_framework_include_dirs_option}
- --typesystem-paths=${testbinding_typesystem_path}
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml
- --api-version=${SUPPORTED_QT_VERSION}
-WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-COMMENT "Running generator for test binding..."
-)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
- ${pyside2_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${libpyside_SOURCE_DIR})
-
-add_library(pysidetest SHARED ${pysidetest_SRC} ${pysidetest_MOC_SRC})
-set_target_properties(pysidetest PROPERTIES
- DEFINE_SYMBOL BUILD_PYSIDETEST)
-
-target_link_libraries(pysidetest
- Shiboken6::libshiboken
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- )
-
-add_library(testbinding MODULE ${testbinding_SRC})
-set_property(TARGET testbinding PROPERTY PREFIX "")
-set_property(TARGET testbinding PROPERTY OUTPUT_NAME "testbinding${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}")
-if(WIN32)
- set_property(TARGET testbinding PROPERTY SUFFIX ".pyd")
-endif()
-
-if(PYTHON_LIMITED_API)
- set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIMITED_LIBRARIES})
-else()
- set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIBRARIES})
-endif()
-
-target_link_libraries(testbinding
- pysidetest
- pyside2
- ${TESTBINDING_PYTHON_LIBS}
- Shiboken6::libshiboken
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
-
-add_dependencies(testbinding pyside2 QtCore QtGui QtWidgets pysidetest)
-create_generator_target(testbinding)
-
-PYSIDE_TEST(constructor_properties_test.py)
-PYSIDE_TEST(decoratedslot_test.py)
-# Will always crash when built against Qt 5.6, no point in running it.
-if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.7.0)
- PYSIDE_TEST(delegatecreateseditor_test.py)
-endif()
-PYSIDE_TEST(all_modules_load_test.py)
-PYSIDE_TEST(bug_1016.py)
-PYSIDE_TEST(embedding_test.py)
-PYSIDE_TEST(enum_test.py)
-PYSIDE_TEST(homonymoussignalandmethod_test.py)
-PYSIDE_TEST(iterable_test.py)
-PYSIDE_TEST(list_signal_test.py)
-PYSIDE_TEST(mixin_signal_slots_test.py)
-PYSIDE_TEST(modelview_test.py)
-PYSIDE_TEST(new_inherited_functions_test.py)
-PYSIDE_TEST(notify_id.py)
-PYSIDE_TEST(properties_test.py)
-PYSIDE_TEST(property_python_test.py)
-PYSIDE_TEST(qapp_like_a_macro_test.py)
-PYSIDE_TEST(qvariant_test.py)
-PYSIDE_TEST(repr_test.py)
-PYSIDE_TEST(signal_tp_descr_get_test.py)
-PYSIDE_TEST(signal_slot_warning.py)
-PYSIDE_TEST(signalandnamespace_test.py)
-PYSIDE_TEST(signalemissionfrompython_test.py)
-PYSIDE_TEST(signalwithdefaultvalue_test.py)
-PYSIDE_TEST(typedef_signal_test.py)
-PYSIDE_TEST(version_test.py)
diff --git a/sources/pyside2/tests/pysidetest/all_modules_load_test.py b/sources/pyside2/tests/pysidetest/all_modules_load_test.py
deleted file mode 100644
index 10ccc5221..000000000
--- a/sources/pyside2/tests/pysidetest/all_modules_load_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-
-# Note:
-# "from PySide2 import *" can only be used at module level.
-# It is also really not recommended to use. But for testing,
-# the "__all__" variable is a great feature!
-
-class AllModulesImportTest(unittest.TestCase):
- def testAllModulesCanImport(self):
- # would also work: exec("from PySide2 import *")
- for name in PySide2.__all__:
- exec("import PySide2.{}".format(name))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/constructor_properties_test.py b/sources/pyside2/tests/pysidetest/constructor_properties_test.py
deleted file mode 100644
index 139091fed..000000000
--- a/sources/pyside2/tests/pysidetest/constructor_properties_test.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from helper.usesqapplication import UsesQApplication
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import QApplication, QLabel, QFrame
-
-
-class ConstructorPropertiesTest(UsesQApplication):
-
- def testCallConstructor(self):
- label = QLabel(
- frameStyle=QFrame.Panel | QFrame.Sunken,
- text="first line\nsecond line",
- alignment=Qt.AlignBottom | Qt.AlignRight
- )
- self.assertRaises(AttributeError, lambda: QLabel(
- somethingelse=42,
- text="first line\nsecond line",
- alignment=Qt.AlignBottom | Qt.AlignRight
- ))
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/decoratedslot_test.py b/sources/pyside2/tests/pysidetest/decoratedslot_test.py
deleted file mode 100644
index 3825f48ab..000000000
--- a/sources/pyside2/tests/pysidetest/decoratedslot_test.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from PySide2.QtCore import QObject
-from testbinding import TestObject
-
-class Receiver(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.called = False
-
- def ReceiverDecorator(func):
- def decoratedFunction(self, *args, **kw):
- func(self, *args, **kw)
- return decoratedFunction
-
- # This method with the same name of the internal decorated function
- # is here to test the binding capabilities.
- def decoratedFunction(self):
- pass
-
- @ReceiverDecorator
- def slot(self):
- self.called = True
-
-
-class DecoratedSlotTest(unittest.TestCase):
-
- def testCallingOfDecoratedSlot(self):
- obj = TestObject(0)
- receiver = Receiver()
- obj.staticMethodDouble.connect(receiver.slot)
- obj.emitStaticMethodDoubleSignal()
- self.assertTrue(receiver.called)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py b/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py
deleted file mode 100644
index 111d4ebbf..000000000
--- a/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from helper.usesqapplication import UsesQApplication
-from testbinding import TestView
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QStandardItem, QStandardItemModel
-from PySide2.QtWidgets import (QAbstractItemDelegate, QComboBox,
- QSpinBox, QStyledItemDelegate,
- QStyleOptionViewItem, QWidget)
-
-id_text = 'This is me'
-
-class DelegateDoesntKeepReferenceToEditor(QAbstractItemDelegate):
- def createEditor(self, parent, option, index):
- comboBox = QComboBox(parent)
- comboBox.addItem(id_text)
- return comboBox
-
-
-class DelegateKeepsReferenceToEditor(QAbstractItemDelegate):
- def __init__(self, parent=None):
- QAbstractItemDelegate.__init__(self, parent)
- self.comboBox = QComboBox()
- self.comboBox.addItem(id_text)
-
- def createEditor(self, parent, option, index):
- self.comboBox.setParent(parent)
- return self.comboBox
-
-
-class EditorCreatedByDelegateTest(UsesQApplication):
-
- def testDelegateDoesntKeepReferenceToEditor(self):
- view = TestView(None)
- delegate = DelegateDoesntKeepReferenceToEditor()
- view.setItemDelegate(delegate)
- editor = view.getEditorWidgetFromItemDelegate()
- self.assertEqual(type(editor), QComboBox)
- self.assertEqual(editor.count(), 1)
- self.assertEqual(editor.itemData(0, Qt.DisplayRole), id_text)
- editor.metaObject()
-
- def testDelegateKeepsReferenceToEditor(self):
- view = TestView(None)
- delegate = DelegateKeepsReferenceToEditor()
- view.setItemDelegate(delegate)
- editor = view.getEditorWidgetFromItemDelegate()
- self.assertEqual(type(editor), QComboBox)
- self.assertEqual(editor.count(), 1)
- self.assertEqual(editor.itemData(0, Qt.DisplayRole), id_text)
- editor.metaObject()
-
- def testIntDelegate(self):
- """PYSIDE-1250: When creating a QVariant, use int instead of long long
- for anything that fits into a int. Verify by checking that a spin
- box is created as item view editor for int."""
- item = QStandardItem()
- item.setData(123123, Qt.EditRole) # <-- QVariant conversion here
- model = QStandardItemModel()
- model.appendRow(item)
- style_option = QStyleOptionViewItem()
- delegate = QStyledItemDelegate()
- editor = delegate.createEditor(None, style_option, model.index(0, 0))
- self.assertEqual(type(editor), QSpinBox)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/embedding_test.py b/sources/pyside2/tests/pysidetest/embedding_test.py
deleted file mode 100644
index 1960838ff..000000000
--- a/sources/pyside2/tests/pysidetest/embedding_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of PySide2.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-# This test tests the embedding feature of PySide.
-# Normally, embedding is only used when necessary.
-# By setting the variable "pyside_uses_embedding",
-# we enforce usage of embedding.
-
-
-class EmbeddingTest(unittest.TestCase):
-
- # def test_pyside_normal(self):
- # import sys
- # self.assertFalse(hasattr(sys, "pyside_uses_embedding"))
- # import PySide2
- # # everything has to be imported
- # self.assertTrue("PySide2.support.signature" in sys.modules)
- # # there should be a variale in sys, now (no idea if set)
- # self.assertTrue(hasattr(sys, "pyside_uses_embedding"))
-
- # Unfortunately, I see no way how to shut things enough down
- # to trigger a second initiatization. Therefore, only one test :-/
- def test_pyside_embedding(self):
- import sys, os
- self.assertFalse(hasattr(sys, "pyside_uses_embedding"))
- sys.pyside_uses_embedding = "anything true"
- import PySide2
- # everything has to be imported
- self.assertTrue("PySide2.support.signature" in sys.modules)
- self.assertEqual(sys.pyside_uses_embedding, True)
- dn = os.path.dirname
- name = os.path.basename(dn(dn(dn(PySide2.support.signature.__file__))))
- self.assertTrue(name.startswith("embedded.") and name.endswith(".zip"))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/iterable_test.py b/sources/pyside2/tests/pysidetest/iterable_test.py
deleted file mode 100644
index c5685112d..000000000
--- a/sources/pyside2/tests/pysidetest/iterable_test.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-iterable_test.py
-
-This test checks that the Iterable protocol is implemented correctly.
-"""
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-from PySide2 import QtCore, QtGui
-
-try:
- import numpy as np
- have_numpy = True
-except ImportError:
- have_numpy = False
-
-class PySequenceTest(unittest.TestCase):
-
- def test_iterable(self):
- def gen(lis):
- for item in lis:
- if item == "crash":
- raise IndexError
- yield item
- # testing "pyseq_to_cpplist_conversion"
- testfunc = QtCore.QUrl.fromStringList
- # use a generator (iterable)
- self.assertEqual(testfunc(gen(["asd", "ghj"])),
- [PySide2.QtCore.QUrl('asd'), PySide2.QtCore.QUrl('ghj')])
- # use an iterator
- self.assertEqual(testfunc(iter(["asd", "ghj"])),
- [PySide2.QtCore.QUrl('asd'), PySide2.QtCore.QUrl('ghj')])
- self.assertRaises(IndexError, testfunc, gen(["asd", "crash", "ghj"]))
- # testing QMatrix4x4
- testfunc = QtGui.QMatrix4x4
- self.assertEqual(testfunc(gen(range(16))), testfunc(range(16)))
- # Note: The errormessage needs to be improved!
- # We should better get a ValueError
- self.assertRaises((TypeError, ValueError), testfunc, gen(range(15)))
- # All other matrix sizes:
- testfunc = QtGui.QMatrix2x2
- self.assertEqual(testfunc(gen(range(4))), testfunc(range(4)))
- testfunc = QtGui.QMatrix2x3
- self.assertEqual(testfunc(gen(range(6))), testfunc(range(6)))
-
- @unittest.skipUnless(have_numpy, "requires numpy")
- def test_iterable_numpy(self):
- # Demo for numpy: We create a unit matrix.
- num_mat = np.eye(4)
- num_mat.shape = 16
- unit = QtGui.QMatrix4x4(num_mat)
- self.assertEqual(unit, QtGui.QMatrix4x4())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/list_signal_test.py b/sources/pyside2/tests/pysidetest/list_signal_test.py
deleted file mode 100644
index d66ba7905..000000000
--- a/sources/pyside2/tests/pysidetest/list_signal_test.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestObject
-from PySide2.QtCore import QObject
-
-class ListConnectionTest(unittest.TestCase):
-
- def childrenChanged(self, children):
- self._child = children[0]
-
- def testConnection(self):
- o = TestObject(0)
- c = QObject()
- c.setObjectName("child")
- self._child = None
- o.childrenChanged.connect(self.childrenChanged)
- o.addChild(c)
- self.assertEqual(self._child.objectName(), "child")
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py
deleted file mode 100644
index d0b40cfa0..000000000
--- a/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' PYSIDE-315: https://bugreports.qt.io/browse/PYSIDE-315
- Test that all signals and slots of a class (including any mixin classes)
- are registered at type parsing time. Also test that the signal and slot
- indices do not change after signal connection or emission. '''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-class Mixin(object):
- mixinSignal = QtCore.Signal()
- def __init__(self, *args, **kwargs):
- super(Mixin,self).__init__(*args, **kwargs)
-
-class MixinTwo(Mixin):
- mixinTwoSignal = QtCore.Signal()
-
- def __init__(self, *args, **kwargs):
- super(MixinTwo,self).__init__(*args, **kwargs)
- self.mixinTwoSlotCalled = False
-
- @QtCore.Slot()
- def mixinTwoSlot(self):
- self.mixinTwoSlotCalled = True
-
-class MixinThree(object):
- mixinThreeSignal = QtCore.Signal()
-
- def __init__(self, *args, **kwargs):
- super(MixinThree,self).__init__(*args, **kwargs)
- self.mixinThreeSlotCalled = False
-
- @QtCore.Slot()
- def mixinThreeSlot(self):
- self.mixinThreeSlotCalled = True
-
-class Derived(Mixin, QtCore.QObject):
- derivedSignal = QtCore.Signal(str)
-
- def __init__(self):
- super(Derived,self).__init__()
- self.derivedSlotCalled = False
- self.derivedSlotString = ''
-
- @QtCore.Slot(str)
- def derivedSlot(self, theString):
- self.derivedSlotCalled = True
- self.derivedSlotString = theString
-
-class MultipleDerived(MixinTwo, MixinThree, Mixin, QtCore.QObject):
- derivedSignal = QtCore.Signal(str)
-
- def __init__(self):
- super(MultipleDerived,self).__init__()
- self.derivedSlotCalled = False
- self.derivedSlotString = ''
-
- @QtCore.Slot(str)
- def derivedSlot(self, theString):
- self.derivedSlotCalled = True
- self.derivedSlotString = theString
-
-
-class MixinTest(unittest.TestCase):
- def testMixinSignalSlotRegistration(self):
- obj = Derived()
- m = obj.metaObject()
-
- # Should contain 2 signals and 1 slot immediately after type parsing
- self.assertEqual(m.methodCount() - m.methodOffset(), 3)
-
- # Save method indices to check that they do not change
- methodIndices = {}
- for i in range(m.methodOffset(), m.methodCount()):
- signature = m.method(i).methodSignature()
- methodIndices[signature] = i
-
- # Check derivedSignal emission
- obj.derivedSignal.connect(obj.derivedSlot)
- obj.derivedSignal.emit('emit1')
- self.assertTrue(obj.derivedSlotCalled)
- obj.derivedSlotCalled = False
-
- # Check derivedSignal emission after mixingSignal connection
- self.outsideSlotCalled = False
- @QtCore.Slot()
- def outsideSlot():
- self.outsideSlotCalled = True
-
- obj.mixinSignal.connect(outsideSlot)
- obj.derivedSignal.emit('emit2')
- self.assertTrue(obj.derivedSlotCalled)
- self.assertFalse(self.outsideSlotCalled)
- obj.derivedSlotCalled = False
-
- # Check mixinSignal emission
- obj.mixinSignal.emit()
- self.assertTrue(self.outsideSlotCalled)
- self.assertFalse(obj.derivedSlotCalled)
- self.outsideSlotCalled = False
-
- # Check that method indices haven't changed.
- # Make sure to requery for the meta object, to check that a new one was not
- # created as a child of the old one.
- m = obj.metaObject()
- self.assertEqual(m.methodCount() - m.methodOffset(), 3)
- for i in range(m.methodOffset(), m.methodCount()):
- signature = m.method(i).methodSignature()
- self.assertEqual(methodIndices[signature], i)
-
-
- def testMixinSignalSlotRegistrationWithMultipleInheritance(self):
- obj = MultipleDerived()
- m = obj.metaObject()
-
- # Should contain 4 signals and 3 slots immediately after type parsing
- self.assertEqual(m.methodCount() - m.methodOffset(), 7)
-
- # Save method indices to check that they do not change
- methodIndices = {}
- for i in range(m.methodOffset(), m.methodCount()):
- signature = m.method(i).methodSignature()
- methodIndices[signature] = i
-
- # Check derivedSignal emission
- obj.derivedSignal.connect(obj.derivedSlot)
- obj.derivedSignal.emit('emit1')
- self.assertTrue(obj.derivedSlotCalled)
- self.assertFalse(obj.mixinTwoSlotCalled)
- self.assertFalse(obj.mixinThreeSlotCalled)
- obj.derivedSlotCalled = False
-
- # Check derivedSignal emission after mixinThreeSignal connection
- self.outsideSlotCalled = False
- @QtCore.Slot()
- def outsideSlot():
- self.outsideSlotCalled = True
-
- obj.mixinThreeSignal.connect(obj.mixinThreeSlot)
- obj.mixinThreeSignal.connect(outsideSlot)
- obj.derivedSignal.emit('emit2')
- self.assertTrue(obj.derivedSlotCalled)
- self.assertFalse(obj.mixinTwoSlotCalled)
- self.assertFalse(obj.mixinThreeSlotCalled)
- self.assertFalse(self.outsideSlotCalled)
- obj.derivedSlotCalled = False
-
- # Check mixinThreeSignal emission
- obj.mixinThreeSignal.emit()
- self.assertTrue(self.outsideSlotCalled)
- self.assertTrue(obj.mixinThreeSlotCalled)
- self.assertFalse(obj.derivedSlotCalled)
- self.assertFalse(obj.mixinTwoSlotCalled)
- self.outsideSlotCalled = False
- obj.mixinThreeSlotCalled = False
-
- # Check mixinTwoSignal emission
- obj.mixinTwoSignal.connect(obj.mixinTwoSlot)
- obj.mixinTwoSignal.emit()
- self.assertTrue(obj.mixinTwoSlotCalled)
- self.assertFalse(obj.mixinThreeSlotCalled)
- self.assertFalse(obj.derivedSlotCalled)
- self.assertFalse(self.outsideSlotCalled)
- obj.mixinTwoSlotCalled = False
-
- # Check mixinSignal emission
- obj.mixinSignal.connect(outsideSlot)
- obj.mixinSignal.emit()
- self.assertTrue(self.outsideSlotCalled)
- self.assertFalse(obj.mixinTwoSlotCalled)
- self.assertFalse(obj.mixinThreeSlotCalled)
- self.assertFalse(obj.derivedSlotCalled)
- self.outsideSlotCalled = False
-
- # Check that method indices haven't changed.
- # Make sure to requery for the meta object, to check that a new one was not
- # created as a child of the old one.
- m = obj.metaObject()
- self.assertEqual(m.methodCount() - m.methodOffset(), 7)
- for i in range(m.methodOffset(), m.methodCount()):
- signature = m.method(i).methodSignature()
- self.assertEqual(methodIndices[signature], i)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/modelview_test.py b/sources/pyside2/tests/pysidetest/modelview_test.py
deleted file mode 100644
index e9d376801..000000000
--- a/sources/pyside2/tests/pysidetest/modelview_test.py
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestView
-from PySide2.QtCore import QAbstractListModel, QObject, QModelIndex
-
-'''Tests model/view relationship.'''
-
-object_name = 'test object'
-
-class MyObject(QObject):
- pass
-
-class ListModelKeepsReference(QAbstractListModel):
- def __init__(self, parent=None):
- QAbstractListModel.__init__(self, parent)
- self.obj = MyObject()
- self.obj.setObjectName(object_name)
-
- def rowCount(self, parent=QModelIndex()):
- return 1
-
- def data(self, index, role):
- return self.obj
-
-class ListModelDoesntKeepsReference(QAbstractListModel):
- def rowCount(self, parent=QModelIndex()):
- return 1
-
- def data(self, index, role):
- obj = MyObject()
- obj.setObjectName(object_name)
- return obj
-
-class ListModelThatReturnsString(QAbstractListModel):
- def rowCount(self, parent=QModelIndex()):
- return 1
-
- def data(self, index, role):
- self.obj = 'string'
- return self.obj
-
-
-class ModelViewTest(unittest.TestCase):
-
- def testListModelDoesntKeepsReference(self):
- model = ListModelDoesntKeepsReference()
- view = TestView(model)
- obj = view.getData()
- self.assertEqual(type(obj), MyObject)
- self.assertEqual(obj.objectName(), object_name)
- obj.metaObject()
-
- def testListModelKeepsReference(self):
- model = ListModelKeepsReference()
- view = TestView(model)
- obj = view.getData()
- self.assertEqual(type(obj), MyObject)
- self.assertEqual(obj.objectName(), object_name)
-
- def testListModelThatReturnsString(self):
- model = ListModelThatReturnsString()
- view = TestView(model)
- obj = view.getData()
- self.assertEqual(type(obj), str)
- self.assertEqual(obj, 'string')
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py b/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py
deleted file mode 100644
index 1998376d7..000000000
--- a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py
+++ /dev/null
@@ -1,198 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import *
-for modname, mod in sys.modules.items():
- # Python 2 leaves "None" in the dict.
- if modname.startswith("PySide2.") and mod is not None:
- print("importing", modname)
- exec("import " + modname)
-
-# This test tests the existence and callability of the newly existing functions,
-# after the inheritance was made complete in the course of PYSIDE-331.
-
-new_functions = """
- PySide2.QtCore.QAbstractItemModel().parent()
- PySide2.QtCore.QAbstractListModel().parent()
- PySide2.QtCore.QAbstractTableModel().parent()
- PySide2.QtCore.QFile().resize(qint64)
- m = PySide2.QtCore.QMutex(); m.tryLock(); m.unlock() # prevent a message "QMutex: destroying locked mutex"
- PySide2.QtCore.QSortFilterProxyModel().parent()
- PySide2.QtCore.QTemporaryFile(tfarg).open(openMode)
-"""
-
-new_functions += """
- PySide2.QtGui.QStandardItemModel().insertColumn(int,qModelIndex)
- PySide2.QtGui.QStandardItemModel().parent()
- # PySide2.QtGui.QTextList(qTextDocument).setFormat(qTextFormat) # Segmentation fault: 11
- # PySide2.QtGui.QTextTable(qTextDocument).setFormat(qTextFormat) # Segmentation fault: 11
-""" if "PySide2.QtGui" in sys.modules else ""
-
-new_functions += """
- PySide2.QtWidgets.QAbstractItemView().update()
- PySide2.QtWidgets.QApplication.palette()
- PySide2.QtWidgets.QApplication.setFont(qFont)
- PySide2.QtWidgets.QApplication.setPalette(qPalette)
- PySide2.QtWidgets.QBoxLayout(direction).addWidget(qWidget)
- PySide2.QtWidgets.QColorDialog().open()
- PySide2.QtWidgets.QFileDialog().open()
- PySide2.QtWidgets.QFileSystemModel().index(int,int,qModelIndex)
- PySide2.QtWidgets.QFileSystemModel().parent()
- PySide2.QtWidgets.QFontDialog().open()
- PySide2.QtWidgets.QGestureEvent([]).accept()
- PySide2.QtWidgets.QGestureEvent([]).ignore()
- PySide2.QtWidgets.QGestureEvent([]).isAccepted()
- PySide2.QtWidgets.QGestureEvent([]).setAccepted(bool)
- # PySide2.QtWidgets.QGraphicsView().render(qPaintDevice,qPoint,qRegion,renderFlags) # QPaintDevice: NotImplementedError
- PySide2.QtWidgets.QGridLayout().addWidget(qWidget)
- PySide2.QtWidgets.QHeaderView(orientation).initStyleOption(qStyleOptionFrame)
- PySide2.QtWidgets.QInputDialog().open()
- PySide2.QtWidgets.QLineEdit().addAction(qAction)
- PySide2.QtWidgets.QListWidget().closePersistentEditor(qModelIndex)
- PySide2.QtWidgets.QListWidget().openPersistentEditor(qModelIndex)
- PySide2.QtWidgets.QMessageBox().open()
- PySide2.QtWidgets.QPlainTextEdit().find(findStr)
- PySide2.QtWidgets.QProgressDialog().open()
- PySide2.QtWidgets.QStackedLayout().widget()
- # PySide2.QtWidgets.QStylePainter().begin(qPaintDevice) # QPaintDevice: NotImplementedError
- PySide2.QtWidgets.QTableWidget().closePersistentEditor(qModelIndex)
- PySide2.QtWidgets.QTableWidget().openPersistentEditor(qModelIndex)
- PySide2.QtWidgets.QTextEdit().find(findStr)
- PySide2.QtWidgets.QTreeWidget().closePersistentEditor(qModelIndex)
- PySide2.QtWidgets.QTreeWidget().openPersistentEditor(qModelIndex)
- PySide2.QtWidgets.QWidget.find(quintptr)
-""" if "PySide2.QtWidgets" in sys.modules else ""
-
-new_functions += """
- # PySide2.QtPrintSupport.QPageSetupDialog().open() # Segmentation fault: 11
- # PySide2.QtPrintSupport.QPrintDialog().open() # opens the dialog, but works
- PySide2.QtPrintSupport.QPrintDialog().printer()
- PySide2.QtPrintSupport.QPrintPreviewDialog().open() # note: this prints something, but really shouldn't ;-)
-""" if "PySide2.QtPrintSupport" in sys.modules else ""
-
-new_functions += """
- PySide2.QtHelp.QHelpContentModel().parent()
- # PySide2.QtHelp.QHelpIndexModel().createIndex(int,int,quintptr) # returned NULL without setting an error
- # PySide2.QtHelp.QHelpIndexModel().createIndex(int,int,object()) # returned NULL without setting an error
-""" if "PySide2.QtHelp" in sys.modules else ""
-
-new_functions += """
- PySide2.QtQuick.QQuickPaintedItem().update()
-""" if "PySide2.QtQuick" in sys.modules else ""
-
-
-class MainTest(unittest.TestCase):
-
- def testNewInheriedFunctionsExist(self):
- """
- Run all new method signarures
- """
- for app in "QtWidgets.QApplication", "QtGui.QGuiApplication", "QtCore.QCoreApplication":
- try:
- exec("qApp = PySide2.{0}([]) or PySide2.{0}.instance()".format(app))
- break
- except AttributeError:
- continue
- bool = True
- int = 42
- qint64 = 42
- tfarg = os.path.join(PySide2.QtCore.QDir.tempPath(), "XXXXXX.tmp")
- findStr = 'bla'
- orientation = PySide2.QtCore.Qt.Orientation()
- openMode = PySide2.QtCore.QIODevice.OpenMode(PySide2.QtCore.QIODevice.ReadOnly)
- qModelIndex = PySide2.QtCore.QModelIndex()
- transformationMode = PySide2.QtCore.Qt.TransformationMode()
- qObject = PySide2.QtCore.QObject()
- qPoint = PySide2.QtCore.QPoint()
- try:
- PySide2.QtGui
- #qPaintDevice = PySide2.QtGui.QPaintDevice() # NotImplementedError
- qTextDocument = PySide2.QtGui.QTextDocument()
- qTextFormat = PySide2.QtGui.QTextFormat()
- quintptr = 42
- qFont = PySide2.QtGui.QFont()
- qPalette = PySide2.QtGui.QPalette()
- except AttributeError:
- pass
- try:
- PySide2.QtWidgets
- direction = PySide2.QtWidgets.QBoxLayout.Direction()
- qWidget = PySide2.QtWidgets.QWidget()
- qStyleOptionFrame = PySide2.QtWidgets.QStyleOptionFrame()
- qAction = PySide2.QtGui.QAction(qObject)
- renderFlags = PySide2.QtWidgets.QWidget.RenderFlags
- except AttributeError:
- pass
-
- for func in new_functions.splitlines():
- func = func.strip()
- if func.startswith("#"):
- # this is a crashing or otherwise untestable function
- print(func)
- continue
- try:
- exec(func)
- except NotImplementedError:
- print(func, "# raises NotImplementedError")
- else:
- print(func)
-
- def testQAppSignatures(self):
- """
- Verify that qApp.palette owns three signatures, especially
- palette() without argument.
- """
- try:
- qApp = (PySide2.QtWidgets.QApplication.instance() or
- PySide2.QtWidgets.QApplication([]))
- except AttributeError:
- unittest.TestCase().skipTest("this test makes only sense if QtWidgets is available.")
- try:
- PySide2.QtWidgets.QApplication.palette(42) # raises
- except TypeError as e:
- lines = e.args[0].splitlines()
- heading_pos = lines.index("Supported signatures:")
- lines = lines[heading_pos+1:]
- self.assertEqual(len(lines), 3)
- txt = '\n'.join(lines)
- print("Signatures found:")
- print(txt)
- self.assertTrue("palette()" in txt)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/notify_id.py b/sources/pyside2/tests/pysidetest/notify_id.py
deleted file mode 100644
index 393736a65..000000000
--- a/sources/pyside2/tests/pysidetest/notify_id.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal, Property, Slot
-
-'''Tests that the signal notify id of a property is correct, aka corresponds to the initially set
-notify method.'''
-
-class Foo(QObject):
- def __init__(self):
- QObject.__init__(self)
- self._prop = "Empty"
-
- def getProp(self):
- return self._prop
-
- def setProp(self, value):
- if value != self._prop:
- self._prop = value
- self.propChanged.emit()
-
- # Inside the dynamic QMetaObject, the methods have to be sorted, so that this slot comes
- # after any signals. That means the property notify id has to be updated, to have the correct
- # relative method id.
- @Slot()
- def randomSlot():
- pass
-
- propChanged = Signal()
- prop = Property(str, getProp, setProp, notify=propChanged)
-
-class NotifyIdSignal(unittest.TestCase):
- def setUp(self):
- self.obj = Foo()
-
- def tearDown(self):
- del self.obj
-
- def testSignalEmission(self):
- metaObject = self.obj.metaObject()
- propertyIndex = metaObject.indexOfProperty("prop")
- property = metaObject.property(propertyIndex)
-
- signalIndex = property.notifySignalIndex()
- signal = metaObject.method(signalIndex)
- signalName = signal.name()
- self.assertEqual(signalName, "propChanged")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/properties_test.py b/sources/pyside2/tests/pysidetest/properties_test.py
deleted file mode 100644
index cedfac8d1..000000000
--- a/sources/pyside2/tests/pysidetest/properties_test.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QStringListModel, Signal, Property, Slot
-
-"""Tests PySide2.QtCore.Property()"""
-
-
-class TestObject(QObject):
-
- valueChanged = Signal()
-
- def __init__(self, parent=None):
- super(TestObject, self).__init__(parent)
- self._value = -1
- self.valueChanged.connect(self._changed)
- self.getter_called = 0
- self.setter_called = 0
- self.changed_emitted = 0
-
- @Slot(int)
- def _changed(self):
- self.changed_emitted += 1
-
- def getValue(self):
- self.getter_called += 1
- return self._value
-
- def setValue(self, value):
- self.setter_called += 1
- if (self._value != value):
- self._value = value
- self.valueChanged.emit()
-
- value = Property(int, fget=getValue, fset=setValue,
- notify=valueChanged)
-
-
-class TestDerivedObject(QStringListModel):
-
- valueChanged = Signal()
-
- def __init__(self, parent=None):
- super(TestDerivedObject, self).__init__(parent)
- self._value = -1
- self.valueChanged.connect(self._changed)
- self.getter_called = 0
- self.setter_called = 0
- self.changed_emitted = 0
-
- @Slot(int)
- def _changed(self):
- self.changed_emitted += 1
-
- def getValue(self):
- self.getter_called += 1
- return self._value
-
- def setValue(self, value):
- self.setter_called += 1
- if (self._value != value):
- self._value = value
- self.valueChanged.emit()
-
- value = Property(int, fget=getValue, fset=setValue,
- notify=valueChanged)
-
-
-class PropertyTest(unittest.TestCase):
-
- def test1Object(self):
- """Basic property test."""
- testObject = TestObject()
- v = testObject.value
- self.assertEqual(v, -1)
- self.assertEqual(testObject.getter_called, 1)
- testObject.value = 42
- v = testObject.value
- self.assertEqual(v, 42)
- self.assertEqual(testObject.changed_emitted, 1)
- self.assertEqual(testObject.setter_called, 1)
- self.assertEqual(testObject.getter_called, 2)
-
- def test2DerivedObject(self):
- """PYSIDE-1255: Run the same test for a class inheriting QObject."""
- testObject = TestDerivedObject()
- v = testObject.value
- self.assertEqual(v, -1)
- self.assertEqual(testObject.getter_called, 1)
- testObject.value = 42
- v = testObject.value
- self.assertEqual(v, 42)
- self.assertEqual(testObject.changed_emitted, 1)
- self.assertEqual(testObject.setter_called, 1)
- self.assertEqual(testObject.getter_called, 2)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/property_python_test.py b/sources/pyside2/tests/pysidetest/property_python_test.py
deleted file mode 100644
index 443977c90..000000000
--- a/sources/pyside2/tests/pysidetest/property_python_test.py
+++ /dev/null
@@ -1,231 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-Test for PySide's Property
-==========================
-
-This test is copied from Python's `test_property.py` and adapted to
-the PySide Property implementation.
-
-This test is to ensure maximum compatibility.
-"""
-
-# Test case for property
-# more tests are in test_descr
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import Property, QObject
-#from PyQt5.QtCore import pyqtProperty as Property, QObject
-
-# This are the original imports.
-import sys
-import unittest
-has_test = False
-try:
- from test import support
- has_test = True
-except ImportError:
- pass
-
-class PropertyBase(Exception):
- pass
-
-class PropertyGet(PropertyBase):
- pass
-
-class PropertySet(PropertyBase):
- pass
-
-class PropertyDel(PropertyBase):
- pass
-
-class BaseClass(QObject):
- def __init__(self):
- QObject.__init__(self)
-
- self._spam = 5
-
- @Property(object)
- def spam(self):
- """BaseClass.getter"""
- return self._spam
-
- @spam.setter
- def spam(self, value):
- self._spam = value
-
- @spam.deleter
- def spam(self):
- del self._spam
-
-class SubClass(BaseClass):
-
- @BaseClass.spam.getter
- def spam(self):
- """SubClass.getter"""
- raise PropertyGet(self._spam)
-
- @spam.setter
- def spam(self, value):
- raise PropertySet(self._spam)
-
- @spam.deleter
- def spam(self):
- raise PropertyDel(self._spam)
-
-class PropertyDocBase(object):
- _spam = 1
- def _get_spam(self):
- return self._spam
- spam = Property(object, _get_spam, doc="spam spam spam")
-
-class PropertyDocSub(PropertyDocBase):
- @PropertyDocBase.spam.getter
- def spam(self):
- """The decorator does not use this doc string"""
- return self._spam
-
-class PropertySubNewGetter(BaseClass):
- @BaseClass.spam.getter
- def spam(self):
- """new docstring"""
- return 5
-
-class PropertyNewGetter(QObject):
- def __init__(self):
- QObject.__init__(self)
-
- @Property(object)
- def spam(self):
- """original docstring"""
- return 1
- @spam.getter
- def spam(self):
- """new docstring"""
- return 8
-
-class PropertyTests(unittest.TestCase):
- def test_property_decorator_baseclass(self):
- # see #1620
- base = BaseClass()
- self.assertEqual(base.spam, 5)
- self.assertEqual(base._spam, 5)
- base.spam = 10
- self.assertEqual(base.spam, 10)
- self.assertEqual(base._spam, 10)
- delattr(base, "spam")
- self.assertTrue(not hasattr(base, "spam"))
- self.assertTrue(not hasattr(base, "_spam"))
- base.spam = 20
- self.assertEqual(base.spam, 20)
- self.assertEqual(base._spam, 20)
-
- def test_property_decorator_subclass(self):
- # see #1620
- sub = SubClass()
- self.assertRaises(PropertyGet, getattr, sub, "spam")
- self.assertRaises(PropertySet, setattr, sub, "spam", None)
- self.assertRaises(PropertyDel, delattr, sub, "spam")
-
- @unittest.skipIf(sys.flags.optimize >= 2,
- "Docstrings are omitted with -O2 and above")
- def test_property_decorator_subclass_doc(self):
- sub = SubClass()
- self.assertEqual(sub.__class__.spam.__doc__, "SubClass.getter")
-
- @unittest.skipIf(sys.flags.optimize >= 2,
- "Docstrings are omitted with -O2 and above")
- def test_property_decorator_baseclass_doc(self):
- base = BaseClass()
- self.assertEqual(base.__class__.spam.__doc__, "BaseClass.getter")
-
- def test_property_decorator_doc(self):
- base = PropertyDocBase()
- sub = PropertyDocSub()
- self.assertEqual(base.__class__.spam.__doc__, "spam spam spam")
- self.assertEqual(sub.__class__.spam.__doc__, "spam spam spam")
-
- @unittest.skipIf(sys.flags.optimize >= 2,
- "Docstrings are omitted with -O2 and above")
- def test_property_getter_doc_override(self):
- newgettersub = PropertySubNewGetter()
- self.assertEqual(newgettersub.spam, 5)
- self.assertEqual(newgettersub.__class__.spam.__doc__, "new docstring")
- newgetter = PropertyNewGetter()
- self.assertEqual(newgetter.spam, 8)
- self.assertEqual(newgetter.__class__.spam.__doc__, "new docstring")
-
- @unittest.skipIf(sys.flags.optimize >= 2,
- "Docstrings are omitted with -O2 and above")
- def test_property_builtin_doc_writable(self):
- p = Property(object, doc='basic')
- self.assertEqual(p.__doc__, 'basic')
- p.__doc__ = 'extended'
- self.assertEqual(p.__doc__, 'extended')
-
- @unittest.skipIf(sys.flags.optimize >= 2,
- "Docstrings are omitted with -O2 and above")
- def test_property_decorator_doc_writable(self):
- class PropertyWritableDoc(object):
-
- @Property(object)
- def spam(self):
- """Eggs"""
- return "eggs"
-
- sub = PropertyWritableDoc()
- self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
- sub.__class__.spam.__doc__ = 'Spam'
- self.assertEqual(sub.__class__.spam.__doc__, 'Spam')
-
- if has_test: # This test has no support in Python 2
- @support.refcount_test
- def test_refleaks_in___init__(self):
- gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
- fake_prop = Property(object, 'fget', 'fset', "freset", 'fdel', 'doc')
- refs_before = gettotalrefcount()
- for i in range(100):
- fake_prop.__init__(object, 'fget', 'fset', "freset", 'fdel', 'doc')
- self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
-
-
-# Note: We ignore the whole subclass tests concerning __doc__ strings.
-# See the original Python test starting with:
-# "Issue 5890: subclasses of property do not preserve method __doc__ strings"
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py b/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py
deleted file mode 100644
index bfcf40111..000000000
--- a/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2
-
-# This test tests the new "macro" feature of qApp.
-# It also uses the qApp variable to finish the instance and start over.
-
-# Note: this test makes qapplication_singleton_test.py obsolete.
-
-class qAppMacroTest(unittest.TestCase):
- _test_1093_is_first = True
-
- def test_qApp_is_like_a_macro_and_can_restart(self):
- self._test_1093_is_first = False
- from PySide2 import QtCore
- try:
- from PySide2 import QtGui, QtWidgets
- except ImportError:
- QtWidgets = QtGui = QtCore
- # qApp is in the builtins
- self.assertEqual(bool(qApp), False)
- # and the type is None
- self.assertTrue(qApp is None)
- # now we create an application for all cases
- classes = (QtCore.QCoreApplication,
- QtGui.QGuiApplication,
- QtWidgets.QApplication)
- for klass in classes:
- print("created", klass([]))
- qApp.shutdown()
- print("deleted qApp", qApp)
- # creating without deletion raises:
- QtCore.QCoreApplication([])
- with self.assertRaises(RuntimeError):
- QtCore.QCoreApplication([])
- self.assertEqual(QtCore.QCoreApplication.instance(), qApp)
-
- def test_1093(self):
- # Test that without creating a QApplication staticMetaObject still exists.
- # Please see https://bugreports.qt.io/browse/PYSIDE-1093 for explanation.
- # Note: This test must run first, otherwise we would be mislead!
- assert self._test_1093_is_first
- from PySide2 import QtCore
- self.assertTrue(QtCore.QObject.staticMetaObject is not None)
- app = QtCore.QCoreApplication.instance()
- self.assertTrue(QtCore.QObject.staticMetaObject is not None)
- if app is None:
- app = QtCore.QCoreApplication([])
- self.assertTrue(QtCore.QObject.staticMetaObject is not None)
- qApp.shutdown()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/qvariant_test.py b/sources/pyside2/tests/pysidetest/qvariant_test.py
deleted file mode 100644
index 547cca441..000000000
--- a/sources/pyside2/tests/pysidetest/qvariant_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestObject
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QKeySequence
-
-from helper.usesqapplication import UsesQApplication
-
-class QVariantTest(UsesQApplication):
-
- def testQKeySequenceQVariantOperator(self):
- # bug #775
- ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
- self.assertEqual(TestObject.checkType(ks), 4107)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/signal_slot_warning.py b/sources/pyside2/tests/pysidetest/signal_slot_warning.py
deleted file mode 100644
index a54974c3b..000000000
--- a/sources/pyside2/tests/pysidetest/signal_slot_warning.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' PYSIDE-315: https://bugreports.qt.io/browse/PYSIDE-315
- Test that creating a signal in the wrong order triggers a warning. '''
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-import warnings
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import PySide2.QtCore as QtCore
-
-
-class Whatever(QtCore.QObject):
- echoSignal = QtCore.Signal(str)
-
- def __init__(self):
- super(Whatever, self).__init__()
- self.echoSignal.connect(self.mySlot)
-
- def mySlot(self, v):
- pass
-
-class WarningTest(unittest.TestCase):
- def testSignalSlotWarning(self):
- # we create an object. This gives no warning.
- obj = Whatever()
- # then we insert a signal after slots have been created.
- setattr(Whatever, "foo", QtCore.Signal())
- with warnings.catch_warnings(record=True) as w:
- # Cause all warnings to always be triggered.
- warnings.simplefilter("always")
- # Trigger a warning.
- obj.foo.connect(obj.mySlot)
- # Verify some things
- assert issubclass(w[-1].category, RuntimeWarning)
- assert "*** Sort Warning ***" in str(w[-1].message)
- # note that this warning cannot be turned into an error (too hard)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/signal_tp_descr_get_test.py b/sources/pyside2/tests/pysidetest/signal_tp_descr_get_test.py
deleted file mode 100644
index 61ad8b730..000000000
--- a/sources/pyside2/tests/pysidetest/signal_tp_descr_get_test.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""
-PYSIDE-68: Test that signals have a `__get__` function after all.
-
-We supply a `tp_descr_get` slot for the signal type.
-That creates the `__get__` method via `PyType_Ready`.
-
-The original test script was converted to a unittest.
-See https://bugreports.qt.io/browse/PYSIDE-68 .
-
-Created: 16 May '12 21:25
-Updated: 17 Sep '20 17:02
-
-This fix was over 8 years late. :)
-"""
-
-from __future__ import print_function
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-def emit_upon_success(signal):
- def f_(f):
- def f__(self):
- result = f(self)
- s = signal.__get__(self)
- print(result)
- return result
- return f__
- return f_
-
-
-class Foo(QtCore.QObject):
- SIG = QtCore.Signal()
-
- @emit_upon_success(SIG)
- def do_something(self):
- print("hooka, it worrrks")
- return 42
-
-
-class UnderUnderGetUnderUnderTest(unittest.TestCase):
- def test_tp_descr_get(self):
- foo = Foo()
- ret = foo.do_something()
- self.assertEqual(ret, 42)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py b/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py
deleted file mode 100644
index ed7302c69..000000000
--- a/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestObject
-from PySide2.QtCore import QObject, SIGNAL
-
-'''Tests the behaviour of signals with default values when emitted from Python.'''
-
-class SignalEmissionFromPython(unittest.TestCase):
-
- def setUp(self):
- self.obj1 = TestObject(0)
- self.obj2 = TestObject(0)
- self.one_called = 0
- self.two_called = 0
-
- def tearDown(self):
- del self.obj1
- del self.obj2
- del self.one_called
- del self.two_called
-
- def testConnectNewStyleEmitVoidSignal(self):
- def callbackOne():
- self.one_called += 1
- self.obj2.signalWithDefaultValue.emit()
- def callbackTwo():
- self.two_called += 1
- self.obj1.signalWithDefaultValue.connect(callbackOne)
- self.obj2.signalWithDefaultValue.connect(callbackTwo)
- self.obj1.emitSignalWithDefaultValue_void()
- self.obj2.emitSignalWithDefaultValue_void()
- self.assertEqual(self.one_called, 1)
- self.assertEqual(self.two_called, 2)
-
- def testConnectOldStyleEmitVoidSignal(self):
- def callbackOne():
- self.one_called += 1
- self.obj2.signalWithDefaultValue.emit()
- def callbackTwo():
- self.two_called += 1
- QObject.connect(self.obj1, SIGNAL('signalWithDefaultValue()'), callbackOne)
- QObject.connect(self.obj2, SIGNAL('signalWithDefaultValue()'), callbackTwo)
- self.obj1.emitSignalWithDefaultValue_void()
- self.obj2.emitSignalWithDefaultValue_void()
- self.assertEqual(self.one_called, 1)
- self.assertEqual(self.two_called, 2)
-
- def testConnectNewStyleEmitBoolSignal(self):
- def callbackOne():
- self.one_called += 1
- self.obj2.signalWithDefaultValue[bool].emit(True)
- def callbackTwo():
- self.two_called += 1
- self.obj1.signalWithDefaultValue.connect(callbackOne)
- self.obj2.signalWithDefaultValue.connect(callbackTwo)
- self.obj1.emitSignalWithDefaultValue_void()
- self.obj2.emitSignalWithDefaultValue_void()
- self.assertEqual(self.one_called, 1)
- self.assertEqual(self.two_called, 2)
-
- def testConnectOldStyleEmitBoolSignal(self):
- def callbackOne():
- self.one_called += 1
- self.obj2.signalWithDefaultValue[bool].emit(True)
- def callbackTwo():
- self.two_called += 1
- QObject.connect(self.obj1, SIGNAL('signalWithDefaultValue()'), callbackOne)
- QObject.connect(self.obj2, SIGNAL('signalWithDefaultValue()'), callbackTwo)
- self.obj1.emitSignalWithDefaultValue_void()
- self.obj2.emitSignalWithDefaultValue_void()
- self.assertEqual(self.one_called, 1)
- self.assertEqual(self.two_called, 2)
-
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py b/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py
deleted file mode 100644
index fc13fc0d9..000000000
--- a/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from testbinding import TestObject
-from PySide2.QtCore import QObject, SIGNAL
-
-'''Tests the behaviour of signals with default values.'''
-
-class SignalWithDefaultValueTest(unittest.TestCase):
-
- def setUp(self):
- self.obj = TestObject(0)
- self.void_called = False
- self.bool_called = False
-
- def tearDown(self):
- del self.obj
- del self.void_called
- del self.bool_called
-
- def testConnectNewStyleEmitVoidSignal(self):
- def callbackVoid():
- self.void_called = True
- def callbackBool(value):
- self.bool_called = True
- self.obj.signalWithDefaultValue.connect(callbackVoid)
- self.obj.signalWithDefaultValue[bool].connect(callbackBool)
- self.obj.emitSignalWithDefaultValue_void()
- self.assertTrue(self.void_called)
- self.assertTrue(self.bool_called)
-
- def testConnectNewStyleEmitBoolSignal(self):
- def callbackVoid():
- self.void_called = True
- def callbackBool(value):
- self.bool_called = True
- self.obj.signalWithDefaultValue.connect(callbackVoid)
- self.obj.signalWithDefaultValue[bool].connect(callbackBool)
- self.obj.emitSignalWithDefaultValue_bool()
- self.assertTrue(self.void_called)
- self.assertTrue(self.bool_called)
-
- def testConnectOldStyleEmitVoidSignal(self):
- def callbackVoid():
- self.void_called = True
- def callbackBool(value):
- self.bool_called = True
- QObject.connect(self.obj, SIGNAL('signalWithDefaultValue()'), callbackVoid)
- QObject.connect(self.obj, SIGNAL('signalWithDefaultValue(bool)'), callbackBool)
- self.obj.emitSignalWithDefaultValue_void()
- self.assertTrue(self.void_called)
- self.assertTrue(self.bool_called)
-
- def testConnectOldStyleEmitBoolSignal(self):
- def callbackVoid():
- self.void_called = True
- def callbackBool(value):
- self.bool_called = True
- QObject.connect(self.obj, SIGNAL('signalWithDefaultValue()'), callbackVoid)
- QObject.connect(self.obj, SIGNAL('signalWithDefaultValue(bool)'), callbackBool)
- self.obj.emitSignalWithDefaultValue_bool()
- self.assertTrue(self.void_called)
- self.assertTrue(self.bool_called)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/pysidetest/typedef_signal_test.py b/sources/pyside2/tests/pysidetest/typedef_signal_test.py
deleted file mode 100644
index ecbfa35d4..000000000
--- a/sources/pyside2/tests/pysidetest/typedef_signal_test.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from PySide2.QtCore import QObject
-from testbinding import TestObject
-
-class Receiver(QObject):
-
- def __init__(self):
- QObject.__init__(self)
- self.received = None
-
- def slot(self, value):
- self.received = value
-
-class TypedefSignal(unittest.TestCase):
-
- def testTypedef(self):
- obj = TestObject(0)
- receiver = Receiver()
-
- obj.signalWithTypedefValue.connect(receiver.slot)
- obj.emitSignalWithTypedefValue(2)
- self.assertEqual(receiver.received.value, 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/version_test.py b/sources/pyside2/tests/pysidetest/version_test.py
deleted file mode 100644
index 5cc34d8c3..000000000
--- a/sources/pyside2/tests/pysidetest/version_test.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import __version_info__, __version__, QtCore
-
-class CheckForVariablesTest(unittest.TestCase):
- def testVesions(self):
- version_tuple = (__version_info__[0], __version_info__[1], __version_info__[2])
- self.assertTrue(version_tuple >= (1, 0, 0))
-
- self.assertTrue(version_tuple < (99, 99, 99))
- self.assertTrue(__version__)
-
- self.assertTrue(QtCore.__version_info__ >= (4, 5, 0))
- self.assertTrue(QtCore.__version__)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py
deleted file mode 100644
index c8185b140..000000000
--- a/sources/pyside2/tests/registry/existence_test.py
+++ /dev/null
@@ -1,253 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-"""
-existence_test.py
------------------
-
-A test that checks all function signatures if they still exist.
-
-Definition of the rules used:
-=============================
-
-Any entry
----------
-
- Exists in file Exists in Binary Result
- + + ok
- + - error
- - + ok
-
-List entry
-----------
-
- Arity in file Arity in Binary Result
- n n ok
- n < n error
- n > n ok
-
-"""
-
-import os
-import re
-import sys
-from textwrap import dedent
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_all_test_paths
-init_all_test_paths()
-
-from init_platform import enum_all, generate_all
-from util import (isolate_warnings, check_warnings, suppress_warnings, warn,
- is_ci, qt_version, get_script_dir, get_effective_refpath,
- get_refpath, import_refmodule)
-from PySide2 import *
-
-refPath = get_refpath()
-effectiveRefPath = get_effective_refpath()
-pyc = os.path.splitext(effectiveRefPath)[0] + ".pyc"
-if os.path.exists(pyc) and not os.path.exists(effectiveRefPath):
- # on Python2 the pyc file would be imported
- os.unlink(pyc)
-
-if refPath != effectiveRefPath:
- print("*** Falling back to ", effectiveRefPath, " since expected ",
- refPath, " does not exist")
-
-script_dir = get_script_dir()
-shortpath = os.path.relpath(effectiveRefPath, script_dir)
-try:
- sig_exists = import_refmodule()
- print("found:", shortpath)
- have_refmodule = True
-except ImportError:
- print("*** not found:", shortpath)
- have_refmodule = False
-except SyntaxError:
- print("*** not a python file, removed:", shortpath)
- os.unlink(effectiveRefPath)
- have_refmodule = False
-except NameError as e:
- if "recreate" in e.args[0]:
- print("*** explicit request to recreate:", shortpath)
- else:
- print("*** unexpected NameError:", e, "- creating", shortpath)
- os.unlink(effectiveRefPath)
- have_refmodule = False
-dict_name = "sig_dict"
-if have_refmodule and not hasattr(sig_exists, dict_name):
- print(f"*** wrong module without '{dict_name}', removed: {shortpath}")
- os.unlink(effectiveRefPath)
- have_refmodule = False
-
-
-@unittest.skipIf(not have_refmodule,
- "not activated for this platform or version")
-class TestSignaturesExists(unittest.TestCase):
- """
- This is the current simple attempt to support a signature self test.
- You can activate it for your platform by supplying your own reference
- file. Simply run init_platform.py and add the generated file to the
- repository.
- """
-
- @staticmethod
- def _do_the_test(found_sigs):
-
- def multi_signature_msg(key, actual, expect):
- len_act = len(actual) if type(actual) is list else 1
- len_exp = len(expect) if type(expect) is list else 1
- return (f"multi-signature count mismatch for '{key}'. "
- f"Actual {len_act} {actual} vs. expected {len_exp} {expect}")
-
- for key, value in sig_exists.sig_dict.items():
- name = key.rsplit(".", 1)[-1]
- if name in ("next", "__next__"): # ignore problematic cases
- continue
- if "<" in key:
- # Skip over remaining crap in "<...>"
- continue
- if key.startswith("sample.SampleNamespace"):
- # We cannot work with sample namespaces after the change to __qualname__.
- continue
- if (key.startswith("smart.SharedPtr") or
- re.match(r"PySide2\..*?\.QSharedPointer_", key)):
- # These mangled names are not supported.
- # We should fix them.
- continue
- if key not in found_sigs:
- warn("missing key: '{} value={}'".format(key, value), stacklevel=3)
- else:
- found_val = found_sigs[key]
- if type(value) is list and (
- type(found_val) is tuple or
- len(found_val) < len(value)):
- # We check that nothing got lost. But it is ok when an older
- # registry file does not know all variants, yet!
- warn(multi_signature_msg(key, found_val, value), stacklevel=3)
-
- def test_signatures(self):
- found_sigs = enum_all()
- with isolate_warnings():
- self._do_the_test(found_sigs)
- if is_ci and check_warnings():
- raise RuntimeError("There are errors, see above.")
-
- def test_error_is_raised(self):
- found_sigs = enum_all()
- # Make sure that errors are actually raised.
- search = list(found_sigs.keys())
- pos = 42 # arbitrary and historycal, could be 0 as well
-
- # We try all variants:
- while type(found_sigs[search[pos]]) is not tuple:
- pos += 1
- tuple_key = search[pos]
- while type(found_sigs[search[pos]]) is not list:
- pos += 1
- list_key = search[pos]
-
- test_sigs = found_sigs.copy()
- test_sigs.pop(tuple_key)
- with isolate_warnings(), suppress_warnings():
- self._do_the_test(test_sigs)
- self.assertTrue(check_warnings(), "you warn about too few entries")
-
- test_sigs = found_sigs.copy()
- test_sigs["whatnot"] = ("nothing", "real")
- with isolate_warnings(), suppress_warnings():
- self._do_the_test(test_sigs)
- self.assertFalse(check_warnings(), "you ignore too many entries")
-
- test_sigs = found_sigs.copy()
- repl = test_sigs[list_key]
- repl.pop(0)
- test_sigs[list_key] = repl
- with isolate_warnings(), suppress_warnings():
- self._do_the_test(test_sigs)
- # An arity that is now missing is an error.
- self.assertTrue(check_warnings(), "you warn when arity got smaller")
-
- test_sigs = found_sigs.copy()
- repl = test_sigs[list_key]
- repl = repl[0]
- assert type(repl) is tuple
- test_sigs[list_key] = repl
- with isolate_warnings(), suppress_warnings():
- self._do_the_test(test_sigs)
- # An arity that is now missing is an error.
- self.assertTrue(check_warnings(), "you warn when list degraded to tuple")
-
- test_sigs = found_sigs.copy()
- repl = test_sigs[list_key]
- repl = repl + repl
- test_sigs[list_key] = repl
- with isolate_warnings(), suppress_warnings():
- self._do_the_test(test_sigs)
- # More arities are ignored, because we might test an older version.
- self.assertFalse(check_warnings(), "you ignore when arity got bigger")
-
-
-tested_versions = (5, 6), (5, 9), (5, 11), (5, 12), (5, 14)
-
-if not have_refmodule and is_ci and qt_version()[:2] in tested_versions:
- class TestFor_CI_Init(unittest.TestCase):
- """
- This helper class generates the reference file for CI.
- It creates an output listing that can be used to check
- the result back in.
- """
- generate_all()
- sys.stderr.flush()
- print("BEGIN_FILE", shortpath, file=sys.stderr)
- with open(refPath) as f:
- print(f.read(), file=sys.stderr)
- print("END_FILE", shortpath, file=sys.stderr)
- sys.stderr.flush()
- raise RuntimeError(dedent("""
- {line}
- ** This is the initial call. You should check this file in:
- ** {}
- **""").format(shortpath, line=79 * "*"))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py
deleted file mode 100644
index e4b8d9cc3..000000000
--- a/sources/pyside2/tests/registry/init_platform.py
+++ /dev/null
@@ -1,255 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-"""
-init_platform.py
-
-Existence registry
-==================
-
-This is a registry for all existing function signatures.
-One file is generated with all signatures of a platform and version.
-
-The scope has been extended to generate all signatures from the
-shiboken and pysidetest projects.
-"""
-
-import sys
-import os
-from contextlib import contextmanager
-from textwrap import dedent
-from util import get_refpath, get_script_dir
-
-def qt_build():
- result = '<Unknown build of Qt>'
- try:
- from PySide2.QtCore import QLibraryInfo
- result = QLibraryInfo.build()
- except:
- pass
- return result
-
-script_dir = get_script_dir()
-history_dir = os.path.join(script_dir, 'build_history')
-
-# Find out if we have the build dir, already. Then use it.
-look_for = os.path.join("pyside2", "tests", "pysidetest")
-have_build_dir = [x for x in sys.path if x.endswith(look_for)]
-if have_build_dir:
- all_build_dir = os.path.normpath(os.path.join(have_build_dir[0], "..", "..", ".."))
-elif os.path.exists(history_dir):
- # Using the last build to find the build dir.
- # Note: This is not reliable when building in parallel!
- last_build = max(x for x in os.listdir(history_dir) if x.startswith("20"))
- fpath = os.path.join(history_dir, last_build, "build_dir.txt")
- if os.path.exists(fpath):
- with open(fpath) as f:
- f_contents = f.read().strip()
- f_contents_split = f_contents.splitlines()
- try:
- all_build_dir = f_contents_split[0]
- except IndexError:
- print("Error: can't find the build dir in the given file '{}'".format(fpath))
- sys.exit(1)
-else:
- print(dedent("""
- Can't find the build dir in the history.
- Compile again and don't forget to specify "--build-tests".
- """))
- sys.exit(1)
-
-if not os.path.exists(os.path.join(all_build_dir, look_for)):
- print(dedent("""
- PySide has not been built with tests enabled.
- Compile again and don't forget to specify "--build-tests".
- """))
- sys.exit(1)
-
-pyside_build_dir = os.path.join(all_build_dir, "pyside2")
-shiboken_build_dir = os.path.join(all_build_dir, "shiboken6")
-
-# now we compute all paths:
-def set_ospaths(build_dir):
- ps = os.pathsep
- ospath_var = "PATH" if sys.platform == "win32" else "LD_LIBRARY_PATH"
- old_val = os.environ.get(ospath_var, "")
- lib_path = [os.path.join(build_dir, "pyside2", "libpyside"),
- os.path.join(build_dir, "pyside2", "tests", "pysidetest"),
- os.path.join(build_dir, "shiboken6", "tests", "libminimal"),
- os.path.join(build_dir, "shiboken6", "tests", "libsample"),
- os.path.join(build_dir, "shiboken6", "tests", "libother"),
- os.path.join(build_dir, "shiboken6", "tests", "libsmart"),
- os.path.join(build_dir, "shiboken6", "libshiboken")]
- ospath = ps.join(lib_path + old_val.split(ps))
- os.environ[ospath_var] = ospath
-
-set_ospaths(all_build_dir)
-sys.path[:0] = [os.path.join(shiboken_build_dir, "shibokenmodule"),
- pyside_build_dir]
-
-import PySide2
-
-all_modules = list("PySide2." + _ for _ in PySide2.__all__)
-
-# now we should be able to do all imports:
-if not have_build_dir:
- sys.path.insert(0, os.path.join(pyside_build_dir, "tests", "pysidetest"))
-import testbinding
-all_modules.append("testbinding")
-
-# Note: This is not the shiboken dir as usual, but the binary.
-import shiboken6 as Shiboken
-Shiboken.__name__ = "Shiboken"
-sys.modules["Shiboken"] = sys.modules.pop("shiboken6")
-all_modules.append("Shiboken")
-
-# 'sample/smart' are needed by 'other', so import them first.
-for modname in "minimal sample smart other".split():
- sys.path.insert(0, os.path.join(shiboken_build_dir, "tests", modname + "binding"))
- __import__(modname)
- all_modules.append(modname)
-
-from shibokensupport.signature.lib.enum_sig import SimplifyingEnumerator
-
-# Make sure not to get .pyc in Python2.
-sourcepath = os.path.splitext(__file__)[0] + ".py"
-
-
-class Formatter(object):
- """
- Formatter is formatting the signature listing of an enumerator.
-
- It is written as context managers in order to avoid many callbacks.
- The separation in formatter and enumerator is done to keep the
- unrelated tasks of enumeration and formatting apart.
- """
- def __init__(self, outfile):
- self.outfile = outfile
- self.last_level = 0
-
- def print(self, *args, **kw):
- print(*args, file=self.outfile, **kw) if self.outfile else None
-
- @contextmanager
- def module(self, mod_name):
- self.print(f"")
- self.print(f"# Module {mod_name}")
- self.print(f"sig_dict.update({{")
- yield
- self.print(f' }}) if "{mod_name}" in sys.modules else None')
-
- @contextmanager
- def klass(self, class_name, class_str):
- self.print()
- self.print(f"# class {self.mod_name}.{class_name}:")
- yield
-
- @contextmanager
- def function(self, func_name, signature):
- if self.last_level > self.level:
- self.print()
- self.last_level = self.level
- class_name = self.class_name
- if class_name is None:
- key = viskey = f"{self.mod_name}.{func_name}"
- else:
- key = viskey = f"{self.mod_name}.{class_name}.{func_name}"
- if key.endswith("lY"):
- # Some classes like PySide2.QtGui.QContextMenuEvent have functions
- # globalX and the same with Y. The gerrit robot thinks that this
- # is a badly written "globally". Convince it by hiding this word.
- viskey = viskey[:-1] + '""Y'
- self.print(f' "{viskey}": {signature},')
- yield key
-
-
-def enum_all():
- fmt = Formatter(None)
- enu = SimplifyingEnumerator(fmt)
- ret = enu.result_type()
- for mod_name in all_modules:
- ret.update(enu.module(mod_name))
- return ret
-
-
-def generate_all():
- refPath = get_refpath()
- module = os.path.basename(os.path.splitext(refPath)[0])
- with open(refPath, "w") as outfile, open(sourcepath) as f:
- fmt = Formatter(outfile)
- enu = SimplifyingEnumerator(fmt)
- lines = f.readlines()
- license_line = next((lno for lno, line in enumerate(lines)
- if "$QT_END_LICENSE$" in line))
- fmt.print("#recreate # uncomment this to enforce generation")
- fmt.print("".join(lines[:license_line + 3]))
- version = sys.version.replace('\n', ' ')
- build = qt_build()
- fmt.print(dedent(f'''\
- """
- This file contains the simplified signatures for all functions in PySide
- for module '{module}' using
- Python {version}
- {build}
-
- There are no default values, no variable names and no self
- parameter. Only types are present after simplification. The
- functions 'next' resp. '__next__' are removed to make the output
- identical for Python 2 and 3. '__div__' is also removed,
- since it exists in Python 2, only.
- """
- '''))
- fmt.print("import sys")
- fmt.print("")
- fmt.print("sig_dict = {}")
- for mod_name in all_modules:
- enu.module(mod_name)
- fmt.print("# eof")
-
-
-def __main__():
- print("+++ generating {}. You should probably check this file in."
- .format(get_refpath()))
- generate_all()
-
-
-if __name__ == "__main__":
- __main__()
diff --git a/sources/pyside2/tests/registry/util.py b/sources/pyside2/tests/registry/util.py
deleted file mode 100644
index 612ed253f..000000000
--- a/sources/pyside2/tests/registry/util.py
+++ /dev/null
@@ -1,181 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2017 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function, absolute_import
-
-"""
-Supporting isolation of warnings
-
-Warnings in unittests are not isolated.
-We sometimes use warnings to conveniently accumulate error messages
-and eventually report them afterwards as error.
-"""
-
-import sys
-import os
-import warnings
-import re
-from contextlib import contextmanager
-
-warn_name = "__warningregistry__"
-ignore_re = 'Not importing directory .*'
-
-@contextmanager
-def isolate_warnings():
- save_warnings = {}
- for name, mod in sys.modules.items():
- if mod and hasattr(mod, warn_name):
- save_warnings[name] = mod.__dict__[warn_name]
- delattr(mod, warn_name)
- else:
- save_warnings[name] = None
- yield
- for name, warn in save_warnings.items():
- mod = sys.modules[name]
- if mod:
- setattr(mod, warn_name, warn)
- if warn is None:
- delattr(mod, warn_name)
-
-@contextmanager
-def suppress_warnings():
- with warnings.catch_warnings():
- warnings.simplefilter("ignore")
- yield
-
-def check_warnings():
- for name, mod in sys.modules.items():
- if mod:
- reg = getattr(mod, warn_name, None)
- if reg:
- # XXX We need to filter warnings for Python 2.
- # This should be avoided by renaming the duplicate folders.
- for k in reg:
- if type(k) is tuple and re.match(ignore_re, k[0]):
- continue
- return True
- return False
-
-def warn(message, category=None, stacklevel=2):
- """Issue a warning with the default 'RuntimeWarning'"""
- if category is None:
- category = UserWarning
- warnings.warn(message, category, stacklevel)
-
-
-def linux_distribution():
- """Returns the Linux distribution"""
- # We have to be more specific because we had differences between
- # RHEL 6.6 and RHEL 7.4 .
- # Note: The platform module is deprecated. We need to switch to the
- # distro package, ASAP! The distro has been extracted from Python,
- # because it changes more often than the Python version.
- distribution = []
- try:
- import distro
- distribution = distro.linux_distribution()
- except ImportError:
- # platform.linux_distribution() was removed in 3.8
- if sys.version_info[:2] < (3, 8):
- import platform
- distribution = platform.linux_distribution()
- if distribution:
- return "".join(distribution[:2]).lower()
- warnings.warn('Cannot determine Linux distribution, please install distro',
- UserWarning)
- return ""
-
-
-# Python2 legacy: Correct 'linux2' to 'linux', recommended way.
-if sys.platform.startswith('linux'):
- platform_name = linux_distribution()
- # this currently happens on opensuse in 5.14:
- if not platform_name:
- # We intentionally crash when that last resort is also absent:
- platform_name = os.environ["MACHTYPE"]
- platform_name = re.sub('[^0-9a-z]', '_', platform_name)
-else:
- platform_name = sys.platform
-# In the linux case, we need more information.
-
-is_py3 = sys.version_info[0] == 3
-is_ci = os.environ.get("QTEST_ENVIRONMENT", "") == "ci"
-
-def get_script_dir():
- script_dir = os.path.normpath(os.path.dirname(__file__))
- while "sources" not in os.listdir(script_dir):
- script_dir = os.path.dirname(script_dir)
- return script_dir
-
-def qt_version():
- from PySide2.QtCore import __version__
- return tuple(map(int, __version__.split(".")))
-
-# Format a registry file name for version.
-def _registry_filename(version, use_ci_module):
- name = "exists_{}_{}_{}_{}{}.py".format(platform_name,
- version[0], version[1], version[2], "_ci" if use_ci_module else "")
- return os.path.join(os.path.dirname(__file__), name)
-
-# Return the expected registry file name.
-def get_refpath(use_ci_module=is_ci):
- return _registry_filename(qt_version(), use_ci_module)
-
-# Return the registry file name, either that of the current
-# version or fall back to a previous patch release.
-def get_effective_refpath(use_ci_module=is_ci):
- refpath = get_refpath(use_ci_module)
- if os.path.exists(refpath):
- return refpath
- version = qt_version()
- major, minor, patch = version[:3]
- while patch >= 0:
- file = _registry_filename((major, minor, patch), use_ci_module)
- if os.path.exists(file):
- return file
- patch -= 1
- return refpath
-
-# Import the CI version of the platform module
-def import_refmodule(use_ci_module=is_ci):
- refpath = get_effective_refpath(use_ci_module)
- modname = os.path.basename(os.path.splitext(refpath)[0])
- return __import__(modname)
-
-# eof
diff --git a/sources/pyside2/tests/signals/args_dont_match_test.py b/sources/pyside2/tests/signals/args_dont_match_test.py
deleted file mode 100644
index 732706ac0..000000000
--- a/sources/pyside2/tests/signals/args_dont_match_test.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-class ArgsDontMatch(unittest.TestCase):
-
- def callback(self, arg1):
- self.ok = True
-
- def testConnectSignalToSlotWithLessArgs(self):
- self.ok = False
- obj1 = QObject()
- QObject.connect(obj1, SIGNAL('the_signal(int, int, int)'), self.callback)
- obj1.emit(SIGNAL('the_signal(int, int, int)'), 1, 2, 3)
-
- self.assertTrue(self.ok)
-
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/bug_189.py b/sources/pyside2/tests/signals/bug_189.py
deleted file mode 100644
index 6492f0359..000000000
--- a/sources/pyside2/tests/signals/bug_189.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore, QtWidgets
-from helper.usesqapplication import UsesQApplication
-
-class TestBugPYSIDE189(UsesQApplication):
-
- def testDisconnect(self):
- # Disconnecting from a signal owned by a destroyed object
- # should raise an exception, not segfault.
- def onValueChanged(self, value):
- pass
-
- sld = QtWidgets.QSlider()
- sld.valueChanged.connect(onValueChanged)
-
- sld.deleteLater()
-
- QtCore.QTimer.singleShot(0, self.app.quit)
- self.app.exec_()
-
- self.assertRaises(RuntimeError, sld.valueChanged.disconnect, onValueChanged)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/bug_311.py b/sources/pyside2/tests/signals/bug_311.py
deleted file mode 100644
index c9782741d..000000000
--- a/sources/pyside2/tests/signals/bug_311.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class DerivedDate(QtCore.QDate):
- def __init__(self,y,m,d):
- super(DerivedDate,self).__init__(y,m,d)
-
-class Emitter(QtCore.QObject):
- dateSignal1 = QtCore.Signal(QtCore.QDate)
- dateSignal2 = QtCore.Signal(DerivedDate)
- tupleSignal = QtCore.Signal(tuple)
-
-class SignaltoSignalTest(UsesQCoreApplication):
- def myCb(self, dt):
- self._dt = dt
-
- def testBug(self):
- e = Emitter()
- d = DerivedDate(2010,8,24)
- self._dt = None
- e.dateSignal1.connect(self.myCb)
- e.dateSignal1.emit(d)
- self.assertEqual(self._dt, d)
-
- self._dt = None
- e.dateSignal2.connect(self.myCb)
- e.dateSignal2.emit(d)
- self.assertEqual(self._dt, d)
-
- myTuple = (5, 6, 7)
- self._dt = None
- e.tupleSignal.connect(self.myCb)
- e.tupleSignal.emit(myTuple)
- self.assertEqual(myTuple, self._dt)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/bug_312.py b/sources/pyside2/tests/signals/bug_312.py
deleted file mode 100644
index 1b6eabe7e..000000000
--- a/sources/pyside2/tests/signals/bug_312.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-MAX_LOOPS = 5
-MAX_OBJECTS = 200
-
-class Dummy(object):
- def __init__(self, parent):
- self._parent = parent
-
- def callback(self):
- self._called = True
-
-class MultipleSlots(unittest.TestCase):
- def myCB(self):
- self._count += 1
-
- """
- def testUnboundSignal(self):
- o = QObject()
- self._count = 0
- for i in range(MAX_OBJECTS):
- QObject.connect(o, SIGNAL("fire()"), lambda: self.myCB())
-
- o.emit(SIGNAL("fire()"))
- self.assertEqual(self._count, MAX_OBJECTS)
-
- """
- def testDisconnectCleanup(self):
- for c in range(MAX_LOOPS):
- self._count = 0
- self._senders = []
- for i in range(MAX_OBJECTS):
- o = QObject()
- QObject.connect(o, SIGNAL("fire()"), lambda: self.myCB())
- self._senders.append(o)
- o.emit(SIGNAL("fire()"))
-
- self.assertEqual(self._count, MAX_OBJECTS)
-
- #delete all senders will disconnect the signals
- self._senders = []
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/signals/bug_319.py b/sources/pyside2/tests/signals/bug_319.py
deleted file mode 100644
index 17cd8abcf..000000000
--- a/sources/pyside2/tests/signals/bug_319.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class Listener(QtCore.QObject):
- def __init__(self):
- QtCore.QObject.__init__(self, None)
- self._phrase = []
-
- @QtCore.Slot(tuple)
- def listen(self, words):
- for w in words:
- self._phrase.append(w)
-
-class Communicate(QtCore.QObject):
- # create a new signal on the fly and name it 'speak'
- speak = QtCore.Signal(tuple)
-
-class SignaltoSignalTest(UsesQCoreApplication):
- def testBug(self):
- someone = Communicate()
- someone2 = Listener()
- # connect signal and slot
- someone.speak.connect(someone2.listen)
- # emit 'speak' signal
- talk = ("one","two","three")
- someone.speak.emit(talk)
- self.assertEqual(someone2._phrase, list(talk))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/bug_79.py b/sources/pyside2/tests/signals/bug_79.py
deleted file mode 100644
index ca25fb3f4..000000000
--- a/sources/pyside2/tests/signals/bug_79.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-import os
-import gc
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtGui, QtWidgets
-
-try:
- from sys import gettotalrefcount
- skiptest = False
-except ImportError:
- skiptest = True
-
-class ConnectTest(unittest.TestCase):
-
- def callback(self, o):
- print("callback")
- self._called = o
-
- def testNoLeaks_ConnectAndDisconnect(self):
- self._called = None
- app = QtWidgets.QApplication([])
- o = QtWidgets.QTreeView()
- o.setModel(QtGui.QStandardItemModel())
- o.selectionModel().destroyed.connect(self.callback)
- o.selectionModel().destroyed.disconnect(self.callback)
- gc.collect()
- # if this is no debug build, then we check at least that
- # we do not crash any longer.
- if not skiptest:
- total = gettotalrefcount()
- for idx in range(1000):
- o.selectionModel().destroyed.connect(self.callback)
- o.selectionModel().destroyed.disconnect(self.callback)
- gc.collect()
- if not skiptest:
- delta = gettotalrefcount() - total
- print("delta total refcount =", delta)
- self.assertTrue(abs(delta) < 10)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/decorators_test.py b/sources/pyside2/tests/signals/decorators_test.py
deleted file mode 100644
index e262f0bce..000000000
--- a/sources/pyside2/tests/signals/decorators_test.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Slot, SIGNAL, SLOT
-
-class MyObject(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self._slotCalledCount = 0
-
- @Slot()
- def mySlot(self):
- self._slotCalledCount = self._slotCalledCount + 1
-
- @Slot(int)
- @Slot('QString')
- def mySlot2(self, arg0):
- self._slotCalledCount = self._slotCalledCount + 1
-
- @Slot(name='mySlot3')
- def foo(self):
- self._slotCalledCount = self._slotCalledCount + 1
-
- @Slot(str, int)
- def mySlot4(self, a, b):
- self._slotCalledCount = self._slotCalledCount + 1
-
- @Slot(result=int)
- def mySlot5(self):
- self._slotCalledCount = self._slotCalledCount + 1
-
- @Slot(result=QObject)
- def mySlot6(self):
- self._slotCalledCount = self._slotCalledCount + 1
-
-class StaticMetaObjectTest(unittest.TestCase):
-
- def testSignalPropagation(self):
- o = MyObject()
- m = o.metaObject()
- self.assertTrue(m.indexOfSlot('mySlot()') > 0)
- self.assertTrue(m.indexOfSlot('mySlot2(int)') > 0)
- self.assertTrue(m.indexOfSlot('mySlot2(QString)') > 0)
- self.assertTrue(m.indexOfSlot('mySlot3()') > 0)
- self.assertTrue(m.indexOfSlot('mySlot4(QString,int)') > 0)
-
- def testEmission(self):
- o = MyObject()
- o.connect(SIGNAL("mySignal()"), o, SLOT("mySlot()"))
- o.emit(SIGNAL("mySignal()"))
- self.assertTrue(o._slotCalledCount == 1)
-
- def testResult(self):
- o = MyObject()
- mo = o.metaObject()
- i = mo.indexOfSlot('mySlot5()')
- m = mo.method(i)
- self.assertEqual(m.typeName(), "int")
-
- def testResultObject(self):
- o = MyObject()
- mo = o.metaObject()
- i = mo.indexOfSlot('mySlot6()')
- m = mo.method(i)
- self.assertEqual(m.typeName(), "QObject*")
-
-class SlotWithoutArgs(unittest.TestCase):
-
- def testError(self):
- # It should be an error to call the slot without the
- # arguments, as just @Slot would end up in a slot
- # accepting argument functions
- self.assertRaises(TypeError, Slot, lambda: 3)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/disconnect_test.py b/sources/pyside2/tests/signals/disconnect_test.py
deleted file mode 100644
index 6242e9e38..000000000
--- a/sources/pyside2/tests/signals/disconnect_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(True)
-
-from PySide2.QtCore import *
-from testbinding import TestObject
-
-
-class Foo(QObject):
- bar = Signal()
-
-class TestDisconnect(unittest.TestCase):
- def theSlot1(self):
- self.called1 = True
-
- def theSlot2(self):
- self.called2 = True
-
- def testIt(self):
- self.called1 = False
- self.called2 = False
- f = Foo()
- f.bar.connect(self.theSlot1)
- f.bar.connect(self.theSlot2)
- f.bar.emit()
- self.assertTrue(self.called1)
- self.assertTrue(self.called2)
-
- self.called1 = False
- self.called2 = False
- f.bar.disconnect()
- f.bar.emit()
- self.assertFalse(self.called1)
- self.assertFalse(self.called2)
-
- def testDuringCallback(self):
- """ Test to see if the C++ object for a connection is accessed after the
- method returns. This causes a segfault if the memory that was used by the
- C++ object has been reused. """
-
- self.called = False
- obj = TestObject(0)
- def callback():
- obj.signalWithDefaultValue.disconnect(callback)
-
- # Connect more callbacks to try to overwrite memory
- for i in range(1000):
- obj.signalWithDefaultValue.connect(lambda: None)
-
- self.called = True
-
- # A non-None return value is needed
- return True
- obj.signalWithDefaultValue.connect(callback)
- obj.signalWithDefaultValue.emit()
- self.assertTrue(self.called)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/invalid_callback_test.py b/sources/pyside2/tests/signals/invalid_callback_test.py
deleted file mode 100644
index 442720baa..000000000
--- a/sources/pyside2/tests/signals/invalid_callback_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for passing invalid callbacks to QObject.connect'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-class InvalidCallback(unittest.TestCase):
- '''Test case for passing an invalid callback to QObject.connect'''
-
- def setUp(self):
- #Acquire resources
- self.obj = QObject()
-
- def tearDown(self):
- #Release resources
- try:
- del self.obj
- except AttributeError:
- pass
-
- def testIntegerCb(self):
- #Test passing an int as callback to QObject.connect
- self.assertRaises(TypeError, QObject.connect, self.obj,
- SIGNAL('destroyed()'), 42)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/lambda_gui_test.py b/sources/pyside2/tests/signals/lambda_gui_test.py
deleted file mode 100644
index 843b4037f..000000000
--- a/sources/pyside2/tests/signals/lambda_gui_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Connecting lambda to gui signals'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-try:
- from PySide2.QtWidgets import QSpinBox, QPushButton
- hasQtGui = True
-except ImportError:
- hasQtGui = False
-
-from helper.usesqapplication import UsesQApplication
-
-if hasQtGui:
- class Control:
- def __init__(self):
- self.arg = False
-
- class QtGuiSigLambda(UsesQApplication):
-
- def testButton(self):
- #Connecting a lambda to a QPushButton.clicked()
- obj = QPushButton('label')
- ctr = Control()
- func = lambda: setattr(ctr, 'arg', True)
- QObject.connect(obj, SIGNAL('clicked()'), func)
- obj.click()
- self.assertTrue(ctr.arg)
- QObject.disconnect(obj, SIGNAL('clicked()'), func)
-
-
- def testSpinButton(self):
- #Connecting a lambda to a QPushButton.clicked()
- obj = QSpinBox()
- ctr = Control()
- arg = 444
- func = lambda x: setattr(ctr, 'arg', 444)
- QObject.connect(obj, SIGNAL('valueChanged(int)'), func)
- obj.setValue(444)
- self.assertEqual(ctr.arg, arg)
- QObject.disconnect(obj, SIGNAL('valueChanged(int)'), func)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/lambda_test.py b/sources/pyside2/tests/signals/lambda_test.py
deleted file mode 100644
index f01096150..000000000
--- a/sources/pyside2/tests/signals/lambda_test.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Connecting lambda to signals'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, QProcess
-
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class Dummy(QObject):
-
- def __init__(self, *args):
- super(Dummy, self).__init__(*args)
-
-
-class BasicCase(unittest.TestCase):
-
- def testSimplePythonSignalNoArgs(self):
- #Connecting a lambda to a simple python signal without arguments
- obj = Dummy()
- QObject.connect(obj, SIGNAL('foo()'),
- lambda: setattr(obj, 'called', True))
- obj.emit(SIGNAL('foo()'))
- self.assertTrue(obj.called)
-
- def testSimplePythonSignal(self):
- #Connecting a lambda to a simple python signal witharguments
- obj = Dummy()
- arg = 42
- QObject.connect(obj, SIGNAL('foo(int)'),
- lambda x: setattr(obj, 'arg', 42))
- obj.emit(SIGNAL('foo(int)'), arg)
- self.assertEqual(obj.arg, arg)
-
-
-class QtSigLambda(UsesQCoreApplication):
-
- qapplication = True
-
- def testNoArgs(self):
- '''Connecting a lambda to a signal without arguments'''
- proc = QProcess()
- dummy = Dummy()
- QObject.connect(proc, SIGNAL('started()'),
- lambda: setattr(dummy, 'called', True))
- proc.start(sys.executable, ['-c', '""'])
- proc.waitForFinished()
- self.assertTrue(dummy.called)
-
- def testWithArgs(self):
- '''Connecting a lambda to a signal with arguments'''
- proc = QProcess()
- dummy = Dummy()
- QObject.connect(proc, SIGNAL('finished(int)'),
- lambda x: setattr(dummy, 'called', x))
- proc.start(sys.executable, ['-c', '""'])
- proc.waitForFinished()
- self.assertEqual(dummy.called, proc.exitCode())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/leaking_signal_test.py b/sources/pyside2/tests/signals/leaking_signal_test.py
deleted file mode 100644
index 705d16075..000000000
--- a/sources/pyside2/tests/signals/leaking_signal_test.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-import weakref
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-
-class LeakingSignal(unittest.TestCase):
-
- def testLeakingSignal(self):
- # Was segfaulting when the signal was garbage collected.
- class Emitter(QtCore.QObject):
- my_signal = QtCore.Signal(object)
-
- emitter = Emitter()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/multiple_connections_gui_test.py b/sources/pyside2/tests/signals/multiple_connections_gui_test.py
deleted file mode 100644
index 4429c49f4..000000000
--- a/sources/pyside2/tests/signals/multiple_connections_gui_test.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from functools import partial
-import os
-import random
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-try:
- from PySide2.QtWidgets import QPushButton, QSpinBox
- hasQtGui = True
-except ImportError:
- hasQtGui = False
-
-from helper.basicpyslotcase import BasicPySlotCase
-from helper.usesqapplication import UsesQApplication
-
-class MultipleSignalConnections(unittest.TestCase):
- '''Base class for multiple signal connection testing'''
-
- def run_many(self, sender, signal, emitter, receivers, args=None):
- """Utility method to connect a list of receivers to a signal.
- sender - QObject that will emit the signal
- signal - string with the signal signature
- emitter - the callable that will trigger the signal
- receivers - list of BasicPySlotCase instances
- args - tuple with the arguments to be sent.
- """
-
- if args is None:
- args = tuple()
-
- for rec in receivers:
- rec.setUp()
- QObject.connect(sender, SIGNAL(signal), rec.cb)
- rec.args = tuple(args)
-
- emitter(*args)
-
- for rec in receivers:
- self.assertTrue(rec.called)
-
-
-if hasQtGui:
- class QtGuiMultipleSlots(UsesQApplication, MultipleSignalConnections):
- '''Multiple connections to QtGui signals'''
-
- def testButtonClick(self):
- """Multiple connections to QPushButton.clicked()"""
- sender = QPushButton('button')
- receivers = [BasicPySlotCase() for x in range(30)]
- self.run_many(sender, 'clicked()', sender.click, receivers)
-
- def testSpinBoxValueChanged(self):
- """Multiple connections to QSpinBox.valueChanged(int)"""
- sender = QSpinBox()
- #FIXME if number of receivers if higher than 50, segfaults
- receivers = [BasicPySlotCase() for x in range(10)]
- self.run_many(sender, 'valueChanged(int)', sender.setValue,
- receivers, (1,))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/multiple_connections_test.py b/sources/pyside2/tests/signals/multiple_connections_test.py
deleted file mode 100644
index a8f5bcd9d..000000000
--- a/sources/pyside2/tests/signals/multiple_connections_test.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from functools import partial
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, QProcess
-
-from helper.basicpyslotcase import BasicPySlotCase
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class MultipleSignalConnections(unittest.TestCase):
- '''Base class for multiple signal connection testing'''
-
- def run_many(self, sender, signal, emitter, receivers, args=None):
- """Utility method to connect a list of receivers to a signal.
- sender - QObject that will emit the signal
- signal - string with the signal signature
- emitter - the callable that will trigger the signal
- receivers - list of BasicPySlotCase instances
- args - tuple with the arguments to be sent.
- """
-
- if args is None:
- args = tuple()
- for rec in receivers:
- rec.setUp()
- self.assertTrue(QObject.connect(sender, SIGNAL(signal), rec.cb))
- rec.args = tuple(args)
-
- emitter(*args)
-
- for rec in receivers:
- self.assertTrue(rec.called)
-
-
-class PythonMultipleSlots(UsesQCoreApplication, MultipleSignalConnections):
- '''Multiple connections to python signals'''
-
- def testPythonSignal(self):
- """Multiple connections to a python signal (short-circuit)"""
-
- class Dummy(QObject):
- pass
-
- sender = Dummy()
- receivers = [BasicPySlotCase() for x in range(10)]
- self.run_many(sender, 'foobar(int)', partial(sender.emit,SIGNAL('foobar(int)')), receivers, (0, ))
-
-
-class QProcessMultipleSlots(UsesQCoreApplication, MultipleSignalConnections):
- '''Multiple connections to QProcess signals'''
-
- def testQProcessStarted(self):
- '''Multiple connections to QProcess.started()'''
- sender = QProcess()
- receivers = [BasicPySlotCase() for x in range(10)]
-
- def start_proc(*args):
- sender.start(sys.executable, ['-c', '""'])
- sender.waitForFinished()
-
- self.run_many(sender, 'started()', start_proc, receivers)
-
- def testQProcessFinished(self):
- '''Multiple connections to QProcess.finished(int)'''
- sender = QProcess()
- receivers = [BasicPySlotCase() for x in range(10)]
-
- def start_proc(*args):
- sender.start(sys.executable, ['-c', '""'])
- sender.waitForFinished()
-
- self.run_many(sender, 'finished(int)', start_proc, receivers, (0,))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/pysignal_test.py b/sources/pyside2/tests/signals/pysignal_test.py
deleted file mode 100644
index 5561671c4..000000000
--- a/sources/pyside2/tests/signals/pysignal_test.py
+++ /dev/null
@@ -1,221 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT, Qt
-
-try:
- from PySide2.QtWidgets import QSpinBox, QApplication, QWidget
- hasQtGui = True
-except ImportError:
- hasQtGui = False
-
-from helper.usesqapplication import UsesQApplication
-
-class Dummy(QObject):
- """Dummy class used in this test."""
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
-
- def callDummy(self):
- self.emit(SIGNAL("dummy(PyObject)"), "PyObject")
-
- def callDummy2(self):
- lst = []
- lst.append("item1")
- lst.append("item2")
- lst.append("item3")
- self.emit(SIGNAL("dummy2(PyObject, PyObject)"), "PyObject0", lst)
-
-
-class PyObjectType(UsesQApplication):
- def mySlot(self, arg):
- self.assertEqual(arg, "PyObject")
- self.called = True
- self.callCount += 1
-
- def mySlot2(self, arg0, arg1):
- self.assertEqual(arg0, "PyObject0")
- self.assertEqual(arg1[0], "item1")
- self.assertEqual(arg1[1], "item2")
- self.assertEqual(arg1[2], "item3")
- self.callCount += 1
- if self.running:
- self.app.quit()
-
- def setUp(self):
- super(PyObjectType, self).setUp()
- self.callCount = 0
- self.running = False
-
- def testWithOneArg(self):
- o = Dummy()
- o.connect(SIGNAL("dummy(PyObject)"), self.mySlot)
- o.callDummy()
- self.assertEqual(self.callCount, 1)
-
- def testWithTwoArg(self):
- o = Dummy()
- o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2)
- o.callDummy2()
- self.assertEqual(self.callCount, 1)
-
- def testAsyncSignal(self):
- self.called = False
- self.running = True
- o = Dummy()
- o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2, Qt.QueuedConnection)
- o.callDummy2()
- self.app.exec_()
- self.assertEqual(self.callCount, 1)
-
- def testTwice(self):
- self.called = False
- self.running = True
- o = Dummy()
- o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2, Qt.QueuedConnection)
- o.callDummy2()
- o.callDummy2()
- self.app.exec_()
- self.assertEqual(self.callCount, 2)
-
-class PythonSigSlot(unittest.TestCase):
- def setUp(self):
- self.called = False
-
- def tearDown(self):
- try:
- del self.args
- except:
- pass
-
- def callback(self, *args):
- if tuple(self.args) == args:
- self.called = True
-
- def testNoArgs(self):
- """Python signal and slots without arguments"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo()'), self.callback)
- self.args = tuple()
- obj1.emit(SIGNAL('foo()'), *self.args)
-
- self.assertTrue(self.called)
-
- def testWithArgs(self):
- """Python signal and slots with integer arguments"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
- self.args = (42,)
- obj1.emit(SIGNAL('foo(int)'), *self.args)
-
- self.assertTrue(self.called)
-
-
- def testDisconnect(self):
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
- QObject.disconnect(obj1, SIGNAL('foo(int)'), self.callback)
-
- self.args = (42, )
- obj1.emit(SIGNAL('foo(int)'), *self.args)
-
- self.assertTrue(not self.called)
-
-
-if hasQtGui:
- class SpinBoxPySignal(UsesQApplication):
- """Tests the connection of python signals to QSpinBox qt slots."""
-
- def setUp(self):
- super(SpinBoxPySignal, self).setUp()
- self.obj = Dummy()
- self.spin = QSpinBox()
- self.spin.setValue(0)
-
- def tearDown(self):
- super(SpinBoxPySignal, self).tearDown()
- del self.obj
- del self.spin
-
- def testValueChanged(self):
- """Emission of a python signal to QSpinBox setValue(int)"""
- QObject.connect(self.obj, SIGNAL('dummy(int)'), self.spin, SLOT('setValue(int)'))
- self.assertEqual(self.spin.value(), 0)
-
- self.obj.emit(SIGNAL('dummy(int)'), 4)
- self.assertEqual(self.spin.value(), 4)
-
- def testValueChangedMultiple(self):
- """Multiple emissions of a python signal to QSpinBox setValue(int)"""
- QObject.connect(self.obj, SIGNAL('dummy(int)'), self.spin, SLOT('setValue(int)'))
- self.assertEqual(self.spin.value(), 0)
-
- self.obj.emit(SIGNAL('dummy(int)'), 4)
- self.assertEqual(self.spin.value(), 4)
-
- self.obj.emit(SIGNAL('dummy(int)'), 77)
- self.assertEqual(self.spin.value(), 77)
-
-
-if hasQtGui:
- class WidgetPySignal(UsesQApplication):
- """Tests the connection of python signals to QWidget qt slots."""
-
- def setUp(self):
- super(WidgetPySignal, self).setUp()
- self.obj = Dummy()
- self.widget = QWidget()
-
- def tearDown(self):
- super(WidgetPySignal, self).tearDown()
- del self.obj
- del self.widget
-
- def testShow(self):
- """Emission of a python signal to QWidget slot show()"""
- self.widget.hide()
-
- QObject.connect(self.obj, SIGNAL('dummy()'), self.widget, SLOT('show()'))
- self.assertTrue(not self.widget.isVisible())
-
- self.obj.emit(SIGNAL('dummy()'))
- self.assertTrue(self.widget.isVisible())
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/qobject_destroyed_test.py b/sources/pyside2/tests/signals/qobject_destroyed_test.py
deleted file mode 100644
index 35752a6ca..000000000
--- a/sources/pyside2/tests/signals/qobject_destroyed_test.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-class QObjectDestroyed(unittest.TestCase):
- """Very simple test case for the destroyed() signal of QObject"""
-
- def setUp(self):
- self.called = False
-
- def destroyed_cb(self):
- self.called = True
-
- def testDestroyed(self):
- """Emission of QObject.destroyed() to a python slot"""
- obj = QObject()
- QObject.connect(obj, SIGNAL('destroyed()'), self.destroyed_cb)
- del obj
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/qobject_receivers_test.py b/sources/pyside2/tests/signals/qobject_receivers_test.py
deleted file mode 100644
index 8ad89fe78..000000000
--- a/sources/pyside2/tests/signals/qobject_receivers_test.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for QObject.receivers()'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-def cute_slot():
- pass
-
-class TestQObjectReceivers(unittest.TestCase):
- '''Test case for QObject::receivers'''
-
- def testBasic(self):
- sender = QObject()
- receiver1 = QObject()
- receiver2 = QObject()
- self.assertEqual(sender.receivers(SIGNAL("")), 0)
- sender.connect(sender, SIGNAL("destroyed()"), receiver1, SLOT("deleteLater()"))
- self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 1)
- sender.connect(sender, SIGNAL("destroyed()"), receiver2, SLOT("deleteLater()"))
- self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 2)
- sender.disconnect(sender, SIGNAL("destroyed()"), receiver2, SLOT("deleteLater()"))
- self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 1)
- del receiver2
- del receiver1
- del sender
-
- def testPySlots(self):
- sender = QObject()
- receiver = QObject()
- sender.connect(sender, SIGNAL("destroyed()"), cute_slot)
- self.assertEqual(sender.receivers(SIGNAL("destroyed( )")), 1)
- sender.connect(sender, SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
- self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 2)
- del sender
- del receiver
-
- def testPySignals(self):
- sender = QObject()
- receiver = QObject()
- sender.connect(sender, SIGNAL("some_dynamic_signal()"), cute_slot)
- self.assertEqual(sender.receivers(SIGNAL("some_dynamic_signal( )")), 1)
- sender.connect(sender, SIGNAL("some_dynamic_signal()"), receiver, SLOT("deleteLater()"))
- self.assertEqual(sender.receivers(SIGNAL("some_dynamic_signal( )")), 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/qobject_sender_test.py b/sources/pyside2/tests/signals/qobject_sender_test.py
deleted file mode 100644
index ce11b803a..000000000
--- a/sources/pyside2/tests/signals/qobject_sender_test.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test cases for QObject.sender()'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class ExtQTimer(QTimer):
- def __init__(self):
- QTimer.__init__(self)
-
-class Receiver(QObject):
- def __init__(self):
- QObject.__init__(self)
- self.the_sender = None
-
- def callback(self):
- self.the_sender = self.sender()
- if QCoreApplication.instance():
- QCoreApplication.instance().exit()
-
-class ObjectSenderTest(unittest.TestCase):
- '''Test case for QObject.sender() method.'''
-
- def testSenderPythonSignal(self):
- sender = QObject()
- recv = Receiver()
- QObject.connect(sender, SIGNAL('foo()'), recv.callback)
- sender.emit(SIGNAL('foo()'))
- self.assertEqual(sender, recv.the_sender)
-
-class ObjectSenderCheckOnReceiverTest(unittest.TestCase):
- '''Test case for QObject.sender() method, this one tests the equality on the Receiver object.'''
-
- def testSenderPythonSignal(self):
- sender = QObject()
- recv = Receiver()
- QObject.connect(sender, SIGNAL('foo()'), recv.callback)
- sender.emit(SIGNAL('foo()'))
- self.assertEqual(sender, recv.the_sender)
-
-class ObjectSenderWithQAppTest(UsesQCoreApplication):
- '''Test case for QObject.sender() method with QApplication.'''
-
- def testSenderCppSignal(self):
- sender = QTimer()
- sender.setObjectName('foo')
- recv = Receiver()
- QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
- sender.start(10)
- self.app.exec_()
- self.assertEqual(sender, recv.the_sender)
-
- def testSenderCppSignalSingleShotTimer(self):
- recv = Receiver()
- QTimer.singleShot(10, recv.callback)
- self.app.exec_()
- self.assertTrue(isinstance(recv.the_sender, QObject))
-
- def testSenderCppSignalWithPythonExtendedClass(self):
- sender = ExtQTimer()
- recv = Receiver()
- QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
- sender.start(10)
- self.app.exec_()
- self.assertEqual(sender, recv.the_sender)
-
-class ObjectSenderWithQAppCheckOnReceiverTest(UsesQCoreApplication):
- '''Test case for QObject.sender() method with QApplication.'''
-
- def testSenderCppSignal(self):
- sender = QTimer()
- sender.setObjectName('foo')
- recv = Receiver()
- QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
- sender.start(10)
- self.app.exec_()
- self.assertEqual(sender, recv.the_sender)
-
- def testSenderCppSignalWithPythonExtendedClass(self):
- sender = ExtQTimer()
- recv = Receiver()
- QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
- sender.start(10)
- self.app.exec_()
- self.assertEqual(sender, recv.the_sender)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/ref01_test.py b/sources/pyside2/tests/signals/ref01_test.py
deleted file mode 100644
index d2c658568..000000000
--- a/sources/pyside2/tests/signals/ref01_test.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal
-
-class BoundAndUnboundSignalsTest(unittest.TestCase):
-
- def setUp(self):
- self.methods = set(('connect', 'disconnect', 'emit'))
-
- def tearDown(self):
- del self.methods
-
- def testUnboundSignal(self):
- self.assertEqual(type(QObject.destroyed), Signal)
- self.assertFalse(self.methods.issubset(dir(QObject.destroyed)))
-
- def testBoundSignal(self):
- obj = QObject()
- self.assertNotEqual(type(obj.destroyed), Signal)
- self.assertTrue(self.methods.issubset(dir(obj.destroyed)))
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/signals/ref02_test.py b/sources/pyside2/tests/signals/ref02_test.py
deleted file mode 100644
index 9a31b4b52..000000000
--- a/sources/pyside2/tests/signals/ref02_test.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QCoreApplication, QTimeLine
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class NativeSignalsTest(UsesQCoreApplication):
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.called = False
- self.timeline = QTimeLine(100)
-
- def tearDown(self):
- del self.called
- del self.timeline
- UsesQCoreApplication.tearDown(self)
-
- def testSignalWithIntArgument(self):
-
- def valueChangedSlot(value):
- self.called = True
- self.assertEqual(type(value), float)
- self.app.quit()
-
- self.timeline.valueChanged.connect(valueChangedSlot)
- self.timeline.start()
-
- self.app.exec_()
- self.assertTrue(self.called)
-
- def testSignalWithoutArguments(self):
-
- def finishedSlot():
- self.called = True
- self.app.quit()
-
- self.timeline.finished.connect(finishedSlot)
- self.timeline.start()
-
- self.app.exec_()
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/ref03_test.py b/sources/pyside2/tests/signals/ref03_test.py
deleted file mode 100644
index 25f404f38..000000000
--- a/sources/pyside2/tests/signals/ref03_test.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject
-
-class DisconnectSignalsTest(unittest.TestCase):
-
- def setUp(self):
- self.emitter = QObject()
-
- def tearDown(self):
- del self.emitter
-
- def testConnectionRefCount(self):
-
- def destroyedSlot():
- pass
-
- self.assertEqual(getrefcount(destroyedSlot), 2)
- self.emitter.destroyed.connect(destroyedSlot)
- self.assertEqual(getrefcount(destroyedSlot), 3)
- self.emitter.destroyed.disconnect(destroyedSlot)
- self.assertEqual(getrefcount(destroyedSlot), 2)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/ref04_test.py b/sources/pyside2/tests/signals/ref04_test.py
deleted file mode 100644
index 4c66c04ef..000000000
--- a/sources/pyside2/tests/signals/ref04_test.py
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal
-
-class ExtQObject(QObject):
-
- mySignal = Signal()
-
- def __init__(self):
- QObject.__init__(self)
-
-
-class UserSignalTest(unittest.TestCase):
-
- def setUp(self):
- self.emitter = ExtQObject()
- self.counter = 0
-
- def tearDown(self):
- del self.emitter
- del self.counter
-
- def testConnectEmitDisconnect(self):
-
- def slot():
- self.counter += 1
-
- self.emitter.mySignal.connect(slot)
-
- self.assertEqual(self.counter, 0)
- self.emitter.mySignal.emit()
- self.assertEqual(self.counter, 1)
- self.emitter.mySignal.emit()
- self.assertEqual(self.counter, 2)
-
- self.emitter.mySignal.disconnect(slot)
-
- self.emitter.mySignal.emit()
- self.assertEqual(self.counter, 2)
-
-# def testConnectWithConfigureMethod(self):
-#
-# def slot():
-# self.counter += 1
-#
-# self.emitter.pyqtConfigure(mySignal=slot)
-# self.assertEqual(self.counter, 0)
-# self.emitter.mySignal.emit()
-# self.assertEqual(self.counter, 1)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/ref05_test.py b/sources/pyside2/tests/signals/ref05_test.py
deleted file mode 100644
index 3b7bf1983..000000000
--- a/sources/pyside2/tests/signals/ref05_test.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication, QTimeLine, Slot
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class ExtQObject(QObject):
-
- def __init__(self):
- QObject.__init__(self)
- self.counter = 0
-
- @Slot('qreal')
- def foo(self, value):
- self.counter += 1
-
-
-class UserSlotTest(UsesQCoreApplication):
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.receiver = ExtQObject()
- self.timeline = QTimeLine(100)
-
- def tearDown(self):
- del self.timeline
- del self.receiver
- UsesQCoreApplication.tearDown(self)
-
- def testUserSlot(self):
- self.timeline.setUpdateInterval(10)
-
- self.timeline.finished.connect(self.app.quit)
-
- self.timeline.valueChanged.connect(self.receiver.foo)
- self.timeline.start()
-
- self.app.exec_()
-
- self.assertTrue(self.receiver.counter > 1)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/ref06_test.py b/sources/pyside2/tests/signals/ref06_test.py
deleted file mode 100644
index 51d78e638..000000000
--- a/sources/pyside2/tests/signals/ref06_test.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QCoreApplication, QTimeLine, Signal, Slot
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class ExtQObject(QObject):
- signalbetween = Signal('qreal')
-
- def __init__(self):
- QObject.__init__(self)
- self.counter = 0
-
- @Slot('qreal')
- def foo(self, value):
- self.counter += 1
-
-
-class SignaltoSignalTest(UsesQCoreApplication):
-
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self.receiver = ExtQObject()
- self.timeline = QTimeLine(100)
-
- def tearDown(self):
- del self.timeline
- del self.receiver
- UsesQCoreApplication.tearDown(self)
-
- def testSignaltoSignal(self):
- self.timeline.setUpdateInterval(10)
-
- self.timeline.finished.connect(self.app.quit)
-
- self.timeline.valueChanged.connect(self.receiver.signalbetween)
- self.receiver.signalbetween.connect(self.receiver.foo)
-
- self.timeline.start()
-
- self.app.exec_()
-
- self.assertTrue(self.receiver.counter > 1)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/segfault_proxyparent_test.py b/sources/pyside2/tests/signals/segfault_proxyparent_test.py
deleted file mode 100644
index 2d45f1e7f..000000000
--- a/sources/pyside2/tests/signals/segfault_proxyparent_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-# Description of the problem
-# After creating an PyObject that inherits from QObject, connecting it,
-# deleting it and later creating another Python QObject-based object, this
-# new object will point to the same memory position as the first one.
-
-# Somehow the underlying QObject also points to the same position.
-
-# In PyQt4, the connection works fine with the same memory behavior,
-# so it looks like specific to SIP.
-
-class Dummy(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
-
-class Joe(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
-
-class SegfaultCase(unittest.TestCase):
- """Test case for the segfault happening when parent() is called inside
- ProxyObject"""
-
- def setUp(self):
- self.called = False
-
- def tearDown(self):
- try:
- del self.args
- except:
- pass
-
- def callback(self, *args):
- if tuple(self.args) == args:
- self.called = True
-
- def testSegfault(self):
- """Regression: Segfault for qobjects in the same memory position."""
- obj = Dummy()
- QObject.connect(obj, SIGNAL('bar(int)'), self.callback)
- self.args = (33,)
- obj.emit(SIGNAL('bar(int)'), self.args[0])
- self.assertTrue(self.called)
- del obj
-
- obj = Joe()
- QObject.connect(obj, SIGNAL('bar(int)'), self.callback)
- self.args = (33,)
- obj.emit(SIGNAL('bar(int)'), self.args[0])
- self.assertTrue(self.called)
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/self_connect_test.py b/sources/pyside2/tests/signals/self_connect_test.py
deleted file mode 100644
index cca97b096..000000000
--- a/sources/pyside2/tests/signals/self_connect_test.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Using self.connect(signal, method)'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT
-from PySide2.QtWidgets import QPushButton, QWidget
-
-from helper.usesqapplication import UsesQApplication
-
-
-class SelfConnect(UsesQApplication):
-
- def testButtonClickClose(self):
- button = QPushButton()
- button.connect(button, SIGNAL('clicked()'), SLOT('close()'))
-
- button.show()
- self.assertTrue(button.isVisible())
- button.click()
- self.assertTrue(not button.isVisible())
-
- def testWindowButtonClickClose(self):
- button = QPushButton()
- window = QWidget()
- window.connect(button, SIGNAL('clicked()'), SLOT('close()'))
-
- window.show()
- self.assertTrue(window.isVisible())
- button.click()
- self.assertTrue(not window.isVisible())
-
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/short_circuit_test.py b/sources/pyside2/tests/signals/short_circuit_test.py
deleted file mode 100644
index 61acc77c0..000000000
--- a/sources/pyside2/tests/signals/short_circuit_test.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT
-
-class Dummy(QObject):
- """Dummy class used in this test."""
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
-
-class ShortCircuitSignals(unittest.TestCase):
- def setUp(self):
- self.called = False
-
- def tearDown(self):
- try:
- del self.args
- except:
- pass
-
- def callback(self, *args):
- if tuple(self.args) == args:
- self.called = True
-
- def testNoArgs(self):
- """Short circuit signal without arguments"""
- obj1 = Dummy()
- QObject.connect(obj1, SIGNAL('foo()'), self.callback)
- self.args = tuple()
- obj1.emit(SIGNAL('foo()'), *self.args)
- self.assertTrue(self.called)
-
- def testWithArgs(self):
- """Short circuit signal with integer arguments"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
- self.args = (42,)
- obj1.emit(SIGNAL('foo(int)'), *self.args)
-
- self.assertTrue(self.called)
-
- def testMultipleArgs(self):
- """Short circuit signal with multiple arguments"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo(int,int,QString)'), self.callback)
- self.args = (42,33,'char')
- obj1.emit(SIGNAL('foo(int,int,QString)'), *self.args)
-
- self.assertTrue(self.called)
-
- def testComplexArgs(self):
- """Short circuit signal with complex arguments"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo(int,QObject*)'), self.callback)
- self.args = (42, obj1)
- obj1.emit(SIGNAL('foo(int,QObject*)'), *self.args)
-
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal2signal_connect_test.py b/sources/pyside2/tests/signals/signal2signal_connect_test.py
deleted file mode 100644
index c5008c942..000000000
--- a/sources/pyside2/tests/signals/signal2signal_connect_test.py
+++ /dev/null
@@ -1,142 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Test case for signal to signal connections.'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-def cute_slot():
- pass
-
-class TestSignal2SignalConnect(unittest.TestCase):
- '''Test case for signal to signal connections'''
-
- def setUp(self):
- #Set up the basic resources needed
- self.sender = QObject()
- self.forwarder = QObject()
- self.args = None
- self.called = False
-
- def tearDown(self):
- #Delete used resources
- try:
- del self.sender
- except:
- pass
- try:
- del self.forwarder
- except:
- pass
- del self.args
-
- def callback_noargs(self):
- #Default callback without arguments
- self.called = True
-
- def callback_args(self, *args):
- #Default callback with arguments
- if args == self.args:
- self.called = True
- else:
- raise TypeError("Invalid arguments")
-
- def callback_qobject(self, *args):
- #Default callback for QObject as argument
- if args[0].objectName() == self.args[0]:
- self.called = True
- else:
- raise TypeError("Invalid arguments")
-
-
- def testSignalWithoutArguments(self):
- QObject.connect(self.sender, SIGNAL("destroyed()"),
- self.forwarder, SIGNAL("forward()"))
- QObject.connect(self.forwarder, SIGNAL("forward()"),
- self.callback_noargs)
- del self.sender
- self.assertTrue(self.called)
-
-
- def testSignalWithOnePrimitiveTypeArgument(self):
- QObject.connect(self.sender, SIGNAL("mysignal(int)"),
- self.forwarder, SIGNAL("mysignal(int)"))
- QObject.connect(self.forwarder, SIGNAL("mysignal(int)"),
- self.callback_args)
- self.args = (19,)
- self.sender.emit(SIGNAL('mysignal(int)'), *self.args)
- self.assertTrue(self.called)
-
-
- def testSignalWithMultiplePrimitiveTypeArguments(self):
- QObject.connect(self.sender, SIGNAL("mysignal(int,int)"),
- self.forwarder, SIGNAL("mysignal(int,int)"))
- QObject.connect(self.forwarder, SIGNAL("mysignal(int,int)"),
- self.callback_args)
- self.args = (23, 29)
- self.sender.emit(SIGNAL('mysignal(int,int)'), *self.args)
- self.assertTrue(self.called)
-
-
- def testSignalWithOneStringArgument(self):
- QObject.connect(self.sender, SIGNAL("mysignal(QString)"),
- self.forwarder, SIGNAL("mysignal(QString)"))
- QObject.connect(self.forwarder, SIGNAL("mysignal(QString)"),
- self.callback_args)
- self.args = ('myargument',)
- self.sender.emit(SIGNAL('mysignal(QString)'), *self.args)
- self.assertTrue(self.called)
-
-
- def testSignalWithOneQObjectArgument(self):
- QObject.connect(self.sender, SIGNAL('destroyed(QObject*)'),
- self.forwarder, SIGNAL('forward(QObject*)'))
- QObject.connect(self.forwarder, SIGNAL('forward(QObject*)'),
- self.callback_qobject)
-
- obj_name = 'sender'
- self.sender.setObjectName(obj_name)
- self.args = (obj_name, )
- del self.sender
- self.assertTrue(self.called)
-
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/signals/signal_across_threads.py b/sources/pyside2/tests/signals/signal_across_threads.py
deleted file mode 100644
index 907f059a1..000000000
--- a/sources/pyside2/tests/signals/signal_across_threads.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for PYSIDE-1354: Ensure that slots are invoked from the receiver's
-thread context when using derived classes (and thus, a global receiver).'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, QThread, QTimer, Slot
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class ReceiverBase(QObject):
- def __init__(self, parent=None):
- super(ReceiverBase, self).__init__(parent)
- self.senderThread = None
-
- @Slot()
- def slot_function(self):
- self.senderThread = QThread.currentThread()
-
-
-class Receiver(ReceiverBase):
- pass
-
-
-class TestThread(QThread):
- def __init__(self, parent=None):
- super(TestThread, self).__init__(parent)
-
- def run(self):
- pass
-
-
-class SignalAcrossThreads(UsesQCoreApplication):
- def setUp(self):
- UsesQCoreApplication.setUp(self)
- self._timer_tick = 0
- self._timer = QTimer()
- self._timer.setInterval(20)
- self._timer.timeout.connect(self._control_test)
- self._worker_thread = TestThread()
-
- def tearDown(self):
- UsesQCoreApplication.tearDown(self)
-
- @Slot()
- def _control_test(self):
- if self._timer_tick == 0:
- self._worker_thread.start()
- elif self._timer_tick == 1:
- self._worker_thread.wait()
- else:
- self._timer.stop()
- self.app.quit()
- self._timer_tick += 1
-
- def test(self):
- worker_thread_receiver = Receiver()
- worker_thread_receiver.moveToThread(self._worker_thread)
- self._worker_thread.started.connect(worker_thread_receiver.slot_function)
-
- main_thread = QThread.currentThread()
- main_thread_receiver = Receiver()
- self._worker_thread.started.connect(main_thread_receiver.slot_function)
-
- self._timer.start()
- self.app.exec_()
-
- self.assertEqual(worker_thread_receiver.senderThread, self._worker_thread)
- self.assertEqual(main_thread_receiver.senderThread, main_thread)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_autoconnect_test.py b/sources/pyside2/tests/signals/signal_autoconnect_test.py
deleted file mode 100644
index b19f28ab7..000000000
--- a/sources/pyside2/tests/signals/signal_autoconnect_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from PySide2.QtWidgets import *
-
-class MyObject(QWidget):
- def __init__(self, parent=None):
- QWidget.__init__(self, parent)
- self._method_called = False
-
- @Slot()
- def on_button_clicked(self):
- self._method_called = True
-
-
-class AutoConnectionTest(unittest.TestCase):
-
- def testConnection(self):
- app = QApplication([])
-
- win = MyObject()
- btn = QPushButton("click", win)
- btn.setObjectName("button")
- QMetaObject.connectSlotsByName(win)
- btn.click()
- self.assertTrue(win._method_called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_connectiontype_support_test.py b/sources/pyside2/tests/signals/signal_connectiontype_support_test.py
deleted file mode 100644
index 00865a95e..000000000
--- a/sources/pyside2/tests/signals/signal_connectiontype_support_test.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, Qt
-
-class Dummy(QObject):
- """Dummy class used in this test."""
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
-
-class TestConnectionTypeSupport(unittest.TestCase):
- def callback(self, *args):
- if tuple(self.args) == args:
- self.called = True
-
- def testNoArgs(self):
- """Connect signal using a Qt.ConnectionType as argument"""
- obj1 = Dummy()
-
- QObject.connect(obj1, SIGNAL('foo()'), self.callback, Qt.DirectConnection)
- self.args = tuple()
- obj1.emit(SIGNAL('foo()'), *self.args)
-
- self.assertTrue(self.called)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_emission_gui_test.py b/sources/pyside2/tests/signals/signal_emission_gui_test.py
deleted file mode 100644
index d46e78c5e..000000000
--- a/sources/pyside2/tests/signals/signal_emission_gui_test.py
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""Tests covering signal emission and receiving to python slots"""
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT
-
-try:
- from PySide2.QtWidgets import QSpinBox, QPushButton
- hasQtGui = True
-except ImportError:
- hasQtGui = False
-
-from helper.basicpyslotcase import BasicPySlotCase
-from helper.usesqapplication import UsesQApplication
-
-if hasQtGui:
- class ButtonPySlot(UsesQApplication, BasicPySlotCase):
- """Tests the connection of python slots to QPushButton signals"""
-
- def testButtonClicked(self):
- """Connection of a python slot to QPushButton.clicked()"""
- button = QPushButton('Mylabel')
- QObject.connect(button, SIGNAL('clicked()'), self.cb)
- self.args = tuple()
- button.emit(SIGNAL('clicked(bool)'), False)
- self.assertTrue(self.called)
-
- def testButtonClick(self):
- """Indirect qt signal emission using the QPushButton.click() method """
- button = QPushButton('label')
- QObject.connect(button, SIGNAL('clicked()'), self.cb)
- self.args = tuple()
- button.click()
- self.assertTrue(self.called)
-
-
-if hasQtGui:
- class SpinBoxPySlot(UsesQApplication, BasicPySlotCase):
- """Tests the connection of python slots to QSpinBox signals"""
-
- def setUp(self):
- super(SpinBoxPySlot, self).setUp()
- self.spin = QSpinBox()
-
- def tearDown(self):
- del self.spin
- super(SpinBoxPySlot, self).tearDown()
-
- def testSpinBoxValueChanged(self):
- """Connection of a python slot to QSpinBox.valueChanged(int)"""
- QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
- self.args = [3]
- self.spin.emit(SIGNAL('valueChanged(int)'), *self.args)
- self.assertTrue(self.called)
-
- def testSpinBoxValueChangedImplicit(self):
- """Indirect qt signal emission using QSpinBox.setValue(int)"""
- QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
- self.args = [42]
- self.spin.setValue(self.args[0])
- self.assertTrue(self.called)
-
- def atestSpinBoxValueChangedFewArgs(self):
- """Emission of signals with fewer arguments than needed"""
- # XXX: PyQt4 crashes on the assertRaises
- QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
- self.args = (554,)
- self.assertRaises(TypeError, self.spin.emit, SIGNAL('valueChanged(int)'))
-
-if hasQtGui:
- class QSpinBoxQtSlots(UsesQApplication):
- """Tests the connection to QSpinBox qt slots"""
-
- qapplication = True
-
- def testSetValueIndirect(self):
- """Indirect signal emission: QSpinBox using valueChanged(int)/setValue(int)"""
- spinSend = QSpinBox()
- spinRec = QSpinBox()
-
- spinRec.setValue(5)
-
- QObject.connect(spinSend, SIGNAL('valueChanged(int)'), spinRec, SLOT('setValue(int)'))
- self.assertEqual(spinRec.value(), 5)
- spinSend.setValue(3)
- self.assertEqual(spinRec.value(), 3)
- self.assertEqual(spinSend.value(), 3)
-
- def testSetValue(self):
- """Direct signal emission: QSpinBox using valueChanged(int)/setValue(int)"""
- spinSend = QSpinBox()
- spinRec = QSpinBox()
-
- spinRec.setValue(5)
- spinSend.setValue(42)
-
- QObject.connect(spinSend, SIGNAL('valueChanged(int)'), spinRec, SLOT('setValue(int)'))
- self.assertEqual(spinRec.value(), 5)
- self.assertEqual(spinSend.value(), 42)
- spinSend.emit(SIGNAL('valueChanged(int)'), 3)
-
- self.assertEqual(spinRec.value(), 3)
- #Direct emission shouldn't change the value of the emitter
- self.assertEqual(spinSend.value(), 42)
-
- spinSend.emit(SIGNAL('valueChanged(int)'), 66)
- self.assertEqual(spinRec.value(), 66)
- self.assertEqual(spinSend.value(), 42)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_emission_test.py b/sources/pyside2/tests/signals/signal_emission_test.py
deleted file mode 100644
index f9c221e8f..000000000
--- a/sources/pyside2/tests/signals/signal_emission_test.py
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""Tests covering signal emission and receiving to python slots"""
-
-import functools
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT, QProcess, QTimeLine
-
-from helper.basicpyslotcase import BasicPySlotCase
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-
-class ArgsOnEmptySignal(UsesQCoreApplication):
- '''Trying to emit a signal without arguments passing some arguments'''
-
- def testArgsToNoArgsSignal(self):
- '''Passing arguments to a signal without arguments'''
- process = QProcess()
- self.assertRaises(TypeError, process.emit, SIGNAL('started()'), 42)
-
-
-class MoreArgsOnEmit(UsesQCoreApplication):
- '''Trying to pass more args than needed to emit (signals with args)'''
-
- def testMoreArgs(self):
- '''Passing more arguments than needed'''
- process = QProcess()
- self.assertRaises(TypeError, process.emit, SIGNAL('finished(int)'), 55, 55)
-
-class Dummy(QObject):
- '''Dummy class'''
- pass
-
-class PythonSignalToCppSlots(UsesQCoreApplication):
- '''Connect python signals to C++ slots'''
-
- def testWithoutArgs(self):
- '''Connect python signal to QTimeLine.toggleDirection()'''
- timeline = QTimeLine()
- dummy = Dummy()
- QObject.connect(dummy, SIGNAL('dummy()'),
- timeline, SLOT('toggleDirection()'))
-
- orig_dir = timeline.direction()
- dummy.emit(SIGNAL('dummy()'))
- new_dir = timeline.direction()
-
- if orig_dir == QTimeLine.Forward:
- self.assertEqual(new_dir, QTimeLine.Backward)
- else:
- self.assertEqual(new_dir, QTimeLine.Forward)
-
- def testWithArgs(self):
- '''Connect python signals to QTimeLine.setCurrentTime(int)'''
- timeline = QTimeLine()
- dummy = Dummy()
-
- QObject.connect(dummy, SIGNAL('dummy(int)'),
- timeline, SLOT('setCurrentTime(int)'))
-
- current = timeline.currentTime()
- dummy.emit(SIGNAL('dummy(int)'), current+42)
- self.assertEqual(timeline.currentTime(), current+42)
-
-class CppSignalsToCppSlots(UsesQCoreApplication):
- '''Connection between C++ slots and signals'''
-
- def testWithoutArgs(self):
- '''Connect QProcess.started() to QTimeLine.togglePaused()'''
- process = QProcess()
- timeline = QTimeLine()
-
- QObject.connect(process, SIGNAL('finished(int, QProcess::ExitStatus)'),
- timeline, SLOT('toggleDirection()'))
-
- orig_dir = timeline.direction()
-
- process.start(sys.executable, ['-c', '"print 42"'])
- process.waitForFinished()
-
- new_dir = timeline.direction()
-
- if orig_dir == QTimeLine.Forward:
- self.assertEqual(new_dir, QTimeLine.Backward)
- else:
- self.assertEqual(new_dir, QTimeLine.Forward)
-
-called = False
-def someSlot(args=None):
- global called
- called = True
-
-class DynamicSignalsToFuncPartial(UsesQCoreApplication):
-
- def testIt(self):
- global called
- called = False
- o = QObject()
- o.connect(o, SIGNAL("ASignal()"), functools.partial(someSlot, "partial .."))
- o.emit(SIGNAL("ASignal()"))
- self.assertTrue(called)
-
-class EmitUnknownType(UsesQCoreApplication):
- def testIt(self):
- a = QObject()
- a.connect(SIGNAL('foobar(Dummy)'), lambda x: 42) # Just connect with an unknown type
- self.assertRaises(TypeError, a.emit, SIGNAL('foobar(Dummy)'), 22)
-
-class EmitEnum(UsesQCoreApplication):
- """Test emission of enum arguments"""
-
- def slot(self, arg):
- self.arg = arg
-
- def testIt(self):
- self.arg = None
- p = QProcess()
- p.stateChanged.connect(self.slot)
- p.stateChanged.emit(QProcess.NotRunning)
- self.assertEqual(self.arg, QProcess.NotRunning)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_enum_test.py b/sources/pyside2/tests/signals/signal_enum_test.py
deleted file mode 100644
index d48aa10cf..000000000
--- a/sources/pyside2/tests/signals/signal_enum_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from enum import Enum
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, Signal, Slot
-
-
-class Colors(Enum):
- red = 1
- green = 2
- blue = 3
-
-class Obj(QObject):
- enum_signal = Signal(Colors)
- object_signal = Signal(object)
-
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self.enum_signal.connect(self.get_result)
- self.object_signal.connect(self.get_result)
- self.value = -1
-
- @Slot()
- def get_result(self, i):
- self.value = i
-
-
-class SignalEnumTests(unittest.TestCase):
- '''Test Signal with enum.Enum'''
-
- def testSignal(self):
- o = Obj()
- # Default value
- self.assertEqual(o.value, -1)
-
- # Enum Signal
- o.enum_signal.emit(Colors.green)
- self.assertEqual(o.value, Colors.green)
-
- # object Signal
- o.object_signal.emit(Colors.red)
- self.assertEqual(o.value, Colors.red)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_func_test.py b/sources/pyside2/tests/signals/signal_func_test.py
deleted file mode 100644
index 0026bc726..000000000
--- a/sources/pyside2/tests/signals/signal_func_test.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import SIGNAL, SLOT
-
-class SIGNALSLOTTests(unittest.TestCase):
- '''Test the output of SIGNAL and SLOT.'''
-
- def testSIGNAL(self):
- #SIGNAL function
- a = "foobar"
- self.assertEqual(str(SIGNAL(a)), "2foobar")
-
- def testSLOT(self):
- #SLOT function
- a = "foobar"
- self.assertEqual(str(SLOT(a)), "1foobar")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_manager_refcount_test.py b/sources/pyside2/tests/signals/signal_manager_refcount_test.py
deleted file mode 100644
index 6942f983d..000000000
--- a/sources/pyside2/tests/signals/signal_manager_refcount_test.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL
-
-class SignalManagerRefCount(unittest.TestCase):
- """Simple test case to check if the signal_manager is erroneously incrementing the object refcounter"""
-
- def testObjectRefcount(self):
- """Emission of QObject.destroyed() to a python slot"""
- def callback():
- pass
- obj = QObject()
- refcount = getrefcount(obj)
- QObject.connect(obj, SIGNAL('destroyed()'), callback)
- self.assertEqual(refcount, getrefcount(obj))
- QObject.disconnect(obj, SIGNAL('destroyed()'), callback)
- self.assertEqual(refcount, getrefcount(obj))
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/signal_number_limit_test.py b/sources/pyside2/tests/signals/signal_number_limit_test.py
deleted file mode 100644
index 67bb63e44..000000000
--- a/sources/pyside2/tests/signals/signal_number_limit_test.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2 import QtCore
-
-class Emitter(QtCore.QObject):
- s1 = QtCore.Signal()
- s2 = QtCore.Signal()
- s3 = QtCore.Signal()
- s4 = QtCore.Signal()
- s5 = QtCore.Signal()
- s6 = QtCore.Signal()
- s7 = QtCore.Signal()
- s8 = QtCore.Signal()
- s9 = QtCore.Signal()
- s10 = QtCore.Signal()
- s11 = QtCore.Signal()
- s12 = QtCore.Signal()
- s13 = QtCore.Signal()
- s14 = QtCore.Signal()
-
-class SignalNumberLimitTest(unittest.TestCase):
- def myCb(self):
- self._count += 1
-
- def testBug(self):
- e = Emitter()
- e.s1.connect(self.myCb)
- e.s2.connect(self.myCb)
- e.s3.connect(self.myCb)
- e.s4.connect(self.myCb)
- e.s5.connect(self.myCb)
- e.s6.connect(self.myCb)
- e.s7.connect(self.myCb)
- e.s8.connect(self.myCb)
- e.s9.connect(self.myCb)
- e.s10.connect(self.myCb)
- e.s11.connect(self.myCb)
- e.s12.connect(self.myCb)
- e.s13.connect(self.myCb)
- e.s14.connect(self.myCb)
-
- self._count = 0
- e.s1.emit()
- e.s2.emit()
- e.s3.emit()
- e.s4.emit()
- e.s5.emit()
- e.s6.emit()
- e.s7.emit()
- e.s8.emit()
- e.s9.emit()
- e.s10.emit()
- e.s11.emit()
- e.s12.emit()
- e.s13.emit()
- e.s14.emit()
- self.assertEqual(self._count, 14)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_object_test.py b/sources/pyside2/tests/signals/signal_object_test.py
deleted file mode 100644
index bf4abedbc..000000000
--- a/sources/pyside2/tests/signals/signal_object_test.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QTimer, Signal, QObject, Slot, Qt
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class MyObject(QTimer):
- sig1 = Signal()
- sig2 = Signal(int, name='rangeChanged')
- sig3 = Signal(int)
- sig4 = Signal((int,), (str,))
- sig5 = Signal((str,), (int,))
- sig6 = Signal(QObject)
-
- @Slot(int)
- def myRange(self, r):
- self._range = r
-
- def slot1(self):
- self._called = True
-
- def slotString(self, s):
- self._s = s
-
- def slotObject(self, o):
- self._o = o
-
-
-class SignalObjectTest(UsesQCoreApplication):
- def cb(self):
- self._cb_called = True
- self.app.exit()
-
- def testsingleConnect(self):
- o = MyObject()
- o.sig1.connect(o.slot1)
- o.sig1.emit()
- self.assertTrue(o._called)
-
- def testSignalWithArgs(self):
- o = MyObject()
- o.sig3.connect(o.myRange)
- o.sig3.emit(10)
- self.assertEqual(o._range, 10)
-
- def testSignatureParse(self):
- o = MyObject()
- o.sig2.connect(o.myRange)
- o.sig2.emit(10)
-
- def testDictOperator(self):
- o = MyObject()
- o.sig4[str].connect(o.slotString)
- o.sig4[str].emit("PySide")
- self.assertEqual(o._s, "PySide")
-
- def testGeneretedSignal(self):
- o = MyObject()
- o.timeout.connect(self.cb)
- o.start(100)
- self.app.exec_()
- self.assertTrue(self._cb_called)
-
- def testConnectionType(self):
- o = MyObject()
- o.timeout.connect(self.cb, type=Qt.DirectConnection)
- o.start(100)
- self.app.exec_()
- self.assertTrue(self._cb_called)
-
- def testSignalWithSignal(self):
- o = MyObject()
- o.sig2.connect(o.myRange)
- o.sig5.connect(o.sig2)
- o.sig5[int].emit(10)
- self.assertEqual(o._range, 10)
-
- def testSignalWithObject(self):
- o = MyObject()
- o.sig6.connect(o.slotObject)
- arg = QObject()
- o.sig6.emit(arg)
- self.assertEqual(arg, o._o)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/signal_signature_test.py b/sources/pyside2/tests/signals/signal_signature_test.py
deleted file mode 100644
index 1f661de0a..000000000
--- a/sources/pyside2/tests/signals/signal_signature_test.py
+++ /dev/null
@@ -1,121 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Test case for signal signature received by QObject::connectNotify().'''
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-called = False
-name = "Old"
-class Obj(QObject):
- dummySignalArgs = Signal(str)
- numberSignal = Signal(int)
- def __init__(self):
- QObject.__init__(self)
- self.signal = ''
-
- def connectNotify(self, signal):
- self.signal = signal
-
- @staticmethod
- def static_method():
- global called
- called = True
-
- @staticmethod
- def static_method_args(arg="default"):
- global name
- name = arg
-
-def callback(arg=None):
- pass
-def callback_empty():
- pass
-
-class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
- '''Test case for signal signature received by QObject::connectNotify().'''
-
- def testOldStyle(self):
- sender = Obj()
- receiver = QObject()
- sender.connect(SIGNAL('destroyed()'), receiver, SLOT('deleteLater()'))
- # When connecting to a regular slot, and not a python callback function, QObject::connect
- # will use the non-cloned method signature, so connectinc to destroyed() will actually
- # connect to destroyed(QObject*).
- self.assertEqual(sender.signal.methodSignature(), 'destroyed(QObject*)')
-
- def testOldStyleWithPythonCallback(self):
- sender = Obj()
- sender.connect(SIGNAL('destroyed()'), callback)
- self.assertEqual(sender.signal.methodSignature(), 'destroyed()')
-
- def testNewStyle(self):
- sender = Obj()
-
- sender.destroyed.connect(callback_empty)
- self.assertEqual(sender.signal.methodSignature(), 'destroyed()')
-
- sender.destroyed[QObject].connect(callback)
- self.assertEqual(sender.signal.methodSignature(), 'destroyed(QObject*)')
-
- def testStaticSlot(self):
- global called
- sender = Obj()
- sender.connect(sender, SIGNAL("dummySignal()"), Obj.static_method)
- sender.emit(SIGNAL("dummySignal()"))
- self.assertTrue(called)
-
-
- def testStaticSlotArgs(self):
- global name
- sender = Obj()
- sender.dummySignalArgs.connect(Obj.static_method_args)
- sender.dummySignalArgs[str].emit("New")
- self.assertEqual(name, "New")
-
- def testLambdaSlot(self):
- sender = Obj()
- sender.numberSignal[int].connect(lambda x: 42)
- with self.assertRaises(IndexError):
- sender.numberSignal[str].emit("test")
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/signals/signal_with_primitive_type_test.py b/sources/pyside2/tests/signals/signal_with_primitive_type_test.py
deleted file mode 100644
index f7f691f34..000000000
--- a/sources/pyside2/tests/signals/signal_with_primitive_type_test.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import *
-
-
-class SignalPrimitiveTypeTest(unittest.TestCase):
-
- def signalValueChanged(self, v):
- self.called = True
- self._app.quit()
-
- def createTimeLine(self):
- self.called = False
- tl = QTimeLine(10000)
- QObject.connect(tl, SIGNAL("valueChanged(qreal)"), self.signalValueChanged)
- return tl
-
- def testTimeLine(self):
- self._valueChangedCount = 0
- self._app = QCoreApplication([])
- tl = self.createTimeLine()
- tl.start()
- self._app.exec_()
- self.assertTrue(self.called)
-
-if __name__ == '__main__':
- unittest.main()
-
-
diff --git a/sources/pyside2/tests/signals/slot_reference_count_test.py b/sources/pyside2/tests/signals/slot_reference_count_test.py
deleted file mode 100644
index 7885a358b..000000000
--- a/sources/pyside2/tests/signals/slot_reference_count_test.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-''' Forced disconnection: Delete one end of the signal connection'''
-
-import os
-import sys
-from sys import getrefcount
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, SLOT
-
-class Dummy(QObject):
- def dispatch(self):
- self.emit(SIGNAL('foo()'))
-
-class PythonSignalRefCount(unittest.TestCase):
-
- def setUp(self):
- self.emitter = Dummy()
-
- def tearDown(self):
- self.emitter
-
- def testRefCount(self):
- def cb(*args):
- pass
-
- self.assertEqual(getrefcount(cb), 2)
-
- QObject.connect(self.emitter, SIGNAL('foo()'), cb)
- self.assertEqual(getrefcount(cb), 3)
-
- QObject.disconnect(self.emitter, SIGNAL('foo()'), cb)
- self.assertEqual(getrefcount(cb), 2)
-
-class CppSignalRefCount(unittest.TestCase):
-
- def setUp(self):
- self.emitter = QObject()
-
- def tearDown(self):
- self.emitter
-
- def testRefCount(self):
- def cb(*args):
- pass
-
- self.assertEqual(getrefcount(cb), 2)
-
- QObject.connect(self.emitter, SIGNAL('destroyed()'), cb)
- self.assertEqual(getrefcount(cb), 3)
-
- QObject.disconnect(self.emitter, SIGNAL('destroyed()'), cb)
- self.assertEqual(getrefcount(cb), 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/signals/static_metaobject_test.py b/sources/pyside2/tests/signals/static_metaobject_test.py
deleted file mode 100644
index bdb3b1992..000000000
--- a/sources/pyside2/tests/signals/static_metaobject_test.py
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-"""Tests covering signal emission and receiving to python slots"""
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide2.QtCore import QObject, SIGNAL, Slot
-from helper.usesqcoreapplication import UsesQCoreApplication
-
-class MyObject(QObject):
- def __init__(self, parent=None):
- QObject.__init__(self, parent)
- self._slotCalledCount = 0
-
- # this '@Slot()' is needed to get the right sort order in testSharedSignalEmission.
- # For some reason, it also makes the tests actually work!
- @Slot()
- def mySlot(self):
- self._slotCalledCount = self._slotCalledCount + 1
-
-
-class StaticMetaObjectTest(UsesQCoreApplication):
-
- def testSignalPropagation(self):
- o = MyObject()
- o2 = MyObject()
-
- # SIGNAL foo not created yet
- self.assertEqual(o.metaObject().indexOfSignal("foo()"), -1)
-
- o.connect(SIGNAL("foo()"), o2.mySlot)
- # SIGNAL foo create after connect
- self.assertTrue(o.metaObject().indexOfSignal("foo()") > 0)
-
- # SIGNAL does not propagate to others objects of the same type
- self.assertEqual(o2.metaObject().indexOfSignal("foo()"), -1)
-
- del o
- del o2
- o = MyObject()
- # The SIGNAL was destroyed with old objects
- self.assertEqual(o.metaObject().indexOfSignal("foo()"), -1)
-
-
- def testSharedSignalEmission(self):
- o = QObject()
- m = MyObject()
-
- o.connect(SIGNAL("foo2()"), m.mySlot)
- m.connect(SIGNAL("foo2()"), m.mySlot)
- o.emit(SIGNAL("foo2()"))
- self.assertEqual(m._slotCalledCount, 1)
- del o
- m.emit(SIGNAL("foo2()"))
- self.assertEqual(m._slotCalledCount, 2)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/support/voidptr_test.py b/sources/pyside2/tests/support/voidptr_test.py
deleted file mode 100644
index 2b7b713f9..000000000
--- a/sources/pyside2/tests/support/voidptr_test.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-import shiboken6 as shiboken
-from PySide2.support import VoidPtr
-from PySide2.QtCore import QByteArray
-
-class PySide2Support(unittest.TestCase):
-
- def testVoidPtr(self):
- # Creating a VoidPtr object requires an address of
- # a C++ object, a wrapped Shiboken Object type,
- # an object implementing the Python Buffer interface,
- # or another VoidPtr object.
-
- # Original content
- b = b"Hello world"
- ba = QByteArray(b)
- vp = VoidPtr(ba, ba.size())
- self.assertIsInstance(vp, shiboken.VoidPtr)
-
- # Create QByteArray from voidptr byte interpretation
- nba = QByteArray(vp.toBytes())
- # Compare original bytes to toBytes()
- self.assertTrue(b, vp.toBytes())
- # Compare original with new QByteArray data
- self.assertTrue(b, nba.data())
- # Convert original and new to str
- self.assertTrue(str(b), str(nba))
-
- # Modify nba through a memoryview of vp
- mv = memoryview(vp)
- self.assertFalse(mv.readonly)
- mv[6:11] = b'void*'
- self.assertEqual(str(ba), str(b"Hello void*"))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/tools/list-class-hierarchy.py b/sources/pyside2/tests/tools/list-class-hierarchy.py
deleted file mode 100755
index 70075b27e..000000000
--- a/sources/pyside2/tests/tools/list-class-hierarchy.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/python
-
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-
-# This is a small script printing out Qt binding class hierarchies
-# for comparison purposes.
-#
-# Usage:
-#
-# ./list-class-hierarchy.py PySide2 > pyside2.list
-# ./list-class-hierarchy.py PyQt5 > pyqt5.list
-#
-# meld pyside.list pyqt5.list
-
-from __future__ import print_function
-
-import sys
-import pdb
-from inspect import isclass
-
-ignore = ["staticMetaObject",
- "pyqtConfigure",
- "registerUserData",
- "thread",
- ]
-
-def recurse_into(el,obj):
- #s = el.split('.')[-1]
- #pdb.set_trace()
- symbols = []
- for item in sorted(dir(obj)):
- if item[0]=='_':
- continue
- mel = el + '.' + item
- try:
- mobj = eval(mel)
- except Exception:
- continue
-
- if item in ignore:
- continue
- else:
- symbols.append(mel)
-
- if isclass(mobj):
- symbols += recurse_into(mel,mobj)
-
- return symbols
-
-if __name__=='__main__':
- modules = [ 'QtCore',
- 'QtGui',
- 'QtHelp',
- #'QtMultimedia',
- 'QtNetwork',
- #'QtOpenGL',
- 'QtScript',
- 'QtScriptTools',
- 'QtSql',
- 'QtSvg',
- 'QtTest',
- #'QtUiTools',
- 'QtXml',
- 'QtXmlPatterns' ]
-
- libraries = ["PySide2", "PyQt5"]
- librarySymbols = {}
- for l in libraries:
- dictionary = []
- if l =="PyQt5":
- import sip
- sip.setapi('QDate',2)
- sip.setapi('QDateTime',2)
- sip.setapi('QString',2)
- sip.setapi('QTextStream',2)
- sip.setapi('QTime',2)
- sip.setapi('QUrl',2)
- sip.setapi('QVariant',2)
-
- for m in modules:
- exec("from %s import %s" % (l,m), globals(), locals())
- dictionary += recurse_into(m, eval(m))
- librarySymbols[l] = dictionary
-
- print("PyQt5: ", len(librarySymbols["PyQt5"]), " PySide2: ", len(librarySymbols["PySide2"]))
-
- for symbol in librarySymbols["PyQt5"]:
- if not (symbol in librarySymbols["PySide2"]):
- print("Symbol not found in PySide2:", symbol)
diff --git a/sources/pyside2/tests/util/helper/timedqapplication.py b/sources/pyside2/tests/util/helper/timedqapplication.py
deleted file mode 100644
index 4ee9bdc3a..000000000
--- a/sources/pyside2/tests/util/helper/timedqapplication.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Helper classes and functions'''
-
-import unittest
-
-from PySide2.QtCore import QTimer
-from PySide2.QtWidgets import QApplication
-
-
-class TimedQApplication(unittest.TestCase):
- '''Helper class with timed QApplication exec loop'''
-
- def setUp(self, timeout=100):
- '''Setups this Application.
-
- timeout - timeout in milisseconds'''
- self.app = QApplication.instance() or QApplication([])
- QTimer.singleShot(timeout, self.app.quit)
-
- def tearDown(self):
- '''Delete resources'''
- del self.app
diff --git a/sources/pyside2/tests/util/helper/usesqapplication.py b/sources/pyside2/tests/util/helper/usesqapplication.py
deleted file mode 100644
index 1c47d0dfb..000000000
--- a/sources/pyside2/tests/util/helper/usesqapplication.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Helper classes and functions'''
-
-import unittest
-
-from PySide2.QtWidgets import QApplication
-
-
-class UsesQApplication(unittest.TestCase):
- '''Helper class to provide QApplication instances'''
-
- qapplication = True
-
- def setUp(self):
- '''Creates the QApplication instance'''
-
- # Simple way of making instance a singleton
- super(UsesQApplication, self).setUp()
- self.app = QApplication.instance() or QApplication([])
-
- def tearDown(self):
- '''Deletes the reference owned by self'''
- del self.app
- super(UsesQApplication, self).tearDown()
diff --git a/sources/pyside2/tests/util/helper/usesqcoreapplication.py b/sources/pyside2/tests/util/helper/usesqcoreapplication.py
deleted file mode 100644
index aab8f4b25..000000000
--- a/sources/pyside2/tests/util/helper/usesqcoreapplication.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Helper classes and functions'''
-
-import unittest
-
-from PySide2.QtCore import QCoreApplication
-
-_core_instance = None
-
-
-class UsesQCoreApplication(unittest.TestCase):
- '''Helper class for test cases that require an QCoreApplication
- Just connect or call self.exit_app_cb. When called, will ask
- self.app to exit.
- '''
-
- def setUp(self):
- '''Set up resources'''
-
- global _core_instance
- if _core_instance is None:
- _core_instance = QCoreApplication([])
-
- self.app = _core_instance
-
- def tearDown(self):
- '''Release resources'''
- del self.app
-
- def exit_app_cb(self):
- '''Quits the application'''
- self.app.exit(0)
diff --git a/sources/pyside2/tests/util/helper/usesqguiapplication.py b/sources/pyside2/tests/util/helper/usesqguiapplication.py
deleted file mode 100644
index c6124d5dd..000000000
--- a/sources/pyside2/tests/util/helper/usesqguiapplication.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-'''Helper classes and functions'''
-
-import unittest
-
-from PySide2.QtGui import QGuiApplication
-
-
-class UsesQGuiApplication(unittest.TestCase):
- '''Helper class to provide QGuiApplication instances'''
-
- def setUp(self):
- '''Creates the QGuiApplication instance'''
-
- # Simple way of making instance a singleton
- super(UsesQGuiApplication, self).setUp()
- self.app = QGuiApplication.instance() or QGuiApplication([])
-
- def tearDown(self):
- '''Deletes the reference owned by self'''
- del self.app
- super(UsesQGuiApplication, self).tearDown()
diff --git a/sources/pyside2/tests/util/pyqt_diff.py b/sources/pyside2/tests/util/pyqt_diff.py
deleted file mode 100644
index bf755b1f7..000000000
--- a/sources/pyside2/tests/util/pyqt_diff.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-
-'''Script to show the difference between PyQt5 and ours'''
-
-import sys
-
-from color import print_colored
-
-def check_module_diff(module_name):
- '''Difference between PySide2 and PyQt5 versions of qt bindings.
- Returns a tuple with the members present only on PySide2 and only on PyQt5'''
- shiboken_module = getattr(__import__('PySide2.' + module_name), module_name)
- orig_module = getattr(__import__('PyQt5.' + module_name), module_name)
-
- shiboken_set = set(dir(shiboken_module))
- orig_set = set(dir(orig_module))
-
- return sorted(shiboken_set - orig_set), sorted(orig_set - shiboken_set)
-
-
-def main(argv=None):
- if argv is None:
- argv = sys.argv
-
- module_name = argv[1] if len(argv) >= 2 else 'QtCore'
-
- only_shiboken, only_orig = check_module_diff(module_name)
-
- print_colored('Only on Shiboken version')
- print(only_shiboken)
-
- print_colored('Only on SIP version')
- print(only_orig)
-
-if __name__ == '__main__':
- main()
diff --git a/sources/pyside2/.gitattributes b/sources/pyside6/.gitattributes
index adbe833c1..adbe833c1 100644
--- a/sources/pyside2/.gitattributes
+++ b/sources/pyside6/.gitattributes
diff --git a/sources/pyside2/.gitignore b/sources/pyside6/.gitignore
index b2e7c9d7d..b2e7c9d7d 100644
--- a/sources/pyside2/.gitignore
+++ b/sources/pyside6/.gitignore
diff --git a/sources/pyside6/CMakeLists.txt b/sources/pyside6/CMakeLists.txt
new file mode 100644
index 000000000..fbb3f4554
--- /dev/null
+++ b/sources/pyside6/CMakeLists.txt
@@ -0,0 +1,266 @@
+include(cmake/Macros/icecc.cmake) # this must be the first line!
+
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
+
+# Don't ignore targets that do not exist, inside add_dependencies calls.
+cmake_policy(SET CMP0046 NEW)
+
+set (QT_MAJOR_VERSION 6)
+
+project(pysidebindings)
+
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake_helpers/
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shiboken6/data/
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macros/
+ ${CMAKE_MODULE_PATH})
+include(shiboken_helpers)
+include(helpers)
+
+# Don't display "up-to-date / install" messages when installing, to reduce visual clutter.
+if (QUIET_BUILD)
+ set(CMAKE_INSTALL_MESSAGE NEVER)
+endif()
+
+# Override message not to display info messages when doing a quiet build.
+if (QUIET_BUILD AND is_pyside6_superproject_build)
+ function(message)
+ list(GET ARGV 0 MessageType)
+ if (MessageType STREQUAL FATAL_ERROR OR
+ MessageType STREQUAL SEND_ERROR OR
+ MessageType STREQUAL WARNING OR
+ MessageType STREQUAL AUTHOR_WARNING)
+ list(REMOVE_AT ARGV 0)
+ _message(${MessageType} "${ARGV}")
+ endif()
+ endfunction()
+endif()
+
+set(PYSIDE_VERSION_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pyside_version.py")
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
+ ${PYSIDE_VERSION_FILE_PATH}
+)
+execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} "${PYSIDE_VERSION_FILE_PATH}"
+ OUTPUT_VARIABLE PYSIDE_VERSION_OUTPUT
+ ERROR_VARIABLE PYSIDE_VERSION_OUTPUT_ERROR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+if (NOT PYSIDE_VERSION_OUTPUT)
+ message(FATAL_ERROR "Could not identify PySide6 version. Error: ${PYSIDE_VERSION_OUTPUT_ERROR}")
+endif()
+
+list(GET PYSIDE_VERSION_OUTPUT 0 BINDING_API_MAJOR_VERSION)
+list(GET PYSIDE_VERSION_OUTPUT 1 BINDING_API_MINOR_VERSION)
+list(GET PYSIDE_VERSION_OUTPUT 2 BINDING_API_MICRO_VERSION)
+# a - alpha, b - beta, rc - rc
+list(GET PYSIDE_VERSION_OUTPUT 3 BINDING_API_PRE_RELEASE_VERSION_TYPE)
+# the number of the pre release (alpha1, beta3, rc7, etc.)
+list(GET PYSIDE_VERSION_OUTPUT 4 BINDING_API_PRE_RELEASE_VERSION)
+
+if (WIN32)
+ set(PATH_SEP "\;")
+else()
+ set(PATH_SEP ":")
+endif()
+
+find_package(Shiboken6 2.0.0 REQUIRED)
+
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "${SHIBOKEN_BUILD_TYPE}" CACHE STRING "Build Type")
+endif()
+
+if (CMAKE_BUILD_TYPE STREQUAL "Release")
+ add_definitions("-DNDEBUG")
+endif()
+
+if (SHIBOKEN_PYTHON_LIMITED_API)
+ message(STATUS "******************************************************")
+ message(STATUS "** PySide6 Limited API enabled.")
+ message(STATUS "******************************************************")
+endif()
+
+find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core)
+add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
+
+option(BUILD_TESTS "Build tests." TRUE)
+option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
+set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+if(CMAKE_HOST_APPLE)
+ set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "Deprecated. CMake now finds the proper include dir itself.")
+ set(OSX_USE_LIBCPP "OFF" CACHE BOOL "Explicitly link the libc++ standard library (useful for osx deployment targets lower than 10.9.")
+ if(OSX_USE_LIBCPP)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+ endif()
+endif()
+
+# Force usage of the C++17 standard
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+# Obtain QT_INCLUDE_DIR from INTERFACE_INCLUDE_DIRECTORIES which returns a list
+# ../install-qt-6/include/QtCore;../install-qt-6/include
+set(QT_INCLUDE_DIR "")
+get_target_property(QT_INCLUDE_DIR_LIST Qt6::Core INTERFACE_INCLUDE_DIRECTORIES)
+foreach(_Q ${QT_INCLUDE_DIR_LIST})
+ if(NOT "${_Q}" MATCHES "QtCore$")
+ set(QT_INCLUDE_DIR "${_Q}")
+ endif()
+endforeach()
+if (QT_INCLUDE_DIR STREQUAL "")
+ message(FATAL_ERROR "Unable to obtain the Qt include directory")
+endif()
+
+# On macOS, check if Qt is a framework build. This affects how include paths should be handled.
+get_target_property(QtCore_is_framework Qt${QT_MAJOR_VERSION}::Core FRAMEWORK)
+
+if (QtCore_is_framework)
+ # Get the path to the framework dir.
+ get_filename_component(QT_FRAMEWORK_INCLUDE_DIR "${QT_INCLUDE_DIR}/../" ABSOLUTE)
+ message(STATUS "*** QT_FRAMEWORK_INCLUDE_DIR is ${QT_FRAMEWORK_INCLUDE_DIR}")
+
+ # QT_INCLUDE_DIR points to the QtCore.framework directory, so we need to adjust this to point
+ # to the actual include directory, which has include files for non-framework parts of Qt.
+ get_filename_component(QT_INCLUDE_DIR "${QT_INCLUDE_DIR}/../../include" ABSOLUTE)
+endif()
+
+set_cmake_cxx_flags()
+
+message(STATUS "*** computed QT_INCLUDE_DIR as ${QT_INCLUDE_DIR}")
+
+set(BINDING_NAME PySide6)
+
+set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide6 version" FORCE)
+set(PYSIDE_SO_VERSION ${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION})
+if (BINDING_API_PRE_RELEASE_VERSION_TYPE STREQUAL "")
+ set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
+ CACHE STRING "PySide6 version [full]" FORCE)
+else()
+ set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}~${BINDING_API_PRE_RELEASE_VERSION_TYPE}${BINDING_API_PRE_RELEASE_VERSION}"
+ CACHE STRING "PySide6 version [full]" FORCE)
+endif()
+
+compute_config_py_values(BINDING_API_VERSION)
+
+include(PySideModules)
+
+# Set default values for pyside6_global.h
+set (Qt${QT_MAJOR_VERSION}X11Extras_FOUND "0")
+set (Qt${QT_MAJOR_VERSION}Test_FOUND "0")
+set (Qt${QT_MAJOR_VERSION}Widgets_FOUND "0")
+
+collect_essential_modules()
+collect_optional_modules()
+
+# Modules to be built unless specified by -DMODULES on command line
+if (NOT MODULES)
+ set(MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}")
+endif()
+
+# This will contain the set of modules for which bindings are not built.
+set(DISABLED_MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}")
+
+remove_skipped_modules()
+
+# Mark all non-collected modules as disabled. This is used for disabling tests
+# that depend on the disabled modules.
+foreach(m ${DISABLED_MODULES})
+ set(DISABLE_Qt${m} 1)
+endforeach()
+
+
+string(REGEX MATCHALL "[0-9]+" qt_version_helper "${Qt${QT_MAJOR_VERSION}Core_VERSION}")
+
+list(GET qt_version_helper 0 QT_VERSION_MAJOR)
+list(GET qt_version_helper 1 QT_VERSION_MINOR)
+list(GET qt_version_helper 2 QT_VERSION_PATCH)
+unset(qt_version_helper)
+
+set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
+if(ENABLE_VERSION_SUFFIX)
+ set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
+endif()
+
+# no more supported: include(${QT_USE_FILE})
+
+# Configure OS support
+check_os()
+message(STATUS "Detected OS: ${AUTO_OS}")
+
+# Define supported Qt Version
+set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
+
+
+# uninstall target
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+
+# When opening super project, prevent redefinition of uninstall target.
+if (NOT TARGET uninstall)
+ add_custom_target(uninstall "${CMAKE_COMMAND}"
+ -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+endif()
+
+if (NOT PYTHON_SITE_PACKAGES)
+ execute_process(
+ COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "if True:
+ from distutils import sysconfig
+ from os.path import sep
+ print(sysconfig.get_python_lib(1, 0, prefix='${CMAKE_INSTALL_PREFIX}').replace(sep, '/'))
+ "
+ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if (NOT PYTHON_SITE_PACKAGES)
+ message(FATAL_ERROR "Could not detect Python module installation directory.")
+ elseif (APPLE)
+ message(STATUS "!!! The generated bindings will be installed on ${PYTHON_SITE_PACKAGES}, is it right!?")
+ endif()
+endif()
+
+set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken
+ --enable-parent-ctor-heuristic
+ --enable-pyside-extensions
+ --enable-return-value-heuristic
+ --use-isnull-as-nb_nonzero)
+use_protected_as_public_hack()
+
+# Build with Address sanitizer enabled if requested. This may break things, so use at your own risk.
+if (SANITIZE_ADDRESS AND NOT MSVC)
+ setup_sanitize_address()
+endif()
+
+#####################################################################
+# Adding sub-directories to build
+#####################################################################
+
+add_subdirectory(libpyside)
+find_package(Qt${QT_MAJOR_VERSION}Designer)
+if(Qt${QT_MAJOR_VERSION}UiTools_FOUND AND Qt${QT_MAJOR_VERSION}Designer_FOUND)
+ add_subdirectory(plugins)
+endif()
+
+# project directories
+add_subdirectory(PySide6)
+if (BUILD_TESTS)
+ enable_testing()
+ add_subdirectory(tests)
+endif ()
+
+find_program(SPHINX_BUILD sphinx-build)
+find_program(DOT_EXEC dot)
+
+if (QT_SRC_DIR AND SPHINX_BUILD AND DOT_EXEC)
+ add_subdirectory(doc)
+else ()
+ set(DOCS_TARGET_DISABLED_MESSAGE "apidoc generation targets disabled.")
+ if (NOT QT_SRC_DIR)
+ message(STATUS "QT_SRC_DIR variable not set, ${DOCS_TARGET_DISABLED_MESSAGE}")
+ elseif (NOT SPHINX_BUILD)
+ message(STATUS "sphinx-build command not found, ${DOCS_TARGET_DISABLED_MESSAGE}")
+ elseif (NOT DOT_EXEC)
+ message(STATUS "graphviz not found, ${DOCS_TARGET_DISABLED_MESSAGE}")
+ else()
+ message(STATUS "Unknown issue occurred, ${DOCS_TARGET_DISABLED_MESSAGE}")
+ endif()
+endif()
diff --git a/sources/pyside2/COPYING b/sources/pyside6/COPYING
index 9315102f7..9315102f7 100644
--- a/sources/pyside2/COPYING
+++ b/sources/pyside6/COPYING
diff --git a/sources/pyside6/PySide6/CMakeLists.txt b/sources/pyside6/PySide6/CMakeLists.txt
new file mode 100644
index 000000000..cd76db6f2
--- /dev/null
+++ b/sources/pyside6/PySide6/CMakeLists.txt
@@ -0,0 +1,106 @@
+project(pyside6)
+
+# Configure include based on platform
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/pyside6_global.h" @ONLY)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/_config.py" @ONLY)
+# typing support for mypy
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/py.typed.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/py.typed" @ONLY)
+
+# Use absolute path instead of relative path, to avoid ninja build errors due to
+# duplicate file dependency inconsistency.
+set(pyside_version_relative_path "${CMAKE_CURRENT_SOURCE_DIR}/../pyside_version.py")
+get_filename_component(pyside_version_path ${pyside_version_relative_path} ABSOLUTE)
+configure_file("${pyside_version_path}"
+ "${CMAKE_CURRENT_BINARY_DIR}/_git_pyside_version.py" @ONLY)
+
+# qt.conf needs to be placed next to QtWebEngineProcess so that the executable uses the correct
+# Prefix location leading to an existing icu data file. It is needed on Windows, Linux, and macOS
+# non-framework build. In framework build, instead of using qt.conf, Bundle querying is used.
+if (WIN32 OR (UNIX AND NOT APPLE) OR (APPLE AND NOT QtCore_is_framework))
+
+ if (WIN32)
+ # On Windows, the QtWebEngineProcess is directly located in the Prefix, due to not using
+ # a "Qt" subfolder like on the other platforms.
+ set(QT_CONF_PREFIX ".")
+ else()
+ # On Linux and non-framework macOS, the QtWebEngineProcess is in ./libexec, so prefix is one
+ # level higher.
+ set(QT_CONF_PREFIX "..")
+ endif()
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" @ONLY)
+endif()
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/__init__.py"
+ "${CMAKE_CURRENT_BINARY_DIR}/support/__init__.py" COPYONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/generate_pyi.py"
+ "${CMAKE_CURRENT_BINARY_DIR}/support/generate_pyi.py" COPYONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/support/deprecated.py"
+ "${CMAKE_CURRENT_BINARY_DIR}/support/deprecated.py" COPYONLY)
+
+# now compile all modules.
+file(READ "${CMAKE_CURRENT_BINARY_DIR}/pyside6_global.h" pyside6_global_contents)
+
+foreach(shortname IN LISTS all_module_shortnames)
+ set(name "Qt${QT_MAJOR_VERSION}${shortname}")
+ set(_qt_module_name "${name}")
+ if ("${shortname}" STREQUAL "OpenGLFunctions")
+ set(_qt_module_name "Qt${QT_MAJOR_VERSION}Gui")
+ endif()
+ HAS_QT_MODULE(${_qt_module_name}_FOUND Qt${shortname})
+
+ # Create a module header consisting of pyside6_global.h and the module
+ # include. Note: The contents of pyside6_global.h must be copied instead of
+ # just #including it since shiboken will otherwise generate an
+ # #include <pyside6_global.h> for the the type entries originating from it
+ # (cf AbstractMetaBuilderPrivate::setInclude()).
+ set(module_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}_global.h")
+ set(module_header_content "")
+ set(pre_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.pre.h")
+ if(EXISTS "${pre_header}")
+ file(READ "${pre_header}" pre_header_content)
+ set(module_header_content "${pre_header_content}")
+ endif()
+ set(module_header_content "${module_header_content}\n${pyside6_global_contents}")
+ # AxContainer/AxServer from Active Qt do not have module headers
+ if(NOT "${shortname}" STREQUAL "AxContainer" AND NOT "${shortname}" STREQUAL "OpenGLFunctions")
+ set(module_header_content "${module_header_content}\n#include <Qt${shortname}/Qt${shortname}>")
+ endif()
+ set(post_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.post.h")
+ if(EXISTS "${post_header}")
+ file(READ "${post_header}" post_header_content)
+ set(module_header_content "${module_header_content}\n${post_header_content}")
+ endif()
+ file(WRITE ${module_header} "${module_header_content}")
+endforeach()
+
+# install
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
+ DESTINATION "${PYTHON_SITE_PACKAGES}/${BINDING_NAME}${pyside6_SUFFIX}")
+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(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/core_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/gui_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/widgets_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/datavisualization_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/opengl_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/openglfunctions_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/xml_common.xml
+ DESTINATION share/PySide6${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside6_global.h
+ DESTINATION include/${BINDING_NAME}${pyside6_SUFFIX})
diff --git a/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt
new file mode 100644
index 000000000..cb780dca2
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DAnimation/CMakeLists.txt
@@ -0,0 +1,57 @@
+project(Qt3DAnimation)
+
+set(Qt3DAnimation_SRC
+${Qt3DAnimation_GEN_DIR}/qt3danimation_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractanimation_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractanimationclip_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractchannelmapping_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractclipanimator_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qabstractclipblendnode_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qadditiveclipblend_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationaspect_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationcallback_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qanimationclip_wrapper.cpp
+${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_qclipanimator_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qclock_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qkeyframe_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qkeyframeanimation_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qlerpclipblend_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qmorphinganimation_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qmorphtarget_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qskeletonmapping_wrapper.cpp
+${Qt3DAnimation_GEN_DIR}/qt3danimation_qvertexblendanimation_wrapper.cpp
+# module is always needed
+${Qt3DAnimation_GEN_DIR}/qt3danimation_module_wrapper.cpp)
+
+set(Qt3DAnimation_include_dirs
+ ${Qt3DAnimation_SOURCE_DIR}
+ ${Qt3DAnimation_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIR}
+ ${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}
+ ${Qt3DCore_GEN_DIR}
+ ${Qt3DRender_GEN_DIR}
+ ${Qt3DAnimation_GEN_DIR})
+
+set(Qt3DAnimation_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}3DAnimation_LIBRARIES})
+
+set(Qt3DAnimation_deps Qt3DRender)
+
+create_pyside_module(NAME Qt3DAnimation
+ INCLUDE_DIRS Qt3DAnimation_include_dirs
+ LIBRARIES Qt3DAnimation_libraries
+ DEPS Qt3DAnimation_deps
+ TYPESYSTEM_PATH Qt3DAnimation_SOURCE_DIR
+ SOURCES Qt3DAnimation_SRC
+ TYPESYSTEM_NAME ${Qt3DAnimation_BINARY_DIR}/typesystem_3danimation.xml)
diff --git a/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml b/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml
new file mode 100644
index 000000000..9b600fd46
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DAnimation/typesystem_3danimation.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DAnimation">
+ <load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
+ <namespace-type name="Qt3DAnimation">
+ <object-type name="QAbstractAnimation">
+ <enum-type name="AnimationType"/>
+ </object-type>
+ <object-type name="QAbstractAnimationClip"/>
+ <object-type name="QAbstractChannelMapping"/>
+ <object-type name="QAbstractClipAnimator">
+ <enum-type name="Loops"/>
+ </object-type>
+ <object-type name="QAbstractClipBlendNode"/>
+ <object-type name="QAdditiveClipBlend"/>
+ <object-type name="QAnimationAspect"/>
+ <object-type name="QAnimationCallback">
+ <enum-type name="Flag"/>
+ </object-type>
+ <object-type name="QAnimationClip"/>
+ <object-type name="QAnimationClipLoader">
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QAnimationController"/>
+ <object-type name="QAnimationGroup"/>
+ <object-type name="QBlendedClipAnimator"/>
+ <object-type name="QClipAnimator"/>
+ <object-type name="QClock"/>
+ <object-type name="QKeyFrame">
+ <enum-type name="InterpolationType"/>
+ </object-type>
+ <object-type name="QKeyframeAnimation">
+ <enum-type name="RepeatMode"/>
+ </object-type>
+ <object-type name="QLerpClipBlend"/>
+ <object-type name="QMorphingAnimation">
+ <enum-type name="Method"/>
+ </object-type>
+ <object-type name="QMorphTarget"/>
+ <object-type name="QSkeletonMapping"/>
+ <object-type name="QVertexBlendAnimation"/>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt
new file mode 100644
index 000000000..0e8fb7d40
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DCore/CMakeLists.txt
@@ -0,0 +1,54 @@
+project(Qt3DCore)
+
+set(Qt3DCore_SRC
+${Qt3DCore_GEN_DIR}/qt3dcore_qabstractaspect_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qabstractfrontendnodemanager_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qabstractfunctor_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qabstractskeleton_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qarmature_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qaspectengine_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qaspectjob_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qattribute_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qbackendnode_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_qentity_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qgeometry_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qgeometryview_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qjoint_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qnode_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qnodeid_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qnodeidtypepair_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qskeleton_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qskeletonloader_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_qtransform_wrapper.cpp
+${Qt3DCore_GEN_DIR}/qt3dcore_wrapper.cpp
+# module is always needed
+${Qt3DCore_GEN_DIR}/qt3dcore_module_wrapper.cpp)
+
+set(Qt3DCore_include_dirs
+ ${Qt3DCore_SOURCE_DIR}
+ ${Qt3DCore_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}3DCore_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtNetwork_GEN_DIR})
+
+set(Qt3DCore_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}3DCore_LIBRARIES})
+
+set(Qt3DCore_deps QtGui QtNetwork)
+
+create_pyside_module(NAME Qt3DCore
+ INCLUDE_DIRS Qt3DCore_include_dirs
+ LIBRARIES Qt3DCore_libraries
+ DEPS Qt3DCore_deps
+ TYPESYSTEM_PATH Qt3DCore_SOURCE_DIR
+ SOURCES Qt3DCore_SRC
+ TYPESYSTEM_NAME ${Qt3DCore_BINARY_DIR}/typesystem_3dcore.xml)
diff --git a/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml b/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml
new file mode 100644
index 000000000..4ebf48295
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DCore/typesystem_3dcore.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DCore">
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <namespace-type name="Qt3DCore" generate-using="no">
+ <enum-type name="ChangeFlag" flags="ChangeFlags"/>
+ <object-type name="QAbstractAspect"/>
+ <object-type name="QAbstractFrontEndNodeManager" since="6.0">
+ <enum-type name="DirtyNodeFlag" flags="DirtyNodeSet"/>
+ </object-type>
+ <object-type name="QAbstractFunctor" since="6.0"/>
+ <object-type name="QAbstractSkeleton" since="5.10"/>
+ <object-type name="QArmature" since="5.10"/>
+ <object-type name="QAspectEngine">
+ <enum-type name="RunMode" since="5.14"/>
+ <modify-function signature="registerAspect(Qt3DCore::QAbstractAspect*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAspectJob"/>
+ <object-type name="QBackendNode">
+ <enum-type name="Mode"/>
+ </object-type>
+ <object-type name="QAttribute">
+ <enum-type name="AttributeType"/>
+ <enum-type name="VertexBaseType"/>
+ </object-type>
+ <!-- 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">
+ <enum-type name="AccessType"/>
+ <enum-type name="UsageType"/>
+ </object-type>
+ <object-type name="QComponent"/>
+ <object-type name="QEntity">
+ <modify-function signature="addComponent(Qt3DCore::QComponent*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGeometry" since="6.0"/>
+ <object-type name="QGeometryView" since="6.0">
+ <enum-type name="PrimitiveType"/>
+ </object-type>
+ <object-type name="QJoint" since="5.10">
+ <modify-function signature="addChildJoint(Qt3DCore::QJoint*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <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">
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QTransform">
+ <!-- Disambiguate from QtGui/qtransform.h -->
+ <include file-name="Qt3DCore/qtransform.h" location="global"/>
+ </object-type>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt
new file mode 100644
index 000000000..c38c09bbf
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DExtras/CMakeLists.txt
@@ -0,0 +1,78 @@
+project(Qt3DExtras)
+
+set(Qt3DExtras_SRC
+${Qt3DExtras_GEN_DIR}/qt3dextras_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qconegeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qconemesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qcuboidgeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qcuboidmesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qcylindergeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qcylindermesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusemapmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusespecularmapmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qextrudedtextgeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qextrudedtextmesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qfirstpersoncameracontroller_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qforwardrenderer_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qgoochmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qmetalroughmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qmorphphongmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusemapmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusemapalphamaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qnormaldiffusespecularmapmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qorbitcameracontroller_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qpervertexcolormaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qphongmaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qphongalphamaterial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qplanegeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qplanemesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qskyboxentity_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qspheregeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qspheremesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qtext2dentity_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qtexturematerial_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qtorusgeometry_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qtorusmesh_wrapper.cpp
+${Qt3DExtras_GEN_DIR}/qt3dextras_qt3dwindow_wrapper.cpp
+# module is always needed
+${Qt3DExtras_GEN_DIR}/qt3dextras_module_wrapper.cpp)
+
+if (Qt${QT_MAJOR_VERSION}3DExtras_VERSION VERSION_EQUAL 5.10.0
+ OR Qt${QT_MAJOR_VERSION}3DExtras_VERSION VERSION_GREATER 5.10.0)
+ list(APPEND Qt3DExtras_SRC
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractcameracontroller_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractcameracontroller_inputstate_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qabstractspritesheet_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qdiffusespecularmaterial_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritegrid_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritesheet_wrapper.cpp
+ ${Qt3DExtras_GEN_DIR}/qt3dextras_qspritesheetitem_wrapper.cpp)
+endif()
+
+set(Qt3DExtras_include_dirs
+ ${Qt3DExtras_SOURCE_DIR}
+ ${Qt3DExtras_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_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}
+ ${Qt3DCore_GEN_DIR}
+ ${Qt3DRender_GEN_DIR})
+
+set(Qt3DExtras_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}3DExtras_LIBRARIES})
+
+set(Qt3DExtras_deps Qt3DRender)
+
+create_pyside_module(NAME Qt3DExtras
+ INCLUDE_DIRS Qt3DExtras_include_dirs
+ LIBRARIES Qt3DExtras_libraries
+ DEPS Qt3DExtras_deps
+ TYPESYSTEM_PATH Qt3DExtras_SOURCE_DIR
+ SOURCES Qt3DExtras_SRC
+ TYPESYSTEM_NAME ${Qt3DExtras_BINARY_DIR}/typesystem_3dextras.xml)
diff --git a/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml b/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml
new file mode 100644
index 000000000..b5b067168
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DExtras/typesystem_3dextras.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DExtras">
+ <load-typesystem name="Qt3DRender/typesystem_3drender.xml" generate="no"/>
+ <namespace-type name="Qt3DExtras">
+ <object-type name="QAbstractCameraController" since="5.10">
+ <value-type name="InputState"/>
+ </object-type>
+ <object-type name="QAbstractSpriteSheet" since="5.10"/>
+ <object-type name="QConeGeometry"/>
+ <object-type name="QConeMesh"/>
+ <object-type name="QCuboidGeometry"/>
+ <object-type name="QCuboidMesh"/>
+ <object-type name="QCylinderGeometry"/>
+ <object-type name="QCylinderMesh"/>
+ <object-type name="QDiffuseMapMaterial"/>
+ <object-type name="QDiffuseSpecularMaterial" since="5.10"/>
+ <object-type name="QDiffuseSpecularMapMaterial"/>
+ <object-type name="QExtrudedTextGeometry"/>
+ <object-type name="QExtrudedTextMesh"/>
+ <object-type name="QFirstPersonCameraController"/>
+ <object-type name="QForwardRenderer"/>
+ <object-type name="QGoochMaterial"/>
+ <object-type name="QMetalRoughMaterial"/>
+ <object-type name="QMorphPhongMaterial"/>
+ <object-type name="QNormalDiffuseMapAlphaMaterial"/>
+ <object-type name="QNormalDiffuseMapMaterial"/>
+ <object-type name="QNormalDiffuseSpecularMapMaterial"/>
+ <object-type name="QOrbitCameraController"/>
+ <object-type name="QPerVertexColorMaterial"/>
+ <object-type name="QPhongMaterial"/>
+ <object-type name="QPhongAlphaMaterial"/>
+ <object-type name="QPlaneGeometry"/>
+ <object-type name="QPlaneMesh"/>
+ <object-type name="QSkyboxEntity"/>
+ <object-type name="QSphereGeometry"/>
+ <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="QText2DEntity"/>
+ <object-type name="QTextureMaterial"/>
+ <object-type name="QTorusGeometry"/>
+ <object-type name="QTorusMesh"/>
+ <object-type name="Qt3DWindow"/>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt
new file mode 100644
index 000000000..6a58dc881
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DInput/CMakeLists.txt
@@ -0,0 +1,51 @@
+project(Qt3DInput)
+
+set(Qt3DInput_SRC
+${Qt3DInput_GEN_DIR}/qt3dinput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qabstractactioninput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qabstractaxisinput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qabstractphysicaldevice_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qaction_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qactioninput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qanalogaxisinput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qaxis_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qaxisaccumulator_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qaxissetting_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qbuttonaxisinput_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qinputaspect_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qinputchord_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qinputsequence_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qinputsettings_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qkeyboardhandler_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qkeyevent_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qlogicaldevice_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qkeyboarddevice_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qmousedevice_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qmouseevent_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qwheelevent_wrapper.cpp
+${Qt3DInput_GEN_DIR}/qt3dinput_qmousehandler_wrapper.cpp
+# module is always needed
+${Qt3DInput_GEN_DIR}/qt3dinput_module_wrapper.cpp)
+
+set(Qt3DInput_include_dirs
+ ${Qt3DInput_SOURCE_DIR}
+ ${Qt3DInput_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${Qt3DCore_GEN_DIR})
+
+set(Qt3DInput_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}3DInput_LIBRARIES})
+
+set(Qt3DInput_deps Qt3DCore)
+
+create_pyside_module(NAME Qt3DInput
+ INCLUDE_DIRS Qt3DInput_include_dirs
+ LIBRARIES Qt3DInput_libraries
+ DEPS Qt3DInput_deps
+ TYPESYSTEM_PATH Qt3DInput_SOURCE_DIR
+ SOURCES Qt3DInput_SRC
+ TYPESYSTEM_NAME ${Qt3DInput_BINARY_DIR}/typesystem_3dinput.xml)
diff --git a/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml b/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml
new file mode 100644
index 000000000..0df357d19
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DInput/typesystem_3dinput.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DInput">
+ <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="QActionInput"/>
+ <object-type name="QAnalogAxisInput"/>
+ <object-type name="QAxis"/>
+ <object-type name="QAxisAccumulator">
+ <enum-type name="SourceAxisType"/>
+ </object-type>
+ <object-type name="QAxisSetting"/>
+ <object-type name="QButtonAxisInput"/>
+ <object-type name="QInputAspect"/>
+ <object-type name="QInputChord"/>
+ <!-- On windows this raises the following error:
+ type 'Qt3DInput::QInputDeviceIntegration' is specified in typesystem, but not defined.
+ This could potentially lead to compilation errors.
+ <object-type name="QInputDeviceIntegration"/>
+ -->
+ <object-type name="QInputSequence"/>
+ <object-type name="QInputSettings"/>
+ <object-type name="QKeyboardDevice"/>
+ <object-type name="QKeyboardHandler"/>
+ <object-type name="QKeyEvent"/>
+ <object-type name="QLogicalDevice"/>
+ <object-type name="QMouseDevice">
+ <enum-type name="Axis"/>
+ </object-type>
+ <object-type name="QMouseEvent">
+ <enum-type name="Buttons"/>
+ <enum-type name="Modifiers"/>
+ </object-type>
+ <object-type name="QWheelEvent">
+ <enum-type name="Buttons"/>
+ <enum-type name="Modifiers"/>
+ </object-type>
+ <object-type name="QMouseHandler"/>
+ <!-- On windows this raise the following error:
+ qt3dinput_module_wrapper.cpp.obj : error LNK2019:
+ unresolved external symbol "void __cdecl init_Qt3DInput_QPhysicalDeviceCreatedChangeBase(struct _object *)"
+ (?init_Qt3DInput_QPhysicalDeviceCreatedChangeBase@@YAXPAU_object@@@Z) referenced in function _PyInit_Qt3DInput
+ <object-type name="QPhysicalDeviceCreatedChangeBase"/>
+ -->
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt
new file mode 100644
index 000000000..2f4105dfa
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DLogic/CMakeLists.txt
@@ -0,0 +1,32 @@
+project(Qt3DLogic)
+
+set(Qt3DLogic_SRC
+${Qt3DLogic_GEN_DIR}/qt3dlogic_wrapper.cpp
+${Qt3DLogic_GEN_DIR}/qt3dlogic_qframeaction_wrapper.cpp
+${Qt3DLogic_GEN_DIR}/qt3dlogic_qlogicaspect_wrapper.cpp
+# module is always needed
+${Qt3DLogic_GEN_DIR}/qt3dlogic_module_wrapper.cpp)
+
+set(Qt3DLogic_include_dirs
+ ${Qt3DLogic_SOURCE_DIR}
+ ${Qt3DLogic_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${Qt3DCore_GEN_DIR})
+
+set(Qt3DLogic_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}3DLogic_LIBRARIES})
+
+set(Qt3DLogic_deps Qt3DCore)
+
+create_pyside_module(NAME Qt3DLogic
+ INCLUDE_DIRS Qt3DLogic_include_dirs
+ LIBRARIES Qt3DLogic_libraries
+ DEPS Qt3DLogic_deps
+ TYPESYSTEM_PATH Qt3DLogic_SOURCE_DIR
+ SOURCES Qt3DLogic_SRC
+ TYPESYSTEM_NAME ${Qt3DLogic_BINARY_DIR}/typesystem_3dlogic.xml)
diff --git a/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml b/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml
new file mode 100644
index 000000000..ae14b2200
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DLogic/typesystem_3dlogic.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DLogic">
+ <load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
+ <namespace-type name="Qt3DLogic">
+ <object-type name="QFrameAction"/>
+ <object-type name="QLogicAspect"/>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt b/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt
new file mode 100644
index 000000000..969021549
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DRender/CMakeLists.txt
@@ -0,0 +1,140 @@
+project(Qt3DRender)
+
+set(Qt3DRender_SRC
+${Qt3DRender_GEN_DIR}/qt3drender_propertyreaderinterface_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qabstractlight_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qabstractraycaster_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qabstracttexture_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qabstracttextureimage_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qalphacoverage_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qalphatest_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qblendequation_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qblendequationarguments_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qblitframebuffer_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qbuffercapture_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qcamera_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qcameralens_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qcameraselector_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qclearbuffers_wrapper.cpp
+${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_qdepthtest_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qdirectionallight_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qdispatchcompute_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qdithering_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qeffect_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qenvironmentlight_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qfilterkey_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qframegraphnode_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qfrontface_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qfrustumculling_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qgeometryrenderer_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qgraphicsapifilter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlayer_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlayerfilter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetail_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetailboundingsphere_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlevelofdetailswitch_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qlinewidth_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qmaterial_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qmemorybarrier_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qmesh_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qmultisampleantialiasing_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qnodepthmask_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qnodraw_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qnopicking_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qobjectpicker_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpaintedtextureimage_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qparameter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpickevent_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpickingsettings_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpicklineevent_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpickpointevent_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpicktriangleevent_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpointlight_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpointsize_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qpolygonoffset_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qproximityfilter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qraycaster_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qraycasterhit_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrenderaspect_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendercapabilities_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendercapture_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendercapturereply_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrenderpass_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrenderpassfilter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendersettings_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrenderstate_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrenderstateset_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendersurfaceselector_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendertarget_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendertargetoutput_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qrendertargetselector_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qsceneloader_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qscissortest_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qscreenraycaster_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qseamlesscubemap_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qsetfence_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qshaderdata_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qshaderimage_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qshaderprogram_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qshaderprogrambuilder_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qsharedgltexture_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qsortpolicy_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qspotlight_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qstencilmask_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qstenciloperation_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qstenciloperationarguments_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qstenciltest_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qstenciltestarguments_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtechnique_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtechniquefilter_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture1d_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture1darray_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture2d_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture2darray_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture2dmultisample_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture2dmultisamplearray_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexture3d_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturebuffer_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturecubemap_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturecubemaparray_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturedata_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtextureimage_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtextureimagedata_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtextureimagedatagenerator_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtextureloader_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturerectangle_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qtexturewrapmode_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qviewport_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_qwaitfence_wrapper.cpp
+${Qt3DRender_GEN_DIR}/qt3drender_wrapper.cpp
+# module is always needed
+${Qt3DRender_GEN_DIR}/qt3drender_module_wrapper.cpp)
+
+set(Qt3DRender_include_dirs
+ ${Qt3DRender_SOURCE_DIR}
+ ${Qt3DRender_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_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)
+
+create_pyside_module(NAME Qt3DRender
+ INCLUDE_DIRS Qt3DRender_include_dirs
+ LIBRARIES Qt3DRender_libraries
+ DEPS Qt3DRender_deps
+ TYPESYSTEM_PATH Qt3DRender_SOURCE_DIR
+ SOURCES Qt3DRender_SRC
+ TYPESYSTEM_NAME ${Qt3DRender_BINARY_DIR}/typesystem_3drender.xml)
diff --git a/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml b/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml
new file mode 100644
index 000000000..5b2241b7f
--- /dev/null
+++ b/sources/pyside6/PySide6/Qt3DRender/typesystem_3drender.xml
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.Qt3DRender">
+ <load-typesystem name="Qt3DCore/typesystem_3dcore.xml" generate="no"/>
+ <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">
+ <enum-type name="RunMode"/>
+ <enum-type name="FilterMode"/>
+ </object-type>
+ <object-type name="QAbstractTexture">
+ <enum-type name="CubeMapFace"/>
+ <enum-type name="ComparisonFunction"/>
+ <enum-type name="ComparisonMode"/>
+ <enum-type name="HandleType" since="5.13"/>
+ <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="QAlphaCoverage"/>
+ <object-type name="QAlphaTest">
+ <enum-type name="AlphaFunction"/>
+ </object-type>
+ <object-type name="QBlendEquation">
+ <enum-type name="BlendFunction"/>
+ </object-type>
+ <object-type name="QBlendEquationArguments">
+ <enum-type name="Blending"/>
+ </object-type>
+ <object-type name="QBlitFramebuffer" since="5.10">
+ <enum-type name="InterpolationMethod"/>
+ </object-type>
+ <object-type name="QBufferCapture"/>
+ <object-type name="QCamera">
+ <enum-type name="CameraTranslationOption"/>
+ </object-type>
+ <object-type name="QCameraLens">
+ <enum-type name="ProjectionType"/>
+ </object-type>
+ <object-type name="QCameraSelector"/>
+ <object-type name="QClearBuffers">
+ <enum-type name="BufferType" flags="BufferTypeFlags"/>
+ </object-type>
+ <object-type name="QClipPlane"/>
+ <object-type name="QColorMask"/>
+ <object-type name="QComputeCommand">
+ <enum-type name="RunType" since="5.13"/>
+ </object-type>
+ <object-type name="QCullFace">
+ <enum-type name="CullingMode"/>
+ </object-type>
+ <object-type name="QDepthTest">
+ <enum-type name="DepthFunction"/>
+ </object-type>
+ <object-type name="QDirectionalLight"/>
+ <object-type name="QDispatchCompute"/>
+ <object-type name="QDithering"/>
+ <object-type name="QEffect"/>
+ <object-type name="QEnvironmentLight"/>
+ <object-type name="QFilterKey"/>
+ <object-type name="QFrameGraphNode"/>
+ <object-type name="QFrontFace">
+ <enum-type name="WindingDirection"/>
+ </object-type>
+ <object-type name="QFrustumCulling"/>
+ <object-type name="QGeometryRenderer">
+ <enum-type name="PrimitiveType"/>
+ </object-type>
+ <object-type name="QGraphicsApiFilter">
+ <enum-type name="Api"/>
+ <enum-type name="OpenGLProfile"/>
+ </object-type>
+ <object-type name="QLayer"/>
+ <object-type name="QLayerFilter">
+ <enum-type name="FilterMode"/>
+ </object-type>
+ <object-type name="QLevelOfDetail">
+ <enum-type name="ThresholdType"/>
+ </object-type>
+ <object-type name="QLevelOfDetailBoundingSphere"/>
+ <object-type name="QLevelOfDetailSwitch"/>
+ <object-type name="QLineWidth" since="5.10"/>
+ <object-type name="QMaterial"/>
+ <object-type name="QMemoryBarrier">
+ <enum-type name="Operation" flags="Operations"/>
+ </object-type>
+ <object-type name="QMesh">
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QMultiSampleAntiAliasing"/>
+ <object-type name="QNoDepthMask"/>
+ <object-type name="QNoDraw"/>
+ <object-type name="QNoPicking" since="5.14"/>
+ <object-type name="QObjectPicker"/>
+ <object-type name="QPaintedTextureImage"/>
+ <object-type name="QParameter"/>
+ <object-type name="QPickEvent">
+ <enum-type name="Buttons"/>
+ <enum-type name="Modifiers"/>
+ </object-type>
+ <object-type name="QPickLineEvent" since="5.10"/>
+ <object-type name="QPickPointEvent" since="5.10"/>
+ <object-type name="QPickTriangleEvent"/>
+ <object-type name="QPickingSettings">
+ <enum-type name="FaceOrientationPickingMode"/>
+ <enum-type name="PickMethod"/>
+ <enum-type name="PickResultMode"/>
+ </object-type>
+ <object-type name="QPointLight"/>
+ <object-type name="QPointSize">
+ <enum-type name="SizeMode"/>
+ </object-type>
+ <object-type name="QPolygonOffset"/>
+ <object-type name="QProximityFilter" since="5.10"/>
+ <object-type name="QRayCaster" since="5.11"/>
+ <value-type name="QRayCasterHit" since="5.11">
+ <enum-type name="HitType"/>
+ </value-type>
+ <object-type name="QRenderAspect">
+ <enum-type name="SubmissionType"/>
+ </object-type>
+ <object-type name="QRenderCapabilities" since="5.15">
+ <enum-type name="API"/>
+ <enum-type name="Profile"/>
+ </object-type>
+ <object-type name="QRenderCapture"/>
+ <object-type name="QRenderCaptureReply"/>
+ <object-type name="QRenderPass"/>
+ <object-type name="QRenderPassFilter"/>
+ <object-type name="QRenderSettings">
+ <enum-type name="RenderPolicy"/>
+ </object-type>
+ <object-type name="QRenderState"/>
+ <object-type name="QRenderStateSet"/>
+ <object-type name="QRenderSurfaceSelector"/>
+ <object-type name="QRenderTarget"/>
+ <object-type name="QRenderTargetOutput">
+ <enum-type name="AttachmentPoint"/>
+ </object-type>
+ <object-type name="QRenderTargetSelector"/>
+ <object-type name="QSceneLoader">
+ <enum-type name="Status"/>
+ <enum-type name="ComponentType"/>
+ </object-type>
+ <object-type name="QScissorTest"/>
+ <object-type name="QScreenRayCaster" since="5.11"/>
+ <object-type name="QSeamlessCubemap"/>
+ <object-type name="QSetFence" since="5.13">
+ <enum-type name="HandleType"/>
+ </object-type>
+ <object-type name="QShaderData"/>
+ <object-type name="QShaderProgram">
+ <enum-type name="Format"/>
+ <enum-type name="ShaderType"/>
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QShaderImage" since="5.14">
+ <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="QSortPolicy">
+ <enum-type name="SortType"/>
+ </object-type>
+ <object-type name="QSpotLight"/>
+ <object-type name="QStencilMask"/>
+ <object-type name="QStencilOperation"/>
+ <object-type name="QStencilOperationArguments">
+ <enum-type name="FaceMode"/>
+ <enum-type name="Operation"/>
+ </object-type>
+ <object-type name="QStencilTest"/>
+ <object-type name="QStencilTestArguments">
+ <enum-type name="StencilFaceMode"/>
+ <enum-type name="StencilFunction"/>
+ </object-type>
+ <object-type name="QTechnique"/>
+ <object-type name="QTechniqueFilter"/>
+ <object-type name="QTexture1D"/>
+ <object-type name="QTexture1DArray"/>
+ <object-type name="QTexture2D"/>
+ <object-type name="QTexture2DArray"/>
+ <object-type name="QTexture2DMultisample"/>
+ <object-type name="QTexture2DMultisampleArray"/>
+ <object-type name="QTexture3D"/>
+ <object-type name="QTextureBuffer"/>
+ <object-type name="QTextureCubeMap"/>
+ <object-type name="QTextureCubeMapArray"/>
+ <object-type name="QTextureData"/>
+ <object-type name="QTextureImage">
+ <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="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">
+ <enum-type name="HandleType"/>
+ </object-type>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt b/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt
new file mode 100644
index 000000000..7b804385c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAxContainer/CMakeLists.txt
@@ -0,0 +1,44 @@
+project(QtAxContainer)
+
+set(QtAxContainer_SRC
+${QtAxContainer_GEN_DIR}/qaxbase_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxbaseobject_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxbasewidget_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxobject_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxobjectinterface_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscript_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscriptengine_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxscriptmanager_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxselect_wrapper.cpp
+${QtAxContainer_GEN_DIR}/qaxwidget_wrapper.cpp
+# module is always needed
+${QtAxContainer_GEN_DIR}/qtaxcontainer_module_wrapper.cpp)
+
+configure_file("${QtAxContainer_SOURCE_DIR}/QtAxContainer_global.post.h.in"
+ "${QtAxContainer_BINARY_DIR}/QtAxContainer_global.post.h" @ONLY)
+
+set(QtAxContainer_include_dirs
+ ${QtAxContainer_SOURCE_DIR}
+ ${QtAxContainer_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR})
+
+set(QtAxContainer_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}AxContainer_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}AxBase_LIBRARIES})
+
+set(QtAxContainer_deps QtWidgets)
+
+create_pyside_module(NAME QtAxContainer
+ INCLUDE_DIRS QtAxContainer_include_dirs
+ LIBRARIES QtAxContainer_libraries
+ DEPS QtAxContainer_deps
+ TYPESYSTEM_PATH QtAxContainer_SOURCE_DIR
+ SOURCES QtAxContainer_SRC
+ TYPESYSTEM_NAME ${QtAxContainer_BINARY_DIR}/typesystem_axcontainer.xml)
diff --git a/sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in b/sources/pyside6/PySide6/QtAxContainer/QtAxContainer_global.post.h.in
index f4033c4f5..f4033c4f5 100644
--- a/sources/pyside2/PySide2/QtAxContainer/QtAxContainer_global.post.h.in
+++ b/sources/pyside6/PySide6/QtAxContainer/QtAxContainer_global.post.h.in
diff --git a/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml b/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml
new file mode 100644
index 000000000..b8dfc9977
--- /dev/null
+++ b/sources/pyside6/PySide6/QtAxContainer/typesystem_axcontainer.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.QtAxContainer">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+ <rejection class="*" function-name="connectNotify"/>
+ <rejection class="*" function-name="queryInterface"/>
+ <rejection class="*" function-name="qt_metacall"/>
+ <rejection class="*" function-name="qt_static_metacall"/>
+
+ <object-type name="QAxBase"/>
+ <object-type name="QAxBaseObject"/>
+ <object-type name="QAxObject"/>
+ <object-type name="QAxObjectInterface"/>
+ <object-type name="QAxScript">
+ <enum-type name="FunctionFlags"/>
+ </object-type>
+ <object-type name="QAxScriptEngine">
+ <enum-type name="State"/>
+ </object-type>
+ <object-type name="QAxScriptManager">
+ <!-- Ax Servers only -->
+ <modify-function signature="addObject(QObject*)" remove="all"/>
+ </object-type>
+ <object-type name="QAxBaseWidget"/>
+ <object-type name="QAxSelect">
+ <enum-type name="SandboxingLevel"/>
+ </object-type>
+ <object-type name="QAxWidget"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCharts/CMakeLists.txt b/sources/pyside6/PySide6/QtCharts/CMakeLists.txt
new file mode 100644
index 000000000..f43efbc01
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCharts/CMakeLists.txt
@@ -0,0 +1,85 @@
+project(QtCharts)
+
+set(QtCharts_SRC
+${QtCharts_GEN_DIR}/qtcharts_qabstractaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qabstractbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qabstractseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qarealegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qareaseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qbarcategoryaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qbarlegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qbarmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qbarset_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qboxplotlegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qboxplotmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qboxplotseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qboxset_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qcandlesticklegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qcandlestickmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qcandlestickseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qcandlestickset_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qcategoryaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qchart_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qchartview_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qdatetimeaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhbarmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhboxplotmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhcandlestickmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhorizontalbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhorizontalpercentbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhorizontalstackedbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhpiemodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qhxymodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qlegend_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qlegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qlineseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qlogvalueaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpercentbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpielegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpiemodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpieseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpieslice_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qpolarchart_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qscatterseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qsplineseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qstackedbarseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvalueaxis_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvbarmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvboxplotmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvcandlestickmodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvpiemodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qvxymodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qxylegendmarker_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qxymodelmapper_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_qxyseries_wrapper.cpp
+${QtCharts_GEN_DIR}/qtcharts_wrapper.cpp
+# module is always needed
+${QtCharts_GEN_DIR}/qtcharts_module_wrapper.cpp
+)
+
+set(QtCharts_include_dirs ${QtCharts_SOURCE_DIR}
+ ${QtCharts_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Charts_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_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})
+
+set(QtCharts_deps QtCore QtGui QtWidgets)
+
+create_pyside_module(NAME QtCharts
+ INCLUDE_DIRS QtCharts_include_dirs
+ LIBRARIES QtCharts_libraries
+ DEPS QtCharts_deps
+ TYPESYSTEM_PATH QtCharts_SOURCE_DIR
+ SOURCES QtCharts_SRC)
diff --git a/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml b/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml
new file mode 100644
index 000000000..82853b857
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCharts/typesystem_charts.xml
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCharts">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+ <!-- PYSIDE-1101 Removing inherited method to avoid argument conflict
+ on the QChart::scroll overload -->
+ <rejection class="QGraphicsItem" function-name="scroll"/>
+ <namespace-type name="QtCharts">
+ <object-type name="QAbstractAxis" since="5.7">
+ <enum-type name="AxisType"/>
+ </object-type>
+ <object-type name="QAbstractBarSeries" since="5.7">
+ <enum-type name="LabelsPosition"/>
+ <modify-function signature="append(QtCharts::QBarSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="append(QList&lt;QtCharts::QBarSet*&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insert(int,QtCharts::QBarSet*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="take(QtCharts::QBarSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstractSeries" since="5.7">
+ <enum-type name="SeriesType"/>
+ </object-type>
+ <object-type name="QAreaLegendMarker" since="5.7"/>
+ <object-type name="QAreaSeries" since="5.7">
+ <modify-function signature="setUpperSeries(QtCharts::QLineSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setLowerSeries(QtCharts::QLineSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QBarCategoryAxis" since="5.7"/>
+ <object-type name="QBarLegendMarker" since="5.7"/>
+ <object-type name="QBarModelMapper" since="5.7"/>
+ <object-type name="QBarSeries" since="5.7"/>
+ <object-type name="QBarSet" since="5.7"/>
+ <object-type name="QBoxPlotLegendMarker" since="5.7"/>
+ <object-type name="QBoxPlotModelMapper" since="5.7"/>
+ <object-type name="QBoxPlotSeries" since="5.7">
+ <modify-function signature="append(QtCharts::QBoxSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="append(QList&lt;QtCharts::QBoxSet*&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insert(int,QtCharts::QBoxSet*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="take(QtCharts::QBoxSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QBoxSet" since="5.7">
+ <enum-type name="ValuePositions"/>
+ </object-type>
+ <object-type name="QCandlestickLegendMarker" since="5.7"/>
+ <object-type name="QCandlestickModelMapper" since="5.7"/>
+ <object-type name="QCandlestickSeries" since="5.7">
+ <modify-function signature="append(QtCharts::QCandlestickSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="append(QList&lt;QtCharts::QCandlestickSet*&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insert(int,QtCharts::QCandlestickSet*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="take(QtCharts::QCandlestickSet*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QCandlestickSet" since="5.7"/>
+ <object-type name="QCategoryAxis" since="5.7">
+ <enum-type name="AxisLabelsPosition"/>
+ </object-type>
+ <object-type name="QChart" since="5.7">
+ <enum-type name="ChartType"/>
+ <enum-type name="ChartTheme"/>
+ <enum-type name="AnimationOption" flags="AnimationOptions"/>
+ <modify-function signature="addAxis(QtCharts::QAbstractAxis*,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addSeries(QtCharts::QAbstractSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisX(QtCharts::QAbstractAxis*,QtCharts::QAbstractSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisY(QtCharts::QAbstractAxis*,QtCharts::QAbstractSeries*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeAxis(QtCharts::QAbstractAxis*)">
+ <inject-code file="../glue/qtcharts.cpp" snippet="qchart-releaseownership"/>
+ </modify-function>
+ <modify-function signature="removeSeries(QtCharts::QAbstractSeries*)">
+ <inject-code file="../glue/qtcharts.cpp" snippet="qchart-releaseownership"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QChartView" since="5.7">
+ <enum-type name="RubberBand" flags="RubberBands"/>
+ <modify-function signature="QChartView(QtCharts::QChart*,QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setChart(QtCharts::QChart*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QDateTimeAxis" since="5.7"/>
+ <object-type name="QHBarModelMapper" since="5.7"/>
+ <object-type name="QHBoxPlotModelMapper" since="5.7"/>
+ <object-type name="QHCandlestickModelMapper" since="5.7"/>
+ <object-type name="QHorizontalBarSeries" since="5.7"/>
+ <object-type name="QHorizontalPercentBarSeries" since="5.7"/>
+ <object-type name="QHorizontalStackedBarSeries" since="5.7"/>
+ <object-type name="QHPieModelMapper" since="5.7"/>
+ <object-type name="QHXYModelMapper" since="5.7"/>
+ <object-type name="QLegend" since="5.7">
+ <enum-type name="MarkerShape"/>
+ </object-type>
+ <object-type name="QLegendMarker" since="5.7">
+ <enum-type name="LegendMarkerType"/>
+ </object-type>
+ <object-type name="QLineSeries" since="5.7"/>
+ <object-type name="QLogValueAxis" since="5.7"/>
+ <object-type name="QPercentBarSeries" since="5.7"/>
+ <object-type name="QPieLegendMarker" since="5.7"/>
+ <object-type name="QPieModelMapper" since="5.7"/>
+ <object-type name="QPieSlice" since="5.7">
+ <enum-type name="LabelPosition"/>
+ </object-type>
+ <object-type name="QPieSeries" since="5.7">
+ <modify-function signature="append(QtCharts::QPieSlice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="append(QList&lt;QtCharts::QPieSlice*&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insert(int,QtCharts::QPieSlice*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="take(QtCharts::QPieSlice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QPolarChart" since="5.7">
+ <enum-type name="PolarOrientation" flags="PolarOrientations"/>
+ <modify-function signature="addAxis(QtCharts::QAbstractAxis*,QtCharts::QPolarChart::PolarOrientation)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!-- Compile error assigning default flags value -->
+ <modify-function signature="axes(QFlags&lt;QtCharts::QPolarChart::PolarOrientation&gt;,QtCharts::QAbstractSeries*)const" remove="all"/>
+ </object-type>
+ <object-type name="QScatterSeries" since="5.7">
+ <enum-type name="MarkerShape"/>
+ </object-type>
+ <object-type name="QSplineSeries" since="5.7"/>
+ <object-type name="QStackedBarSeries" since="5.7"/>
+ <object-type name="QValueAxis" since="5.7">
+ <enum-type name="TickType"/>
+ </object-type>
+ <object-type name="QVBarModelMapper" since="5.7"/>
+ <object-type name="QVBoxPlotModelMapper" since="5.7"/>
+ <object-type name="QVCandlestickModelMapper" since="5.7"/>
+ <object-type name="QVPieModelMapper" since="5.7"/>
+ <object-type name="QVXYModelMapper" since="5.7"/>
+ <object-type name="QXYLegendMarker" since="5.7"/>
+ <object-type name="QXYModelMapper" since="5.7"/>
+ <object-type name="QXYSeries" since="5.7"/>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt b/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt
new file mode 100644
index 000000000..b38849a75
--- /dev/null
+++ b/sources/pyside6/PySide6/QtConcurrent/CMakeLists.txt
@@ -0,0 +1,31 @@
+project(QtConcurrent)
+
+set(QtConcurrent_SRC
+${QtConcurrent_GEN_DIR}/qtconcurrent_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturevoid_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfutureqstring_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturewatchervoid_wrapper.cpp
+${QtConcurrent_GEN_DIR}/qfuturewatcherqstring_wrapper.cpp
+# module is always needed
+${QtConcurrent_GEN_DIR}/qtconcurrent_module_wrapper.cpp
+)
+
+set(QtConcurrent_include_dirs ${QtConcurrent_SOURCE_DIR}
+ ${QtConcurrent_BINARY_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}
+ )
+set(QtConcurrent_deps QtCore)
+
+create_pyside_module(NAME QtConcurrent
+ INCLUDE_DIRS QtConcurrent_include_dirs
+ LIBRARIES QtConcurrent_libraries
+ DEPS QtConcurrent_deps
+ TYPESYSTEM_PATH QtConcurrent_SOURCE_DIR
+ SOURCES QtConcurrent_SRC)
diff --git a/sources/pyside2/PySide2/QtConcurrent/curr_errors.txt b/sources/pyside6/PySide6/QtConcurrent/curr_errors.txt
index d8405c755..d8405c755 100644
--- a/sources/pyside2/PySide2/QtConcurrent/curr_errors.txt
+++ b/sources/pyside6/PySide6/QtConcurrent/curr_errors.txt
diff --git a/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml b/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml
new file mode 100644
index 000000000..062482b9a
--- /dev/null
+++ b/sources/pyside6/PySide6/QtConcurrent/typesystem_concurrent.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtConcurrent">
+ <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="ReduceOption" flags="ReduceOptions"/>
+ <enum-type name="ThreadFunctionResult"/>
+ <extra-includes>
+ <include file-name="qtconcurrentreducekernel.h" location="global"/>
+ <include file-name="qtconcurrentthreadengine.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+
+ <typedef-type name="QFutureVoid" source="QFuture&lt;void&gt;" disable-wrapper="yes">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ <modify-function signature="isResultReadyAt(int) const" remove="all"/>
+ </typedef-type>
+ <typedef-type name="QFutureQString" source="QFuture&lt;QString&gt;" disable-wrapper="yes">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ </typedef-type>
+ <typedef-type name="QFutureWatcherVoid" source="QFutureWatcher&lt;void&gt;">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </typedef-type>
+ <typedef-type name="QFutureWatcherQString" source="QFutureWatcher&lt;QString&gt;">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </typedef-type>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCore/CMakeLists.txt b/sources/pyside6/PySide6/QtCore/CMakeLists.txt
new file mode 100644
index 000000000..6168055d3
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/CMakeLists.txt
@@ -0,0 +1,208 @@
+project(QtCore)
+
+set(QtCore_gluecode "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp")
+
+if(ENABLE_WIN)
+ set(SPECIFIC_OS_FILES
+ ${QtCore_GEN_DIR}/qwineventnotifier_wrapper.cpp
+ )
+else()
+ set(SPECIFIC_OS_FILES "")
+endif()
+
+set(QtCore_SRC
+${QtCore_GEN_DIR}/qabstractanimation_wrapper.cpp
+${QtCore_GEN_DIR}/qabstracteventdispatcher_timerinfo_wrapper.cpp
+${QtCore_GEN_DIR}/qabstracteventdispatcher_wrapper.cpp
+${QtCore_GEN_DIR}/qabstractitemmodel_wrapper.cpp
+${QtCore_GEN_DIR}/qabstractlistmodel_wrapper.cpp
+${QtCore_GEN_DIR}/qabstractnativeeventfilter_wrapper.cpp
+${QtCore_GEN_DIR}/qabstractproxymodel_wrapper.cpp
+${QtCore_GEN_DIR}/qabstracttablemodel_wrapper.cpp
+${QtCore_GEN_DIR}/qanimationgroup_wrapper.cpp
+${QtCore_GEN_DIR}/qbasicmutex_wrapper.cpp
+${QtCore_GEN_DIR}/qbasictimer_wrapper.cpp
+${QtCore_GEN_DIR}/qbitarray_wrapper.cpp
+${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_yearmonthday_wrapper.cpp
+${QtCore_GEN_DIR}/qcborarray_wrapper.cpp
+${QtCore_GEN_DIR}/qcborerror_wrapper.cpp
+${QtCore_GEN_DIR}/qcbormap_wrapper.cpp
+${QtCore_GEN_DIR}/qcborparsererror_wrapper.cpp
+${QtCore_GEN_DIR}/qcborstreamreader_wrapper.cpp
+${QtCore_GEN_DIR}/qcborstreamwriter_wrapper.cpp
+${QtCore_GEN_DIR}/qcborstringresultbytearray_wrapper.cpp
+${QtCore_GEN_DIR}/qcborstringresultstring_wrapper.cpp
+${QtCore_GEN_DIR}/qcborvalue_wrapper.cpp
+${QtCore_GEN_DIR}/qchildevent_wrapper.cpp
+${QtCore_GEN_DIR}/qcollator_wrapper.cpp
+${QtCore_GEN_DIR}/qcollatorsortkey_wrapper.cpp
+${QtCore_GEN_DIR}/qcommandlineoption_wrapper.cpp
+${QtCore_GEN_DIR}/qcommandlineparser_wrapper.cpp
+${QtCore_GEN_DIR}/qconcatenatetablesproxymodel_wrapper.cpp
+${QtCore_GEN_DIR}/qcoreapplication_wrapper.cpp
+${QtCore_GEN_DIR}/qcryptographichash_wrapper.cpp
+${QtCore_GEN_DIR}/qdatastream_wrapper.cpp
+${QtCore_GEN_DIR}/qdate_wrapper.cpp
+${QtCore_GEN_DIR}/qdatetime_wrapper.cpp
+${QtCore_GEN_DIR}/qdeadlinetimer_wrapper.cpp
+${QtCore_GEN_DIR}/qdir_wrapper.cpp
+${QtCore_GEN_DIR}/qdiriterator_wrapper.cpp
+${QtCore_GEN_DIR}/qdynamicpropertychangeevent_wrapper.cpp
+${QtCore_GEN_DIR}/qeasingcurve_wrapper.cpp
+${QtCore_GEN_DIR}/qelapsedtimer_wrapper.cpp
+${QtCore_GEN_DIR}/qevent_wrapper.cpp
+${QtCore_GEN_DIR}/qeventloop_wrapper.cpp
+${QtCore_GEN_DIR}/qfactoryinterface_wrapper.cpp
+${QtCore_GEN_DIR}/qfile_wrapper.cpp
+${QtCore_GEN_DIR}/qfiledevice_wrapper.cpp
+${QtCore_GEN_DIR}/qfileinfo_wrapper.cpp
+${QtCore_GEN_DIR}/qfileselector_wrapper.cpp
+${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}/qidentityproxymodel_wrapper.cpp
+${QtCore_GEN_DIR}/qiodevice_wrapper.cpp
+${QtCore_GEN_DIR}/qiodevicebase_wrapper.cpp
+${QtCore_GEN_DIR}/qitemselection_wrapper.cpp
+${QtCore_GEN_DIR}/qitemselectionmodel_wrapper.cpp
+${QtCore_GEN_DIR}/qitemselectionrange_wrapper.cpp
+${QtCore_GEN_DIR}/qjsonarray_wrapper.cpp
+${QtCore_GEN_DIR}/qjsondocument_wrapper.cpp
+${QtCore_GEN_DIR}/qjsonparseerror_wrapper.cpp
+${QtCore_GEN_DIR}/qjsonvalue_wrapper.cpp
+${QtCore_GEN_DIR}/qlibraryinfo_wrapper.cpp
+${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}/qmargins_wrapper.cpp
+${QtCore_GEN_DIR}/qmarginsf_wrapper.cpp
+${QtCore_GEN_DIR}/qmessageauthenticationcode_wrapper.cpp
+${QtCore_GEN_DIR}/qmessagelogcontext_wrapper.cpp
+${QtCore_GEN_DIR}/qmetaclassinfo_wrapper.cpp
+${QtCore_GEN_DIR}/qmetaenum_wrapper.cpp
+${QtCore_GEN_DIR}/qmetamethod_wrapper.cpp
+${QtCore_GEN_DIR}/qmetaobject_connection_wrapper.cpp
+${QtCore_GEN_DIR}/qmetaobject_wrapper.cpp
+${QtCore_GEN_DIR}/qmetaproperty_wrapper.cpp
+${QtCore_GEN_DIR}/qmimedata_wrapper.cpp
+${QtCore_GEN_DIR}/qmimedatabase_wrapper.cpp
+${QtCore_GEN_DIR}/qmimetype_wrapper.cpp
+${QtCore_GEN_DIR}/qmodelindex_wrapper.cpp
+${QtCore_GEN_DIR}/qmutex_wrapper.cpp
+${QtCore_GEN_DIR}/qobject_wrapper.cpp
+${QtCore_GEN_DIR}/qoperatingsystemversion_wrapper.cpp
+${QtCore_GEN_DIR}/qparallelanimationgroup_wrapper.cpp
+${QtCore_GEN_DIR}/qpauseanimation_wrapper.cpp
+${QtCore_GEN_DIR}/qpersistentmodelindex_wrapper.cpp
+${QtCore_GEN_DIR}/qpluginloader_wrapper.cpp
+${QtCore_GEN_DIR}/qpoint_wrapper.cpp
+${QtCore_GEN_DIR}/qpointf_wrapper.cpp
+${QtCore_GEN_DIR}/qprocess_wrapper.cpp
+${QtCore_GEN_DIR}/qprocessenvironment_wrapper.cpp
+${QtCore_GEN_DIR}/qpropertyanimation_wrapper.cpp
+${QtCore_GEN_DIR}/qrandomgenerator64_wrapper.cpp
+${QtCore_GEN_DIR}/qrandomgenerator_wrapper.cpp
+${QtCore_GEN_DIR}/qreadlocker_wrapper.cpp
+${QtCore_GEN_DIR}/qreadwritelock_wrapper.cpp
+${QtCore_GEN_DIR}/qrect_wrapper.cpp
+${QtCore_GEN_DIR}/qrectf_wrapper.cpp
+${QtCore_GEN_DIR}/qrecursivemutex_wrapper.cpp
+${QtCore_GEN_DIR}/qregularexpression_wrapper.cpp
+${QtCore_GEN_DIR}/qregularexpressionmatch_wrapper.cpp
+${QtCore_GEN_DIR}/qregularexpressionmatchiterator_wrapper.cpp
+${QtCore_GEN_DIR}/qresource_wrapper.cpp
+${QtCore_GEN_DIR}/qrunnable_wrapper.cpp
+${QtCore_GEN_DIR}/qsavefile_wrapper.cpp
+${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}/qsignalblocker_wrapper.cpp
+${QtCore_GEN_DIR}/qsignalmapper_wrapper.cpp
+${QtCore_GEN_DIR}/qsize_wrapper.cpp
+${QtCore_GEN_DIR}/qsizef_wrapper.cpp
+${QtCore_GEN_DIR}/qsocketdescriptor_wrapper.cpp
+${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}/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_qmutexlocker_wrapper.cpp
+${QtCore_GEN_DIR}/qtemporarydir_wrapper.cpp
+${QtCore_GEN_DIR}/qtemporaryfile_wrapper.cpp
+${QtCore_GEN_DIR}/qtextboundaryfinder_wrapper.cpp
+${QtCore_GEN_DIR}/qtextstream_wrapper.cpp
+${QtCore_GEN_DIR}/qtextstreammanipulator_wrapper.cpp
+${QtCore_GEN_DIR}/qthread_wrapper.cpp
+${QtCore_GEN_DIR}/qthreadpool_wrapper.cpp
+${QtCore_GEN_DIR}/qtime_wrapper.cpp
+${QtCore_GEN_DIR}/qtimeline_wrapper.cpp
+${QtCore_GEN_DIR}/qtimer_wrapper.cpp
+${QtCore_GEN_DIR}/qtimerevent_wrapper.cpp
+${QtCore_GEN_DIR}/qtimezone_offsetdata_wrapper.cpp
+${QtCore_GEN_DIR}/qtimezone_wrapper.cpp
+${QtCore_GEN_DIR}/qtranslator_wrapper.cpp
+${QtCore_GEN_DIR}/qtransposeproxymodel_wrapper.cpp
+${QtCore_GEN_DIR}/qurl_wrapper.cpp
+${QtCore_GEN_DIR}/qurlquery_wrapper.cpp
+${QtCore_GEN_DIR}/quuid_wrapper.cpp
+${QtCore_GEN_DIR}/qvariantanimation_wrapper.cpp
+${QtCore_GEN_DIR}/qversionnumber_wrapper.cpp
+${QtCore_GEN_DIR}/qwaitcondition_wrapper.cpp
+${QtCore_GEN_DIR}/qwritelocker_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamattribute_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamattributes_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamentitydeclaration_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamentityresolver_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamnamespacedeclaration_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamnotationdeclaration_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamreader_wrapper.cpp
+${QtCore_GEN_DIR}/qxmlstreamwriter_wrapper.cpp
+
+${SPECIFIC_OS_FILES}
+# module is always needed
+${QtCore_GEN_DIR}/qtcore_module_wrapper.cpp
+)
+
+configure_file("${QtCore_SOURCE_DIR}/QtCore_global.post.h.in"
+ "${QtCore_BINARY_DIR}/QtCore_global.post.h" @ONLY)
+
+set(QtCore_glue_sources
+ "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp"
+ "${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.h"
+)
+
+configure_file("${QtCore_SOURCE_DIR}/typesystem_core.xml.in"
+ "${QtCore_BINARY_DIR}/typesystem_core.xml" @ONLY)
+
+set(QtCore_include_dirs ${QtCore_SOURCE_DIR}
+ ${QtCore_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${pyside6_SOURCE_DIR}
+ ${libpyside_SOURCE_DIR}
+ )
+set(QtCore_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ )
+
+create_pyside_module(NAME QtCore
+ INCLUDE_DIRS QtCore_include_dirs
+ LIBRARIES QtCore_libraries
+ TYPESYSTEM_PATH QtCore_SOURCE_DIR
+ SOURCES QtCore_SRC
+ STATIC_SOURCES QtCore_gluecode
+ TYPESYSTEM_NAME ${QtCore_BINARY_DIR}/typesystem_core.xml
+ GLUE_SOURCES QtCore_glue_sources
+ )
+
+install(FILES ${pyside6_SOURCE_DIR}/qtcorehelper.h DESTINATION include/PySide6/QtCore/)
diff --git a/sources/pyside2/PySide2/QtCore/QtCore_global.post.h.in b/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in
index 55a49bb88..55a49bb88 100644
--- a/sources/pyside2/PySide2/QtCore/QtCore_global.post.h.in
+++ b/sources/pyside6/PySide6/QtCore/QtCore_global.post.h.in
diff --git a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp b/sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.cpp
index 552191955..552191955 100644
--- a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.cpp
+++ b/sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.cpp
diff --git a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.h b/sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.h
index f6c80fa99..f6c80fa99 100644
--- a/sources/pyside2/PySide2/QtCore/glue/qeasingcurve_glue.h
+++ b/sources/pyside6/PySide6/QtCore/glue/qeasingcurve_glue.h
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core.xml.in b/sources/pyside6/PySide6/QtCore/typesystem_core.xml.in
new file mode 100644
index 000000000..cebafdcc6
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core.xml.in
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCore">
+ <load-typesystem name="QtCore/typesystem_core_@AUTO_OS@.xml" generate="yes"/>
+ <load-typesystem name="QtCore/typesystem_core_common.xml" generate="yes"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
new file mode 100644
index 000000000..c2031abaa
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -0,0 +1,3022 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCore">
+ <load-typesystem name="templates/core_common.xml" generate="no"/>
+
+ <custom-type name="str"/>
+ <custom-type name="PyBytes"/>
+ <custom-type name="PyByteArray"/>
+ <custom-type name="PyCallable"/>
+ <custom-type name="PyObject"/>
+ <custom-type name="PySequence"/>
+ <custom-type name="PyTypeObject"/>
+ <custom-type name="PyUnicode"/>
+ <custom-type name="list of QAbstractAnimation"/>
+<!--
+ <function signature="qChecksum(QByteArrayView data, Qt::ChecksumType)"/>
+-->
+ <function signature="qFastCos(qreal)" since="4.6"/>
+ <function signature="qFastSin(qreal)" since="4.6"/>
+ <function signature="qFuzzyCompare(double,double)"/>
+ <function signature="qFuzzyIsNull(double)" since="4.6"/>
+ <function signature="qIsFinite(double)"/>
+ <function signature="qIsInf(double)"/>
+ <function signature="qIsNaN(double)"/>
+ <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;)"/>
+
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="include-pyside"/>
+
+
+ <add-function signature="qDebug(const char*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ </add-function>
+ <add-function signature="qCritical(const char*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ </add-function>
+ <add-function signature="qFatal(const char*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qfatal"/>
+ </add-function>
+ <add-function signature="qWarning(const char*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="use-stream-for-format-security"/>
+ </add-function>
+
+ <!-- TODO: We do not support void* or const void* as arg -->
+ <rejection class="QMetaObject" function-name="activate"/>
+ <rejection class="QMetaObject" function-name="metacall"/>
+ <rejection class="QMetaObject" function-name="static_metacall"/>
+ <!-- TODO: Support to addGuard(QObject**) -->
+ <rejection class="QMetaObject" function-name="addGuard"/>
+ <rejection class="QMetaObject" function-name="changeGuard"/>
+ <rejection class="QMetaObject" function-name="removeGuard"/>
+
+ <rejection class="QAlgorithmsPrivate"/>
+ <rejection class="QJsonPrivate"/>
+ <rejection class="QTextStreamFunctions"/>
+ <rejection class="QtGlobalStatic"/>
+ <rejection class="QtMetaTypePrivate"/>
+ <rejection class="QtPrivate"/>
+ <rejection class="QtSharedPointer"/>
+ <rejection class="QtStringBuilder"/>
+ <rejection class="std"/>
+
+ <rejection class="QByteArray" field-name="MaxSize"/>
+ <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="trUtf8"/>
+ <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="*" argument-type="QByteArrayDataPtr"/>
+ <rejection class="*" argument-type="^qfloat16&amp;?$"/>
+ <rejection class="*" argument-type="QHashData"/>
+ <rejection class="*" argument-type="QHashData::Node*"/>
+ <rejection class="*" argument-type="QLatin1String"/>
+ <rejection class="*" argument-type="QLinkedListData*"/>
+ <rejection class="*" argument-type="QListData::ArrayCompatibleLayout"/>
+ <rejection class="*" argument-type="QListData::Data*"/>
+ <rejection class="*" argument-type="QListData::NotArrayCompatibleLayout"/>
+ <rejection class="*" argument-type="QList::Node*"/>
+ <rejection class="*" argument-type="QTSMFI"/>
+ <rejection class="*" argument-type="QTSMFC"/>
+ <rejection class="*" argument-type="QMutexData*"/>
+ <rejection class="*" argument-type="QObjectUserData*"/>
+ <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"/>
+
+ <primitive-type name="qint8"/>
+ <primitive-type name="qint16"/>
+ <primitive-type name="qint32"/>
+ <primitive-type name="quint8"/>
+ <primitive-type name="quint16"/>
+ <primitive-type name="quint32"/>
+ <primitive-type name="quint64"/>
+ <primitive-type name="double"/>
+ <primitive-type name="qreal"/>
+ <primitive-type name="float"/>
+ <primitive-type name="qint64"/>
+ <primitive-type name="unsigned long long"/>
+ <primitive-type name="long long"/>
+ <primitive-type name="qlonglong" target-lang-api-name="PyLong"/>
+ <primitive-type name="qulonglong" target-lang-api-name="PyLong"/>
+ <primitive-type name="qsizetype" target-lang-api-name="PyLong"/>
+ <primitive-type name="size_t" target-lang-api-name="PyLong"/>
+ <primitive-type name="short"/>
+ <primitive-type name="signed short"/>
+ <primitive-type name="signed short int"/>
+ <primitive-type name="ushort" target-lang-api-name="PyInt"/>
+ <primitive-type name="unsigned short int"/>
+ <primitive-type name="unsigned short"/>
+ <primitive-type name="char"/>
+ <primitive-type name="signed char"/>
+ <primitive-type name="uchar"/>
+ <primitive-type name="unsigned char"/>
+ <primitive-type name="int"/>
+ <primitive-type name="signed int"/>
+ <primitive-type name="uint"/>
+ <primitive-type name="ulong"/>
+ <primitive-type name="unsigned int"/>
+ <primitive-type name="signed long"/>
+ <primitive-type name="signed long int"/>
+ <primitive-type name="long"/>
+ <primitive-type name="unsigned long int"/>
+ <primitive-type name="unsigned long">
+ <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
+ <include file-name="signalmanager.h" location="global"/>
+ </primitive-type>
+
+ <primitive-type name="bool" target-lang-api-name="PyBool">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pybool"/>
+ <target-to-native>
+ <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <!-- Qt5: add the new pointer-ish types -->
+ <primitive-type name="qintptr" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <primitive-type name="quintptr" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong-quintptr"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong-quintptr"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <primitive-type name="qptrdiff" target-lang-api-name="PyLong">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pylong"/>
+ <target-to-native>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pylong"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="pystring-check"/>
+
+ <primitive-type name="QString" target-lang-api-name="PyUnicode">
+ <include file-name="QString" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode"/>
+ <target-to-native>
+ <add-conversion type="PyUnicode" file="../glue/qtcore.cpp" snippet="conversion-pyunicode"/>
+ <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <primitive-type name="QStringView" target-lang-api-name="PyUnicode" view-on="QString">
+ <include file-name="QStringView" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode"/>
+ </conversion-rule>
+ </primitive-type>
+
+ <primitive-type name="QChar">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/>
+ <target-to-native>
+ <add-conversion type="PyString" check="Shiboken::String::checkChar(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring-char"/>
+ <add-conversion type="PyInt" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
+ <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <primitive-type name="QVariant" target-lang-api-name="PyObject">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-qvariant"/>
+ <target-to-native>
+ <add-conversion type="PyBool" file="../glue/qtcore.cpp" snippet="conversion-pybool"/>
+ <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
+ <add-conversion type="QString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qstring"/>
+ <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"/>
+ <!-- Using PyLong instead of PyInt to support Python2 and 3-->
+ <add-conversion type="PyInt" check="PyInt_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
+ <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-pyint"/>
+ <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"/>
+ <add-conversion type="PyObject" file="../glue/qtcore.cpp" snippet="conversion-pyobject"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariant-conversion"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qvariantmap-check"/>
+ <primitive-type name="QStringList">
+ <include file-name="QStringList" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion">
+ <replace from="%INTYPE_0" to="QString"/>
+ </insert-template>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion">
+ <replace from="%OUTTYPE_0" to="QString"/>
+ </insert-template>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <value-type name="QCborError" since="5.12">
+ <enum-type name="Code"/>
+ <include file-name="qcborcommon.h" location="global"/>
+ </value-type>
+
+ <value-type name="QCborParserError" since="5.12">
+ <include file-name="qcborvalue.h" location="global"/>
+ </value-type>
+
+ <value-type name="QCborValue" since="5.12">
+ <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"/>
+
+ <object-type name="QCborStreamReader" since="5.12">
+ <enum-type name="StringResultCode"/>
+ <enum-type name="Type"/>
+ <include file-name="qcborstream.h" location="global"/>
+ <value-type name="StringResult" generate="no"/>
+ <!-- 64bit (qsizetype = long long) -->
+ <modify-function signature="readStringChunk(char*,qsizetype)" remove="all"/>
+ <!-- 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">
+ <include file-name="qcborstream.h" location="global"/>
+ </object-type>
+
+ <primitive-type name="QJsonObject">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-qjsonobject"/>
+ <target-to-native>
+ <add-conversion type="PyDict" file="../glue/qtcore.cpp" snippet="conversion-qjsonobject-pydict"/>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <primitive-type name="QModelIndexList">
+ <include file-name="qabstractitemmodel.h" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion">
+ <replace from="%INTYPE_0" to="QModelIndex"/>
+ </insert-template>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion">
+ <replace from="%OUTTYPE_0" to="QModelIndex"/>
+ </insert-template>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <container-type name="QSet" type="set">
+ <include file-name="QSet" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <!-- FIXME: Which one is it going to be? -->
+ <container-type name="QList" type="list">
+ <include file-name="QList" location="global"/>
+ <declare-function signature="append(T)" return-type="void"/>
+ <declare-function signature="insert(qsizetype,T)" return-type="void"/>
+ <declare-function signature="prepend(T)" return-type="void"/>
+ <declare-function signature="push_back(T)" return-type="void"/>
+ <declare-function signature="push_front(T)" return-type="void"/>
+ <declare-function signature="removeAll(T)" return-type="void"/>
+ <declare-function signature="removeOne(T)" return-type="void"/>
+ <!-- operator << needs to be declared in inheriting class -->
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <container-type name="QStack" type="stack">
+ <include file-name="QStack" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <container-type name="QQueue" type="queue">
+ <include file-name="QQueue" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cpplist_to_pylist_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="pyseq_to_cpplist_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <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="cppmap_to_pymap_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PyDict">
+ <insert-template name="pydict_to_cppmap_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+ <container-type name="QMap" type="map">
+ <include file-name="QMap" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cppmap_to_pymap_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PyDict">
+ <insert-template name="pydict_to_cppmap_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+ <container-type name="QMultiMap" type="multi-map">
+ <include file-name="QMultiMap" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cppmap_to_pymap_conversion"/>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PyDict">
+ <insert-template name="pydict_to_cppmap_conversion"/>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <container-type name="QPair" type="pair">
+ <include file-name="QPair" location="global"/>
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-qpair"/>
+ <target-to-native>
+ <add-conversion type="PySequence" file="../glue/qtcore.cpp" snippet="conversion-qpair-pysequence"/>
+ </target-to-native>
+ </conversion-rule>
+ </container-type>
+
+ <rejection class="*" function-name="d_func"/>
+ <rejection class="*" function-name="data_ptr"/>
+ <rejection class="*" function-name="detach"/>
+ <rejection class="*" function-name="isDetached"/>
+ <rejection class="*" field-name="d_ptr"/>
+ <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"/>
+ <rejection class="Qt" function-name="qt_getEnumMetaObject"/>
+ <rejection class="Qt" function-name="qt_getEnumName"/>
+
+ <namespace-type name="Qt">
+ <enum-type name="AlignmentFlag" flags="Alignment"/>
+ <enum-type name="AnchorPoint" since="4.6"/>
+ <enum-type name="ApplicationAttribute"/>
+ <enum-type name="ApplicationState" flags="ApplicationStates" since="5.1"/>
+ <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="CheckState"/>
+ <enum-type name="ClipOperation"/>
+ <enum-type name="ConnectionType"/>
+ <enum-type name="ContextMenuPolicy"/>
+ <enum-type name="CoordinateSystem" since="4.6"/>
+ <enum-type name="Corner"/>
+ <enum-type name="CursorShape"/>
+ <enum-type name="DateFormat"/>
+ <enum-type name="DayOfWeek"/>
+ <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="EventPriority"/>
+ <enum-type name="FillRule"/>
+ <enum-type name="FindChildOption" flags="FindChildOptions" since="5.0"/>
+ <enum-type name="FocusPolicy"/>
+ <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="GlobalColor"/>
+ <enum-type name="HighDpiScaleFactorRoundingPolicy" since="5.14"/>
+ <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="ItemFlag" flags="ItemFlags"/>
+ <enum-type name="ItemSelectionMode"/>
+ <enum-type name="ItemSelectionOperation" since="5.5"/>
+ <enum-type name="Key"/>
+ <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="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="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="ScrollBarPolicy"/>
+ <enum-type name="ScrollPhase" since="5.2"/>
+ <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="TextElideMode"/>
+ <enum-type name="TextFlag"/>
+ <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="TimeSpec"/>
+ <enum-type name="ToolBarArea" flags="ToolBarAreas"/>
+ <enum-type name="ToolBarAreaSizes"/>
+ <enum-type name="ToolButtonStyle"/>
+ <enum-type name="TouchPointState" flags="TouchPointStates" since="4.6"/>
+ <enum-type name="TransformationMode"/>
+ <enum-type name="UIEffect"/>
+ <enum-type name="WhiteSpaceMode"/>
+ <enum-type name="WidgetAttribute"/>
+ <enum-type name="WindowFrameSection"/>
+ <enum-type name="WindowModality"/>
+ <enum-type name="WindowState" flags="WindowStates"/>
+ <enum-type name="WindowType" flags="WindowFlags"/>
+ <enum-type name="CursorMoveStyle" since="4.8" revision="4800"/>
+
+ </namespace-type>
+
+ <add-function signature="QEnum(PyObject*)" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qenum"/>
+ </add-function>
+ <add-function signature="QFlag(PyObject*)" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qflag"/>
+ </add-function>
+
+ <add-function signature="__init_feature__()">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-init-feature"/>
+ </add-function>
+
+ <add-function signature="qAbs(double)" return-type="double">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qabs"/>
+ </add-function>
+
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-postroutine"/>
+ <add-function signature="qAddPostRoutine(PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-addpostroutine"/>
+ </add-function>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-qaddpostroutine"/>
+
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-version"/>
+
+ <!-- WARNING: There is an issue when adding this code to an external file -->
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qt-module-shutdown"/>
+ <add-function signature="__moduleShutdown()">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
+ </add-function>
+
+ <!--signal/slot-->
+ <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"/>
+ <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">
+ <enum-type name="ForeverConstant"/>
+ </value-type>
+
+ <value-type name="QElapsedTimer" since="4.7">
+ <enum-type name="ClockType" since="4.7"/>
+ </value-type>
+
+ <object-type name="QAbstractTableModel" polymorphic-id-expression="qobject_cast&lt;QAbstractTableModel*&gt;(%1)">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <value-type name="QLine" hash-function="PySide::hash">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iiii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qline-hash"/>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="iiii"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+ <value-type name="QLineF">
+ <enum-type name="IntersectionType"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dddd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dddd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <modify-function signature="intersects(const QLineF &amp;,QPointF*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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"/>
+ <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.
+ </inject-documentation>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qresource-data"/>
+ </modify-function>
+
+ <modify-function signature="unregisterResource(const uchar*,const QString&amp;)" rename="unregisterResourceData">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
+ </modify-function>
+ <modify-function signature="registerResource(const uchar*,const QString&amp;)" rename="registerResourceData">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qresource-registerResource"/>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QBasicTimer"/>
+ <value-type name="QByteArrayMatcher"/>
+ <value-type name="QCalendar" since="5.14">
+ <value-type name="YearMonthDay"/>
+ <enum-type name="System"/>
+ </value-type>
+ <value-type name="QDate" hash-function="PySide::hash" >
+ <inject-code class="native" position="beginning">
+ <insert-template name="pydatetime_importandcheck_function">
+ <replace from="$DATETIMETYPE" to="PyDate"/>
+ </insert-template>
+ </inject-code>
+ <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"/>
+ </target-to-native>
+ </conversion-rule>
+ <extra-includes>
+ <include file-name="datetime.h" location="global"/>
+ </extra-includes>
+ <add-function signature="__repr__" return-type="PyObject">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="toPython()" return-type="PyObject">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-topython"/>
+ </add-function>
+ <modify-function signature="getDate(int*,int*,int*)const" >
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(year, month, day)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdate-getdate"/>
+ </modify-function>
+ <modify-function signature="weekNumber(int*)const" >
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <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">
+ <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>
+ <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"/>
+ </target-to-native>
+ </conversion-rule>
+ <extra-includes>
+ <include file-name="datetime.h" location="global"/>
+ </extra-includes>
+ <!-- Somewhat internal constructor used to pickle QDateTime -->
+ <add-function signature="QDateTime(int,int,int,int,int,int,int,int)">
+ <modify-argument index="8">
+ <replace-default-expression with="Qt::LocalTime"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-1"/>
+ </add-function>
+ <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>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i, %i, %i, %i, %i, %i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iiiiiiii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.date().year(), %CPPSELF.date().month(), %CPPSELF.date().day(), %CPPSELF.time().hour(), %CPPSELF.time().minute(), %CPPSELF.time().second(), %CPPSELF.time().msec(), (int)%CPPSELF.timeSpec()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="toPython()" return-type="PyObject">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qdatetime-topython"/>
+ </add-function>
+ </value-type>
+ <value-type name="QDir">
+ <enum-type name="Filter" flags="Filters"/>
+ <enum-type name="SortFlag" flags="SortFlags"/>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="s"/>
+ <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.path())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QPoint" hash-function="PySide::hash">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="ii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </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">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="ii"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!--### Functions removed because they return references to Python imutable objects -->
+ <modify-function signature="rx()" remove="all"/>
+ <modify-function signature="ry()" remove="all"/>
+ <!--### -->
+ </value-type>
+ <value-type name="QPointF">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!--### Functions removed because they return references to Python imutable objects -->
+ <modify-function signature="rx()" remove="all"/>
+ <modify-function signature="ry()" remove="all"/>
+ <!--### -->
+ </value-type>
+ <value-type name="QRect" hash-function="PySide::hash">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iiii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
+ </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">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getRect(int*,int*,int*,int*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ </value-type>
+ <value-type name="QRectF">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!--
+ FIXME These functions return qreal. Will convert to double (format
+ string) mess things up in other architectures?
+ -->
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dddd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <modify-function signature="getCoords(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getRect(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ </value-type>
+ <value-type name="QSize" hash-function="PySide::hash">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="ii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </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">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="ii"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!--### Functions removed because they return references to Python imutable objects -->
+ <modify-function signature="rheight()" remove="all"/>
+ <modify-function signature="rwidth()" remove="all"/>
+ <!--### -->
+ </value-type>
+ <value-type name="QSizeF">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!--### Functions removed because they return references to Python imutable objects -->
+ <modify-function signature="rheight()" remove="all"/>
+ <modify-function signature="rwidth()" remove="all"/>
+ <!--### -->
+ </value-type>
+
+ <value-type name="QTime" hash-function="PySide::hash">
+ <inject-code class="native" position="beginning">
+ <insert-template name="pydatetime_importandcheck_function">
+ <replace from="$DATETIMETYPE" to="PyTime"/>
+ </insert-template>
+ </inject-code>
+ <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"/>
+ </target-to-native>
+ </conversion-rule>
+
+ <extra-includes>
+ <include file-name="datetime.h" location="global"/>
+ </extra-includes>
+
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%i, %i, %i, %i"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iiii"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="toPython()" return-type="PyObject">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtime-topython"/>
+ </add-function>
+ </value-type>
+ <value-type name="QPersistentModelIndex" hash-function="qHash">
+ <modify-function signature="internalPointer()const">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_internal_pointer" />
+ </inject-code>
+ </modify-function>
+ <modify-function signature="operator const QModelIndex&amp;()const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QTimeZone">
+ <enum-type name="TimeType"/>
+ <enum-type name="NameType"/>
+ <value-type name="OffsetData"/>
+ </value-type>
+
+ <value-type name="QUuid">
+ <enum-type name="StringFormat" since="5.11"/>
+ <enum-type name="Variant"/>
+ <enum-type name="Version"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="'%s'"/>
+ <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="s"/>
+ <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMimeType" since="5.0"/>
+ <object-type name="QMimeDatabase" since="5.0">
+ <enum-type name="MatchMode"/>
+ </object-type>
+
+ <value-type name="QLocale">
+ <enum-type name="Country"/>
+ <enum-type name="DataSizeFormat" flags="DataSizeFormats" since="5.10"/>
+ <enum-type name="FloatingPointPrecisionOption" since="5.7"/>
+ <enum-type name="FormatType"/>
+ <enum-type name="Language"/>
+ <enum-type name="MeasurementSystem"/>
+ <enum-type name="NumberOption" flags="NumberOptions"/>
+ <enum-type name="Script" since="4.8" revision="4800"/>
+ <enum-type name="CurrencySymbolFormat" since="4.8" revision="4800"/>
+ <enum-type name="QuotationStyle" since="4.8" revision="4800"/>
+ <!--### All those C++ number types have the same representation in Python -->
+ <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"/>
+ <!--### -->
+ <extra-includes>
+ <include file-name="QDate" location="global"/>
+ </extra-includes>
+ <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-argument index="2">
+ <rename to="format"/>
+ </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">
+ <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="toULongLong(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="toDouble(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(float, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toFloat(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(float, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toInt(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="toLongLong(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="toShort(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="toUShort(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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>
+ </value-type>
+ <value-type name="QBitArray" hash-function="qHash" >
+ <add-function signature="__len__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-len"/>
+ </add-function>
+ <add-function signature="__getitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-getitem"/>
+ </add-function>
+ <add-function signature="__setitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbitarray-setitem"/>
+ </add-function>
+ </value-type>
+ <object-type name="QLockFile">
+ <enum-type name="LockError"/>
+ <modify-function signature="isLocked()const" allow-thread="yes"/>
+ <modify-function signature="lock()" allow-thread="yes"/>
+ <modify-function signature="removeStaleLockFile()" allow-thread="yes"/>
+ <modify-function signature="tryLock(int)" allow-thread="yes"/>
+ <modify-function signature="unlock()" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QMessageAuthenticationCode"/>
+ <object-type name="QSignalBlocker"/>
+ <value-type name="QStorageInfo"/>
+ <!-- QReadWriteLock does not have a copy ctor! -->
+ <object-type name="QReadWriteLock">
+ <enum-type name="RecursionMode"/>
+ <modify-function signature="lockForRead()" allow-thread="yes"/>
+ <modify-function signature="tryLockForRead(int)" allow-thread="yes"/>
+ <modify-function signature="lockForWrite()" allow-thread="yes"/>
+ <modify-function signature="tryLockForWrite(int)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QReadLocker">
+ <modify-function signature="QReadLocker(QReadWriteLock*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="relock()" allow-thread="yes"/>
+ <add-function signature="__enter__()"/>
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
+ </add-function>
+ </object-type>
+ <object-type name="QWriteLocker">
+ <modify-function signature="QWriteLocker(QReadWriteLock*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="relock()" allow-thread="yes"/>
+ <add-function signature="__enter__()"/>
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
+ </add-function>
+ </object-type>
+ <object-type name="QDirIterator">
+ <enum-type name="IteratorFlag" flags="IteratorFlags"/>
+ </object-type>
+ <object-type name="QThread">
+ <inject-code file="../glue/qtcore.cpp" class="native" position="beginning" snippet="qthread_pthread_cleanup"/>
+ <enum-type name="Priority"/>
+ <modify-function signature="currentThreadId()" remove="all"/>
+ <modify-function signature="run()" allow-thread="yes">
+ <inject-code file="../glue/qtcore.cpp" class="native" position="beginning"
+ snippet="qthread_pthread_cleanup_install"/>
+ <inject-code file="../glue/qtcore.cpp" class="native" position="end"
+ snippet="qthread_pthread_cleanup_uninstall"/>
+ </modify-function>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="msleep(unsigned long)" allow-thread="yes"/>
+ <modify-function signature="sleep(unsigned long)" allow-thread="yes"/>
+ <modify-function signature="usleep(unsigned long)" allow-thread="yes"/>
+ <modify-function signature="wait(QDeadlineTimer)" allow-thread="yes"/>
+ <modify-function signature="wait(unsigned long)" allow-thread="yes"/>
+ <modify-function signature="yieldCurrentThread()" allow-thread="yes"/>
+ <modify-function signature="start(QThread::Priority)" allow-thread="yes">
+ <modify-argument index="1">
+ <rename to="priority"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="exit(int)" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QAbstractItemModel">
+ <enum-type name="CheckIndexOption" flags="CheckIndexOptions" since="5.11"/>
+ <enum-type name="LayoutChangeHint"/>
+ <!-- This function was replaced by a added function -->
+ <modify-function signature="createIndex(int,int,const void*)const" remove="all"/>
+ <!-- This function is the same as createIndex(int, int, int)const -->
+ <modify-function signature="createIndex(int,int,quintptr)const">
+ <modify-argument index="3">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ </modify-function>
+ <add-function signature="createIndex(int,int,PyObject*)const" return-type="QModelIndex">
+ <modify-argument index="1">
+ <rename to="row"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <rename to="column"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <rename to="ptr"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qabstractitemmodel-createindex"/>
+ <inject-documentation mode="append" format="target">
+ Creates a model index for the given row and column with the internal pointer ptr.
+ When using a QSortFilterProxyModel, its indexes have their own internal pointer.
+ It is not advisable to access this internal pointer outside of the model.
+ Use the data() function instead.
+ This function provides a consistent interface that model subclasses must use to create model indexes.
+
+ .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference
+ incremented during the QModelIndex life time. So it is necessary to keep the object used
+ on ptr argument alive during the whole process.
+ Do not destroy the object if you are not sure about that.
+ </inject-documentation>
+ </add-function>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qabstractitemmodel"/>
+ <modify-function signature="mimeData(QModelIndexList)const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="data(const QModelIndex&amp;,int)const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </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"/>
+ <modify-function signature="layoutChanged(const QList&lt;QPersistentModelIndex&gt;&amp;,QAbstractItemModel::LayoutChangeHint)" allow-thread="yes"/>
+ <modify-function signature="beginResetModel()" allow-thread="yes"/>
+ <modify-function signature="endResetModel()" allow-thread="yes"/>
+ </object-type>
+ <value-type name="QItemSelection">
+ <include file-name="QList" location="global"/>
+ <!-- Expose operator==, != inherited from QList, which the parser does
+ not see due to the TMP expression of the return type. -->
+ <add-function signature="operator==(const QItemSelection&amp;)" return-type="bool"/>
+ <add-function signature="operator!=(const QItemSelection&amp;)" return-type="bool"/>
+ </value-type>
+
+ <object-type name="QItemSelectionModel">
+ <extra-includes>
+ <include file-name="QItemSelection" location="global"/>
+ </extra-includes>
+ <enum-type name="SelectionFlag" flags="SelectionFlags"/>
+ </object-type>
+
+ <value-type name="QItemSelectionRange">
+ </value-type>
+ <object-type name="QAbstractProxyModel" polymorphic-id-expression="qobject_cast&lt;QAbstractProxyModel*&gt;(%1)">
+ <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="QSortFilterProxyModel">
+ <extra-includes>
+ <include file-name="QItemSelection" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="setSourceModel(QAbstractItemModel*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QIdentityProxyModel"/>
+ <object-type name="QTransposeProxyModel" since="5.13"/>
+ <!-- QObject is created manually -->
+ <object-type name="QObject">
+ <extra-includes>
+ <include file-name="QThread" location="global"/>
+ <include file-name="QCoreApplication" location="global"/>
+ <include file-name="signalmanager.h" location="local"/>
+ </extra-includes>
+ <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>
+
+ <modify-function signature="deleteLater()">
+ <modify-argument index="this">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <!-- Invalidate-after-use stuff -->
+ <modify-function signature="childEvent(QChildEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="customEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="event(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="eventFilter(QObject*,QEvent*)">
+ <modify-argument index="2" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="timerEvent(QTimerEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <!-- End of Invalidate-after-use fix -->
+ <modify-function signature="parent()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setParent(QObject*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="connect(const QObject*,const char*,const char*,Qt::ConnectionType)const">
+ <modify-argument index="4">
+ <rename to="type"/>
+ </modify-argument>
+ <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>
+ <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-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)" return-type="bool" static="yes">
+ <modify-argument index="4">
+ <rename to="type"/>
+ <replace-default-expression with="Qt::AutoConnection"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-connect-4"/>
+ </add-function>
+ <!-- static version -->
+ <add-function signature="connect(const char*,PyCallable*,Qt::ConnectionType)" return-type="bool">
+ <modify-argument index="3">
+ <rename to="type"/>
+ <replace-default-expression with="Qt::AutoConnection"/>
+ </modify-argument>
+ <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)" return-type="bool">
+ <modify-argument index="4">
+ <rename to="type"/>
+ <replace-default-expression with="Qt::AutoConnection"/>
+ </modify-argument>
+ <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">
+ <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">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-disconnect-2"/>
+ </add-function>
+
+
+ <inject-code class="native" file="../glue/qtcore.cpp" snippet="qobject-findchild-1"/>
+ <add-function signature="findChild(PyTypeObject*,const QString&amp;)" return-type="PyObject*">
+ <inject-documentation format="target" mode="append">
+ To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child:
+
+ ::
+
+ ...
+ parent = QWidget()
+ ...
+ # The first argument must be the child type
+ child1 = parent.findChild(QPushButton, "child_button")
+ child2 = parent.findChild(QWidget, "child_widget")
+
+ </inject-documentation>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchild-2"/>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ </add-function>
+ <add-function signature="findChildren(PyTypeObject*,const QString&amp;)" return-type="PySequence*" >
+ <inject-documentation format="target" mode="append">
+ Like the method *findChild*, the first parameter should be the child's type.
+ </inject-documentation>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ </add-function>
+ <add-function signature="findChildren(PyTypeObject*,const QRegularExpression&amp;)" return-type="PySequence*" >
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-findchildren"/>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </add-function>
+
+ <add-function signature="tr(const char*,const char*,int)" return-type="QString">
+ <modify-argument index="2">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <replace-default-expression with="-1"/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-tr"/>
+ </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"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="sender()const" allow-thread="yes">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <!-- This is not supported due the lack of information durring the call with no arguments, this can cause a memory leak -->
+ <modify-function signature="disconnect(const char*,const QObject*,const char*)const">
+ <modify-argument index="1">
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-default-expression />
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstractListModel" polymorphic-id-expression="qobject_cast&lt;QAbstractListModel*&gt;(%1)">
+ <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="QUrl" hash-function="PySide::hash">
+ <!-- Qt5: lots of changes -->
+ <enum-type name="ComponentFormattingOption" flags="ComponentFormattingOptions,FormattingOptions"/>
+ <!-- note: above duplication of attribute is not by default XML compliant! -->
+ <enum-type name="UrlFormattingOption"/>
+ <enum-type name="UserInputResolutionOption" flags="UserInputResolutionOptions"/>
+ <enum-type name="ParsingMode"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="'%s'"/>
+ <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.toString())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="s"/>
+ <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.toString())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+ <value-type name="QRegularExpression">
+ <enum-type name="WildcardConversionOption" flags="WildcardConversionOptions" since="6.0"/>
+ <enum-type name="MatchOption" flags="MatchOptions"/>
+ <enum-type name="MatchType"/>
+ <enum-type name="PatternOption" flags="PatternOptions"/>
+ </value-type>
+ <value-type name="QRegularExpressionMatch"/>
+ <value-type name="QRegularExpressionMatchIterator"/>
+
+ <value-type name="QFileInfo">
+ <extra-includes>
+ <include file-name="QDateTime" location="global"/>
+ <include file-name="QDir" location="global"/>
+ </extra-includes>
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="s"/>
+ <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.filePath())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+ <value-type name="QByteArray" hash-function="qHash">
+ <enum-type name="Base64Option" flags="Base64Options" since="5.2"/>
+ <enum-type name="Base64DecodingStatus" since="5.15"/>
+ <value-type name="FromBase64Result" since="5.15"/>
+ <conversion-rule>
+ <target-to-native>
+ <add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
+ <add-conversion type="PyBytes" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytes"/>
+ <add-conversion type="PyByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pybytearray"/>
+ <add-conversion type="PyString" check="Shiboken::String::check(%in) &amp;&amp; !PyUnicode_Check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qbytearray-pystring"/>
+ </target-to-native>
+ </conversion-rule>
+
+ <extra-includes>
+ <!-- qt5: this is a pre-defined macro <include file-name="QNoImplicitBoolCast" location="global"/> -->
+ </extra-includes>
+
+ <!-- ### These overloads must be removed accept strings with \x00 in their contents -->
+ <modify-function signature="append(const char*)" remove="all"/>
+ <modify-function signature="prepend(const char*)" remove="all"/>
+ <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator==(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator>(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator>=(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator&lt;=(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator!=(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator+=(const char*)" remove="all"/>
+ <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
+ <modify-function signature="operator+(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator+(QByteArray,const char*)" remove="all"/>
+ <add-function signature="operator+(PyBytes,QByteArray)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-1"/>
+ </add-function>
+ <add-function signature="operator+(PyByteArray, QByteArray)" return-type="QByteArray">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-2"/>
+ </add-function>
+ <add-function signature="operator+(PyByteArray)" return-type="QByteArray">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-3"/>
+ </add-function>
+ <add-function signature="operator+=(PyByteArray)" return-type="QByteArray">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplusequal"/>
+ </add-function>
+ <add-function signature="operator==(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorequalequal"/>
+ </add-function>
+ <add-function signature="operator!=(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatornotequal"/>
+ </add-function>
+ <add-function signature="operator&gt;(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreater"/>
+ </add-function>
+ <add-function signature="operator&gt;=(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorgreaterequal"/>
+ </add-function>
+ <add-function signature="operator&lt;(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlower"/>
+ </add-function>
+ <add-function signature="operator&lt;=(PyUnicode)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorlowerequal"/>
+ </add-function>
+ <!-- ### -->
+
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-repr"/>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="N"/>
+ <replace from="%REDUCE_ARGS" to="PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size())"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QByteArray(PyByteArray)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-2"/>
+ </add-function>
+ <add-function signature="QByteArray(PyBytes)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-3"/>
+ </add-function>
+ <!-- buffer protocol -->
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-bufferprotocol"/>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qbytearray-py3"/>
+
+ <modify-function signature="data()">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-data"/>
+ </modify-function>
+
+ <!-- removed functions -->
+ <!--### Functions removed because they return STL-like iterators -->
+ <modify-function signature="begin()" remove="all"/>
+ <modify-function signature="begin()const" remove="all"/>
+ <modify-function signature="constBegin()const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <modify-function signature="constEnd()const" remove="all"/>
+ <modify-function signature="end()" remove="all"/>
+ <modify-function signature="end()const" remove="all"/>
+ <!--### -->
+
+ <!--### Functions removed because they provide useless overloads from Python point of view -->
+ <modify-function signature="number(uint,int)" remove="all"/>
+ <modify-function signature="number(qulonglong,int)" remove="all"/>
+ <modify-function signature="operator+=(const char*)" remove="all"/>
+ <modify-function signature="operator+(char,QByteArray)" remove="all"/>
+ <modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator&lt;=(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
+ <modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
+ <!-- Those types have the same representation in Python, an overload
+ would be useless and cause overflow errors. -->
+ <modify-function signature="setNum(uint,int)" remove="all"/>
+ <modify-function signature="setNum(ushort,int)" remove="all"/>
+ <modify-function signature="setNum(float,char,int)" remove="all"/>
+ <modify-function signature="setNum(short,int)" remove="all"/>
+ <modify-function signature="setNum(long,int)" remove="all"/>
+ <modify-function signature="setNum(ulong,int)" remove="all"/>
+ <modify-function signature="setNum(qulonglong,int)" remove="all"/>
+ <modify-function signature="number(uint,int)" remove="all"/>
+ <modify-function signature="number(long,int)" remove="all"/>
+ <modify-function signature="number(ulong,int)" remove="all"/>
+ <modify-function signature="number(qulonglong,int)" remove="all"/>
+
+ <!--### -->
+
+ <modify-function signature="operator const char*()const" remove="all"/>
+ <modify-function signature="operator const void*()const" remove="all"/>
+
+ <!--### STL compatibility functions not supported by PySide -->
+ <modify-function signature="push_back(char)" remove="all"/>
+ <modify-function signature="push_back(const QByteArray&amp;)" remove="all"/>
+ <modify-function signature="push_back(const char*)" remove="all"/>
+ <modify-function signature="push_front(char)" remove="all"/>
+ <modify-function signature="push_front(const QByteArray&amp;)" remove="all"/>
+ <modify-function signature="push_front(const char*)" remove="all"/>
+ <!--### -->
+
+ <modify-function signature="toLong(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toLongLong(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toShort(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toUInt(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toULong(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toULongLong(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toInt(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toUShort(bool*,int)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*,arg"/>
+ </inject-code>
+ </modify-function>
+ <!-- QByteArray(const char *) do the job of this constructor -->
+ <modify-function signature="toDouble(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="toFloat(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ <add-function signature="__str__" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-str"/>
+ </add-function>
+ <add-function signature="__len__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-len"/>
+ </add-function>
+ <add-function signature="__getitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-getitem"/>
+ </add-function>
+ <add-function signature="__mgetitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-mgetitem"/>
+ </add-function>
+ <add-function signature="__setitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qbytearray-setitem"/>
+ </add-function>
+ <add-function signature="__msetitem__">
+ <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">
+ <conversion-rule>
+ <native-to-target file="../glue/qtcore.cpp" snippet="return-pybytes"/>
+ </conversion-rule>
+ </primitive-type>
+
+ <value-type name="QTextBoundaryFinder">
+ <enum-type name="BoundaryReason" flags="BoundaryReasons"/>
+ <enum-type name="BoundaryType"/>
+ <!-- There's no QChar in PySide -->
+ <modify-function signature="QTextBoundaryFinder(QTextBoundaryFinder::BoundaryType,const QChar*,qsizetype,unsigned char*,qsizetype)" remove="all"/>
+ </value-type>
+ <object-type name="QXmlStreamEntityResolver"/>
+
+ <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
+ <object-type name="QAbstractNativeEventFilter">
+ <!-- see QWidget::nativeEvent(), QWindow::nativeEvent() -->
+ <modify-function signature="nativeEventFilter(const QByteArray&amp;,void*,qintptr*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion_variables"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion"/>
+ </conversion-rule>
+ </modify-argument>
+ <inject-code position="end">
+ <insert-template name="return_native_eventfilter"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QEventLoop">
+ <enum-type name="ProcessEventsFlag" flags="ProcessEventsFlags"/>
+ <modify-function signature="exec(QFlags&lt;QEventLoop::ProcessEventsFlag>)" rename="exec_" allow-thread="yes"/>
+ <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">
+ <enum-type name="FileError"/>
+ <enum-type name="FileTime" since="5.10"/>
+ <enum-type name="MemoryMapFlag" flags="MemoryMapFlags"/>
+ <enum-type name="Permission" flags="Permissions"/>
+ <enum-type name="FileHandleFlag" flags="FileHandleFlags"/>
+ <extra-includes>
+ <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
+ </extra-includes>
+ <modify-function signature="unmap(uchar*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-unmap"/>
+ </modify-function>
+ <modify-function signature="map(qint64,qint64,QFlags&lt;QFileDevice::MemoryMapFlag&gt;)">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qfiledevice-map"/>
+ </modify-function>
+ <modify-function signature="flush()" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QFile">
+ <modify-function signature="open(QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" allow-thread="yes"/>
+ <modify-function signature="open(int,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;,QFlags&lt;QFileDevice::FileHandleFlag&gt;)" allow-thread="yes"/>
+ <modify-function signature="copy(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="copy(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="link(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="link(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="remove()" allow-thread="yes"/>
+ <modify-function signature="remove(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="rename(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="rename(const QString&amp;,const QString&amp;)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QSaveFile"/>
+ <object-type name="QFileSelector"/>
+
+ <object-type name="QIODevice">
+ <modify-function signature="open(QFlags&lt;QIODeviceBase::OpenModeFlag>)" allow-thread="yes"/>
+ <modify-function signature="close()" allow-thread="yes"/>
+ <modify-function signature="seek(qint64)" allow-thread="yes"/>
+ <modify-function signature="readAll()" allow-thread="yes"/>
+ <modify-function signature="peek(qint64)" allow-thread="yes"/>
+ <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 -->
+ <modify-function signature="read(char*,qint64)" remove="all"/>
+ <!-- ### readLine(qint64) do the job -->
+ <modify-function signature="readLine(char*,qint64)" remove="all"/>
+ <!-- ### write(str) do the job -->
+ <modify-function signature="write(const char*,qint64)" remove="all"/>
+ <modify-function signature="write(const char*)" remove="all"/>
+ <modify-function signature="getChar(char*)">
+ <modify-argument index="1">
+ <remove-argument />
+ <remove-default-expression />
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_char*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="readData(char*,qint64)">
+ <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
+ </modify-function>
+ <modify-function signature="readLineData(char*,qint64)">
+ <inject-code class="target" file="../glue/qtcore.cpp" snippet="qiodevice-readData"/>
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code class="native" position="end" file="../glue/qtcore.cpp" snippet="return-readData"/>
+ </modify-function>
+ </object-type>
+ <value-type name="QIODeviceBase" since="6.0">
+ <enum-type name="OpenModeFlag" flags="OpenMode"/>
+ </value-type>
+ <object-type name="QCryptographicHash">
+ <enum-type name="Algorithm"/>
+ <modify-function signature="addData(const char*,qsizetype)">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qcryptographichash-adddata"/>
+ </modify-function>
+ </object-type>
+ <value-type name="QOperatingSystemVersion" since="5.9">
+ <enum-type name="OSType"/>
+ </value-type>
+ <object-type name="QLibraryInfo">
+ <enum-type name="LibraryPath"/>
+ <modify-function signature="build()">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qlibraryinfo_build"/>
+ </modify-function>
+ </object-type>
+ <namespace-type name="QtCoreHelper" visible="no">
+ <object-type name="QMutexLocker" copyable="no">
+ <!-- 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
+ QMutexLocker inside a QThread::run.
+ The reason of having this change is due to the new way of handling the GIL
+ in the Qt calls on the whole PySide6 module, that started on 5.14.2-->
+ <modify-function signature="QMutexLocker(QMutex*)" allow-thread="yes">
+ <modify-argument index="1">
+ <reference-count action="set" variable-name="mutex()const0"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QMutexLocker(QRecursiveMutex*)" allow-thread="yes">
+ <modify-argument index="1">
+ <reference-count action="set" variable-name="recursiveMutex()const0"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="relock()" allow-thread="yes"/>
+ <modify-function signature="mutex()const">
+ <modify-argument index="return">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="recursiveMutex()const">
+ <modify-argument index="return">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <add-function signature="__enter__()"/>
+ <add-function signature="__exit__(PyObject*,PyObject*,PyObject*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="unlock"/>
+ </add-function>
+ </object-type>
+ </namespace-type>
+
+ <!-- Qt5 addition -->
+ <object-type name="QBasicMutex">
+ <modify-function signature="lock()" allow-thread="yes"/>
+ <modify-function signature="tryLock()" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QMutex">
+ <modify-function signature="lock()" allow-thread="yes"/>
+ <modify-function signature="tryLock(int)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QRecursiveMutex" since="5.14">
+ <modify-function signature="lock()" allow-thread="yes"/>
+ <modify-function signature="tryLock(int)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QRandomGenerator" since="5.10">
+ <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">
+ <modify-function signature="global()" rename="global_"/>
+ <modify-function signature="operator()()" remove="all"/>
+ </object-type>
+ <object-type name="QSemaphore">
+ <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"/>
+
+ <value-type name="QSocketDescriptor" since="5.15">
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qsocketdescriptor"/>
+ </value-type>
+ <object-type name="QSocketNotifier">
+ <enum-type name="Type"/>
+ <add-function signature="QSocketNotifier(PyObject*, QSocketNotifier::Type, QObject*)">
+ <modify-argument index="3">
+ <replace-default-expression with="0"/>
+ <rename to="parent"/>
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qsocketnotifier"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QTemporaryFile">
+ <extra-includes>
+ <!-- Qt5: private <include file-name="QAbstractFileEngine" location="global"/> -->
+ </extra-includes>
+ <modify-function signature="createNativeFile(QFile&amp;)" allow-thread="yes"/>
+ <modify-function signature="createNativeFile(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="open()" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QTemporaryDir"/>
+ <object-type name="QMimeData">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QUrl" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QTimeLine">
+ <enum-type name="Direction"/>
+ <enum-type name="State"/>
+ </object-type>
+ <object-type name="QTranslator">
+ <modify-function signature="load(const uchar*,int,QString)" allow-thread="yes">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <inject-code file="../glue/qtcore.cpp" snippet="qtranslator-load"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QWaitCondition">
+ <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"/>
+ <modify-function signature="wait(QReadWriteLock*,unsigned long)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QFileSystemWatcher">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QBuffer">
+ <!-- ### setData(QByteArray) do the job -->
+ <modify-function signature="setData(const char*,int)" remove="all"/>
+ <!-- Disambiguate from Qt3DRender/qbuffer.h -->
+ <include file-name="QtCore/qbuffer.h" location="global"/>
+ </object-type>
+ <object-type name="QTimer">
+ <modify-function signature="singleShot(int,const QObject*,const char*)">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-1"/>
+ </modify-function>
+ <add-function signature="singleShot(int,PyCallable*)" static="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qtimer-singleshot-2"/>
+ </add-function>
+ </object-type>
+ <object-type name="QProcess">
+ <enum-type name="ExitStatus"/>
+ <enum-type name="InputChannelMode"/>
+ <enum-type name="ProcessChannel"/>
+ <enum-type name="ProcessChannelMode"/>
+ <enum-type name="ProcessError"/>
+ <enum-type name="ProcessState"/>
+
+ <modify-function signature="waitForStarted(int)" allow-thread="yes"/>
+ <modify-function signature="waitForBytesWritten(int)" allow-thread="yes"/>
+ <modify-function signature="waitForFinished(int)" allow-thread="yes"/>
+ <modify-function signature="readAllStandardOutput()" allow-thread="yes"/>
+ <modify-function signature="readAllStandardError()" allow-thread="yes"/>
+ <modify-function signature="execute(QString,QStringList)" allow-thread="yes"/>
+ <modify-function signature="startDetached(QString,QStringList,QString,qint64*)">
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, pid)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qprocess-startdetached"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QSignalMapper"/>
+
+ <object-type name="QCollatorSortKey" since="5.2"/>
+ <object-type name="QCollator" since="5.2"/>
+
+ <object-type name="QCommandLineOption" since="5.2">
+ <enum-type name="Flag" flags="Flags" since="5.8"/>
+ </object-type>
+ <object-type name="QCommandLineParser" since="5.2">
+ <enum-type name="OptionsAfterPositionalArgumentsMode" since="5.6"/>
+ <enum-type name="SingleDashWordOptionMode"/>
+ </object-type>
+
+ <object-type name="QCoreApplication">
+ <!--Qt5: gone <enum-type name="Encoding"/> -->
+ <enum-type identified-by-value="ApplicationFlags" since="4.8" revision="4800"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QTranslator" 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)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-1"/>
+ </add-function>
+ <add-function signature="QCoreApplication()">
+ <inject-code file="../glue/qtcore.cpp" snippet="qcoreapplication-2"/>
+ </add-function>
+ <!-- Addition for qApp.
+ To be fixed: This function deletes a little too much ATM that is missing later
+ when creating a new qApp. -->
+ <add-function signature="shutdown()">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="moduleshutdown"/>
+ </add-function>
+
+ <!-- blocking functions -->
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;,int)" allow-thread="yes"/>
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;)" allow-thread="yes"/>
+ <modify-function signature="sendEvent(QObject*,QEvent*)" allow-thread="yes"/>
+ <modify-function signature="sendPostedEvents(QObject*,int)" allow-thread="yes"/>
+ <modify-function signature="instance()">
+ <inject-code class="target" file="../glue/qtcore.cpp" snippet="qcoreapplication-instance"/>
+ </modify-function>
+
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes">
+ <modify-argument index="2" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="QCoreApplication(int &amp;,char **,int)" access="private"/>
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qcoreapplication-init"/>
+ <modify-function signature="postEvent(QObject*,QEvent*,int)">
+ <modify-argument index="2">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSettings">
+ <enum-type name="Format"/>
+ <enum-type name="Scope"/>
+ <enum-type name="Status"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ <!-- PYSIDE-1010:
+ We remove the original implementation of value() to include the optional parameter -->
+ <modify-function signature="value(const QString&amp;,const QVariant&amp;)const" remove="all"/>
+ <add-function signature="value(const QString&amp;, const QVariant&amp; @defaultValue@ = 0, PyObject* @type@ = 0)" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qsettings-value"/>
+ </add-function>
+ </object-type>
+ <object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None">
+ <enum-type name="Type"/>
+ </object-type>
+ <object-type name="QChildEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::ChildAdded || %1-&gt;type() == QEvent::ChildPolished || %1-&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="QDataStream" stream="yes">
+ <enum-type name="FloatingPointPrecision" since="4.6"/>
+ <enum-type name="Status"/>
+ <enum-type name="Version"/>
+ <enum-type name="ByteOrder"/>
+ <extra-includes>
+ <include file-name="QtCore/QtCore" location="global"/>
+ </extra-includes>
+
+ <!-- ### Replaced by write<TYPE> methods -->
+ <modify-function signature="operator&gt;&gt;(qint8&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(bool&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(quint8&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(qint16&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(quint16&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(qint32&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(quint32&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(qint64&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(quint64&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(char*&amp;)" remove="all"/>
+ <!-- ### -->
+
+ <!-- ### Replaced by read<TYPE> methods -->
+ <modify-function signature="operator&lt;&lt;(qint8)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(bool)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(quint8)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(qint16)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(quint16)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(qint32)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(quint32)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(qint64)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(quint64)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(double)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
+ <!-- ### -->
+ <add-function signature="operator&lt;&lt;(const QString&amp;)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeQString(const QString&amp;)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="readQString()" return-type="QString">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="writeQChar(const QChar&amp;)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="readQChar()" return-type="QChar">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="writeQStringList(const QStringList&amp;)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="readQStringList()" return-type="QStringList">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="writeQVariant(const QVariant&amp;)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <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-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)">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata"/>
+ </modify-function>
+
+ <!-- Extra functions for primitive type handling -->
+ <add-function signature="readBool()" return-type="bool">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readInt8()" return-type="qint8">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readUInt8()" return-type="quint8">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readUInt16()" return-type="quint16">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readInt16()" return-type="qint16">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readInt32()" return-type="qint32">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readUInt32()" return-type="quint32">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readInt64()" return-type="qint64">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readUInt64()" return-type="quint64">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readFloat()" return-type="float">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readDouble()" return-type="qreal">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+ <add-function signature="readString()" return-type="QString">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
+ </add-function>
+
+ <add-function signature="writeBool(bool)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeInt8(qint8)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeUInt8(quint8)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeUInt16(quint16)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeInt16(qint16)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeInt32(qint32)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeUInt32(quint32)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeInt64(qint64)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeUInt64(quint64)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeFloat(float)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeDouble(qreal)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+ <add-function signature="writeString(QString)">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-write-method"/>
+ </add-function>
+
+ <!-- ### deprecated method -->
+ <modify-function signature="readBytes(char*&amp;,uint&amp;)" remove="all"/>
+ <modify-function signature="writeBytes(const char*,uint)" remove="all"/>
+ </object-type>
+
+ <value-type name="QTextStreamManipulator" default-constructor="QTextStreamManipulator(0, 0)">
+ <modify-function signature="exec(QTextStream &amp;)" rename="exec_"/>
+ </value-type>
+ <object-type name="QTextStream" stream="yes">
+ <enum-type name="FieldAlignment"/>
+ <enum-type name="NumberFlag" flags="NumberFlags"/>
+ <enum-type name="RealNumberNotation"/>
+ <enum-type name="Status"/>
+ <!-- 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"/>
+ <!-- Removed because we use the non-const version -->
+ <modify-function signature="QTextStream(const QByteArray&amp;,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
+
+ <!-- Removed because it expect QString to be mutable -->
+ <modify-function signature="setString(QString*,QFlags&lt;QIODeviceBase::OpenModeFlag&gt;)" remove="all"/>
+
+ <modify-function signature="operator&lt;&lt;(const void*)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(float)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(qlonglong)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(qulonglong)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(short)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(int)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(unsigned int)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(unsigned short)" remove="all"/>
+ <modify-function signature="operator&lt;&lt;(const char*)" remove="all"/>
+
+ <modify-function signature="operator&gt;&gt;(char*)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(char&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(float&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(double&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(qlonglong&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(qulonglong&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(long&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(int&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(short&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(unsigned long&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(unsigned int&amp;)" remove="all"/>
+ <modify-function signature="operator&gt;&gt;(unsigned short&amp;)" remove="all"/>
+ <!-- Removed because it expect QChar to be mutable -->
+ <modify-function signature="operator&gt;&gt;(QChar&amp;)" remove="all"/>
+ <!-- Removed because it expect QString to be mutable -->
+ <modify-function signature="operator&gt;&gt;(QString&amp;)" remove="all"/>
+
+ <modify-function signature="string()const">
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="return-qstring-ref"/>
+ </modify-function>
+
+ <modify-function signature="flush()" allow-thread="yes"/>
+ <modify-function signature="read(qint64)" allow-thread="yes"/>
+ <modify-function signature="readLine(qint64)" allow-thread="yes"/>
+ <modify-function signature="readAll()" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QStandardPaths" since="5.0">
+ <enum-type name="StandardLocation"/>
+ <enum-type name="LocateOption" flags="LocateOptions"/>
+ </object-type>
+ <object-type name="QSystemSemaphore">
+ <enum-type name="AccessMode"/>
+ <enum-type name="SystemSemaphoreError"/>
+ </object-type>
+
+ <object-type name="QThreadPool">
+ <modify-function signature="clear()" allow-thread="yes"/>
+ <modify-function signature="activeThreadCount()const" allow-thread="yes"/>
+ <modify-function signature="releaseThread()" allow-thread="yes"/>
+ <modify-function signature="reserveThread()" allow-thread="yes"/>
+ <modify-function signature="setMaxThreadCount(int)" allow-thread="yes"/>
+ <modify-function signature="waitForDone(int)" allow-thread="yes"/>
+ <modify-function signature="start(QRunnable*,int)" allow-thread="yes">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="tryStart(QRunnable*)" allow-thread="yes">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="tryTake(QRunnable*)" allow-thread="yes"/>
+
+ <modify-function signature="globalInstance()" >
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="releaseownership"/>
+ </modify-function>
+ </object-type>
+ <value-type name="QXmlStreamAttribute"/>
+ <value-type name="QXmlStreamAttributes">
+ <modify-function signature="push_back(QXmlStreamAttribute)" remove="all"/>
+ <modify-function signature="pop_back()" remove="all"/>
+ <modify-function signature="push_front(QXmlStreamAttribute)" remove="all"/>
+ <modify-function signature="pop_front()" remove="all"/>
+ <modify-function signature="toList()const" remove="all"/>
+ <!-- Remove methods from QList -->
+ <modify-function signature="value(qsizetype,const QXmlStreamAttribute&amp;) const" remove="all"/>
+ <modify-function signature="fromList(const QList&lt;QXmlStreamAttribute&gt; &amp;)" remove="all"/>
+ <modify-function signature="operator+=(QVector&lt;QXmlStreamAttribute&gt;)" remove="all"/>
+ <!-- Expose operator==, != inherited from QList, which the parser does
+ not see due to the TMP expression of the return type. -->
+ <add-function signature="operator==(const QXmlStreamAttributes&amp;)" return-type="bool"/>
+ <add-function signature="operator!=(const QXmlStreamAttributes&amp;)" return-type="bool"/>
+ </value-type>
+ <value-type name="QXmlStreamNamespaceDeclaration"/>
+ <value-type name="QXmlStreamNotationDeclaration"/>
+ <value-type name="QXmlStreamEntityDeclaration"/>
+ <object-type name="QXmlStreamReader">
+ <enum-type name="Error"/>
+ <enum-type name="TokenType"/>
+ <enum-type name="ReadElementTextBehaviour" since="4.6"/>
+ </object-type>
+ <object-type name="QXmlStreamWriter">
+ <!-- Removed because it expect QString to be mutable -->
+ <modify-function signature="QXmlStreamWriter(QString*)" remove="all"/>
+ </object-type>
+ <value-type name="QModelIndex" hash-function="qHash">
+ <modify-function signature="internalPointer()const">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_internal_pointer" />
+ </inject-code>
+ </modify-function>
+ <modify-function signature="model()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <object-type name="QFutureInterfaceBase">
+ <enum-type name="State"/>
+ </object-type>
+ <value-type name="QFuture" generate="no">
+ <include file-name="QtCore/qfuture.h" location="global"/>
+ <modify-function signature="waitForFinished()" allow-thread="yes"/>
+ </value-type>
+ <object-type name="QFutureWatcherBase" generate="no">
+ <modify-function signature="futureInterface()" remove="all"/>
+ <modify-function signature="futureInterface() const" remove="all"/>
+ </object-type>
+ <object-type name="QFutureWatcher" generate="no">
+ <include file-name="QtCore/qfuturewatcher.h" location="global"/>
+ </object-type>
+
+ <value-type name="QGenericArgument">
+ <include file-name="qobjectdefs.h" location="global"/>
+ </value-type>
+
+ <value-type name="QGenericReturnArgument">
+ <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>
+
+ <value-type name="QMetaMethod">
+ <enum-type name="Access"/>
+ <enum-type name="MethodType"/>
+ <!-- This isn't part of Qt public API -->
+ <modify-function signature="attributes()const" remove="all"/>
+ <modify-function signature="getParameterTypes(int*)const" remove="all"/>
+ </value-type>
+ <object-type name="QMetaObject">
+ <enum-type name="Call"/>
+ <include file-name="qobjectdefs.h" location="global"/>
+ <!-- This isn't part of Qt public API -->
+ <modify-function signature="connect(const QObject*,int,const QObject*,int,int,int*)" remove="all"/>
+ <object-type name="Connection">
+ <include file-name="qobjectdefs.h" location="global"/>
+ </object-type>
+ <modify-function signature="^invokeMethod\(" allow-thread="yes"/>
+ </object-type>
+ <value-type name="QMetaProperty" >
+ <!-- This isn't part of Qt public API -->
+ <modify-function signature="enclosingMetaObject()const" remove="all"/>
+ </value-type>
+ <value-type name="QMetaClassInfo">
+ <!-- This isn't part of Qt public API -->
+ <modify-function signature="enclosingMetaObject()const" remove="all"/>
+ </value-type>
+
+ <value-type name="QMetaEnum">
+ <modify-function signature="keyToValue(const char*,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="keysToValue(const char*,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <!-- This isn't part of Qt public API -->
+ <modify-function signature="enclosingMetaObject()const" remove="all"/>
+ </value-type>
+
+ <!-- From Qt4.6 -->
+ <object-type name="QAbstractAnimation" since="4.6">
+ <enum-type name="DeletionPolicy"/>
+ <enum-type name="Direction"/>
+ <enum-type name="State"/>
+ </object-type>
+
+ <object-type name="QAnimationGroup" since="4.6">
+ <modify-function signature="addAnimation(QAbstractAnimation*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertAnimation(int,QAbstractAnimation*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="removeAnimation(QAbstractAnimation*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="takeAnimation(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="clear()" >
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qanimationgroup-clear"/>
+ </modify-function>
+ </object-type>
+
+ <!-- We will use inject code to implement the function below -->
+ <rejection class="QEasingCurve" function-name="setCustomType"/>
+ <rejection class="QEasingCurve" function-name="customType"/>
+ <value-type name="QEasingCurve" since="4.6">
+ <extra-includes>
+ <include file-name="pysideweakref.h" location="global"/>
+ <include file-name="glue/qeasingcurve_glue.h" location="local"/>
+ </extra-includes>
+ <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve"/>
+ <enum-type name="Type"/>
+ <add-function signature="setCustomType(PyObject*)">
+ <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-setcustomtype"/>
+ </add-function>
+ <add-function signature="customType()" return-type="PyObject">
+ <inject-code file="../glue/qtcore.cpp" snippet="qeasingcurve-customtype"/>
+ </add-function>
+ </value-type>
+
+ <value-type name="QJsonArray">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ </value-type>
+
+ <value-type name="QJsonDocument">
+ <enum-type name="DataValidation"/>
+ <enum-type name="JsonFormat"/>
+ </value-type>
+
+ <rejection class="QJsonDocument" field-name="BinaryFormatTag"/>
+
+ <value-type name="QJsonParseError">
+ <enum-type name="ParseError"/>
+ </value-type>
+
+ <value-type name="QJsonValue">
+ <enum-type name="Type"/>
+ <extra-includes>
+ <include file-name="QVariant" location="global"/>
+ <include file-name="QJsonArray" location="global"/>
+ <include file-name="QJsonObject" location="global"/>
+ </extra-includes>
+ </value-type>
+
+ <value-type name="QMargins" since="4.6"/>
+ <value-type name="QMarginsF" since="5.3"/>
+
+ <object-type name="QParallelAnimationGroup" since="4.6"/>
+
+ <object-type name="QPauseAnimation" since="4.6"/>
+
+ <value-type name="QProcessEnvironment" since="4.6"/>
+
+ <object-type name="QPropertyAnimation" since="4.6"/>
+
+ <object-type name="QSequentialAnimationGroup" since="4.6"/>
+
+ <object-type name="QVariantAnimation" since="4.6"/>
+
+ <value-type name="QVersionNumber" since="5.6">
+ <modify-function signature="fromString(const QString &amp;,int*)">
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <!-- From Qt4.6 ^^^ -->
+
+ <add-function signature="SIGNAL(const char*)" return-type="str">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-signal"/>
+ </add-function>
+
+ <add-function signature="SLOT(const char*)" return-type="str">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-slot"/>
+ </add-function>
+
+ <add-function signature="QT_TR_NOOP(PyObject)" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QT_TR_NOOP_UTF8(PyObject)" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QT_TRANSLATE_NOOP(PyObject,PyObject)" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QT_TRANSLATE_NOOP3(PyObject,PyObject,PyObject)" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_argument"><replace from="#" to="2"/></insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QT_TRANSLATE_NOOP_UTF8(PyObject)" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="return_argument"><replace from="#" to="1"/></insert-template>
+ </inject-code>
+ </add-function>
+
+ <inject-code class="native" position="beginning" file="../glue/qtcore.cpp" snippet="qt-registerresourcedata"/>
+ <add-function signature="qRegisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qregisterresourcedata"/>
+ </add-function>
+ <add-function signature="qUnregisterResourceData(int,PyBytes,PyBytes,PyBytes)" return-type="bool">
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qt-qunregisterresourcedata"/>
+ </add-function>
+
+ <object-type name="QFactoryInterface"/>
+ <object-type name="QRunnable"/>
+
+ <object-type name="QPluginLoader"/>
+ <object-type name="QStringListModel"/>
+
+ <suppress-warning text="Unable to decide type of property: 'QLibrary::LoadHints' in class 'QPluginLoader'"/>
+ <suppress-warning text="enum '_ISalnum' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'Qt::Initialization' does not have a type entry or is not an enum"/>
+ <suppress-warning text="visibility of function '*' modified in class '*'"/>
+ <suppress-warning text="hiding of function '*' in class '*'"/>
+ <suppress-warning text="namespace '*' does not have a type entry"/>
+ <suppress-warning text="Shadowing: QObject::parent()const and QAbstractItemModel::parent() const"/>
+ <suppress-warning text="namespace '*' for enum 'QtMsgType' is not declared"/>
+ <suppress-warning text="horribly broken type 'imaxdiv_t'"/>
+ <suppress-warning text="horribly broken type '__off64_t'"/>
+ <suppress-warning text="horribly broken type 'div_t'"/>
+ <suppress-warning text="horribly broken type 'fd_set*'"/>
+ <suppress-warning text="horribly broken type 'ldiv_t'"/>
+ <suppress-warning text="horribly broken type 'lldiv_t'"/>
+ <suppress-warning text="signal '*' in class '*' is overloaded."/>
+ <suppress-warning text="enum 'enum_3' does not have a type entry or is not an enum"/>
+ <suppress-warning text="Shadowing: QFile::fileName() const and QTemporaryFile::fileName() const"/>
+ <suppress-warning text="unhandled enum value: ~0u in Qt::GestureType"/>
+ <suppress-warning text="unhandled enum value: (sizeof(void*)&lt;&lt;3) in QSysInfo::Sizes"/>
+ <suppress-warning text="unmatched enum ~0u"/>
+ <suppress-warning text="unmatched enum (sizeof(void*)&lt;&lt;3)"/>
+ <suppress-warning text="^signature 'setCustomType(float)' for function modification in 'QEasingCurve' not found.*$"/>
+ <suppress-warning text="enum 'enum_4' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'enum_5' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'FP_NORMAL' does not have a type entry or is not an enum"/>
+ <suppress-warning text="Shadowing: *"/>
+ <!-- QCborStreamReader: Suppress warnings about 32/64bit signatures not found depending on qsizetype -->
+ <suppress-warning text="^signature 'readStringChunk\(char.*in 'QCborStreamReader' not found.*$"/>
+
+ <!-- this enum is defined on Qt global header but only used in QtGui module -->
+ <suppress-warning text="enum 'PM_MessageBoxHeight' does not have a type entry or is not an enum"/>
+
+ <!-- this function only exists on Windows -->
+ <suppress-warning text="^signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.*"/>
+
+ <!-- this is necessary to avoid warning on other modules -->
+ <suppress-warning text="^signature 'operator*(QByteArray,const char*)' for function modification in 'QByteArray' not found.*"/>
+ <suppress-warning text="^signature 'operator+(QByteArray,QString)' for function modification in 'QByteArray' not found.*"/>
+
+ <!-- This enum is intenaly used -->
+ <suppress-warning text="enum 'PM_CbaIconHeight' does not have a type entry or is not an enum"/>
+
+ <!-- TODO: this need be removed -->
+ <suppress-warning text="^skipping function '.*', unmatched return type '.*$"/>
+ <suppress-warning text="^skipping function '.*', unmatched type '.*$"/>
+
+ <suppress-warning text="enum 'q_static_assert_result39' does not have a type entry or is not an enum"/>
+ <suppress-warning text="horribly broken type ''"/>
+ <suppress-warning text="Pure virtual method 'QTextCodec::convertFromUnicode(const QChar*,int,QTextCodec::ConverterState*)const' must be implement but was completely removed on type system."/>
+
+ <!-- Qt5.5: No idea how to get rid of the following five enums, which are moved elsewhere since 5.5: -->
+ <suppress-warning text="enum 'QLocale::MeasurementSystem' is specified in typesystem, but not declared"/>
+ <suppress-warning text="enum 'QState::RestorePolicy' is specified in typesystem, but not declared"/>
+ <!-- <suppress-warning text="enum 'QLocale::FormatType' is specified in typesystem, but not declared"/> -->
+ <suppress-warning text="enum 'QAbstractAnimation::DeletionPolicy' is specified in typesystem, but not declared"/>
+ <!-- <suppress-warning text="enum 'QAbstractAnimation::State' is specified in typesystem, but not declared"/> -->
+ <!-- Qt5.5: we also suppress these warnings, instead of adding wrong enums -->
+ <suppress-warning text="enum 'InterfaceType' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'TextBoundaryType' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'RelationFlag' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'Role' does not have a type entry or is not an enum"/>
+
+ <!-- Anonymous enum in qtbase/src/corelib/global/qtypeinfo.h -->
+ <suppress-warning text="Anonymous enum (Q_COMPLEX_TYPE, ... , Q_RELOCATABLE_TYPE) does not have a type entry"/>
+
+ <!-- Another anonymous enum / value pair in in qtbase/src/corelib/kernel/qcoreapplication.h -->
+ <suppress-warning text="no matching enum 'QT_VERSION'"/>
+ <suppress-warning text="unhandled enum value: QT_VERSION in QCoreApplication::ApplicationFlags from header 'qcoreapplication.h'"/>
+ <suppress-warning text="unmatched enum QT_VERSION from header 'qcoreapplication.h'"/>
+
+ <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'const QSysInfo::WinVersion'"/>
+ <suppress-warning text="template baseclass 'QListSpecialMethods&lt;T&gt;' of 'QList' is not known"/>
+
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_mac.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_mac.xml
new file mode 100644
index 000000000..89d405d6b
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_mac.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCore">
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
+ <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
+ <object-type name="QAbstractEventDispatcher">
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
+ <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
+ <object-type name="TimerInfo"/>
+ </object-type>
+ <object-type name="QSysInfo">
+ <enum-type name="Endian"/>
+ <enum-type name="Sizes"/>
+ <enum-type name="MacVersion" since="5.5"/>
+ </object-type>
+ <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'QSysInfo::WinVersion'"/>
+ <suppress-warning text="enum 'QSysInfo::WinVersion' does not have a type entry or is not an enum"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_win.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_win.xml
new file mode 100644
index 000000000..8dbcdae95
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_win.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCore">
+ <extra-includes>
+ <include file-name="windows.h" location="global"/>
+ </extra-includes>
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
+ <primitive-type name="HWND">
+ <!-- Qt5: Add this include there to insert ti in the global qtcore header (needed by qprocess_wrapper) -->
+ <include file-name="wtypes.h" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ return PyCapsule_New(%in, nullptr, nullptr);
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PyNone">
+ %out = 0;
+ </add-conversion>
+ <add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
+ %out = (%OUTTYPE)PyCapsule_GetPointer(%in, nullptr);
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <inject-code class="native" position="beginning">
+ <insert-template name="checkPyCapsuleOrPyCObject_func"/>
+ </inject-code>
+
+ <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
+ <object-type name="QWinEventNotifier"/>
+ <object-type name="QAbstractEventDispatcher">
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
+ <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
+ <object-type name="TimerInfo"/>
+ </object-type>
+ <object-type name="QSysInfo">
+ <enum-type name="Endian"/>
+ <enum-type name="Sizes"/>
+ <enum-type name="WinVersion" since="5.5"/>
+ </object-type>
+ <suppress-warning text="skipping field 'QSysInfo::MacintoshVersion' with unmatched type 'QSysInfo::MacVersion'"/>
+ <suppress-warning text="enum 'QSysInfo::MacVersion' does not have a type entry or is not an enum"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_x11.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_x11.xml
new file mode 100644
index 000000000..c1db58db7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_x11.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtCore">
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
+ <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
+ <!-- Qt5: XXX move this to QtGui <include file-name="QTextDocument" location="global"/> -->
+ </primitive-type>
+ <!-- Qt5: had to move QAbstractEventDispatcher into os-specific files because of Windows -->
+ <object-type name="QAbstractEventDispatcher">
+ <modify-function signature="processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag>)" allow-thread="yes"/>
+ <!-- Qt5: had to add this recursive object def. This was crucial to get rid of "pure virtual" -->
+ <object-type name="TimerInfo"/>
+ </object-type>
+ <object-type name="QSysInfo">
+ <enum-type name="Endian"/>
+ <enum-type name="Sizes"/>
+ </object-type>
+ <suppress-warning text="skipping field 'QSysInfo::MacintoshVersion' with unmatched type 'QSysInfo::MacVersion'"/>
+ <suppress-warning text="skipping field 'QSysInfo::WindowsVersion' with unmatched type 'QSysInfo::MacVersion'"/>
+ <suppress-warning text="enum 'QSysInfo::MacVersion' does not have a type entry or is not an enum"/>
+ <suppress-warning text="enum 'QSysInfo::WinVersion' does not have a type entry or is not an enum"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt b/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt
new file mode 100644
index 000000000..afdddf4b8
--- /dev/null
+++ b/sources/pyside6/PySide6/QtDataVisualization/CMakeLists.txt
@@ -0,0 +1,65 @@
+project(QtDataVisualization)
+
+set(QtDataVisualization_SRC
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3daxis_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcategory3daxis_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qlogvalue3daxisformatter_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxis_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qvalue3daxisformatter_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dseries_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstractdataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbar3dseries_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataitem_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qbardataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3ditem_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dlabel_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qcustom3dvolume_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qheightmapsurfacedataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelbardataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelscatterdataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qitemmodelsurfacedataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatter3dseries_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataitem_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qscatterdataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurface3dseries_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataitem_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qsurfacedataproxy_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dbars_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dcamera_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dlight_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dobject_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscatter_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dscene_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dsurface_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dgraph_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dinputhandler_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qabstract3dinputhandler_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_qtouch3dinputhandler_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_q3dtheme_wrapper.cpp
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_wrapper.cpp
+# module is always needed
+${QtDataVisualization_GEN_DIR}/qtdatavisualization_module_wrapper.cpp
+)
+
+set(QtDataVisualization_include_dirs ${QtDataVisualization_SOURCE_DIR}
+ ${QtDataVisualization_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}DataVisualization_INCLUDE_DIRS}
+ ${libpyside_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_deps QtCore QtGui)
+
+create_pyside_module(NAME QtDataVisualization
+ INCLUDE_DIRS QtDataVisualization_include_dirs
+ LIBRARIES QtDataVisualization_libraries
+ DEPS QtDataVisualization_deps
+ TYPESYSTEM_PATH QtDataVisualization_SOURCE_DIR
+ SOURCES QtDataVisualization_SRC)
diff --git a/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml b/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml
new file mode 100644
index 000000000..08576f2fb
--- /dev/null
+++ b/sources/pyside6/PySide6/QtDataVisualization/typesystem_datavisualization.xml
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtDataVisualization">
+
+ <load-typesystem name="templates/datavisualization_common.xml" generate="no" />
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no" />
+ <namespace-type name="QtDataVisualization">
+ <primitive-type name="QBarDataArray">
+ <include file-name="qbardataproxy.h" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cppqlistofptrtoqvectors_to_py_conversion">
+ <replace from="%INTYPE_0" to="QtDataVisualization::QBarDataItem"/>
+ </insert-template>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="py_to_cppqlistofptrtoqvectors_conversion">
+ <replace from="%OUTTYPE_0" to="QtDataVisualization::QBarDataItem"/>
+ </insert-template>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+ <primitive-type name="QSurfaceDataArray">
+ <include file-name="qsurfacedataproxy.h" location="global"/>
+ <conversion-rule>
+ <native-to-target>
+ <insert-template name="cppqlistofptrtoqvectors_to_py_conversion">
+ <replace from="%INTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/>
+ </insert-template>
+ </native-to-target>
+ <target-to-native>
+ <add-conversion type="PySequence">
+ <insert-template name="py_to_cppqlistofptrtoqvectors_conversion">
+ <replace from="%OUTTYPE_0" to="QtDataVisualization::QSurfaceDataItem"/>
+ </insert-template>
+ </add-conversion>
+ </target-to-native>
+ </conversion-rule>
+ </primitive-type>
+
+ <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"/>
+ <object-type name="QValue3DAxisFormatter">
+ <modify-function signature="populateCopy(QtDataVisualization::QValue3DAxisFormatter&amp;)const">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </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(QtDataVisualization::QBarDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QBarDataItem"/>
+ <object-type name="QBarDataProxy">
+ <modify-function signature="resetArray(QtDataVisualization::QBarDataArray*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="resetArray(QtDataVisualization::QBarDataArray*,const QStringList&amp;,const QStringList&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRows(const QtDataVisualization::QBarDataArray&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRows(const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRows(int, const QtDataVisualization::QBarDataArray&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRows(int, const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QBarDataItem&gt;*, const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRows(int, const QtDataVisualization::QBarDataArray&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRows(int, const QtDataVisualization::QBarDataArray&amp;, const QStringList&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QCustom3DItem"/>
+ <object-type name="QCustom3DLabel"/>
+ <object-type name="QCustom3DVolume"/>
+ <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(QtDataVisualization::QScatterDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QScatterDataItem"/>
+ <object-type name="QScatterDataProxy">
+ <modify-function signature="resetArray(QVector&lt;QtDataVisualization::QScatterDataItem&gt;*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addItem(const QtDataVisualization::QScatterDataItem&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addItems(const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItem(int, const QtDataVisualization::QScatterDataItem&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItems(int, const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItem(int, const QtDataVisualization::QScatterDataItem&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItems(int, const QVector&lt;QtDataVisualization::QScatterDataItem&gt;&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSurface3DSeries">
+ <enum-type name="DrawFlag" flags="DrawFlags"/>
+ <modify-function signature="QSurface3DSeries(QtDataVisualization::QSurfaceDataProxy*,QObject*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setDataProxy(QtDataVisualization::QSurfaceDataProxy*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QSurfaceDataItem"/>
+ <object-type name="QSurfaceDataProxy">
+ <modify-function signature="addRow(QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int, QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRow(int, QVector&lt;QtDataVisualization::QSurfaceDataItem&gt;*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="resetArray(QtDataVisualization::QSurfaceDataArray*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="Q3DBars">
+ <modify-function signature="addAxis(QtDataVisualization::QAbstract3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QCategory3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setRowAxis(QtDataVisualization::QCategory3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="Q3DCamera">
+ <enum-type name="CameraPreset"/>
+ </object-type>
+ <object-type name="Q3DLight"/>
+ <object-type name="Q3DObject"/>
+ <object-type name="Q3DScatter">
+ <modify-function signature="addAxis(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisY(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisZ(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseAxis(QtDataVisualization::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(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisY(QtDataVisualization::QValue3DAxis*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAxisZ(QtDataVisualization::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="SelectionFlag" flags="SelectionFlags"/>
+ <enum-type name="ShadowQuality"/>
+ <modify-function signature="addCustomItem(QtDataVisualization::QCustom3DItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addInputHandler(QtDataVisualization::QAbstract3DInputHandler*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addTheme(QtDataVisualization::Q3DTheme*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseCustomItem(QtDataVisualization::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(QtDataVisualization::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(QtDataVisualization::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(QtDataVisualization::QAbstract3DInputHandler*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setActiveTheme(QtDataVisualization::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>
+ <extra-includes>
+ <include file-name="qutils.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/CMakeLists.txt b/sources/pyside6/PySide6/QtGui/CMakeLists.txt
new file mode 100644
index 000000000..8e4601c4f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/CMakeLists.txt
@@ -0,0 +1,234 @@
+project(QtGui)
+
+qt_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside6_SOURCE_DIR}/qpytextobject.h")
+
+set(QtGui_DROPPED_ENTRIES)
+
+set(QtGui_SRC
+${QtGui_GEN_DIR}/qabstractfileiconprovider_wrapper.cpp
+${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
+${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp
+${QtGui_GEN_DIR}/qabstracttextdocumentlayout_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessible_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibleeditabletextinterface_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibleevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibleobject_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessiblestatechangeevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletablecellinterface_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletablemodelchangeevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextcursorevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextinsertevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextinterface_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextremoveevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextselectionevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessibletextupdateevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessiblevaluechangeevent_wrapper.cpp
+${QtGui_GEN_DIR}/qaccessiblevalueinterface_wrapper.cpp
+${QtGui_GEN_DIR}/qaction_wrapper.cpp
+${QtGui_GEN_DIR}/qactionevent_wrapper.cpp
+${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}/qclipboard_wrapper.cpp
+${QtGui_GEN_DIR}/qcloseevent_wrapper.cpp
+${QtGui_GEN_DIR}/qcolor_wrapper.cpp
+${QtGui_GEN_DIR}/qcolorspace_wrapper.cpp
+${QtGui_GEN_DIR}/qcolorconstants_wrapper.cpp
+${QtGui_GEN_DIR}/qcolorconstants_svg_wrapper.cpp
+${QtGui_GEN_DIR}/qconicalgradient_wrapper.cpp
+${QtGui_GEN_DIR}/qcontextmenuevent_wrapper.cpp
+${QtGui_GEN_DIR}/qcursor_wrapper.cpp
+${QtGui_GEN_DIR}/qdesktopservices_wrapper.cpp
+${QtGui_GEN_DIR}/qdoublevalidator_wrapper.cpp
+${QtGui_GEN_DIR}/qdrag_wrapper.cpp
+${QtGui_GEN_DIR}/qdragenterevent_wrapper.cpp
+${QtGui_GEN_DIR}/qdragleaveevent_wrapper.cpp
+${QtGui_GEN_DIR}/qdragmoveevent_wrapper.cpp
+${QtGui_GEN_DIR}/qdropevent_wrapper.cpp
+${QtGui_GEN_DIR}/qenterevent_wrapper.cpp
+${QtGui_GEN_DIR}/qeventpoint_wrapper.cpp
+${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}/qfontdatabase_wrapper.cpp
+${QtGui_GEN_DIR}/qfontinfo_wrapper.cpp
+${QtGui_GEN_DIR}/qfontmetrics_wrapper.cpp
+${QtGui_GEN_DIR}/qfontmetricsf_wrapper.cpp
+${QtGui_GEN_DIR}/qgradient_wrapper.cpp
+${QtGui_GEN_DIR}/qguiapplication_wrapper.cpp
+${QtGui_GEN_DIR}/qhelpevent_wrapper.cpp
+${QtGui_GEN_DIR}/qhideevent_wrapper.cpp
+${QtGui_GEN_DIR}/qhoverevent_wrapper.cpp
+${QtGui_GEN_DIR}/qicon_wrapper.cpp
+${QtGui_GEN_DIR}/qicondragevent_wrapper.cpp
+${QtGui_GEN_DIR}/qiconengine_scaledpixmapargument_wrapper.cpp
+${QtGui_GEN_DIR}/qiconengine_wrapper.cpp
+${QtGui_GEN_DIR}/qimage_wrapper.cpp
+${QtGui_GEN_DIR}/qimageiohandler_wrapper.cpp
+${QtGui_GEN_DIR}/qimagereader_wrapper.cpp
+${QtGui_GEN_DIR}/qimagewriter_wrapper.cpp
+${QtGui_GEN_DIR}/qinputdevice_wrapper.cpp
+${QtGui_GEN_DIR}/qinputevent_wrapper.cpp
+${QtGui_GEN_DIR}/qinputmethod_wrapper.cpp
+${QtGui_GEN_DIR}/qinputmethodevent_attribute_wrapper.cpp
+${QtGui_GEN_DIR}/qinputmethodevent_wrapper.cpp
+${QtGui_GEN_DIR}/qinputmethodqueryevent_wrapper.cpp
+${QtGui_GEN_DIR}/qintvalidator_wrapper.cpp
+${QtGui_GEN_DIR}/qkeycombination_wrapper.cpp
+${QtGui_GEN_DIR}/qkeyevent_wrapper.cpp
+${QtGui_GEN_DIR}/qkeysequence_wrapper.cpp
+${QtGui_GEN_DIR}/qlineargradient_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix2x2_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix2x3_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix2x4_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix3x2_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix3x3_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix3x4_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix4x2_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix4x3_wrapper.cpp
+${QtGui_GEN_DIR}/qmatrix4x4_wrapper.cpp
+${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}/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}/qpagesize_wrapper.cpp
+${QtGui_GEN_DIR}/qpaintdevice_wrapper.cpp
+${QtGui_GEN_DIR}/qpaintdevicewindow_wrapper.cpp
+${QtGui_GEN_DIR}/qpaintengine_wrapper.cpp
+${QtGui_GEN_DIR}/qpaintenginestate_wrapper.cpp
+${QtGui_GEN_DIR}/qpainter_pixmapfragment_wrapper.cpp
+${QtGui_GEN_DIR}/qpainter_wrapper.cpp
+${QtGui_GEN_DIR}/qpainterpath_element_wrapper.cpp
+${QtGui_GEN_DIR}/qpainterpath_wrapper.cpp
+${QtGui_GEN_DIR}/qpainterpathstroker_wrapper.cpp
+${QtGui_GEN_DIR}/qpaintevent_wrapper.cpp
+${QtGui_GEN_DIR}/qpalette_wrapper.cpp
+${QtGui_GEN_DIR}/qpdfwriter_wrapper.cpp
+${QtGui_GEN_DIR}/qpen_wrapper.cpp
+${QtGui_GEN_DIR}/qpicture_wrapper.cpp
+${QtGui_GEN_DIR}/qpixmap_wrapper.cpp
+${QtGui_GEN_DIR}/qpixmapcache_key_wrapper.cpp
+${QtGui_GEN_DIR}/qpixmapcache_wrapper.cpp
+${QtGui_GEN_DIR}/qpixelformat_wrapper.cpp
+${QtGui_GEN_DIR}/qpointerevent_wrapper.cpp
+${QtGui_GEN_DIR}/qpointingdevice_wrapper.cpp
+${QtGui_GEN_DIR}/qpointingdeviceuniqueid_wrapper.cpp
+${QtGui_GEN_DIR}/qpolygon_wrapper.cpp
+${QtGui_GEN_DIR}/qpolygonf_wrapper.cpp
+${QtGui_GEN_DIR}/qpytextobject_wrapper.cpp
+${QtGui_GEN_DIR}/qquaternion_wrapper.cpp
+${QtGui_GEN_DIR}/qradialgradient_wrapper.cpp
+${QtGui_GEN_DIR}/qregularexpressionvalidator_wrapper.cpp
+${QtGui_GEN_DIR}/qregion_wrapper.cpp
+${QtGui_GEN_DIR}/qresizeevent_wrapper.cpp
+${QtGui_GEN_DIR}/qsessionmanager_wrapper.cpp
+${QtGui_GEN_DIR}/qshortcutevent_wrapper.cpp
+${QtGui_GEN_DIR}/qshowevent_wrapper.cpp
+${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_GEN_DIR}/qscrollevent_wrapper.cpp
+${QtGui_GEN_DIR}/qscrollprepareevent_wrapper.cpp
+${QtGui_GEN_DIR}/qstatictext_wrapper.cpp
+${QtGui_GEN_DIR}/qstylehints_wrapper.cpp
+${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
+${QtGui_GEN_DIR}/qtextblockuserdata_wrapper.cpp
+${QtGui_GEN_DIR}/qtextcharformat_wrapper.cpp
+${QtGui_GEN_DIR}/qtextcursor_wrapper.cpp
+${QtGui_GEN_DIR}/qtextdocument_wrapper.cpp
+${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
+${QtGui_GEN_DIR}/qtextinlineobject_wrapper.cpp
+${QtGui_GEN_DIR}/qtextitem_wrapper.cpp
+${QtGui_GEN_DIR}/qtextlayout_formatrange_wrapper.cpp
+${QtGui_GEN_DIR}/qtextlayout_wrapper.cpp
+${QtGui_GEN_DIR}/qtextlength_wrapper.cpp
+${QtGui_GEN_DIR}/qtextline_wrapper.cpp
+${QtGui_GEN_DIR}/qtextlist_wrapper.cpp
+${QtGui_GEN_DIR}/qtextlistformat_wrapper.cpp
+${QtGui_GEN_DIR}/qtextobject_wrapper.cpp
+${QtGui_GEN_DIR}/qtextobjectinterface_wrapper.cpp
+${QtGui_GEN_DIR}/qtextoption_tab_wrapper.cpp
+${QtGui_GEN_DIR}/qtextoption_wrapper.cpp
+${QtGui_GEN_DIR}/qtexttable_wrapper.cpp
+${QtGui_GEN_DIR}/qtexttablecell_wrapper.cpp
+${QtGui_GEN_DIR}/qtexttablecellformat_wrapper.cpp
+${QtGui_GEN_DIR}/qtexttableformat_wrapper.cpp
+${QtGui_GEN_DIR}/qtoolbarchangeevent_wrapper.cpp
+${QtGui_GEN_DIR}/qtouchevent_wrapper.cpp
+${QtGui_GEN_DIR}/qtransform_wrapper.cpp
+${QtGui_GEN_DIR}/qt_wrapper.cpp
+${QtGui_GEN_DIR}/qundocommand_wrapper.cpp
+${QtGui_GEN_DIR}/qundogroup_wrapper.cpp
+${QtGui_GEN_DIR}/qundostack_wrapper.cpp
+${QtGui_GEN_DIR}/qvalidator_wrapper.cpp
+${QtGui_GEN_DIR}/qvector2d_wrapper.cpp
+${QtGui_GEN_DIR}/qvector3d_wrapper.cpp
+${QtGui_GEN_DIR}/qvector4d_wrapper.cpp
+${QtGui_GEN_DIR}/qwhatsthisclickedevent_wrapper.cpp
+${QtGui_GEN_DIR}/qwheelevent_wrapper.cpp
+${QtGui_GEN_DIR}/qwindow_wrapper.cpp
+${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp
+# module is always needed
+${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp
+)
+
+configure_file("${QtGui_SOURCE_DIR}/typesystem_gui.xml.in"
+ "${QtGui_BINARY_DIR}/typesystem_gui.xml" @ONLY)
+
+configure_file("${QtGui_SOURCE_DIR}/QtGui_global.post.h.in"
+ "${QtGui_BINARY_DIR}/QtGui_global.post.h" @ONLY)
+
+set(QtGui_include_dirs ${QtGui_SOURCE_DIR}
+ ${QtGui_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ )
+set(QtGui_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
+set(QtGui_deps QtCore)
+
+create_pyside_module(NAME QtGui
+ INCLUDE_DIRS QtGui_include_dirs
+ LIBRARIES QtGui_libraries
+ DEPS QtGui_deps
+ TYPESYSTEM_PATH QtGui_SOURCE_DIR
+ SOURCES QtGui_SRC
+ STATIC_SOURCES QPYTEXTOBJECT_MOC
+ TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
+ DROPPED_ENTRIES QtGui_DROPPED_ENTRIES)
+
+install(FILES ${pyside6_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide6/QtGui/)
+
diff --git a/sources/pyside2/PySide2/QtGui/QtGui_global.post.h.in b/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in
index 6d3a3eeac..6d3a3eeac 100644
--- a/sources/pyside2/PySide2/QtGui/QtGui_global.post.h.in
+++ b/sources/pyside6/PySide6/QtGui/QtGui_global.post.h.in
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui.xml.in b/sources/pyside6/PySide6/QtGui/typesystem_gui.xml.in
new file mode 100644
index 000000000..6f7dda3a1
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui.xml.in
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtGui">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui_@AUTO_OS@.xml" generate="yes"/>
+ <load-typesystem name="QtGui/typesystem_gui_common.xml" generate="yes"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml
new file mode 100644
index 000000000..f4447454d
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_common.xml
@@ -0,0 +1,2864 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtGui">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="templates/core_common.xml" generate="no"/>
+ <load-typesystem name="templates/gui_common.xml" generate="no"/>
+ <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
+
+
+ <rejection class="^Q.*$" argument-type="^QPlatform.*$"/>
+ <function signature="qAlpha(uint)"/>
+ <function signature="qBlue(uint)"/>
+ <function signature="qGray(int,int,int)"/>
+ <function signature="qGray(uint)"/>
+ <function signature="qGreen(uint)"/>
+ <function signature="qIsGray(uint)"/>
+ <function signature="qRed(uint)"/>
+ <function signature="qRgb(int,int,int)"/>
+ <function signature="qRgba(int,int,int,int)"/>
+ <function signature="qFuzzyCompare(QMatrix,QMatrix)"/>
+ <function signature="qFuzzyCompare(QTransform,QTransform)"/>
+ <function signature="qFuzzyCompare(QQuaternion,QQuaternion)"/>
+ <function signature="qFuzzyCompare(QMatrix4x4,QMatrix4x4)"/>
+ <function signature="qFuzzyCompare(QVector2D,QVector2D)"/>
+ <function signature="qFuzzyCompare(QVector3D,QVector3D)"/>
+ <function signature="qFuzzyCompare(QVector4D,QVector4D)"/>
+ <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 ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
+ <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,
+ besides the fact they are accessible by ordinary event methods.
+ -->
+
+ <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"/>
+
+ <!-- For Qt::mightBeRichText(QString), Qt::convertFromPlainText(QString,Qt::WhiteSpaceMode)
+ Match on files from '/QtGui/' (shadow build) or '/gui/' (developer build)
+ or '/QtGui.framework' (macOS) -->
+ <namespace-type name="Qt" files="^.*/(gui|QtGui)[/.].*\.h$" extends="PySide6.QtCore"/>
+
+ <primitive-type name="WId" 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>
+
+ <object-type name="QAbstractFileIconProvider" since="6.0">
+ <enum-type name="IconType"/>
+ <enum-type name="Option" flags="Options"/>
+ </object-type>
+
+ <value-type name="QAccessible">
+ <value-type name="State"/>
+ <enum-type name="Event"/>
+ <enum-type name="Role"/>
+ <enum-type name="Text"/>
+ <enum-type name="RelationFlag" flags="Relation"/>
+ <enum-type name="InterfaceType"/>
+ <enum-type name="TextBoundaryType"/>
+ </value-type>
+
+ <object-type name="QAccessibleEditableTextInterface"/>
+ <object-type name="QAccessibleInterface"/>
+ <object-type name="QAccessibleObject"/>
+ <object-type name="QAccessibleTableCellInterface"/>
+ <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">
+ <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="QAction">
+ <enum-type name="ActionEvent"/>
+ <enum-type name="MenuRole"/>
+ <enum-type name="Priority" since="4.6"/>
+ <modify-function signature="setMenu(QMenu*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="triggered(bool)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QActionGroup">
+ <enum-type name="ExclusionPolicy" since="5.14"/>
+ <modify-function signature="addAction(QAction*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeAction(QAction*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QShortcut">
+ <add-function signature="QShortcut(QKeySequence&amp;,QObject*,PyCallable*,Qt::ShortcutContext)">
+ <modify-argument index="4">
+ <replace-default-expression with="Qt::WindowShortcut"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qshortcut-1"/>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qshortcut-2"/>
+ </add-function>
+ </object-type>
+
+ <value-type name="QTransform">
+ <enum-type name="TransformationType"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f, %f, %f, %f, %f, %f"/>
+ <replace from="%REPR_ARGS"
+ to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="ddddddddd"/>
+ <replace from="%REDUCE_ARGS"
+ to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m13(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.m23(), %CPPSELF.m31(), %CPPSELF.m32(), %CPPSELF.m33()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <modify-function signature="map(qreal,qreal,qreal*,qreal*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <!-- ### This is just an overload to "map(qreal,qreal,qreal*,qreal*)const" and can be discarded in Python -->
+ <modify-function signature="map(int,int,int*,int*)const" remove="all"/>
+ <!-- ### -->
+
+ <modify-function signature="inverted(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ <add-function signature="quadToQuad(QPolygonF&amp;,QPolygonF&amp;)" return-type="PyObject*" static="true">
+ <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtoquad"/>
+ </add-function>
+ <add-function signature="quadToSquare(QPolygonF &amp;)" return-type="PyObject*" static="true">
+ <inject-code file="../glue/qtgui.cpp" snippet="qtransform-quadtosquare"/>
+ </add-function>
+
+ <add-function signature="squareToQuad(QPolygonF &amp;)" return-type="PyObject*" static="true">
+ <inject-code file="../glue/qtgui.cpp" snippet="qtransform-squaretoquad"/>
+ </add-function>
+ <!-- Disambiguate from Qt3DCore/qtransform.h -->
+ <include file-name="QtGui/qtransform.h" location="global"/>
+ </value-type>
+
+ <value-type name="QStaticText">
+ <enum-type name="PerformanceHint"/>
+ </value-type>
+ <value-type name="QTextFragment"/>
+ <value-type name="QBitmap" >
+ <modify-function signature="fromData(QSize,const uchar*,QImage::Format)">
+ <modify-argument index="2">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code file="../glue/qtgui.cpp" snippet="qbitmap-fromdata"/>
+ </modify-function>
+ </value-type>
+ <value-type name="QTextInlineObject"/>
+ <value-type name="QTextDocumentFragment"/>
+ <value-type name="QTextOption">
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="TabType"/>
+ <enum-type name="WrapMode"/>
+ <value-type name="Tab"/>
+ </value-type>
+ <value-type name="QTextLine" >
+ <enum-type name="CursorPosition"/>
+ <enum-type name="Edge"/>
+ <modify-function signature="cursorToX(int*,QTextLine::Edge)const" remove="all"/>
+ <modify-function signature="cursorToX(int,QTextLine::Edge)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qtextline-cursortox"/>
+ </modify-function>
+ <modify-function signature="xToCursor(qreal,QTextLine::CursorPosition)const">
+ <modify-argument index="2">
+ <rename to="edge"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <value-type name="QTextTableFormat"/>
+ <value-type name="QTextImageFormat"/>
+ <value-type name="QTextFrameFormat" >
+ <enum-type name="BorderStyle"/>
+ <enum-type name="Position"/>
+ </value-type>
+ <value-type name="QTextLength">
+ <enum-type name="Type"/>
+ </value-type>
+ <value-type name="QPainterPath">
+ <enum-type name="ElementType"/>
+ <value-type name="Element">
+ <include file-name="QPainterPath" location="global"/>
+ </value-type>
+ </value-type>
+ <value-type name="QPalette">
+ <enum-type name="ColorGroup"/>
+ <enum-type name="ColorRole"/>
+ </value-type>
+ <object-type name="QInputMethod">
+ <enum-type name="Action"/>
+ </object-type>
+ <value-type name="QKeyCombination"/>
+ <value-type name="QKeySequence">
+ <enum-type name="SequenceFormat"/>
+ <enum-type name="SequenceMatch"/>
+ <enum-type name="StandardKey"/>
+
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="qkeysequence_repr"/>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="iiii"/>
+ <replace from="%REDUCE_ARGS" to="(*%CPPSELF)[0], (*%CPPSELF)[1], (*%CPPSELF)[2], (*%CPPSELF)[3]"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <modify-function signature="operator[](uint)const" remove="all"/>
+ <add-function signature="__getitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qkeysequence-getitem"/>
+ </add-function>
+
+ <!-- ### Not necessary due the PySide QVariant conversion rules -->
+ <modify-function signature="operator QVariant()const" remove="all"/>
+ </value-type>
+ <value-type name="QPicture" >
+ <modify-function signature="load(QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="load(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="save(QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="save(const QString&amp;)" allow-thread="yes"/>
+ <!-- See bug 759 -->
+ <modify-function signature="data()const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <inject-code file="../glue/qtgui.cpp" snippet="qpicture-data"/>
+ </modify-function>
+ <modify-function signature="setData(const char*,uint)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ <conversion-rule class="target">
+ <insert-template name="const_char_pybuffer"/>
+ </conversion-rule>
+ <conversion-rule class="native">
+ <insert-template name="pybuffer_const_char"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="uint_remove"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <value-type name="QRegion" >
+ <enum-type name="RegionType"/>
+ <!-- ### This operator does not make sense in Python. -->
+ <modify-function signature="operator&amp;=(QRegion)" remove="all"/>
+ <modify-function signature="operator&amp;=(QRect)" remove="all"/>
+ <!-- ### -->
+ </value-type>
+
+ <value-type name="QTextBlock">
+ <value-type name="iterator" >
+ <include file-name="QTextBlock" location="global"/>
+ <!-- ### These operators where removed because they don't make sense in Python.
+ The iterator methods (__iter__, next) replace this functionality. -->
+ <modify-function signature="operator++()" remove="all"/>
+ <modify-function signature="operator--()" remove="all"/>
+ <!-- ### -->
+ <add-function signature="__iter__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__iter__"/>
+ </inject-code>
+ </add-function>
+ <add-function signature="__next__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__next__">
+ <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+ <add-function signature="__iter__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__iter_parent__">
+ <replace from="%CPPSELF_TYPE" to="QTextBlock::iterator"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <modify-function signature="setUserData(QTextBlockUserData*)">
+ <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-setuserdata"/>
+ </modify-function>
+ <modify-function signature="userData()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-userdata"/>
+ </modify-function>
+ </value-type>
+ <value-type name="QTextBlockFormat">
+ <enum-type name="LineHeightTypes" since="4.8" revision="4800"/>
+ <enum-type name="MarkerType" since="5.14"/>
+ </value-type>
+ <value-type name="QTextTableCellFormat"/>
+ <value-type name="QTextCharFormat" >
+ <enum-type name="FontPropertiesInheritanceBehavior"/>
+ <enum-type name="UnderlineStyle"/>
+ <enum-type name="VerticalAlignment"/>
+ </value-type>
+ <value-type name="QTextFormat" >
+ <enum-type name="FormatType"/>
+ <enum-type name="ObjectTypes"/>
+ <enum-type name="PageBreakFlag" flags="PageBreakFlags"/>
+ <enum-type name="Property"/>
+ </value-type>
+ <value-type name="QTextListFormat">
+ <enum-type name="Style"/>
+ </value-type>
+ <value-type name="QPolygon">
+ <extra-includes>
+ <include file-name="QTransform" location="global"/>
+ </extra-includes>
+ <!-- Expose operator==, != inherited from QList, which the parser does
+ not see due to the TMP expression of the return type. -->
+ <add-function signature="operator==(const QPolygon&amp;)" return-type="bool"/>
+ <add-function signature="operator!=(const QPolygon&amp;)" return-type="bool"/>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpolygon-reduce">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="N"/>
+ <replace from="%REDUCE_ARGS" to="points"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!-- ### "QPolygon(int, const int*)" is an internal constructor. -->
+ <modify-function signature="QPolygon(int,const int*)" remove="all"/>
+ <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
+ <modify-function signature="operator+=(QVector&lt;QPoint&gt;)" remove="all"/>
+ <add-function signature="operator&lt;&lt;(QPoint)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
+ </add-function>
+ <add-function signature="operator&lt;&lt;(QVector&lt;QPoint&gt;)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpolygon-operatorlowerlower"/>
+ </add-function>
+ <!-- ### -->
+ </value-type>
+ <value-type name="QPolygonF">
+ <extra-includes>
+ <include file-name="QTransform" location="global"/>
+ </extra-includes>
+ <!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
+ <modify-function signature="operator+=(QVector&lt;QPointF&gt;)" remove="all"/>
+ <!-- ### See bug 776 -->
+ <modify-function signature="operator&lt;&lt;(QPointF)" remove="all"/>
+ <!-- ### See bug 777 -->
+ <modify-function signature="operator&lt;&lt;(QVector&lt;QPointF&gt;)" remove="all"/>
+ <!-- ### -->
+ </value-type>
+ <value-type name="QIcon" >
+ <enum-type name="Mode"/>
+ <enum-type name="State"/>
+ <modify-function signature="QIcon(QIconEngine*)">
+ <modify-argument index="1">
+ <no-null-pointer/>
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QPixmap" >
+ <!--<conversion-rule>-->
+ <!--<target-to-native replace="no">-->
+ <!--<add-conversion type="QVariant" check="%CHECKTYPE[QVariant](%in)">-->
+ <!--QVariant in = %CONVERTTOCPP[QVariant](%in);-->
+ <!--%out = in.value&lt;%OUTTYPE&gt;();-->
+ <!--</add-conversion>-->
+ <!--</target-to-native>-->
+ <!--</conversion-rule>-->
+ <add-function signature="QPixmap(const QImage&amp;)">
+ <modify-argument index="1">
+ <rename to="image"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qpixmap"/>
+ </add-function>
+ <modify-function signature="QPixmap(const char*const[])">
+ <modify-argument index="1">
+ <replace-type modified-type="PySequence"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="load_xpm"/>
+ </inject-code>
+ </modify-function>
+
+ <!-- ### Operator ! doesn't make sense in Python. -->
+ <modify-function signature="operator!()const" remove="all"/>
+
+ <modify-function signature="loadFromData(const uchar*,uint,const char*,QFlags&lt;Qt::ImageConversionFlag&gt;)">
+ <inject-documentation format="target" mode="append">
+ This method must be used with an QPixmap object, not the class:
+
+ ::
+
+ # Wrong
+ pixmap = QPixmap.loadFromData(...)
+
+ # Right
+ pixmap = QPixmap().loadFromData(...)
+
+ </inject-documentation>
+ <modify-argument index="1">
+ <replace-type modified-type="PyBytes"/>
+ <conversion-rule class="native">
+ <insert-template name="pybytes_const_uchar"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="pybytes_uint"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <value-type name="QTextCursor" >
+ <extra-includes>
+ <include file-name="QTextBlock" location="global"/>
+ <include file-name="QTextDocumentFragment" location="global"/>
+ </extra-includes>
+ <enum-type name="MoveMode"/>
+ <enum-type name="MoveOperation"/>
+ <enum-type name="SelectionType"/>
+ <modify-function signature="selectedTableCells(int*,int*,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ <inject-code class="native" position="end">
+ <insert-template name="fix_native_return_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="currentFrame()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTable(int,int,const QTextTableFormat &amp;)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTable(int,int)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QConicalGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::ConicalGradient"/>
+ <value-type name="QFontInfo"/>
+ <value-type name="QRadialGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::RadialGradient"/>
+ <value-type name="QFont" >
+ <enum-type name="Capitalization"/>
+ <enum-type name="SpacingType"/>
+ <enum-type name="Stretch"/>
+ <enum-type name="Style"/>
+ <enum-type name="StyleHint"/>
+ <enum-type name="StyleStrategy"/>
+ <enum-type name="Weight"/>
+ <enum-type name="HintingPreference" since="4.8" revision="4800"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ <modify-function signature="setStyleHint(QFont::StyleHint,QFont::StyleStrategy)">
+ <modify-argument index="2">
+ <rename to="strategy"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <value-type name="QTextTableCell" >
+ <extra-includes>
+ <include file-name="QTextCursor" location="global"/>
+ </extra-includes>
+ </value-type> <!--
+ <function signature="QImageCleanupFunction(void*)">
+ <extra-includes>
+ <include file-name="QImage" location="global"/>
+ </extra-includes>
+ </function> -->
+ <primitive-type name="QImageCleanupFunction"/>
+ <value-type name="QImage">
+ <enum-type name="Format"/>
+ <enum-type name="InvertMode"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+
+ <modify-function signature="load(const QString&amp;, const char*)" allow-thread="yes"/>
+ <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
+ <modify-function signature="save(const QString&amp;,const char*,int)const" allow-thread="yes"/>
+ <modify-function signature="save(QIODevice*,const char*,int)const" allow-thread="yes"/>
+
+ <modify-function signature="QImage(uchar*,int,int,qsizetype,QImage::Format,QImageCleanupFunction,void*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code>
+ <insert-template name="qimage_buffer_constructor">
+ <replace from="%ARGS" to="%2, %3, %4, %5"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="QImage(uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code>
+ <insert-template name="qimage_buffer_constructor">
+ <replace from="%ARGS" to="%2, %3, %4"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <add-function signature="QImage(QString&amp;,int,int,int,QImage::Format)">
+ <inject-code>
+ <insert-template name="qimage_buffer_constructor">
+ <replace from="%ARGS" to="%2, %3, %4, %5"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QImage(QString&amp;,int,int,QImage::Format)">
+ <inject-code>
+ <insert-template name="qimage_buffer_constructor">
+ <replace from="%ARGS" to="%2, %3, %4"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!-- The non-const versions are already used -->
+ <modify-function signature="QImage(const uchar*,int,int,qsizetype,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
+ <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
+ <!-- ### -->
+
+ <modify-function signature="QImage(const char*const[])">
+ <modify-argument index="1">
+ <replace-type modified-type="PySequence"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="load_xpm"/>
+ </inject-code>
+ </modify-function>
+ <!-- ### There is already an fromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
+ <modify-function signature="fromData(const uchar*,int,const char*)" remove="all"/>
+ <!-- ### There is already an loadFromData with a QByteArray type (that is convertible from Python's str) as the first type. -->
+ <modify-function signature="loadFromData(const uchar*,int,const char*)" remove="all"/>
+
+ <modify-function signature="constBits()const" since="4.7">
+ <inject-code file="../glue/qtgui.cpp" snippet="qimage-constbits"/>
+ </modify-function>
+ <modify-function signature="bits()">
+ <inject-code file="../glue/qtgui.cpp" snippet="qimage-bits"/>
+ </modify-function>
+ <modify-function signature="constScanLine(int)const" since="4.7">
+ <inject-code file="../glue/qtgui.cpp" snippet="qimage-constscanline"/>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="scanLine(int)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qimage-scanline"/>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ </modify-function>
+ <!--
+ Only the non-const version of bits() and scanLine() is exported to Python
+ If the user don't want to detach the QImage data he must use constBits or constScanLine
+ as Python doesn't have the concept of constness.
+ -->
+ <modify-function signature="bits()const" remove="all"/>
+ <modify-function signature="scanLine(int)const" remove="all"/>
+
+ <modify-function signature="invertPixels(QImage::InvertMode)">
+ <modify-argument index="1">
+ <rename to="mode"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <value-type name="QCursor" >
+ <extra-includes>
+ <include file-name="QPixmap" location="global"/>
+ <include file-name="Qt" location="global"/>
+ </extra-includes>
+ </value-type>
+ <value-type name="QFontDatabase" >
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ </extra-includes>
+ <enum-type name="SystemFont"/>
+ <enum-type name="WritingSystem"/>
+ </value-type>
+ <value-type name="QPen">
+ <extra-includes>
+ <include file-name="QBrush" location="global"/>
+ </extra-includes>
+ </value-type>
+ <value-type name="QBrush">
+ <extra-includes>
+ <include file-name="QPixmap" location="global"/>
+ </extra-includes>
+ </value-type>
+
+ <value-type name="QColor">
+ <enum-type name="NameFormat"/>
+ <enum-type name="Spec"/>
+ <extra-includes>
+ <include file-name="QVariant" location="global"/>
+ </extra-includes>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="qcolor_repr"/>
+ </inject-code>
+ </add-function>
+ <add-function signature="__str__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="qcolor_repr"/>
+ </inject-code>
+ </add-function>
+ <add-function signature="__setstate__(PyObject*)" return-type="PyObject">
+ <inject-code file="../glue/qtgui.cpp" snippet="qcolor-setstate"/>
+ </add-function>
+ <add-function signature="__reduce__" return-type="PyObject">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-reduce"/>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor-totuple"/>
+ </add-function>
+ <!-- ### "QColor(QColor::Spec)" is an internal method. -->
+ <modify-function signature="QColor(QColor::Spec)" remove="all"/>
+ <!-- ### Constructor removed because we already have an overload using QString. -->
+ <modify-function signature="QColor(const char*)" remove="all"/>
+ <!-- ### -->
+ <add-function signature="QColor(QVariant)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qcolor"/>
+ </add-function>
+ <!-- get* methods. Inject code -->
+ <modify-function signature="getCmyk(int*,int*,int*,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getCmykF(float*,float*,float*,float*,float*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*,number*">
+ <replace from="$TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getHsl(int*,int*,int*,int*)const" since="4.6">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getHslF(float*,float*,float*,float*)const" since="4.6">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getHsv(int*,int*,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getHsvF(float*,float*,float*,float*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getRgb(int*,int*,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getRgbF(float*,float*,float*,float*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject*"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ </value-type>
+
+ <namespace-type name="QColorConstants" since="5.14">
+ <extra-includes>
+ <include file-name="QColor" location="global"/>
+ </extra-includes>
+ <namespace-type name="Svg" since="5.14">
+ <extra-includes>
+ <include file-name="QColor" location="global"/>
+ </extra-includes>
+ </namespace-type>
+ </namespace-type>
+
+ <value-type name="QColorSpace" since="5.14">
+ <enum-type name="NamedColorSpace"/>
+ <enum-type name="Primaries"/>
+ <enum-type name="TransferFunction"/>
+ </value-type>
+
+ <value-type name="QFontMetricsF" >
+
+ <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
+ <modify-argument index="1">
+ <replace-type modified-type="char"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="QFontCharFix"/>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
+ <modify-argument index="1">
+ <replace-type modified-type="char"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="QFontCharFix"/>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="boundingRect(QRectF,int,QString,int,int*)const">
+ <modify-argument index="5">
+ <replace-type modified-type="PyObject"/>
+ <array/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-boundingrect"/>
+ </modify-function>
+
+ <modify-function signature="size(int,QString,int,int*)const">
+ <modify-argument index="4">
+ <replace-type modified-type="PyObject"/>
+ <array/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetricsf-size"/>
+ </modify-function>
+ </value-type>
+ <value-type name="QFontMetrics" >
+
+ <modify-function signature="boundingRect(QChar)const" rename="boundingRectChar">
+ <modify-argument index="1">
+ <replace-type modified-type="char"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="QFontCharFix"/>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
+ <modify-argument index="1">
+ <replace-type modified-type="char"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="QFontCharFix"/>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="boundingRect(int,int,int,int,int,QString,int,int*)const">
+ <modify-argument index="8">
+ <replace-type modified-type="PyObject"/>
+ <array/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-1"/>
+ </modify-function>
+
+ <modify-function signature="boundingRect(QRect,int,QString,int,int*)const">
+ <modify-argument index="5">
+ <replace-type modified-type="PyObject"/>
+ <array/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qfontmetrics-boundingrect-2"/>
+ </modify-function>
+
+ <modify-function signature="size(int,QString,int,int*)const">
+ <modify-argument index="4">
+ <replace-type modified-type="PyObject"/>
+ <array/>
+ </modify-argument>
+ <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">
+ <enum-type name="CoordinateMode"/>
+ <enum-type name="InterpolationMode"/>
+ <enum-type name="Preset" since="5.12"/>
+ <enum-type name="Spread"/>
+ <enum-type name="Type"/>
+ </value-type>
+ <value-type name="QLinearGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::LinearGradient"/>
+ <object-type name="QPaintDevice">
+ <enum-type name="PaintDeviceMetric"/>
+ </object-type>
+ <object-type name="QPagedPaintDevice">
+ <enum-type name="PageSize"/>
+ <enum-type name="PdfVersion" since="5.10"/>
+ </object-type>
+ <object-type name="QAbstractTextDocumentLayout">
+ <value-type name="PaintContext" >
+ <include file-name="QAbstractTextDocumentLayout" location="global"/>
+ </value-type>
+ <value-type name="Selection"/>
+ <modify-function signature="setPaintDevice(QPaintDevice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="draw(QPainter*,QAbstractTextDocumentLayout::PaintContext)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawInlineObject(QPainter*,QRectF,QTextInlineObject,int,QTextFormat)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="update(const QRectF &amp;)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QPyTextObject"/>
+
+ <object-type name="QDesktopServices" since="4.2">
+ <modify-function signature="openUrl(const QUrl&amp;)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QDoubleValidator">
+ <enum-type name="Notation"/>
+ </object-type>
+ <object-type name="QIconEngine">
+ <object-type name="ScaledPixmapArgument"/>
+ <enum-type name="IconEngineHook"/>
+ <modify-function signature="paint(QPainter*,QRect,QIcon::Mode,QIcon::State)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="read(QDataStream&amp;)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="write(QDataStream&amp;)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <!-- ### This makes little sense in Python. Could be reassessed later. -->
+ <modify-function signature="virtual_hook(int,void*)" remove="all"/>
+ </object-type>
+ <object-type name="QImageWriter">
+ <enum-type name="ImageWriterError"/>
+ <modify-function signature="setDevice(QIODevice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="write(const QImage&amp;)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QIntValidator"/>
+
+ <object-type name="QPainterPathStroker" copyable="false"/>
+ <object-type name="QPixmapCache">
+ <value-type name="Key"/>
+ <add-function signature="find(QPixmapCache::Key&amp;)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpixmapcache-find"/>
+ </add-function>
+ <add-function signature="find(const QString&amp;)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpixmapcache-find"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QRegularExpressionValidator"/>
+
+ <object-type name="QStandardItem">
+ <enum-type name="ItemType"/>
+ <modify-function signature="operator&lt;(QStandardItem)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="read(QDataStream&amp;)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="write(QDataStream&amp;)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+
+ <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="appendRow(QStandardItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="appendRows(const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRows(int,const QList&lt;QStandardItem*&gt; &amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setChild(int,int,QStandardItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-1"/>
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setChild(int,QStandardItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditem-setchild-2"/>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="takeChild(int,int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="clone()const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <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*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setDocument(QTextDocument*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="document()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QTextBlockGroup"/>
+ <object-type name="QTextBlockUserData"/>
+ <object-type name="QTextItem">
+ <enum-type name="RenderFlag" flags="RenderFlags"/>
+ </object-type>
+ <object-type name="QTextList"/>
+ <object-type name="QTextObject"/>
+ <object-type name="QTextObjectInterface" >
+ <modify-function signature="drawObject(QPainter*,QRectF,QTextDocument*,int,QTextFormat)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QValidator">
+ <enum-type name="State"/>
+ <modify-function signature="fixup(QString &amp;)const">
+ <modify-argument index="return">
+ <replace-type modified-type="QString"/>
+ </modify-argument>
+ <inject-code class="native" position="end">
+ <insert-template name="return_QString_native"/>
+ </inject-code>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qstring-return"/>
+ </modify-function>
+ <modify-function signature="validate(QString &amp;,int &amp;)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ <conversion-rule class="native">
+ <insert-template name="validator_conversionrule"/>
+ </conversion-rule>
+ </modify-argument>
+ <inject-code class="target" position="end">
+ <insert-template name="return_tuple_QValidator_QString_int"/>
+ </inject-code>
+ </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">
+ <enum-type name="Reason"/>
+ </object-type>
+
+ <value-type name="QEventPoint" since="6.0">
+ <enum-type name="State"/>
+ </value-type>
+ <object-type name="QDragEnterEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragEnter"/>
+ <object-type name="QDragLeaveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragLeave"/>
+ <object-type name="QDragMoveEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::DragMove"/>
+ <object-type name="QDropEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Drop">
+ <modify-function signature="source()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-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="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="QInputMethodEvent" copyable="no" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethod">
+ <!-- only declare this if ndef QT_NO_INPUTMETHOD -->
+ <enum-type name="AttributeType"/>
+ <value-type name="Attribute">
+ <include file-name="QInputMethodEvent" location="global"/>
+ </value-type>
+ <!-- endif ndef QT_NO_INPUTMETHOD -->
+ </object-type>
+ <object-type name="QInputMethodQueryEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::InputMethodQuery"/>
+
+ <object-type name="QMoveEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Move"/>
+ <object-type name="QNativeGestureEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::NativeGesture"/>
+ <object-type name="QResizeEvent" copyable = "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Resize"/>
+ <object-type name="QShortcutEvent" copyable = "false" polymorphic-id-expression="%1-&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="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"/>
+ <!-- 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="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">
+ <add-function signature="operator!=(QKeySequence::StandardKey)">
+ <inject-code class="target" file="../glue/qtgui.cpp" snippet="qkeyevent-operatornotequal"/>
+ </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="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">
+ <enum-type name="ScrollState"/>
+ </object-type>
+ <object-type name="QPointerEvent" copyable= "false" since="6.0"/>
+ <object-type name="QScrollPrepareEvent" copyable="false" polymorphic-id-expression="%1-&gt;type() == QEvent::ScrollPrepare"/>
+
+ <object-type name="QTextFrame" >
+ <extra-includes>
+ <include file-name="QTextCursor" location="global"/>
+ </extra-includes>
+ <value-type name="iterator" >
+ <include file-name="QTextFrame" location="global"/>
+ <!-- ### These operators where removed because they don't make sense in Python.
+ Instead iterator methods (__iter__, next) should be implemented.
+ See bug 688 -->
+ <modify-function signature="operator++()" remove="all"/>
+ <modify-function signature="operator--()" remove="all"/>
+ <!-- ### -->
+ <add-function signature="__iter__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__iter__"/>
+ </inject-code>
+ </add-function>
+ <add-function signature="__next__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__next__">
+ <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+ <add-function signature="__iter__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__iter_parent__">
+ <replace from="%CPPSELF_TYPE" to="QTextFrame::iterator"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </object-type>
+ <object-type name="QImageIOHandler">
+ <extra-includes>
+ <include file-name="QRect" location="global"/>
+ </extra-includes>
+ <enum-type name="ImageOption"/>
+ <enum-type name="Transformation" flags="Transformations" since="5.5"/>
+ <modify-function signature="setDevice(QIODevice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QImageReader">
+ <extra-includes>
+ <include file-name="QColor" location="global"/>
+ <include file-name="QRect" location="global"/>
+ <include file-name="QSize" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QImage" location="global"/>
+ </extra-includes>
+ <enum-type name="ImageReaderError"/>
+ <!-- ### This method does not make sense in Python.
+ Update: perhaps it does, but no one is missing it. -->
+ <modify-function signature="read(QImage*)" remove="all"/>
+ <modify-function signature="read()" allow-thread="yes"/>
+ <modify-function signature="setDevice(QIODevice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QMovie">
+ <extra-includes>
+ <include file-name="QColor" location="global"/>
+ <include file-name="QImage" location="global"/>
+ <include file-name="QPixmap" location="global"/>
+ <include file-name="QRect" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <enum-type name="CacheMode"/>
+ <enum-type name="MovieState"/>
+ <!-- ### "cacheMode()" is an internal method. -->
+ <modify-function signature="setDevice(QIODevice*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QDrag">
+ <extra-includes>
+ <include file-name="QPoint" location="global"/>
+ <include file-name="QPixmap" location="global"/>
+ </extra-includes>
+ <modify-function signature="QDrag(QObject*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="source()const">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="target()const">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setMimeData(QMimeData*)">
+ <modify-argument index="1">
+ <!-- TODO: maybe this is not the best solution -->
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;)" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="exec(QFlags&lt;Qt::DropAction&gt;,Qt::DropAction)" rename="exec_" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QStandardItemModel" polymorphic-id-expression="qobject_cast&lt;QStandardItemModel*&gt;(%1)">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="takeItem(int,int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeHorizontalHeaderItem(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeVerticalHeaderItem(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="verticalHeaderItem(int)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="horizontalHeaderItem(int)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="invisibleRootItem()const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="item(int,int)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="itemFromIndex(const QModelIndex&amp;)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="itemPrototype()const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="appendRow(const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="appendRow(QStandardItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertRow(int,QStandardItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setHorizontalHeaderItem(int,QStandardItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setItem(int,int,QStandardItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-1"/>
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItem(int,QStandardItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setitem-2"/>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemPrototype(const QStandardItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setVerticalHeaderItem(int,QStandardItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-setverticalheaderitem"/>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="takeColumn(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="takeRow(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="findItems(const QString&amp;,QFlags&lt;Qt::MatchFlag&gt;,int)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertColumn(int,const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertRow(int,const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="appendColumn(const QList&lt;QStandardItem*&gt;&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="clear()">
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qstandarditemmodel-clear"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QClipboard">
+ <extra-includes>
+ <include file-name="QImage" location="global"/>
+ <include file-name="QPixmap" location="global"/>
+ </extra-includes>
+ <enum-type name="Mode"/>
+ <modify-function signature="setMimeData(QMimeData*,QClipboard::Mode)" allow-thread="yes">
+ <modify-argument index="1">
+ <!-- TODO: maybe this is not the best solution -->
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="text(QString&amp;,QClipboard::Mode)const">
+ <modify-argument index="2">
+ <replace-default-expression with="QClipboard::Clipboard"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, subtype)"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qclipboard-text"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QPaintEngineState">
+ <extra-includes>
+ <include file-name="QPainterPath" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QTextLayout">
+ <extra-includes>
+ <include file-name="QTextOption" location="global"/>
+ </extra-includes>
+ <enum-type name="CursorMode"/>
+ <value-type name="FormatRange">
+ <include file-name="QTextLayout" location="global"/>
+ </value-type>
+ </object-type>
+ <object-type name="QTextDocument">
+ <extra-includes>
+ <include file-name="QTextBlock" location="global"/>
+ <include file-name="QTextFormat" location="global"/>
+ <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="MetaInformation"/>
+ <enum-type name="ResourceType"/>
+ <enum-type name="Stacks" since="4.7"/>
+ <modify-function signature="setDocumentLayout(QAbstractTextDocumentLayout*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="object(int)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="objectForFormat(const QTextFormat&amp;)const">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="createObject(const QTextFormat&amp;)">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="target"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
+ </object-type>
+ <object-type name="QTextDocumentWriter" since="4.5"/>
+ <object-type name="QTextTable">
+ <extra-includes>
+ <include file-name="QTextCursor" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QPaintEngine">
+ <enum-type name="DirtyFlag" flags="DirtyFlags"/>
+ <enum-type name="PaintEngineFeature" flags="PaintEngineFeatures"/>
+ <enum-type name="PolygonDrawMode"/>
+ <enum-type name="Type"/>
+ <modify-function signature="begin(QPaintDevice*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="updateState(QPaintEngineState)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawTextItem(QPointF,QTextItem)">
+ <modify-argument index="2" invalidate-after-use="yes"/>
+ </modify-function>
+ <extra-includes>
+ <include file-name="QVarLengthArray" location="global"/>
+ </extra-includes>
+ <!-- ### "setPaintDevice(QPaintDevice*)" is an internal method. -->
+ <modify-function signature="setPaintDevice(QPaintDevice*)" remove="all"/>
+ </object-type>
+ <object-type name="QPainter">
+ <extra-includes>
+ <include file-name="QPainterPath" location="global"/>
+ <include file-name="QPixmap" location="global"/>
+ </extra-includes>
+ <enum-type name="CompositionMode"/>
+ <enum-type name="PixmapFragmentHint" flags="PixmapFragmentHints" since="4.7"/>
+ <enum-type name="RenderHint" flags="RenderHints"/>
+ <value-type name="PixmapFragment" since="4.7">
+ <include file-name="QPainter" location="global"/>
+ </value-type>
+
+ <!-- ### "drawText(...)" is an internal method. -->
+ <modify-function signature="drawText(const QPointF&amp;,const QString&amp;,int,int)" remove="all"/>
+
+
+ <modify-function signature="drawConvexPolygon(const QPoint*,int)" remove="all"/>
+ <add-function signature="drawConvexPolygon(QVector&lt;QPoint>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <modify-function signature="drawConvexPolygon(const QPointF*,int)" remove="all"/>
+ <add-function signature="drawConvexPolygon(QVector&lt;QPointF>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <!-- ### Overloads using QVector<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"/>
+ <!-- ### -->
+ <modify-function signature="drawPoints(const QPoint*,int)" remove="all"/>
+ <add-function signature="drawPoints(QVector&lt;QPoint>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <modify-function signature="drawPoints(const QPointF*,int)" remove="all"/>
+ <add-function signature="drawPoints(QVector&lt;QPointF>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <modify-function signature="drawPolygon(const QPoint*,int,Qt::FillRule)" remove="all"/>
+ <add-function signature="drawPolygon(QVector&lt;QPoint>,Qt::FillRule)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
+ </add-function>
+ <modify-function signature="drawPolygon(const QPointF*,int,Qt::FillRule)" remove="all"/>
+ <add-function signature="drawPolygon(QVector&lt;QPointF>,Qt::FillRule)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qpainter-drawpolygon"/>
+ </add-function>
+ <modify-function signature="drawPolyline(const QPoint*,int)" remove="all"/>
+ <add-function signature="drawPolyline(QVector&lt;QPoint>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <!-- PYSIDE-1366: Preferably use the QPolygon overloads first to avoid
+ a costly sequence type check on QPolygon. -->
+ <modify-function signature="drawPolyline(const QPointF*,int)" remove="all"/>
+ <modify-function signature="drawPolyline(const QPolygon&amp;)" overload-number="0"/>
+ <modify-function signature="drawPolyline(const QPolygonF&amp;)" overload-number="1"/>
+ <add-function signature="drawPolyline(QVector&lt;QPointF>)">
+ <inject-code>
+ <insert-template name="qpainter_drawlist"/>
+ </inject-code>
+ </add-function>
+ <modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;,const QPoint&amp;)">
+ <modify-argument index="3">
+ <rename to="pos"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QPainter(QPaintDevice*)">
+ <modify-argument index="1">
+ <no-null-pointer/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="begin(QPaintDevice*)">
+ <modify-argument index="1">
+ <no-null-pointer/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="drawText(QRectF,int,QString,QRectF*)">
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="QRectF"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,QRectF*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="drawText(QRect,int,QString,QRect*)">
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="QRect"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,QRect*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="drawText(int,int,int,int,int,QString,QRect*)">
+ <modify-argument index="7">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,QRect*"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+
+ <value-type name="QGenericMatrix" generate="no"/>
+ <value-type name="QMatrix2x2" since="4.6">
+ <modify-function signature="QMatrix2x2(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="4"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="4"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix2x2(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="4"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="4"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix2x3" since="4.6">
+ <modify-function signature="QMatrix2x3(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="6"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix2x3(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix2x4" since="4.6">
+ <modify-function signature="QMatrix2x4(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="8"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix2x4(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix3x2" since="4.6">
+ <modify-function signature="QMatrix3x2(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="6"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix3x2(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="6"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix3x3" since="4.6">
+ <modify-function signature="QMatrix3x3(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="9"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="9"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix3x3(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="9"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="9"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix3x4" since="4.6">
+ <modify-function signature="QMatrix3x4(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="12"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix3x4(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix4x2" since="4.6">
+ <modify-function signature="QMatrix4x2(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="8"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix4x2(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="8"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix4x3" since="4.6">
+ <modify-function signature="QMatrix4x3(const float*)" remove="all"/>
+ <modify-function signature="copyDataTo(float*) const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="12"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="QMatrix4x3(PySequence*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_constructor">
+ <replace from="%SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ <add-function signature="data()" return-type="float">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="12"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+ </value-type>
+
+ <value-type name="QMatrix4x4" since="4.6">
+ <enum-type name="Flag" flags="Flags" since="6.0"/>
+
+ <!-- Qt5: HAIRY TRICK ALERT ahead!
+ Qt5 partially replaced 'qreal' by float.
+ That had the side effect that all matrix types did not work any longer.
+
+ Reason (I guess):
+
+ The signature "QList<qreal>" is needed by the __reduce__ methods,
+ but created by some other object used elsewhere.
+ After the matrix type was changed, "QList<float>" was created nowhere.
+
+ I don't know an explicit way to produce the right conversion function, so what I did
+ was to create a dummy function and immediately delete it again.
+ This has the desired effect of creating the implicitly needed "QList<float>"
+ conversion, although the dummy function goes away.
+
+ Q: Do you know a better solution?
+ -->
+ <add-function signature="__dummy(const QList&lt;float &gt; &amp;)"/>
+ <modify-function signature="__dummy(const QList&lt;float &gt; &amp;)" remove="all"/>
+ <!-- that was the trick ^^^^^^^^^^^^^^^^^^^^^^ -->
+
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code_matrix">
+ <replace from="%MATRIX_SIZE" to="16"/>
+ <replace from="%MATRIX_TYPE" to="float"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code_matrix">
+ <replace from="%MATRIX_TYPE" to="float"/>
+ <replace from="%MATRIX_SIZE" to="16"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <!-- ### "QMatrix4x4(const float*,int,int)" is an internal constructor. -->
+ <modify-function signature="QMatrix4x4(const float*,int,int)" remove="all"/>
+
+ <modify-function signature="QMatrix4x4(const float*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PySequence"/>
+ <array/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4"/>
+ </modify-function>
+ <modify-function signature="data()">
+ <inject-code class="target" position="beginning">
+ <insert-template name="matrix_data_function">
+ <replace from="%MATRIX_SIZE" to="16"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="copyDataTo(float*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTupleObject*"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtgui.cpp" snippet="qmatrix4x4-copydatato"/>
+ </modify-function>
+
+ <modify-function signature="inverted(bool*)const">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+
+ <!-- ### "constData() const" and "data() const" are unnecessary in Python and their function is performed by "data()". -->
+ <modify-function signature="data()const" remove="all"/>
+ <modify-function signature="constData()const" remove="all"/>
+ <!-- ### -->
+ <modify-function signature="operator()(int,int)const" remove="all"/>
+ <modify-function signature="operator()(int,int)" remove="all"/>
+ <add-function signature="__mgetitem__" return-type="PyObject*">
+ <inject-code file="../glue/qtgui.cpp" snippet="qmatrix4x4-mgetitem"/>
+ </add-function>
+ </value-type>
+
+ _______ end of matrix block _______ -->
+
+ <value-type name="QQuaternion" since="4.6">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dddd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.scalar(), %CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
+ </insert-template>
+ </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"/>
+ </value-type>
+
+ <object-type name="QTouchEvent" since="4.6"/>
+
+ <object-type name="QInputDevice">
+ <enum-type name="Capability" flags="Capabilities"/>
+ <enum-type name="DeviceType" flags="DeviceTypes"/>
+ </object-type>
+
+ <value-type name="QVector2D" since="4.6">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ </value-type>
+ <value-type name="QVector3D" since="4.6">
+ <extra-includes>
+ <include file-name="QMatrix4x4" location="global"/>
+ </extra-includes>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="ddd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="ddd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ </value-type>
+ <value-type name="QVector4D" since="4.6">
+ <extra-includes>
+ <include file-name="QMatrix4x4" location="global"/>
+ </extra-includes>
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f"/>
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="reduce_code">
+ <replace from="%REDUCE_FORMAT" to="dddd"/>
+ <replace from="%REDUCE_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
+ </insert-template>
+ </inject-code>
+ </add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dddd"/>
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y(), %CPPSELF.z(), %CPPSELF.w()"/>
+ </insert-template>
+ </inject-code>
+ </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>
+ <enum-type name="RestartHint"/>
+ <!-- ### -->
+ </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">
+ <enum-type name="SurfaceClass"/>
+ <enum-type name="SurfaceType"/>
+ </object-type>
+ <rejection class="QSurface" field-name="m_reserved"/>
+ <value-type name="QSurfaceFormat">
+ <enum-type name="ColorSpace" since="5.10"/>
+ <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"/>
+ <primitive-type name="QPlatformSurface">
+ <extra-includes>
+ <include file-name="QtGui/qpa/qplatformsurface.h" location="global"/>
+ </extra-includes>
+ </primitive-type>
+
+ <object-type name="QWindow" delete-in-main-thread="true">
+ <enum-type name="AncestorMode"/>
+ <enum-type name="Visibility"/>
+ <modify-function signature="raise()" rename="raise_"/>
+ <!-- see QWidget::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
+ <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion_variables"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion"/>
+ </conversion-rule>
+ </modify-argument>
+ <inject-code position="end">
+ <insert-template name="return_native_eventfilter"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="fromWinId(WId)">
+ <modify-argument index="1">
+ <replace-type modified-type="long"/>
+ </modify-argument>
+ <inject-code file="../glue/qtgui.cpp" snippet="qwindow-fromWinId"/>
+ </modify-function>
+ <modify-function signature="show()" allow-thread="yes"/>
+ <modify-function signature="showFullScreen()" allow-thread="yes"/>
+ <modify-function signature="showMaximized()" allow-thread="yes"/>
+ <modify-function signature="showMinimized()" allow-thread="yes"/>
+ <modify-function signature="showNormal()" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QGuiApplication">
+ <extra-includes>
+ <include file-name="QBasicTimer" location="global"/>
+ <include file-name="QFont" location="global"/>
+ <include file-name="QFontMetrics" location="global"/>
+ <include file-name="QPalette" location="global"/>
+ <include file-name="QIcon" location="global"/>
+ <include file-name="QLocale" location="global"/>
+ </extra-includes>
+ <modify-function signature="QGuiApplication(int&amp;,char**,int)" access="private"/>
+ <add-function signature="QGuiApplication(QStringList)">
+ <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-1"/>
+ </add-function>
+ <add-function signature="QGuiApplication()">
+ <inject-code file="../glue/qtgui.cpp" snippet="qguiapplication-2"/>
+ </add-function>
+ <inject-code class="native" position="beginning" file="../glue/qtgui.cpp" snippet="qguiapplication-init"/>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+
+ </object-type>
+
+ <object-type name="QOpenGLContext">
+ <enum-type name="OpenGLModuleType"/>
+ </object-type>
+ <object-type name="QOpenGLContextGroup" since="5.0"/>
+ <!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function
+ <object-type name="QOpenGLPaintDevice" since="5.0"/>
+ -->
+ <object-type name="QOpenGLExtraFunctions" since="5.6">
+ <!-- Exlusions due to compile errors -->
+ <modify-function signature="glEndTransformFeedback()" remove="all"/>
+ <modify-function signature="glPauseTransformFeedback()" remove="all"/>
+ <modify-function signature="glResumeTransformFeedback()" remove="all"/>
+ <modify-function signature="^glClearBuffer.*\(.*\*.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDebugMessageControl(unsigned int,unsigned int,unsigned int,int,const unsigned int*,unsigned char)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDeleteProgramPipelines(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDeleteQueries(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDeleteSamplers(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDeleteTransformFeedbacks(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDeleteVertexArrays(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glDrawBuffers(int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGenProgramPipelines(int,unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGenQueries(int,unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGenSamplers(int,unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGenTransformFeedbacks(int,unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGenVertexArrays(int,unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetActiveUniformBlockiv(unsigned int,unsigned int,unsigned int,int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetActiveUniformsiv(unsigned int,int,const unsigned int*,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetFramebufferParameteriv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetIntegeri_v(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetInternalformativ(unsigned int,unsigned int,unsigned int,int,int*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetMultisamplefv(unsigned int,unsigned int,float*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetProgramInterfaceiv(unsigned int,unsigned int,unsigned int,int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetProgramPipelineiv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetProgramResourceiv(unsigned int,unsigned int,unsigned int,int,const unsigned int*,int,int*,int*)">
+ <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(unsigned int,unsigned int,unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetQueryiv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetSamplerParameterfv(unsigned int,unsigned int,float*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetSamplerParameteriv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetTexLevelParameteriv(unsigned int,int,unsigned int,int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetTexLevelParameterfv(unsigned int,int,unsigned int,float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetUniformuiv(unsigned int,int,unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetVertexAttribIiv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetVertexAttribIuiv(unsigned int,unsigned int,unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glInvalidateFramebuffer(unsigned int,int,const unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glInvalidateSubFramebuffer(unsigned int,int,const unsigned int*,int,int,int,int)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform1fv(unsigned int,int,int,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform1iv(unsigned int,int,int,const int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform1uiv(unsigned int,int,int,const unsigned int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform2fv(unsigned int,int,int,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform2iv(unsigned int,int,int,const int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform2uiv(unsigned int,int,int,const unsigned int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform3fv(unsigned int,int,int,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform3iv(unsigned int,int,int,const int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform3uiv(unsigned int,int,int,const unsigned int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform4fv(unsigned int,int,int,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform4iv(unsigned int,int,int,const int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniform4uiv(unsigned int,int,int,const unsigned int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix2fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix2x3fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix2x4fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix3fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix3x2fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix3x4fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix4fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix4x2fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glProgramUniformMatrix4x3fv(unsigned int,int,int,unsigned char,const float*)">
+ <modify-argument index="5"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glSamplerParameterI?u?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glTexParameterI?u?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniform1uiv(int,int,const unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniform2uiv(int,int,const unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniform3uiv(int,int,const unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniform4uiv(int,int,const unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix2x3fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix2x4fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix3x2fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix3x4fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix4x2fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glUniformMatrix4x3fv(int,int,unsigned char,const float*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glVertexAttribI4iv(unsigned int,const int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glVertexAttribI4uiv(unsigned int,const unsigned int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetStringi(unsigned int,unsigned int)">
+ <modify-argument index="return">
+ <replace-type modified-type="QString"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qstring-return"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QOpenGLFunctions" since="5.0">
+ <enum-type name="OpenGLFeature" flags="OpenGLFeatures"/>
+ <modify-function signature="glGetAttachedShaders(unsigned int,int,int*,unsigned int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetBufferParameteriv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetFloatv(unsigned int,float*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetFramebufferAttachmentParameteriv(unsigned int,unsigned int,unsigned int,int*)">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetIntegerv(unsigned int,int*)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetProgramiv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetRenderbufferParameteriv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetShaderiv(unsigned int,unsigned int,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetShaderPrecisionFormat(unsigned int,unsigned int,int*,int*)">
+ <modify-argument index="3"><array/></modify-argument>
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glDelete.*s\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glGen[A-Z].*s\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^gl(Get)?TexParameterI?u?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glUniformMatrix\dfv\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^gl(Get)?Uniform\d?.v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glVertexAttrib\dfv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="^glGetVertexAttrib[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="glGetString(unsigned int)">
+ <modify-argument index="return">
+ <replace-type modified-type="QString"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="glGetString_return_QString"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="glShaderBinary(int,const unsigned int*,unsigned int,const void *,int)">
+ <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_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"/>
+ -->
+ <value-type name="QPageLayout">
+ <enum-type name="Mode"/>
+ <enum-type name="Orientation"/>
+ <enum-type name="Unit"/>
+ </value-type>
+ <value-type name="QPageSize">
+ <enum-type name="PageSizeId"/>
+ <enum-type name="Unit"/>
+ <enum-type name="SizeMatchPolicy"/>
+ </value-type>
+ <object-type name="QPaintDeviceWindow"/>
+ <value-type name="QPixelFormat">
+ <enum-type name="AlphaUsage"/>
+ <enum-type name="AlphaPosition"/>
+ <enum-type name="AlphaPremultiplied"/>
+ <enum-type name="ByteOrder"/>
+ <enum-type name="ColorModel"/>
+ <enum-type name="TypeInterpretation"/>
+ <enum-type name="YUVLayout"/>
+ </value-type>
+ <object-type name="QPdfWriter"/>
+ <object-type name="QPointingDevice" since="6.0">
+ <enum-type name="PointerType" flags="PointerTypes"/>
+ <enum-type name="GrabTransition"/>
+ </object-type>
+ <value-type name="QPointingDeviceUniqueId"/>
+ <value-type name="QRawFont">
+ <enum-type name="AntialiasingType"/>
+ <enum-type name="LayoutFlag" flags="LayoutFlags"/>
+ <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int)const" remove="all"/>
+ <modify-function signature="advancesForGlyphIndexes(const quint32*,QPointF*,int,QFlags&lt;QRawFont::LayoutFlag&gt;)const" remove="all"/>
+ <modify-function signature="glyphIndexesForChars(const QChar*,int,quint32*,int*)const" remove="all"/>
+ <modify-function signature="loadFromData(const QByteArray&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
+ <modify-function signature="loadFromFile(const QString&amp;,qreal, QFont::HintingPreference)" allow-thread="yes"/>
+ </value-type>
+ <object-type name="QRasterWindow"/>
+ <object-type name="QScreen">
+ <modify-function signature="grabWindow(WId,int,int,int,int)">
+ <modify-argument index="1">
+ <replace-type modified-type="long"/>
+ </modify-argument>
+ <inject-code file="../glue/qtgui.cpp" snippet="qscreen-grabWindow"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QStyleHints"/>
+
+ <object-type name="QUndoCommand">
+ <modify-function signature="mergeWith(const QUndoCommand*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QUndoGroup">
+ <modify-function signature="addStack(QUndoStack*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeStack(QUndoStack*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QUndoStack">
+ <modify-function signature="createUndoAction(QObject*,const QString&amp;)const">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="createRedoAction(QObject*,const QString&amp;)const">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="push(QUndoCommand*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_mac.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_mac.xml
new file mode 100644
index 000000000..3df668b86
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_mac.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtGui">
+ <rejection class="*" function-name="qt_mac_set_cursor"/>
+ <rejection class="*" function-name="macMenu"/>
+
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
+
+ <suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared"/>
+ <suppress-warning text="type 'QGtkStyle' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml
new file mode 100644
index 000000000..247bf8a51
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_win.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtGui"/>
diff --git a/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml b/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml
new file mode 100644
index 000000000..247bf8a51
--- /dev/null
+++ b/sources/pyside6/PySide6/QtGui/typesystem_gui_x11.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtGui"/>
diff --git a/sources/pyside6/PySide6/QtHelp/CMakeLists.txt b/sources/pyside6/PySide6/QtHelp/CMakeLists.txt
new file mode 100644
index 000000000..cf4977ec7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtHelp/CMakeLists.txt
@@ -0,0 +1,60 @@
+project(QtHelp)
+
+set(QtHelp_SRC
+${QtHelp_GEN_DIR}/qhelpcontentitem_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpcontentmodel_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpcontentwidget_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpenginecore_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpengine_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpindexmodel_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpindexwidget_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpsearchengine_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpsearchquerywidget_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpsearchquery_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpsearchresult_wrapper.cpp
+${QtHelp_GEN_DIR}/qhelpsearchresultwidget_wrapper.cpp
+# module is always needed
+${QtHelp_GEN_DIR}/qthelp_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_EQUAL 5.13.0
+ OR Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_GREATER 5.13.0)
+ list(APPEND QtHelp_SRC
+ ${QtHelp_GEN_DIR}/qcompressedhelpinfo_wrapper.cpp
+ ${QtHelp_GEN_DIR}/qhelpfilterdata_wrapper.cpp
+ ${QtHelp_GEN_DIR}/qhelpfilterengine_wrapper.cpp)
+endif()
+
+if (Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_EQUAL 5.15.0
+ OR Qt${QT_MAJOR_VERSION}Help_VERSION VERSION_GREATER 5.15.0)
+ list(APPEND QtHelp_SRC
+ ${QtHelp_GEN_DIR}/qhelpfiltersettingswidget_wrapper.cpp
+ ${QtHelp_GEN_DIR}/qhelplink_wrapper.cpp)
+endif()
+
+
+set(QtHelp_include_dirs ${QtHelp_SOURCE_DIR}
+ ${QtHelp_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Help_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${QtGui_GEN_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)
+
+create_pyside_module(NAME QtHelp
+ INCLUDE_DIRS QtHelp_include_dirs
+ LIBRARIES QtHelp_libraries
+ DEPS QtHelp_deps
+ TYPESYSTEM_PATH QtHelp_SOURCE_DIR
+ SOURCES QtHelp_SRC)
diff --git a/sources/pyside6/PySide6/QtHelp/typesystem_help.xml b/sources/pyside6/PySide6/QtHelp/typesystem_help.xml
new file mode 100644
index 000000000..42863eb96
--- /dev/null
+++ b/sources/pyside6/PySide6/QtHelp/typesystem_help.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.QtHelp">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+ <value-type name="QCompressedHelpInfo" since="5.13"/>
+ <value-type name="QHelpContentItem">
+ <modify-function signature="parent()const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+ <object-type name="QHelpContentModel" polymorphic-id-expression="qobject_cast&lt;QHelpContentModel*&gt;(%1)"/>
+ <object-type name="QHelpContentWidget"/>
+ <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"/>
+ <object-type name="QHelpIndexModel"/>
+ <object-type name="QHelpIndexWidget"/>
+ <value-type name="QHelpLink" since="5.15"/>
+ <object-type name="QHelpSearchEngine"/>
+ <value-type name="QHelpSearchQuery">
+ <enum-type name="FieldName"/>
+ </value-type>
+ <object-type name="QHelpSearchQueryWidget"/>
+ <object-type name="QHelpSearchResult"/>
+ <object-type name="QHelpSearchResultWidget"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtLocation/CMakeLists.txt b/sources/pyside6/PySide6/QtLocation/CMakeLists.txt
new file mode 100644
index 000000000..5489afae9
--- /dev/null
+++ b/sources/pyside6/PySide6/QtLocation/CMakeLists.txt
@@ -0,0 +1,75 @@
+project(QtLocation)
+
+set(QtLocation_OPTIONAL_SRC )
+set(QtLocation_DROPPED_ENTRIES )
+
+set(QtLocation_SRC
+${QtLocation_GEN_DIR}/qgeocodereply_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeomaneuver_wrapper.cpp
+${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}/qplace_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacecontentreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacedetailsreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceicon_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceidreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacemanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceuser_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeocodingmanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeocodingmanagerengine_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeorouterequest_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutingmanager_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoroutingmanagerengine_wrapper.cpp
+${QtLocation_GEN_DIR}/qgeoserviceproviderfactory_wrapper.cpp
+${QtLocation_GEN_DIR}/qplaceattribute_wrapper.cpp
+${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
+${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
+${QtLocation_GEN_DIR}/qplacesearchsuggestionreply_wrapper.cpp
+${QtLocation_GEN_DIR}/qplacesupplier_wrapper.cpp
+# module is always needed
+${QtLocation_GEN_DIR}/qtlocation_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}Location_VERSION VERSION_EQUAL 5.11.0
+ OR Qt${QT_MAJOR_VERSION}Location_VERSION VERSION_GREATER 5.11.0)
+ list(APPEND QtLocation_SRC
+ ${QtLocation_GEN_DIR}/qgeoserviceproviderfactoryv2_wrapper.cpp)
+endif()
+
+set(QtLocation_include_dirs ${QtLocation_SOURCE_DIR}
+ ${QtLocation_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Location_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtPositioning_GEN_DIR})
+
+set(QtLocation_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Location_LIBRARIES})
+
+set(QtLocation_deps QtCore QtPositioning)
+
+create_pyside_module(NAME QtLocation
+ INCLUDE_DIRS QtLocation_include_dirs
+ LIBRARIES QtLocation_libraries
+ DEPS QtLocation_deps
+ TYPESYSTEM_PATH QtLocation_SOURCE_DIR
+ SOURCES QtLocation_SRC
+ DROPPED_ENTRIES QtLocation_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtLocation/typesystem_location.xml b/sources/pyside6/PySide6/QtLocation/typesystem_location.xml
new file mode 100644
index 000000000..e0ff17d0e
--- /dev/null
+++ b/sources/pyside6/PySide6/QtLocation/typesystem_location.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtLocation">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtPositioning/typesystem_positioning.xml" generate="no"/>
+ <object-type name="QGeoCodeReply">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoManeuver">
+ <enum-type name="InstructionDirection"/>
+ </value-type>
+ <value-type name="QGeoRoute"/>
+ <object-type name="QGeoRouteReply">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoRouteSegment"/>
+ <object-type name="QGeoServiceProvider">
+ <enum-type name="Error"/>
+ <enum-type name="RoutingFeature" flags="RoutingFeatures"/>
+ <enum-type name="GeocodingFeature" flags="GeocodingFeatures"/>
+ <enum-type name="MappingFeature" flags="MappingFeatures"/>
+ <enum-type name="PlacesFeature" flags="PlacesFeatures"/>
+ <enum-type name="NavigationFeature" flags="NavigationFeatures"/>
+ </object-type>
+ <value-type name="QPlace"/>
+ <object-type name="QPlaceContentReply"/>
+ <object-type name="QPlaceDetailsReply"/>
+ <value-type name="QPlaceIcon"/>
+ <object-type name="QPlaceIdReply">
+ <enum-type name="OperationType"/>
+ </object-type>
+ <object-type name="QPlaceManager"/>
+ <value-type name="QPlaceUser"/>
+ <object-type name="QGeoCodingManager"/>
+ <object-type name="QGeoCodingManagerEngine"/>
+ <object-type name="QGeoRouteRequest">
+ <enum-type name="TravelMode" flags="TravelModes"/>
+ <enum-type name="FeatureType" flags="FeatureTypes"/>
+ <enum-type name="FeatureWeight" flags="FeatureWeights"/>
+ <enum-type name="RouteOptimization" flags="RouteOptimizations"/>
+ <enum-type name="SegmentDetail" flags="SegmentDetails"/>
+ <enum-type name="ManeuverDetail" flags="ManeuverDetails"/>
+ </object-type>
+ <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"/>
+ </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"/>
+ <object-type name="QPlaceProposedSearchResult"/>
+ <value-type name="QPlaceRatings"/>
+ <object-type name="QPlaceReply">
+ <enum-type name="Error"/>
+ <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"/>
+ </object-type>
+ <object-type name="QPlaceSearchResult">
+ <enum-type name="SearchResultType"/>
+ </object-type>
+ <object-type name="QPlaceSearchSuggestionReply"/>
+ <value-type name="QPlaceSupplier"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtMacExtras/CMakeLists.txt b/sources/pyside6/PySide6/QtMacExtras/CMakeLists.txt
new file mode 100644
index 000000000..0f16b3bca
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMacExtras/CMakeLists.txt
@@ -0,0 +1,33 @@
+project(QtMacExtras)
+
+set(QtMacExtras_SRC
+${QtMacExtras_GEN_DIR}/qmacpasteboardmime_wrapper.cpp
+${QtMacExtras_GEN_DIR}/qmactoolbar_wrapper.cpp
+${QtMacExtras_GEN_DIR}/qmactoolbaritem_wrapper.cpp
+
+# module is always needed
+${QtMacExtras_GEN_DIR}/qtmacextras_module_wrapper.cpp
+)
+
+set(QtMacExtras_include_dirs ${QtMacExtras_SOURCE_DIR}
+ ${QtMacExtras_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}MacExtras_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${libpyside_SOURCE_DIR})
+
+set(QtMacExtras_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}MacExtras_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
+
+set(QtMacExtras_deps QtCore QtGui)
+
+create_pyside_module(NAME QtMacExtras
+ INCLUDE_DIRS QtMacExtras_include_dirs
+ LIBRARIES QtMacExtras_libraries
+ DEPS QtMacExtras_deps
+ TYPESYSTEM_PATH QtMacExtras_SOURCE_DIR
+ SOURCES QtMacExtras_SRC)
diff --git a/sources/pyside6/PySide6/QtMacExtras/typesystem_macextras.xml b/sources/pyside6/PySide6/QtMacExtras/typesystem_macextras.xml
new file mode 100644
index 000000000..3402162b3
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMacExtras/typesystem_macextras.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtMacExtras">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+
+ <function signature="qRegisterDraggedTypes(QStringList)" since="5.2"/>
+
+ <object-type name="QMacPasteboardMime" since="5.2">
+ <enum-type name="QMacPasteboardMimeType"/>
+ </object-type>
+ <object-type name="QMacToolBar" since="5.3"/>
+ <object-type name="QMacToolBarItem" since="5.3">
+ <enum-type name="StandardItem"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
new file mode 100644
index 000000000..bb5048cdb
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
@@ -0,0 +1,130 @@
+project(QtMultimedia)
+
+set(QtMultimedia_SRC
+${QtMultimedia_GEN_DIR}/qabstractaudiodeviceinfo_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qabstractaudioinput_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qabstractaudiooutput_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qabstractvideobuffer_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qabstractvideofilter_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qabstractvideosurface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiobuffer_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiodecoder_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiodecodercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiodeviceinfo_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioencodersettingscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioencodersettings_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioformat_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioinputselectorcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioinput_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiooutputselectorcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiooutput_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudioprobe_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiorecorder_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudiorolecontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudio_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameracapturebufferformatcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameracapturedestinationcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameracontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraexposurecontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraexposure_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerafeedbackcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerafocus_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraflashcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerafocuscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerafocuszone_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamera_frameraterange_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraimagecapturecontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraimagecapture_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraimageprocessing_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraimageprocessingcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerainfocontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerainfo_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameralockscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraviewfindersettingscontrol2_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraviewfindersettingscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcameraviewfindersettings_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamera_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qcamerazoomcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qimageencodercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qimageencodersettings_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaaudioprobecontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaavailabilitycontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediabindableinterface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediacontainercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediacontent_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediacontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediagaplessplaybackcontrol_wrapper.cpp
+# Causes compile errors: ${QtMultimedia_GEN_DIR}/qmediametadata_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmedianetworkaccesscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaobject_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaplayercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaplayer_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaplaylist_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediarecordercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediarecorder_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaresource_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservice_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservicecamerainfointerface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservicedefaultdeviceinterface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservicefeaturesinterface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaserviceproviderhint_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservicesupporteddevicesinterface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediaservicesupportedformatsinterface_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediastreamscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediatimeinterval_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediatimerange_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmediavideoprobecontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmetadatareadercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmetadatawritercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qmultimedia_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qradiodatacontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qradiodata_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qradiotunercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qradiotuner_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qsoundeffect_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qsound_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideodeviceselectorcontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideoencodersettingscontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideoencodersettings_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideofilterrunnable_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideoframe_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideoprobe_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideorenderercontrol_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideosurfaceformat_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qvideowindowcontrol_wrapper.cpp
+
+# module is always needed
+${QtMultimedia_GEN_DIR}/qtmultimedia_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}Multimedia_VERSION VERSION_EQUAL 5.11.0
+ OR Qt${QT_MAJOR_VERSION}Multimedia_VERSION VERSION_GREATER 5.11.0)
+ list(APPEND QtMultimedia_SRC
+ ${QtMultimedia_GEN_DIR}/qcustomaudiorolecontrol_wrapper.cpp)
+endif()
+
+set(QtMultimedia_include_dirs ${QtMultimedia_SOURCE_DIR}
+ ${QtMultimedia_BINARY_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}Multimedia_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_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}
+ )
+set(QtMultimedia_deps QtCore QtGui QtNetwork)
+
+create_pyside_module(NAME QtMultimedia
+ INCLUDE_DIRS QtMultimedia_include_dirs
+ LIBRARIES QtMultimedia_libraries
+ DEPS QtMultimedia_deps
+ TYPESYSTEM_PATH QtMultimedia_SOURCE_DIR
+ SOURCES QtMultimedia_SRC)
diff --git a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
new file mode 100644
index 000000000..25af801ba
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtMultimedia">
+ <load-typesystem name="QtMultimedia/typesystem_multimedia_common.xml" generate="yes"/>
+ <load-typesystem name="QtMultimedia/typesystem_multimedia_forward_declarations.xml" generate="yes"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_common.xml b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_common.xml
new file mode 100644
index 000000000..e4107e2fe
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_common.xml
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtMultimedia">
+ <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="Role" since="5.6"/>
+ <enum-type name="State"/>
+ <enum-type name="VolumeScale" since="5.8"/>
+ </namespace-type>
+
+ <value-type name="QVideoSurfaceFormat">
+ <enum-type name="Direction"/>
+ <enum-type name="YCbCrColorSpace"/>
+ </value-type>
+ <object-type name="QAbstractVideoBuffer">
+ <enum-type name="HandleType"/>
+ <enum-type name="MapMode"/>
+ <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)" remove="all"/>
+ <!-- TODO: discuss a way to have this working with the virtual method.
+ <modify-function signature="map(QAbstractVideoBuffer::MapMode,int*,int*)">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,int*,int*"/>
+ </inject-code>
+ </modify-function>
+ -->
+ <!-- TODO: PYSIDE-354, arrays are not supported -->
+ <modify-function signature="mapPlanes(QAbstractVideoBuffer::MapMode,int*,int[4],uchar*[4])" remove="all"/>
+ </object-type>
+ <object-type name="QAbstractVideoSurface">
+ <enum-type name="Error"/>
+ </object-type>
+ <object-type name="QAbstractVideoFilter">
+ <modify-function signature="createFilterRunnable()">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <value-type name="QVideoFrame">
+ <enum-type name="FieldType"/>
+ <enum-type name="PixelFormat"/>
+ <modify-function signature="bits()">
+ <inject-code file="../glue/qtmultimedia.cpp" snippet="qvideoframe-bits"/>
+ </modify-function>
+ <modify-function signature="bits(int)" remove="all"/>
+ <modify-function signature="bits(int)const" remove="all"/>
+ </value-type>
+
+ <value-type name="QAudioBuffer"/>
+ <object-type name="QAudioDecoder">
+ <enum-type name="Error"/>
+ <enum-type name="State"/>
+ </object-type>
+ <value-type name="QAudioFormat">
+ <enum-type name="Endian"/>
+ <enum-type name="SampleType"/>
+ </value-type>
+ <value-type name="QAudioDeviceInfo"/>
+ <object-type name="QAbstractAudioDeviceInfo"/>
+
+ <object-type name="QAbstractAudioOutput">
+ <modify-function signature="start()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="start(QIODevice*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QAbstractAudioInput">
+ <modify-function signature="start()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="start(QIODevice*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QAudioDecoderControl"/>
+ <object-type name="QAudioProbe"/>
+ <value-type name="QAudioEncoderSettings"/>
+ <object-type name="QAudioEncoderSettingsControl">
+ <modify-function signature="supportedSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
+ </object-type>
+
+ <object-type name="QAudioInput">
+ <modify-function signature="start()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="start(QIODevice*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAudioInputSelectorControl"/>
+
+ <object-type name="QAudioOutput">
+ <modify-function signature="start()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="start(QIODevice*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAudioOutputSelectorControl"/>
+ <object-type name="QAudioRecorder"/>
+ <object-type name="QAudioRoleControl"/>
+
+ <object-type name="QCamera">
+ <value-type name="FrameRateRange"/>
+ <enum-type name="CaptureMode" flags="CaptureModes"/>
+ <enum-type name="Error"/>
+ <enum-type name="LockChangeReason"/>
+ <enum-type name="LockStatus"/>
+ <enum-type name="LockType" flags="LockTypes"/>
+ <enum-type name="Position"/>
+ <enum-type name="State"/>
+ <enum-type name="Status"/>
+ <modify-function signature="setViewfinder(QVideoWidget*)">
+ <modify-argument index="1">
+ <replace-type modified-type="QObject*"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
+ </modify-function>
+ <modify-function signature="setViewfinder(QGraphicsVideoItem*)">
+ <modify-argument index="1">
+ <replace-type modified-type="QObject*"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QCameraCaptureBufferFormatControl"/>
+ <object-type name="QCameraCaptureDestinationControl"/>
+ <object-type name="QCameraControl">
+ <enum-type name="PropertyChangeType"/>
+ </object-type>
+ <object-type name="QCameraExposure">
+ <enum-type name="FlashMode" flags="FlashModes"/>
+ <enum-type name="ExposureMode"/>
+ <enum-type name="MeteringMode"/>
+ <modify-function signature="supportedApertures(bool*)const" remove="all"/>
+ <modify-function signature="supportedIsoSensitivities(bool*)const" remove="all"/>
+ <modify-function signature="supportedShutterSpeeds(bool*)const" remove="all"/>
+ </object-type>
+ <object-type name="QCameraExposureControl">
+ <enum-type name="ExposureParameter"/>
+ <modify-function signature="supportedParameterRange(QCameraExposureControl::ExposureParameter,bool*)const" remove="all"/>
+ </object-type>
+ <object-type name="QCameraFeedbackControl">
+ <enum-type name="EventType"/>
+ </object-type>
+ <value-type name="QCameraFocusZone">
+ <enum-type name="FocusZoneStatus"/>
+ </value-type>
+ <object-type name="QCameraFocus">
+ <enum-type name="FocusMode" flags="FocusModes"/>
+ <enum-type name="FocusPointMode"/>
+ </object-type>
+ <object-type name="QCameraFlashControl"/>
+ <object-type name="QCameraFocusControl"/>
+ <value-type name="QCameraInfo"/>
+ <object-type name="QCameraInfoControl"/>
+ <object-type name="QCameraImageCapture">
+ <enum-type name="CaptureDestination" flags="CaptureDestinations"/>
+ <enum-type name="DriveMode"/>
+ <enum-type name="Error"/>
+ <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
+ </object-type>
+ <object-type name="QCameraImageCaptureControl"/>
+ <object-type name="QCameraImageProcessing">
+ <enum-type name="WhiteBalanceMode"/>
+ <enum-type name="ColorFilter"/>
+ </object-type>
+ <object-type name="QCameraImageProcessingControl">
+ <enum-type name="ProcessingParameter"/>
+ </object-type>
+ <object-type name="QCameraLocksControl"/>
+ <value-type name="QCameraViewfinderSettings"/>
+ <object-type name="QCameraViewfinderSettingsControl">
+ <enum-type name="ViewfinderParameter"/>
+ </object-type>
+ <object-type name="QCameraViewfinderSettingsControl2"/>
+ <object-type name="QCameraZoomControl"/>
+
+ <value-type name="QImageEncoderSettings"/>
+ <object-type name="QImageEncoderControl">
+ <modify-function signature="supportedResolutions(const QImageEncoderSettings &amp;,bool*)const" remove="all"/>
+ </object-type>
+
+ <object-type name="QMediaAudioProbeControl"/>
+ <object-type name="QMediaAvailabilityControl"/>
+ <object-type name="QMediaBindableInterface"/>
+ <object-type name="QMediaContainerControl"/>
+ <value-type name="QMediaContent"/>
+ <object-type name="QMediaGaplessPlaybackControl"/>
+ <object-type name="QMediaControl"/>
+ <object-type name="QCustomAudioRoleControl" since="5.11"/>
+ <object-type name="QMediaNetworkAccessControl"/>
+ <!-- Causes compile errors
+ <namespace-type name="QMediaMetaData"/>
+ -->
+ <object-type name="QMediaObject"/>
+ <object-type name="QMediaPlayer">
+ <enum-type name="State"/>
+ <enum-type name="MediaStatus"/>
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="Error"/>
+ <modify-function signature="setVideoOutput(QVideoWidget*)">
+ <modify-argument index="1">
+ <replace-type modified-type="QObject*"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
+ </modify-function>
+ <modify-function signature="setVideoOutput(QGraphicsVideoItem*)">
+ <modify-argument index="1">
+ <replace-type modified-type="QObject*"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtmultimedia.cpp" snippet="upcast"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QMediaPlayerControl"/>
+ <object-type name="QMediaPlaylist">
+ <enum-type name="PlaybackMode"/>
+ <enum-type name="Error"/>
+ </object-type>
+ <object-type name="QMediaRecorder">
+ <enum-type name="Error"/>
+ <enum-type name="State"/>
+ <enum-type name="Status"/>
+ <modify-function signature="supportedAudioSampleRates(const QAudioEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ </object-type>
+ <object-type name="QMediaRecorderControl"/>
+ <value-type name="QMediaResource"/>
+ <object-type name="QMediaService"/>
+ <interface-type name="QMediaServiceCameraInfoInterface"/>
+ <interface-type name="QMediaServiceDefaultDeviceInterface"/>
+ <interface-type name="QMediaServiceFeaturesInterface"/>
+ <value-type name="QMediaServiceProviderHint">
+ <enum-type name="Type"/>
+ <enum-type name="Feature" flags="Features"/>
+ </value-type>
+ <interface-type name="QMediaServiceSupportedDevicesInterface"/>
+ <interface-type name="QMediaServiceSupportedFormatsInterface"/>
+ <object-type name="QMediaStreamsControl">
+ <enum-type name="StreamType"/>
+ </object-type>
+ <value-type name="QMediaTimeInterval"/>
+ <value-type name="QMediaTimeRange"/>
+ <object-type name="QMediaVideoProbeControl"/>
+
+ <object-type name="QMetaDataReaderControl"/>
+ <object-type name="QMetaDataWriterControl"/>
+
+ <namespace-type name="QMultimedia">
+ <enum-type name="SupportEstimate"/>
+ <enum-type name="EncodingQuality"/>
+ <enum-type name="EncodingMode"/>
+ <enum-type name="AvailabilityStatus"/>
+ </namespace-type>
+
+ <object-type name="QRadioData">
+ <enum-type name="Error"/>
+ <enum-type name="ProgramType"/>
+ </object-type>
+ <object-type name="QRadioDataControl"/>
+ <object-type name="QRadioTuner">
+ <enum-type name="Band"/>
+ <enum-type name="Error"/>
+ <enum-type name="SearchMode"/>
+ <enum-type name="State"/>
+ <enum-type name="StereoMode"/>
+ </object-type>
+ <object-type name="QRadioTunerControl"/>
+ <object-type name="QSound">
+ <enum-type name="Loop"/>
+ </object-type>
+ <object-type name="QSoundEffect">
+ <enum-type name="Loop"/>
+ <enum-type name="Status"/>
+ </object-type>
+
+ <object-type name="QVideoDeviceSelectorControl"/>
+ <value-type name="QVideoEncoderSettings"/>
+ <object-type name="QVideoEncoderSettingsControl">
+ <modify-function signature="supportedFrameRates(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ <modify-function signature="supportedResolutions(const QVideoEncoderSettings &amp;,bool*)const" remove="all"/>
+ </object-type>
+ <object-type name="QVideoFilterRunnable">
+ <enum-type name="RunFlag" flags="RunFlags"/>
+ </object-type>
+ <object-type name="QVideoProbe"/>
+ <object-type name="QVideoRendererControl"/>
+ <object-type name="QVideoWindowControl"/>
+
+ <suppress-warning text="Final class 'QMediaObject' set to non-final, as it is extended by other classes"/>
+ <suppress-warning text="Pure virtual method 'QAbstractVideoBuffer::map(QAbstractVideoBuffer::MapMode,int*,int*)' must be implement but was completely removed on type system."/>
+ <suppress-warning text="Pure virtual method 'QImageEncoderControl::supportedResolutions(QImageEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
+ <suppress-warning text="Pure virtual method 'QCameraExposureControl::supportedParameterRange(QCameraExposureControl::ExposureParameter,bool*)const' must be implement but was completely removed on type system."/>
+ <suppress-warning text="Pure virtual method 'QVideoEncoderSettingsControl::supportedFrameRates(QVideoEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
+ <suppress-warning text="Pure virtual method 'QVideoEncoderSettingsControl::supportedResolutions(QVideoEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
+ <suppress-warning text="Pure virtual method 'QAudioEncoderSettingsControl::supportedSampleRates(QAudioEncoderSettings,bool*)const' must be implement but was completely removed on type system."/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_forward_declarations.xml b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_forward_declarations.xml
new file mode 100644
index 000000000..71b0759d6
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia_forward_declarations.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtMultimedia">
+ <custom-type name="QVideoWidget"/>
+ <custom-type name="QGraphicsVideoItem"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt
new file mode 100644
index 000000000..efdab2d1c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimediaWidgets/CMakeLists.txt
@@ -0,0 +1,42 @@
+project(QtMultimediaWidgets)
+
+set(QtMultimediaWidgets_SRC
+${QtMultimediaWidgets_GEN_DIR}/qcameraviewfinder_wrapper.cpp
+${QtMultimediaWidgets_GEN_DIR}/qgraphicsvideoitem_wrapper.cpp
+${QtMultimediaWidgets_GEN_DIR}/qvideowidget_wrapper.cpp
+${QtMultimediaWidgets_GEN_DIR}/qvideowidgetcontrol_wrapper.cpp
+# module is always needed
+${QtMultimediaWidgets_GEN_DIR}/qtmultimediawidgets_module_wrapper.cpp
+)
+
+set(QtMultimediaWidgets_include_dirs ${QtMultimediaWidgets_SOURCE_DIR}
+ ${QtMultimediaWidgets_BINARY_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}Multimedia_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}MultimediaWidgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtWidgets_GEN_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})
+
+set(QtMultimediaWidgets_deps QtCore QtGui QtNetwork QtWidgets QtMultimedia)
+
+create_pyside_module(NAME QtMultimediaWidgets
+ INCLUDE_DIRS QtMultimediaWidgets_include_dirs
+ LIBRARIES QtMultimediaWidgets_libraries
+ DEPS QtMultimediaWidgets_deps
+ TYPESYSTEM_PATH QtMultimediaWidgets_SOURCE_DIR
+ SOURCES QtMultimediaWidgets_SRC)
diff --git a/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml b/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml
new file mode 100644
index 000000000..7d3337031
--- /dev/null
+++ b/sources/pyside6/PySide6/QtMultimediaWidgets/typesystem_multimediawidgets.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtMultimediaWidgets">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <load-typesystem name="QtMultimedia/typesystem_multimedia_common.xml" generate="no"/>
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+ <object-type name="QCameraViewfinder"/>
+ <object-type name="QGraphicsVideoItem"/>
+ <object-type name="QVideoWidget"/>
+ <object-type name="QVideoWidgetControl"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt b/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt
new file mode 100644
index 000000000..0301cc0b0
--- /dev/null
+++ b/sources/pyside6/PySide6/QtNetwork/CMakeLists.txt
@@ -0,0 +1,107 @@
+project(QtNetwork)
+
+set(QtNetwork_DROPPED_ENTRIES )
+
+set(QtNetwork_SRC
+${QtNetwork_GEN_DIR}/qabstractnetworkcache_wrapper.cpp
+${QtNetwork_GEN_DIR}/qabstractsocket_wrapper.cpp
+${QtNetwork_GEN_DIR}/qauthenticator_wrapper.cpp
+${QtNetwork_GEN_DIR}/qdnsdomainnamerecord_wrapper.cpp
+${QtNetwork_GEN_DIR}/qdnshostaddressrecord_wrapper.cpp
+${QtNetwork_GEN_DIR}/qdnslookup_wrapper.cpp
+${QtNetwork_GEN_DIR}/qdnsmailexchangerecord_wrapper.cpp
+${QtNetwork_GEN_DIR}/qdnsservicerecord_wrapper.cpp
+${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}/qhttpmultipart_wrapper.cpp
+${QtNetwork_GEN_DIR}/qhttppart_wrapper.cpp
+${QtNetwork_GEN_DIR}/qipv6address_wrapper.cpp
+${QtNetwork_GEN_DIR}/qlocalserver_wrapper.cpp
+${QtNetwork_GEN_DIR}/qlocalsocket_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkaccessmanager_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkaddressentry_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkcachemetadata_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkcookie_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkcookiejar_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkdatagram_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkdiskcache_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkinterface_wrapper.cpp
+${QtNetwork_GEN_DIR}/qnetworkproxy_wrapper.cpp
+${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}/qpassworddigestor_wrapper.cpp
+${QtNetwork_GEN_DIR}/qssl_wrapper.cpp
+${QtNetwork_GEN_DIR}/qsslcertificate_wrapper.cpp
+${QtNetwork_GEN_DIR}/qsslcertificateextension_wrapper.cpp
+${QtNetwork_GEN_DIR}/qtcpserver_wrapper.cpp
+${QtNetwork_GEN_DIR}/qtcpsocket_wrapper.cpp
+${QtNetwork_GEN_DIR}/qudpsocket_wrapper.cpp
+# module is always needed
+${QtNetwork_GEN_DIR}/qtnetwork_module_wrapper.cpp
+)
+
+get_property(QtNetwork_disabled_features TARGET Qt${QT_MAJOR_VERSION}::Network
+ PROPERTY QT_DISABLED_PUBLIC_FEATURES)
+
+if("ssl" IN_LIST QtNetwork_disabled_features)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QOcspResponse QSslCipher
+ QSslConfiguration QSslDiffieHellmanParameters QSslError
+ QSslKey QSslPreSharedKeyAuthenticator QSslSocket)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping SSL classes")
+else()
+ # Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
+ # check_qt_class(QtNetwork QSslEllipticCurve QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qsslcipher_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslconfiguration_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qssldiffiehellmanparameters_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslerror_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslkey_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslpresharedkeyauthenticator_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsslsocket_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qocspresponse_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SSL classes")
+endif()
+
+if("dtls" IN_LIST QtNetwork_disabled_features)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QDtls)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping DTLS classes")
+else()
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qdtls_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding DTLS classes")
+endif()
+
+if("sctp" IN_LIST QtNetwork_disabled_features)
+ list(APPEND QtNetwork_DROPPED_ENTRIES QSctpServer QSctpSocket)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Dropping SCTP classes")
+else()
+ list(APPEND QtNetwork_SRC
+ ${QtNetwork_GEN_DIR}/qsctpserver_wrapper.cpp
+ ${QtNetwork_GEN_DIR}/qsctpsocket_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Network: Adding SCTP classes")
+endif()
+
+set(QtNetwork_include_dirs ${QtNetwork_SOURCE_DIR}
+ ${QtNetwork_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtNetwork_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES})
+
+set(QtNetwork_deps QtCore)
+
+create_pyside_module(NAME QtNetwork
+ INCLUDE_DIRS QtNetwork_include_dirs
+ LIBRARIES QtNetwork_libraries
+ DEPS QtNetwork_deps
+ TYPESYSTEM_PATH QtNetwork_SOURCE_DIR
+ SOURCES QtNetwork_SRC
+ DROPPED_ENTRIES QtNetwork_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml
new file mode 100644
index 000000000..ea0cef7fa
--- /dev/null
+++ b/sources/pyside6/PySide6/QtNetwork/typesystem_network.xml
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtNetwork">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <rejection class="dtlsopenssl"/>
+
+ <enum-type name="QDtlsError" since="5.12"/>
+ <enum-type name="QOcspCertificateStatus" since="5.13"/>
+ <enum-type name="QOcspRevocationReason" since="5.13"/>
+
+ <namespace-type name="QPasswordDigestor" since="5.12">
+ <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="AlternativeNameEntryType"/>
+ <enum-type name="EncodingFormat"/>
+ <enum-type name="KeyAlgorithm"/>
+ <enum-type name="KeyType"/>
+ <enum-type name="SslOption" flags="SslOptions"/>
+ <enum-type name="SslProtocol"/>
+ <extra-includes>
+ <include file-name="qssl.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+
+ <rejection class="QIPv6Address" field-name="c"/>
+ <rejection class="dtlsopenssl"/>
+
+ <object-type name="QAbstractSocket">
+ <enum-type name="BindFlag" flags="BindMode"/>
+ <enum-type name="NetworkLayerProtocol"/>
+ <enum-type name="PauseMode" flags="PauseModes"/>
+ <enum-type name="SocketError"/>
+ <enum-type name="SocketOption" since="4.6"/>
+ <enum-type name="SocketState"/>
+ <enum-type name="SocketType"/>
+ <modify-function signature="connectToHost(const QString&amp;,quint16,QFlags&lt;QIODeviceBase::OpenModeFlag>,QAbstractSocket::NetworkLayerProtocol)" allow-thread="yes"/>
+ <modify-function signature="connectToHost(const QHostAddress&amp;,quint16,QFlags&lt;QIODeviceBase::OpenModeFlag>)" allow-thread="yes"/>
+ <modify-function signature="disconnectFromHost()" allow-thread="yes"/>
+ <modify-function signature="waitForConnected(int)" allow-thread="yes"/>
+ <modify-function signature="waitForDisconnected(int)" allow-thread="yes"/>
+ </object-type>
+
+ <value-type name="QDnsDomainNameRecord"/>
+ <value-type name="QDnsHostAddressRecord"/>
+ <object-type name="QDnsLookup">
+ <enum-type name="Error"/>
+ <enum-type name="Type"/>
+ </object-type>
+ <value-type name="QDnsMailExchangeRecord"/>
+ <value-type name="QDnsServiceRecord"/>
+ <value-type name="QDnsTextRecord"/>
+
+ <object-type name="QDtls" since="5.12">
+ <enum-type name="HandshakeState"/>
+ </object-type>
+
+ <value-type name="QHstsPolicy" since="5.9">
+ <enum-type name="PolicyFlag" flags="PolicyFlags"/>
+ </value-type>
+ <object-type name="QHttpMultiPart">
+ <enum-type name="ContentType"/>
+ </object-type>
+ <value-type name="QHttpPart" since="5.9"/>
+ <object-type name="QTcpServer">
+ <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
+ <!-- FIXME removing default expression means user will always have to pass a value, but he wouldn't have to -->
+ <modify-argument index="1">
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, timeOut)"/>
+ </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"/>
+ <object-type name="QTcpSocket"/>
+ <object-type name="QUdpSocket">
+ <modify-function signature="readDatagram(char*,qint64,QHostAddress*,quint16*)" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(data, address, port)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qudpsocket-readdatagram"/>
+ </modify-function>
+ <modify-function signature="writeDatagram(const QByteArray&amp;,const QHostAddress&amp;,quint16)" allow-thread="yes"/>
+ <!-- ### writeDatagram(QByteArray, ...) does the trick -->
+ <modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&amp;,quint16)" remove="all"/>
+ <!-- ### -->
+ </object-type>
+
+ <object-type name="QLocalServer">
+ <enum-type name="SocketOption" flags="SocketOptions"/>
+ <modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
+ <!-- FIXME -->
+ <modify-argument index="1">
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <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>
+
+ </modify-function>
+ </object-type>
+ <object-type name="QLocalSocket">
+ <enum-type name="LocalSocketError"/>
+ <enum-type name="LocalSocketState"/>
+ </object-type>
+ <object-type name="QNetworkAccessManager">
+ <enum-type name="Operation"/>
+ <modify-function signature="createRequest(QNetworkAccessManager::Operation,const QNetworkRequest&amp;,QIODevice*)">
+ <modify-argument index="3" invalidate-after-use="yes"/>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="get(const QNetworkRequest&amp;)" allow-thread="yes"/>
+ <modify-function signature="post(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="post(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
+ <modify-function signature="put(const QNetworkRequest &amp;,QIODevice*)" allow-thread="yes"/>
+ <modify-function signature="put(const QNetworkRequest &amp;,const QByteArray &amp;)" allow-thread="yes"/>
+ <modify-function signature="sendCustomRequest(const QNetworkRequest &amp;,const QByteArray &amp;,QIODevice*)" allow-thread="yes" since="4.7"/>
+ <modify-function signature="setCookieJar(QNetworkCookieJar*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QNetworkCookieJar"/>
+ <value-type name="QNetworkDatagram" since="5.8"/>
+ <object-type name="QNetworkReply">
+ <enum-type name="NetworkError"/>
+ </object-type>
+
+ <value-type name="QHostAddress" hash-function="qHash">
+ <enum-type name="ConversionModeFlag" flags="ConversionMode" since="5.8"/>
+ <enum-type name="SpecialAddress"/>
+ <!-- ### QHostAddress(QIPv6Address) does this -->
+ <modify-function signature="QHostAddress(const quint8*)" remove="all"/>
+ <!-- ### -->
+ <modify-function signature="setAddress(const quint8*)" remove="all"/>
+ </value-type>
+
+ <value-type name="QHostInfo">
+ <enum-type name="HostInfoError"/>
+ <modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/>
+ </value-type>
+
+ <value-type name="QNetworkAddressEntry">
+ <enum-type name="DnsEligibilityStatus" since="5.11"/>
+ </value-type>
+
+ <value-type name="QNetworkInterface">
+ <enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
+ <enum-type name="InterfaceType" since="5.11"/>
+ </value-type>
+
+ <value-type name="QNetworkProxy">
+ <enum-type name="Capability" flags="Capabilities"/>
+ <enum-type name="ProxyType"/>
+ </value-type>
+
+ <object-type name="QNetworkProxyFactory"/>
+ <value-type name="QNetworkProxyQuery">
+ <enum-type name="QueryType"/>
+ </value-type>
+
+ <value-type name="QIPv6Address">
+ <add-function signature="__len__">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-len"/>
+ </add-function>
+ <add-function signature="__getitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-getitem"/>
+ </add-function>
+ <add-function signature="__setitem__">
+ <inject-code class="target" position="beginning" file="../glue/qtnetwork.cpp" snippet="qipv6address-setitem"/>
+ </add-function>
+ </value-type>
+
+ <value-type name="QAuthenticator"/>
+ <value-type name="QNetworkCookie">
+ <enum-type name="RawForm"/>
+ <extra-includes>
+ <include file-name="QDateTime" location="global"/>
+ </extra-includes>
+ </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="CacheLoadControl"/>
+ <enum-type name="KnownHeaders"/>
+ <enum-type name="RedirectPolicy" since="5.9"/>
+ <enum-type name="TransferTimeoutConstant" since="5.15"/>
+ </value-type>
+
+ <object-type name="QAbstractNetworkCache"/>
+ <object-type name="QNetworkDiskCache"/>
+ <value-type name="QNetworkCacheMetaData"/>
+
+ <object-type name="QSctpServer"/>
+ <object-type name="QSctpSocket"/>
+
+ <!-- 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="SubjectInfo"/>
+ </value-type>
+
+ <value-type name="QSslCertificateExtension"/>
+
+ <value-type name="QSslCipher"/>
+
+ <value-type name="QSslConfiguration">
+ <enum-type name="NextProtocolNegotiationStatus"/>
+ </value-type>
+
+ <value-type name="QSslDiffieHellmanParameters" since="5.8">
+ <enum-type name="Error"/>
+ </value-type>
+
+ <!-- Problems with operator==(QSslEllipticCurve,QSslEllipticCurve)
+ <object-type name="QSslEllipticCurve"/>
+ -->
+
+ <value-type name="QSslError">
+ <enum-type name="SslError"/>
+ </value-type>
+
+ <value-type name="QSslKey"/>
+ <object-type name="QSslSocket">
+ <enum-type name="SslMode"/>
+ <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"/>
+ </object-type>
+
+ <value-type name="QSslPreSharedKeyAuthenticator"/>
+
+ <!-- The above entries may be present in the system or not. Keep this section organized. -->
+</typesystem>
+
diff --git a/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt
new file mode 100644
index 000000000..1f822d534
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/CMakeLists.txt
@@ -0,0 +1,59 @@
+project(QtOpenGL)
+
+set(QtOpenGL_DROPPED_ENTRIES)
+
+set(QtOpenGL_SRC
+${QtOpenGL_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopengldebuglogger_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopengldebugmessage_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglframebufferobjectformat_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglpixeltransferoptions_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglshaderprogram_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopengltexture_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopengltextureblitter_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglversionprofile_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglvertexarrayobject_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglvertexarrayobject_binder_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglwindow_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglbuffer_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglshader_wrapper.cpp
+${QtOpenGL_GEN_DIR}/qopenglframebufferobject_wrapper.cpp
+# module is always needed
+${QtOpenGL_GEN_DIR}/qtopengl_module_wrapper.cpp
+)
+
+get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
+ PROPERTY QT_ENABLED_PUBLIC_FEATURES)
+
+if("opengles2" IN_LIST QtGui_enabled_features)
+ list(APPEND QtOpenGL_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
+ message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
+else()
+ list(APPEND QtOpenGL_SRC
+ ${QtOpenGL_GEN_DIR}/qopengltimemonitor_wrapper.cpp
+ ${QtOpenGL_GEN_DIR}/qopengltimerquery_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}OpenGL: Adding Desktop OpenGL classes")
+endif()
+
+set(QtOpenGL_include_dirs ${QtOpenGL_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_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)
+
+create_pyside_module(NAME QtOpenGL
+ INCLUDE_DIRS QtOpenGL_include_dirs
+ LIBRARIES QtOpenGL_libraries
+ DEPS QtOpenGL_deps
+ TYPESYSTEM_PATH QtOpenGL_SOURCE_DIR
+ SOURCES QtOpenGL_SRC
+ DROPPED_ENTRIES QtOpenGL_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml
new file mode 100644
index 000000000..9183f8bda
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGL/typesystem_opengl.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtOpenGL">
+ <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" />
+
+ <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\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
+
+ <object-type name="QOpenGLBuffer" since="5.0">
+ <enum-type name="Access"/>
+ <enum-type name="RangeAccessFlag" flags="RangeAccessFlags"/>
+ <enum-type name="Type"/>
+ <enum-type name="UsagePattern"/>
+ </object-type>
+ <object-type name="QOpenGLDebugLogger" since="5.1">
+ <enum-type name="LoggingMode"/>
+ </object-type>
+ <value-type name="QOpenGLDebugMessage" since="5.1">
+ <enum-type name="Source" flags="Sources"/>
+ <enum-type name="Type" flags="Types"/>
+ <enum-type name="Severity" flags="Severities"/>
+ </value-type>
+ <object-type name="QOpenGLFramebufferObject" since="5.0">
+ <enum-type name="Attachment"/>
+ <enum-type name="FramebufferRestorePolicy" since="5.7"/>
+ </object-type>
+ <value-type name="QOpenGLFramebufferObjectFormat"/>
+ <object-type name="QAbstractOpenGLFunctions" since="5.1"/>
+ <value-type name="QOpenGLPixelTransferOptions"/>
+ <object-type name="QOpenGLShader" since="5.0">
+ <enum-type name="ShaderTypeBit" flags="ShaderType"/>
+ </object-type>
+ <object-type name="QOpenGLShaderProgram" since="5.0">
+ <modify-function signature="setAttributeArray(int,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setAttributeArray(const char*,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setAttributeArray(int,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setAttributeValue(int,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setAttributeValue(const char*,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setUniformValueArray(int,const float*,int,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setUniformValueArray(int,const int*,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setUniformValueArray(int,const unsigned int*,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 int*,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <modify-function signature="setUniformValueArray(const char*,const unsigned int*,int)">
+ <modify-argument index="2"><array/></modify-argument>
+ </modify-function>
+ <!-- Add explicit signatures for the setUniformValue functions -->
+ <modify-function signature="^setUniformValue\(const char\*,(float|int|uint)\)$" remove="all"/>
+ <!-- No need for a signature for GLuint, since Qt (internally) calls the same function: glUniform1i -->
+ <add-function signature="setUniformValue1f(const char*, float)" return-type="void">
+ <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
+ </add-function>
+ <add-function signature="setUniformValue1i(const char*, int)" return-type="void">
+ <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
+ </add-function>
+ <add-function signature="setUniformValue1f(int, float)" return-type="void">
+ <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_float"/>
+ </add-function>
+ <add-function signature="setUniformValue1i(int, int)" return-type="void">
+ <inject-code file="../glue/qtgui.cpp" snippet="qopenglshaderprogram_setuniformvalue_int"/>
+ </add-function>
+ </object-type>
+ <object-type name="QOpenGLTexture" since="5.2">
+ <enum-type name="BindingTarget"/>
+ <enum-type name="CoordinateDirection"/>
+ <enum-type name="ComparisonFunction"/>
+ <enum-type name="ComparisonMode"/>
+ <enum-type name="CubeMapFace"/>
+ <enum-type name="DepthStencilMode"/>
+ <enum-type name="Feature" flags="Features"/>
+ <enum-type name="Filter"/>
+ <enum-type name="MipMapGeneration"/>
+ <enum-type name="PixelFormat"/>
+ <enum-type name="PixelType"/>
+ <enum-type name="SwizzleComponent"/>
+ <enum-type name="SwizzleValue"/>
+ <enum-type name="Target"/>
+ <enum-type name="TextureFormat"/>
+ <enum-type name="TextureFormatClass"/>
+ <enum-type name="TextureUnitReset"/>
+ <enum-type name="WrapMode"/>
+ <modify-function signature="borderColor(unsigned int*)const" remove="all"/>
+ <modify-function signature="borderColor(int*)const" remove="all"/>
+ <modify-function signature="borderColor(float*)const" remove="all"/>
+ </object-type>
+ <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">
+ <enum-type name="UpdateBehavior"/>
+ </object-type>
+ <value-type name="QOpenGLVersionProfile" since="5.1"/>
+ <object-type name="QOpenGLVertexArrayObject">
+ <object-type name="Binder"/>
+ </object-type>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt
new file mode 100644
index 000000000..5ac197801
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt
@@ -0,0 +1,74 @@
+project(QtOpenGLFunctions)
+
+get_property(QtOpenGLFunctions_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
+ PROPERTY QT_ENABLED_PUBLIC_FEATURES)
+
+set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_wrapper.cpp)
+
+get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
+ PROPERTY QT_ENABLED_PUBLIC_FEATURES)
+
+if("opengles2" IN_LIST QtGui_enabled_features)
+ list(APPEND QtOpenGLFunctions_SRC
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)")
+else()
+ list(APPEND QtOpenGLFunctions_SRC
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_2_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_3_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_4_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_5_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp)
+ message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Adding Desktop OpenGL classes")
+endif()
+
+configure_file("${QtOpenGLFunctions_SOURCE_DIR}/QtOpenGLFunctions_global.post.h.in"
+ "${QtOpenGLFunctions_BINARY_DIR}/QtOpenGLFunctions_global.post.h" @ONLY)
+
+set(QtOpenGLFunctions_include_dirs ${QtOpenGLFunctions_SOURCE_DIR}
+ ${QtOpenGLFunctions_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtOpenGL_GEN_DIR}
+ )
+
+set(QtOpenGLFunctions_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}OpenGL_LIBRARIES})
+
+set(QtOpenGLFunctions_deps QtGui QtOpenGL)
+
+create_pyside_module(NAME QtOpenGLFunctions
+ INCLUDE_DIRS QtOpenGLFunctions_include_dirs
+ LIBRARIES QtOpenGLFunctions_libraries
+ DEPS QtOpenGLFunctions_deps
+ TYPESYSTEM_PATH QtOpenGLFunctions_SOURCE_DIR
+ SOURCES QtOpenGLFunctions_SRC
+ TYPESYSTEM_NAME ${QtOpenGLFunctions_BINARY_DIR}/typesystem_openglfunctions.xml
+ DROPPED_ENTRIES QtOpenGLFunctions_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in b/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
index c25343e05..c25343e05 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
diff --git a/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml
new file mode 100644
index 000000000..819adca6a
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtOpenGLFunctions">
+ <load-typesystem name="QtOpenGL/typesystem_opengl.xml" generate="no"/>
+ <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
+
+ <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\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
+ <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+ ?\*$"/>
+
+ <object-type name="QOpenGLFunctions_1_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_2" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_3" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_4" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_5" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_2_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_2_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_2_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_3_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_0_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_1_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_2_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_3_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_4_Core" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_5_Compatibility" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ &openglfunctions_modifications4_5;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_5_Core" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ &openglfunctions_modifications4_5;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_ES2" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ </object-type>
+ <suppress-warning text="^There's no user provided way.*QOpenGLFunctions_\d_\d.*::glIndex.*$"/>
+
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml
index 5652ad6b6..5652ad6b6 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml
index 5793048cd..5793048cd 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml
index 9383fb83f..9383fb83f 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml
index 3f8075b30..3f8075b30 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml
index c13b09b5b..c13b09b5b 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml
index e35f3b334..e35f3b334 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml
index 1102daea8..1102daea8 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml
index 4cb75d418..4cb75d418 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml
index 28a424e1a..28a424e1a 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml
index 49cbd5c05..49cbd5c05 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml
index af515ed8c..af515ed8c 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml
index 8377e440b..8377e440b 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml
index 7f4717170..7f4717170 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml
index 4bf2bc8f5..4bf2bc8f5 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml
index cf2e47a5c..cf2e47a5c 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml
index bc92ce80d..bc92ce80d 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml
index b3c2b618d..b3c2b618d 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml
index 6b59f174a..6b59f174a 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml
index c747997aa..c747997aa 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml
index 2ea0a458d..2ea0a458d 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml
index 5cd5161f8..5cd5161f8 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml
index ae4d49ab1..ae4d49ab1 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml
diff --git a/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt
new file mode 100644
index 000000000..b8b6664b5
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGLWidgets/CMakeLists.txt
@@ -0,0 +1,34 @@
+project(QtOpenGLWidgets)
+
+set(QtOpenGLWidgets_SRC
+${QtOpenGLWidgets_GEN_DIR}/qopenglwidget_wrapper.cpp
+# module is always needed
+${QtOpenGLWidgets_GEN_DIR}/qtopenglwidgets_module_wrapper.cpp
+)
+
+set(QtOpenGLWidgets_include_dirs ${QtOpenGLWidgets_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}Widgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_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)
+
+create_pyside_module(NAME QtOpenGLWidgets
+ INCLUDE_DIRS QtOpenGLWidgets_include_dirs
+ LIBRARIES QtOpenGLWidgets_libraries
+ DEPS QtOpenGLWidgets_deps
+ TYPESYSTEM_PATH QtOpenGLWidgets_SOURCE_DIR
+ SOURCES QtOpenGLWidgets_SRC)
diff --git a/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml b/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml
new file mode 100644
index 000000000..d08f8833d
--- /dev/null
+++ b/sources/pyside6/PySide6/QtOpenGLWidgets/typesystem_openglwidgets.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtOpenGLWidgets">
+ <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"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt b/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt
new file mode 100644
index 000000000..6a2942967
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPositioning/CMakeLists.txt
@@ -0,0 +1,50 @@
+project(QtPositioning)
+
+set(QtPositioning_OPTIONAL_SRC )
+set(QtPositioning_DROPPED_ENTRIES )
+
+set(QtPositioning_SRC
+${QtPositioning_GEN_DIR}/qgeoaddress_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoareamonitorinfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoareamonitorsource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeolocation_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeocircle_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeocoordinate_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopath_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfosource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeopositioninfosourcefactory_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeorectangle_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeosatelliteinfo_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeosatelliteinfosource_wrapper.cpp
+${QtPositioning_GEN_DIR}/qgeoshape_wrapper.cpp
+${QtPositioning_GEN_DIR}/qnmeapositioninfosource_wrapper.cpp
+# module is always needed
+${QtPositioning_GEN_DIR}/qtpositioning_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}Positioning_VERSION VERSION_EQUAL 5.10.0
+ OR Qt${QT_MAJOR_VERSION}Positioning_VERSION VERSION_GREATER 5.10.0)
+ list(APPEND QtPositioning_SRC
+ ${QtPositioning_GEN_DIR}/qgeopolygon_wrapper.cpp)
+endif()
+
+set(QtPositioning_include_dirs ${QtPositioning_SOURCE_DIR}
+ ${QtPositioning_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Positioning_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtPositioning_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Positioning_LIBRARIES})
+
+set(QtPositioning_deps QtCore)
+
+create_pyside_module(NAME QtPositioning
+ INCLUDE_DIRS QtPositioning_include_dirs
+ LIBRARIES QtPositioning_libraries
+ DEPS QtPositioning_deps
+ TYPESYSTEM_PATH QtPositioning_SOURCE_DIR
+ SOURCES QtPositioning_SRC
+ DROPPED_ENTRIES QtPositioning_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml b/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml
new file mode 100644
index 000000000..145561d1f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPositioning/typesystem_positioning.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtPositioning">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <value-type name="QGeoAddress"/>
+ <value-type name="QGeoAreaMonitorInfo"/>
+ <object-type name="QGeoAreaMonitorSource">
+ <enum-type name="Error"/>
+ <enum-type name="AreaMonitorFeature" flags="AreaMonitorFeatures"/>
+ </object-type>
+ <value-type name="QGeoLocation"/>
+ <value-type name="QGeoCircle"/>
+ <value-type name="QGeoCoordinate">
+ <enum-type name="CoordinateType"/>
+ <enum-type name="CoordinateFormat"/>
+ </value-type>
+ <value-type name="QGeoPath"/>
+ <value-type name="QGeoPolygon" since="5.10"/>
+ <value-type name="QGeoPositionInfo">
+ <enum-type name="Attribute"/>
+ </value-type>
+ <object-type name="QGeoPositionInfoSource">
+ <enum-type name="Error"/>
+ <enum-type name="PositioningMethod" flags="PositioningMethods"/>
+ </object-type>
+ <object-type name="QGeoPositionInfoSourceFactory"/>
+ <value-type name="QGeoRectangle"/>
+ <value-type name="QGeoSatelliteInfo">
+ <enum-type name="Attribute"/>
+ <enum-type name="SatelliteSystem"/>
+ </value-type>
+ <object-type name="QGeoSatelliteInfoSource">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QGeoShape">
+ <enum-type name="ShapeType"/>
+ </value-type>
+ <object-type name="QNmeaPositionInfoSource">
+ <enum-type name="UpdateMode"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt b/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt
new file mode 100644
index 000000000..f2e072fb4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPrintSupport/CMakeLists.txt
@@ -0,0 +1,43 @@
+project(QtPrintSupport)
+
+set(QtPrintSupport_SRC
+${QtPrintSupport_GEN_DIR}/qabstractprintdialog_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qpagesetupdialog_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprintdialog_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprintengine_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprinter_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprinterinfo_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprintpreviewdialog_wrapper.cpp
+${QtPrintSupport_GEN_DIR}/qprintpreviewwidget_wrapper.cpp
+# module is always needed
+${QtPrintSupport_GEN_DIR}/qtprintsupport_module_wrapper.cpp
+)
+
+configure_file("${QtPrintSupport_SOURCE_DIR}/typesystem_printsupport.xml.in"
+ "${QtPrintSupport_BINARY_DIR}/typesystem_printsupport.xml" @ONLY)
+
+set(QtPrintSupport_include_dirs ${QtPrintSupport_SOURCE_DIR}
+ ${QtPrintSupport_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}PrintSupport_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_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}
+ )
+set(QtPrintSupport_deps QtWidgets)
+create_pyside_module(NAME QtPrintSupport
+ INCLUDE_DIRS QtPrintSupport_include_dirs
+ LIBRARIES QtPrintSupport_libraries
+ DEPS QtPrintSupport_deps
+ TYPESYSTEM_PATH QtPrintSupport_SOURCE_DIR
+ SOURCES QtPrintSupport_SRC
+ TYPESYSTEM_NAME ${QtPrintSupport_BINARY_DIR}/typesystem_printsupport.xml)
diff --git a/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml.in b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml.in
new file mode 100644
index 000000000..f8c739897
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport.xml.in
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtPrintSupport">
+ <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/QtPrintSupport/typesystem_printsupport_common.xml b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport_common.xml
new file mode 100644
index 000000000..7ea9c06ff
--- /dev/null
+++ b/sources/pyside6/PySide6/QtPrintSupport/typesystem_printsupport_common.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtPrintSupport">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+ <object-type name="QPageSetupDialog">
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QAbstractPrintDialog">
+ <enum-type name="PrintDialogOption" flags="PrintDialogOptions"/>
+ <enum-type name="PrintRange"/>
+ </object-type>
+
+ <object-type name="QPrintDialog">
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QPrintEngine">
+ <enum-type name="PrintEnginePropertyKey"/>
+ </object-type>
+ <value-type name="QPrinterInfo"/>
+ <rejection class="QPrinter" function-name="printerSelectionOption"/>
+ <rejection class="QPrinter" function-name="setPrinterSelectionOption"/>
+
+ <object-type name="QPrinter" >
+ <enum-type name="ColorMode"/>
+ <enum-type name="DuplexMode"/>
+ <enum-type name="OutputFormat"/>
+ <enum-type name="PageOrder"/>
+ <enum-type name="PaperSource"/>
+ <enum-type name="PrintRange"/>
+ <enum-type name="PrinterMode"/>
+ <enum-type name="PrinterState"/>
+ <enum-type name="Unit"/>
+ <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*,args">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="setEngines(QPrintEngine*,QPaintEngine*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <extra-includes>
+ <include file-name="QPrinterInfo" location="global"/>
+ </extra-includes>
+ <!-- fixme: Check if this is still required in Qt 6:
+ bool QPagedPaintDevice::setPageSize(QPageSize)
+ void QPagedPaintDevice::setPageSize(QPagedPaintDevice::PageSize) -->
+ <add-function signature="setPageSize(const QPageSize&amp;)" return-type="bool">
+ <inject-code file="../glue/qtprintsupport.cpp" snippet="setpagesize" />
+ </add-function>
+ </object-type>
+
+ <object-type name="QPrintPreviewDialog"/>
+ <object-type name="QPrintPreviewWidget">
+ <enum-type name="ViewMode"/>
+ <enum-type name="ZoomMode"/>
+ <modify-function signature="print()" rename="print_"/>
+ </object-type>
+
+</typesystem>
+
diff --git a/sources/pyside6/PySide6/QtQml/CMakeLists.txt b/sources/pyside6/PySide6/QtQml/CMakeLists.txt
new file mode 100644
index 000000000..be409ff81
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQml/CMakeLists.txt
@@ -0,0 +1,63 @@
+project(QtQml)
+
+set(QtQml_registerType "${QtQml_SOURCE_DIR}/pysideqmlregistertype.cpp")
+
+set(QtQml_SRC
+${QtQml_GEN_DIR}/qjsengine_wrapper.cpp
+${QtQml_GEN_DIR}/qjsvalue_wrapper.cpp
+${QtQml_GEN_DIR}/qjsvalueiterator_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlabstracturlinterceptor_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlapplicationengine_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlcomponent_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlcontext_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlerror_wrapper.cpp
+${QtQml_GEN_DIR}/qqmldebuggingenabler_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlengine_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlexpression_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlextensioninterface_wrapper.cpp
+${QtQml_GEN_DIR}/qqmltypesextensioninterface_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlextensionplugin_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlfile_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlfileselector_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlimageproviderbase_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlincubator_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlincubationcontroller_wrapper.cpp
+#${QtQml_GEN_DIR}/qqmllistproperty_wrapper.cpp
+${QtQml_GEN_DIR}/qqmllistreference_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlparserstatus_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlproperty_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlpropertymap_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlpropertyvaluesource_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlscriptstring_wrapper.cpp
+${QtQml_GEN_DIR}/qqmlnetworkaccessmanagerfactory_wrapper.cpp
+${QtQml_GEN_DIR}/qtqml_wrapper.cpp
+# module is always needed
+${QtQml_GEN_DIR}/qtqml_module_wrapper.cpp
+)
+
+set(QtQml_include_dirs ${QtQml_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}Qml_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQml_GEN_DIR})
+
+set(QtQml_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES})
+
+set(QtQml_deps QtGui QtNetwork)
+
+create_pyside_module(NAME QtQml
+ INCLUDE_DIRS QtQml_include_dirs
+ LIBRARIES QtQml_libraries
+ DEPS QtQml_deps
+ TYPESYSTEM_PATH QtQml_SOURCE_DIR
+ SOURCES QtQml_SRC
+ STATIC_SOURCES QtQml_registerType)
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
new file mode 100644
index 000000000..0d4cea294
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
@@ -0,0 +1,732 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pysideqmlregistertype.h"
+
+#include <limits>
+
+// shiboken
+#include <shiboken.h>
+#include <signature.h>
+
+// pyside
+#include <pyside.h>
+#include <pyside_p.h>
+#include <pysideproperty.h>
+
+// auto generated headers
+#include "pyside6_qtcore_python.h"
+#include "pyside6_qtqml_python.h"
+
+#include <QtQml/QJSValue>
+
+// Forward declarations.
+static void propListMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call,
+ void **args);
+
+// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr.
+static QMutex nextQmlElementMutex;
+
+static void createInto(void *memory, void *type)
+{
+ QMutexLocker locker(&nextQmlElementMutex);
+ PySide::setNextQObjectMemoryAddr(memory);
+ Shiboken::GilState state;
+ PyObject *obj = PyObject_CallObject(reinterpret_cast<PyObject *>(type), 0);
+ if (!obj || PyErr_Occurred())
+ PyErr_Print();
+ PySide::setNextQObjectMemoryAddr(0);
+}
+
+int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
+ int versionMinor, const char *qmlName, const char *noCreationReason,
+ bool creatable)
+{
+ using namespace Shiboken;
+
+ static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
+ assert(qobjectType);
+
+ PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
+ if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
+ PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
+ qobjectType->tp_name, pyObjType->tp_name);
+ return -1;
+ }
+
+ const QMetaObject *metaObject = PySide::retrieveMetaObject(pyObjType);
+ Q_ASSERT(metaObject);
+
+ QQmlPrivate::RegisterType type;
+
+ // Allow registering Qt Quick items.
+ bool registered = false;
+#ifdef PYSIDE_QML_SUPPORT
+ QuickRegisterItemFunction quickRegisterItemFunction = getQuickRegisterItemFunction();
+ if (quickRegisterItemFunction) {
+ registered =
+ quickRegisterItemFunction(pyObj, uri, versionMajor, versionMinor,
+ qmlName, creatable, noCreationReason, &type);
+ }
+#endif
+
+ // Register as simple QObject rather than Qt Quick item.
+ if (!registered) {
+ // Incref the type object, don't worry about decref'ing it because
+ // there's no way to unregister a QML type.
+ Py_INCREF(pyObj);
+
+ type.structVersion = 0;
+
+ // FIXME: Fix this to assign new type ids each time.
+ type.typeId = QMetaType(QMetaType::QObjectStar);
+ type.listId = QMetaType::fromType<QQmlListProperty<QObject> >();
+ type.attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<QObject>();
+ type.attachedPropertiesMetaObject = QQmlPrivate::attachedPropertiesMetaObject<QObject>();
+
+ type.parserStatusCast =
+ QQmlPrivate::StaticCastSelector<QObject, QQmlParserStatus>::cast();
+ type.valueSourceCast =
+ QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueSource>::cast();
+ type.valueInterceptorCast =
+ QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueInterceptor>::cast();
+
+ int objectSize = static_cast<int>(PySide::getSizeOfQObject(
+ reinterpret_cast<SbkObjectType *>(pyObj)));
+ type.objectSize = objectSize;
+ type.create = creatable ? createInto : nullptr;
+ type.noCreationReason = noCreationReason;
+ type.userdata = pyObj;
+ type.uri = uri;
+ type.version = QTypeRevision::fromVersion(versionMajor, versionMinor);
+ type.elementName = qmlName;
+
+ type.extensionObjectCreate = 0;
+ type.extensionMetaObject = 0;
+ type.customParser = 0;
+ }
+ type.metaObject = metaObject; // Snapshot may have changed.
+
+ int qmlTypeId = QQmlPrivate::qmlregister(QQmlPrivate::TypeRegistration, &type);
+ if (qmlTypeId == -1) {
+ PyErr_Format(PyExc_TypeError, "QML meta type registration of \"%s\" failed.",
+ qmlName);
+ }
+ return qmlTypeId;
+}
+
+int PySide::qmlRegisterSingletonType(PyObject *pyObj, const char *uri, int versionMajor,
+ int versionMinor, const char *qmlName, PyObject *callback,
+ bool isQObject, bool hasCallback)
+{
+ using namespace Shiboken;
+
+ if (hasCallback) {
+ if (!PyCallable_Check(callback)) {
+ PyErr_Format(PyExc_TypeError, "Invalid callback specified.");
+ return -1;
+ }
+
+ AutoDecRef funcCode(PyObject_GetAttrString(callback, "__code__"));
+ AutoDecRef argCount(PyObject_GetAttrString(funcCode, "co_argcount"));
+
+ int count = PyInt_AsLong(argCount);
+
+ if (count != 1) {
+ PyErr_Format(PyExc_TypeError, "Callback has a bad parameter count.");
+ return -1;
+ }
+
+ // Make sure the callback never gets deallocated
+ Py_INCREF(callback);
+ }
+
+ const QMetaObject *metaObject = nullptr;
+
+ if (isQObject) {
+ static PyTypeObject *qobjectType = Conversions::getPythonTypeObject("QObject*");
+ assert(qobjectType);
+
+ PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
+ if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
+ PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
+ qobjectType->tp_name, pyObjType->tp_name);
+ return -1;
+ }
+
+ // If we don't have a callback we'll need the pyObj to stay allocated indefinitely
+ if (!hasCallback)
+ Py_INCREF(pyObj);
+
+ metaObject = PySide::retrieveMetaObject(pyObjType);
+ Q_ASSERT(metaObject);
+ }
+
+ QQmlPrivate::RegisterSingletonType type;
+ type.structVersion = 0;
+
+ type.uri = uri;
+ type.version = QTypeRevision::fromVersion(versionMajor, versionMinor);
+ type.typeName = qmlName;
+ type.instanceMetaObject = metaObject;
+
+ if (isQObject) {
+ // FIXME: Fix this to assign new type ids each time.
+ type.typeId = QMetaType(QMetaType::QObjectStar);
+
+ type.qObjectApi =
+ [callback, pyObj, hasCallback](QQmlEngine *engine, QJSEngine *) -> QObject * {
+ AutoDecRef args(PyTuple_New(hasCallback ? 1 : 0));
+
+ if (hasCallback) {
+ PyTuple_SET_ITEM(args, 0, Conversions::pointerToPython(
+ (SbkObjectType *)SbkPySide6_QtQmlTypes[SBK_QQMLENGINE_IDX],
+ engine));
+ }
+
+ AutoDecRef retVal(PyObject_CallObject(hasCallback ? callback : pyObj, args));
+
+ SbkObjectType *qobjectType = (SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX];
+
+ // Make sure the callback returns something we can convert, else the entire application will crash.
+ if (retVal.isNull() ||
+ Conversions::isPythonToCppPointerConvertible(qobjectType, retVal) == nullptr) {
+ PyErr_Format(PyExc_TypeError, "Callback returns invalid value.");
+ return nullptr;
+ }
+
+ QObject *obj = nullptr;
+ Conversions::pythonToCppPointer(qobjectType, retVal, &obj);
+
+ if (obj != nullptr)
+ Py_INCREF(retVal);
+
+ return obj;
+ };
+ } else {
+ type.scriptApi =
+ [callback](QQmlEngine *engine, QJSEngine *) -> QJSValue {
+ AutoDecRef args(PyTuple_New(1));
+
+ PyTuple_SET_ITEM(args, 0, Conversions::pointerToPython(
+ (SbkObjectType *)SbkPySide6_QtQmlTypes[SBK_QQMLENGINE_IDX],
+ engine));
+
+ AutoDecRef retVal(PyObject_CallObject(callback, args));
+
+ SbkObjectType *qjsvalueType = (SbkObjectType *)SbkPySide6_QtQmlTypes[SBK_QJSVALUE_IDX];
+
+ // Make sure the callback returns something we can convert, else the entire application will crash.
+ if (retVal.isNull() ||
+ Conversions::isPythonToCppPointerConvertible(qjsvalueType, retVal) == nullptr) {
+ PyErr_Format(PyExc_TypeError, "Callback returns invalid value.");
+ return QJSValue(QJSValue::UndefinedValue);
+ }
+
+ QJSValue *val = nullptr;
+ Conversions::pythonToCppPointer(qjsvalueType, retVal, &val);
+
+ Py_INCREF(retVal);
+
+ return *val;
+ };
+ }
+
+ return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &type);
+}
+
+extern "C"
+{
+
+// This is the user data we store in the property.
+struct QmlListProperty
+{
+ PyTypeObject *type;
+ PyObject *append;
+ PyObject *count;
+ PyObject *at;
+ PyObject *clear;
+ PyObject *replace;
+ PyObject *removeLast;
+};
+
+static int propListTpInit(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ static const char *kwlist[] = {"type", "append", "count", "at", "clear", "replace", "removeLast", 0};
+ PySideProperty *pySelf = reinterpret_cast<PySideProperty *>(self);
+ QmlListProperty *data = new QmlListProperty;
+ memset(data, 0, sizeof(QmlListProperty));
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds,
+ "O|OOOOOO:QtQml.ListProperty", (char **) kwlist,
+ &data->type,
+ &data->append,
+ &data->count,
+ &data->at,
+ &data->clear,
+ &data->replace,
+ &data->removeLast)) {
+ return -1;
+ }
+
+ static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
+ assert(qobjectType);
+
+ if (!PySequence_Contains(data->type->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
+ PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.",
+ qobjectType->tp_name, data->type->tp_name);
+ return -1;
+ }
+
+ if ((data->append && data->append != Py_None && !PyCallable_Check(data->append)) ||
+ (data->count && data->count != Py_None && !PyCallable_Check(data->count)) ||
+ (data->at && data->at != Py_None && !PyCallable_Check(data->at)) ||
+ (data->clear && data->clear != Py_None && !PyCallable_Check(data->clear)) ||
+ (data->replace && data->replace != Py_None && !PyCallable_Check(data->replace)) ||
+ (data->removeLast && data->removeLast != Py_None && !PyCallable_Check(data->removeLast))) {
+ PyErr_Format(PyExc_TypeError, "Non-callable parameter given");
+ return -1;
+ }
+
+ PySide::Property::setMetaCallHandler(pySelf, &propListMetaCall);
+ PySide::Property::setTypeName(pySelf, "QQmlListProperty<QObject>");
+ PySide::Property::setUserData(pySelf, data);
+
+ return 0;
+}
+
+void propListTpFree(void *self)
+{
+ auto pySelf = reinterpret_cast<PySideProperty *>(self);
+ delete reinterpret_cast<QmlListProperty *>(PySide::Property::userData(pySelf));
+ // calls base type constructor
+ Py_TYPE(pySelf)->tp_base->tp_free(self);
+}
+
+static PyType_Slot PropertyListType_slots[] = {
+ {Py_tp_init, (void *)propListTpInit},
+ {Py_tp_free, (void *)propListTpFree},
+ {Py_tp_dealloc, (void *)Sbk_object_dealloc},
+ {0, 0}
+};
+static PyType_Spec PropertyListType_spec = {
+ "2:PySide6.QtQml.ListProperty",
+ sizeof(PySideProperty),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PropertyListType_slots,
+};
+
+
+PyTypeObject *PropertyListTypeF(void)
+{
+ static PyTypeObject *type = nullptr;
+ if (!type) {
+ PyObject *bases = Py_BuildValue("(O)", PySidePropertyTypeF());
+ type = (PyTypeObject *)SbkType_FromSpecWithBases(&PropertyListType_spec, bases);
+ Py_XDECREF(bases);
+ }
+ return type;
+}
+
+} // extern "C"
+
+// Implementation of QQmlListProperty<T>::AppendFunction callback
+void propListAppender(QQmlListProperty<QObject> *propList, QObject *item)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(2));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+ PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], item));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
+
+ if (PyErr_Occurred())
+ PyErr_Print();
+}
+
+// Implementation of QQmlListProperty<T>::CountFunction callback
+int propListCount(QQmlListProperty<QObject> *propList)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
+
+ // Check return type
+ int cppResult = 0;
+ PythonToCppFunc pythonToCpp = 0;
+ if (PyErr_Occurred())
+ PyErr_Print();
+ else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), retVal)))
+ pythonToCpp(retVal, &cppResult);
+ return cppResult;
+}
+
+// Implementation of QQmlListProperty<T>::AtFunction callback
+QObject *propListAt(QQmlListProperty<QObject> *propList, int index)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(2));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+ PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
+
+ QObject *result = 0;
+ if (PyErr_Occurred())
+ PyErr_Print();
+ else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
+ Shiboken::Conversions::pythonToCppPointer((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], retVal, &result);
+ return result;
+}
+
+// Implementation of QQmlListProperty<T>::ClearFunction callback
+void propListClear(QQmlListProperty<QObject> * propList)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
+
+ if (PyErr_Occurred())
+ PyErr_Print();
+}
+
+// Implementation of QQmlListProperty<T>::ReplaceFunction callback
+void propListReplace(QQmlListProperty<QObject> *propList, int index, QObject *value)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(3));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+ PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
+ PyTuple_SET_ITEM(args, 2, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], value));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->replace, args));
+
+ if (PyErr_Occurred())
+ PyErr_Print();
+}
+
+// Implementation of QQmlListProperty<T>::RemoveLastFunction callback
+void propListRemoveLast(QQmlListProperty<QObject> *propList)
+{
+ Shiboken::GilState state;
+
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
+
+ auto data = reinterpret_cast<QmlListProperty *>(propList->data);
+ Shiboken::AutoDecRef retVal(PyObject_CallObject(data->removeLast, args));
+
+ if (PyErr_Occurred())
+ PyErr_Print();
+}
+
+// qt_metacall specialization for ListProperties
+static void propListMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call, void **args)
+{
+ if (call != QMetaObject::ReadProperty)
+ return;
+
+ auto data = reinterpret_cast<QmlListProperty *>(PySide::Property::userData(pp));
+ QObject *qobj;
+ Shiboken::Conversions::pythonToCppPointer((SbkObjectType *)SbkPySide6_QtCoreTypes[SBK_QOBJECT_IDX], self, &qobj);
+ QQmlListProperty<QObject> declProp(qobj, data,
+ data->append && data->append != Py_None ? &propListAppender : nullptr,
+ data->count && data->count != Py_None ? &propListCount : nullptr,
+ data->at && data->at != Py_None ? &propListAt : nullptr,
+ data->clear && data->clear != Py_None ? &propListClear : nullptr,
+ data->replace && data->replace != Py_None ? &propListReplace : nullptr,
+ data->removeLast && data->removeLast != Py_None ? &propListRemoveLast : nullptr);
+
+ // Copy the data to the memory location requested by the meta call
+ void *v = args[0];
+ *reinterpret_cast<QQmlListProperty<QObject> *>(v) = declProp;
+}
+
+// VolatileBool (volatile bool) type definition.
+
+static PyObject *
+QtQml_VolatileBoolObject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ static const char *kwlist[] = {"x", 0};
+ PyObject *x = Py_False;
+ long ok;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:bool", const_cast<char **>(kwlist), &x))
+ return Q_NULLPTR;
+ ok = PyObject_IsTrue(x);
+ if (ok < 0)
+ return Q_NULLPTR;
+
+ QtQml_VolatileBoolObject *self
+ = reinterpret_cast<QtQml_VolatileBoolObject *>(type->tp_alloc(type, 0));
+
+ if (self != nullptr)
+ self->flag = new AtomicBool(ok);
+
+ return reinterpret_cast<PyObject *>(self);
+}
+
+static void QtQml_VolatileBoolObject_dealloc(PyObject *self)
+{
+ auto volatileBool = reinterpret_cast<QtQml_VolatileBoolObject *>(self);
+ delete volatileBool->flag;
+ Sbk_object_dealloc(self);
+}
+
+static PyObject *
+QtQml_VolatileBoolObject_get(QtQml_VolatileBoolObject *self)
+{
+ return *self->flag ? Py_True : Py_False;
+}
+
+static PyObject *
+QtQml_VolatileBoolObject_set(QtQml_VolatileBoolObject *self, PyObject *args)
+{
+ PyObject *value = Py_False;
+ long ok;
+
+ if (!PyArg_ParseTuple(args, "O:bool", &value)) {
+ return Q_NULLPTR;
+ }
+
+ ok = PyObject_IsTrue(value);
+ if (ok < 0) {
+ PyErr_SetString(PyExc_TypeError, "Not a boolean value.");
+ return Q_NULLPTR;
+ }
+
+ *self->flag = ok > 0;
+
+ Py_RETURN_NONE;
+}
+
+static PyMethodDef QtQml_VolatileBoolObject_methods[] = {
+ {"get", reinterpret_cast<PyCFunction>(QtQml_VolatileBoolObject_get), METH_NOARGS,
+ "B.get() -> Bool. Returns the value of the volatile boolean"
+ },
+ {"set", reinterpret_cast<PyCFunction>(QtQml_VolatileBoolObject_set), METH_VARARGS,
+ "B.set(a) -> None. Sets the value of the volatile boolean"
+ },
+ {Q_NULLPTR} /* Sentinel */
+};
+
+static PyObject *
+QtQml_VolatileBoolObject_repr(QtQml_VolatileBoolObject *self)
+{
+ PyObject *s;
+
+ if (*self->flag)
+ s = PyBytes_FromFormat("%s(True)",
+ Py_TYPE(self)->tp_name);
+ else
+ s = PyBytes_FromFormat("%s(False)",
+ Py_TYPE(self)->tp_name);
+ Py_XINCREF(s);
+ return s;
+}
+
+static PyObject *
+QtQml_VolatileBoolObject_str(QtQml_VolatileBoolObject *self)
+{
+ PyObject *s;
+
+ if (*self->flag)
+ s = PyBytes_FromFormat("%s(True) -> %p",
+ Py_TYPE(self)->tp_name, self->flag);
+ else
+ s = PyBytes_FromFormat("%s(False) -> %p",
+ Py_TYPE(self)->tp_name, self->flag);
+ Py_XINCREF(s);
+ return s;
+}
+
+static PyType_Slot QtQml_VolatileBoolType_slots[] = {
+ {Py_tp_repr, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_repr)},
+ {Py_tp_str, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_str)},
+ {Py_tp_methods, (void *)QtQml_VolatileBoolObject_methods},
+ {Py_tp_new, (void *)QtQml_VolatileBoolObject_new},
+ {Py_tp_dealloc, (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,
+};
+
+
+PyTypeObject *QtQml_VolatileBoolTypeF(void)
+{
+ static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
+ SbkType_FromSpec(&QtQml_VolatileBoolType_spec));
+ return type;
+}
+
+static const char *PropertyList_SignatureStrings[] = {
+ "PySide6.QtQml.ListProperty(type:type,append:typing.Callable,"
+ "at:typing.Callable=None,clear:typing.Callable=None,count:typing.Callable=None)",
+ nullptr}; // Sentinel
+
+static const char *VolatileBool_SignatureStrings[] = {
+ "PySide6.QtQml.VolatileBool.get()->bool",
+ "PySide6.QtQml.VolatileBool.set(a:object)",
+ nullptr}; // Sentinel
+
+void PySide::initQmlSupport(PyObject *module)
+{
+ // Export QmlListProperty type
+ if (InitSignatureStrings(PropertyListTypeF(), PropertyList_SignatureStrings) < 0) {
+ PyErr_Print();
+ qWarning() << "Error initializing PropertyList type.";
+ return;
+ }
+
+ // Register QQmlListProperty metatype for use in QML
+ qRegisterMetaType<QQmlListProperty<QObject>>();
+
+ Py_INCREF(reinterpret_cast<PyObject *>(PropertyListTypeF()));
+ PyModule_AddObject(module, PepType_GetNameStr(PropertyListTypeF()),
+ reinterpret_cast<PyObject *>(PropertyListTypeF()));
+
+ if (InitSignatureStrings(QtQml_VolatileBoolTypeF(), VolatileBool_SignatureStrings) < 0) {
+ PyErr_Print();
+ qWarning() << "Error initializing VolatileBool type.";
+ return;
+ }
+
+ Py_INCREF(QtQml_VolatileBoolTypeF());
+ PyModule_AddObject(module, PepType_GetNameStr(QtQml_VolatileBoolTypeF()),
+ reinterpret_cast<PyObject *>(QtQml_VolatileBoolTypeF()));
+}
+
+static std::string getGlobalString(const char *name)
+{
+ using Shiboken::AutoDecRef;
+
+ PyObject *globals = PyEval_GetGlobals();
+
+ AutoDecRef pyName(Py_BuildValue("s", name));
+
+ PyObject *globalVar = PyDict_GetItem(globals, pyName);
+
+ if (globalVar == nullptr || !PyUnicode_Check(globalVar))
+ return "";
+
+ const char *stringValue = PyUnicode_AsUTF8(globalVar);
+ return stringValue != nullptr ? stringValue : "";
+}
+
+static int getGlobalInt(const char *name)
+{
+ using Shiboken::AutoDecRef;
+
+ PyObject *globals = PyEval_GetGlobals();
+
+ AutoDecRef pyName(Py_BuildValue("s", name));
+
+ PyObject *globalVar = PyDict_GetItem(globals, pyName);
+
+ if (globalVar == nullptr || !PyLong_Check(globalVar))
+ return -1;
+
+ long value = PyLong_AsLong(globalVar);
+
+ if (value > std::numeric_limits<int>::max() || value < std::numeric_limits<int>::min())
+ return -1;
+
+ return value;
+}
+
+PyObject *PySide::qmlElementMacro(PyObject *pyObj)
+{
+ if (!PyType_Check(pyObj)) {
+ PyErr_Format(PyExc_TypeError, "This decorator can only be used on classes.");
+ return nullptr;
+ }
+
+ static PyTypeObject *qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
+ assert(qobjectType);
+
+ PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
+ if (!PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qobjectType))) {
+ PyErr_Format(PyExc_TypeError, "This decorator can only be used with classes inherited from QObject, got %s.", pyObjType->tp_name);
+ return nullptr;
+ }
+
+ std::string importName = getGlobalString("QML_IMPORT_NAME");
+ int majorVersion = getGlobalInt("QML_IMPORT_MAJOR_VERSION");
+ int minorVersion = getGlobalInt("QML_IMPORT_MINOR_VERSION");
+
+ if (importName.empty()) {
+ PyErr_Format(PyExc_TypeError, "You need specify QML_IMPORT_NAME in order to use QmlElement.");
+ return nullptr;
+ }
+
+ if (majorVersion == -1) {
+ PyErr_Format(PyExc_TypeError, "You need specify QML_IMPORT_MAJOR_VERSION in order to use QmlElement.");
+ return nullptr;
+ }
+
+ // Specifying a minor version is optional
+ if (minorVersion == -1)
+ minorVersion = 0;
+
+ if (qmlRegisterType(pyObj, importName.c_str(), majorVersion, minorVersion, pyObjType->tp_name) == -1) {
+ PyErr_Format(PyExc_TypeError, "Failed to register type %s.", pyObjType->tp_name);
+ }
+
+ return pyObj;
+}
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.h
index 30c174e46..30c174e46 100644
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.h
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
new file mode 100644
index 000000000..6281cb1e4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtQml">
+ <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"/>
+
+ <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 {
+ PyObject_HEAD
+ AtomicBool *flag;
+ } QtQml_VolatileBoolObject;
+ </inject-code>
+
+ <inject-code class="native" position="beginning">
+ #include "pysideqmlregistertype.h"
+ </inject-code>
+
+ <!-- This is to inform the generator that the VolatileBool python type exists -->
+ <custom-type name="VolatileBool"/>
+ <primitive-type name="bool volatile" target-lang-api-name="VolatileBool">
+ <!-- No conversion rules are specified here, because the generator does not handle
+ pointer to primitive types without function adjustment.
+ See commit ff0b861b59b41387e771d9cd565e13de8b2750d1 or search for changePStr
+ in generator tests folder. -->
+ </primitive-type>
+
+ <enum-type name="QQmlModuleImportSpecialVersions" since="6.0"/>
+
+ <!-- For qmlEngine(const QObject*), qmlContext(const QObject*) in qqml.h -->
+ <namespace-type name="QtQml"/>
+
+ <!-- expose QQmlIncubationController::incubateWhile() (see
+ QtQml_VolatileBoolTypeF/pysideqmlregistertype.h) -->
+ <namespace-type name="std" generate="no">
+ <value-type name="atomic" generate="no"/>
+ </namespace-type>
+
+ <add-function signature="qmlRegisterType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistertype"/>
+ </add-function>
+
+ <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*,PyObject*)" return-type="int">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_callback"/>
+ </add-function>
+
+ <add-function signature="qmlRegisterSingletonType(PyTypeObject,const char*,int,int,const char*)" return-type="int">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_nocallback"/>
+ </add-function>
+
+ <add-function signature="qmlRegisterSingletonType(const char*,int,int,const char*,PyObject*)" return-type="int">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qjsvalue"/>
+ </add-function>
+
+ <add-function signature="qmlRegisterUncreatableType(PyTypeObject,const char*,int,int,const char*,const char*)" return-type="int">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregisteruncreatabletype"/>
+ </add-function>
+
+ <add-function signature="QmlElement(PyObject*)" return-type="PyObject*">
+ <inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlelement"/>
+ </add-function>
+
+ <enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES">
+ <extra-includes>
+ <include file-name="QtQml" location="global"/>
+ </extra-includes>
+ </enum-type>
+
+ <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"/>
+ <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>
+ </object-type>
+ <value-type name="QJSValue">
+ <enum-type name="ErrorType" since="5.12"/>
+ <enum-type name="SpecialValue"/>
+ </value-type>
+ <object-type name="QJSValueIterator"/>
+ <object-type name="QQmlAbstractUrlInterceptor">
+ <enum-type name="DataType"/>
+ </object-type>
+ <object-type name="QQmlApplicationEngine"/>
+ <object-type name="QQmlComponent">
+ <enum-type name="CompilationMode"/>
+ <enum-type name="Status"/>
+ <modify-function signature="QQmlComponent(QObject*)" allow-thread="yes"/>
+ <modify-function signature="QQmlComponent(QQmlEngine*,QObject*)" allow-thread="yes"/>
+ <modify-function signature="QQmlComponent(QQmlEngine*,QString,QObject*)" allow-thread="yes"/>
+ <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"/>
+ </object-type>
+ <object-type name="QQmlContext"/>
+ <value-type name="QQmlError"/>
+ <object-type name="QQmlDebuggingEnabler">
+ <enum-type name="StartMode"/>
+ </object-type>
+ <object-type name="QQmlEngine">
+ <modify-function signature="addImageProvider(const QString&amp;,QQmlImageProviderBase*)">
+ <modify-argument index="2">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QQmlExpression">
+ <modify-function signature="evaluate(bool*)" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+ <interface-type name="QQmlTypesExtensionInterface"/>
+ <interface-type name="QQmlExtensionInterface"/>
+ <object-type name="QQmlExtensionPlugin"/>
+ <!-- Possible qRegisterMetaType issues ? -->
+ <object-type name="QQmlFile">
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QQmlFileSelector"/>
+ <object-type name="QQmlImageProviderBase">
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="ImageType"/>
+ </object-type>
+ <object-type name="QQmlIncubator">
+ <enum-type name="IncubationMode"/>
+ <enum-type name="Status"/>
+ </object-type>
+ <object-type name="QQmlIncubationController">
+ <extra-includes>
+ <include file-name="pysideqmlregistertype.h" location="local"/>
+ </extra-includes>
+ <modify-function signature="incubateWhile(std::atomic&lt;bool&gt;*,int)" allow-thread="yes">
+ <modify-argument index="1">
+ The replace type is needed to use the VolatileBool_Check macro instead of
+ a template conversion function with "volatile bool" as argument.
+ <replace-type modified-type="VolatileBool"/>
+ <conversion-rule class="native">
+ auto volatileBool = reinterpret_cast&lt;QtQml_VolatileBoolObject *&gt;(%PYARG_1);
+ std::atomic&lt;bool&gt; *%out = volatileBool->flag;
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <!-- TODO: QQmlListProperty is a template class, and thus should probably be treated like a
+ container-type tag, which implies custom code for conversion. Not sure there's a use case to
+ allow instantiating or deriving from the class though, given that a separate custom ListProperty
+ type is provided by the module. Plus meta type registration would have to be taken into account
+ for the QML parts.
+ <value-type name="QQmlListProperty"/>-->
+ <value-type name="QQmlListReference"/>
+ <interface-type name="QQmlParserStatus"/>
+ <value-type name="QQmlProperty">
+ <enum-type name="PropertyTypeCategory"/>
+ <enum-type name="Type"/>
+ </value-type>
+ <object-type name="QQmlPropertyMap"/>
+ <object-type name="QQmlPropertyValueSource"/>
+ <value-type name="QQmlScriptString">
+ <modify-function signature="numberLiteral(bool*)const" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <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="booleanLiteral(bool*)const" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_bool*"/>
+ </inject-code>
+ </modify-function>
+ </value-type>
+ <object-type name="QQmlNetworkAccessManagerFactory">
+ <modify-function signature="create(QObject*)">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <!-- Suppress anonymous enum warning -->
+ <suppress-warning text="Anonymous enum (QmlCurrentSingletonTypeRegistrationVersion) does not have a type entry"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuick/CMakeLists.txt b/sources/pyside6/PySide6/QtQuick/CMakeLists.txt
new file mode 100644
index 000000000..1516af153
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuick/CMakeLists.txt
@@ -0,0 +1,83 @@
+project(QtQuick)
+
+set(QtQuick_registerType "${QtQuick_SOURCE_DIR}/pysidequickregistertype.cpp")
+
+set(QtQuick_SRC
+${QtQuick_GEN_DIR}/qquickasyncimageprovider_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickframebufferobject_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickframebufferobject_renderer_wrapper.cpp
+${QtQuick_GEN_DIR}/qquicktexturefactory_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickimageprovider_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickimageresponse_wrapper.cpp
+${QtQuick_GEN_DIR}/qquicktransform_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickitem_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickitem_updatepaintnodedata_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickitemgrabresult_wrapper.cpp
+${QtQuick_GEN_DIR}/qsharedpointer_qquickitemgrabresult_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickpainteditem_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickrendercontrol_wrapper.cpp
+${QtQuick_GEN_DIR}/qquicktextdocument_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickview_wrapper.cpp
+${QtQuick_GEN_DIR}/qquickwindow_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgbasicgeometrynode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgclipnode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgdynamictexture_wrapper.cpp
+#${QtQuick_GEN_DIR}/qsgflatcolormaterial_wrapper.cpp
+${QtQuick_GEN_DIR}/qsggeometry_attribute_wrapper.cpp
+${QtQuick_GEN_DIR}/qsggeometry_attributeset_wrapper.cpp
+${QtQuick_GEN_DIR}/qsggeometry_coloredpoint2d_wrapper.cpp
+${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}/qsgmaterial_wrapper.cpp
+#${QtQuick_GEN_DIR}/qsgmaterialshader_renderstate_wrapper.cpp
+# Issue with virtual char const *const *attributeNames()
+#${QtQuick_GEN_DIR}/qsgmaterialshader_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgmaterialtype_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgnode_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}/qsgsimplerectnode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgsimpletexturenode_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgtexture_wrapper.cpp
+#${QtQuick_GEN_DIR}/qsgtexturematerial_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgtextureprovider_wrapper.cpp
+${QtQuick_GEN_DIR}/qsgtransformnode_wrapper.cpp
+#${QtQuick_GEN_DIR}/qsgvertexcolormaterial_wrapper.cpp
+# module is always needed
+${QtQuick_GEN_DIR}/qtquick_module_wrapper.cpp
+)
+
+set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
+ ${QtQml_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}Qml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuick_GEN_DIR})
+
+set(QtQuick_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Quick_LIBRARIES})
+
+set(QtQuick_deps QtGui QtNetwork QtQml)
+
+create_pyside_module(NAME QtQuick
+ INCLUDE_DIRS QtQuick_include_dirs
+ LIBRARIES QtQuick_libraries
+ DEPS QtQuick_deps
+ TYPESYSTEM_PATH QtQuick_SOURCE_DIR
+ SOURCES QtQuick_SRC
+ STATIC_SOURCES QtQuick_registerType)
diff --git a/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
new file mode 100644
index 000000000..fdc1a5656
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.cpp
@@ -0,0 +1,211 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pysidequickregistertype.h"
+
+#include <pyside.h>
+#include <pyside_p.h>
+#include <shiboken.h>
+
+// Auto generated headers.
+#include "qquickitem_wrapper.h"
+#include "qquickpainteditem_wrapper.h"
+#include "qquickframebufferobject_wrapper.h"
+#include "pyside6_qtcore_python.h"
+#include "pyside6_qtquick_python.h"
+#include "pyside6_qtqml_python.h"
+
+// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr.
+static QMutex nextQmlElementMutex;
+
+static void createQuickItem(void *memory, void *type)
+{
+ QMutexLocker locker(&nextQmlElementMutex);
+ PySide::setNextQObjectMemoryAddr(memory);
+ Shiboken::GilState state;
+ PyObject *obj = PyObject_CallObject(reinterpret_cast<PyObject *>(type), 0);
+ if (!obj || PyErr_Occurred())
+ PyErr_Print();
+ PySide::setNextQObjectMemoryAddr(0);
+}
+
+#define PY_REGISTER_IF_INHERITS_FROM(className, typeToRegister,typePointerName, \
+ typeListName, typeMetaObject, type, registered) \
+ registerTypeIfInheritsFromClass<className##Wrapper>(#className, typeToRegister, \
+ typePointerName, typeListName, \
+ typeMetaObject, type, registered)
+
+bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, QByteArray className)
+{
+ className.append('*');
+ PyTypeObject *classPyType = Shiboken::Conversions::getPythonTypeObject(className.constData());
+ bool isDerived = PySequence_Contains(pyObjType->tp_mro,
+ reinterpret_cast<PyObject *>(classPyType));
+ return isDerived;
+}
+
+template <typename T>
+struct QPysideQmlMetaTypeInterface : QtPrivate::QMetaTypeInterface
+{
+ const QByteArray name;
+
+ QPysideQmlMetaTypeInterface(const QByteArray &name, const QMetaObject *metaObject = nullptr)
+ : QMetaTypeInterface {
+ /*.revision=*/ 0,
+ /*.alignment=*/ alignof(T),
+ /*.size=*/ sizeof(T),
+ /*.flags=*/ QtPrivate::QMetaTypeTypeFlags<T>::Flags,
+ /*.typeId=*/ 0,
+ /*.metaObject=*/ metaObject,
+ /*.name=*/ name.constData(),
+ /*.defaultCtr=*/ [](const QMetaTypeInterface *, void *addr) { new (addr) T(); },
+ /*.copyCtr=*/ [](const QMetaTypeInterface *, void *addr, const void *other) {
+ new (addr) T(*reinterpret_cast<const T *>(other));
+ },
+ /*.moveCtr=*/ [](const QMetaTypeInterface *, void *addr, void *other) {
+ new (addr) T(std::move(*reinterpret_cast<T *>(other)));
+ },
+ /*.dtor=*/ [](const QMetaTypeInterface *, void *addr) {
+ reinterpret_cast<T *>(addr)->~T();
+ },
+ /*.equals=*/ nullptr,
+ /*.lessThan=*/ nullptr,
+ /*.debugStream=*/ nullptr,
+ /*.dataStreamOut=*/ nullptr,
+ /*.dataStreamIn=*/ nullptr,
+ /*.legacyRegisterOp=*/ nullptr
+ }
+ , name(name) {}
+};
+
+template <class WrapperClass>
+void registerTypeIfInheritsFromClass(
+ QByteArray className,
+ PyTypeObject *typeToRegister,
+ const QByteArray &typePointerName,
+ const QByteArray &typeListName,
+ const QMetaObject *typeMetaObject,
+ QQmlPrivate::RegisterType *type,
+ bool &registered)
+{
+ bool shouldRegister = !registered && pyTypeObjectInheritsFromClass(typeToRegister, className);
+ if (shouldRegister) {
+ QMetaType ptrType(new QPysideQmlMetaTypeInterface<WrapperClass *>(typePointerName, typeMetaObject));
+ QMetaType lstType(new QPysideQmlMetaTypeInterface<QQmlListProperty<WrapperClass>>(typeListName));
+
+ type->typeId = std::move(ptrType);
+ type->listId = std::move(lstType);
+ type->attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<WrapperClass>();
+ type->attachedPropertiesMetaObject =
+ QQmlPrivate::attachedPropertiesMetaObject<WrapperClass>();
+ type->parserStatusCast =
+ QQmlPrivate::StaticCastSelector<WrapperClass, QQmlParserStatus>::cast();
+ type->valueSourceCast =
+ QQmlPrivate::StaticCastSelector<WrapperClass, QQmlPropertyValueSource>::cast();
+ type->valueInterceptorCast =
+ QQmlPrivate::StaticCastSelector<WrapperClass, QQmlPropertyValueInterceptor>::cast();
+ type->objectSize = sizeof(WrapperClass);
+ registered = true;
+ }
+}
+
+bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int versionMinor,
+ const char *qmlName, bool creatable, const char *noCreationReason, QQmlPrivate::RegisterType *type)
+{
+ using namespace Shiboken;
+
+ PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj);
+ PyTypeObject *qQuickItemPyType =
+ Shiboken::Conversions::getPythonTypeObject("QQuickItem*");
+ bool isQuickItem = PySequence_Contains(pyObjType->tp_mro,
+ reinterpret_cast<PyObject *>(qQuickItemPyType));
+
+ // Register only classes that inherit QQuickItem or its children.
+ if (!isQuickItem)
+ return false;
+
+ // Used inside macros to register the type.
+ const QMetaObject *metaObject = PySide::retrieveMetaObject(pyObj);
+ Q_ASSERT(metaObject);
+
+
+ // Incref the type object, don't worry about decref'ing it because
+ // there's no way to unregister a QML type.
+ Py_INCREF(pyObj);
+
+ // Used in macro registration.
+ QByteArray pointerName(qmlName);
+ pointerName.append('*');
+ QByteArray listName(qmlName);
+ listName.prepend("QQmlListProperty<");
+ listName.append('>');
+
+ bool registered = false;
+ PY_REGISTER_IF_INHERITS_FROM(QQuickPaintedItem, pyObjType, pointerName, listName, metaObject,
+ type, registered);
+ PY_REGISTER_IF_INHERITS_FROM(QQuickFramebufferObject, pyObjType, pointerName, listName,
+ metaObject, type, registered);
+ PY_REGISTER_IF_INHERITS_FROM(QQuickItem, pyObjType, pointerName, listName, metaObject,
+ type, registered);
+ if (!registered)
+ return false;
+
+ type->structVersion = 0;
+ type->create = creatable ? createQuickItem : nullptr;
+ type->noCreationReason = noCreationReason;
+ type->userdata = pyObj;
+ type->uri = uri;
+ type->version = QTypeRevision::fromVersion(versionMajor, versionMinor);
+ type->elementName = qmlName;
+ type->metaObject = metaObject;
+
+ type->extensionObjectCreate = 0;
+ type->extensionMetaObject = 0;
+ type->customParser = 0;
+
+ return true;
+}
+
+void PySide::initQuickSupport(PyObject *module)
+{
+ Q_UNUSED(module);
+#ifdef PYSIDE_QML_SUPPORT
+ setQuickRegisterItemFunction(quickRegisterType);
+#endif
+}
diff --git a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.h b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.h
index 1955413b2..1955413b2 100644
--- a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.h
+++ b/sources/pyside6/PySide6/QtQuick/pysidequickregistertype.h
diff --git a/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml
new file mode 100644
index 000000000..559e73e4f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuick/typesystem_quick.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtQuick">
+ <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"/>
+ <load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
+
+ <smart-pointer-type name="QSharedPointer" type="shared" getter="data"/>
+
+ <extra-includes>
+ <include file-name="pysidequickregistertype.h" location="local"/>
+ </extra-includes>
+
+ <inject-code class="target" position="end" file="../glue/qtquick.cpp" snippet="qtquick"/>
+
+ <object-type name="QQuickAsyncImageProvider" since="5.6"/>
+
+ <object-type name="QQuickFramebufferObject">
+ <object-type name="Renderer"/>
+ </object-type>
+
+ <object-type name="QQuickTextureFactory"/>
+ <object-type name="QQuickImageProvider"/>
+ <object-type name="QQuickImageResponse" since="5.6"/>
+
+ <object-type name="QQuickTransform"/>
+ <object-type name="QQuickItem" delete-in-main-thread="true">
+ <value-type name="UpdatePaintNodeData"/>
+ <enum-type name="Flag" flags="Flags"/>
+ <enum-type name="ItemChange"/>
+ <enum-type name="TransformOrigin"/>
+ <modify-function signature="itemTransform(QQuickItem*,bool*)const" allow-thread="yes">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <!-- TODO: Find a way to wrap `union ItemChangeData {}` -->
+ </object-type>
+
+ <object-type name="QQuickItemGrabResult"/>
+
+ <object-type name="QQuickPaintedItem">
+ <enum-type name="RenderTarget"/>
+ <enum-type name="PerformanceHint" flags="PerformanceHints"/>
+ </object-type>
+
+ <object-type name="QQuickRenderControl"/>
+
+ <object-type name="QQuickTextDocument"/>
+
+ <object-type name="QQuickView">
+ <enum-type name="ResizeMode"/>
+ <enum-type name="Status"/>
+ </object-type>
+
+ <object-type name="QQuickWindow">
+ <enum-type name="CreateTextureOption" flags="CreateTextureOptions"/>
+ <enum-type name="NativeObjectType" since="5.14"/>
+ <enum-type name="RenderStage"/>
+ <enum-type name="SceneGraphError"/>
+ <enum-type name="TextRenderType" since="5.10"/>
+ </object-type>
+
+ <object-type name="QSGBasicGeometryNode"/>
+ <object-type name="QSGClipNode"/>
+ <object-type name="QSGDynamicTexture"/>
+ <!-- <object-type name="QSGFlatColorMaterial"/> -->
+ <object-type name="QSGGeometry">
+ <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"/>
+ <value-type name="Attribute"/>
+ <value-type name="AttributeSet"/>
+ <value-type name="ColoredPoint2D"/>
+ <value-type name="Point2D"/>
+ <value-type name="TexturedPoint2D"/>
+ </object-type>
+ <object-type name="QSGGeometryNode"/>
+
+ <!-- QSGMaterialShader doesn't compile because of const char * char * types not being recognized
+ by the C++ parser, nor the generator.
+ <object-type name="QSGMaterial">
+ <enum-type name="Flag" flags="Flags"/>
+ </object-type>
+ <object-type name="QSGMaterialShader"/>
+ <value-type name="QSGMaterialShader::RenderState">
+ <enum-type name="DirtyState" flags="DirtyStates"/>
+ </value-type>
+ -->
+ <object-type name="QSGMaterialType"/>
+ <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="QSGOpacityNode"/>
+ <!-- <object-type name="QSGOpaqueTextureMaterial"/> -->
+ <object-type name="QSGSimpleRectNode"/>
+ <object-type name="QSGSimpleTextureNode">
+ <enum-type name="TextureCoordinatesTransformFlag" flags="TextureCoordinatesTransformMode"/>
+ </object-type>
+ <object-type name="QSGTexture">
+ <enum-type name="AnisotropyLevel" since="5.9"/>
+ <enum-type name="Filtering"/>
+ <enum-type name="WrapMode"/>
+ </object-type>
+ <!-- <object-type name="QSGTextureMaterial"/> -->
+ <object-type name="QSGTextureProvider"/>
+ <object-type name="QSGTransformNode"/>
+ <!-- <object-type name="QSGVertexColorMaterial"/> -->
+
+ <!-- These currently don't work because they are template classes, and the generator chokes on
+ them. Making these work properly would require fixing the parsing of template classes,
+ allowing creation of State structures and passing them to the template classes, as well as
+ implementing some mechanism of registration of the custom template classes, kind of how
+ it's done for qt quick items.
+ <object-type name="QSGSimpleMaterial"/>
+ <object-type name="QSGSimpleMaterialShader"/>
+ -->
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt b/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt
new file mode 100644
index 000000000..9e4befffd
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickControls2/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(QtQuickControls2)
+
+set(QtQuickControls2_SRC
+${QtQuickControls2_GEN_DIR}/qquickstyle_wrapper.cpp
+# module is always needed
+${QtQuickControls2_GEN_DIR}/qtquickcontrols2_module_wrapper.cpp
+)
+
+
+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}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}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuick_GEN_DIR}
+ ${QtQuickControls2_GEN_DIR})
+
+set(QtQuickControls2_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_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})
+
+set(QtQuickControls2_deps QtGui QtNetwork QtQml QtQuick)
+
+create_pyside_module(NAME QtQuickControls2
+ INCLUDE_DIRS QtQuickControls2_include_dirs
+ LIBRARIES QtQuickControls2_libraries
+ DEPS QtQuickControls2_deps
+ TYPESYSTEM_PATH QtQuickControls2_SOURCE_DIR
+ SOURCES QtQuickControls2_SRC)
diff --git a/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml b/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml
new file mode 100644
index 000000000..35ac2e3f2
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickControls2/typesystem_quickcontrols2.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtQuickControls2">
+ <load-typesystem name="QtQuick/typesystem_quick.xml" generate="no"/>
+
+ <object-type name="QQuickStyle" since="5.7"/>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt
new file mode 100644
index 000000000..3c5ba52c3
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickWidgets/CMakeLists.txt
@@ -0,0 +1,43 @@
+project(QtQuickWidgets)
+
+set(QtQuickWidgets_SRC
+${QtQuickWidgets_GEN_DIR}/qquickwidget_wrapper.cpp
+# module is always needed
+${QtQuickWidgets_GEN_DIR}/qtquickwidgets_module_wrapper.cpp
+)
+
+set(QtQuickWidgets_include_dirs ${QtQuickWidgets_SOURCE_DIR}
+ ${QtQml_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Quick_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}QuickWidgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtQuick_GEN_DIR}
+ ${QtQml_GEN_DIR}
+ ${QtQuickWidgets_GEN_DIR})
+
+set(QtQuickWidgets_libraries pyside6
+ ${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}Quick_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}QuickWidgets_LIBRARIES})
+
+set(QtQuickWidgets_deps QtGui QtQml QtQuick QtWidgets QtNetwork)
+
+create_pyside_module(NAME QtQuickWidgets
+ INCLUDE_DIRS QtQuickWidgets_include_dirs
+ LIBRARIES QtQuickWidgets_libraries
+ DEPS QtQuickWidgets_deps
+ TYPESYSTEM_PATH QtQuickWidgets_SOURCE_DIR
+ SOURCES QtQuickWidgets_SRC)
diff --git a/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml b/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml
new file mode 100644
index 000000000..08f8a9dc8
--- /dev/null
+++ b/sources/pyside6/PySide6/QtQuickWidgets/typesystem_quickwidgets.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtQuickWidgets">
+ <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"/>
+ <load-typesystem name="QtQml/typesystem_qml.xml" generate="no"/>
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+
+ <object-type name="QQuickWidget">
+ <enum-type name="ResizeMode"/>
+ <enum-type name="Status"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt b/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt
new file mode 100644
index 000000000..33e21a64c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtRemoteObjects/CMakeLists.txt
@@ -0,0 +1,45 @@
+project(QtRemoteObjects)
+
+set(QtRemoteObjects_SRC
+${QtRemoteObjects_GEN_DIR}/qabstractitemmodelreplica_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjectabstractpersistedstore_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjectdynamicreplica_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjecthost_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjecthostbase_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjectnode_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjectpendingcall_wrapper.cpp
+${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}/qremoteobjectsettingsstore_wrapper.cpp
+${QtRemoteObjects_GEN_DIR}/qremoteobjectsourcelocationinfo_wrapper.cpp
+
+# module is always needed
+${QtRemoteObjects_GEN_DIR}/qtremoteobjects_module_wrapper.cpp
+)
+
+set(QtRemoteObjects_include_dirs ${QtRemoteObjects_SOURCE_DIR}
+ ${QtRemoteObjects_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}RemoteObjects_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtRemoteObjects_libraries pyside6
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt${QT_MAJOR_VERSION}RemoteObjects_LIBRARIES})
+
+set(QtRemoteObjects_deps QtCore QtNetwork)
+
+create_pyside_module(NAME QtRemoteObjects
+ INCLUDE_DIRS QtRemoteObjects_include_dirs
+ LIBRARIES QtRemoteObjects_libraries
+ DEPS QtRemoteObjects_deps
+ TYPESYSTEM_PATH QtRemoteObjects_SOURCE_DIR
+ SOURCES QtRemoteObjects_SRC
+ TYPESYSTEM_NAME ${QtRemoteObjects_BINARY_DIR}/typesystem_remoteobjects.xml
+ )
diff --git a/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml b/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml
new file mode 100644
index 000000000..a115a133f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtRemoteObjects/typesystem_remoteobjects.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtRemoteObjects">
+ <load-typesystem name="templates/core_common.xml" generate="no"/>
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <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="QRemoteObjectAbstractPersistedStore"/>
+ <object-type name="QRemoteObjectDynamicReplica"/>
+ <object-type name="QRemoteObjectHost"/>
+ <object-type name="QRemoteObjectHostBase">
+ <enum-type name="AllowedSchemas"/>
+ </object-type>
+ <object-type name="QRemoteObjectNode">
+ <enum-type name="ErrorCode"/>
+ </object-type>
+ <object-type name="QRemoteObjectPendingCall">
+ <enum-type name="Error"/>
+ </object-type>
+ <object-type name="QRemoteObjectPendingCallWatcher"/>
+ <object-type name="QRemoteObjectRegistry"/>
+ <object-type name="QRemoteObjectRegistryHost"/>
+ <object-type name="QRemoteObjectReplica">
+ <enum-type name="State"/>
+ <!-- protected: <enum-type name="ConstructorType"/> -->
+ </object-type>
+ <object-type name="QRemoteObjectSettingsStore"/>
+ <value-type name="QRemoteObjectSourceLocationInfo"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtScxml/CMakeLists.txt b/sources/pyside6/PySide6/QtScxml/CMakeLists.txt
new file mode 100644
index 000000000..8cb78c9ee
--- /dev/null
+++ b/sources/pyside6/PySide6/QtScxml/CMakeLists.txt
@@ -0,0 +1,55 @@
+project(QtScxml)
+
+set(QtScxml_OPTIONAL_SRC )
+set(QtScxml_DROPPED_ENTRIES )
+
+set(QtScxml_SRC
+${QtScxml_GEN_DIR}/qscxmlcompiler_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlcompiler_loader_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlevent_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmldynamicscxmlservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlinvokableservice_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlinvokableservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlstaticscxmlservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlstatemachine_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmltabledata_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlerror_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_assignmentinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_evaluatorinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_foreachinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_invokeinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_parameterinfo_wrapper.cpp
+# module is always needed
+${QtScxml_GEN_DIR}/qtscxml_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}Scxml_VERSION VERSION_EQUAL 5.12.0
+ OR Qt${QT_MAJOR_VERSION}Scxml_VERSION VERSION_GREATER 5.12.0)
+ list(APPEND QtScxml_SRC
+ ${QtScxml_GEN_DIR}/qscxmldatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmldatamodel_foreachloopbody_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlecmascriptdatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlcppdatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlnulldatamodel_wrapper.cpp)
+endif()
+
+set(QtScxml_include_dirs ${QtScxml_SOURCE_DIR}
+ ${QtScxml_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Scxml_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtScxml_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Scxml_LIBRARIES})
+
+set(QtScxml_deps QtCore)
+
+create_pyside_module(NAME QtScxml
+ INCLUDE_DIRS QtScxml_include_dirs
+ LIBRARIES QtScxml_libraries
+ DEPS QtScxml_deps
+ TYPESYSTEM_PATH QtScxml_SOURCE_DIR
+ SOURCES QtScxml_SRC
+ DROPPED_ENTRIES QtScxml_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml b/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml
new file mode 100644
index 000000000..faac34e66
--- /dev/null
+++ b/sources/pyside6/PySide6/QtScxml/typesystem_scxml.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtScxml">
+ <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">
+ <enum-type name="EventType"/>
+ </object-type>
+ <object-type name="QScxmlDynamicScxmlServiceFactory"/>
+ <object-type name="QScxmlInvokableService"/>
+ <object-type name="QScxmlInvokableServiceFactory"/>
+ <object-type name="QScxmlStaticScxmlServiceFactory"/>
+ <object-type name="QScxmlStateMachine">
+ <modify-function signature="submitEvent(QScxmlEvent*)">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QScxmlTableData"/>
+ <object-type name="QScxmlDataModel" since="5.12">
+ <!-- Needs to have exports fixed -->
+ <interface-type name="ForeachLoopBody" since="5.12"/>
+ <modify-function signature="^evaluateTo(String|Bool|Variant)\(.*bool ?\*.*$">
+ <modify-argument index="2">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,arg,bool*"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+ <object-type name="QScxmlEcmaScriptDataModel" since="5.12"/>
+ <value-type name="QScxmlError"/>
+ <namespace-type name="QScxmlExecutableContent">
+ <value-type name="AssignmentInfo"/>
+ <value-type name="EvaluatorInfo"/>
+ <value-type name="ForeachInfo"/>
+ <value-type name="InvokeInfo"/>
+ <value-type name="ParameterInfo"/>
+ </namespace-type>
+ <object-type name="QScxmlNullDataModel" since="5.12"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSensors/CMakeLists.txt b/sources/pyside6/PySide6/QtSensors/CMakeLists.txt
new file mode 100644
index 000000000..b5c71b129
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSensors/CMakeLists.txt
@@ -0,0 +1,100 @@
+project(QtSensors)
+
+set(QtSensors_OPTIONAL_SRC )
+set(QtSensors_DROPPED_ENTRIES )
+
+set(QtSensors_SRC
+# overrides QObject::metaObject() by private method
+# ${QtSensors_GEN_DIR}/qsensorgesture_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgesturemanager_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgestureplugininterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorgesturerecognizer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometerfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaccelerometerreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeterfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qaltimeterreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambientlightsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qambienttemperaturesensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompass_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompassfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qcompassreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qdistancesensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscope_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscopefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qgyroscopereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholsterfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholsterreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qholstersensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumidityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumidityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qhumiditysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qirproximitysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlidsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qlightsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometer_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometerfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qmagnetometerreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qorientationsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressurefilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressurereading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qpressuresensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximityfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximityreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qproximitysensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qrotationsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qoutputrange_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorbackend_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorbackendfactory_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensormanager_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorchangesinterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qsensorplugininterface_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtapsensor_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltfilter_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltreading_wrapper.cpp
+ ${QtSensors_GEN_DIR}/qtiltsensor_wrapper.cpp
+# module is always needed
+ ${QtSensors_GEN_DIR}/qtsensors_module_wrapper.cpp
+)
+
+set(QtSensors_include_dirs ${QtSensors_SOURCE_DIR}
+ ${QtSensors_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Sensors_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtSensors_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Sensors_LIBRARIES})
+
+set(QtSensors_deps QtCore)
+
+create_pyside_module(NAME QtSensors
+ INCLUDE_DIRS QtSensors_include_dirs
+ LIBRARIES QtSensors_libraries
+ DEPS QtSensors_deps
+ TYPESYSTEM_PATH QtSensors_SOURCE_DIR
+ SOURCES QtSensors_SRC
+ DROPPED_ENTRIES QtSensors_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml b/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml
new file mode 100644
index 000000000..4106233d3
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSensors/typesystem_sensors.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtSensors">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+<!-- overrides QObject::metaObject() by private method
+ <object-type name="QSensorGesture"/>
+-->
+ <object-type name="QSensorGestureManager"/>
+ <object-type name="QSensorGesturePluginInterface"/>
+ <object-type name="QSensorGestureRecognizer"/>
+ <object-type name="QAccelerometer">
+ <enum-type name="AccelerationMode"/>
+ </object-type>
+ <object-type name="QAccelerometerFilter"/>
+ <object-type name="QAccelerometerReading"/>
+ <object-type name="QAltimeter"/>
+ <object-type name="QAltimeterFilter"/>
+ <object-type name="QAltimeterReading"/>
+ <object-type name="QAmbientLightFilter"/>
+ <object-type name="QAmbientLightReading">
+ <enum-type name="LightLevel"/>
+ </object-type>
+ <object-type name="QAmbientLightSensor"/>
+ <object-type name="QAmbientTemperatureFilter"/>
+ <object-type name="QAmbientTemperatureReading"/>
+ <object-type name="QAmbientTemperatureSensor"/>
+ <object-type name="QCompass"/>
+ <object-type name="QCompassFilter"/>
+ <object-type name="QCompassReading"/>
+ <object-type name="QDistanceFilter"/>
+ <object-type name="QDistanceReading"/>
+ <object-type name="QDistanceSensor"/>
+ <object-type name="QGyroscope"/>
+ <object-type name="QGyroscopeFilter"/>
+ <object-type name="QGyroscopeReading"/>
+ <object-type name="QHolsterFilter"/>
+ <object-type name="QHolsterReading"/>
+ <object-type name="QHolsterSensor"/>
+ <object-type name="QHumidityFilter"/>
+ <object-type name="QHumidityReading"/>
+ <object-type name="QHumiditySensor"/>
+ <object-type name="QIRProximityFilter"/>
+ <object-type name="QIRProximityReading"/>
+ <object-type name="QIRProximitySensor"/>
+ <object-type name="QLidFilter"/>
+ <object-type name="QLidReading"/>
+ <object-type name="QLidSensor"/>
+ <object-type name="QLightFilter"/>
+ <object-type name="QLightReading"/>
+ <object-type name="QLightSensor"/>
+ <object-type name="QMagnetometer"/>
+ <object-type name="QMagnetometerFilter"/>
+ <object-type name="QMagnetometerReading"/>
+ <object-type name="QOrientationFilter"/>
+ <object-type name="QOrientationReading">
+ <enum-type name="Orientation"/>
+ </object-type>
+ <object-type name="QOrientationSensor"/>
+ <object-type name="QPressureFilter"/>
+ <object-type name="QPressureReading"/>
+ <object-type name="QPressureSensor"/>
+ <object-type name="QProximityFilter"/>
+ <object-type name="QProximityReading"/>
+ <object-type name="QProximitySensor"/>
+ <object-type name="QRotationFilter"/>
+ <object-type name="QRotationReading"/>
+ <object-type name="QRotationSensor"/>
+ <object-type name="QSensor">
+ <enum-type name="Feature"/>
+ <enum-type name="AxesOrientationMode"/>
+ </object-type>
+ <object-type name="QSensorFilter"/>
+ <object-type name="QSensorReading"/>
+ <value-type name="qoutputrange"/>
+ <object-type name="QSensorBackend"/>
+ <object-type name="QSensorBackendFactory"/>
+ <object-type name="QSensorManager"/>
+ <object-type name="QSensorChangesInterface"/>
+ <object-type name="QSensorPluginInterface"/>
+ <object-type name="QTapFilter"/>
+ <object-type name="QTapReading">
+ <enum-type name="TapDirection"/>
+ </object-type>
+ <object-type name="QTapSensor"/>
+ <object-type name="QTiltFilter"/>
+ <object-type name="QTiltReading"/>
+ <object-type name="QTiltSensor"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt b/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt
new file mode 100644
index 000000000..c0abdf999
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSerialPort/CMakeLists.txt
@@ -0,0 +1,31 @@
+project(QtSerialPort)
+
+set(QtSerialPort_OPTIONAL_SRC )
+set(QtSerialPort_DROPPED_ENTRIES )
+
+set(QtSerialPort_SRC
+ ${QtSerialPort_GEN_DIR}/qserialport_wrapper.cpp
+ ${QtSerialPort_GEN_DIR}/qserialportinfo_wrapper.cpp
+# module is always needed
+ ${QtSerialPort_GEN_DIR}/qtserialport_module_wrapper.cpp
+)
+
+set(QtSerialPort_include_dirs ${QtSerialPort_SOURCE_DIR}
+ ${QtSerialPort_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}SerialPort_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtSerialPort_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}SerialPort_LIBRARIES})
+
+set(QtSerialPort_deps QtCore)
+
+create_pyside_module(NAME QtSerialPort
+ INCLUDE_DIRS QtSerialPort_include_dirs
+ LIBRARIES QtSerialPort_libraries
+ DEPS QtSerialPort_deps
+ TYPESYSTEM_PATH QtSerialPort_SOURCE_DIR
+ SOURCES QtSerialPort_SRC
+ DROPPED_ENTRIES QtSerialPort_DROPPED_ENTRIES)
diff --git a/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml b/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml
new file mode 100644
index 000000000..a27221038
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSerialPort/typesystem_serialport.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtSerialPort">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <object-type name="QSerialPort">
+ <enum-type name="BaudRate"/>
+ <enum-type name="DataBits"/>
+ <enum-type name="DataErrorPolicy"/>
+ <enum-type name="Direction" flags="Directions"/>
+ <enum-type name="FlowControl"/>
+ <enum-type name="Parity"/>
+ <enum-type name="PinoutSignal" flags="PinoutSignals"/>
+ <enum-type name="SerialPortError"/>
+ <enum-type name="StopBits"/>
+ </object-type>
+ <value-type name="QSerialPortInfo"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSql/CMakeLists.txt b/sources/pyside6/PySide6/QtSql/CMakeLists.txt
new file mode 100644
index 000000000..ec6285926
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSql/CMakeLists.txt
@@ -0,0 +1,49 @@
+project(QtSql)
+
+set(QtSql_SRC
+${QtSql_GEN_DIR}/qsql_wrapper.cpp
+${QtSql_GEN_DIR}/qsqldatabase_wrapper.cpp
+${QtSql_GEN_DIR}/qsqldriver_wrapper.cpp
+${QtSql_GEN_DIR}/qsqldrivercreatorbase_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlerror_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlfield_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlindex_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlquery_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlquerymodel_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlrecord_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlrelation_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlrelationaldelegate_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlrelationaltablemodel_wrapper.cpp
+${QtSql_GEN_DIR}/qsqlresult_wrapper.cpp
+${QtSql_GEN_DIR}/qsqltablemodel_wrapper.cpp
+# module is always needed
+${QtSql_GEN_DIR}/qtsql_module_wrapper.cpp
+)
+
+configure_file("${QtSql_SOURCE_DIR}/QtSql_global.pre.h.in"
+ "${QtSql_BINARY_DIR}/QtSql_global.pre.h" @ONLY)
+
+set(QtSql_include_dirs ${QtSql_SOURCE_DIR}
+ ${QtSql_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Sql_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ )
+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
+ INCLUDE_DIRS QtSql_include_dirs
+ LIBRARIES QtSql_libraries
+ DEPS QtSql_deps
+ TYPESYSTEM_PATH QtSql_SOURCE_DIR
+ SOURCES QtSql_SRC)
diff --git a/sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in b/sources/pyside6/PySide6/QtSql/QtSql_global.pre.h.in
index c56bc78c1..c56bc78c1 100644
--- a/sources/pyside2/PySide2/QtSql/QtSql_global.pre.h.in
+++ b/sources/pyside6/PySide6/QtSql/QtSql_global.pre.h.in
diff --git a/sources/pyside6/PySide6/QtSql/typesystem_sql.xml b/sources/pyside6/PySide6/QtSql/typesystem_sql.xml
new file mode 100644
index 000000000..b7747adf0
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSql/typesystem_sql.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtSql">
+ <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"/>
+ <enum-type name="ParamTypeFlag" flags="ParamType"/>
+ <enum-type name="TableType"/>
+ <enum-type name="NumericalPrecisionPolicy"/>
+ <extra-includes>
+ <include file-name="QtSql/qtsqlglobal.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+
+ <value-type name="QSqlDatabase">
+ <extra-includes>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="open()" allow-thread="yes"/>
+ <modify-function signature="open(const QString&amp;, const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="commit()" allow-thread="yes"/>
+ <modify-function signature="rollback()" allow-thread="yes"/>
+ <modify-function signature="transaction()" allow-thread="yes"/>
+ <modify-function signature="registerSqlDriver(const QString&amp;,QSqlDriverCreatorBase*)">
+ <modify-argument index="2">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QSqlQuery">
+ <enum-type name="BatchExecutionMode"/>
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="exec(const QString&amp;)" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="prepare(const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="clear()" allow-thread="yes"/>
+ <modify-function signature="last()" allow-thread="yes"/>
+ <modify-function signature="first()" allow-thread="yes"/>
+ <modify-function signature="previous()" allow-thread="yes"/>
+ <modify-function signature="next()" allow-thread="yes"/>
+ <modify-function signature="seek(int,bool)" allow-thread="yes"/>
+ </value-type>
+
+ <value-type name="QSqlRecord">
+ <extra-includes>
+ <include file-name="QSqlField" location="global"/>
+ </extra-includes>
+ </value-type>
+
+ <value-type name="QSqlError">
+ <enum-type name="ErrorType"/>
+ </value-type>
+
+ <value-type name="QSqlIndex"/>
+
+ <value-type name="QSqlRelation"/>
+
+ <object-type name="QSqlRelationalDelegate"/>
+
+ <value-type name="QSqlField">
+ <enum-type name="RequiredStatus"/>
+ </value-type>
+
+ <object-type name="QSqlDriver">
+ <enum-type name="DbmsType"/>
+ <enum-type name="DriverFeature"/>
+ <enum-type name="IdentifierType"/>
+ <enum-type name="NotificationSource"/>
+ <enum-type name="StatementType"/>
+ <extra-includes>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="beginTransaction()" allow-thread="yes"/>
+ <modify-function signature="commitTransaction()" allow-thread="yes"/>
+ <modify-function signature="rollbackTransaction()" allow-thread="yes"/>
+ <modify-function signature="open(const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,const QString&amp;)" allow-thread="yes"/>
+ <!-- ### This is too low level for Python, and pointer would be useless for the Python programmer -->
+ <modify-function signature="handle()const" remove="all"/>
+ <!-- ### -->
+ </object-type>
+
+ <object-type name="QSqlQueryModel">
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlRelationalTableModel">
+ <enum-type name="JoinMode"/>
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlResult">
+ <enum-type name="BindingSyntax"/>
+ <enum-type name="VirtualHookOperation"/>
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <!-- ### This isn't part of Qt public API -->
+ <modify-function signature="virtual_hook(int,void*)" remove="all"/>
+ <!-- ### -->
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="fetchLast()" allow-thread="yes"/>
+ <modify-function signature="fetchFirst()" allow-thread="yes"/>
+ <modify-function signature="fetchNext()" allow-thread="yes"/>
+ <modify-function signature="fetchPrevious()" allow-thread="yes"/>
+ <modify-function signature="fetch(int)" allow-thread="yes"/>
+ <modify-function signature="prepare(QString)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QSqlTableModel">
+ <enum-type name="EditStrategy"/>
+ <extra-includes>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlDriverCreatorBase">
+ <extra-includes>
+ <include file-name="QSqlDriver" location="global"/>
+ </extra-includes>
+ </object-type>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSvg/CMakeLists.txt b/sources/pyside6/PySide6/QtSvg/CMakeLists.txt
new file mode 100644
index 000000000..748c8355c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSvg/CMakeLists.txt
@@ -0,0 +1,31 @@
+project(QtSvg)
+
+set(QtSvg_SRC
+${QtSvg_GEN_DIR}/qsvggenerator_wrapper.cpp
+${QtSvg_GEN_DIR}/qsvgrenderer_wrapper.cpp
+# module is always needed
+${QtSvg_GEN_DIR}/qtsvg_module_wrapper.cpp
+)
+
+set(QtSvg_include_dirs ${QtSvg_SOURCE_DIR}
+ ${QtSvg_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Svg_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_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}
+ )
+set(QtSvg_deps QtGui)
+
+create_pyside_module(NAME QtSvg
+ INCLUDE_DIRS QtSvg_include_dirs
+ LIBRARIES QtSvg_libraries
+ DEPS QtSvg_deps
+ TYPESYSTEM_PATH QtSvg_SOURCE_DIR
+ SOURCES QtSvg_SRC)
diff --git a/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml b/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml
new file mode 100644
index 000000000..2fbfad4a1
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSvg/typesystem_svg.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtSvg">
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+
+ <object-type name="QSvgRenderer"/>
+
+ <object-type name="QSvgGenerator">
+ <modify-function signature="setOutputDevice(QIODevice*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="outputDevice()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt
new file mode 100644
index 000000000..6922f877d
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSvgWidgets/CMakeLists.txt
@@ -0,0 +1,39 @@
+project(QtSvgWidgets)
+
+set(QtSvgWidgets_SRC
+${QtSvgWidgets_GEN_DIR}/qgraphicssvgitem_wrapper.cpp
+${QtSvgWidgets_GEN_DIR}/qsvgwidget_wrapper.cpp
+# module is always needed
+${QtSvgWidgets_GEN_DIR}/qtsvgwidgets_module_wrapper.cpp
+)
+
+set(QtSvgWidgets_include_dirs ${QtSvgWidgets_SOURCE_DIR}
+ ${QtSvgWidgets_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Svg_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}SvgWidgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_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}
+ )
+
+set(QtSvgWidgets_deps QtSvg QtWidgets)
+
+create_pyside_module(NAME QtSvgWidgets
+ INCLUDE_DIRS QtSvgWidgets_include_dirs
+ LIBRARIES QtSvgWidgets_libraries
+ DEPS QtSvgWidgets_deps
+ TYPESYSTEM_PATH QtSvgWidgets_SOURCE_DIR
+ SOURCES QtSvgWidgets_SRC)
diff --git a/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml b/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml
new file mode 100644
index 000000000..6def19d45
--- /dev/null
+++ b/sources/pyside6/PySide6/QtSvgWidgets/typesystem_svgwidgets.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtSvgWidgets">
+ <load-typesystem name="QtSvg/typesystem_svg.xml" generate="no"/>
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+
+ <object-type name="QSvgWidget"/>
+
+ <object-type name="QGraphicsSvgItem">
+ <modify-function signature="QGraphicsSvgItem(QGraphicsItem*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QGraphicsSvgItem(const QString&amp;,QGraphicsItem*)">
+ <modify-argument index="this">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtTest/CMakeLists.txt b/sources/pyside6/PySide6/QtTest/CMakeLists.txt
new file mode 100644
index 000000000..8e82d8030
--- /dev/null
+++ b/sources/pyside6/PySide6/QtTest/CMakeLists.txt
@@ -0,0 +1,40 @@
+project(QtTest)
+
+set(QtTest_SRC
+${QtTest_GEN_DIR}/qtest_pysideqtoucheventsequence_wrapper.cpp
+${QtTest_GEN_DIR}/qtest_wrapper.cpp
+# module is always needed
+${QtTest_GEN_DIR}/qttest_module_wrapper.cpp
+)
+
+configure_file("${QtTest_SOURCE_DIR}/QtTest_global.pre.h.in"
+ "${QtTest_BINARY_DIR}/QtTest_global.pre.h" @ONLY)
+
+configure_file("${QtTest_SOURCE_DIR}/QtTest_global.post.h.in"
+ "${QtTest_BINARY_DIR}/QtTest_global.post.h" @ONLY)
+
+set(QtTest_include_dirs ${QtTest_SOURCE_DIR}
+ ${QtTest_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Test_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ )
+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}
+ )
+set(QtTest_deps QtWidgets)
+
+create_pyside_module(NAME QtTest
+ INCLUDE_DIRS QtTest_include_dirs
+ LIBRARIES QtTest_libraries
+ DEPS QtTest_deps
+ TYPESYSTEM_PATH QtTest_SOURCE_DIR
+ SOURCES QtTest_SRC)
diff --git a/sources/pyside2/PySide2/QtTest/QtTest_global.post.h.in b/sources/pyside6/PySide6/QtTest/QtTest_global.post.h.in
index ccd18153c..ccd18153c 100644
--- a/sources/pyside2/PySide2/QtTest/QtTest_global.post.h.in
+++ b/sources/pyside6/PySide6/QtTest/QtTest_global.post.h.in
diff --git a/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in b/sources/pyside6/PySide6/QtTest/QtTest_global.pre.h.in
index da5534b82..da5534b82 100644
--- a/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in
+++ b/sources/pyside6/PySide6/QtTest/QtTest_global.pre.h.in
diff --git a/sources/pyside6/PySide6/QtTest/typesystem_test.xml b/sources/pyside6/PySide6/QtTest/typesystem_test.xml
new file mode 100644
index 000000000..13caea068
--- /dev/null
+++ b/sources/pyside6/PySide6/QtTest/typesystem_test.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtTest">
+ <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" function-name="qCompare"/>
+ <rejection class="QTest" function-name="qInit"/>
+ <rejection class="QTest" function-name="qVerify"/>
+ <rejection class="QTest" function-name="qSleep"/>
+ <rejection class="QTest" function-name="toHexRepresentation"/>
+ <rejection class="QTest" function-name="qWait"/>
+ <rejection class="QTest" function-name="qFail"/>
+ <rejection class="QTest" function-name="qInit"/>
+ <rejection class="QTest" function-name="qExec"/>
+ <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="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.
+
+ The problem that costed my days of bug hunting is the fact that shiboken gives
+ misleading error messages. The messages that I could not get rid of were
+
+ signature 'generateTouchEvent(QWidget*,QInputDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
+ signature 'generateTouchEvent(QWindow*,QInputDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
+
+ I always thought that for some reason the functions were not recognized, or the arguments somehow
+ do not match their declaration. Only late in the project, I learnt that also
+ a simply missing type name in the argument list leads to this message.
+
+ <object-type name="QInputDevice">
+ <enum-type name="CapabilityFlag" flags="Capabilities"/>
+ <enum-type name="DeviceType"/>
+ </object-type>
+ ^^^ this is now moved into QtGui -->
+
+ <namespace-type name="QTest">
+ <!-- Qt5: private <enum-type name="AttributeIndex" since="4.6"/> -->
+ <enum-type name="KeyAction"/>
+ <!-- Qt5: private <enum-type name="LogElementType" since="4.6"/> -->
+ <enum-type name="MouseAction"/>
+ <enum-type name="QBenchmarkMetric" since="4.7"/>
+ <enum-type name="TestFailMode"/>
+ <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">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="press(int,const QPoint&amp;,QWindow*)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="move(int,const QPoint&amp;,QWidget*)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="move(int,const QPoint&amp;,QWindow*)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="release(int,const QPoint&amp;,QWidget*)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="release(int,const QPoint&amp;,QWindow*)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="stationary(int)">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <modify-function signature="generateTouchEvent(QWidget*,QPointingDevice*,bool)" rename="touchEvent" since="4.6">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="target"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="generateTouchEvent(QWindow*,QPointingDevice*,bool)" rename="touchEvent" since="4.6">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="target"/>
+ </modify-argument>
+ </modify-function>
+ </namespace-type>
+
+ <rejection class="QSignalSpy"/>
+ <rejection class="QTestEventList"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt b/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt
new file mode 100644
index 000000000..9b6b5eb0a
--- /dev/null
+++ b/sources/pyside6/PySide6/QtTextToSpeech/CMakeLists.txt
@@ -0,0 +1,30 @@
+project(QtTextToSpeech)
+
+set(QtTextToSpeech_SRC
+${QtTextToSpeech_GEN_DIR}/qtexttospeech_wrapper.cpp
+${QtTextToSpeech_GEN_DIR}/qtexttospeechengine_wrapper.cpp
+${QtTextToSpeech_GEN_DIR}/qvoice_wrapper.cpp
+# module is always needed
+${QtTextToSpeech_GEN_DIR}/qttexttospeech_module_wrapper.cpp
+)
+
+set(QtTextToSpeech_include_dirs ${QtTextToSpeech_SOURCE_DIR}
+ ${QtTextToSpeech_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}TextToSpeech_INCLUDE_DIRS}
+ ${libpyside_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})
+
+set(QtTextToSpeech_deps QtCore QtMultimedia)
+
+create_pyside_module(NAME QtTextToSpeech
+ INCLUDE_DIRS QtTextToSpeech_include_dirs
+ LIBRARIES QtTextToSpeech_libraries
+ DEPS QtTextToSpeech_deps
+ TYPESYSTEM_PATH QtTextToSpeech_SOURCE_DIR
+ SOURCES QtTextToSpeech_SRC)
diff --git a/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml b/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml
new file mode 100644
index 000000000..30aab1ae5
--- /dev/null
+++ b/sources/pyside6/PySide6/QtTextToSpeech/typesystem_texttospeech.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtTextToSpeech">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <object-type name="QTextToSpeech">
+ <enum-type name="State"/>
+ </object-type>
+ <object-type name="QTextToSpeechEngine"/>
+ <value-type name="QVoice">
+ <enum-type name="Gender"/>
+ <enum-type name="Age"/>
+ </value-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt b/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt
new file mode 100644
index 000000000..3275c4bef
--- /dev/null
+++ b/sources/pyside6/PySide6/QtUiTools/CMakeLists.txt
@@ -0,0 +1,42 @@
+project(QtUiTools)
+
+set(QtUiTools_SRC
+${QtUiTools_GEN_DIR}/quiloader_wrapper.cpp
+# module is always needed
+${QtUiTools_GEN_DIR}/qtuitools_module_wrapper.cpp
+)
+
+set(QtUiTools_glue_sources
+ "${QtUiTools_SOURCE_DIR}/glue/plugins.h"
+)
+
+set(QtUiTools_include_dirs ${QtUiTools_SOURCE_DIR}
+ ${QtUiTools_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Xml_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Designer_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}UiTools_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${plugins_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtXml_GEN_DIR}
+ ${QtGui_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}
+ )
+set(QtUiTools_deps QtWidgets QtXml)
+create_pyside_module(NAME QtUiTools
+ INCLUDE_DIRS QtUiTools_include_dirs
+ LIBRARIES QtUiTools_libraries
+ DEPS QtUiTools_deps
+ TYPESYSTEM_PATH QtUiTools_SOURCE_DIR
+ SOURCES QtUiTools_SRC
+ GLUE_SOURCES QtUiTools_glue_sources)
diff --git a/sources/pyside2/PySide2/QtUiTools/glue/plugins.h b/sources/pyside6/PySide6/QtUiTools/glue/plugins.h
index 402965a81..402965a81 100644
--- a/sources/pyside2/PySide2/QtUiTools/glue/plugins.h
+++ b/sources/pyside6/PySide6/QtUiTools/glue/plugins.h
diff --git a/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml b/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml
new file mode 100644
index 000000000..93a78c62f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtUiTools/typesystem_uitools.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+
+<typesystem package="PySide6.QtUiTools">
+ <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
+ <load-typesystem name="QtXml/typesystem_xml.xml" generate="no"/>
+
+ <object-type name="QUiLoader">
+ <extra-includes>
+ <include file-name="glue/plugins.h" location="local"/>
+ </extra-includes>
+ <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*)" return-type="void">
+ <modify-argument index="1">
+ <rename to="customWidgetType"/>
+ </modify-argument>
+ <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):
+ painter = QPainter(self)
+ 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"/>
+ </add-function>
+ <modify-function signature="createAction(QObject*,const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createActionGroup(QObject*,const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createLayout(const QString&amp;,QObject*,const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createWidget(const QString&amp;,QWidget*,const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="load(QIODevice*,QWidget*)">
+ <modify-argument index="2">
+ <replace-default-expression with="0"/>
+ <rename to="parentWidget"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="target"/>
+ </modify-argument>
+ <inject-code file="../glue/qtuitools.cpp" snippet="quiloader-load-1"/>
+ </modify-function>
+
+ <!-- Syntax sugar -->
+ <add-function signature="load(QString,QWidget*)" return-type="QWidget*">
+ <modify-argument index="2">
+ <replace-default-expression with="0"/>
+ <rename to="parentWidget"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="target"/>
+ </modify-argument>
+ <inject-code file="../glue/qtuitools.cpp" snippet="quiloader-load-2"/>
+ </add-function>
+ </object-type>
+
+ <!--
+ After the removal of the 'pysideuic' Python module, many users were unable to generate and
+ load UI classes dynamically.
+ This function was created to provide an equivalent solution to the 'loadUiType' function from
+ Riverbank's PyQt.
+ -->
+ <add-function signature="loadUiType(const QString&amp; @uifile@)" return-type="PyObject*">
+ <inject-code file="../glue/qtuitools.cpp" snippet="loaduitype"/>
+ </add-function>
+
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt b/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt
new file mode 100644
index 000000000..b6b8d3e5e
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebChannel/CMakeLists.txt
@@ -0,0 +1,28 @@
+project(QtWebChannel)
+
+set(QtWebChannel_SRC
+${QtWebChannel_GEN_DIR}/qwebchannel_wrapper.cpp
+${QtWebChannel_GEN_DIR}/qwebchannelabstracttransport_wrapper.cpp
+# module is always needed
+${QtWebChannel_GEN_DIR}/qtwebchannel_module_wrapper.cpp
+)
+
+set(QtWebChannel_include_dirs ${QtWebChannel_SOURCE_DIR}
+ ${QtWebChannel_BINARY_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}
+ )
+set(QtWebChannel_deps QtCore)
+
+create_pyside_module(NAME QtWebChannel
+ INCLUDE_DIRS QtWebChannel_include_dirs
+ LIBRARIES QtWebChannel_libraries
+ DEPS QtWebChannel_deps
+ TYPESYSTEM_PATH QtWebChannel_SOURCE_DIR
+ SOURCES QtWebChannel_SRC)
diff --git a/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml b/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml
new file mode 100644
index 000000000..591201fd8
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebChannel/typesystem_webchannel.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWebChannel">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <object-type name="QWebChannel"/>
+ <object-type name="QWebChannelAbstractTransport">
+ <extra-includes>
+ <include file-name="QJsonObject" location="global"/>
+ </extra-includes>
+ </object-type>
+ <!-- Not sure if this will be useful, but commented out for now because
+ the QML module is not yet wrapped.
+ <object-type name="QQmlWebChannel"/> -->
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt
new file mode 100644
index 000000000..1c31eb0c7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt
@@ -0,0 +1,27 @@
+project(QtWebEngine)
+
+set(QtWebEngine_SRC
+${QtWebEngine_GEN_DIR}/qtwebengine_wrapper.cpp
+# module is always needed
+${QtWebEngine_GEN_DIR}/qtwebengine_module_wrapper.cpp
+)
+
+set(QtWebEngine_include_dirs
+ ${QtWebEngine_SOURCE_DIR}
+ ${QtWebEngine_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ )
+set(QtWebEngine_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebEngine_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ )
+set(QtWebEngine_deps QtCore)
+create_pyside_module(NAME QtWebEngine
+ INCLUDE_DIRS QtWebEngine_include_dirs
+ LIBRARIES QtWebEngine_libraries
+ DEPS QtWebEngine_deps
+ TYPESYSTEM_PATH QtWebEngine_SOURCE_DIR
+ SOURCES QtWebEngine_SRC)
+
diff --git a/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml b/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml
new file mode 100644
index 000000000..7801e97a7
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWebEngine">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <namespace-type name="QtWebEngine"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
new file mode 100644
index 000000000..7d6995b4c
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(QtWebEngineCore)
+
+set(QtWebEngineCore_SRC
+${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginehttprequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinfo_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinterceptor_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestjob_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineurlschemehandler_wrapper.cpp
+# module is always needed
+${QtWebEngineCore_GEN_DIR}/qtwebenginecore_module_wrapper.cpp
+)
+
+if (Qt${QT_MAJOR_VERSION}WebEngineCore_VERSION VERSION_EQUAL 5.12.0
+ OR Qt${QT_MAJOR_VERSION}WebEngineCore_VERSION VERSION_GREATER 5.12.0)
+ list(APPEND QtWebEngineCore_SRC
+ ${QtWebEngineCore_GEN_DIR}/qwebengineurlscheme_wrapper.cpp)
+endif()
+
+set(QtWebEngineCore_include_dirs
+ ${QtWebEngineCore_SOURCE_DIR}
+ ${QtWebEngineCore_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ )
+set(QtWebEngineCore_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ )
+set(QtWebEngineCore_deps QtCore QtNetwork)
+create_pyside_module(NAME QtWebEngineCore
+ INCLUDE_DIRS QtWebEngineCore_include_dirs
+ LIBRARIES QtWebEngineCore_libraries
+ DEPS QtWebEngineCore_deps
+ TYPESYSTEM_PATH QtWebEngineCore_SOURCE_DIR
+ SOURCES QtWebEngineCore_SRC)
+
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
new file mode 100644
index 000000000..b24fd4729
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWebEngineCore">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+
+ <object-type name="QWebEngineCookieStore"/>
+
+ <object-type name="QWebEngineHttpRequest">
+ <enum-type name="Method"/>
+ <modify-function signature="QWebEngineHttpRequest(const QUrl &amp;, const QWebEngineHttpRequest::Method &amp;)">
+ <modify-argument index="2">
+ <replace-type modified-type="QWebEngineHttpRequest::Method"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QWebEngineUrlRequestInfo">
+ <enum-type name="NavigationType"/>
+ <enum-type name="ResourceType"/>
+ </object-type>
+
+ <object-type name="QWebEngineUrlRequestInterceptor"/>
+
+ <object-type name="QWebEngineUrlRequestJob">
+ <enum-type name="Error"/>
+ </object-type>
+ <value-type name="QWebEngineUrlScheme" since="5.12">
+ <enum-type name="Syntax"/>
+ <enum-type name="SpecialPort"/>
+ <enum-type name="Flag" flags="Flags"/>
+ </value-type>
+
+ <object-type name="QWebEngineUrlSchemeHandler"/>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
new file mode 100644
index 000000000..7c61df812
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
@@ -0,0 +1,55 @@
+project(QtWebEngineWidgets)
+
+set(QtWebEngineWidgets_SRC
+${QtWebEngineWidgets_GEN_DIR}/qwebenginecertificateerror_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginedownloaditem_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginehistory_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginehistoryitem_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginepage_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebengineprofile_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginescript_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginescriptcollection_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginesettings_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebengineview_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginecontextmenudata_wrapper.cpp
+${QtWebEngineWidgets_GEN_DIR}/qwebenginefullscreenrequest_wrapper.cpp
+# module is always needed
+${QtWebEngineWidgets_GEN_DIR}/qtwebenginewidgets_module_wrapper.cpp
+)
+
+set(QtWebEngineWidgets_include_dirs
+ ${QtWebEngineWidgets_SOURCE_DIR}
+ ${QtWebEngineWidgets_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}WebChannel_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${QtWebEngineWidgets_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtWebChannel_GEN_DIR}
+ ${QtWebEngineCore_GEN_DIR}
+ ${QtPrintSupport_GEN_DIR}
+ )
+set(QtWebEngineWidgets_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}WebEngineWidgets_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}WebChannel_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}
+ )
+set(QtWebEngineWidgets_deps QtGui QtWidgets QtNetwork QtWebChannel QtPrintSupport)
+create_pyside_module(NAME QtWebEngineWidgets
+ INCLUDE_DIRS QtWebEngineWidgets_include_dirs
+ LIBRARIES QtWebEngineWidgets_libraries
+ DEPS QtWebEngineWidgets_deps
+ TYPESYSTEM_PATH QtWebEngineWidgets_SOURCE_DIR
+ SOURCES QtWebEngineWidgets_SRC)
+
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
new file mode 100644
index 000000000..8feb541ad
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWebEngineWidgets">
+ <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="QtNetwork/typesystem_network.xml" generate="no"/>
+ <load-typesystem name="QtWebChannel/typesystem_webchannel.xml" generate="no"/>
+ <load-typesystem name="QtWebEngineCore/typesystem_webenginecore.xml" generate="no"/>
+ <load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
+
+
+ <object-type name="QWebEngineCertificateError">
+ <enum-type name="Error"/>
+ </object-type>
+
+ <object-type name="QWebEngineDownloadItem">
+ <enum-type name="DownloadInterruptReason"/>
+ <enum-type name="DownloadState"/>
+ <enum-type name="DownloadType"/>
+ <enum-type name="SavePageFormat"/>
+ </object-type>
+
+ <object-type name="QWebEngineHistory"/>
+ <value-type name="QWebEngineHistoryItem"/>
+
+ <object-type name="QWebEnginePage">
+ <enum-type name="LifecycleState"/>
+ <enum-type name="WebAction"/>
+ <enum-type name="FindFlag" flags="FindFlags"/>
+ <enum-type name="WebWindowType"/>
+ <enum-type name="PermissionPolicy"/>
+ <enum-type name="NavigationType"/>
+ <enum-type name="Feature"/>
+ <enum-type name="FileSelectionMode"/>
+ <enum-type name="JavaScriptConsoleMessageLevel"/>
+ <enum-type name="RenderProcessTerminationStatus"/>
+ <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>
+ <add-function signature="print(QPrinter*,PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-print"/>
+ </add-function>
+ <add-function signature="toPlainText(PyObject*) const">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
+ </add-function>
+ <add-function signature="toHtml(PyObject*) const">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
+ </add-function>
+ <add-function signature="runJavaScript(const QString &amp;,quint32,PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-runjavascript"/>
+ </add-function>
+ <add-function signature="printToPdf(PyObject*,const QPageLayout &amp;)">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-printtopdf"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QWebEngineProfile">
+ <enum-type name="HttpCacheType"/>
+ <enum-type name="PersistentCookiesPolicy"/>
+ </object-type>
+
+ <value-type name="QWebEngineScript">
+ <enum-type name="InjectionPoint"/>
+ <enum-type name="ScriptWorldId"/>
+ </value-type>
+
+ <object-type name="QWebEngineScriptCollection"/>
+
+ <object-type name="QWebEngineSettings">
+ <enum-type name="FontFamily"/>
+ <enum-type name="FontSize"/>
+ <enum-type name="UnknownUrlSchemePolicy" since="5.11"/>
+ <enum-type name="WebAttribute"/>
+ </object-type>
+
+ <object-type name="QWebEngineView">
+ <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>
+ </object-type>
+
+ <value-type name="QWebEngineContextMenuData">
+ <enum-type name="EditFlag" flags="EditFlags" since="5.11"/>
+ <enum-type name="MediaFlag" flags="MediaFlags" since="5.11"/>
+ <enum-type name="MediaType"/>
+ </value-type>
+
+ <object-type name="QWebEngineFullScreenRequest"/>
+
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt b/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt
new file mode 100644
index 000000000..0166f5767
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebSockets/CMakeLists.txt
@@ -0,0 +1,36 @@
+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}/qwebsocketprotocol_wrapper.cpp
+${QtWebSockets_GEN_DIR}/qwebsocketserver_wrapper.cpp
+# module is always needed
+${QtWebSockets_GEN_DIR}/qtwebsockets_module_wrapper.cpp
+)
+
+set(QtWebSockets_include_dirs ${QtWebSockets_SOURCE_DIR}
+ ${QtWebSockets_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}WebSockets_INCLUDE_DIRS}
+ ${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}
+ )
+
+set(QtWebSockets_deps QtNetwork)
+
+create_pyside_module(NAME QtWebSockets
+ INCLUDE_DIRS QtWebSockets_include_dirs
+ LIBRARIES QtWebSockets_libraries
+ DEPS QtWebSockets_deps
+ TYPESYSTEM_PATH QtWebSockets_SOURCE_DIR
+ SOURCES QtWebSockets_SRC)
diff --git a/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml b/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml
new file mode 100644
index 000000000..da1b78159
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWebSockets/typesystem_websockets.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWebSockets">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+
+ <object-type name="QMaskGenerator"/>
+
+ <object-type name="QWebSocket">
+ <extra-includes>
+ <include file-name="QTcpSocket" location="global"/>
+ </extra-includes>
+ </object-type>
+
+ <object-type name="QWebSocketCorsAuthenticator"/>
+
+ <namespace-type name="QWebSocketProtocol">
+ <enum-type name="Version"/>
+ <enum-type name="CloseCode"/>
+ </namespace-type>
+
+ <object-type name="QWebSocketServer">
+ <enum-type name="SslMode"/>
+ <extra-includes>
+ <include file-name="QWebSocketCorsAuthenticator" location="global"/>
+ </extra-includes>
+ </object-type>
+
+ <!-- TODO: Gracefully handle the lack of SSL support -->
+ <rejection class="QWebSocket" function-name="ignoreSslErrors"/>
+ <rejection class="QWebSocket" function-name="setSslConfiguration"/>
+ <rejection class="QWebSocket" function-name="sslConfiguration"/>
+ <rejection class="QWebSocket" function-name="ignoreSslErrors"/>
+ <rejection class="QWebSocket" function-name="sslErrors"/>
+ <rejection class="QWebSocketServer" function-name="setSslConfiguration"/>
+ <rejection class="QWebSocketServer" function-name="sslConfiguration"/>
+ <rejection class="QWebSocketServer" function-name="peerVerifyError"/>
+ <rejection class="QWebSocketServer" function-name="sslErrors"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt
new file mode 100644
index 000000000..02813b4c2
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/CMakeLists.txt
@@ -0,0 +1,225 @@
+project(QtWidgets)
+
+set(QtWidgets_SRC
+${QtWidgets_GEN_DIR}/qaccessiblewidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractbutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractgraphicsshapeitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractitemdelegate_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractitemview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractscrollarea_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractslider_wrapper.cpp
+${QtWidgets_GEN_DIR}/qabstractspinbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qapplication_wrapper.cpp
+${QtWidgets_GEN_DIR}/qboxlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qbuttongroup_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcalendarwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcheckbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcolordialog_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcolormap_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcolumnview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcombobox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcommandlinkbutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcommonstyle_wrapper.cpp
+${QtWidgets_GEN_DIR}/qcompleter_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdatawidgetmapper_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdateedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdatetimeedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdial_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdialog_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdialogbuttonbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdockwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qdoublespinbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qerrormessage_wrapper.cpp
+${QtWidgets_GEN_DIR}/qfiledialog_wrapper.cpp
+${QtWidgets_GEN_DIR}/qfileiconprovider_wrapper.cpp
+${QtWidgets_GEN_DIR}/qfilesystemmodel_wrapper.cpp
+${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}/qframe_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgestureevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgesturerecognizer_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsanchor_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsanchorlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsblureffect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicscolorizeeffect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsdropshadoweffect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicseffect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsellipseitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsgridlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsitemanimation_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsitemgroup_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicslayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicslayoutitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicslinearlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicslineitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsobject_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsopacityeffect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicspathitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicspixmapitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicspolygonitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsproxywidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsrectitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsrotation_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscale_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscene_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenecontextmenuevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenedragdropevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicssceneevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenehelpevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenehoverevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenemouseevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenemoveevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicssceneresizeevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsscenewheelevent_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicssimpletextitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicstextitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicstransform_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicsview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgraphicswidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgridlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qgroupbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qhboxlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qheaderview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qinputdialog_wrapper.cpp
+${QtWidgets_GEN_DIR}/qitemdelegate_wrapper.cpp
+${QtWidgets_GEN_DIR}/qitemeditorcreatorbase_wrapper.cpp
+${QtWidgets_GEN_DIR}/qitemeditorfactory_wrapper.cpp
+${QtWidgets_GEN_DIR}/qkeysequenceedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlabel_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlayoutitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlcdnumber_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlineedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlistview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlistwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qlistwidgetitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmainwindow_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmdiarea_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmdisubwindow_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmenu_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmenubar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qmessagebox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qpangesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qpinchgesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qplaintextdocumentlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qplaintextedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qprogressbar_wrapper.cpp
+${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}/qrubberband_wrapper.cpp
+${QtWidgets_GEN_DIR}/qscrollarea_wrapper.cpp
+${QtWidgets_GEN_DIR}/qscrollbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qscroller_wrapper.cpp
+${QtWidgets_GEN_DIR}/qscrollerproperties_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsizegrip_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsizepolicy_wrapper.cpp
+${QtWidgets_GEN_DIR}/qslider_wrapper.cpp
+${QtWidgets_GEN_DIR}/qspaceritem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qspinbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsplashscreen_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsplitter_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsplitterhandle_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstackedlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstackedwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstatusbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyle_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleditemdelegate_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstylefactory_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstylehintreturn_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstylehintreturnmask_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstylehintreturnvariant_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoption_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionbutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptioncombobox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptioncomplex_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiondockwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionfocusrect_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionframe_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiongraphicsitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiongroupbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionheader_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionmenuitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionprogressbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionrubberband_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionsizegrip_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionslider_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionspinbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontab_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontabbarbase_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontabwidgetframe_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontitlebar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontoolbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontoolbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptiontoolbutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstyleoptionviewitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qstylepainter_wrapper.cpp
+${QtWidgets_GEN_DIR}/qswipegesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qsystemtrayicon_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtabbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtableview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtablewidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtablewidgetitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtablewidgetselectionrange_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtabwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtapandholdgesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtapgesture_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtextbrowser_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtextedit_extraselection_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtextedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtilerules_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtimeedit_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtoolbar_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtoolbox_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtoolbutton_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtooltip_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtreeview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtreewidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtreewidgetitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qtreewidgetitemiterator_wrapper.cpp
+${QtWidgets_GEN_DIR}/qundoview_wrapper.cpp
+${QtWidgets_GEN_DIR}/qvboxlayout_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwhatsthis_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwidget_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwidgetaction_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwidgetitem_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwizard_wrapper.cpp
+${QtWidgets_GEN_DIR}/qwizardpage_wrapper.cpp
+
+${SPECIFIC_OS_FILES}
+# module is always needed
+${QtWidgets_GEN_DIR}/qtwidgets_module_wrapper.cpp
+)
+
+configure_file("${QtWidgets_SOURCE_DIR}/typesystem_widgets.xml.in"
+ "${QtWidgets_BINARY_DIR}/typesystem_widgets.xml" @ONLY)
+
+set(QtWidgets_include_dirs ${QtWidgets_SOURCE_DIR}
+ ${QtWidgets_BINARY_DIR}
+ ${pyside6_SOURCE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_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}
+ )
+set(QtWidgets_deps QtGui)
+
+create_pyside_module(NAME QtWidgets
+ INCLUDE_DIRS QtWidgets_include_dirs
+ LIBRARIES QtWidgets_libraries
+ DEPS QtWidgets_deps
+ TYPESYSTEM_PATH QtWidgets_SOURCE_DIR
+ SOURCES QtWidgets_SRC
+ TYPESYSTEM_NAME ${QtWidgets_BINARY_DIR}/typesystem_widgets.xml)
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml.in b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml.in
new file mode 100644
index 000000000..08020f157
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets.xml.in
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWidgets">
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <load-typesystem name="QtWidgets/typesystem_widgets_@AUTO_OS@.xml" generate="yes"/>
+ <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
new file mode 100644
index 000000000..ee3b36988
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml
@@ -0,0 +1,3326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWidgets">
+ <load-typesystem name="templates/core_common.xml" generate="no"/>
+ <load-typesystem name="templates/widgets_common.xml" generate="no"/>
+
+
+
+ <!-- Qt5: Beware forgetting the following rejection!
+ There are anonymous enums "enum { Type = 1 }" etc. in these QGraphics classes, but they
+ don't show up as "enum_1", but pretend they were a real enum field, not a value.
+
+ """
+ Generating class model... [WARNING]
+ enum 'QGraphicsItem::UserType' does not have a type entry or is not an enum
+ enum 'QGraphicsWidget::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsProxyWidget::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsEllipseItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsPixmapItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsSimpleTextItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsTextItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsItemGroup::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsRectItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsLineItem::Type' does not have a type entry or is not an enum
+ enum 'QGraphicsPathItem::Type' does not have a type entry or is not an enum
+ 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.
+ -->
+
+ <object-type name="QStyleOption" polymorphic-id-expression="%1-&gt;type == QStyleOption::SO_Default">
+ <enum-type name="OptionType"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionGraphicsItem" polymorphic-id-expression="%1-&gt;type == QStyleOptionGraphicsItem::Type &amp;&amp; %1-&gt;version == QStyleOptionGraphicsItem::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionSizeGrip" polymorphic-id-expression="%1-&gt;type == QStyleOptionSizeGrip::Type &amp;&amp; %1-&gt;version == QStyleOptionSizeGrip::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionButton" polymorphic-id-expression="%1-&gt;type == QStyleOptionButton::Type &amp;&amp; %1-&gt;version == QStyleOptionButton::Version">
+ <enum-type name="ButtonFeature" flags="ButtonFeatures"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionComboBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionComboBox::Type &amp;&amp; %1-&gt;version == QStyleOptionComboBox::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionComplex" polymorphic-id-expression="%1-&gt;type == QStyleOptionComplex::Type &amp;&amp; %1-&gt;version == QStyleOptionComplex::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionDockWidget" polymorphic-id-expression="%1-&gt;type == QStyleOptionDockWidget::Type &amp;&amp; %1-&gt;version == QStyleOptionDockWidget::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionFocusRect" polymorphic-id-expression="%1-&gt;type == QStyleOptionFocusRect::Type &amp;&amp; %1-&gt;version == QStyleOptionFocusRect::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionFrame" polymorphic-id-expression="%1-&gt;type == QStyleOptionFrame::Type &amp;&amp; %1-&gt;version == QStyleOptionFrame::Version">
+ <enum-type name="FrameFeature" flags="FrameFeatures"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionGroupBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionGroupBox::Type &amp;&amp; %1-&gt;version == QStyleOptionGroupBox::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionHeader" polymorphic-id-expression="%1-&gt;type == QStyleOptionHeader::Type &amp;&amp; %1-&gt;version == QStyleOptionHeader::Version">
+ <enum-type name="SectionPosition"/>
+ <enum-type name="SelectedPosition"/>
+ <enum-type name="SortIndicator"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionMenuItem" polymorphic-id-expression="%1-&gt;type == QStyleOptionMenuItem::Type &amp;&amp; %1-&gt;version == QStyleOptionMenuItem::Version">
+ <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="%1-&gt;type == QStyleOptionProgressBar::Type &amp;&amp; %1-&gt;version == QStyleOptionProgressBar::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionRubberBand" polymorphic-id-expression="%1-&gt;type == QStyleOptionRubberBand::Type &amp;&amp; %1-&gt;version == QStyleOptionRubberBand::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionSlider" polymorphic-id-expression="%1-&gt;type == QStyleOptionSlider::Type &amp;&amp; %1-&gt;version == QStyleOptionSlider::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionSpinBox" polymorphic-id-expression="%1-&gt;type == QStyleOptionSpinBox::Type &amp;&amp; %1-&gt;version == QStyleOptionSpinBox::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionTab" polymorphic-id-expression="%1-&gt;type == QStyleOptionTab::Type &amp;&amp; %1-&gt;version == QStyleOptionTab::Version">
+ <enum-type name="CornerWidget" flags="CornerWidgets"/>
+ <enum-type name="SelectedPosition"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ <enum-type name="TabFeature" flags="TabFeatures"/>
+ <enum-type name="TabPosition"/>
+ </object-type>
+ <object-type name="QStyleOptionTabBarBase" polymorphic-id-expression="%1-&gt;type == QStyleOptionTabBarBase::Type &amp;&amp; %1-&gt;version == QStyleOptionTabBarBase::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionTabWidgetFrame" polymorphic-id-expression="%1-&gt;type == QStyleOptionTabWidgetFrame::Type &amp;&amp; %1-&gt;version == QStyleOptionTabWidgetFrame::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionTitleBar" polymorphic-id-expression="%1-&gt;type == QStyleOptionTitleBar::Type &amp;&amp; %1-&gt;version == QStyleOptionTitleBar::Version">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleOptionToolBar" polymorphic-id-expression="%1-&gt;type == QStyleOptionToolBar::Type &amp;&amp; %1-&gt;version == QStyleOptionToolBar::Version">
+ <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="%1-&gt;type == QStyleOptionToolBox::Type &amp;&amp; %1-&gt;version == QStyleOptionToolBox::Version">
+ <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="%1-&gt;type == QStyleOptionToolButton::Type &amp;&amp; %1-&gt;version == QStyleOptionToolButton::Version">
+ <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">
+ <enum-type name="Position"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ <enum-type name="ViewItemFeature" flags="ViewItemFeatures"/>
+ <enum-type name="ViewItemPosition"/>
+ </value-type>
+
+ <object-type name="QAccessibleWidget"/>
+ <value-type name="QColormap">
+ <enum-type name="Mode"/>
+ </value-type>
+ <value-type name="QSizePolicy">
+ <enum-type name="ControlType" flags="ControlTypes"/>
+ <enum-type name="Policy"/>
+ <enum-type name="PolicyFlag"/>
+ </value-type>
+ <value-type name="QTableWidgetSelectionRange"/>
+
+ <value-type name="QTreeWidgetItemIterator" >
+ <modify-function signature="QTreeWidgetItemIterator(QTreeWidget*,QFlags&lt;QTreeWidgetItemIterator::IteratorFlag&gt;)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <add-function signature="__iter__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="__iter__"/>
+ </inject-code>
+ </add-function>
+ <add-function signature="__next__()" return-type="PyObject*">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitemiterator-next"/>
+ </add-function>
+
+ <add-function signature="value()" return-type="QTreeWidgetItem*">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qtreewidgetitemiterator-value"/>
+ </add-function>
+ <enum-type name="IteratorFlag" flags="IteratorFlags"/>
+ <!-- ### See bug 778 -->
+ <modify-function signature="operator++(int)" remove="all"/>
+ <modify-function signature="operator--(int)" remove="all"/>
+ <modify-function signature="operator++()" remove="all"/>
+ <modify-function signature="operator--()" remove="all"/>
+ <!-- ### Operator* doesn't make sense in Python. -->
+ <modify-function signature="operator*()const" remove="all"/>
+ <!-- ### -->
+ </value-type>
+
+ <object-type name="QLayoutItem">
+
+ <modify-function signature="widget()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="layout()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="spacerItem()">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QGraphicsItem">
+ <enum-type name="CacheMode"/>
+ <enum-type name="Extension"/>
+ <enum-type name="GraphicsItemChange"/>
+ <enum-type name="GraphicsItemFlag" flags="GraphicsItemFlags"/>
+ <enum-type name="PanelModality" since="4.6"/>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem"/>
+ <modify-function signature="setParentItem(QGraphicsItem*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="scene()const">
+ <inject-code position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-scene-return-parenting"/>
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="parentItem()const">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="parentWidget()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="paint(QPainter*,const QStyleOptionGraphicsItem*,QWidget*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="collidesWithItem(const QGraphicsItem*,Qt::ItemSelectionMode)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="contextMenuEvent(QGraphicsSceneContextMenuEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragEnterEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragLeaveEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragMoveEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dropEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="focusInEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="focusOutEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="hoverEnterEvent(QGraphicsSceneHoverEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="hoverLeaveEvent(QGraphicsSceneHoverEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="hoverMoveEvent(QGraphicsSceneHoverEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="isBlockedByModalPanel(QGraphicsItem**)const" since="4.6">
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, blockingPanel)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-isblockedbymodalpanel"/>
+ </modify-function>
+ <modify-function signature="itemTransform(const QGraphicsItem*,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ <remove-default-expression />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(QTransform, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="isObscuredBy(const QGraphicsItem*)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="keyPressEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="keyReleaseEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseDoubleClickEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseMoveEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mousePressEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseReleaseEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="sceneEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="sceneEventFilter(QGraphicsItem*,QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ <modify-argument index="2" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="wheelEvent(QGraphicsSceneWheelEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="setGraphicsEffect(QGraphicsEffect*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!-- ### These methods are internal on Qt. -->
+ <modify-function signature="supportsExtension(QGraphicsItem::Extension)const" remove="all"/>
+ <modify-function signature="setExtension(QGraphicsItem::Extension,QVariant)" remove="all"/>
+ <!-- ### -->
+ </object-type>
+ <object-type name="QAbstractGraphicsShapeItem"/>
+ <object-type name="QAbstractItemView">
+ <enum-type name="CursorAction"/>
+ <enum-type name="DragDropMode"/>
+ <enum-type name="DropIndicatorPosition"/>
+ <enum-type name="EditTrigger" flags="EditTriggers"/>
+ <enum-type name="ScrollHint"/>
+ <enum-type name="ScrollMode"/>
+ <enum-type name="SelectionBehavior"/>
+ <enum-type name="SelectionMode"/>
+ <enum-type name="State"/>
+ <modify-function signature="setModel(QAbstractItemModel*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setSelectionModel(QItemSelectionModel*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegateForColumn(int,QAbstractItemDelegate*)">
+ <modify-argument index="2">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegateForRow(int,QAbstractItemDelegate*)">
+ <modify-argument index="2">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="model()const">
+ <modify-argument index="return">
+ <!-- Defining ownership as "default" avoids the object to be automatically
+ set as parent of the returned pointer. -->
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="selectionModel()const">
+ <modify-argument index="return">
+ <!-- Defining ownership as "default" avoids the object to be automatically
+ set as parent of the returned pointer. -->
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setIndexWidget(const QModelIndex &amp;,QWidget*)" allow-thread="yes">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="edit(QModelIndex,QAbstractItemView::EditTrigger,QEvent*)">
+ <modify-argument index="3" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="selectionCommand(QModelIndex,const QEvent*)const">
+ <modify-argument index="2" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstractSlider">
+ <enum-type name="SliderAction"/>
+ <enum-type name="SliderChange"/>
+ </object-type>
+ <object-type name="QCheckBox"/>
+ <object-type name="QCommonStyle">
+ </object-type>
+ <object-type name="QDataWidgetMapper">
+ <enum-type name="SubmitPolicy"/>
+ <modify-function signature="addMapping(QWidget*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMapping(QWidget*,int,QByteArray)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeMapping(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setModel(QAbstractItemModel*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QDateEdit"/>
+ <object-type name="QDialog">
+ <enum-type name="DialogCode"/>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QDialogButtonBox">
+ <enum-type name="ButtonLayout"/>
+ <enum-type name="ButtonRole"/>
+ <enum-type name="StandardButton" flags="StandardButtons"/>
+ <modify-function signature="addButton(QAbstractButton*,QDialogButtonBox::ButtonRole)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeButton(QAbstractButton*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QFileIconProvider"/>
+ <object-type name="QWizard">
+ <enum-type name="WizardButton"/>
+ <enum-type name="WizardOption" flags="WizardOptions"/>
+ <enum-type name="WizardPixmap"/>
+ <enum-type name="WizardStyle"/>
+ <modify-function signature="addPage(QWizardPage*)">
+ <modify-argument index="1">
+ <no-null-pointer/>
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setButton(QWizard::WizardButton,QAbstractButton*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QWizardPage">
+ <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"/>
+ </object-type>
+ <object-type name="QFocusFrame">
+ <modify-function signature="setWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QFontComboBox">
+ <enum-type name="FontFilter" flags="FontFilters"/>
+ </object-type>
+ <object-type name="QFontDialog">
+ <enum-type name="FontDialogOption" flags="FontDialogOptions"/>
+ <modify-function signature="getFont(bool*,QWidget*)" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="bool*_fix,arg"/>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getFont(bool*,QFont,QWidget*,QString,QFlags&lt;QFontDialog::FontDialogOption&gt;)" allow-thread="yes">
+ <modify-argument index="1">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyTuple"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="bool*_fix,arg,arg,arg,arg"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsEllipseItem"/>
+ <object-type name="QGraphicsItemAnimation">
+ <modify-function signature="setItem(QGraphicsItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setTimeLine(QTimeLine*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <extra-includes>
+ <include file-name="QPair" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QGraphicsItemGroup">
+ <modify-function signature="addToGroup(QGraphicsItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsLineItem"/>
+ <object-type name="QGraphicsPathItem"/>
+ <object-type name="QGraphicsPixmapItem">
+ <enum-type name="ShapeMode"/>
+ </object-type>
+ <object-type name="QGraphicsPolygonItem"/>
+ <object-type name="QGraphicsRectItem"/>
+ <object-type name="QGraphicsSimpleTextItem"/>
+ <object-type name="QHBoxLayout"/>
+ <object-type name="QHeaderView">
+ <enum-type name="ResizeMode"/>
+ <modify-function signature="paintSection(QPainter*,QRect,int)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QItemDelegate">
+ <!-- ### "doLayout(...)" is an internal method. -->
+ <modify-function signature="doLayout(QStyleOptionViewItem,QRect*,QRect*,QRect*,bool)const" remove="all"/>
+ <!-- ### -->
+ <modify-function signature="drawCheck(QPainter*,QStyleOptionViewItem,QRect,Qt::CheckState)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawDecoration(QPainter*,QStyleOptionViewItem,QRect,QPixmap)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawDisplay(QPainter*,QStyleOptionViewItem,QRect,QString)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawFocus(QPainter*,QStyleOptionViewItem,QRect)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="setItemEditorFactory(QItemEditorFactory*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QItemEditorCreatorBase">
+ <modify-function signature="createWidget(QWidget*)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QItemEditorFactory">
+ <modify-function signature="registerEditor(int,QItemEditorCreatorBase*)">
+ <modify-argument index="2">
+ <reference-count action="set"/>
+ </modify-argument>
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qitemeditorfactory-registereditor"/>
+ </modify-function>
+ <modify-function signature="setDefaultFactory(QItemEditorFactory*)">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qitemeditorfactory-setdefaultfactory"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QListView">
+ <enum-type name="Flow"/>
+ <enum-type name="LayoutMode"/>
+ <enum-type name="Movement"/>
+ <enum-type name="ResizeMode"/>
+ <enum-type name="ViewMode"/>
+ </object-type>
+ <object-type name="QColumnView">
+ <modify-function signature="setPreviewWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QMainWindow">
+ <enum-type name="DockOption" flags="DockOptions"/>
+ <modify-function signature="setCentralWidget(QWidget*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="replace_child">
+ <replace from="$FUNCTION_GET_OLD" to="centralWidget"/>
+ <replace from="$CHILD_TYPE" to="QWidget"/>
+ <replace from="$PYARG" to="%PYARG_1"/>
+ <replace from="$CPPARG" to="%1"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="setMenuBar(QMenuBar*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="replace_child">
+ <replace from="$FUNCTION_GET_OLD" to="menuBar"/>
+ <replace from="$CHILD_TYPE" to="QMenuBar"/>
+ <replace from="$PYARG" to="%PYARG_1"/>
+ <replace from="$CPPARG" to="%1"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="setMenuWidget(QWidget*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="replace_child">
+ <replace from="$FUNCTION_GET_OLD" to="menuWidget"/>
+ <replace from="$CHILD_TYPE" to="QWidget"/>
+ <replace from="$PYARG" to="%PYARG_1"/>
+ <replace from="$CPPARG" to="%1"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="setStatusBar(QStatusBar*)">
+ <inject-code class="target" position="beginning">
+ <insert-template name="replace_child">
+ <replace from="$FUNCTION_GET_OLD" to="statusBar"/>
+ <replace from="$CHILD_TYPE" to="QStatusBar"/>
+ <replace from="$PYARG" to="%PYARG_1"/>
+ <replace from="$CPPARG" to="%1"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <modify-function signature="addDockWidget(Qt::DockWidgetArea,QDockWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addDockWidget(Qt::DockWidgetArea,QDockWidget*,Qt::Orientation)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!-- this fuction is declared when not defined QT_NO_TOOLBA -->
+ <modify-function signature="addToolBar(Qt::ToolBarArea,QToolBar*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addToolBar(QToolBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addToolBar(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!--- END QT_NO_TOOLBAR -->
+ <modify-function signature="removeDockWidget(QDockWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeToolBar(QToolBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeDockWidget(QDockWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ </object-type>
+ <object-type name="QMdiArea">
+ <enum-type name="AreaOption" flags="AreaOptions"/>
+ <enum-type name="ViewMode"/>
+ <enum-type name="WindowOrder"/>
+ <modify-function signature="addSubWindow(QWidget*,QFlags&lt;Qt::WindowType&gt;)" >
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeSubWindow(QWidget*)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QMdiSubWindow">
+ <enum-type name="SubWindowOption" flags="SubWindowOptions"/>
+ <modify-function signature="setWidget(QWidget*)" allow-thread="yes">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setSystemMenu(QMenu*)" allow-thread="yes">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QMenu">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-glue"/>
+
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="exec(const QPoint&amp;,QAction*)" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="exec(QList&lt;QAction*>,const QPoint&amp;,QAction*,QWidget*)" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="addAction(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMenu(QMenu*)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMenu(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertMenu(QAction*,QMenu*)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMenu(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addMenu(const QIcon &amp;,const QString &amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!-- ### "setNoReplayFor(QWidget*)" is an internal method. -->
+ <modify-function signature="setNoReplayFor(QWidget*)" remove="all"/>
+
+ <add-function signature="addAction(QString&amp;,PyObject*,QKeySequence&amp;)">
+ <modify-argument index="3">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-1"/>
+ </add-function>
+
+ <add-function signature="addAction(QIcon&amp;,QString&amp;,PyObject*,QKeySequence&amp;)">
+ <modify-argument index="4">
+ <replace-default-expression with="0"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-2"/>
+ </add-function>
+
+ <add-function signature="addAction(QAction*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenu-addaction-3"/>
+ </add-function>
+
+ <modify-function signature="clear()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qmenu-clear"/>
+ </modify-function>
+
+ </object-type>
+
+ <object-type name="QMenuBar">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-glue"/>
+ <modify-function signature="addAction(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addAction(QString,const QObject*,const char*)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <add-function signature="addAction(const QString&amp;,PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-addaction-1"/>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </add-function>
+ <modify-function signature="addMenu(QMenu*)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addSeparator()">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertMenu(QAction*,QMenu*)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertSeparator(QAction*)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="clear()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qmenubar-clear"/>
+ </modify-function>
+
+ <add-function signature="addAction(QAction*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qmenubar-addaction-2"/>
+ </add-function>
+
+ </object-type>
+ <object-type name="QProgressBar">
+ <enum-type name="Direction"/>
+ </object-type>
+ <object-type name="QProxyStyle">
+ <modify-function signature="QProxyStyle(QStyle*)">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QPushButton"/>
+ <object-type name="QScrollArea">
+ <modify-function signature="setWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QSpacerItem"/>
+ <object-type name="QStatusBar">
+ <modify-function signature="addWidget(QWidget*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addPermanentWidget(QWidget*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertWidget(int,QWidget*,int)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertPermanentWidget(int,QWidget*,int)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QStyleFactory">
+ <modify-function signature="create(const QString&amp;)">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QStyleHintReturn">
+ <enum-type name="HintReturnType"/>
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleHintReturnVariant">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStyleHintReturnMask">
+ <enum-type name="StyleOptionType"/>
+ <enum-type name="StyleOptionVersion"/>
+ </object-type>
+ <object-type name="QStylePainter"/>
+ <object-type name="QTableView">
+ <modify-function signature="setHorizontalHeader(QHeaderView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setVerticalHeader(QHeaderView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QTimeEdit"/>
+ <object-type name="QToolBox">
+ <modify-function signature="addItem(QWidget*,const QIcon&amp;,const QString&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addItem(QWidget*,const QString&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItem(int,QWidget*,const QIcon&amp;,const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItem(int,QWidget*,const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeItem(int)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtoolbox-removeitem"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QToolButton">
+ <enum-type name="ToolButtonPopupMode"/>
+ <modify-function signature="setDefaultAction(QAction*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setMenu(QMenu*)">
+ </modify-function>
+ </object-type>
+ <object-type name="QToolTip"/>
+ <object-type name="QTreeView">
+ <modify-function signature="drawBranches(QPainter*,QRect,QModelIndex)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawRow(QPainter*,QStyleOptionViewItem,QModelIndex)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="setHeader(QHeaderView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QUndoView">
+ <modify-function signature="setGroup(QUndoGroup*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setStack(QUndoStack*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QUndoView(QUndoGroup*,QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QUndoView(QUndoStack*,QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QVBoxLayout"/>
+
+ <object-type name="QWhatsThis"/>
+ <object-type name="QWidgetAction">
+ <modify-function signature="setDefaultWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="releaseWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QWidgetItem" polymorphic-id-expression="%1-&gt;widget()"/>
+
+ <object-type name="QGraphicsSceneContextMenuEvent" copyable="false" polymorphic-id-expression="%1-&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" >
+ <!-- ### "setMimeData(const QMimeData*)" is an internal method. -->
+ <modify-function signature="setMimeData(const QMimeData*)" remove="all"/>
+ <!-- ### "setSource(QWidget*)" is an internal method. -->
+ <modify-function signature="setSource(QWidget*)" remove="all"/>
+ <!-- ### -->
+ </object-type>
+ <object-type name="QGraphicsSceneEvent" copyable="false">
+ <!-- ### "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">
+ <modify-function signature="activeGestures()const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="canceledGestures()const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="gestures()const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="gesture(Qt::GestureType)const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="widget()const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QAbstractButton"/>
+ <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="RequestSoftwareInputPanel" since="4.6"/>
+ <enum-type name="StandardPixmap"/>
+ <enum-type name="StateFlag" flags="State"/>
+ <enum-type name="StyleHint"/>
+ <enum-type name="SubControl" flags="SubControls"/>
+ <enum-type name="SubElement"/>
+ <modify-function signature="drawComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,QPainter*,const QWidget*)const">
+ <modify-argument index="3" invalidate-after-use="yes"/>
+ <modify-argument index="4">
+ <replace-default-expression with="0"/>
+ <rename to="widget"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="drawControl(QStyle::ControlElement,const QStyleOption*,QPainter*,const QWidget*)const">
+ <modify-argument index="3" invalidate-after-use="yes"/>
+ <modify-argument index="4">
+ <replace-default-expression with="0"/>
+ <rename to="widget"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="drawPrimitive(QStyle::PrimitiveElement,const QStyleOption*,QPainter*,const QWidget*)const">
+ <modify-argument index="3" invalidate-after-use="yes"/>
+ <modify-argument index="4">
+ <replace-default-expression with="0"/>
+ <rename to="widget"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="hitTestComplexControl(QStyle::ComplexControl,const QStyleOptionComplex*,const QPoint&amp;,const QWidget*)const">
+ <modify-argument index="4">
+ <replace-default-expression with="0"/>
+ <rename to="widget"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="styleHint(QStyle::StyleHint,const QStyleOption*,const QWidget*,QStyleHintReturn*)const">
+ <modify-argument index="4" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawItemPixmap(QPainter*,QRect,int,QPixmap)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawItemText(QPainter*,QRect,int,QPalette,bool,QString,QPalette::ColorRole)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QColorDialog">
+ <enum-type name="ColorDialogOption" flags="ColorDialogOptions"/>
+ <modify-function signature="getColor(const QColor&amp;,QWidget*,const QString&amp;,QFlags&lt;QColorDialog::ColorDialogOption>)" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QLayout">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
+ <enum-type name="SizeConstraint"/>
+
+ <modify-function signature="itemAt(int)const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
+ </modify-function>
+
+ <modify-function signature="removeWidget(QWidget*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="removeownership-1"/>
+ </modify-function>
+ <modify-function signature="removeItem(QLayoutItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="removeownership-1"/>
+ </modify-function>
+
+ <modify-function signature="parentWidget()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="takeAt(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addItem(QLayoutItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+
+ <modify-function signature="addWidget(QWidget*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addChildWidget(QWidget*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addChildLayout(QLayout*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="setMenuBar(QWidget*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+
+ <modify-function signature="getContentsMargins(int*,int*,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ <inject-code class="native" position="end">
+ <insert-template name="fix_native_return_number*,number*,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+
+ <add-function signature="setAlignment(QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-setalignment"/>
+ </add-function>
+
+ </object-type>
+
+ <object-type name="QStackedLayout">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
+ <enum-type name="StackingMode"/>
+ <modify-function signature="insertWidget(int,QWidget*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
+ </modify-function>
+ <modify-function signature="addWidget(QWidget*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QBoxLayout">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
+
+ <enum-type name="Direction"/>
+
+ <modify-function signature="addWidget(QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+
+ <modify-function signature="addLayout(QLayout*,int)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+
+ <modify-function signature="insertWidget(int,QWidget*,int,QFlags&lt;Qt::AlignmentFlag&gt;)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
+ </modify-function>
+ <modify-function signature="insertLayout(int,QLayout*,int)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
+ </modify-function>
+ <modify-function signature="insertItem(int,QLayoutItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
+ </modify-function>
+ <modify-function signature="addSpacerItem(QSpacerItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="insertSpacerItem(int,QSpacerItem*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-2"/>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QGridLayout">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
+ <modify-function signature="itemAtPosition (int,int)const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
+ </modify-function>
+ <modify-function signature="addWidget(QWidget*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="4">
+ <rename to="alignment"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addWidget(QWidget*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="6">
+ <rename to="alignment"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addLayout(QLayout*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="4">
+ <rename to="alignment"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addLayout(QLayout*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="6">
+ <rename to="alignment"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="addItem(QLayoutItem*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="4">
+ <rename to="rowSpan"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <rename to="columnSpan"/>
+ </modify-argument>
+ <modify-argument index="6">
+ <rename to="alignment"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="addownership-1"/>
+ </modify-function>
+ <modify-function signature="getItemPosition(int,int*,int*,int*,int*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject*"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qgridlayout-getitemposition"/>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QGraphicsView">
+ <extra-includes>
+ <include file-name="QPainterPath" location="global"/>
+ <include file-name="QVarLengthArray" location="global"/>
+ </extra-includes>
+ <enum-type name="CacheModeFlag" flags="CacheMode"/>
+ <enum-type name="DragMode"/>
+ <enum-type name="OptimizationFlag" flags="OptimizationFlags"/>
+ <enum-type name="ViewportAnchor"/>
+ <enum-type name="ViewportUpdateMode"/>
+ <modify-function signature="setScene(QGraphicsScene*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="scene()const">
+ <inject-code position="end" file="../glue/qtwidgets.cpp" snippet="qgraphicsitem-scene-return-parenting"/>
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="itemAt(int,int)const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="itemAt(QPoint)const">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="drawBackground(QPainter*,QRectF)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawForeground(QPainter*,QRectF)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+
+ <!-- TODO: Support conversions on virtual function -->
+ <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[])">
+ <modify-argument index="2">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="pysequencesize_int"/>
+ </conversion-rule>
+ </modify-argument>
+
+ <modify-argument index="3">
+ <replace-type modified-type="PySequence"/>
+ <conversion-rule class="native">
+ <insert-template name="qgraphicsitem_pysequence"/>
+ </conversion-rule>
+
+ <conversion-rule class="target">
+ <insert-template name="qgraphicsitem_pyobject"/>
+ </conversion-rule>
+ </modify-argument>
+
+ <modify-argument index="4">
+ <replace-type modified-type="PySequence"/>
+ <conversion-rule class="target">
+ <insert-template name="qstyleoptiongraphicsitem_pyobject"/>
+ </conversion-rule>
+
+ <conversion-rule class="native">
+ <insert-template name="pysequence_qstyleoptiongraphicsitem"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QInputDialog">
+ <enum-type name="InputDialogOption"/>
+ <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="8">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg"/>
+ </inject-code>
+ </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="7">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg"/>
+ </inject-code>
+ </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="5">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,arg,arg,arg,bool*,arg,arg"/>
+ </inject-code>
+ </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="6">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,arg,arg,arg,arg,bool*,arg"/>
+ </inject-code>
+ </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="8">
+ <remove-default-expression/>
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg,arg"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QGraphicsScene">
+ <extra-includes>
+ <include file-name="QVarLengthArray" location="global"/>
+ </extra-includes>
+ <enum-type name="ItemIndexMethod"/>
+ <enum-type name="SceneLayer" flags="SceneLayers"/>
+
+ <!-- Qt5: note: this was called 'obsolete'. Is that true? -->
+ <modify-function signature="drawItems(QPainter*,int,QGraphicsItem*[],const QStyleOptionGraphicsItem[],QWidget*)" remove="all"/>
+
+ <modify-function signature="createItemGroup(const QList&lt;QGraphicsItem*&gt;&amp;)">
+ <modify-argument index="1">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="destroyItemGroup(QGraphicsItemGroup*)">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-destroyitemgroup"/>
+ </modify-function>
+
+ <modify-function signature="contextMenuEvent(QGraphicsSceneContextMenuEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragEnterEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragLeaveEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dragMoveEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawBackground(QPainter*,QRectF)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="drawForeground(QPainter*,QRectF)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="dropEvent(QGraphicsSceneDragDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="focusInEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="focusOutEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="helpEvent(QGraphicsSceneHelpEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="keyPressEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="keyReleaseEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseDoubleClickEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseMoveEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mousePressEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="mouseReleaseEvent(QGraphicsSceneMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="wheelEvent(QGraphicsSceneWheelEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="addItem(QGraphicsItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addEllipse(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addEllipse(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addLine(const QLineF&amp;,const QPen&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addLine(qreal,qreal,qreal,qreal,const QPen&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addPath(const QPainterPath&amp;,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addPixmap(const QPixmap&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addPolygon(const QPolygonF&amp;,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRect(const QRectF&amp;,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRect(qreal,qreal,qreal,qreal,const QPen&amp;,const QBrush&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addText(const QString&amp;,const QFont&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addSimpleText(const QString&amp;,const QFont&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="addWidget(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
+ <!-- TODO: Add a keeper attribute to reference-count tag to do what this inject code do. -->
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-addwidget"/>
+ </modify-function>
+
+ <modify-function signature="clear()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsscene-clear"/>
+ </modify-function>
+
+ <modify-function signature="removeItem(QGraphicsItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setFocusItem(QGraphicsItem*,Qt::FocusReason)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QCalendarWidget">
+ <enum-type name="HorizontalHeaderFormat"/>
+ <enum-type name="SelectionMode"/>
+ <enum-type name="VerticalHeaderFormat"/>
+ <extra-includes>
+ <include file-name="QTextCharFormat" location="global"/>
+ </extra-includes>
+ <modify-function signature="paintCell(QPainter*,QRect,QDate)const">
+ <modify-argument invalidate-after-use="yes" index="1"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QTreeWidget">
+ <modify-function signature="mimeData(const QList&lt;QTreeWidgetItem*&gt;&amp;)const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemWidget(QTreeWidgetItem*,int,QWidget*)" allow-thread="yes">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="dropMimeData(QTreeWidgetItem*,int,const QMimeData*,Qt::DropAction)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="addTopLevelItem(QTreeWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addTopLevelItems(const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addTopLevelItem(QTreeWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTopLevelItem(int,QTreeWidgetItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTopLevelItems(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setHeaderItem(QTreeWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeTopLevelItem(int)">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="clear()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qtreewidget-clear"/>
+ </modify-function>
+ <modify-function signature="removeItemWidget(QTreeWidgetItem*,int)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QAbstractItemDelegate">
+ <enum-type name="EndEditHint"/>
+ <modify-function signature="paint(QPainter*,QStyleOptionViewItem,QModelIndex)const">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="editorEvent(QEvent*,QAbstractItemModel*,QStyleOptionViewItem,QModelIndex)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="createEditor(QWidget*,QStyleOptionViewItem,QModelIndex)const">
+ <modify-argument index="1">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QTableWidgetItem" >
+ <enum-type name="ItemType"/>
+ <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QListWidgetItem" >
+ <enum-type name="ItemType"/>
+ <modify-function signature="QListWidgetItem(const QString&amp;,QListWidget*,int)">
+ <modify-argument index="this">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QListWidgetItem(const QIcon&amp;,const QString&amp;,QListWidget*,int)">
+ <modify-argument index="this">
+ <parent index="3" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QListWidgetItem(QListWidget*,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="listWidget()const">
+ <modify-argument index="return">
+ <define-ownership owner="target"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsTextItem">
+ <!-- a QObject so main-thread delete redundant -->
+ <extra-includes>
+ <include file-name="QTextCursor" location="global"/>
+ </extra-includes>
+ <modify-function signature="setDocument(QTextDocument*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QCompleter">
+ <enum-type name="CompletionMode"/>
+ <enum-type name="ModelSorting"/>
+ <modify-function signature="setModel(QAbstractItemModel*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setPopup(QAbstractItemView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setWidget(QWidget*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QTreeWidgetItem" hash-function="qHash">
+ <enum-type name="ChildIndicatorPolicy"/>
+ <enum-type name="ItemType"/>
+ <modify-function signature="read(QDataStream&amp;)" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="write(QDataStream&amp;)const" allow-thread="yes">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,const QStringList&amp;,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidget*,QTreeWidgetItem*,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,const QStringList &amp;,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="QTreeWidgetItem(QTreeWidgetItem*,QTreeWidgetItem*,int)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addChild(QTreeWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addChildren(const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertChild(int,QTreeWidgetItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertChildren(int,const QList&lt;QTreeWidgetItem*&gt; &amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeChild(QTreeWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeChild(int)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeChildren()">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="parent()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitem"/>
+ </modify-function>
+ <modify-function signature="treeWidget()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qtreewidgetitem"/>
+ </modify-function>
+
+ </object-type>
+ <object-type name="QListWidget">
+ <modify-function signature="mimeData(const QList&lt;QListWidgetItem*&gt;&amp;)const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemWidget(QListWidgetItem*,QWidget*)" allow-thread="yes">
+ <modify-argument index="2">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addItem(QListWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItem(int,QListWidgetItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeItem(int)">
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="clear()">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlistwidget-clear"/>
+ </modify-function>
+ <modify-function signature="removeItemWidget(QListWidgetItem*)" allow-thread="yes"/>
+ </object-type>
+
+ <object-type name="QWidget" delete-in-main-thread="true">
+ <!-- see QWindow::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
+ <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion_variables"/>
+ </conversion-rule>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ <conversion-rule class="native">
+ <insert-template name="return_native_eventfilter_conversion"/>
+ </conversion-rule>
+ </modify-argument>
+ <inject-code position="end">
+ <insert-template name="return_native_eventfilter"/>
+ </inject-code>
+ </modify-function>
+
+ <extra-includes>
+ <include file-name="QIcon" location="global"/>
+ <include file-name="QMessageBox" location="global"/>
+ </extra-includes>
+
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-glue"/>
+
+ <enum-type name="RenderFlag" flags="RenderFlags"/>
+
+ <modify-function signature="setParent(QWidget*)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType&gt;)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="parentWidget()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="actionEvent(QActionEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="changeEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="closeEvent(QCloseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="contextMenuEvent(QContextMenuEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="dragEnterEvent(QDragEnterEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="dragLeaveEvent(QDragLeaveEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="dragMoveEvent(QDragMoveEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="dropEvent(QDropEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="enterEvent(QEnterEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="focusInEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="focusOutEvent(QFocusEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="hideEvent(QHideEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="inputMethodEvent(QInputMethodEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="keyPressEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="keyReleaseEvent(QKeyEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="leaveEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="mouseDoubleClickEvent(QMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="mouseMoveEvent(QMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="mousePressEvent(QMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="mouseReleaseEvent(QMouseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="moveEvent(QMoveEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="paintEvent(QPaintEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="resizeEvent(QResizeEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="showEvent(QShowEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="tabletEvent(QTabletEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="wheelEvent(QWheelEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes">
+ <rename to="event"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setStyle(QStyle*)">
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qwidget-setstyle"/>
+ </modify-function>
+ <modify-function signature="style()const">
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qwidget-style"/>
+ <modify-argument index="return">
+ <define-ownership owner="default"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="render(QPainter*,QPoint,QRegion,QFlags&lt;QWidget::RenderFlag&gt;)">
+ <modify-argument index="2">
+ <!-- Removed because the render(QPainter*) overload conflicts with the identical function in QGraphicsView -->
+ <remove-default-expression/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setFocusProxy(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="insertAction(QAction*,QAction*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="setLayout(QLayout*)" allow-thread="yes">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qwidget-setlayout"/>
+ </modify-function>
+ <modify-function signature="raise()" rename="raise_"/>
+ <modify-function signature="setParent(QWidget*,QFlags&lt;Qt::WindowType>)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="window()const">
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QMessageBox">
+ <enum-type name="ButtonRole"/>
+ <enum-type name="Icon"/>
+ <enum-type name="StandardButton" flags="StandardButtons"/>
+ <modify-function signature="removeButton(QAbstractButton*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <extra-includes>
+ <include file-name="QPixmap" location="global"/>
+ </extra-includes>
+
+ <modify-function signature="critical(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;,QFlags&lt;QMessageBox::StandardButton&gt;,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="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,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"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
+ <modify-function signature="about(QWidget*,const QString&amp;,const QString&amp;)" allow-thread="yes"/>
+ <modify-function signature="aboutQt(QWidget*,const QString&amp;)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QAbstractSpinBox">
+ <enum-type name="ButtonSymbols"/>
+ <enum-type name="CorrectionMode"/>
+ <enum-type name="StepEnabledFlag" flags="StepEnabled"/>
+ <enum-type name="StepType" since="5.12"/>
+ <modify-function signature="setLineEdit(QLineEdit*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="fixup(QString &amp;)const">
+ <modify-argument index="return">
+ <replace-type modified-type="QString"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="qstring-return"/>
+ </modify-function>
+ <modify-function signature="validate(QString &amp;,int &amp;)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ <conversion-rule class="native">
+ <insert-template name="validator_conversionrule"/>
+ </conversion-rule>
+ </modify-argument>
+ <inject-code class="target" position="end">
+ <insert-template name="return_tuple_QValidator_QString_int"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QTabWidget">
+ <enum-type name="TabPosition"/>
+ <enum-type name="TabShape"/>
+ <modify-function signature="addTab(QWidget*,const QString&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addTab(QWidget*,const QIcon&amp;,const QString&amp;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTab(int,QWidget*,const QIcon&amp;,const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertTab(int,QWidget*,const QString&amp;)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCornerWidget(QWidget*,Qt::Corner)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setTabBar(QTabBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <!-- This function need be re-implemented in inject code -->
+ <modify-function signature="removeTab(int)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtabwidget-removetab"/>
+ </modify-function>
+ <modify-function signature="clear()">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtabwidget-clear"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QDateTimeEdit">
+ <enum-type name="Section" flags="Sections"/>
+ <modify-function signature="setCalendarWidget(QCalendarWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSlider">
+ <enum-type name="TickPosition"/>
+ </object-type>
+ <object-type name="QProgressDialog">
+ <modify-function signature="setBar(QProgressBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setLabel(QLabel*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCancelButton(QPushButton*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QLabel">
+ <modify-function signature="setBuddy(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="pixmap(Qt::ReturnByValueConstant)const" remove="all"/>
+ <modify-function signature="picture(Qt::ReturnByValueConstant)const" remove="all"/>
+ <modify-function signature="setMovie(QMovie *)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QFileDialog">
+ <enum-type name="AcceptMode"/>
+ <enum-type name="DialogLabel"/>
+ <enum-type name="FileMode"/>
+ <enum-type name="Option" flags="Options"/>
+ <enum-type name="ViewMode"/>
+ <extra-includes>
+ <include file-name="QUrl" location="global"/>
+ <include file-name="QAbstractProxyModel" location="global"/>
+ </extra-includes>
+ <modify-function signature="setIconProvider(QAbstractFileIconProvider*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+
+ <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">
+ <replace-type modified-type="(fileName, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <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">
+ <replace-type modified-type="(fileNames, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
+ </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">
+ <replace-type modified-type="(fileName, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
+ </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">
+ <replace-type modified-type="(fileName, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
+ </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">
+ <replace-type modified-type="(fileName, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
+ </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">
+ <replace-type modified-type="(fileName, selectedFilter)"/>
+ </modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qfiledialog-return" />
+ </modify-function>
+
+ </object-type>
+
+ <object-type name="QErrorMessage"/>
+ <object-type name="QTabBar">
+ <extra-includes>
+ <include file-name="QIcon" location="global"/>
+ </extra-includes>
+ <enum-type name="Shape"/>
+ <enum-type name="SelectionBehavior"/>
+ <enum-type name="ButtonPosition"/>
+ </object-type>
+ <object-type name="QRadioButton"/>
+ <object-type name="QScrollBar"/>
+ <object-type name="QAbstractScrollArea">
+ <enum-type name="SizeAdjustPolicy"/>
+ <modify-function signature="setViewport(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addScrollBarWidget(QWidget*,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCornerWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setHorizontalScrollBar(QScrollBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setVerticalScrollBar(QScrollBar*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setViewport(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setupViewport(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="viewportEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QRubberBand">
+ <enum-type name="Shape"/>
+ <modify-function signature="QRubberBand(QRubberBand::Shape,QWidget*)">
+ <modify-argument index="this">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <rename to="parent"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QTableWidget">
+ <modify-function signature="mimeData(const QList&lt;QTableWidgetItem*&gt;&amp;)const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setHorizontalHeaderItem(int,QTableWidgetItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItem(int,int,QTableWidgetItem*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeHorizontalHeaderItem(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeVerticalHeaderItem(int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="takeItem(int,int)">
+ <modify-argument index="return">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemPrototype(const QTableWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setVerticalHeaderItem(int,QTableWidgetItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCellWidget(int,int,QWidget*)" allow-thread="yes">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeCellWidget(int,int)" allow-thread="yes"/>
+ <modify-function signature="setCurrentItem(QTableWidgetItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCurrentItem(QTableWidgetItem*,QFlags&lt;QItemSelectionModel::SelectionFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSplitter">
+ <modify-function signature="getRange(int,int*,int*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,number*,number*">
+ <replace from="$TYPE" to="int"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="addWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertWidget(int,QWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGroupBox">
+ <modify-function signature="clicked(bool)" allow-thread="yes"/>
+ </object-type>
+ <object-type name="QStackedWidget">
+ <modify-function signature="addWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertWidget(int,QWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setCurrentWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSplitterHandle"/>
+ <object-type name="QDial"/>
+ <object-type name="QKeySequenceEdit"/>
+ <object-type name="QLineEdit">
+ <enum-type name="ActionPosition"/>
+ <enum-type name="EchoMode"/>
+ <modify-function signature="setCompleter(QCompleter*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setValidator(const QValidator*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="del()" rename="del_"/>
+
+ <add-function signature="addAction(QAction*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlineedit-addaction"/>
+ </add-function>
+
+ </object-type>
+ <object-type name="QLCDNumber">
+ <enum-type name="Mode"/>
+ <enum-type name="SegmentStyle"/>
+ </object-type>
+ <object-type name="QSplashScreen">
+ <!-- Override QWidget.painter -->
+ <modify-function signature="repaint()" remove="all"/>
+ <modify-function signature="drawContents(QPainter*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QDockWidget">
+ <enum-type name="DockWidgetFeature" flags="DockWidgetFeatures"/>
+ <modify-function signature="setTitleBarWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QFrame">
+ <enum-type name="Shadow"/>
+ <enum-type name="Shape"/>
+ <enum-type name="StyleMask"/>
+ </object-type>
+ <object-type name="QSpinBox">
+ <modify-function signature="valueChanged(int)">
+ <inject-documentation mode="append" format="target">
+::
+
+ def callback_int(value_as_int):
+ print 'int value changed:', repr(value_as_int)
+
+ app = QApplication(sys.argv)
+ spinbox = QSpinBox()
+ spinbox.valueChanged[unicode].connect(callback_unicode)
+ spinbox.show()
+ sys.exit(app.exec_())
+ </inject-documentation>
+ </modify-function>
+ <modify-function signature="textChanged(QString)">
+ <inject-documentation mode="append" format="target">
+::
+
+ def callback_unicode(value_as_unicode):
+ print 'unicode value changed:', repr(value_as_unicode)
+
+ app = QApplication(sys.argv)
+ spinbox = QSpinBox()
+ spinbox.valueChanged[unicode].connect(callback_unicode)
+ spinbox.show()
+ sys.exit(app.exec_())
+ </inject-documentation>
+ </modify-function>
+ </object-type>
+ <object-type name="QTextBrowser"/>
+ <object-type name="QDoubleSpinBox"/>
+ <object-type name="QButtonGroup">
+ <modify-function signature="addButton(QAbstractButton*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ <no-null-pointer/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeButton(QAbstractButton*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ <no-null-pointer/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setId(QAbstractButton*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QToolBar">
+ <modify-function signature="addAction(QIcon,QString,const QObject*,const char*)">
+ <modify-argument index="3">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-1"/>
+ </modify-function>
+ <modify-function signature="addAction(QString,const QObject*,const char*)">
+ <modify-argument index="2">
+ <replace-type modified-type="PyObject"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-2"/>
+ </modify-function>
+ <modify-function signature="addAction(const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addAction(const QIcon&amp;,const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <add-function signature="addAction(QAction*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qtoolbar-addaction-3"/>
+ </add-function>
+ <modify-function signature="addSeparator()">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addWidget(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertWidget(QAction*,QWidget*)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertSeparator(QAction*)">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="clear()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qtoolbar-clear"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QComboBox">
+ <enum-type name="InsertPolicy"/>
+ <enum-type name="SizeAdjustPolicy"/>
+ <modify-function signature="setCompleter(QCompleter*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setValidator(const QValidator*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegate(QAbstractItemDelegate*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ <no-null-pointer/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setView(QAbstractItemView*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setLineEdit(QLineEdit*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setModel(QAbstractItemModel*)">
+ <modify-argument index="1">
+ <no-null-pointer/>
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QTextEdit">
+ <enum-type name="AutoFormattingFlag" flags="AutoFormatting"/>
+ <enum-type name="LineWrapMode"/>
+ <value-type name="ExtraSelection" >
+ <include file-name="QTextEdit" location="global"/>
+ </value-type>
+ <extra-includes>
+ <include file-name="QTextCursor" location="global"/>
+ </extra-includes>
+ <modify-function signature="createMimeDataFromSelection() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setDocument(QTextDocument*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertFromMimeData(const QMimeData*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
+ </object-type>
+
+ <object-type name="QApplication">
+ <extra-includes>
+ <include file-name="QBasicTimer" location="global"/>
+ <include file-name="QFont" location="global"/>
+ <include file-name="QFontMetrics" location="global"/>
+ <include file-name="QPalette" location="global"/>
+ <include file-name="QIcon" location="global"/>
+ <include file-name="QLocale" location="global"/>
+ <include file-name="QStyle" location="global"/>
+ </extra-includes>
+ <modify-function signature="QApplication(int&amp;,char**,int)" access="private"/>
+ <add-function signature="QApplication(QStringList)">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qapplication-1"/>
+ </add-function>
+ <add-function signature="QApplication()">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qapplication-2"/>
+ </add-function>
+ <modify-function signature="setStyle(QStyle*)">
+ <inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="qapplication-setStyle"/>
+ </modify-function>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes"/>
+ <modify-function signature="notify(QObject*,QEvent*)" allow-thread="yes"/>
+ <modify-function signature="alert(QWidget*,int)" allow-thread="yes"/>
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qapplication-init"/>
+ </object-type>
+
+ <object-type name="QCommandLinkButton"/>
+ <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"/>
+ <modify-function signature="setIconProvider(QAbstractFileIconProvider*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QFormLayout">
+ <inject-code class="native" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlayout-help-functions"/>
+
+ <enum-type name="FieldGrowthPolicy"/>
+ <enum-type name="ItemRole"/>
+ <enum-type name="RowWrapPolicy"/>
+
+
+ <modify-function signature="getLayoutPosition(QLayout*,int*,QFormLayout::ItemRole*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
+ </modify-function>
+ <modify-function signature="getWidgetPosition(QWidget*,int*,QFormLayout::ItemRole*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
+ </modify-function>
+ <modify-function signature="getItemPosition(int,int*,QFormLayout::ItemRole*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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/qtwidgets.cpp" snippet="qformlayout-fix-args" />
+ </modify-function>
+
+ <modify-function signature="addRow(QWidget*,QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QLayout*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QWidget*,QLayout*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QString,QLayout*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addRow(QString,QWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QLayout*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QWidget*,QLayout*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QWidget*,QWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QWidget*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QString,QLayout*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertRow(int,QString,QWidget*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setLayout(int,QFormLayout::ItemRole,QLayout*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setWidget(int,QFormLayout::ItemRole,QWidget*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItem(int,QFormLayout::ItemRole,QLayoutItem*)">
+ <modify-argument index="3">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsGridLayout" >
+ <modify-function signature="addItem(QGraphicsLayoutItem*,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="addItem(QGraphicsLayoutItem*,int,int,int,int,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAlignment(QGraphicsLayoutItem*,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsLayout">
+ <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ <inject-code class="native" position="end">
+ <insert-template name="fix_native_return_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="widgetEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsLayoutItem" copyable="false">
+ <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ <inject-code class="native" position="end">
+ <insert-template name="fix_native_return_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="setParentLayoutItem(QGraphicsLayoutItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsLinearLayout" >
+ <modify-function signature="addItem(QGraphicsLayoutItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertItem(int,QGraphicsLayoutItem*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="removeItem(QGraphicsLayoutItem*)">
+ <modify-argument index="1">
+ <parent index="this" action="remove"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setAlignment(QGraphicsLayoutItem*,QFlags&lt;Qt::AlignmentFlag&gt;)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setStretchFactor(QGraphicsLayoutItem*,int)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QGraphicsProxyWidget">
+ <modify-function signature="QGraphicsProxyWidget(QGraphicsItem*,QFlags&lt;Qt::WindowType&gt;)">
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="createProxyForChildWidget(QWidget*)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="newProxyWidget(const QWidget*)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setWidget(QWidget*)" allow-thread="yes">
+ <inject-code file="../glue/qtwidgets.cpp" snippet="qgraphicsproxywidget-setwidget"/>
+ </modify-function>
+ </object-type>
+ <!-- a QObject so main-thread delete redundant -->
+ <object-type name="QGraphicsWidget">
+ <modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="getWindowFrameMargins(qreal*,qreal*,qreal*,qreal*)const">
+ <modify-argument index="return">
+ <replace-type modified-type="PyObject"/>
+ </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>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*">
+ <replace from="$TYPE" to="qreal"/>
+ </insert-template>
+ </inject-code>
+ </modify-function>
+ <modify-function signature="setLayout(QGraphicsLayout*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="changeEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="closeEvent(QCloseEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="grabKeyboardEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="grabMouseEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="hideEvent(QHideEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="moveEvent(QGraphicsSceneMoveEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="paintWindowFrame(QPainter*,const QStyleOptionGraphicsItem*,QWidget*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="resizeEvent(QGraphicsSceneResizeEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="showEvent(QShowEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="ungrabKeyboardEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="ungrabMouseEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="windowFrameEvent(QEvent*)">
+ <modify-argument index="1" invalidate-after-use="yes"/>
+ </modify-function>
+ <modify-function signature="setStyle(QStyle*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setTabOrder(QGraphicsWidget*,QGraphicsWidget*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QPlainTextDocumentLayout"/>
+ <object-type name="QPlainTextEdit">
+ <enum-type name="LineWrapMode"/>
+ <modify-function signature="createMimeDataFromSelection() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setDocument(QTextDocument*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="insertFromMimeData(const QMimeData*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
+ </object-type>
+ <object-type name="QStyledItemDelegate">
+ <modify-function signature="setItemEditorFactory(QItemEditorFactory*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setEditorData(QWidget*,QModelIndex)const">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setModelData(QWidget*,QAbstractItemModel*,QModelIndex)const">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QGesture" since="4.6">
+ <enum-type name="GestureCancelPolicy"/>
+ </object-type>
+ <object-type name="QGestureRecognizer" since="4.6">
+ <enum-type name="ResultFlag" flags="Result"/>
+ </object-type>
+ <object-type name="QTapAndHoldGesture" since="4.6"/>
+ <object-type name="QTapGesture" since="4.6"/>
+ <object-type name="QGraphicsAnchor" since="4.6"/>
+ <object-type name="QGraphicsAnchorLayout" since="4.6"/>
+ <object-type name="QGraphicsBlurEffect" since="4.6">
+ <enum-type name="BlurHint" flags="BlurHints"/>
+ </object-type>
+ <object-type name="QGraphicsColorizeEffect" since="4.6"/>
+ <object-type name="QGraphicsDropShadowEffect" since="4.6"/>
+
+ <object-type name="QGraphicsEffect" since="4.6">
+ <enum-type name="ChangeFlag" flags="ChangeFlags"/>
+ <enum-type name="PixmapPadMode"/>
+ </object-type>
+
+ <object-type name="QGraphicsObject" since="4.6" default-superclass="QGraphicsItem"/>
+ <object-type name="QGraphicsOpacityEffect" since="4.6"/>
+ <object-type name="QGraphicsRotation" since="4.6"/>
+ <object-type name="QGraphicsScale" since="4.6"/>
+ <object-type name="QGraphicsTransform" since="4.6"/>
+ <object-type name="QPanGesture" since="4.6"/>
+ <object-type name="QPinchGesture" since="4.6">
+ <enum-type name="ChangeFlag" flags="ChangeFlags"/>
+ </object-type>
+ <object-type name="QSwipeGesture" since="4.6">
+ <enum-type name="SwipeDirection"/>
+ </object-type>
+
+ <value-type name="QTileRules" since="4.6"/>
+
+ <object-type name="QScroller">
+ <enum-type name="State"/>
+ <enum-type name="ScrollerGestureType"/>
+ <enum-type name="Input"/>
+ </object-type>
+ <value-type name="QScrollerProperties">
+ <enum-type name="OvershootPolicy"/>
+ <enum-type name="FrameRates"/>
+ <enum-type name="ScrollMetric"/>
+ </value-type>
+
+ <object-type name="QSizeGrip"/>
+
+ <object-type name="QSystemTrayIcon">
+ <enum-type name="ActivationReason"/>
+ <enum-type name="MessageIcon"/>
+ <modify-function signature="setContextMenu(QMenu*)">
+ <modify-argument index="1">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <!-- 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"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_mac.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_mac.xml
new file mode 100644
index 000000000..f7cc4b7e4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_mac.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWidgets">
+ <rejection class="*" function-name="qt_mac_set_cursor"/>
+ <rejection class="*" function-name="macMenu"/>
+
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
+ <!-- Qt5: internal
+ <object-type name="QMacStyle" >
+ <enum-type name="FocusRectPolicy"/>
+ <enum-type name="WidgetSizePolicy"/>
+ </object-type>
+ -->
+ <rejection class="QWidget" function-name="macCGHandle"/>
+ <rejection class="QWidget" function-name="macQDHandle"/>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_win.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_win.xml
new file mode 100644
index 000000000..6b80b5537
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_win.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWidgets"/>
diff --git a/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_x11.xml b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_x11.xml
new file mode 100644
index 000000000..6b80b5537
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWidgets/typesystem_widgets_x11.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtWidgets"/>
diff --git a/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt b/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt
new file mode 100644
index 000000000..de86cc7c5
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWinExtras/CMakeLists.txt
@@ -0,0 +1,48 @@
+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/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in b/sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in
index 21285e301..21285e301 100644
--- a/sources/pyside2/PySide2/QtWinExtras/QtWinExtras_global.pre.h.in
+++ b/sources/pyside6/PySide6/QtWinExtras/QtWinExtras_global.pre.h.in
diff --git a/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml b/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml
new file mode 100644
index 000000000..2e0da666a
--- /dev/null
+++ b/sources/pyside6/PySide6/QtWinExtras/typesystem_winextras.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<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/QtX11Extras/CMakeLists.txt b/sources/pyside6/PySide6/QtX11Extras/CMakeLists.txt
new file mode 100644
index 000000000..5f19d0746
--- /dev/null
+++ b/sources/pyside6/PySide6/QtX11Extras/CMakeLists.txt
@@ -0,0 +1,33 @@
+project(QtX11Extras)
+
+set(QtX11Extras_SRC
+${QtX11Extras_GEN_DIR}/qx11info_wrapper.cpp
+# module is always needed
+${QtX11Extras_GEN_DIR}/qtx11extras_module_wrapper.cpp
+)
+
+configure_file("${QtX11Extras_SOURCE_DIR}/QtX11Extras_global.post.h.in"
+ "${QtX11Extras_BINARY_DIR}/QtX11Extras_global.post.h" @ONLY)
+
+set(QtX11Extras_include_dirs ${QtX11Extras_SOURCE_DIR}
+ ${QtX11Extras_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}X11Extras_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${libpyside_SOURCE_DIR})
+
+set(QtX11Extras_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}X11Extras_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES})
+
+set(QtX11Extras_deps QtCore QtGui)
+
+create_pyside_module(NAME QtX11Extras
+ INCLUDE_DIRS QtX11Extras_include_dirs
+ LIBRARIES QtX11Extras_libraries
+ DEPS QtX11Extras_deps
+ TYPESYSTEM_PATH QtX11Extras_SOURCE_DIR
+ SOURCES QtX11Extras_SRC)
diff --git a/sources/pyside2/PySide2/QtX11Extras/QtX11Extras_global.post.h.in b/sources/pyside6/PySide6/QtX11Extras/QtX11Extras_global.post.h.in
index abdaf3d5f..abdaf3d5f 100644
--- a/sources/pyside2/PySide2/QtX11Extras/QtX11Extras_global.post.h.in
+++ b/sources/pyside6/PySide6/QtX11Extras/QtX11Extras_global.post.h.in
diff --git a/sources/pyside6/PySide6/QtX11Extras/typesystem_x11extras.xml b/sources/pyside6/PySide6/QtX11Extras/typesystem_x11extras.xml
new file mode 100644
index 000000000..e6b3e3eae
--- /dev/null
+++ b/sources/pyside6/PySide6/QtX11Extras/typesystem_x11extras.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Mateusz Skowroński <skowri@gmail.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtX11Extras">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+
+ <object-type name="QX11Info">
+ <enum-type name="PeekOption" flags="PeekOptions" since="5.10"/>
+ </object-type>
+</typesystem>
diff --git a/sources/pyside6/PySide6/QtXml/CMakeLists.txt b/sources/pyside6/PySide6/QtXml/CMakeLists.txt
new file mode 100644
index 000000000..ffb073f69
--- /dev/null
+++ b/sources/pyside6/PySide6/QtXml/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(QtXml)
+
+set(QtXml_SRC
+${QtXml_GEN_DIR}/qdomattr_wrapper.cpp
+${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}/qdomdocumentfragment_wrapper.cpp
+${QtXml_GEN_DIR}/qdomdocumenttype_wrapper.cpp
+${QtXml_GEN_DIR}/qdomelement_wrapper.cpp
+${QtXml_GEN_DIR}/qdomentity_wrapper.cpp
+${QtXml_GEN_DIR}/qdomentityreference_wrapper.cpp
+${QtXml_GEN_DIR}/qdomimplementation_wrapper.cpp
+${QtXml_GEN_DIR}/qdomnamednodemap_wrapper.cpp
+${QtXml_GEN_DIR}/qdomnode_wrapper.cpp
+${QtXml_GEN_DIR}/qdomnodelist_wrapper.cpp
+${QtXml_GEN_DIR}/qdomnotation_wrapper.cpp
+${QtXml_GEN_DIR}/qdomprocessinginstruction_wrapper.cpp
+${QtXml_GEN_DIR}/qdomtext_wrapper.cpp
+# module is always needed
+${QtXml_GEN_DIR}/qtxml_module_wrapper.cpp
+)
+
+set(QtXml_include_dirs ${QtXml_SOURCE_DIR}
+ ${QtXml_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Xml_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ )
+set(QtXml_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}Xml_LIBRARIES})
+set(QtXml_deps QtCore)
+
+create_pyside_module(NAME QtXml
+ INCLUDE_DIRS QtXml_include_dirs
+ LIBRARIES QtXml_libraries
+ DEPS QtXml_deps
+ TYPESYSTEM_PATH QtXml_SOURCE_DIR
+ SOURCES QtXml_SRC)
diff --git a/sources/pyside6/PySide6/QtXml/typesystem_xml.xml b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml
new file mode 100644
index 000000000..32b9dd0a6
--- /dev/null
+++ b/sources/pyside6/PySide6/QtXml/typesystem_xml.xml
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide6.QtXml">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no" />
+ <load-typesystem name="templates/core_common.xml" generate="no" />
+ <load-typesystem name="templates/xml_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"/>
+ <value-type name="QDomCharacterData"/>
+ <value-type name="QDomComment"/>
+
+
+ <value-type name="QDomDocument">
+ <!-- will be replaced in inject code -->
+ <modify-function signature="setContent(const QByteArray&amp;,bool,QString*,int*,int*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ <modify-function signature="setContent(const QString&amp;,bool,QString*,int*,int*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ <modify-function signature="setContent(QIODevice*,bool,QString*,int*,int*)">
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="5">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ <modify-function signature="setContent(const QByteArray&amp;,QString*,int*,int*)">
+ <modify-argument index="2">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ <modify-function signature="setContent(QIODevice*,QString*,int*,int*)">
+ <modify-argument index="2">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ <modify-function signature="setContent(const QString&amp;,QString*,int*,int*)">
+ <modify-argument index="2">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ <remove-default-expression/>
+ </modify-argument>
+ <modify-argument index="return">
+ <replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning" file="../glue/qtxml.cpp" snippet="qdomdocument-setcontent" />
+ </modify-function>
+ </value-type>
+
+ <value-type name="QDomDocumentFragment"/>
+ <value-type name="QDomDocumentType"/>
+ <value-type name="QDomEntity"/>
+ <value-type name="QDomEntityReference"/>
+ <value-type name="QDomImplementation">
+ <enum-type name="InvalidDataPolicy"/>
+ </value-type>
+
+ <value-type name="QDomNamedNodeMap"/>
+
+ <value-type name="QDomNode">
+ <enum-type name="EncodingPolicy"/>
+ <enum-type name="NodeType"/>
+ <modify-function signature="save(QTextStream&amp;,int,QDomNode::EncodingPolicy)const" allow-thread="yes"/>
+ </value-type>
+
+ <value-type name="QDomNodeList"/>
+ <value-type name="QDomNotation"/>
+ <value-type name="QDomProcessingInstruction"/>
+
+ <value-type name="QDomText"/>
+
+ <value-type name="QDomElement">
+ <!-- PYSIDE-1372
+ We will leave only one for int, and one for float since Python
+ doesn't have other variations on the primitive types.
+ Only 'qlonglong' and 'double' will be available from the Qt API.
+ TODO: This will require a better review of the shiboken primitive
+ types converters, since this situation might happen on
+ different signatures.
+ -->
+ <modify-function signature="setAttribute(const QString&amp;, uint)" remove="all"/>
+ <modify-function signature="setAttribute(const QString&amp;, float)" remove="all"/>
+ <modify-function signature="setAttribute(const QString&amp;, int)" remove="all"/>
+ <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
new file mode 100644
index 000000000..55e75e3ac
--- /dev/null
+++ b/sources/pyside6/PySide6/__init__.py.in
@@ -0,0 +1,108 @@
+from __future__ import print_function
+import os
+import sys
+from textwrap import dedent
+
+__all__ = list("Qt" + body for body in
+ "@all_module_shortnames@"
+ .split(";"))
+__version__ = "@FINAL_PACKAGE_VERSION@"
+__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", "@BINDING_API_PRE_RELEASE_VERSION@")
+
+
+def _additional_dll_directories(package_dir):
+ # Find shiboken6 relative to the package directory.
+ root = os.path.dirname(package_dir)
+ # Check for a flat .zip as deployed by cx_free(PYSIDE-1257)
+ if root.endswith('.zip'):
+ return []
+ shiboken6 = os.path.join(root, 'shiboken6')
+ if os.path.isdir(shiboken6): # Standard case, only shiboken6 is needed
+ return [shiboken6]
+ # The below code is for the build process when generate_pyi.py
+ # is executed in the build directory. We need libpyside and Qt in addition.
+ shiboken6 = os.path.join(os.path.dirname(root), 'shiboken6', 'libshiboken')
+ if not os.path.isdir(shiboken6):
+ raise ImportError(shiboken6 + ' does not exist')
+ result = [shiboken6, os.path.join(root, 'libpyside')]
+ for path in os.environ.get('PATH').split(';'):
+ if path:
+ if os.path.exists(os.path.join(path, 'qmake.exe')):
+ result.append(path)
+ break
+ return result
+
+
+def _setupQtDirectories():
+ # On Windows we need to explicitly import the shiboken6 module so
+ # that the libshiboken.dll dependency is loaded by the time a
+ # Qt module is imported. Otherwise due to PATH not containing
+ # the shiboken6 module path, the Qt module import would fail
+ # due to the missing libshiboken dll.
+ # In addition, as of Python 3.8, the shiboken package directory
+ # must be added to the DLL search paths so that shiboken6.dll
+ # is found.
+ # We need to do the same on Linux and macOS, because we do not
+ # embed rpaths into the PySide6 libraries that would point to
+ # the libshiboken library location. Importing the module
+ # loads the libraries into the process memory beforehand, and
+ # thus takes care of it for us.
+
+ pyside_package_dir = os.path.abspath(os.path.dirname(__file__))
+
+ if sys.platform == 'win32' and sys.version_info[0] == 3 and sys.version_info[1] >= 8:
+ for dir in _additional_dll_directories(pyside_package_dir):
+ os.add_dll_directory(dir)
+
+ try:
+ import shiboken6
+ except Exception:
+ paths = ', '.join(sys.path)
+ print('PySide6/__init__.py: Unable to import shiboken6 from {}'.format(paths),
+ 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:
+ stars = 79 * "*"
+ print(dedent(f'''\
+ {stars}
+ PySide6/__init__.py: The `signature` module was not initialized.
+ This libshiboken module was loaded from
+
+ "{shiboken6.__file__}".
+
+ Please make sure that this is the real shiboken6 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
+ # svg image plugin won't find Qt5Svg.dll).
+ os.environ['PATH'] = pyside_package_dir + os.pathsep + os.environ['PATH']
+
+ # On Windows, add the PySide6\openssl folder (created by setup.py's
+ # --openssl option) to the PATH so that the SSL DLLs can be found
+ # when Qt tries to dynamically load them. Tell Qt to load them and
+ # then reset the PATH.
+ openssl_dir = os.path.join(pyside_package_dir, 'openssl')
+ if os.path.exists(openssl_dir):
+ path = os.environ['PATH']
+ try:
+ os.environ['PATH'] = openssl_dir + os.pathsep + path
+ try:
+ from . import QtNetwork
+ except ImportError:
+ pass
+ else:
+ QtNetwork.QSslSocket.supportsSsl()
+ finally:
+ os.environ['PATH'] = path
+
+_setupQtDirectories()
diff --git a/sources/pyside2/PySide2/_config.py.in b/sources/pyside6/PySide6/_config.py.in
index 740e9a001..740e9a001 100644
--- a/sources/pyside2/PySide2/_config.py.in
+++ b/sources/pyside6/PySide6/_config.py.in
diff --git a/sources/pyside2/PySide2/global.h.in b/sources/pyside6/PySide6/global.h.in
index 69f6f6b1e..69f6f6b1e 100644
--- a/sources/pyside2/PySide2/global.h.in
+++ b/sources/pyside6/PySide6/global.h.in
diff --git a/sources/pyside2/PySide2/glue/qtcharts.cpp b/sources/pyside6/PySide6/glue/qtcharts.cpp
index 1828fecc0..1828fecc0 100644
--- a/sources/pyside2/PySide2/glue/qtcharts.cpp
+++ b/sources/pyside6/PySide6/glue/qtcharts.cpp
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
new file mode 100644
index 000000000..1ce41d003
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -0,0 +1,1879 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*********************************************************************
+ * INJECT CODE
+ ********************************************************************/
+
+// @snippet include-pyside
+#include <pyside.h>
+#include <limits>
+// @snippet include-pyside
+
+// @snippet qsettings-value
+// If we enter the kwds, means that we have a defaultValue or
+// at least a type.
+// This avoids that we are passing '0' as defaultValue.
+// defaultValue can also be passed as positional argument,
+// not only as keyword.
+QVariant out;
+if (kwds || numArgs > 1) {
+ Py_BEGIN_ALLOW_THREADS
+ out = %CPPSELF.value(%1, %2);
+ Py_END_ALLOW_THREADS
+} else {
+ Py_BEGIN_ALLOW_THREADS
+ out = %CPPSELF.value(%1);
+ Py_END_ALLOW_THREADS
+}
+
+PyTypeObject *typeObj = reinterpret_cast<PyTypeObject*>(%PYARG_3);
+
+if (typeObj) {
+ if (typeObj == &PyList_Type) {
+ QByteArray out_ba = out.toByteArray();
+ if (!out_ba.isEmpty()) {
+ QByteArrayList valuesList = out_ba.split(',');
+ const int valuesSize = valuesList.size();
+ if (valuesSize > 0) {
+ PyObject *list = PyList_New(valuesSize);
+ for (int i = 0; i < valuesSize; i++) {
+ PyObject *item = PyUnicode_FromString(valuesList[i].data());
+ 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.data());
+ } else if (typeObj == &PyUnicode_Type) {
+ QByteArray asByteArray = out.toByteArray();
+ %PYARG_0 = PyUnicode_FromString(asByteArray.data());
+ } 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;
+ }
+ }
+ // TODO: PyDict_Type and PyTuple_Type
+}
+else {
+ if (!out.isValid()) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+ } else {
+ %PYARG_0 = %CONVERTTOPYTHON[QVariant](out);
+ }
+}
+
+// @snippet qsettings-value
+
+// @snippet qvariant-conversion
+static QMetaType QVariant_resolveMetaType(PyTypeObject *type)
+{
+ if (PyObject_TypeCheck(type, SbkObjectType_TypeF())) {
+ auto sbkType = reinterpret_cast<SbkObjectType *>(type);
+ const char *typeName = Shiboken::ObjectType::getOriginalName(sbkType);
+ if (!typeName)
+ return {};
+ const bool valueType = '*' != typeName[qstrlen(typeName) - 1];
+ // Do not convert user type of value
+ if (valueType && Shiboken::ObjectType::isUserType(type))
+ return {};
+ QMetaType metaType = QMetaType::fromName(typeName);
+ if (metaType.isValid())
+ return metaType;
+ // Do not resolve types to value type
+ if (valueType)
+ return {};
+ // Find in base types. First check tp_bases, and only after check tp_base, because
+ // tp_base does not always point to the first base class, but rather to the first
+ // that has added any python fields or slots to its object layout.
+ // See https://mail.python.org/pipermail/python-list/2009-January/520733.html
+ if (type->tp_bases) {
+ for (int i = 0, size = PyTuple_GET_SIZE(type->tp_bases); i < size; ++i) {
+ auto baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(type->tp_bases, i));
+ const QMetaType derived = QVariant_resolveMetaType(baseType);
+ if (derived.isValid())
+ return derived;
+ }
+ } else if (type->tp_base) {
+ return QVariant_resolveMetaType(type->tp_base);
+ }
+ }
+ return {};
+}
+static QVariant QVariant_convertToValueList(PyObject *list)
+{
+ if (PySequence_Size(list) < 0) {
+ // clear the error if < 0 which means no length at all
+ PyErr_Clear();
+ return QVariant();
+ }
+
+ Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
+
+ const QMetaType metaType = QVariant_resolveMetaType(element.cast<PyTypeObject *>());
+ if (metaType.isValid()) {
+ QByteArray listTypeName("QList<");
+ listTypeName += metaType.name();
+ listTypeName += '>';
+ QMetaType metaType = QMetaType::fromName(listTypeName);
+ if (metaType.isValid()) {
+ Shiboken::Conversions::SpecificConverter converter(listTypeName);
+ if (converter) {
+ QVariant var(metaType);
+ converter.toCpp(list, &var);
+ return var;
+ }
+ qWarning() << "Type converter for :" << listTypeName << "not registered.";
+ }
+ }
+ return QVariant();
+}
+static bool QVariant_isStringList(PyObject *list)
+{
+ if (!PySequence_Check(list)) {
+ // If it is not a list or a derived list class
+ // we assume that will not be a String list neither.
+ return false;
+ }
+
+ if (PySequence_Size(list) < 0) {
+ // clear the error if < 0 which means no length at all
+ PyErr_Clear();
+ return false;
+ }
+
+ Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
+ const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
+ for (Py_ssize_t i = 0; i < size; ++i) {
+ PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i);
+ if (!%CHECKTYPE[QString](item))
+ return false;
+ }
+ return true;
+}
+static QVariant QVariant_convertToVariantMap(PyObject *map)
+{
+ Py_ssize_t pos = 0;
+ Shiboken::AutoDecRef keys(PyDict_Keys(map));
+ if (!QVariant_isStringList(keys))
+ return QVariant();
+ PyObject *key;
+ PyObject *value;
+ QMap<QString,QVariant> ret;
+ while (PyDict_Next(map, &pos, &key, &value)) {
+ QString cppKey = %CONVERTTOCPP[QString](key);
+ QVariant cppValue = %CONVERTTOCPP[QVariant](value);
+ ret.insert(cppKey, cppValue);
+ }
+ return QVariant(ret);
+}
+static QVariant QVariant_convertToVariantList(PyObject *list)
+{
+ if (QVariant_isStringList(list)) {
+ QList<QString > lst = %CONVERTTOCPP[QList<QString>](list);
+ return QVariant(QStringList(lst));
+ }
+ QVariant valueList = QVariant_convertToValueList(list);
+ if (valueList.isValid())
+ return valueList;
+
+ if (PySequence_Size(list) < 0) {
+ // clear the error if < 0 which means no length at all
+ PyErr_Clear();
+ return QVariant();
+ }
+
+ QList<QVariant> lst;
+ Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
+ const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
+ for (Py_ssize_t i = 0; i < size; ++i) {
+ PyObject *pyItem = PySequence_Fast_GET_ITEM(fast.object(), i);
+ QVariant item = %CONVERTTOCPP[QVariant](pyItem);
+ lst.append(item);
+ }
+ return QVariant(lst);
+}
+// @snippet qvariant-conversion
+
+// @snippet qvariantmap-check
+static bool QVariantType_isStringList(PyObject *list)
+{
+ Shiboken::AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
+ const Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
+ for (Py_ssize_t i=0; i < size; i++) {
+ PyObject *item = PySequence_Fast_GET_ITEM(fast.object(), i);
+ if (!%CHECKTYPE[QString](item))
+ return false;
+ }
+ return true;
+}
+static bool QVariantType_checkAllStringKeys(PyObject *dict)
+{
+ Shiboken::AutoDecRef keys(PyDict_Keys(dict));
+ return QVariantType_isStringList(keys);
+}
+// @snippet qvariantmap-check
+
+// @snippet qt-qabs
+double _abs = qAbs(%1);
+%PYARG_0 = %CONVERTTOPYTHON[double](_abs);
+// @snippet qt-qabs
+
+// @snippet qt-postroutine
+namespace PySide {
+static QStack<PyObject *> globalPostRoutineFunctions;
+void globalPostRoutineCallback()
+{
+ Shiboken::GilState state;
+ for (auto *callback : globalPostRoutineFunctions) {
+ Shiboken::AutoDecRef result(PyObject_CallObject(callback, nullptr));
+ Py_DECREF(callback);
+ }
+ globalPostRoutineFunctions.clear();
+}
+void addPostRoutine(PyObject *callback)
+{
+ if (PyCallable_Check(callback)) {
+ globalPostRoutineFunctions << callback;
+ Py_INCREF(callback);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "qAddPostRoutine: The argument must be a callable object.");
+ }
+}
+} // namespace
+// @snippet qt-postroutine
+
+// @snippet qt-addpostroutine
+PySide::addPostRoutine(%1);
+// @snippet qt-addpostroutine
+
+// @snippet qt-qaddpostroutine
+qAddPostRoutine(PySide::globalPostRoutineCallback);
+// @snippet qt-qaddpostroutine
+
+// @snippet qt-version
+QList<QByteArray> version = QByteArray(qVersion()).split('.');
+PyObject *pyQtVersion = PyTuple_New(3);
+for (int i = 0; i < 3; ++i)
+ PyTuple_SET_ITEM(pyQtVersion, i, PyInt_FromLong(version[i].toInt()));
+PyModule_AddObject(module, "__version_info__", pyQtVersion);
+PyModule_AddStringConstant(module, "__version__", qVersion());
+// @snippet qt-version
+
+// @snippet qobject-connect
+static bool isDecorator(PyObject *method, PyObject *self)
+{
+ Shiboken::AutoDecRef methodName(PyObject_GetAttr(method, Shiboken::PyMagicName::name()));
+ if (!PyObject_HasAttr(self, methodName))
+ return true;
+ Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName));
+ return PyMethod_GET_FUNCTION(otherMethod.object()) != PyMethod_GET_FUNCTION(method);
+}
+
+static bool getReceiver(QObject *source, const char *signal, PyObject *callback, QObject **receiver, PyObject **self, QByteArray *callbackSig)
+{
+ bool forceGlobalReceiver = false;
+ if (PyMethod_Check(callback)) {
+ *self = PyMethod_GET_SELF(callback);
+ if (%CHECKTYPE[QObject *](*self))
+ *receiver = %CONVERTTOCPP[QObject *](*self);
+ forceGlobalReceiver = isDecorator(callback, *self);
+ } else if (PyCFunction_Check(callback)) {
+ *self = PyCFunction_GET_SELF(callback);
+ if (*self && %CHECKTYPE[QObject *](*self))
+ *receiver = %CONVERTTOCPP[QObject *](*self);
+ } else if (PyCallable_Check(callback)) {
+ // Ok, just a callable object
+ *receiver = nullptr;
+ *self = nullptr;
+ }
+
+ bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
+
+ // Check if this callback is a overwrite of a non-virtual Qt slot.
+ if (!usingGlobalReceiver && receiver && self) {
+ *callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toLatin1();
+ const QMetaObject *metaObject = (*receiver)->metaObject();
+ int slotIndex = metaObject->indexOfSlot(callbackSig->constData());
+ if (slotIndex != -1 && slotIndex < metaObject->methodOffset() && PyMethod_Check(callback))
+ usingGlobalReceiver = true;
+ }
+
+ const auto receiverThread = *receiver ? (*receiver)->thread() : nullptr;
+
+ if (usingGlobalReceiver) {
+ PySide::SignalManager &signalManager = PySide::SignalManager::instance();
+ *receiver = signalManager.globalReceiver(source, callback);
+ // PYSIDE-1354: Move the global receiver to the original receivers's thread
+ // so that autoconnections work correctly.
+ if (receiverThread && receiverThread != (*receiver)->thread())
+ (*receiver)->moveToThread(receiverThread);
+ *callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toLatin1();
+ }
+
+ return usingGlobalReceiver;
+}
+
+static bool qobjectConnect(QObject *source, const char *signal, QObject *receiver, const char *slot, Qt::ConnectionType type)
+{
+ if (!signal || !slot)
+ return false;
+
+ if (!PySide::Signal::checkQtSignal(signal))
+ return false;
+ signal++;
+
+ if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
+ return false;
+
+ bool isSignal = PySide::Signal::isQtSignal(slot);
+ slot++;
+ PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot);
+ bool connection;
+ connection = QObject::connect(source, signal - 1, receiver, slot - 1, type);
+ return connection;
+}
+
+static bool qobjectConnect(QObject *source, QMetaMethod signal, QObject *receiver, QMetaMethod slot, Qt::ConnectionType type)
+{
+ return qobjectConnect(source, signal.methodSignature(), receiver, slot.methodSignature(), type);
+}
+
+static bool qobjectConnectCallback(QObject *source, const char *signal, PyObject *callback, Qt::ConnectionType type)
+{
+ if (!signal || !PySide::Signal::checkQtSignal(signal))
+ return false;
+ signal++;
+
+ int signalIndex = PySide::SignalManager::registerMetaMethodGetIndex(source, signal, QMetaMethod::Signal);
+ if (signalIndex == -1)
+ return false;
+
+ PySide::SignalManager &signalManager = PySide::SignalManager::instance();
+
+ // Extract receiver from callback
+ QObject *receiver = nullptr;
+ PyObject *self = nullptr;
+ QByteArray callbackSig;
+ bool usingGlobalReceiver = getReceiver(source, signal, callback, &receiver, &self, &callbackSig);
+ if (receiver == nullptr && self == nullptr)
+ return false;
+
+ const QMetaObject *metaObject = receiver->metaObject();
+ const char *slot = callbackSig.constData();
+ int slotIndex = metaObject->indexOfSlot(slot);
+ QMetaMethod signalMethod = metaObject->method(signalIndex);
+
+ if (slotIndex == -1) {
+ if (!usingGlobalReceiver && self && !Shiboken::Object::hasCppWrapper(reinterpret_cast<SbkObject *>(self))) {
+ qWarning("You can't add dynamic slots on an object originated from C++.");
+ if (usingGlobalReceiver)
+ signalManager.releaseGlobalReceiver(source, receiver);
+
+ return false;
+ }
+
+ if (usingGlobalReceiver)
+ slotIndex = signalManager.globalReceiverSlotIndex(receiver, slot);
+ else
+ slotIndex = PySide::SignalManager::registerMetaMethodGetIndex(receiver, slot, QMetaMethod::Slot);
+
+ if (slotIndex == -1) {
+ if (usingGlobalReceiver)
+ signalManager.releaseGlobalReceiver(source, receiver);
+
+ return false;
+ }
+ }
+ bool connection;
+ connection = QMetaObject::connect(source, signalIndex, receiver, slotIndex, type);
+ if (connection) {
+ if (usingGlobalReceiver)
+ signalManager.notifyGlobalReceiver(receiver);
+ #ifndef AVOID_PROTECTED_HACK
+ source->connectNotify(signalMethod); //Qt5: QMetaMethod instead of char *
+ #else
+ // Need to cast to QObjectWrapper * and call the public version of
+ // connectNotify when avoiding the protected hack.
+ reinterpret_cast<QObjectWrapper *>(source)->connectNotify(signalMethod); //Qt5: QMetaMethod instead of char *
+ #endif
+
+ return connection;
+ }
+
+ if (usingGlobalReceiver)
+ signalManager.releaseGlobalReceiver(source, receiver);
+
+ return false;
+}
+
+
+static bool qobjectDisconnectCallback(QObject *source, const char *signal, PyObject *callback)
+{
+ if (!PySide::Signal::checkQtSignal(signal))
+ return false;
+
+ PySide::SignalManager &signalManager = PySide::SignalManager::instance();
+
+ // Extract receiver from callback
+ QObject *receiver = nullptr;
+ PyObject *self = nullptr;
+ QByteArray callbackSig;
+ QMetaMethod slotMethod;
+ bool usingGlobalReceiver = getReceiver(nullptr, signal, callback, &receiver, &self, &callbackSig);
+ if (receiver == nullptr && self == nullptr)
+ return false;
+
+ const QMetaObject *metaObject = receiver->metaObject();
+ int signalIndex = source->metaObject()->indexOfSignal(++signal);
+ int slotIndex = -1;
+
+ slotIndex = metaObject->indexOfSlot(callbackSig);
+ slotMethod = metaObject->method(slotIndex);
+
+ bool disconnected;
+ disconnected = QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex);
+
+ if (disconnected) {
+ if (usingGlobalReceiver)
+ signalManager.releaseGlobalReceiver(source, receiver);
+
+ #ifndef AVOID_PROTECTED_HACK
+ source->disconnectNotify(slotMethod); //Qt5: QMetaMethod instead of char *
+ #else
+ // Need to cast to QObjectWrapper * and call the public version of
+ // connectNotify when avoiding the protected hack.
+ reinterpret_cast<QObjectWrapper *>(source)->disconnectNotify(slotMethod); //Qt5: QMetaMethod instead of char *
+ #endif
+ return true;
+ }
+ return false;
+}
+// @snippet qobject-connect
+
+// @snippet qobject-connect-1
+// %FUNCTION_NAME() - disable generation of function call.
+bool %0 = qobjectConnect(%1, %2, %CPPSELF, %3, %4);
+%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
+// @snippet qobject-connect-1
+
+// @snippet qobject-connect-2
+// %FUNCTION_NAME() - disable generation of function call.
+bool %0 = qobjectConnect(%1, %2, %3, %4, %5);
+%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
+// @snippet qobject-connect-2
+
+// @snippet qobject-connect-3
+// %FUNCTION_NAME() - disable generation of function call.
+bool %0 = qobjectConnect(%1, %2, %3, %4, %5);
+%PYARG_0 = %CONVERTTOPYTHON[bool](%0);
+// @snippet qobject-connect-3
+
+// @snippet qobject-connect-4
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = qobjectConnectCallback(%1, %2, %PYARG_3, %4);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-connect-4
+
+// @snippet qobject-connect-5
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = qobjectConnectCallback(%CPPSELF, %1, %PYARG_2, %3);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-connect-5
+
+// @snippet qobject-connect-6
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = qobjectConnect(%CPPSELF, %1, %2, %3, %4);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-connect-6
+
+// @snippet qobject-emit
+%RETURN_TYPE %0 = PySide::SignalManager::instance().emitSignal(%CPPSELF, %1, %PYARG_2);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-emit
+
+// @snippet qobject-disconnect-1
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = qobjectDisconnectCallback(%CPPSELF, %1, %2);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-disconnect-1
+
+// @snippet qobject-disconnect-2
+// %FUNCTION_NAME() - disable generation of function call.
+%RETURN_TYPE %0 = qobjectDisconnectCallback(%1, %2, %3);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-disconnect-2
+
+// @snippet qfatal
+// qFatal doesn't have a stream version, so we do a
+// qWarning call followed by a qFatal() call using a
+// literal.
+Py_BEGIN_ALLOW_THREADS
+qWarning() << %1;
+qFatal("[A qFatal() call was made from Python code]");
+Py_END_ALLOW_THREADS
+// @snippet qfatal
+
+// @snippet moduleshutdown
+PySide::runCleanupFunctions();
+// @snippet moduleshutdown
+
+// @snippet qt-qenum
+%PYARG_0 = PySide::QEnum::QEnumMacro(%1, false);
+// @snippet qt-qenum
+
+// @snippet qt-qflag
+%PYARG_0 = PySide::QEnum::QEnumMacro(%1, true);
+// @snippet qt-qflag
+
+// @snippet qt-init-feature
+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");
+
+PySide::registerInternalQtConf();
+PySide::init(module);
+Py_AtExit(QtCoreModuleExit);
+// @snippet qt-pysideinit
+
+// @snippet qt-messagehandler
+// Define a global variable to handle qInstallMessageHandler callback
+static PyObject *qtmsghandler = nullptr;
+
+static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, const QString &msg)
+{
+ Shiboken::GilState state;
+ Shiboken::AutoDecRef arglist(PyTuple_New(3));
+ PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QtMsgType](type));
+ PyTuple_SET_ITEM(arglist, 1, %CONVERTTOPYTHON[QMessageLogContext &](ctx));
+ QByteArray array = msg.toUtf8(); // Python handler requires UTF-8
+ char *data = array.data();
+ PyTuple_SET_ITEM(arglist, 2, %CONVERTTOPYTHON[char *](data));
+ Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));
+}
+static void QtCoreModuleExit()
+{
+ PySide::SignalManager::instance().clear();
+}
+// @snippet qt-messagehandler
+
+// @snippet qt-installmessagehandler
+if (%PYARG_1 == Py_None) {
+ qInstallMessageHandler(0);
+ %PYARG_0 = qtmsghandler ? qtmsghandler : Py_None;
+ qtmsghandler = 0;
+} else if (!PyCallable_Check(%PYARG_1)) {
+ PyErr_SetString(PyExc_TypeError, "parameter must be callable");
+} else {
+ %PYARG_0 = qtmsghandler ? qtmsghandler : Py_None;
+ Py_INCREF(%PYARG_1);
+ qtmsghandler = %PYARG_1;
+ qInstallMessageHandler(msgHandlerCallback);
+}
+
+if (%PYARG_0 == Py_None)
+ Py_INCREF(%PYARG_0);
+// @snippet qt-installmessagehandler
+
+// @snippet qline-hash
+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);
+ }
+};
+// @snippet qline-hash
+
+// @snippet qlinef-intersect
+QPointF p;
+%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &p);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QPointF](p));
+// @snippet qlinef-intersect
+
+// @snippet qresource-data
+const void *d = %CPPSELF.%FUNCTION_NAME();
+if (d) {
+ %PYARG_0 = Shiboken::Buffer::newObject(d, %CPPSELF.size());
+} else {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+}
+// @snippet qresource-data
+
+// @snippet qdate-topython
+if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
+%PYARG_0 = PyDate_FromDate(%CPPSELF.year(), %CPPSELF.month(), %CPPSELF.day());
+// @snippet qdate-topython
+
+// @snippet qdate-getdate
+int year, month, day;
+%CPPSELF.%FUNCTION_NAME(&year, &month, &day);
+%PYARG_0 = PyTuple_New(3);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](year));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](month));
+PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](day));
+// @snippet qdate-getdate
+
+// @snippet qdate-weeknumber
+int yearNumber;
+int week = %CPPSELF.%FUNCTION_NAME(&yearNumber);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](week));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](yearNumber));
+// @snippet qdate-weeknumber
+
+// @snippet qdatetime-1
+QDate date(%1, %2, %3);
+QTime time(%4, %5, %6, %7);
+%0 = new %TYPE(date, time, Qt::TimeSpec(%8));
+// @snippet qdatetime-1
+
+// @snippet qdatetime-2
+QDate date(%1, %2, %3);
+QTime time(%4, %5, %6);
+%0 = new %TYPE(date, time);
+// @snippet qdatetime-2
+
+// @snippet qdatetime-topython
+QDate date = %CPPSELF.date();
+QTime time = %CPPSELF.time();
+if (!PyDateTimeAPI)
+ PyDateTime_IMPORT;
+%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;
+%PYARG_0 = PyTime_FromTime(%CPPSELF.hour(), %CPPSELF.minute(), %CPPSELF.second(), %CPPSELF.msec()*1000);
+// @snippet qtime-topython
+
+// @snippet qbitarray-len
+return %CPPSELF.size();
+// @snippet qbitarray-len
+
+// @snippet qbitarray-getitem
+if (_i < 0 || _i >= %CPPSELF.size()) {
+ PyErr_SetString(PyExc_IndexError, "index out of bounds");
+ return 0;
+}
+bool ret = %CPPSELF.at(_i);
+return %CONVERTTOPYTHON[bool](ret);
+// @snippet qbitarray-getitem
+
+// @snippet qbitarray-setitem
+PyObject *args = Py_BuildValue("(iiO)", _i, 1, _value);
+PyObject *result = Sbk_QBitArrayFunc_setBit(self, args);
+Py_DECREF(args);
+Py_XDECREF(result);
+return !result ? -1 : 0;
+// @snippet qbitarray-setitem
+
+// @snippet unlock
+%CPPSELF.unlock();
+// @snippet unlock
+
+// @snippet qabstractitemmodel-createindex
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, %PYARG_3);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qabstractitemmodel-createindex
+
+// @snippet qabstractitemmodel
+qRegisterMetaType<QVector<int> >("QVector<int>");
+// @snippet qabstractitemmodel
+
+// @snippet qobject-metaobject
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME();
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qobject-metaobject
+
+// @snippet qobject-findchild-1
+static QObject *_findChildHelper(const QObject *parent, const QString &name, PyTypeObject *desiredType)
+{
+ for (auto *child : parent->children()) {
+ Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
+ if (PyType_IsSubtype(Py_TYPE(pyChild), desiredType)
+ && (name.isNull() || name == child->objectName())) {
+ return child;
+ }
+ }
+
+ for (auto *child : parent->children()) {
+ QObject *obj = _findChildHelper(child, name, desiredType);
+ if (obj)
+ return obj;
+ }
+ return nullptr;
+}
+
+static inline bool _findChildrenComparator(const QObject *&child, const QRegularExpression &name)
+{
+ return name.match(child->objectName()).hasMatch();
+}
+
+static inline bool _findChildrenComparator(const QObject *&child, const QString &name)
+{
+ return name.isNull() || name == child->objectName();
+}
+
+template<typename T>
+static void _findChildrenHelper(const QObject *parent, const T& name, PyTypeObject *desiredType, PyObject *result)
+{
+ for (const auto *child : parent->children()) {
+ Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
+ if (PyType_IsSubtype(Py_TYPE(pyChild), desiredType) && _findChildrenComparator(child, name))
+ PyList_Append(result, pyChild);
+ _findChildrenHelper(child, name, desiredType, result);
+ }
+}
+// @snippet qobject-findchild-1
+
+// @snippet qobject-findchild-2
+QObject *child = _findChildHelper(%CPPSELF, %2, reinterpret_cast<PyTypeObject *>(%PYARG_1));
+%PYARG_0 = %CONVERTTOPYTHON[QObject *](child);
+// @snippet qobject-findchild-2
+
+// @snippet qobject-findchildren
+%PYARG_0 = PyList_New(0);
+_findChildrenHelper(%CPPSELF, %2, reinterpret_cast<PyTypeObject *>(%PYARG_1), %PYARG_0);
+// @snippet qobject-findchildren
+
+// @snippet qobject-tr
+QString result;
+if (QCoreApplication::instance()) {
+ PyObject *klass = PyObject_GetAttr(%PYSELF, Shiboken::PyMagicName::class_());
+ PyObject *cname = PyObject_GetAttr(klass, Shiboken::PyMagicName::name());
+ result = QString(QCoreApplication::instance()->translate(Shiboken::String::toCString(cname),
+ /* %1, %2, QCoreApplication::CodecForTr, %3)); */
+ %1, %2, %3));
+
+ Py_DECREF(klass);
+ Py_DECREF(cname);
+} else {
+ result = QString(QString::fromLatin1(%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 qregexp-replace
+%1.replace(*%CPPSELF, %2);
+%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
+// @snippet qregexp-replace
+
+// @snippet qbytearray-mgetitem
+if (PyIndex_Check(_key)) {
+ Py_ssize_t _i;
+ _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
+ if (_i < 0 || _i >= %CPPSELF.size()) {
+ PyErr_SetString(PyExc_IndexError, "index out of bounds");
+ return 0;
+ } else {
+ char res[2];
+ res[0] = %CPPSELF.at(_i);
+ res[1] = 0;
+ return PyBytes_FromStringAndSize(res, 1);
+ }
+} else if (PySlice_Check(_key)) {
+ Py_ssize_t start, stop, step, slicelength, cur;
+ if (PySlice_GetIndicesEx(_key, %CPPSELF.count(), &start, &stop, &step, &slicelength) < 0) {
+ return nullptr;
+ }
+
+ QByteArray ba;
+ if (slicelength <= 0) {
+ return %CONVERTTOPYTHON[QByteArray](ba);
+ } else if (step == 1) {
+ Py_ssize_t max = %CPPSELF.count();
+ start = qBound(Py_ssize_t(0), start, max);
+ stop = qBound(Py_ssize_t(0), stop, max);
+ QByteArray ba;
+ if (start < stop)
+ ba = %CPPSELF.mid(start, stop - start);
+ return %CONVERTTOPYTHON[QByteArray](ba);
+ } else {
+ QByteArray ba;
+ for (cur = start; slicelength > 0; cur += static_cast<size_t>(step), slicelength--) {
+ ba.append(%CPPSELF.at(cur));
+ }
+ return %CONVERTTOPYTHON[QByteArray](ba);
+ }
+} else {
+ PyErr_Format(PyExc_TypeError,
+ "list indices must be integers or slices, not %.200s",
+ Py_TYPE(_key)->tp_name);
+ return nullptr;
+}
+// @snippet qbytearray-mgetitem
+
+// @snippet qbytearray-msetitem
+if (PyIndex_Check(_key)) {
+ Py_ssize_t _i = PyNumber_AsSsize_t(_key, PyExc_IndexError);
+ if (_i == -1 && PyErr_Occurred())
+ return -1;
+
+ if (_i < 0)
+ _i += %CPPSELF.count();
+
+ if (_i < 0 || _i >= %CPPSELF.size()) {
+ PyErr_SetString(PyExc_IndexError, "QByteArray index out of range");
+ return -1;
+ }
+
+ // Provide more specific error message for bytes/str, bytearray, QByteArray respectively
+ if (PyBytes_Check(_value)) {
+ if (Py_SIZE(_value) != 1) {
+ PyErr_SetString(PyExc_ValueError, "bytes must be of size 1");
+ return -1;
+ }
+ } else if (PyByteArray_Check(_value)) {
+ if (Py_SIZE(_value) != 1) {
+ PyErr_SetString(PyExc_ValueError, "bytearray must be of size 1");
+ return -1;
+ }
+ } else if (reinterpret_cast<PyTypeObject *>(Py_TYPE(_value)) == reinterpret_cast<PyTypeObject *>(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX])) {
+ if (PyObject_Length(_value) != 1) {
+ PyErr_SetString(PyExc_ValueError, "QByteArray must be of size 1");
+ return -1;
+ }
+ } else {
+ PyErr_SetString(PyExc_ValueError, "a bytes, bytearray, QByteArray of size 1 is required");
+ return -1;
+ }
+
+ // Not support int or long.
+ %CPPSELF.remove(_i, 1);
+ PyObject *args = Py_BuildValue("(nO)", _i, _value);
+ PyObject *result = Sbk_QByteArrayFunc_insert(self, args);
+ Py_DECREF(args);
+ Py_XDECREF(result);
+ return !result ? -1 : 0;
+} else if (PySlice_Check(_key)) {
+ Py_ssize_t start, stop, step, slicelength, value_length;
+ if (PySlice_GetIndicesEx(_key, %CPPSELF.count(), &start, &stop, &step, &slicelength) < 0) {
+ return -1;
+ }
+ // The parameter candidates are: bytes/str, bytearray, QByteArray itself.
+ // Not support iterable which contains ints between 0~255
+
+ // case 1: value is nullpre, means delete the items within the range
+ // case 2: step is 1, means shrink or expanse
+ // case 3: step is not 1, then the number of slots have to equal the number of items in _value
+ QByteArray ba;
+ if (_value == nullptr || _value == Py_None) {
+ ba = QByteArray();
+ value_length = 0;
+ } else if (!(PyBytes_Check(_value) || PyByteArray_Check(_value) || reinterpret_cast<PyTypeObject *>(Py_TYPE(_value)) == reinterpret_cast<PyTypeObject *>(SbkPySide6_QtCoreTypes[SBK_QBYTEARRAY_IDX]))) {
+ PyErr_Format(PyExc_TypeError, "bytes, bytearray or QByteArray is required, not %.200s", Py_TYPE(_value)->tp_name);
+ return -1;
+ } else {
+ value_length = PyObject_Length(_value);
+ }
+
+ if (step != 1 && value_length != slicelength) {
+ PyErr_Format(PyExc_ValueError, "attempt to assign %s of size %d to extended slice of size %d",
+ Py_TYPE(_value)->tp_name, int(value_length), int(slicelength));
+ return -1;
+ }
+
+ if (step != 1) {
+ int i = start;
+ for (int j = 0; j < slicelength; j++) {
+ PyObject *item = PyObject_GetItem(_value, PyLong_FromLong(j));
+ QByteArray temp;
+ if (PyLong_Check(item)) {
+ int overflow;
+ long ival = PyLong_AsLongAndOverflow(item, &overflow);
+ // Not suppose to bigger than 255 because only bytes, bytearray, QByteArray were accept
+ temp = QByteArray(reinterpret_cast<const char *>(&ival));
+ } else {
+ temp = %CONVERTTOCPP[QByteArray](item);
+ }
+
+ %CPPSELF.replace(i, 1, temp);
+ i += step;
+ }
+ return 0;
+ } else {
+ ba = %CONVERTTOCPP[QByteArray](_value);
+ %CPPSELF.replace(start, slicelength, ba);
+ return 0;
+ }
+} else {
+ PyErr_Format(PyExc_TypeError, "QBytearray indices must be integers or slices, not %.200s",
+ Py_TYPE(_key)->tp_name);
+ return -1;
+}
+// @snippet qbytearray-msetitem
+
+// @snippet qbytearray-bufferprotocol
+extern "C" {
+// QByteArray buffer protocol functions
+// see: http://www.python.org/dev/peps/pep-3118/
+
+static int SbkQByteArray_getbufferproc(PyObject *obj, Py_buffer *view, int flags)
+{
+ if (!view || !Shiboken::Object::isValid(obj))
+ return -1;
+
+ QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj);
+ //XXX /|\ omitting this space crashes shiboken!
+ #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->ndim = 1;
+ view->shape = (flags & PyBUF_ND) == PyBUF_ND ? &(view->len) : nullptr;
+ view->strides = &view->itemsize;
+ view->suboffsets = NULL;
+ view->internal = NULL;
+
+ Py_XINCREF(obj);
+ return 0;
+#else // Py_LIMITED_API
+ const int result = PyBuffer_FillInfo(view, obj, reinterpret_cast<void *>(cppSelf->data()),
+ cppSelf->size(), 0, flags);
+ if (result == 0)
+ Py_XINCREF(obj);
+ return result;
+#endif
+}
+
+static PyBufferProcs SbkQByteArrayBufferProc = {
+ /*bf_getbuffer*/ (getbufferproc)SbkQByteArray_getbufferproc,
+ /*bf_releasebuffer*/ (releasebufferproc)0,
+};
+
+}
+// @snippet qbytearray-bufferprotocol
+
+// @snippet qbytearray-operatorplus-1
+QByteArray ba = QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1)) + *%CPPSELF;
+%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
+// @snippet qbytearray-operatorplus-1
+
+// @snippet qbytearray-operatorplus-2
+QByteArray ba = QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1)) + *%CPPSELF;
+%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
+// @snippet qbytearray-operatorplus-2
+
+// @snippet qbytearray-operatorplus-3
+QByteArray ba = *%CPPSELF + QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
+%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
+// @snippet qbytearray-operatorplus-3
+
+// @snippet qbytearray-operatorplusequal
+*%CPPSELF += QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
+// @snippet qbytearray-operatorplusequal
+
+// @snippet qbytearray-operatorequalequal
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF == ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatorequalequal
+
+// @snippet qbytearray-operatornotequal
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF != ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatornotequal
+
+// @snippet qbytearray-operatorgreater
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF > ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatorgreater
+
+// @snippet qbytearray-operatorgreaterequal
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF >= ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatorgreaterequal
+
+// @snippet qbytearray-operatorlower
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF < ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatorlower
+
+// @snippet qbytearray-operatorlowerequal
+if (PyUnicode_CheckExact(%PYARG_1)) {
+ Shiboken::AutoDecRef data(PyUnicode_AsASCIIString(%PYARG_1));
+ QByteArray ba = QByteArray(PyBytes_AsString(data.object()), PyBytes_GET_SIZE(data.object()));
+ bool cppResult = %CPPSELF <= ba;
+ %PYARG_0 = %CONVERTTOPYTHON[bool](cppResult);
+}
+// @snippet qbytearray-operatorlowerequal
+
+// @snippet qbytearray-repr
+PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size());
+if (aux == nullptr) {
+ return nullptr;
+}
+QByteArray b(Py_TYPE(%PYSELF)->tp_name);
+%PYARG_0 = PyUnicode_FromFormat("%s(%R)", b.constData(), aux);
+Py_DECREF(aux);
+// @snippet qbytearray-repr
+
+// @snippet qbytearray-1
+if (PyBytes_Check(%PYARG_1)) {
+ %0 = new QByteArray(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
+} else if (Shiboken::String::check(%PYARG_1)) {
+ %0 = new QByteArray(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1));
+}
+// @snippet qbytearray-1
+
+// @snippet qbytearray-2
+%0 = new QByteArray(PyByteArray_AsString(%PYARG_1), PyByteArray_Size(%PYARG_1));
+// @snippet qbytearray-2
+
+// @snippet qbytearray-3
+%0 = new QByteArray(PyBytes_AS_STRING(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
+// @snippet qbytearray-3
+
+// @snippet qbytearray-py3
+PepType_AS_BUFFER(Shiboken::SbkType<QByteArray>()) = &SbkQByteArrayBufferProc;
+// @snippet qbytearray-py3
+
+// @snippet qbytearray-data
+%PYARG_0 = PyBytes_FromStringAndSize(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.size());
+// @snippet qbytearray-data
+
+// @snippet qbytearray-fromrawdata
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(PyBytes_AsString(%PYARG_1), PyBytes_GET_SIZE(%PYARG_1));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qbytearray-fromrawdata
+
+// @snippet qbytearray-str
+PyObject *aux = PyBytes_FromStringAndSize(%CPPSELF.constData(), %CPPSELF.size());
+if (aux == nullptr) {
+ return nullptr;
+}
+%PYARG_0 = PyObject_Repr(aux);
+Py_DECREF(aux);
+// @snippet qbytearray-str
+
+// @snippet qbytearray-len
+return %CPPSELF.count();
+// @snippet qbytearray-len
+
+// @snippet qbytearray-getitem
+if (_i < 0 || _i >= %CPPSELF.size()) {
+ PyErr_SetString(PyExc_IndexError, "index out of bounds");
+ return 0;
+} else {
+ char res[2];
+ res[0] = %CPPSELF.at(_i);
+ res[1] = 0;
+ return PyBytes_FromStringAndSize(res, 1);
+}
+// @snippet qbytearray-getitem
+
+// @snippet qbytearray-setitem
+%CPPSELF.remove(_i, 1);
+PyObject *args = Py_BuildValue("(nO)", _i, _value);
+PyObject *result = Sbk_QByteArrayFunc_insert(self, args);
+Py_DECREF(args);
+Py_XDECREF(result);
+return !result ? -1 : 0;
+// @snippet qbytearray-setitem
+
+// @snippet qfiledevice-unmap
+uchar *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1));
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(ptr);
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qfiledevice-unmap
+
+// @snippet qfiledevice-map
+%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(%1, %2, %3), %2, Shiboken::Buffer::ReadWrite);
+// @snippet qfiledevice-map
+
+// @snippet qiodevice-readdata
+QByteArray ba(1 + int(%2), char(0));
+%CPPSELF.%FUNCTION_NAME(ba.data(), int(%2));
+%PYARG_0 = Shiboken::String::fromCString(ba.constData());
+// @snippet qiodevice-readdata
+
+// @snippet qcryptographichash-adddata
+%CPPSELF.%FUNCTION_NAME(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1));
+// @snippet qcryptographichash-adddata
+
+// @snippet qsocketdescriptor
+#ifdef WIN32
+using DescriptorType = Qt::HANDLE;
+#else
+using DescriptorType = int;
+#endif
+// @snippet qsocketdescriptor
+
+// @snippet qsocketnotifier
+PyObject *socket = %PYARG_1;
+if (socket != nullptr) {
+ // We use qintptr as PyLong, but we check for int
+ // since it is currently an alias to be Python2 compatible.
+ // Internally, ints are qlonglongs.
+ if (%CHECKTYPE[int](socket)) {
+ int cppSocket = %CONVERTTOCPP[int](socket);
+ qintptr socket = (qintptr)cppSocket;
+ %0 = new %TYPE(socket, %2, %3);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "QSocketNotifier: first argument (socket) must be an int.");
+ }
+}
+// @snippet qsocketnotifier
+
+// @snippet qtranslator-load
+Py_ssize_t size;
+uchar *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1, &size));
+%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(const_cast<const uchar *>(ptr), size);
+%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));
+PyObject *pyTimer = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, 0);
+reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_init(pyTimer, emptyTuple, 0);
+
+auto timer = %CONVERTTOCPP[QTimer *](pyTimer);
+//XXX /|\ omitting this space crashes shiboken!
+Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer,
+ const_cast<char *>("connect"),
+ const_cast<char *>("OsOs"),
+ pyTimer,
+ SIGNAL(timeout()),
+ %PYARG_2,
+ %3)
+);
+Shiboken::Object::releaseOwnership((SbkObject *)pyTimer);
+Py_XDECREF(pyTimer);
+timer->setSingleShot(true);
+timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()));
+timer->start(%1);
+// @snippet qtimer-singleshot-1
+
+// @snippet qtimer-singleshot-2
+// %FUNCTION_NAME() - disable generation of c++ function call
+Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
+PyObject *pyTimer = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, 0);
+reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>())->tp_init(pyTimer, emptyTuple, 0);
+QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
+timer->setSingleShot(true);
+
+if (PyObject_TypeCheck(%2, PySideSignalInstanceTypeF())) {
+ PySideSignalInstance *signalInstance = reinterpret_cast<PySideSignalInstance *>(%2);
+ Shiboken::AutoDecRef signalSignature(Shiboken::String::fromFormat("2%s", PySide::Signal::getSignature(signalInstance)));
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer,
+ const_cast<char *>("connect"),
+ const_cast<char *>("OsOO"),
+ pyTimer,
+ SIGNAL(timeout()),
+ PySide::Signal::getObject(signalInstance),
+ signalSignature.object())
+ );
+} else {
+ Shiboken::AutoDecRef result(
+ PyObject_CallMethod(pyTimer,
+ const_cast<char *>("connect"),
+ const_cast<char *>("OsO"),
+ pyTimer,
+ SIGNAL(timeout()),
+ %PYARG_2)
+ );
+}
+
+timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()), Qt::DirectConnection);
+Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(pyTimer));
+Py_XDECREF(pyTimer);
+timer->start(%1);
+// @snippet qtimer-singleshot-2
+
+// @snippet qprocess-startdetached
+qint64 pid;
+%RETURN_TYPE retval = %TYPE::%FUNCTION_NAME(%1, %2, %3, &pid);
+%PYARG_0 = PyTuple_New(2);
+PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval));
+PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[qint64](pid));
+// @snippet qprocess-startdetached
+
+// @snippet qcoreapplication-init
+static void QCoreApplicationConstructor(PyObject *self, PyObject *pyargv, QCoreApplicationWrapper **cptr)
+{
+ static int argc;
+ static char **argv;
+ PyObject *stringlist = PyTuple_GET_ITEM(pyargv, 0);
+ if (Shiboken::listToArgcArgv(stringlist, &argc, &argv, "PySideApp")) {
+ *cptr = new QCoreApplicationWrapper(argc, argv);
+ Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject *>(self));
+ PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
+ }
+}
+// @snippet qcoreapplication-init
+
+// @snippet qcoreapplication-1
+QCoreApplicationConstructor(%PYSELF, args, &%0);
+// @snippet qcoreapplication-1
+
+// @snippet qcoreapplication-2
+PyObject *empty = PyTuple_New(2);
+if (!PyTuple_SetItem(empty, 0, PyList_New(0))) {
+ QCoreApplicationConstructor(%PYSELF, empty, &%0);
+}
+// @snippet qcoreapplication-2
+
+// @snippet qcoreapplication-instance
+PyObject *pyApp = Py_None;
+if (qApp) {
+ pyApp = reinterpret_cast<PyObject *>(
+ Shiboken::BindingManager::instance().retrieveWrapper(qApp));
+ if (!pyApp)
+ pyApp = %CONVERTTOPYTHON[QCoreApplication *](qApp);
+ // this will keep app live after python exit (extra ref)
+}
+// PYSIDE-571: make sure that we return the singleton "None"
+if (Py_TYPE(pyApp) == Py_TYPE(Py_None))
+ Py_DECREF(MakeQAppWrapper(nullptr));
+%PYARG_0 = pyApp;
+Py_XINCREF(%PYARG_0);
+// @snippet qcoreapplication-instance
+
+// @snippet qdatastream-readrawdata
+QByteArray data;
+data.resize(%2);
+int result = 0;
+Py_BEGIN_ALLOW_THREADS
+result = %CPPSELF.%FUNCTION_NAME(data.data(), data.size());
+Py_END_ALLOW_THREADS
+if (result == -1) {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+} else {
+ %PYARG_0 = PyBytes_FromStringAndSize(data.data(), result);
+}
+// @snippet qdatastream-readrawdata
+
+// @snippet qdatastream-writerawdata
+int r = 0;
+Py_BEGIN_ALLOW_THREADS
+r = %CPPSELF.%FUNCTION_NAME(%1, Shiboken::String::len(%PYARG_1));
+Py_END_ALLOW_THREADS
+%PYARG_0 = %CONVERTTOPYTHON[int](r);
+// @snippet qdatastream-writerawdata
+
+// @snippet releaseownership
+Shiboken::Object::releaseOwnership(%PYARG_0);
+// @snippet releaseownership
+
+// @snippet qanimationgroup-clear
+for (int counter = 0, count = %CPPSELF.animationCount(); counter < count; ++counter ) {
+ QAbstractAnimation *animation = %CPPSELF.animationAt(counter);
+ PyObject *obj = %CONVERTTOPYTHON[QAbstractAnimation *](animation);
+ Shiboken::Object::setParent(nullptr, obj);
+ Py_DECREF(obj);
+}
+%CPPSELF.clear();
+// @snippet qanimationgroup-clear
+
+// @snippet qeasingcurve
+PySideEasingCurveFunctor::init();
+// @snippet qeasingcurve
+
+// @snippet qeasingcurve-setcustomtype
+QEasingCurve::EasingFunction func = PySideEasingCurveFunctor::createCustomFuntion(%PYSELF, %PYARG_1);
+if (func)
+ %CPPSELF.%FUNCTION_NAME(func);
+// @snippet qeasingcurve-setcustomtype
+
+// @snippet qeasingcurve-customtype
+//%FUNCTION_NAME()
+%PYARG_0 = PySideEasingCurveFunctor::callable(%PYSELF);
+// @snippet qeasingcurve-customtype
+
+// @snippet qsignaltransition
+if (PyObject_TypeCheck(%1, PySideSignalInstanceTypeF())) {
+ PyObject *dataSource = PySide::Signal::getObject((PySideSignalInstance *)%PYARG_1);
+ Shiboken::AutoDecRef obType(PyObject_Type(dataSource));
+ QObject * sender = %CONVERTTOCPP[QObject *](dataSource);
+ //XXX /|\ omitting this space crashes shiboken!
+ if (sender) {
+ const char *dataSignature = PySide::Signal::getSignature((PySideSignalInstance *)%PYARG_1);
+ QByteArray signature(dataSignature); // Append SIGNAL flag (2)
+ signature.prepend('2');
+ %0 = new QSignalTransitionWrapper(sender, signature, %2);
+ }
+}
+// @snippet qsignaltransition
+
+// @snippet qstate-addtransition-1
+QString signalName(%2);
+if (PySide::SignalManager::registerMetaMethod(%1, signalName.mid(1).toLatin1().data(), QMetaMethod::Signal)) {
+ QSignalTransition *%0 = %CPPSELF->addTransition(%1, %2, %3);
+ %PYARG_0 = %CONVERTTOPYTHON[QSignalTransition *](%0);
+} else {
+ Py_INCREF(Py_None);
+ %PYARG_0 = Py_None;
+}
+// @snippet qstate-addtransition-1
+
+// @snippet qstate-addtransition-2
+// Obviously the label used by the following goto is a very awkward solution,
+// 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
+if (!PyObject_TypeCheck(%1, PySideSignalInstanceTypeF()))
+ goto Sbk_%TYPEFunc_%FUNCTION_NAME_TypeError;
+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);
+%PYARG_0 = %CONVERTTOPYTHON[QSignalTransition *](%0);
+// @snippet qstate-addtransition-2
+
+// @snippet qstatemachine-configuration
+%PYARG_0 = PySet_New(0);
+for (auto *abs_state : %CPPSELF.configuration()) {
+ Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractState *](abs_state));
+ Shiboken::Object::setParent(self, obj);
+ PySet_Add(%PYARG_0, obj);
+}
+// @snippet qstatemachine-configuration
+
+// @snippet qstatemachine-defaultanimations
+%PYARG_0 = PyList_New(0);
+for (auto *abs_anim : %CPPSELF.defaultAnimations()) {
+ Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractAnimation *](abs_anim));
+ Shiboken::Object::setParent(self, obj);
+ PyList_Append(%PYARG_0, obj);
+}
+// @snippet qstatemachine-defaultanimations
+
+// @snippet qt-signal
+%PYARG_0 = Shiboken::String::fromFormat("2%s",QMetaObject::normalizedSignature(%1).constData());
+// @snippet qt-signal
+
+// @snippet qt-slot
+%PYARG_0 = Shiboken::String::fromFormat("1%s",QMetaObject::normalizedSignature(%1).constData());
+// @snippet qt-slot
+
+// @snippet qt-registerresourcedata
+QT_BEGIN_NAMESPACE
+extern bool
+qRegisterResourceData(int,
+ const unsigned char *,
+ const unsigned char *,
+ const unsigned char *);
+
+extern bool
+qUnregisterResourceData(int,
+ const unsigned char *,
+ const unsigned char *,
+ const unsigned char *);
+QT_END_NAMESPACE
+// @snippet qt-registerresourcedata
+
+// @snippet qt-qregisterresourcedata
+%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_2)),
+ reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_3)),
+ reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_4)));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qt-qregisterresourcedata
+
+// @snippet qt-qunregisterresourcedata
+%RETURN_TYPE %0 = %FUNCTION_NAME(%1, reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_2)),
+ reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_3)),
+ reinterpret_cast<uchar *>(PyBytes_AS_STRING(%PYARG_4)));
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qt-qunregisterresourcedata
+
+// @snippet use-stream-for-format-security
+// Uses the stream version for security reasons
+// see gcc man page at -Wformat-security
+Py_BEGIN_ALLOW_THREADS
+%FUNCTION_NAME() << %1;
+Py_END_ALLOW_THREADS
+// @snippet use-stream-for-format-security
+
+// @snippet qresource-registerResource
+ auto ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1));
+ %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(const_cast<const uchar *>(ptr), %2);
+ %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+// @snippet qresource-registerResource
+
+// @snippet qstring-return
+%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
+// @snippet qstring-return
+
+// @snippet stream-write-method
+Py_BEGIN_ALLOW_THREADS
+(*%CPPSELF) << %1;
+Py_END_ALLOW_THREADS
+// @snippet stream-write-method
+
+// @snippet stream-read-method
+%RETURN_TYPE _cpp_result;
+Py_BEGIN_ALLOW_THREADS
+(*%CPPSELF) >> _cpp_result;
+Py_END_ALLOW_THREADS
+%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](_cpp_result);
+// @snippet stream-read-method
+
+// @snippet return-qstring-ref
+QString &res = *%0;
+%PYARG_0 = %CONVERTTOPYTHON[QString](res);
+// @snippet return-qstring-ref
+
+// @snippet return-readData
+%RETURN_TYPE %0 = 0;
+if (PyBytes_Check(%PYARG_0)) {
+ %0 = PyBytes_GET_SIZE((PyObject *)%PYARG_0);
+ memcpy(%1, PyBytes_AS_STRING((PyObject *)%PYARG_0), %0);
+} else if (Shiboken::String::check(%PYARG_0)) {
+ %0 = Shiboken::String::len((PyObject *)%PYARG_0);
+ memcpy(%1, Shiboken::String::toCString((PyObject *)%PYARG_0), %0);
+}
+// @snippet return-readData
+
+// @snippet qiodevice-readData
+QByteArray ba(1 + int(%2), char(0));
+Py_BEGIN_ALLOW_THREADS
+%CPPSELF.%FUNCTION_NAME(ba.data(), int(%2));
+Py_END_ALLOW_THREADS
+%PYARG_0 = Shiboken::String::fromCString(ba.constData());
+// @snippet qiodevice-readData
+
+// @snippet qt-module-shutdown
+{ // Avoid name clash
+ Shiboken::AutoDecRef regFunc(static_cast<PyObject *>(nullptr));
+ Shiboken::AutoDecRef atexit(Shiboken::Module::import("atexit"));
+ if (atexit.isNull()) {
+ qWarning("Module atexit not found for registering __moduleShutdown");
+ PyErr_Clear();
+ }else{
+ regFunc.reset(PyObject_GetAttrString(atexit, "register"));
+ if (regFunc.isNull()) {
+ qWarning("Function atexit.register not found for registering __moduleShutdown");
+ PyErr_Clear();
+ }
+ }
+ if (!atexit.isNull() && !regFunc.isNull()){
+ PyObject *shutDownFunc = PyObject_GetAttrString(module, "__moduleShutdown");
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, shutDownFunc);
+ Shiboken::AutoDecRef retval(PyObject_Call(regFunc, args, 0));
+ Q_ASSERT(!retval.isNull());
+ }
+}
+// @snippet qt-module-shutdown
+
+
+/*********************************************************************
+ * CONVERSIONS
+ ********************************************************************/
+
+// @snippet conversion-pybool
+%out = %OUTTYPE(%in == Py_True);
+// @snippet conversion-pybool
+
+// @snippet conversion-pylong
+%out = %OUTTYPE(PyLong_AsLong(%in));
+// @snippet conversion-pylong
+
+// @snippet conversion-pylong-unsigned
+%out = %OUTTYPE(PyLong_AsUnsignedLong(%in));
+// @snippet conversion-pylong-unsigned
+
+// @snippet conversion-pylong-quintptr
+#if QT_POINTER_SIZE == 8
+%out = %OUTTYPE(PyLong_AsUnsignedLongLong(%in));
+#else
+%out = %OUTTYPE(PyLong_AsUnsignedLong(%in));
+#endif
+// @snippet conversion-pylong-quintptr
+
+// @snippet conversion-pyunicode
+#ifndef Py_LIMITED_API
+Py_UNICODE *unicode = PyUnicode_AS_UNICODE(%in);
+# if defined(Py_UNICODE_WIDE)
+// cast as Py_UNICODE can be a different type
+# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+%out = QString::fromUcs4(reinterpret_cast<const char32_t *>(unicode));
+# else
+%out = QString::fromUcs4(reinterpret_cast<const uint *>(unicode));
+# endif // Qt 6
+# else // Py_UNICODE_WIDE
+# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+%out = QString::fromUtf16(reinterpret_cast<const char16_t *>(unicode), PepUnicode_GetLength(%in));
+# else
+%out = QString::fromUtf16(reinterpret_cast<const ushort *>(unicode), PepUnicode_GetLength(%in));
+# endif // Qt 6
+# endif
+#else
+wchar_t *temp = PyUnicode_AsWideCharString(%in, NULL);
+%out = QString::fromWCharArray(temp);
+PyMem_Free(temp);
+#endif
+// @snippet conversion-pyunicode
+
+// @snippet conversion-pynone
+%out = %OUTTYPE();
+// @snippet conversion-pynone
+
+// @snippet conversion-pystring-char
+char c = %CONVERTTOCPP[char](%in);
+%out = %OUTTYPE(c);
+// @snippet conversion-pystring-char
+
+// @snippet conversion-pyint
+int i = %CONVERTTOCPP[int](%in);
+%out = %OUTTYPE(i);
+// @snippet conversion-pyint
+
+// @snippet conversion-qlonglong
+// PYSIDE-1250: For QVariant, if the type fits into an int; use int preferably.
+qlonglong in = %CONVERTTOCPP[qlonglong](%in);
+constexpr qlonglong intMax = qint64(std::numeric_limits<int>::max());
+constexpr qlonglong intMin = qint64(std::numeric_limits<int>::min());
+%out = in >= intMin && in <= intMax ? %OUTTYPE(int(in)) : %OUTTYPE(in);
+// @snippet conversion-qlonglong
+
+// @snippet conversion-qstring
+QString in = %CONVERTTOCPP[QString](%in);
+%out = %OUTTYPE(in);
+// @snippet conversion-qstring
+
+// @snippet conversion-qbytearray
+QByteArray in = %CONVERTTOCPP[QByteArray](%in);
+%out = %OUTTYPE(in);
+// @snippet conversion-qbytearray
+
+// @snippet conversion-pyfloat
+double in = %CONVERTTOCPP[double](%in);
+%out = %OUTTYPE(in);
+// @snippet conversion-pyfloat
+
+// @snippet conversion-sbkobject
+// a class supported by QVariant?
+const QMetaType metaType = QVariant_resolveMetaType(Py_TYPE(%in));
+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));
+}
+// @snippet conversion-sbkobject
+
+// @snippet conversion-pydict
+QVariant ret = QVariant_convertToVariantMap(%in);
+%out = ret.isValid() ? ret : QVariant::fromValue(PySide::PyObjectWrapper(%in));
+// @snippet conversion-pydict
+
+// @snippet conversion-pylist
+QVariant ret = QVariant_convertToVariantList(%in);
+%out = ret.isValid() ? ret : QVariant::fromValue(PySide::PyObjectWrapper(%in));
+// @snippet conversion-pylist
+
+// @snippet conversion-pyobject
+// Is a shiboken type not known by Qt
+%out = QVariant::fromValue(PySide::PyObjectWrapper(%in));
+// @snippet conversion-pyobject
+
+// @snippet conversion-qjsonobject-pydict
+QVariant dict = QVariant_convertToVariantMap(%in);
+QJsonValue val = QJsonValue::fromVariant(dict);
+%out = val.toObject();
+// @snippet conversion-qjsonobject-pydict
+
+// @snippet conversion-qpair-pysequence
+%out.first = %CONVERTTOCPP[%OUTTYPE_0](PySequence_Fast_GET_ITEM(%in, 0));
+%out.second = %CONVERTTOCPP[%OUTTYPE_1](PySequence_Fast_GET_ITEM(%in, 1));
+// @snippet conversion-qpair-pysequence
+
+// @snippet conversion-qdate-pydate
+int day = PyDateTime_GET_DAY(%in);
+int month = PyDateTime_GET_MONTH(%in);
+int year = PyDateTime_GET_YEAR(%in);
+%out = %OUTTYPE(year, month, day);
+// @snippet conversion-qdate-pydate
+
+// @snippet conversion-qdatetime-pydatetime
+int day = PyDateTime_GET_DAY(%in);
+int month = PyDateTime_GET_MONTH(%in);
+int year = PyDateTime_GET_YEAR(%in);
+int hour = PyDateTime_DATE_GET_HOUR(%in);
+int min = PyDateTime_DATE_GET_MINUTE(%in);
+int sec = PyDateTime_DATE_GET_SECOND(%in);
+int usec = PyDateTime_DATE_GET_MICROSECOND(%in);
+%out = %OUTTYPE(QDate(year, month, day), QTime(hour, min, sec, usec/1000));
+// @snippet conversion-qdatetime-pydatetime
+
+// @snippet conversion-qtime-pytime
+int hour = PyDateTime_TIME_GET_HOUR(%in);
+int min = PyDateTime_TIME_GET_MINUTE(%in);
+int sec = PyDateTime_TIME_GET_SECOND(%in);
+int usec = PyDateTime_TIME_GET_MICROSECOND(%in);
+%out = %OUTTYPE(hour, min, sec, usec/1000);
+// @snippet conversion-qtime-pytime
+
+// @snippet conversion-qbytearray-pybytes
+%out = %OUTTYPE(PyBytes_AS_STRING(%in), PyBytes_GET_SIZE(%in));
+// @snippet conversion-qbytearray-pybytes
+
+// @snippet conversion-qbytearray-pybytearray
+%out = %OUTTYPE(PyByteArray_AsString(%in), PyByteArray_Size(%in));
+// @snippet conversion-qbytearray-pybytearray
+
+// @snippet conversion-qbytearray-pystring
+%out = %OUTTYPE(Shiboken::String::toCString(%in), Shiboken::String::len(%in));
+// @snippet conversion-qbytearray-pystring
+
+/*********************************************************************
+ * NATIVE TO TARGET CONVERSIONS
+ ********************************************************************/
+
+// @snippet return-pybool
+return PyBool_FromLong((bool)%in);
+// @snippet return-pybool
+
+// @snippet return-pybytes
+return PyBytes_FromStringAndSize(%in.constData(), %in.size());
+// @snippet return-pybytes
+
+// @snippet return-pylong
+return PyLong_FromLong(%in);
+// @snippet return-pylong
+
+// @snippet return-pylong-unsigned
+return PyLong_FromUnsignedLong(%in);
+// @snippet return-pylong-unsigned
+
+// @snippet return-pylong-quintptr
+#if QT_POINTER_SIZE == 8
+return PyLong_FromUnsignedLongLong(%in);
+#else
+return PyLong_FromUnsignedLong(%in);
+#endif
+// @snippet return-pylong-quintptr
+
+// @snippet return-pyunicode
+QByteArray ba = %in.toUtf8();
+return PyUnicode_FromStringAndSize(ba.constData(), ba.size());
+// @snippet return-pyunicode
+
+// @snippet return-pyunicode-qchar
+wchar_t c = (wchar_t)%in.unicode();
+return PyUnicode_FromWideChar(&c, 1);
+// @snippet return-pyunicode-qchar
+
+// @snippet return-qvariant
+if (!%in.isValid())
+ Py_RETURN_NONE;
+
+if (qstrcmp(%in.typeName(), "QVariantList") == 0) {
+ QList<QVariant> var = %in.value<QVariantList>();
+ return %CONVERTTOPYTHON[QList<QVariant>](var);
+}
+
+if (qstrcmp(%in.typeName(), "QStringList") == 0) {
+ QStringList var = %in.value<QStringList>();
+ return %CONVERTTOPYTHON[QList<QString>](var);
+}
+
+if (qstrcmp(%in.typeName(), "QVariantMap") == 0) {
+ QMap<QString, QVariant> var = %in.value<QVariantMap>();
+ return %CONVERTTOPYTHON[QMap<QString, QVariant>](var);
+}
+
+Shiboken::Conversions::SpecificConverter converter(cppInRef.typeName());
+if (converter) {
+ void *ptr = cppInRef.data();
+ return converter.toPython(ptr);
+}
+PyErr_Format(PyExc_RuntimeError, "Can't find converter for '%s'.", %in.typeName());
+return 0;
+// @snippet return-qvariant
+
+// @snippet return-qvariant-type
+const char *typeName = QMetaType(%in).name();
+PyObject *%out;
+PyTypeObject *pyType = nullptr;
+if (typeName)
+ pyType = Shiboken::Conversions::getPythonTypeObject(typeName);
+%out = pyType ? (reinterpret_cast<PyObject *>(pyType)) : Py_None;
+Py_INCREF(%out);
+return %out;
+// @snippet return-qvariant-type
+
+// @snippet return-qjsonobject
+// The QVariantMap returned by QJsonObject seems to cause a segfault, so
+// using QJsonObject.toVariantMap() won't work.
+// Wrapping it in a QJsonValue first allows it to work
+QJsonValue val(%in);
+QVariant ret = val.toVariant();
+
+return %CONVERTTOPYTHON[QVariant](ret);
+// @snippet return-qjsonobject
+
+// @snippet return-qpair
+PyObject *%out = PyTuple_New(2);
+PyTuple_SET_ITEM(%out, 0, %CONVERTTOPYTHON[%INTYPE_0](%in.first));
+PyTuple_SET_ITEM(%out, 1, %CONVERTTOPYTHON[%INTYPE_1](%in.second));
+return %out;
+// @snippet return-qpair
+
+// @snippet qthread_pthread_cleanup
+#ifdef Q_OS_UNIX
+# include <stdio.h>
+# include <pthread.h>
+static void qthread_pthread_cleanup(void *arg)
+{
+ // PYSIDE 1282: When terminating a thread using QThread::terminate()
+ // (pthread_cancel()), QThread::run() is aborted and the lock is released,
+ // but ~GilState() is still executed for some reason. Prevent it from
+ // releasing.
+ auto gil = reinterpret_cast<Shiboken::GilState *>(arg);
+ gil->abandon();
+}
+#endif // Q_OS_UNIX
+// @snippet qthread_pthread_cleanup
+
+// @snippet qthread_pthread_cleanup_install
+#ifdef Q_OS_UNIX
+pthread_cleanup_push(qthread_pthread_cleanup, &gil);
+#endif
+// @snippet qthread_pthread_cleanup_install
+
+// @snippet qthread_pthread_cleanup_uninstall
+#ifdef Q_OS_UNIX
+pthread_cleanup_pop(0);
+#endif
+// @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);
+#endif
+// @snippet qlibraryinfo_build
diff --git a/sources/pyside2/PySide2/glue/qtdatavisualization.cpp b/sources/pyside6/PySide6/glue/qtdatavisualization.cpp
index 119d79a40..119d79a40 100644
--- a/sources/pyside2/PySide2/glue/qtdatavisualization.cpp
+++ b/sources/pyside6/PySide6/glue/qtdatavisualization.cpp
diff --git a/sources/pyside2/PySide2/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index 869fb9dc4..869fb9dc4 100644
--- a/sources/pyside2/PySide2/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
diff --git a/sources/pyside2/PySide2/glue/qtmultimedia.cpp b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
index cbe1367cb..cbe1367cb 100644
--- a/sources/pyside2/PySide2/glue/qtmultimedia.cpp
+++ b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
diff --git a/sources/pyside2/PySide2/glue/qtnetwork.cpp b/sources/pyside6/PySide6/glue/qtnetwork.cpp
index cdb330c40..cdb330c40 100644
--- a/sources/pyside2/PySide2/glue/qtnetwork.cpp
+++ b/sources/pyside6/PySide6/glue/qtnetwork.cpp
diff --git a/sources/pyside2/PySide2/glue/qtopengl.cpp b/sources/pyside6/PySide6/glue/qtopengl.cpp
index 25b6ee096..25b6ee096 100644
--- a/sources/pyside2/PySide2/glue/qtopengl.cpp
+++ b/sources/pyside6/PySide6/glue/qtopengl.cpp
diff --git a/sources/pyside2/PySide2/glue/qtprintsupport.cpp b/sources/pyside6/PySide6/glue/qtprintsupport.cpp
index 300a498c0..300a498c0 100644
--- a/sources/pyside2/PySide2/glue/qtprintsupport.cpp
+++ b/sources/pyside6/PySide6/glue/qtprintsupport.cpp
diff --git a/sources/pyside2/PySide2/glue/qtqml.cpp b/sources/pyside6/PySide6/glue/qtqml.cpp
index eab6eab95..eab6eab95 100644
--- a/sources/pyside2/PySide2/glue/qtqml.cpp
+++ b/sources/pyside6/PySide6/glue/qtqml.cpp
diff --git a/sources/pyside2/PySide2/glue/qtquick.cpp b/sources/pyside6/PySide6/glue/qtquick.cpp
index b7c31aff3..b7c31aff3 100644
--- a/sources/pyside2/PySide2/glue/qtquick.cpp
+++ b/sources/pyside6/PySide6/glue/qtquick.cpp
diff --git a/sources/pyside2/PySide2/glue/qtscript.cpp b/sources/pyside6/PySide6/glue/qtscript.cpp
index cf168d6bd..cf168d6bd 100644
--- a/sources/pyside2/PySide2/glue/qtscript.cpp
+++ b/sources/pyside6/PySide6/glue/qtscript.cpp
diff --git a/sources/pyside6/PySide6/glue/qtuitools.cpp b/sources/pyside6/PySide6/glue/qtuitools.cpp
new file mode 100644
index 000000000..1d9ffe9b2
--- /dev/null
+++ b/sources/pyside6/PySide6/glue/qtuitools.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+// @snippet uitools-loadui
+/*
+ * Based on code provided by:
+ * Antonio Valentino <antonio.valentino at tiscali.it>
+ * Frédéric <frederic.mantegazza at gbiloba.org>
+ */
+
+#include <shiboken.h>
+#include <QUiLoader>
+#include <QFile>
+#include <QWidget>
+
+static void createChildrenNameAttributes(PyObject *root, QObject *object)
+{
+ for (auto *child : object->children()) {
+ const QByteArray name = child->objectName().toLocal8Bit();
+
+ if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
+ Shiboken::AutoDecRef attrName(Py_BuildValue("s", name.constData()));
+ if (!PyObject_HasAttr(root, attrName)) {
+ Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject *](child));
+ PyObject_SetAttr(root, attrName, pyChild);
+ }
+ createChildrenNameAttributes(root, child);
+ }
+ createChildrenNameAttributes(root, child);
+ }
+}
+
+static PyObject *QUiLoadedLoadUiFromDevice(QUiLoader *self, QIODevice *dev, QWidget *parent)
+{
+ QWidget *wdg = self->load(dev, parent);
+
+ if (wdg) {
+ PyObject *pyWdg = %CONVERTTOPYTHON[QWidget *](wdg);
+ createChildrenNameAttributes(pyWdg, wdg);
+ if (parent) {
+ Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget *](parent));
+ Shiboken::Object::setParent(pyParent, pyWdg);
+ }
+ return pyWdg;
+ }
+
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyExc_RuntimeError, "Unable to open/read ui device");
+ return nullptr;
+}
+
+static PyObject *QUiLoaderLoadUiFromFileName(QUiLoader *self, const QString &uiFile, QWidget *parent)
+{
+ QFile fd(uiFile);
+ return QUiLoadedLoadUiFromDevice(self, &fd, parent);
+}
+// @snippet uitools-loadui
+
+// @snippet quiloader
+Q_IMPORT_PLUGIN(PyCustomWidgets);
+// @snippet quiloader
+
+// @snippet quiloader-registercustomwidget
+registerCustomWidget(%PYARG_1);
+%CPPSELF.addPluginPath(""); // force reload widgets
+// @snippet quiloader-registercustomwidget
+
+// @snippet quiloader-load-1
+// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
+%PYARG_0 = QUiLoadedLoadUiFromDevice(%CPPSELF, %1, %2);
+// @snippet quiloader-load-1
+
+// @snippet quiloader-load-2
+// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
+%PYARG_0 = QUiLoaderLoadUiFromFileName(%CPPSELF, %1, %2);
+// @snippet quiloader-load-2
+
+// @snippet loaduitype
+/*
+Arguments:
+ %PYARG_1 (uifile)
+*/
+// 1. Generate the Python code from the UI file
+PyObject *strObj = PyUnicode_AsUTF8String(%PYARG_1);
+char *arg1 = PyBytes_AsString(strObj);
+QByteArray uiFileName(arg1);
+Py_DECREF(strObj);
+
+QFile uiFile(uiFileName);
+
+if (!uiFile.exists()) {
+ qCritical().noquote() << "File" << uiFileName << "does not exists";
+ Py_RETURN_NONE;
+}
+
+if (uiFileName.isEmpty()) {
+ qCritical() << "Error converting the UI filename to QByteArray";
+ 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");
+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";
+ Py_RETURN_NONE;
+}
+QByteArray uiFileContent = uicProcess.readAllStandardOutput();
+QByteArray errorOutput = uicProcess.readAllStandardError();
+
+if (!errorOutput.isEmpty()) {
+ qCritical().noquote() << errorOutput;
+ Py_RETURN_NONE;
+}
+
+// 2. Obtain the 'classname' and the Qt base class.
+QByteArray className;
+QByteArray baseClassName;
+
+// Problem
+// The generated Python file doesn't have the Qt Base class information.
+
+// Solution
+// Use the XML file
+if (!uiFile.open(QIODevice::ReadOnly))
+ Py_RETURN_NONE;
+
+// This will look for the first <widget> tag, e.g.:
+// <widget class="QWidget" name="ThemeWidgetForm">
+// and then extract the information from "class", and "name",
+// to get the baseClassName and className respectively
+QXmlStreamReader reader(&uiFile);
+while (!reader.atEnd() && baseClassName.isEmpty() && className.isEmpty()) {
+ auto token = reader.readNext();
+ if (token == QXmlStreamReader::StartElement && reader.name() == "widget") {
+ baseClassName = reader.attributes().value(QLatin1String("class")).toUtf8();
+ className = reader.attributes().value(QLatin1String("name")).toUtf8();
+ }
+}
+
+uiFile.close();
+
+if (className.isEmpty() || baseClassName.isEmpty() || reader.hasError()) {
+ qCritical() << "An error occurred when parsing the UI file while looking for the class info "
+ << reader.errorString();
+ Py_RETURN_NONE;
+}
+
+QByteArray pyClassName("Ui_"+className);
+
+PyObject *module = PyImport_ImportModule("__main__");
+PyObject *loc = PyModule_GetDict(module);
+
+// 3. exec() the code so the class exists in the context: exec(uiFileContent)
+// The context of PyRun_SimpleString is __main__.
+// 'Py_file_input' is the equivalent to using exec(), since it will execute
+// the code, without returning anything.
+Shiboken::AutoDecRef codeUi(Py_CompileString(uiFileContent.constData(), "<stdin>", Py_file_input));
+if (codeUi.isNull()) {
+ qCritical() << "Error while compiling the generated Python file";
+ Py_RETURN_NONE;
+}
+PyObject *uiObj = PyEval_EvalCode(codeUi, loc, loc);
+
+if (uiObj == nullptr) {
+ qCritical() << "Error while running exec() on the generated code";
+ Py_RETURN_NONE;
+}
+
+// 4. eval() the name of the class on a variable to return
+// 'Py_eval_input' is the equivalent to using eval(), since it will just
+// evaluate an expression.
+Shiboken::AutoDecRef codeClass(Py_CompileString(pyClassName.constData(),"<stdin>", Py_eval_input));
+if (codeClass.isNull()) {
+ qCritical() << "Error while compiling the Python class";
+ Py_RETURN_NONE;
+}
+
+Shiboken::AutoDecRef codeBaseClass(Py_CompileString(baseClassName.constData(), "<stdin>", Py_eval_input));
+if (codeBaseClass.isNull()) {
+ qCritical() << "Error while compiling the base class";
+ Py_RETURN_NONE;
+}
+
+PyObject *classObj = PyEval_EvalCode(codeClass, loc, loc);
+PyObject *baseClassObj = PyEval_EvalCode(codeBaseClass, loc, loc);
+
+%PYARG_0 = PyTuple_New(2);
+if (%PYARG_0 == nullptr) {
+ qCritical() << "Error while creating the return Tuple";
+ Py_RETURN_NONE;
+}
+PyTuple_SET_ITEM(%PYARG_0, 0, classObj);
+PyTuple_SET_ITEM(%PYARG_0, 1, baseClassObj);
+// @snippet loaduitype
diff --git a/sources/pyside2/PySide2/glue/qtwebenginewidgets.cpp b/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp
index 5ee9f3554..5ee9f3554 100644
--- a/sources/pyside2/PySide2/glue/qtwebenginewidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwebenginewidgets.cpp
diff --git a/sources/pyside2/PySide2/glue/qtwebkitwidgets.cpp b/sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp
index c0f182747..c0f182747 100644
--- a/sources/pyside2/PySide2/glue/qtwebkitwidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwebkitwidgets.cpp
diff --git a/sources/pyside2/PySide2/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp
index 4f9baadf1..4f9baadf1 100644
--- a/sources/pyside2/PySide2/glue/qtwidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwidgets.cpp
diff --git a/sources/pyside2/PySide2/glue/qtxml.cpp b/sources/pyside6/PySide6/glue/qtxml.cpp
index 684ff33c4..684ff33c4 100644
--- a/sources/pyside2/PySide2/glue/qtxml.cpp
+++ b/sources/pyside6/PySide6/glue/qtxml.cpp
diff --git a/sources/pyside2/PySide2/glue/qtxmlpatterns.cpp b/sources/pyside6/PySide6/glue/qtxmlpatterns.cpp
index 75ad3b265..75ad3b265 100644
--- a/sources/pyside2/PySide2/glue/qtxmlpatterns.cpp
+++ b/sources/pyside6/PySide6/glue/qtxmlpatterns.cpp
diff --git a/sources/pyside2/PySide2/licensecomment.txt b/sources/pyside6/PySide6/licensecomment.txt
index 9d271ba2a..9d271ba2a 100644
--- a/sources/pyside2/PySide2/licensecomment.txt
+++ b/sources/pyside6/PySide6/licensecomment.txt
diff --git a/sources/pyside2/PySide2/py.typed.in b/sources/pyside6/PySide6/py.typed.in
index 0e76a07dc..0e76a07dc 100644
--- a/sources/pyside2/PySide2/py.typed.in
+++ b/sources/pyside6/PySide6/py.typed.in
diff --git a/sources/pyside2/PySide2/pysideqtesttouch.h b/sources/pyside6/PySide6/pysideqtesttouch.h
index 935ab59d6..935ab59d6 100644
--- a/sources/pyside2/PySide2/pysideqtesttouch.h
+++ b/sources/pyside6/PySide6/pysideqtesttouch.h
diff --git a/sources/pyside2/PySide2/pysidewtypes.h b/sources/pyside6/PySide6/pysidewtypes.h
index e14727427..e14727427 100644
--- a/sources/pyside2/PySide2/pysidewtypes.h
+++ b/sources/pyside6/PySide6/pysidewtypes.h
diff --git a/sources/pyside2/PySide2/qpytextobject.cpp b/sources/pyside6/PySide6/qpytextobject.cpp
index 9bab45e30..9bab45e30 100644
--- a/sources/pyside2/PySide2/qpytextobject.cpp
+++ b/sources/pyside6/PySide6/qpytextobject.cpp
diff --git a/sources/pyside2/PySide2/qpytextobject.h b/sources/pyside6/PySide6/qpytextobject.h
index 1968ac385..1968ac385 100644
--- a/sources/pyside2/PySide2/qpytextobject.h
+++ b/sources/pyside6/PySide6/qpytextobject.h
diff --git a/sources/pyside2/PySide2/qt.conf.in b/sources/pyside6/PySide6/qt.conf.in
index ff5b0a30e..ff5b0a30e 100644
--- a/sources/pyside2/PySide2/qt.conf.in
+++ b/sources/pyside6/PySide6/qt.conf.in
diff --git a/sources/pyside2/PySide2/qtcorehelper.h b/sources/pyside6/PySide6/qtcorehelper.h
index 22b87fc0e..22b87fc0e 100644
--- a/sources/pyside2/PySide2/qtcorehelper.h
+++ b/sources/pyside6/PySide6/qtcorehelper.h
diff --git a/sources/pyside2/PySide2/support/__init__.py b/sources/pyside6/PySide6/support/__init__.py
index 996acb05a..996acb05a 100644
--- a/sources/pyside2/PySide2/support/__init__.py
+++ b/sources/pyside6/PySide6/support/__init__.py
diff --git a/sources/pyside6/PySide6/support/deprecated.py b/sources/pyside6/PySide6/support/deprecated.py
new file mode 100644
index 000000000..d62400c81
--- /dev/null
+++ b/sources/pyside6/PySide6/support/deprecated.py
@@ -0,0 +1,80 @@
+# This Python file uses the following encoding: utf-8
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+"""
+deprecated.py
+
+This module contains deprecated things that are removed from the interface.
+They are implemented in Python again, together with a deprecation warning.
+
+Functions that are to be called for
+ PySide6.<module> must be named
+ fix_for_<module> .
+
+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
new file mode 100644
index 000000000..60a0df294
--- /dev/null
+++ b/sources/pyside6/PySide6/support/generate_pyi.py
@@ -0,0 +1,324 @@
+# This Python file uses the following encoding: utf-8
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import, unicode_literals
+
+"""
+generate_pyi.py
+
+This script generates the .pyi files for all PySide modules.
+"""
+
+import sys
+import os
+import io
+import re
+import subprocess
+import argparse
+from contextlib import contextmanager
+from textwrap import dedent
+import logging
+
+
+# Make sure not to get .pyc in Python2.
+sourcepath = os.path.splitext(__file__)[0] + ".py"
+
+# Can we use forward references?
+USE_PEP563 = sys.version_info[:2] >= (3, 7)
+
+indent = " " * 4
+is_py3 = sys.version_info[0] == 3
+is_ci = os.environ.get("QTEST_ENVIRONMENT", "") == "ci"
+is_debug = is_ci or os.environ.get("QTEST_ENVIRONMENT")
+
+logging.basicConfig(level=logging.DEBUG if is_debug else logging.INFO)
+logger = logging.getLogger("generate_pyi")
+
+
+class Writer(object):
+ def __init__(self, outfile):
+ self.outfile = outfile
+ self.history = [True, True]
+
+ def print(self, *args, **kw):
+ # controlling too much blank lines
+ if self.outfile:
+ if args == () or args == ("",):
+ # Python 2.7 glitch: Empty tuples have wrong encoding.
+ # But we use that to skip too many blank lines:
+ if self.history[-2:] == [True, True]:
+ return
+ print("", file=self.outfile, **kw)
+ self.history.append(True)
+ else:
+ print(*args, file=self.outfile, **kw)
+ self.history.append(False)
+
+
+class Formatter(Writer):
+ """
+ Formatter is formatting the signature listing of an enumerator.
+
+ It is written as context managers in order to avoid many callbacks.
+ The separation in formatter and enumerator is done to keep the
+ unrelated tasks of enumeration and formatting apart.
+ """
+ def __init__(self, *args):
+ Writer.__init__(self, *args)
+ # patching __repr__ to disable the __repr__ of typing.TypeVar:
+ """
+ def __repr__(self):
+ if self.__covariant__:
+ prefix = '+'
+ elif self.__contravariant__:
+ prefix = '-'
+ else:
+ prefix = '~'
+ return prefix + self.__name__
+ """
+ def _typevar__repr__(self):
+ return "typing." + self.__name__
+ typing.TypeVar.__repr__ = _typevar__repr__
+
+ # Adding a pattern to substitute "Union[T, NoneType]" by "Optional[T]"
+ # I tried hard to replace typing.Optional by a simple override, but
+ # this became _way_ too much.
+ # See also the comment in layout.py .
+ brace_pat = build_brace_pattern(3)
+ pattern = fr"\b Union \s* \[ \s* {brace_pat} \s*, \s* NoneType \s* \]"
+ replace = r"Optional[\1]"
+ optional_searcher = re.compile(pattern, flags=re.VERBOSE)
+ def optional_replacer(source):
+ return optional_searcher.sub(replace, str(source))
+ self.optional_replacer = optional_replacer
+ # self.level is maintained by enum_sig.py
+ # self.after_enum() is a one-shot set by enum_sig.py .
+
+ @contextmanager
+ def module(self, mod_name):
+ self.mod_name = mod_name
+ self.print("# Module", mod_name)
+ self.print("import PySide6")
+ from PySide6.support.signature import typing
+ self.print("try:")
+ self.print(" import typing")
+ self.print("except ImportError:")
+ self.print(" from PySide6.support.signature import typing")
+ self.print("from PySide6.support.signature.mapping import (")
+ self.print(" Virtual, Missing, Invalid, Default, Instance)")
+ self.print()
+ self.print("class Object(object): pass")
+ self.print()
+ self.print("import shiboken6 as Shiboken")
+ self.print("Shiboken.Object = Object")
+ self.print()
+ # This line will be replaced by the missing imports postprocess.
+ self.print("IMPORTS")
+ yield
+
+ @contextmanager
+ def klass(self, class_name, class_str):
+ spaces = indent * self.level
+ while "." in class_name:
+ class_name = class_name.split(".", 1)[-1]
+ class_str = class_str.split(".", 1)[-1]
+ self.print()
+ if self.level == 0:
+ self.print()
+ here = self.outfile.tell()
+ if self.have_body:
+ self.print(f"{spaces}class {class_str}:")
+ else:
+ self.print(f"{spaces}class {class_str}: ...")
+ yield
+
+ @contextmanager
+ def function(self, func_name, signature):
+ if self.after_enum() or func_name == "__init__":
+ self.print()
+ key = func_name
+ spaces = indent * self.level
+ if type(signature) == type([]):
+ for sig in signature:
+ self.print(f'{spaces}@typing.overload')
+ self._function(func_name, sig, spaces)
+ else:
+ self._function(func_name, signature, spaces)
+ if func_name == "__init__":
+ self.print()
+ yield key
+
+ def _function(self, func_name, signature, spaces):
+ if "self" not in tuple(signature.parameters.keys()):
+ self.print(f'{spaces}@staticmethod')
+ signature = self.optional_replacer(signature)
+ self.print(f'{spaces}def {func_name}{signature}: ...')
+
+ @contextmanager
+ def enum(self, class_name, enum_name, value):
+ spaces = indent * self.level
+ hexval = hex(value)
+ self.print(f"{spaces}{enum_name:25}: {class_name} = ... # {hexval}")
+ yield
+
+
+def get_license_text():
+ with io.open(sourcepath) as f:
+ lines = f.readlines()
+ license_line = next((lno for lno, line in enumerate(lines)
+ if "$QT_END_LICENSE$" in line))
+ return "".join(lines[:license_line + 3])
+
+
+def find_imports(text):
+ return [imp for imp in PySide6.__all__ if imp + "." in text]
+
+
+def generate_pyi(import_name, outpath, options):
+ """
+ Generates a .pyi file.
+ """
+ plainname = import_name.split(".")[-1]
+ outfilepath = os.path.join(outpath, plainname + ".pyi")
+ top = __import__(import_name)
+ obj = getattr(top, plainname)
+ if not getattr(obj, "__file__", None) or os.path.isdir(obj.__file__):
+ raise ModuleNotFoundError(f"We do not accept a namespace as module {plainname}")
+ module = sys.modules[import_name]
+
+ outfile = io.StringIO()
+ fmt = Formatter(outfile)
+ fmt.print(get_license_text()) # which has encoding, already
+ need_imports = not USE_PEP563
+ if USE_PEP563:
+ fmt.print("from __future__ import annotations")
+ fmt.print()
+ fmt.print(dedent(f'''\
+ """
+ This file contains the exact signatures for all functions in module
+ {import_name}, except for defaults which are replaced by "...".
+ """
+ '''))
+ HintingEnumerator(fmt).module(import_name)
+ fmt.print()
+ fmt.print("# eof")
+ # Postprocess: resolve the imports
+ with open(outfilepath, "w") as realfile:
+ wr = Writer(realfile)
+ outfile.seek(0)
+ while True:
+ line = outfile.readline()
+ if not line:
+ break
+ line = line.rstrip()
+ # we remove the IMPORTS marker and insert imports if needed
+ if line == "IMPORTS":
+ if need_imports:
+ for mod_name in find_imports(outfile.getvalue()):
+ imp = "PySide6." + mod_name
+ if imp != import_name:
+ wr.print("import " + imp)
+ wr.print("import " + import_name)
+ wr.print()
+ wr.print()
+ else:
+ wr.print(line)
+ logger.info(f"Generated: {outfilepath}")
+ if is_py3 and (options.check or is_ci):
+ # Python 3: We can check the file directly if the syntax is ok.
+ subprocess.check_output([sys.executable, outfilepath])
+
+
+def generate_all_pyi(outpath, options):
+ ps = os.pathsep
+ if options.sys_path:
+ # make sure to propagate the paths from sys_path to subprocesses
+ sys_path = [os.path.normpath(_) for _ in options.sys_path]
+ sys.path[0:0] = sys_path
+ pypath = ps.join(sys_path)
+ os.environ["PYTHONPATH"] = pypath
+
+ # now we can import
+ global PySide6, inspect, typing, HintingEnumerator, build_brace_pattern
+ import PySide6
+ from PySide6.support.signature import inspect, typing
+ from PySide6.support.signature.lib.enum_sig import HintingEnumerator
+ from PySide6.support.signature.lib.tool import build_brace_pattern
+
+ # propagate USE_PEP563 to the mapping module.
+ # Perhaps this can be automated?
+ PySide6.support.signature.mapping.USE_PEP563 = USE_PEP563
+
+ outpath = outpath or os.path.dirname(PySide6.__file__)
+ name_list = PySide6.__all__ if options.modules == ["all"] else options.modules
+ errors = ", ".join(set(name_list) - set(PySide6.__all__))
+ if errors:
+ raise ImportError(f"The module(s) '{errors}' do not exist")
+ quirk1, quirk2 = "QtMultimedia", "QtMultimediaWidgets"
+ if name_list == [quirk1]:
+ logger.debug(f"Note: We must defer building of {quirk1}.pyi until {quirk2} is available")
+ name_list = []
+ elif name_list == [quirk2]:
+ name_list = [quirk1, quirk2]
+ for mod_name in name_list:
+ import_name = "PySide6." + mod_name
+ generate_pyi(import_name, outpath, options)
+
+
+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.)")
+ 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)")
+ parser.add_argument("--sys-path", nargs="+",
+ help="a list of strings prepended to sys.path")
+ options = parser.parse_args()
+ if options.quiet:
+ logger.setLevel(logging.WARNING)
+ outpath = options.outpath
+ if outpath and not os.path.exists(outpath):
+ os.makedirs(outpath)
+ logger.info(f"+++ Created path {outpath}")
+ generate_all_pyi(outpath, options=options)
+# eof
diff --git a/sources/pyside2/PySide2/templates/core_common.xml b/sources/pyside6/PySide6/templates/core_common.xml
index a7c9eca3d..a7c9eca3d 100644
--- a/sources/pyside2/PySide2/templates/core_common.xml
+++ b/sources/pyside6/PySide6/templates/core_common.xml
diff --git a/sources/pyside2/PySide2/templates/datavisualization_common.xml b/sources/pyside6/PySide6/templates/datavisualization_common.xml
index d5434dc75..d5434dc75 100644
--- a/sources/pyside2/PySide2/templates/datavisualization_common.xml
+++ b/sources/pyside6/PySide6/templates/datavisualization_common.xml
diff --git a/sources/pyside6/PySide6/templates/gui_common.xml b/sources/pyside6/PySide6/templates/gui_common.xml
new file mode 100644
index 000000000..1869af8bb
--- /dev/null
+++ b/sources/pyside6/PySide6/templates/gui_common.xml
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem>
+ <template name="QFontCharFix">
+ int size = Shiboken::String::len(%PYARG_1);
+ if (size == 1) {
+ const char *str = Shiboken::String::toCString(%PYARG_1);
+ QChar ch(str[0]);
+ %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(ch);
+ %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "String must have only one character");
+ }
+ </template>
+
+ <template name="load_xpm">
+ Shiboken::AutoDecRef strList(PySequence_Fast(%PYARG_1, "Invalid sequence."));
+ int lineCount = PySequence_Fast_GET_SIZE(strList.object());
+ for (int line = 0; line &lt; lineCount; ++line) {
+ if (!Shiboken::String::check(PySequence_Fast_GET_ITEM(strList.object(), line))) {
+ PyErr_SetString(PyExc_TypeError, "The argument must be a sequence of strings.");
+ break;
+ }
+ }
+
+ const char **xpm = reinterpret_cast&lt;const char**&gt;(malloc(lineCount * sizeof(const char**)));
+ for (int line = 0; line &lt; lineCount; ++line)
+ xpm[line] = Shiboken::String::toCString(PySequence_Fast_GET_ITEM(strList.object(), line));
+
+ %0 = new %TYPE(xpm);
+
+ free(xpm);
+ </template>
+
+ <template name="qmatrix_map">
+ %ARG1_TYPE a, b;
+ %CPPSELF.%FUNCTION_NAME(%1, %2, &amp;a, &amp;b);
+ %PYARG_0 = PyTuple_New(2);
+ PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%ARG1_TYPE](a));
+ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](b));
+ </template>
+
+ <template name="qimage_buffer_constructor">
+ auto ptr = reinterpret_cast&lt;uchar*&gt;(Shiboken::Buffer::getPointer(%PYARG_1));
+ %0 = new %TYPE(ptr, %ARGS);
+ </template>
+
+ <template name="qcolor_repr">
+ switch(%CPPSELF.spec()) {
+ case QColor::Rgb:
+ {
+ float r, g, b, a;
+ %CPPSELF.getRgbF(&amp;r, &amp;g, &amp;b, &amp;a);
+ QString repr = QString::asprintf("PySide6.QtGui.QColor.fromRgbF(%.6f, %.6f, %.6f, %.6f)", r, g, b, a);
+ %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
+ break;
+ }
+ case QColor::Hsv:
+ {
+ float h, s, v, a;
+ %CPPSELF.getHsvF(&amp;h, &amp;s, &amp;v, &amp;a);
+ QString repr = QString::asprintf("PySide6.QtGui.QColor.fromHsvF(%.6f, %.6f, %.6f, %.6f)", h, s, v, a);
+ %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
+ break;
+ }
+ case QColor::Cmyk:
+ {
+ float c, m, y, k, a;
+ %CPPSELF.getCmykF(&amp;c, &amp;m, &amp;y, &amp;k, &amp;a);
+ QString repr = QString::asprintf("PySide6.QtGui.QColor.fromCmykF(%.6f, %.6f, %.6f, %.6f, %.6f)", c, m, y, k, a);
+ %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
+ break;
+ }
+ case QColor::Hsl:
+ {
+ float h, s, l, a;
+ %CPPSELF.getHslF(&amp;h, &amp;s, &amp;l, &amp;a);
+ QString repr = QString::asprintf("PySide6.QtGui.QColor.fromHslF(%.6f, %.6f, %.6f, %.6f)", h, s, l, a);
+ %PYARG_0 = Shiboken::String::fromCString(qPrintable(repr));
+ break;
+ }
+ default:
+ {
+ %PYARG_0 = Shiboken::String::fromCString("PySide6.QtGui.QColor()");
+ }
+ }
+ </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;
+
+ if (PySequence_Check(%PYARG_0)) {
+ Shiboken::AutoDecRef seq(PySequence_Fast(%PYARG_0, 0));
+ int size = PySequence_Fast_GET_SIZE(seq.object());
+
+ if (size > 1) {
+ if (%ISCONVERTIBLE[QString](PySequence_Fast_GET_ITEM(seq.object(), 1)))
+ %1 = %CONVERTTOCPP[QString](PySequence_Fast_GET_ITEM(seq.object(), 1));
+ else
+ qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to unicode.");
+ }
+
+ if (size > 2) {
+ if (%ISCONVERTIBLE[int](PySequence_Fast_GET_ITEM(seq.object(), 2)))
+ %2 = %CONVERTTOCPP[int](PySequence_Fast_GET_ITEM(seq.object(), 2));
+ else
+ qWarning("%TYPE::%FUNCTION_NAME: Second tuple element is not convertible to int.");
+ }
+ %PYARG_0.reset(PySequence_Fast_GET_ITEM(seq.object(), 0));
+ Py_INCREF(%PYARG_0); // we need to incref, because "%PYARG_0 = ..." will decref the tuple and the tuple will be decrefed again at the end of this scope.
+ }
+
+ // check retrun value
+ if (%ISCONVERTIBLE[QValidator::State](%PYARG_0)) {
+ %out = %CONVERTTOCPP[QValidator::State](%PYARG_0);
+ } else {
+ PyErr_Format(PyExc_TypeError, "Invalid return value in function %s, expected %s, got %s.",
+ "QValidator.validate",
+ "PySide6.QtGui.QValidator.State, (PySide6.QtGui.QValidator.State,), (PySide6.QtGui.QValidator.State, unicode) or (PySide6.QtGui.QValidator.State, unicode, int)",
+ Py_TYPE(pyResult)->tp_name);
+ return QValidator::State();
+ }
+ </template>
+
+ <template name="qpainter_drawlist">
+ %CPPSELF.%FUNCTION_NAME(%1.data(), %1.size());
+ </template>
+
+ <template name="inplace_add">
+ *%CPPSELF += %1;
+ return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
+ </template>
+
+ <template name="inplace_sub">
+ *%CPPSELF -= %1;
+ return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
+ </template>
+
+ <template name="inplace_mult">
+ *%CPPSELF *= %1;
+ return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
+ </template>
+
+ <template name="inplace_div">
+ *%CPPSELF /= %1;
+ return %CONVERTTOPYTHON[%RETURN_TYPE](*%CPPSELF);
+ </template>
+
+ <template name="return_QString_native">
+ if (%ISCONVERTIBLE[QString](%PYARG_0))
+ %1 = %CONVERTTOCPP[QString](%PYARG_0);
+ else
+ qWarning("%TYPE::%FUNCTION_NAME: Argument is not convertible to unicode.");
+ </template>
+
+ <template name="repr_code_matrix">
+ QByteArray format(Py_TYPE(%PYSELF)->tp_name);
+ format += QByteArray("((");
+
+ QList&lt; %MATRIX_TYPE &gt; cppArgs;
+ %MATRIX_TYPE data[%MATRIX_SIZE];
+ %CPPSELF.copyDataTo(data);
+ int matrixSize = %MATRIX_SIZE;
+ for(int size=0; size &lt; matrixSize; size++) {
+ if (size > 0)
+ format += ", ";
+ format += QByteArray::number(data[size]);
+ }
+ format += "))";
+
+ %PYARG_0 = Shiboken::String::fromStringAndSize(format, format.size());
+ </template>
+
+ <template name="reduce_code_matrix">
+ QList&lt; %MATRIX_TYPE &gt; cppArgs;
+ %MATRIX_TYPE data[%MATRIX_SIZE];
+ %CPPSELF.copyDataTo(data);
+ int matrixSize = %MATRIX_SIZE;
+ for(int size=0; size &lt; matrixSize; size++)
+ cppArgs.append(data[size]);
+
+ PyObject *type = PyObject_Type(%PYSELF);
+ PyObject *args = Py_BuildValue("(N)",
+ %CONVERTTOPYTHON[QList&lt;%MATRIX_TYPE&gt; ](cppArgs));
+ %PYARG_0 = Py_BuildValue("(NN)", type, args);
+ </template>
+
+ <template name="matrix_data_function">
+ const float* data = %CPPSELF.constData();
+ PyObject *pyData = PyTuple_New(%MATRIX_SIZE);
+ if (data) {
+ for(int i=0; i &lt; %MATRIX_SIZE; i++)
+ PyTuple_SET_ITEM(pyData, i, %CONVERTTOPYTHON[float](data[i]));
+ }
+ return pyData;
+ </template>
+
+ <template name="matrix_constructor">
+ // PYSIDE-795: All PySequences can be made iterable with PySequence_Fast.
+ Shiboken::AutoDecRef seq(PySequence_Fast(%PYARG_1, "Can't turn into sequence"));
+ if (PySequence_Size(seq) == %SIZE) {
+ Shiboken::AutoDecRef fast(PySequence_Fast(seq,
+ "Failed to parse sequence on %TYPE constructor."));
+ float values[%SIZE];
+ for(int i=0; i &lt; %SIZE; i++) {
+ PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
+ values[i] = %CONVERTTOCPP[float](pv);
+ }
+ %0 = new %TYPE(values);
+ }
+ </template>
+
+ <template name="fix_args,QRectF*">
+ QRectF rect_;
+ %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
+ %PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
+ </template>
+
+ <template name="fix_args,QRect*">
+ QRect rect_;
+ %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
+ %PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
+ </template>
+
+ <template name="__next__">
+ if (!%CPPSELF.atEnd()) {
+ %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](*%CPPSELF);
+ ++(*%CPPSELF);
+ }
+ </template>
+
+ <template name="__iter_parent__">
+ %CPPSELF_TYPE _tmp = %CPPSELF.begin();
+ %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](_tmp);
+ </template>
+
+ <template name="const_char_pybuffer">
+ PyObject *%out = Shiboken::Buffer::newObject(%in, size);
+ </template>
+
+ <template name="pybuffer_const_char">
+ Py_ssize_t bufferLen;
+ char *%out = reinterpret_cast&lt;char*&gt;(Shiboken::Buffer::getPointer(%PYARG_1, &amp;bufferLen));
+ </template>
+
+ <template name="uint_remove">
+ uint %out = bufferLen;
+ </template>
+
+ <template name="pybytes_const_uchar">
+ const uchar *%out = reinterpret_cast&lt;const uchar*>(PyBytes_AS_STRING(%PYARG_1));
+ </template>
+
+ <template name="pybytes_uint">
+ uint %out = static_cast&lt;uint>(PyBytes_Size(%PYARG_1));
+ </template>
+
+
+</typesystem>
diff --git a/sources/pyside2/PySide2/templates/opengl_common.xml b/sources/pyside6/PySide6/templates/opengl_common.xml
index ee7b021dd..ee7b021dd 100644
--- a/sources/pyside2/PySide2/templates/opengl_common.xml
+++ b/sources/pyside6/PySide6/templates/opengl_common.xml
diff --git a/sources/pyside2/PySide2/templates/openglfunctions_common.xml b/sources/pyside6/PySide6/templates/openglfunctions_common.xml
index 117229a29..117229a29 100644
--- a/sources/pyside2/PySide2/templates/openglfunctions_common.xml
+++ b/sources/pyside6/PySide6/templates/openglfunctions_common.xml
diff --git a/sources/pyside2/PySide2/templates/webkitwidgets_common.xml b/sources/pyside6/PySide6/templates/webkitwidgets_common.xml
index 9d0c8e587..9d0c8e587 100644
--- a/sources/pyside2/PySide2/templates/webkitwidgets_common.xml
+++ b/sources/pyside6/PySide6/templates/webkitwidgets_common.xml
diff --git a/sources/pyside2/PySide2/templates/widgets_common.xml b/sources/pyside6/PySide6/templates/widgets_common.xml
index 9ce01e79a..9ce01e79a 100644
--- a/sources/pyside2/PySide2/templates/widgets_common.xml
+++ b/sources/pyside6/PySide6/templates/widgets_common.xml
diff --git a/sources/pyside2/PySide2/templates/xml_common.xml b/sources/pyside6/PySide6/templates/xml_common.xml
index 0a6ae4906..0a6ae4906 100644
--- a/sources/pyside2/PySide2/templates/xml_common.xml
+++ b/sources/pyside6/PySide6/templates/xml_common.xml
diff --git a/sources/pyside2/cmake/Macros/FindQt5Extra.cmake b/sources/pyside6/cmake/Macros/FindQt5Extra.cmake
index 71846e48a..71846e48a 100644
--- a/sources/pyside2/cmake/Macros/FindQt5Extra.cmake
+++ b/sources/pyside6/cmake/Macros/FindQt5Extra.cmake
diff --git a/sources/pyside6/cmake/Macros/PySideModules.cmake b/sources/pyside6/cmake/Macros/PySideModules.cmake
new file mode 100644
index 000000000..a3bab2164
--- /dev/null
+++ b/sources/pyside6/cmake/Macros/PySideModules.cmake
@@ -0,0 +1,253 @@
+include(CMakeParseArguments)
+
+# A version of cmake_parse_arguments that makes sure all arguments are processed and errors out
+# with a message about ${type} having received unknown arguments.
+macro(pyside_parse_all_arguments prefix type flags options multiopts)
+ cmake_parse_arguments(${prefix} "${flags}" "${options}" "${multiopts}" ${ARGN})
+ if(DEFINED ${prefix}_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments were passed to ${type} (${${prefix}_UNPARSED_ARGUMENTS}).")
+ endif()
+endmacro()
+
+macro(make_path varname)
+ # accepts any number of path variables
+ string(REPLACE ";" "${PATH_SEP}" ${varname} "${ARGN}")
+endmacro()
+
+macro(unmake_path varname)
+ string(REPLACE "${PATH_SEP}" ";" ${varname} "${ARGN}")
+endmacro()
+
+# Sample usage
+# create_pyside_module(NAME QtGui
+# INCLUDE_DIRS QtGui_include_dirs
+# LIBRARIES QtGui_libraries
+# DEPS QtGui_deps
+# TYPESYSTEM_PATH QtGui_SOURCE_DIR
+# SOURCES QtGui_SRC
+# STATIC_SOURCES QtGui_static_sources
+# TYPESYSTEM_NAME ${QtGui_BINARY_DIR}/typesystem_gui.xml
+# DROPPED_ENTRIES QtGui_DROPPED_ENTRIES
+# GLUE_SOURCES QtGui_glue_sources)
+macro(create_pyside_module)
+ pyside_parse_all_arguments(
+ "module" # Prefix
+ "create_pyside_module" # Macro name
+ "" # Flags
+ "NAME;TYPESYSTEM_PATH;TYPESYSTEM_NAME" # Single value
+ "INCLUDE_DIRS;LIBRARIES;DEPS;SOURCES;STATIC_SOURCES;DROPPED_ENTRIES;GLUE_SOURCES" # Multival
+ ${ARGN} # Number of arguments given when the macros is called
+ )
+
+ if ("${module_NAME}" STREQUAL "")
+ message(FATAL_ERROR "create_pyside_module needs a NAME value.")
+ endif()
+ if ("${module_INCLUDE_DIRS}" STREQUAL "")
+ message(FATAL_ERROR "create_pyside_module needs at least one INCLUDE_DIRS value.")
+ endif()
+ if ("${module_TYPESYSTEM_PATH}" STREQUAL "")
+ message(FATAL_ERROR "create_pyside_module needs a TYPESYSTEM_PATH value.")
+ endif()
+ if ("${module_SOURCES}" STREQUAL "")
+ message(FATAL_ERROR "create_pyside_module needs at least one SOURCES value.")
+ endif()
+
+ string(TOLOWER ${module_NAME} _module)
+ string(REGEX REPLACE ^qt "" _module ${_module})
+
+ if(${module_DROPPED_ENTRIES})
+ string(REPLACE ";" "\\;" dropped_entries "${${module_DROPPED_ENTRIES}}")
+ else()
+ set (dropped_entries "")
+ endif()
+
+ if(${module_GLUE_SOURCES})
+ set (module_GLUE_SOURCES "${${module_GLUE_SOURCES}}")
+ else()
+ set (module_GLUE_SOURCES "")
+ endif()
+
+ if (NOT EXISTS ${module_TYPESYSTEM_NAME})
+ set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
+ else()
+ set(typesystem_path ${module_TYPESYSTEM_NAME})
+ endif()
+
+ # Create typesystem XML dependencies list, so that whenever they change, shiboken is invoked
+ # automatically.
+ # First add the main file.
+ set(total_type_system_files ${typesystem_path})
+
+ get_filename_component(typesystem_root "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY)
+
+ set(deps ${module_NAME} ${${module_DEPS}})
+ foreach(dep ${deps})
+ set(glob_expression "${typesystem_root}/${dep}/*.xml")
+ file(GLOB type_system_files ${glob_expression})
+ set(total_type_system_files ${total_type_system_files} ${type_system_files})
+ endforeach(dep)
+
+ # Remove any possible duplicates.
+ list(REMOVE_DUPLICATES total_type_system_files)
+
+ # Contains include directories to pass to shiboken's preprocessor.
+ # Workaround: Added ${QT_INCLUDE_DIR}/QtCore until
+ # qtdeclarative/8d560d1bf0a747bf62f73fad6b6774095442d9d2 has reached qt5.git
+ string(REPLACE ";" ${PATH_SEP} core_includes "${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}")
+ set(shiboken_include_dirs ${pyside6_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${core_includes})
+ set(shiboken_framework_include_dirs_option "")
+ if(CMAKE_HOST_APPLE)
+ set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
+ make_path(shiboken_framework_include_dirs ${shiboken_framework_include_dirs})
+ set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
+ endif()
+
+ # Transform the path separators into something shiboken understands.
+ make_path(shiboken_include_dirs ${shiboken_include_dirs})
+
+ get_filename_component(pyside_binary_dir ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
+
+ # Install module glue files.
+ string(TOLOWER ${module_NAME} lower_module_name)
+ set(${module_NAME}_glue "${CMAKE_CURRENT_SOURCE_DIR}/../glue/${lower_module_name}.cpp")
+ set(${module_name}_glue_dependency "")
+ if(EXISTS ${${module_NAME}_glue})
+ install(FILES ${${module_NAME}_glue} DESTINATION share/PySide6${pyside6_SUFFIX}/glue)
+ set(${module_NAME}_glue_dependency ${${module_NAME}_glue})
+ endif()
+
+ # Install standalone glue files into typesystems subfolder, so that the resolved relative
+ # paths remain correct.
+ if (module_GLUE_SOURCES)
+ install(FILES ${module_GLUE_SOURCES} DESTINATION share/PySide6${pyside6_SUFFIX}/typesystems/glue)
+ endif()
+
+ add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
+ BYPRODUCTS ${${module_SOURCES}}
+ COMMAND Shiboken6::shiboken6 ${GENERATOR_EXTRA_FLAGS}
+ "${pyside6_BINARY_DIR}/${module_NAME}_global.h"
+ --include-paths=${shiboken_include_dirs}
+ ${shiboken_framework_include_dirs_option}
+ --typesystem-paths=${pyside_binary_dir}${PATH_SEP}${pyside6_SOURCE_DIR}${PATH_SEP}${${module_TYPESYSTEM_PATH}}
+ --output-directory=${CMAKE_CURRENT_BINARY_DIR}
+ --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
+ ${typesystem_path}
+ --api-version=${SUPPORTED_QT_VERSION}
+ --drop-type-entries="${dropped_entries}"
+ DEPENDS ${total_type_system_files}
+ ${module_GLUE_SOURCES}
+ ${${module_NAME}_glue_dependency}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMENT "Running generator for ${module_NAME}...")
+
+ include_directories(${module_NAME} ${${module_INCLUDE_DIRS}} ${pyside6_SOURCE_DIR})
+ add_library(${module_NAME} MODULE ${${module_SOURCES}}
+ ${${module_STATIC_SOURCES}})
+ set_target_properties(${module_NAME} PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME "${module_NAME}${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}"
+ LIBRARY_OUTPUT_DIRECTORY ${pyside6_BINARY_DIR})
+ if(WIN32)
+ set_target_properties(${module_NAME} PROPERTIES SUFFIX ".pyd")
+ # Sanitize windows.h as pulled by gl.h to prevent clashes with QAbstract3dAxis::min(), etc.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX")
+ endif()
+
+ target_link_libraries(${module_NAME} ${${module_LIBRARIES}})
+ target_link_libraries(${module_NAME} Shiboken6::libshiboken)
+ if(${module_DEPS})
+ add_dependencies(${module_NAME} ${${module_DEPS}})
+ endif()
+ create_generator_target(${module_NAME})
+
+ # build type hinting stubs
+
+ # Need to set the LD_ env vars before invoking the script, because it might use build-time
+ # libraries instead of install time libraries.
+ if (WIN32)
+ set(ld_prefix_var_name "PATH")
+ elseif(APPLE)
+ set(ld_prefix_var_name "DYLD_LIBRARY_PATH")
+ else()
+ set(ld_prefix_var_name "LD_LIBRARY_PATH")
+ endif()
+ set(ld_prefix "${ld_prefix_var_name}=${pysidebindings_BINARY_DIR}/libpyside${PATH_SEP}${SHIBOKEN_SHARED_LIBRARY_DIR}")
+
+ # Append any existing ld_prefix values, so existing PATH, LD_LIBRARY_PATH, etc.
+ # On Windows it is needed because pyside modules import Qt,
+ # and the Qt modules are found from PATH.
+ # On Linux and macOS, existing values might be set to find system libraries correctly.
+ # For example on openSUSE when compiling with icc, libimf.so from Intel has to be found.
+ if(WIN32)
+ # Get the value of PATH with CMake separators.
+ file(TO_CMAKE_PATH "$ENV{${ld_prefix_var_name}}" path_value)
+
+ # Replace the CMake list separators with "\;"s, to avoid the PATH values being
+ # interpreted as CMake list elements, we actually want to pass the whole string separated
+ # by ";" to the command line.
+ if(path_value)
+ make_path(path_value "${path_value}")
+ string(APPEND ld_prefix "${PATH_SEP}${path_value}")
+ endif()
+ else()
+ # Handles both macOS and Linux.
+ set(env_value "$ENV{${ld_prefix_var_name}}")
+ if(env_value)
+ string(APPEND ld_prefix ":${env_value}")
+ endif()
+ endif()
+ set(generate_pyi_options ${module_NAME} --sys-path
+ "${pysidebindings_BINARY_DIR}"
+ "${SHIBOKEN_PYTHON_MODULE_DIR}")
+ if (QUIET_BUILD)
+ list(APPEND generate_pyi_options "--quiet")
+ endif()
+
+ # Add target to generate pyi file, which depends on the module target.
+ add_custom_target("${module_NAME}_pyi" ALL
+ COMMAND ${CMAKE_COMMAND} -E env ${ld_prefix}
+ "${SHIBOKEN_PYTHON_INTERPRETER}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../support/generate_pyi.py" ${generate_pyi_options})
+ add_dependencies("${module_NAME}_pyi" ${module_NAME})
+
+ # install
+ install(TARGETS ${module_NAME} LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}/PySide6")
+
+ file(GLOB hinting_stub_files RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/PySide6" "${CMAKE_CURRENT_BINARY_DIR}/PySide6/*.pyi")
+ install(FILES ${hinting_stub_files}
+ DESTINATION "${PYTHON_SITE_PACKAGES}/PySide6")
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide6/${module_NAME}/pyside6_${lower_module_name}_python.h
+ DESTINATION include/PySide6${pyside6_SUFFIX}/${module_NAME}/)
+ file(GLOB typesystem_files ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_*.xml ${typesystem_path})
+
+# Copy typesystem files and remove module names from the <load-typesystem> element
+# so that it works in a flat directory:
+# <load-typesystem name="QtWidgets/typesystem_widgets.xml" ... ->
+# <load-typesystem name="typesystem_widgets.xml"
+ foreach(typesystem_file ${typesystem_files})
+ get_filename_component(typesystem_file_name "${typesystem_file}" NAME)
+ file(READ "${typesystem_file}" typesystemXml)
+ string(REGEX REPLACE "<load-typesystem name=\"[^/\"]+/" "<load-typesystem name=\"" typesystemXml "${typesystemXml}")
+ set (typesystem_target_file "${CMAKE_CURRENT_BINARY_DIR}/PySide6/typesystems/${typesystem_file_name}")
+ file(WRITE "${typesystem_target_file}" "${typesystemXml}")
+ install(FILES "${typesystem_target_file}" DESTINATION share/PySide6${pyside6_SUFFIX}/typesystems)
+ endforeach()
+endmacro()
+
+# Only add subdirectory if the associated Qt module is found.
+# As a side effect, this macro now also defines the variable ${name}_GEN_DIR
+# and must be called for every subproject.
+macro(HAS_QT_MODULE var name)
+ if (NOT DISABLE_${name} AND ${var})
+ # we keep the PySide name here because this is compiled into shiboken
+ set(${name}_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}/PySide6/${name}
+ CACHE INTERNAL "dir with generated source" FORCE)
+ add_subdirectory(${name})
+ else()
+ # Used on documentation to skip modules
+ set("if_${name}" "<!--" PARENT_SCOPE)
+ set("end_${name}" "-->" PARENT_SCOPE)
+ endif()
+endmacro()
+
diff --git a/sources/pyside2/cmake/Macros/icecc.cmake b/sources/pyside6/cmake/Macros/icecc.cmake
index b2bf071aa..b2bf071aa 100644
--- a/sources/pyside2/cmake/Macros/icecc.cmake
+++ b/sources/pyside6/cmake/Macros/icecc.cmake
diff --git a/sources/pyside2/cmake_uninstall.cmake b/sources/pyside6/cmake_uninstall.cmake
index df95fb9d8..df95fb9d8 100644
--- a/sources/pyside2/cmake_uninstall.cmake
+++ b/sources/pyside6/cmake_uninstall.cmake
diff --git a/sources/pyside6/doc/CMakeLists.txt b/sources/pyside6/doc/CMakeLists.txt
new file mode 100644
index 000000000..49ad1dcd7
--- /dev/null
+++ b/sources/pyside6/doc/CMakeLists.txt
@@ -0,0 +1,188 @@
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
+
+project(doc)
+
+if (WIN32)
+ set(PATH_SEP "\;")
+else()
+ set(PATH_SEP ":")
+endif()
+
+set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qdoc-output")
+
+get_filename_component(ROOT ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
+set(TS_ROOT "${ROOT}/PySide6")
+
+file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf.in)
+
+set(SHIBOKEN_INTERSPHINX_FILE "${ROOT}/pyside6/shiboken6/objects.inv")
+set(HAS_WEBENGINE_WIDGETS 0)
+set(SKIP_SPHINX_WARNINGS 1)
+if (FULLDOCSBUILD)
+ set(SKIP_SPHINX_WARNINGS 0)
+ set(SHIBOKEN_INTERSPHINX_FILE "${CMAKE_BINARY_DIR}/doc/html/shiboken6/doc/html/objects.inv")
+ # For Qt modules that are part of the documentation build:
+ # - Configure the module docconf file
+ # - Write shiboken header consisting of pyside6_global.h and module includes
+ # - Build include path for qdoc for shiboken
+
+ # The last element of the include list is the mkspec directory containing qplatformdefs.h
+ list(GET Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS -1 mkspecInclude)
+ configure_file("pyside-config.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf" @ONLY)
+
+ file(READ "${pyside6_BINARY_DIR}/pyside6_global.h" docHeaderContents)
+ file(READ "typesystem_doc.xml.in" typeSystemDocXmlContents)
+
+
+ foreach(moduleIn ${all_module_shortnames})
+ string(TOLOWER "${moduleIn}" lowerModuleIn)
+ set(docConf "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-qt${lowerModuleIn}.qdocconf.in")
+ if(EXISTS "${docConf}")
+ string(REGEX REPLACE "(^.*)\.in" "\\1" OUTFILE ${docConf})
+ get_filename_component(BASENAME ${OUTFILE} NAME)
+ configure_file(${docConf} "${CMAKE_CURRENT_LIST_DIR}/qtmodules/${BASENAME}" @ONLY)
+ file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/${BASENAME}\n")
+ # Handle docconf files in Qt that contain multiple modules
+ if ("${moduleIn}" STREQUAL "3DExtras")
+ set(modules 3DCore 3DRender 3DInput 3DLogic 3DAnimation "${moduleIn}")
+ elseif ("${moduleIn}" STREQUAL "QuickWidgets")
+ set(modules Qml Quick "${moduleIn}")
+ elseif ("${moduleIn}" STREQUAL "MultimediaWidgets")
+ set(modules Multimedia "${moduleIn}")
+ elseif ("${moduleIn}" STREQUAL "WebEngineWidgets")
+ set(modules WebEngine WebEngineCore "${moduleIn}")
+ set(HAS_WEBENGINE_WIDGETS 1)
+ else()
+ set(modules "${moduleIn}")
+ endif()
+ foreach(module ${modules})
+ string(TOLOWER "${module}" lowerModule)
+ # -- @TODO fix this for macOS frameworks.
+ file(APPEND "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf"
+ " -I ${QT_INCLUDE_DIR}Qt${module} \\\n"
+ " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION} \\\n"
+ " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION}/Qt${module} \\\n")
+
+ if (${moduleIn} STREQUAL "X11Extras")
+ set(globalHeader "QX11Info")
+ else()
+ set(globalHeader "Qt${module}")
+ endif()
+ set(docHeaderContents "${docHeaderContents}\n#include <Qt${module}/${globalHeader}>")
+ set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n<load-typesystem name=\"Qt${module}/typesystem_${lowerModule}.xml\" generate=\"yes\"/>")
+ endforeach()
+ endif()
+ endforeach()
+
+ #Appending the additional qdocconf that describes the pyside-examples
+ #doc project.
+ configure_file("qtmodules/pyside-examples.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-examples.qdocconf" @ONLY)
+ file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/pyside-examples.qdocconf\n")
+
+ set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n</typesystem>\n")
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml" "${typeSystemDocXmlContents}")
+
+ set(docHeader "${pyside6_BINARY_DIR}/qdoc.h")
+ file(WRITE ${docHeader} "${docHeaderContents}")
+ configure_file("pyside.qdocconf.in" "pyside.qdocconf" @ONLY)
+
+
+ set(QDOC_TYPESYSTEM_PATH "${pyside6_SOURCE_DIR}${PATH_SEP}${pyside6_BINARY_DIR}")
+
+ add_custom_target(qdoc
+ # Use dummy Qt version information, QDoc needs it but has no effect on WebXML output
+ COMMAND ${CMAKE_COMMAND} -E env BUILDDIR=${CMAKE_CURRENT_LIST_DIR}/src QT_INSTALL_DOCS=${QT_SRC_DIR}/doc
+ QT_VERSION=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
+ QT_VER=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}
+ QT_VERSION_TAG=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
+ qdoc pyside.qdocconf -single-exec -installdir ${DOC_DATA_DIR} -outputdir ${DOC_DATA_DIR}
+ COMMENT "Running qdoc against Qt source code..."
+ SOURCE "pyside.qdocconf")
+endif()
+
+# conditional tag for sphinx build
+#string(JOIN "_" SPHINX_TAG ${DOC_OUTPUT_FORMAT} "format")
+# Python script to replace the virtualFolder string in the QHP
+set(py_cmd "from __future__ import print_function
+import fileinput
+import re
+try:
+\tfor line in fileinput.input('html/PySide.qhp',inplace=True,backup='.bak'):
+\t\tline_copy=line.strip()
+\t\tif not line_copy: # check for empty line
+\t\t\tcontinue
+\t\tmatch=re.match('(^.*virtualFolder.)doc(.*$)',line)
+\t\tif match:
+\t\t\trepl=''.join([match.group(1),'pyside6',match.group(2)])
+\t\t\tprint(line.replace(match.group(0),repl),end='')
+\t\telse:
+\t\t\tprint(line)
+except:
+\tpass\n")
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_script.py CONTENT ${py_cmd})
+
+add_custom_target(apidoc
+ COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b ${DOC_OUTPUT_FORMAT} ${CMAKE_CURRENT_BINARY_DIR}/rst html
+ COMMENT "Generating PySide htmls..."
+ )
+
+# create a custom commands to copy the shiboken docs
+# and generate offline help based on the output format.
+if(DOC_OUTPUT_FORMAT STREQUAL "html")
+ add_custom_command(TARGET apidoc POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken6
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/../../shiboken6/doc/html
+ ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken6
+ COMMENT "Copying Shiboken docs..."
+ VERBATIM)
+else()
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/html/PySide.qhp QHP_FILE)
+ add_custom_command(TARGET apidoc POST_BUILD
+ COMMAND ${PYTHON_EXECUTABLE} py_script.py
+ COMMAND qhelpgenerator ${QHP_FILE}
+ COMMENT "Generating QCH from a QHP file..."
+ VERBATIM)
+endif()
+
+# create conf.py based on conf.py.in
+configure_file("conf.py.in" "rst/conf.py" @ONLY)
+
+add_custom_target("docrsts"
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
+ COMMAND Shiboken6::shiboken6 --generator-set=qtdoc ${docHeader}
+ --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside6_SOURCE_DIR}${PATH_SEP}${TS_ROOT}"
+ --api-version=${SUPPORTED_QT_VERSION}
+ --typesystem-paths="${QDOC_TYPESYSTEM_PATH}"
+ --library-source-dir=${QT_SRC_DIR}
+ --documentation-data-dir=${DOC_DATA_DIR}/webxml
+ --output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
+ --documentation-code-snippets-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/doc/src/snippets${PATH_SEP}${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/examples
+ --documentation-extra-sections-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/extras
+ --additional-documentation=${CMAKE_CURRENT_BINARY_DIR}/rst/additionaldocs.lst
+ ${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
+ WORKING_DIRECTORY ${${module}_SOURCE_DIR}
+ COMMENT "Running generator to generate documentation..."
+)
+
+add_custom_target("licensedocrsts"
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_LIST_DIR}/qtattributionsscannertorst.py
+ ${CMAKE_CURRENT_LIST_DIR}/../../..
+ ${CMAKE_CURRENT_BINARY_DIR}/rst/licenses.rst
+ COMMENT "Creating 3rdparty license documentation..."
+)
+
+if (FULLDOCSBUILD)
+ add_dependencies(apidoc docrsts licensedocrsts)
+ add_dependencies(licensedocrsts docrsts)
+ add_dependencies(docrsts qdoc)
+endif()
+
+#install files
+add_custom_target(apidocinstall
+ COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/PySide6-${BINDING_API_VERSION} && cp -rv ${CMAKE_CURRENT_BINARY_DIR}/html/* ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION}
+)
+
+add_dependencies(apidocinstall apidoc)
diff --git a/sources/pyside2/doc/_templates/layout.html b/sources/pyside6/doc/_templates/layout.html
index 6ab1276a3..6ab1276a3 100644
--- a/sources/pyside2/doc/_templates/layout.html
+++ b/sources/pyside6/doc/_templates/layout.html
diff --git a/sources/pyside2/doc/_themes/pysidedocs/domainindex.html b/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
index c136cdd1c..c136cdd1c 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/domainindex.html
+++ b/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
diff --git a/sources/pyside2/doc/_themes/pysidedocs/searchbox.html b/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
index 55a972156..55a972156 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/searchbox.html
+++ b/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/bg_header.png b/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
index 843e7e2c5..843e7e2c5 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/bg_header.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/bg_topo.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
index 4229ae8db..4229ae8db 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/bg_topo.jpg
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/fakebar.png b/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
index b45830e00..b45830e00 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/fakebar.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/logo_python.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
index cd474efba..cd474efba 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/logo_python.jpg
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/logo_qt.png b/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
index 3bc03b7c7..3bc03b7c7 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/logo_qt.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/minus.png b/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
index da1c5620d..da1c5620d 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/minus.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/plus.png b/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
index b3cb37425..b3cb37425 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/plus.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/pyside.css b/sources/pyside6/doc/_themes/pysidedocs/static/pyside.css
index f6a1c5ae4..f6a1c5ae4 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/pyside.css
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/pyside.css
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/pysidelogo.png b/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png
index 3a2f2bd17..3a2f2bd17 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/pysidelogo.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/static/relbar_bg.png b/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
index 4036733a7..4036733a7 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/static/relbar_bg.png
+++ b/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs/theme.conf b/sources/pyside6/doc/_themes/pysidedocs/theme.conf
index 01a4dd4a1..01a4dd4a1 100644
--- a/sources/pyside2/doc/_themes/pysidedocs/theme.conf
+++ b/sources/pyside6/doc/_themes/pysidedocs/theme.conf
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/domainindex.html b/sources/pyside6/doc/_themes/pysidedocs_qthelp/domainindex.html
index c136cdd1c..c136cdd1c 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/domainindex.html
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/domainindex.html
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/fakebar.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/fakebar.png
index b45830e00..b45830e00 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/fakebar.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/fakebar.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg
index cd474efba..cd474efba 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_python.jpg
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_qt.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_qt.png
index 3bc03b7c7..3bc03b7c7 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/logo_qt.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/logo_qt.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/minus.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/minus.png
index da1c5620d..da1c5620d 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/minus.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/minus.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/plus.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/plus.png
index b3cb37425..b3cb37425 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/plus.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/plus.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pyside.css b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css
index aee5e4420..aee5e4420 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pyside.css
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png
index 3a2f2bd17..3a2f2bd17 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pysidelogo.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png
index 4036733a7..4036733a7 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/relbar_bg.png
Binary files differ
diff --git a/sources/pyside2/doc/_themes/pysidedocs_qthelp/theme.conf b/sources/pyside6/doc/_themes/pysidedocs_qthelp/theme.conf
index 4384b459c..4384b459c 100644
--- a/sources/pyside2/doc/_themes/pysidedocs_qthelp/theme.conf
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/theme.conf
diff --git a/sources/pyside2/doc/additionaldocs.lst b/sources/pyside6/doc/additionaldocs.lst
index e6ffe7e5d..e6ffe7e5d 100644
--- a/sources/pyside2/doc/additionaldocs.lst
+++ b/sources/pyside6/doc/additionaldocs.lst
diff --git a/sources/pyside6/doc/api.rst b/sources/pyside6/doc/api.rst
new file mode 100644
index 000000000..a246dd52c
--- /dev/null
+++ b/sources/pyside6/doc/api.rst
@@ -0,0 +1,90 @@
+.. _pyside-api:
+
+|project| Modules
+=================
+
+Basic modules
+-------------
+
+These are the main modules that help you build a Widget-based UI.
+
++---------------------------------------+--------------------------------------------------------+
+| :mod:`Qt Core <PySide6.QtCore>` | Provides core non-GUI functionality, like signal and |
+| | slots, properties, base classes of item models, |
+| | serialization, and more. |
++---------------------------------------+--------------------------------------------------------+
+| :mod:`Qt GUI <PySide6.QtGui>` | Extends QtCore with GUI functionality: Events, windows |
+| | and screens, OpenGL and raster-based 2D painting, as |
+| | well as images. |
++---------------------------------------+--------------------------------------------------------+
+| :mod:`Qt Widgets <PySide6.QtWidgets>` | Provides ready to use Widgets for your application, |
+| | including graphical elements for your UI. |
++---------------------------------------+--------------------------------------------------------+
+
+QML and Qt Quick
+----------------
+
+Use these modules to interact with the `QML Language <https://doc.qt.io/qt-5.qmlapplications>`,
+from Python.
+
++-------------------------------------------------+----------------------------------------------+
+| :mod:`Qt QML <PySide6.QtQml>` | The base Python API to interact with the |
+| | module. |
++-------------------------------------------------+----------------------------------------------+
+| :mod:`Qt Quick <PySide6.QtQuick>` | Provides classes to embed Qt Quick in Qt |
+| | applications. |
++-------------------------------------------------+----------------------------------------------+
+| :mod:`Qt QuickWidgets <PySide6.QtQuickWidgets>` | Provides the QQuickWidget class to embed Qt |
+| | Quick in widget-based applications. |
++-------------------------------------------------+----------------------------------------------+
+
+Data visualization
+------------------
+
+Charts, diagrams, animations: these modules provide classes to help you include these elements in
+your UI.
+
++------------------------------------------------------------+-----------------------------------+
+| :mod:`Qt Charts <PySide6.QtCharts>` | Provides a set of easy to use |
+| | chart components. |
++------------------------------------------------------------+-----------------------------------+
+| :mod:`Qt DataVisualization <PySide6.QtDataVisualization>` | Provides a way to visualize data |
+| | in 3D as bar, scatter, or surface |
+| | graphs. |
++------------------------------------------------------------+-----------------------------------+
+
+Multimedia
+-----------
+
+Audio, video, and hardware interaction: use these modules for multimedia solutions.
+
++------------------------------------------------------------+-----------------------------------+
+| :mod:`Qt Multimedia <PySide6.QtMultimedia>` | Provides low-level multimedia |
+| | functionality. |
++------------------------------------------------------------+-----------------------------------+
+| :mod:`Qt MultimediaWidgets <PySide6.QtMultimediaWidgets>` | Provides the widget-based |
+| | multimedia API. |
++------------------------------------------------------------+-----------------------------------+
+
+WebEngine
+---------
+
+If your project is based on a browser or the features around Web-based applications, use these
+modules to interact with them.
+
++---------------------------------------------------------+--------------------------------------+
+| :mod:`Qt WebEngineWidgets <PySide6.QtWebEngineWidgets>` | Provides widgets to handle Web |
+| | content. |
++---------------------------------------------------------+--------------------------------------+
+| :mod:`Qt WebChannel <PySide6.QtWebChannel>` | Enables peer-to-peer communication |
+| | between a server and a client |
+| | (HTML/JavaScript or QML application).|
++---------------------------------------------------------+--------------------------------------+
+
+All the modules
+---------------
+
+There are many other modules currently supported by |pymodname|, here you can find a complete list
+of them.
+
+ :doc:`Check all the modules <modules>`
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp
index 6c479cd3f..6c479cd3f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/accessibilityslidersnippet.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/alphachannel.cpp
index 78c2c54db..78c2c54db 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/alphachannel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/alphachannel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/audio/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/audio/main.cpp
index 09d1aa420..09d1aa420 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/audio/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/audio/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png
index d609c1e1e..d609c1e1e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/qt-logo.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h
index 82356e2dd..82356e2dd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/renderarea.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h
index 57223cbb4..57223cbb4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/brushstyles/stylewidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h
index a06b59b20..a06b59b20 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py
new file mode 100644
index 000000000..e5e156e69
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/clipboard/clipwindow.py
@@ -0,0 +1,105 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+form PySide6.QtGui import *
+
+
+def __init__(self, parent):
+ QMainWindow.__init__(self, parent)
+ clipboard = QApplication.clipboard()
+
+ centralWidget = QWidget(self)
+ currentItem = QWidget(centralWidget)
+ mimeTypeLabel = QLabel(tr("MIME types:"), currentItem)
+ mimeTypeCombo = QComboBox(currentItem)
+ dataLabel = QLabel(tr("Data:"), currentItem)
+ dataInfoLabel = QLabel("", currentItem)
+
+ previousItems = QListWidget(centralWidget)
+
+//! [0]
+ clipboard.dataChanged.connect(self.updateClipboard)
+//! [0]
+ mimeTypeCombo.activated[str].connect(self.updateData)
+
+ currentLayout = QVBoxLayout(currentItem)
+ currentLayout.addWidget(mimeTypeLabel)
+ currentLayout.addWidget(mimeTypeCombo)
+ currentLayout.addWidget(dataLabel)
+ currentLayout.addWidget(dataInfoLabel)
+ currentLayout.addStretch(1)
+
+ mainLayout = QHBoxLayout(centralWidget)
+ mainLayout.addWidget(currentItem, 1)
+ mainLayout.addWidget(previousItems)
+
+ setCentralWidget(centralWidget)
+ setWindowTitle(tr("Clipboard"))
+
+//! [1]
+def updateClipboard(self):
+ formats = clipboard.mimeData().formats()
+ data = clipboard.mimeData().data(format)
+//! [1]
+
+ mimeTypeCombo.clear()
+ mimeTypeCombo.insertStringList(formats)
+
+ size = clipboard.mimeData().data(formats[0]).size()
+ Item = QListWidgetItem(previousItems)
+ Item.setText(tr("%1 (%2 bytes)").arg(formats[0]).arg(size))
+
+ updateData(formats[0])
+//! [2]
+//! [2]
+
+def updateData(self, format)
+ data = clipboard.mimeData().data(format)
+ dataInfoLabel.setText(tr("%1 bytes").arg(data.size()))
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc
index b63810f97..b63810f97 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qnamespace.qdoc
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py
new file mode 100644
index 000000000..a9c70fa93
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtcore.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtCore
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py
new file mode 100644
index 000000000..d49a623b2
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtnetwork.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+import PySide6.QtNetwork
+//! [1]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py
new file mode 100644
index 000000000..37fba2534
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtopengl.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtOpenGL
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py
new file mode 100644
index 000000000..4426e7628
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtprintsupport.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 20188888888 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+import PySide6.QtPrintSupport
+//! [1]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py
new file mode 100644
index 000000000..0216cab3d
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtqml.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtQml
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py
new file mode 100644
index 000000000..42801d9d9
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtquick.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtQuick
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py
new file mode 100644
index 000000000..6ffc52b57
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtsql.py
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//! [0]
+import PySide6.QtSql
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py
new file mode 100644
index 000000000..b6efed395
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qttest.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtTest
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py
new file mode 100644
index 000000000..c4e161e73
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtwidgets.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+import PySide6.QtWidgets
+//! [1]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py
new file mode 100644
index 000000000..e2ebf0d74
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/doc_src_qtxml.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtXml
+//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
index bfe7b30e3..bfe7b30e3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.gui.text.qtextdocumentwriter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
index 549d7a6f8..549d7a6f8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingcall.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
index 5029d3aca..5029d3aca 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
index 53c4a9efe..53c4a9efe 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src.scripttools.qscriptenginedebugger.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
index 7cbfc4e30..7cbfc4e30 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
index 3538b6574..3538b6574 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_codecs_qtextcodecplugin.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
index 7dcc7052d..7dcc7052d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuture.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
index 014c5b167..014c5b167 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturesynchronizer.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
index 9c536b822..9c536b822 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qfuturewatcher.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
index da4254a76..da4254a76 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentexception.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
index a0f6778b6..a0f6778b6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentfilter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
index e61b73613..e61b73613 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentmap.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
index 3c55ef77e..3c55ef77e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qtconcurrentrun.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
index f552f3429..f552f3429 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_concurrent_qthreadpool.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
index 878259f62..878259f62 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
index 79e64d4a3..79e64d4a3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdatastream.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp
index 16f20c236..16f20c236 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdir.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
index be68a5dbb..be68a5dbb 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qdiriterator.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp
index 1e9d102c8..1e9d102c8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfile.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
index 1027525db..1027525db 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
index d8f155c38..d8f155c38 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qiodevice.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp
index a4b74ae97..a4b74ae97 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qprocess.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp
index 11bb9af48..11bb9af48 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qsettings.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
index 7244c22c8..7244c22c8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
index cf67a61fb..cf67a61fb 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtextstream.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp
index d32a7b9c7..d32a7b9c7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qurl.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
index a531f22fc..a531f22fc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index f2a9e8222..f2a9e8222 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
index 115c76671..115c76671 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qcoreapplication.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
index 79fe7f09f..79fe7f09f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index 14f07a139..14f07a139 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
index 46c7e31de..46c7e31de 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qmimedata.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py
index 7e50f6701..7e50f6701 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qobject.py
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
index 2a9385269..2a9385269 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qsystemsemaphore.cpp
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
new file mode 100644
index 000000000..7436ac5a8
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_kernel_qtimer.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+from PySide6.QtCore import QApplication, QTimer
+
+def main():
+
+ app = QApplication([])
+ QTimer.singleShot(600000, app, SLOT('quit()'))
+ ...
+ return app.exec_()
+//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
index 310cf5df4..310cf5df4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_qlibrary.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
index 90eafb980..90eafb980 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_plugin_quuid.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
index 6a78e19f1..6a78e19f1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
index 7c999e55c..7c999e55c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qatomic.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
index e799cbb64..e799cbb64 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutex.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
index 622cb18fd..622cb18fd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qmutexpool.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
index d441042c8..d441042c8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qreadwritelock.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
index 086b105dd..086b105dd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qsemaphore.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp
index 5470e8a6c..5470e8a6c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qthread.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
index f652e5fcb..f652e5fcb 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_thread_qwaitcondition_unix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
index 2edd35b0a..2edd35b0a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbitarray.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
index bb0bc7de4..bb0bc7de4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
index ea8c04453..ea8c04453 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qdatetime.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp
index 985c7daf1..985c7daf1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qhash.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
index 947594ae5..947594ae5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlinkedlist.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
index d90d932e9..d90d932e9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlistdata.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
index 4be07da07..4be07da07 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qlocale.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp
index 5bd7dc621..5bd7dc621 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qmap.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
index e6a5e0cac..e6a5e0cac 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qpoint.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
index a0ea40541..a0ea40541 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qqueue.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp
index a3882750b..a3882750b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qrect.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
index d3f45bbea..d3f45bbea 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qregexp.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp
index ef8b29776..ef8b29776 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qsize.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp
index 8225d16f2..8225d16f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qstring.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
index 480731a18..480731a18 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp
index 57ffcae01..57ffcae01 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qvector.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
index f03a90643..f03a90643 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
index 9971983df..9971983df 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_accessible_qaccessible.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
index db6a8a85c..db6a8a85c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qabstractprintdialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
index dd5f81bd2..dd5f81bd2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
index 6c91d213f..6c91d213f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfontdialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
index 9db90a72c..9db90a72c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qwizard.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
index d4b47fa57..d4b47fa57 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
index 4d138db3c..4d138db3c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsgridlayout.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index 59f26c729..59f26c729 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
index 8e7dcc432..8e7dcc432 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicslinearlayout.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
index d0d21a64d..d0d21a64d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsproxywidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
index 1f1316bec..1f1316bec 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsscene.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
index afb5f9f3a..afb5f9f3a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicssceneevent.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
index d13cee846..d13cee846 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicsview.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
index ffba7a181..ffba7a181 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_graphicsview_qgraphicswidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp
index aab995f33..aab995f33 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qbitmap.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp
index d40f485a4..d40f485a4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qicon.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp
index e100624d8..e100624d8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimage.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp
index 2e36ba8b2..2e36ba8b2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagereader.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
index b65681718..b65681718 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qimagewriter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp
index 050213e80..050213e80 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qmovie.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp
index 76d359a84..76d359a84 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmap.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
index 611203116..611203116 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
index 4fa6e7901..4fa6e7901 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_image_qpixmapfilter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
index 0d89ff73b..0d89ff73b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qabstractitemview.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
index 54687e749..54687e749 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
index 44d0594e4..44d0594e4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemeditorfactory.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
index 62861d9d3..62861d9d3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qitemselectionmodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
index 42a64fbab..42a64fbab 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
index ca7c0dbfc..ca7c0dbfc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtablewidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
index ecdb7941b..ecdb7941b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qtreewidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp
index 31a83e215..31a83e215 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qaction.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
index fe02c93e5..fe02c93e5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
index 5c90b998f..5c90b998f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qapplication_x11.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
index 014835171..014835171 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp
index 38d18d030..38d18d030 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qevent.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
index 1b3e58080..1b3e58080 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qformlayout.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
index 25d5ee290..25d5ee290 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qkeysequence.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
index 867e73b5e..867e73b5e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayout.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
index 8749f530b..8749f530b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qlayoutitem.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
index baaf60571..baaf60571 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcut.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
index 48f63f6e9..48f63f6e9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qshortcutmap.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp
index 6ad7ef4f8..6ad7ef4f8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qsound.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
index efa0f0589..efa0f0589 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qwidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp
index 55fa8a784..55fa8a784 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qbrush.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp
index cac026aa1..cac026aa1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qcolor.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
index 1f76792e4..1f76792e4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qdrawutil.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
index 73ce084f7..73ce084f7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qmatrix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp
index e295f6638..e295f6638 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
index cbf1aab54..cbf1aab54 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpainterpath.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp
index 871935c49..871935c49 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qpen.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp
index 08e9c22be..08e9c22be 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
index b347fb392..b347fb392 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp
index 71ff40645..71ff40645 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_painting_qtransform.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp
index be555b41a..be555b41a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyle.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
index c46066a34..c46066a34 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_styles_qstyleoption.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp
index 43537f9d3..43537f9d3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfont.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
index a184a0072..a184a0072 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qfontmetrics.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
index 2188be0a8..2188be0a8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qsyntaxhighlighter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
index 12189bf2a..12189bf2a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextcursor.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
index 33cde13e7..33cde13e7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_text_qtextlayout.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp
index a9ba16a65..a9ba16a65 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qcompleter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
index f79f1ed24..f79f1ed24 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp
index 9875747e7..9875747e7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qundostack.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp
index df55131b3..df55131b3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_util_qvalidator.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
index c4219b3d7..c4219b3d7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractbutton.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
index c8d60d015..c8d60d015 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qabstractspinbox.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
index 9d83f0bc1..9d83f0bc1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcalendarwidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
index c8aa50aa2..c8aa50aa2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qcheckbox.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
index 1dd6947c4..1dd6947c4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdatetimeedit.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
index c9da19b47..c9da19b47 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp
index a41f1c478..a41f1c478 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qframe.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
index d236d91dd..d236d91dd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qgroupbox.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
index 4a73a181d..4a73a181d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlabel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
index bf093ba50..bf093ba50 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qlineedit.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
index a5104708d..a5104708d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
index 6bf1bf8f2..6bf1bf8f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenu.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
index fa5bb3b11..fa5bb3b11 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qmenubar.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
index 674f78662..674f78662 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qplaintextedit.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
index 74b4cf884..74b4cf884 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qpushbutton.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
index dbee86850..dbee86850 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qradiobutton.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
index 61f784a3a..61f784a3a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qrubberband.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
index 7172efd56..7172efd56 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qscrollarea.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
index 77273e260..77273e260 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qspinbox.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
index 2bddb83a9..2bddb83a9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplashscreen.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
index c5dfcd859..c5dfcd859 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qsplitter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
index 8b972b6f2..8b972b6f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qstatusbar.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
index e35b40c38..e35b40c38 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextbrowser.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
index fad9f6be1..fad9f6be1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qtextedit.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
index 1c7773310..1c7773310 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_gui_widgets_qworkspace.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp
index d0426fd89..d0426fd89 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qftp.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp
index 333ea2bdd..333ea2bdd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qhttp.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
index 478472530..478472530 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
index c8c81ad95..c8c81ad95 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
index 9156597b1..9156597b1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_access_qnetworkrequest.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
index d30aca2ab..d30aca2ab 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_bearer_qnetworkconfigmanager.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
index e45b6d57a..e45b6d57a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostaddress.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
index b1430a499..b1430a499 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qhostinfo.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
index 29c6a8efd..29c6a8efd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
index ea70b1fcf..ea70b1fcf 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qabstractsocket.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
index 1687fe69b..1687fe69b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qlocalsocket_unix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
index 9fda752ef..9fda752ef 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qnativesocketengine.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
index b685462bc..b685462bc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qtcpserver.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
index cbeb0be68..cbeb0be68 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_socket_qudpsocket.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
index d13d4dd3c..d13d4dd3c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslcertificate.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
index 1ba2170d1..1ba2170d1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslconfiguration.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
index d822b80c5..d822b80c5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp
index 264cf0888..264cf0888 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qgl.cpp
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp
new file mode 100644
index 000000000..c95874e22
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglcolormap.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import sys
+
+from PySide6.QtGui import QApplication, qRgb
+from PySide6.QtOpenGL import QGLColormap
+
+def main(argv):
+ app = QApplication(argv)
+
+ widget = MySuperGLWidget() # a QGLWidget in color-index mode
+ colormap = QGLColormap()
+
+ # This will fill the colormap with colors ranging from
+ # black to white.
+ for i in range(0, colormap.size()):
+ colormap.setEntry(i, qRgb(i, i, i))
+
+ widget.setColormap(colormap)
+ widget.show()
+ return app.exec_()
+
+if __name__ == "__main__":
+ main(sys.argv)
+//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
index fd8c50499..fd8c50499 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglpixelbuffer.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index 102867f43..102867f43 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
index 8ff2a6ee4..8ff2a6ee4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_qtestlib_qtestcase.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp
index ac181e70c..ac181e70c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptable.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp
index 94601aa9b..94601aa9b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptclass.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp
index 632283d82..632283d82 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptcontext.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp
index 4005e2c2b..4005e2c2b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengine.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp
index 91541f539..91541f539 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptengineagent.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp
index 18109bd83..18109bd83 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalue.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
index f9401488e..f9401488e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_script_qscriptvalueiterator.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
index cedc675ff..cedc675ff 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqldriver.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
index ea0c8709a..ea0c8709a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlerror.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
index 3af6ef49d..3af6ef49d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlindex.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
index 8e323680b..8e323680b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
index 3ba3277d0..3ba3277d0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_kernel_qsqlresult.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
index fc5c398ad..fc5c398ad 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_sql_models_qsqlquerymodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp
index 6396cbcdc..6396cbcdc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_dom_qdom.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp
index 9df91ab39..9df91ab39 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xml_sax_qxml.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp
index 990a84968..990a84968 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstracturiresolver.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp
index f31ea3f5c..f31ea3f5c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlforwarditerator.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp
index 0ba6de235..0ba6de235 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlnodemodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp
index 32397e331..32397e331 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qabstractxmlreceiver.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp
index 80147c840..80147c840 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qsimplexmlnodemodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
index 3695d41d1..3695d41d1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlformatter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp
index 033757068..033757068 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlname.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
index a5a2706a7..a5a2706a7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlquery.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
index 62bb47105..62bb47105 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlresultitems.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp
index 32397e331..32397e331 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/src_xmlpatterns_api_qxmlserializer.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
index c0baf89ef..c0baf89ef 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp
index 4f6de9e0d..4f6de9e0d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp
index 14fe3764d..14fe3764d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp
index dabd9f737..dabd9f737 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp
index 2fe32e672..2fe32e672 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py
index 6cf5dd21c..6cf5dd21c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.py
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp
index 79b98f0ce..79b98f0ce 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp
index d6654b3eb..d6654b3eb 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp
index 2fe32e672..2fe32e672 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py
index 1e2ac506f..1e2ac506f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.py
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp
index 7c0a4150a..7c0a4150a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp
index 781ce7542..781ce7542 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp
index fc58aa505..fc58aa505 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp
index 91bd24bc3..91bd24bc3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_patternist_qapplicationargumentparser.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp
index a9c6a26c9..a9c6a26c9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtgradienteditor_qtgradientdialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
index 64bdb67f5..64bdb67f5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp
index 95de10d4d..95de10d4d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp
index 93a9b53c1..93a9b53c1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/code/tools_shared_qttoolbardialog_qttoolbardialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt
index 3c700db5c..3c700db5c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/console/dbus_pingpong.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h
index 8aead8e9c..8aead8e9c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/customstyle/customstyle.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h
index d5852c9c3..d5852c9c3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui
index 1c5e546f2..1c5e546f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/autoconnection/imagedialog.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui
index 1c5e546f2..1c5e546f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/imagedialog/imagedialog.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h
index 1b95cb310..1b95cb310 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui
index 1c5e546f2..1c5e546f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/multipleinheritance/imagedialog.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h
index 16ff0ec18..16ff0ec18 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui
index 1c5e546f2..1c5e546f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/noautoconnection/imagedialog.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h
index a14a628f2..a14a628f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui
index 1c5e546f2..1c5e546f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/designer/singleinheritance/imagedialog.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py
index 7bdcb0c91..7bdcb0c91 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dialogs/dialogs.py
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py
new file mode 100644
index 000000000..e8364cd7c
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtcharts.py
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtCharts
+//! [0]
+
+//! [3]
+series = QtCharts.QLineSeries()
+series.append(0,6)
+series.append(2,4)
+...
+chartView = QtCharts.QChartView()
+chartView.chart().addSeries(series)
+chartView.chart().createDefaultAxes()
+chartView.show()
+//! [3]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py
new file mode 100644
index 000000000..206cea4ad
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtgui.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtCore
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py
new file mode 100644
index 000000000..7b5945258
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtmultimedia.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+import PySide6.QtMultimedia
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py
new file mode 100644
index 000000000..211c25430
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/doc_src_qtxmlpatterns.py
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+//! [0]
+import PySide6.QtXmlPatterns
+//! [0]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html
index 9c67393da..9c67393da 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/modules.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html
index 947ad4038..947ad4038 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtcore.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html
index 9182b4cb4..9182b4cb4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtgui.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html
index 01e1fa48b..01e1fa48b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtnetwork.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html
index c42c4ae26..c42c4ae26 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtopengl.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html
index db44d6d36..db44d6d36 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtsql.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html
index d10d54237..d10d54237 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/qtxml.html
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt
index 016825d87..016825d87 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/Resources/titles.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc
index 8c462a517..8c462a517 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/dockwidgets.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h
index e9891d628..e9891d628 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dockwidgets/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h
index 88bff6669..88bff6669 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/dragwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h
index ece2a8190..ece2a8190 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/draganddrop/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images.qrc
index 30b8a2986..30b8a2986 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images/file.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images/file.png
index 9520080ed..9520080ed 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/images/file.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/images/file.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp
index 6e4073499..6e4073499 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h
index fccb01a0e..fccb01a0e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dragging/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/dropactions/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/dropactions/window.h
index 8607b6953..8607b6953 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/dropactions/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dropactions/window.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/droparea.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/droparea.cpp
new file mode 100644
index 000000000..77f97455b
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/droparea.cpp
@@ -0,0 +1,147 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+
+
+DropArea.DropArea(QWidget *parent)
+ : QLabel(parent)
+{
+ setMinimumSize(200, 200)
+ setFrameStyle(QFrame.Sunken | QFrame::StyledPanel)
+ setAlignment(Qt.AlignCenter)
+ setAcceptDrops(True)
+ setAutoFillBackground(True)
+ clear()
+}
+
+void DropArea.dragEnterEvent(QDragEnterEvent *event)
+{
+ setText(tr("<drop content>"))
+ setBackgroundRole(QPalette.Highlight)
+
+ event.acceptProposedAction()
+ emit changed(event.mimeData())
+}
+
+void DropArea.dragMoveEvent(QDragMoveEvent *event)
+{
+ event.acceptProposedAction()
+}
+
+void DropArea.dropEvent(QDropEvent *event)
+{
+ const QMimeData *mimeData = event.mimeData()
+
+ if (mimeData.hasImage()) {
+ setPixmap(qvariant_cast<QPixmap>(mimeData.imageData()))
+ } else if (mimeData.hasHtml()) {
+ setText(mimeData.html())
+ setTextFormat(Qt.RichText)
+ } else if (mimeData.hasText()) {
+ setText(mimeData.text())
+ setTextFormat(Qt.PlainText)
+ } else {
+ setText(tr("Cannot display data"))
+ }
+
+ setBackgroundRole(QPalette.Dark)
+ event.acceptProposedAction()
+}
+
+//![0]
+def paste(self):
+ clipboard = QGuiApplication.clipboard()
+ mimeData = clipboard.mimeData()
+
+ if mimeData.hasImage():
+ setPixmap(mimeData.imageData())
+ elif mimeData.hasHtml():
+ setText(mimeData.html())
+ setTextFormat(Qt.RichText)
+ elif (mimeData.hasText():
+ setText(mimeData.text())
+ setTextFormat(Qt.PlainText)
+ else:
+ setText(tr("Cannot display data"))
+//![0]
+
+ emit changed(mimeData)
+ setBackgroundRole(QPalette.Dark)
+ //event.acceptProposedAction()
+}
+
+void DropArea.dragLeaveEvent(QDragLeaveEvent *event)
+{
+ clear()
+ event.accept()
+}
+
+void DropArea.clear()
+{
+ setText(tr("<drop content>"))
+ setBackgroundRole(QPalette.Dark)
+
+ emit changed()
+}
+
+QPixmap DropArea.extractPixmap(const QByteArray &data, const QString &format)
+{
+ QList<QByteArray> imageFormats = QImageReader.supportedImageFormats()
+ QPixmap pixmap
+
+ foreach (QByteArray imageFormat, imageFormats) {
+ if (format.mid(6) == QString(imageFormat)) {
+ pixmap.loadFromData(data, imageFormat)
+ break
+ }
+ }
+ return pixmap
+}
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/dropevents/window.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/dropevents/window.py
new file mode 100644
index 000000000..9793762ad
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/dropevents/window.py
@@ -0,0 +1,65 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtWidgets import QWidget, QComboBox, QFrame, QTextBrowser
+
+class Window(QWidget):
+
+ def __init__(self, parent=None):
+ self.mimeTypeCombo = QComboBox()
+ self.dropFrame = QFrame()
+ self.textBrowser = QTextBrowser()
+ self.oldText = ""
+ self.oldMimeTypes = []
+
+ def dragEnterEvent(self, event):
+ pass
+ def dropEvent(self, event):
+ pass
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/droprectangle/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/droprectangle/window.h
index e7854bcfd..e7854bcfd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/droprectangle/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/droprectangle/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h
index 18fd7b8c5..18fd7b8c5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/eventfilters/filterobject.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h
index 66ca6b36b..66ca6b36b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/explicitlysharedemployee/employee.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h
index 0f49fe256..0f49fe256 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts
index 9bd90f244..9bd90f244 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/myclass.ts
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc
index 903ac8578..903ac8578 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/resources.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts
index 54f188694..54f188694 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_en.ts
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts
index 3f3cebc23..3f3cebc23 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/i18n-non-qt-class/translations/i18n-non-qt-class_fr.ts
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/image/image.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/image/image.cpp
index a35f95c94..a35f95c94 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/image/image.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/image/image.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp
index 2d8459f3e..2d8459f3e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/image/supportedformat.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/inherited-slot/button.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/inherited-slot/button.h
index 855bea055..855bea055 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/inherited-slot/button.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/inherited-slot/button.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/itemselection/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/itemselection/model.h
index 6b4076815..6b4076815 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/itemselection/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/itemselection/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp
index 9bcc5dbe0..9bcc5dbe0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/layouts/layouts.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp
index 1b0f94e8e..1b0f94e8e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/mainwindowsnippet.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp
index 369d25af5..369d25af5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/matrix/matrix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp
index f7d07c8f4..f7d07c8f4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/mdiareasnippets.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass1.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass1.h
index 0391b48aa..0391b48aa 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass1.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass1.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass2.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass2.h
index e39cb6a58..e39cb6a58 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass2.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass2.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass3.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass3.h
index 5110c6203..5110c6203 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/moc/myclass3.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/moc/myclass3.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h
index e9f85877a..e9f85877a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h
index f6a5e710c..f6a5e710c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/view.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h
index ac4988f5e..ac4988f5e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/modelview-subclasses/window.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/myscrollarea.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/myscrollarea.cpp
new file mode 100644
index 000000000..375df1b90
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/myscrollarea.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+import sys
+
+class MyScrollArea (QAbstractScrollArea):
+ widget = None
+
+ def __init__(widget):
+ self.setWidget(widget);
+
+ def setWidget(w):
+ self.widget = w;
+ self.widget.setParent(viewport());
+ if not self.widget.testAttribute(Qt.WA_Resized):
+ self.widget.resize(widget.sizeHint())
+
+ self.verticalScrollBar().setValue(0)
+ self.verticalScrollBar().setValue(0)
+
+ self.updateArea()
+
+
+ def updateWidgetPosition():
+//! [0]
+ hvalue = self.horizontalScrollBar().value()
+ vvalue = self.verticalScrollBar().value()
+ topLeft = self.viewport().rect().topLeft()
+
+ self.widget.move(topLeft.x() - hvalue, topLeft.y() - vvalue)
+//! [0]
+
+
+ def scrollContentsBy(dx, dy):
+ self.updateWidgetPosition()
+
+ def updateArea():
+//! [1]
+ areaSize = viewport().size()
+ widgetSize = widget.size()
+
+ self.verticalScrollBar().setPageStep(widgetSize.height())
+ self.horizontalScrollBar().setPageStep(widgetSize.width())
+ self.verticalScrollBar().setRange(0, widgetSize.height() - areaSize.height())
+ self.horizontalScrollBar().setRange(0, widgetSize.width() - areaSize.width())
+ self.updateWidgetPosition()
+//! [1]
+
+ def resizeEvent(QResizeEvent):
+ self.updateArea()
+
+app = QApplication(sys.argv)
+pixmap = QPixmap("mypixmap.png")
+label = QLabel()
+label.setPixmap(pixmap)
+area = MyScrollArea(label)
+area.resize(300, 300)
+area.show()
+
+area.setWidget(label)
+
+app.exec_();
+
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp
new file mode 100644
index 000000000..426d0f844
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/network/tcpwait.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+from PySide6.QtGui import *
+from PySide6.QtNetwork import QTcpSocket
+
+def main():
+ app = QCoreApplication()
+
+ socket = QTcpSocket()
+ socket.connectToHost("localhost", 1025)
+
+//! [0]
+ numRead = 0
+ numReadTotal = 0
+
+ while(True):
+ buffer = socket.read(50)
+ # do whatever with array
+ numReadTotal += buffer.size()
+ if (buffer.size() == 0 && !socket.waitForReadyRead()):
+ break
+//! [0]
+ return app.exec_()
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/ntfsp.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/ntfsp.cpp
index c50c3cd82..c50c3cd82 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/ntfsp.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/ntfsp.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq
index 9f5ee1275..9f5ee1275 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyHTMLElement.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq
index 059bcc081..059bcc081 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/anyXLinkAttribute.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq
index 3961c2838..3961c2838 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncluded.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml
index 0004c7126..0004c7126 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesIncludedResult.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq
index ffbadd077..ffbadd077 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmitted.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml
index 744fb8fe6..744fb8fe6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/bracesOmittedResult.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq
index c5b93ada6..c5b93ada6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/computedTreeFragment.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq
index 40e44942c..40e44942c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyAttribute.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyID.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyID.xq
index 2409cafe6..2409cafe6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/copyID.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/copyID.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq
index 96bc963b4..96bc963b4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/directTreeFragment.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/doc.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/doc.txt
index d30b057b2..d30b057b2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/doc.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/doc.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq
index 622bec891..622bec891 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq
index 5e7fbaedc..5e7fbaedc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/docPlainHTML2.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq
index b513922a3..b513922a3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq
index 754ddba87..754ddba87 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/embedDataInXHTML2.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq
index 6024d28a8..6024d28a8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/emptyParagraphs.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq
index 669e7c197..669e7c197 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeCurlyBraces.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml
index 425ccb075..425ccb075 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq
index 4a6054ba6..4a6054ba6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/escapeStringLiterals.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq
index 97f46b1c4..97f46b1c4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/expressionInsideAttribute.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq
index d23dfe8c7..d23dfe8c7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnPath.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq
index 46b77fa3c..46b77fa3c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/filterOnStep.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq
index db5e2c720..db5e2c720 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/firstParagraph.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq
index b26e9f2f4..b26e9f2f4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/fnStringOnAttribute.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause.xq
index a412dca47..a412dca47 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq
index 4fa505d53..4fa505d53 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClause2.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq
index 9ec33397b..9ec33397b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/forClauseOnFeed.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/indented.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/indented.xml
index a312c63f2..a312c63f2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/indented.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/indented.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq
index 4e6ee8044..4e6ee8044 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introAcneRemover.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq
index 411cc171f..411cc171f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introExample2.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml
index cfa6151ce..cfa6151ce 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introFileHierarchy.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq
index 1f5a3a73e..1f5a3a73e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introNavigateFS.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq
index 1a309dd7f..1a309dd7f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/introductionExample.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq
index d65f24066..d65f24066 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/invalidLetOrderBy.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/items.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/items.xq
index 0b46ec14e..0b46ec14e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/items.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/items.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq
index f4106d280..f4106d280 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/letOrderBy.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq
index ec4af33ba..ec4af33ba 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/literalsAndOperators.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml
index 32d0b6cae..32d0b6cae 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/mobeyDick.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq
index 9424f792b..9424f792b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nextLastParagraph.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq
index ce36e843a..ce36e843a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsAreExpressions.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq
index beb294fba..beb294fba 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeConstructorsInPaths.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq
index 7aa7b3437..7aa7b3437 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/nodeTestChildElement.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml
index b3321f286..b3321f286 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/notIndented.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq
index b7eb615f8..b7eb615f8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/oneElementConstructor.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq
index 16438d188..16438d188 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsExceptTheFiveFirst.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq
index dbb9fcf94..dbb9fcf94 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/paragraphsWithTables.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq
index 26fd1e5dc..26fd1e5dc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathAB.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq
index ba47900f9..ba47900f9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/pathsAllParagraphs.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq
index 93ac31ec6..93ac31ec6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleHTML.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq
index fda537167..fda537167 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/simpleXHTML.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml
index 0c7be4e2d..0c7be4e2d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/svgDocumentElement.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq
index fc92cf003..fc92cf003 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/tablesInParagraphs.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq
index ab4fe3580..ab4fe3580 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/twoSVGElements.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq
index 9e022081b..9e022081b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xmlStylesheet.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq
index 897a99e4d..897a99e4d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsBooleanTrue.xq
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml
index fb6a236e7..fb6a236e7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/patternist/xsvgDocumentElement.xml
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h
index 8f8c36f4e..8f8c36f4e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/model.h
index 0dbd0b849..0dbd0b849 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/persistentindexes/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/persistentindexes/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/picture/picture.cpp
index 6d4ef567c..6d4ef567c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/picture/picture.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/picture/picture.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h
index 1d14ed044..1d14ed044 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/plaintextlayout/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp
index 03c9f40d3..03c9f40d3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/polygon/polygon.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h
index 56bab84f0..56bab84f0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/porting4-dropevents/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp
index 8c71d1e81..8c71d1e81 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/errors.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h
index a70dcd16d..a70dcd16d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/printing-qprinter/object.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp
index db93f8ecb..db93f8ecb 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qabstractsliderisnippet.cpp
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp
new file mode 100644
index 000000000..d0189027a
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-listfiles/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+
+from PySide6.QtCore import QDir, QCoreApplication
+import sys
+
+app = QCoreApplication(sys.argv)
+directory = QDir()
+directory.setFilter(QDir.Files | QDir.Hidden | QDir.NoSymLinks)
+directory.setSorting(QDir.Size | QDir.Reversed)
+
+for entry in directory.entryInfoList():
+ print "%s %s" % (entry.size(), entry.fileName())
+
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp
new file mode 100644
index 000000000..5a323a97f
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qdir-namefilters/main.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+from PySide6.QtCore import *
+
+def main():
+ dir_ = QDir()
+ dir_.setFilter(QDir.Files | QDir.Hidden | QDir.NoSymLinks)
+ dir_.setSorting(QDir.Size | QDir.Reversed)
+
+//! [0]
+ filters = ["*.cpp", "*.cxx", "*.cc"]
+ dir_.setNameFilters(filters)
+//! [0]
+//
+ lst = d.entryInfoList()
+
+ print " Bytes Filename"
+ for fileInfo in lst:
+ print '%d %s' % (fileInfo.size(), fileInfo.fileName())
+
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp
index bc199b237..bc199b237 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qfontdatabase/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h
index d43ff3eae..d43ff3eae 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlineargradient/paintwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h
index 9788231c0..9788231c0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h
index 5ced99cfe..5ced99cfe 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-dnd/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h
index 848ef6b24..848ef6b24 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/model.h
index 6451ac281..6451ac281 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistview-using/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistview-using/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h
index ca6e41cf5..ca6e41cf5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-dnd/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h
index b03749df2..b03749df2 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qlistwidget-using/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm
index 12794b1d5..12794b1d5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmacnativewidget/main.mm
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/delegate.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/delegate.h
index ff07205b9..ff07205b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/delegate.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/delegate.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/main.cpp
index ff07205b9..ff07205b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.cpp
index ff07205b9..ff07205b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.h
index ff07205b9..ff07205b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp
index e4361c673..e4361c673 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/paintwidget_unix.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/view.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/view.h
index ff07205b9..ff07205b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmake/view.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmake/view.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h
index 7c8711105..7c8711105 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qmetaobject-invokable/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp
index 380989e4e..380989e4e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qquickview-ex.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h
index 6763da00d..6763da00d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/buttonwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h
index 18037fadd..18037fadd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsignalmapper/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
index 9b097f3bd..9b097f3bd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsortfilterproxymodel-details/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp
index 33b48f742..33b48f742 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h
index 22132039b..22132039b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc
index 330ec7868..330ec7868 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/qsplashscreen.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png
index d82f6d218..d82f6d218 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsplashscreen/splash.png
Binary files differ
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py
new file mode 100644
index 000000000..c02080ffc
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedlayout/main.py
@@ -0,0 +1,87 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the documentation of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtWidgets import QApplication, QWidget, QStackedLayout, QComboBox
+
+class Widget(QWidget)
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+//! [0]
+ self.firstPageWidget = QWidget()
+ self.secondPageWidget = QWidget()
+ self.thirdPageWidget = QWidget()
+
+ self.stackedLayout = QStackedLayout()
+ self.stackedLayout.addWidget(self.firstPageWidget)
+ self.stackedLayout.addWidget(self.secondPageWidget)
+ self.stackedLayout.addWidget(self.thirdPageWidget)
+
+//! [0] //! [1]
+ self.pageComboBox = QComboBox()
+ self.pageComboBox.addItem(tr("Page 1"))
+ self.pageComboBox.addItem(tr("Page 2"))
+ self.pageComboBox.addItem(tr("Page 3"))
+ self.pageComboBox.activated.connect(self.stackedLayout.setCurrentIndex)
+//! [1]
+
+//! [2]
+ self.mainLayout = QVBoxLayout()
+//! [2]
+ self.mainLayout.addWidget(self.pageComboBox)
+//! [3]
+ self.mainLayout.addLayout(self.stackedLayout)
+ self.setLayout(self.mainLayout)
+//! [3]
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+ widget = Widget()
+ widget.show()
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py
index 6f2c49d8e..6f2c49d8e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstackedwidget/main.py
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp
index 0ba3895a1..0ba3895a1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstatustipevent/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp
index 12fb026f7..12fb026f7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qstyleoption/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc
index 13d8b3612..13d8b3612 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/qsvgwidget.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg
index 9e3819306..9e3819306 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/spheres.svg
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg
index b60dd11a6..b60dd11a6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qsvgwidget/sunflower.svg
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png
index 2cd9048ca..2cd9048ca 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/cubed.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png
index bfdf99328..bfdf99328 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/Images/squared.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc
index 1d49b5286..1d49b5286 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/images.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h
index 8387de54a..8387de54a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-dnd/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h
index 8eaaa7e00..8eaaa7e00 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-resizing/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png
index 2cd9048ca..2cd9048ca 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/cubed.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png
index bfdf99328..bfdf99328 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/Images/squared.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc
index 1d49b5286..1d49b5286 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/images.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h
index 9571090ca..9571090ca 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtablewidget-using/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h
index eb0278fa8..eb0278fa8 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtcast/qtcast.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
index 6c89f166b..6c89f166b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h
index d526dce12..d526dce12 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h
index 4f3a1679f..4f3a1679f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treeitem.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h
index faf970ee9..faf970ee9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreeview-dnd/treemodel.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp
index c7b355c5e..c7b355c5e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h
index 876ceba07..876ceba07 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidget-using/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
index 3cbe3e65d..3cbe3e65d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h
index 876ceba07..876ceba07 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtreewidgetitemiterator-using/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h
index fa86f16d3..fa86f16d3 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/registeringobjects/myobject.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js
index 44ad0e657..44ad0e657 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/object.js
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc
index fc7ff67b9..fc7ff67b9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qtscript/scriptedslot/scriptedslot.qrc
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py
new file mode 100644
index 000000000..efac0ab6d
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/doc_src_qtuiloader.py
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+import PySide6.QtUiTools
+//! [1]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/myform.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/myform.ui
index 00702e860..00702e860 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/myform.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/myform.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h
index 66e9235f6..66e9235f6 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc
index 47684d68b..47684d68b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/quiloader/mywidget.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h
index 1d54f7088..1d54f7088 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qx11embedwidget/embedwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py
index 16c12b7bc..16c12b7bc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlquery/bindingExample.py
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp
index 0d81b914a..0d81b914a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/qxmlschemavalidator/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/model.h
index 6b4076815..6b4076815 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/window.h
index 7bebf72a4..7bebf72a4 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/reading-selections/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/reading-selections/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/finalwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/finalwidget.h
index 2b40e760f..2b40e760f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/finalwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/finalwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/screenwidget.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/screenwidget.h
index 2991e759e..2991e759e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/screenwidget.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/screenwidget.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/viewer.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/viewer.h
index 3713c27cf..3713c27cf 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/separations/viewer.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/separations/viewer.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp
new file mode 100644
index 000000000..b1adec9d0
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/shareddirmodel/main.cpp
@@ -0,0 +1,90 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""
+ main.cpp
+
+ A simple example of how to view a model in several views, and share a
+ selection model.
+"""
+
+from PySide6.QtGui import *
+
+
+//! [0] //! [1]
+def main():
+ app = QApplication(sys.argv)
+ splitter = QSplitter()
+
+//! [2] //! [3]
+ model = QFileSystemModel()
+ model.setRootPath(QDir.currentPath())
+//! [0] //! [2] //! [4] //! [5]
+ tree = QTreeView()
+//! [3] //! [6]
+ tree.setModel(model)
+//! [4] //! [6] //! [7]
+ tree.setRootIndex(model.index(QDir.currentPath()))
+//! [7]
+
+ list = QListView(splitter)
+ list.setModel(model)
+ list.setRootIndex(model.index(QDir.currentPath()))
+
+//! [5]
+ selection = QItemSelectionModel(model)
+ tree.setSelectionModel(selection)
+ list.setSelectionModel(selection)
+
+//! [8]
+ splitter.setWindowTitle("Two views onto the same directory model")
+ splitter.show()
+ return app.exec_()
+//! [1] //! [8]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h
index 23ffcddc7..23ffcddc7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/sharedemployee/employee.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h
index 6b4076815..6b4076815 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/sharedtablemodel/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt
index 2ec5ffbc1..2ec5ffbc1 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/accountsfile.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h
index 6509951ba..6509951ba 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/filereader.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt
index 30123cc60..30123cc60 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/reportfile.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt
index a682e0aaa..a682e0aaa 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalmapper/taxfile.txt
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h
index 68563e05c..68563e05c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/lcdnumber.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h
index c89e83d37..c89e83d37 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/signalsandslots/signalsandslots.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/simpleparse/handler.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/simpleparse/handler.h
index ea1b8b392..ea1b8b392 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/simpleparse/handler.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/simpleparse/handler.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp
index 90fd928fd..90fd928fd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/splitter/splitter.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h
index 5ecaafcdf..5ecaafcdf 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/splitterhandle/splitter.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py
new file mode 100644
index 000000000..106dc5f7f
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/sqldatabase/sqldatabase.py
@@ -0,0 +1,489 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+from PySide6.QtSql import *
+
+
+def tr(text):
+ return QApplication.translate(text, text)
+
+def QSqlDatabase_snippets():
+//! [0]
+ db = QSqlDatabase.addDatabase("QPSQL")
+ db.setHostName("acidalia")
+ db.setDatabaseName("customdb")
+ db.setUserName("mojito")
+ db.setPassword("J0a1m8")
+ ok = db.open()
+//! [0]
+
+//! [1]
+ db = QSqlDatabase.database()
+//! [1]
+
+def QSqlField_snippets():
+//! [2]
+ field = QSqlField("age", QVariant.Int)
+ field.setValue(QPixmap()) # WRONG
+//! [2]
+
+//! [3]
+ field = QSqlField("age", QVariant.Int)
+ field.setValue(str(123)) # casts str to int
+//! [3]
+
+//! [4]
+ query = QSqlQuery()
+//! [4] //! [5]
+ record = query.record()
+//! [5] //! [6]
+ field = record.field("country")
+//! [6]
+
+def doSomething(str):
+ pass
+
+def QSqlQuery_snippets():
+ # typical loop
+//! [7]
+ query = QSqlQuery("SELECT country FROM artist")
+ while query.next():
+ country = query.value(0)
+ doSomething(country)
+//! [7]
+
+
+ # field index lookup
+//! [8]
+ query = QSqlQuery("SELECT * FROM artist")
+ fieldNo = query.record().indexOf("country")
+ while query.next():
+ country = query.value(fieldNo)
+ doSomething(country)
+//! [8]
+
+ # named with named
+//! [9]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (:id, :forename, :surname)")
+ query.bindValue(":id", 1001)
+ query.bindValue(":forename", "Bart")
+ query.bindValue(":surname", "Simpson")
+ query.exec_()
+//! [9]
+
+ # positional with named
+//! [10]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (:id, :forename, :surname)")
+ query.bindValue(0, 1001)
+ query.bindValue(1, "Bart")
+ query.bindValue(2, "Simpson")
+ query.exec_()
+//! [10]
+
+ # positional 1
+//! [11]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (?, ?, ?)")
+ query.bindValue(0, 1001)
+ query.bindValue(1, "Bart")
+ query.bindValue(2, "Simpson")
+ query.exec_()
+//! [11]
+
+ # positional 2
+//! [12]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO person (id, forename, surname) "
+ "VALUES (?, ?, ?)")
+ query.addBindValue(1001)
+ query.addBindValue("Bart")
+ query.addBindValue("Simpson")
+ query.exec_()
+//! [12]
+
+ # stored
+//! [13]
+ query = QSqlQuery()
+ query.prepare("CALL AsciiToInt(?, ?)")
+ query.bindValue(0, "A")
+ query.bindValue(1, 0, QSql.Out)
+ query.exec_()
+ i = query.boundValue(1) # i is 65
+//! [13]
+
+ query = QSqlQuery()
+
+ # examine with named binding
+//! [14]
+ i = query.boundValues()
+ while i.hasNext():
+ i.next()
+ print i.key(), ": ", i.value()
+//! [14]
+
+ # examine with positional binding
+//! [15]
+ list_ = query.boundValues().values()
+ for item in list:
+ print item
+//! [15]
+
+def QSqlQueryModel_snippets():
+
+//! [16]
+ model = QSqlQueryModel()
+ model.setQuery("SELECT name, salary FROM employee")
+ model.setHeaderData(0, Qt.Horizontal, tr("Name"))
+ model.setHeaderData(1, Qt.Horizontal, tr("Salary"))
+
+//! [17]
+ view = QTableView()
+//! [17] //! [18]
+ view.setModel(model)
+//! [18] //! [19]
+ view.show()
+//! [16] //! [19] //! [20]
+ view.setEditTriggers(QAbstractItemView.NoEditTriggers)
+//! [20]
+
+//! [21]
+ model = QSqlQueryModel()
+ model.setQuery("SELECT * FROM employee")
+ salary = model.record(4).value("salary")
+//! [21]
+
+//! [22]
+ salary = model.data(model.index(4, 2))
+//! [22]
+
+ for row in range(model.rowCount()):
+ for (col in range(model.columnCount())):
+ print model.data(model.index(row, col))
+
+
+class MyModel(QSqlQueryModel)
+ m_specialColumnNo = 0
+ def data(item, role):
+//! [23]
+ if item.column() == self.m_specialColumnNo:
+ # handle column separately
+ pass
+
+ return QSqlQueryModel.data(item, role)
+
+//! [23]
+
+
+def QSqlTableModel_snippets():
+
+//! [24]
+ model = QSqlTableModel()
+ model.setTable("employee")
+ model.setEditStrategy(QSqlTableModel.OnManualSubmit)
+ model.select()
+ model.removeColumn(0) # don't show the ID
+ model.setHeaderData(0, Qt.Horizontal, tr("Name"))
+ model.setHeaderData(1, Qt.Horizontal, tr("Salary"))
+
+ view = QTableView()
+ view.setModel(model)
+ view.show()
+//! [24]
+
+
+//! [25]
+ model = QSqlTableModel()
+ model.setTable("employee")
+ name = model.record(4).value("name")
+//! [25]
+
+def sql_intro_snippets():
+
+//! [26]
+ db = QSqlDatabase.addDatabase("QMYSQL")
+ db.setHostName("bigblue")
+ db.setDatabaseName("flightdb")
+ db.setUserName("acarlson")
+ db.setPassword("1uTbSbAs")
+ ok = db.open()
+//! [26]
+
+//! [27]
+ firstDB = QSqlDatabase.addDatabase("QMYSQL", "first")
+ secondDB = QSqlDatabase.addDatabase("QMYSQL", "second")
+//! [27]
+
+//! [28]
+ defaultDB = QSqlDatabase.database()
+//! [28] //! [29]
+ firstDB = QSqlDatabase.database("first")
+//! [29] //! [30]
+ secondDB = QSqlDatabase.database("second")
+//! [30]
+
+ # SELECT1
+//! [31]
+ query = QSqlQuery()
+ query.exec_("SELECT name, salary FROM employee WHERE salary > 50000")
+//! [31]
+
+//! [32]
+ while query.next():
+ name = query.value(0)
+ salary = query.value(1)
+ print name, salary
+//! [32]
+
+ # FEATURE
+//! [33]
+ query = QSqlQuery()
+ query.exec_("SELECT name, salary FROM employee WHERE salary > 50000")
+
+ defaultDB = QSqlDatabase.database()
+ if defaultDB.driver().hasFeature(QSqlDriver.QuerySize):
+ numRows = query.size()
+ else:
+ # self can be very slow
+ query.last()
+ numRows = query.at() + 1
+//! [33]
+
+ # INSERT1
+//! [34]
+ query = QSqlQuery()
+ query.exec_("INSERT INTO employee (id, name, salary) "
+ "VALUES (1001, 'Thad Beaumont', 65000)")
+//! [34]
+
+ # NAMED BINDING
+//! [35]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO employee (id, name, salary) "
+ "VALUES (:id, :name, :salary)")
+ query.bindValue(":id", 1001)
+ query.bindValue(":name", "Thad Beaumont")
+ query.bindValue(":salary", 65000)
+ query.exec_()
+//! [35]
+
+ # POSITIONAL BINDING
+//! [36]
+ query = QSqlQuery()
+ query.prepare("INSERT INTO employee (id, name, salary) "
+ "VALUES (?, ?, ?)")
+ query.addBindValue(1001)
+ query.addBindValue("Thad Beaumont")
+ query.addBindValue(65000)
+ query.exec_()
+//! [36]
+
+ # UPDATE1
+//! [37]
+ query = QSqlQuery()
+ query.exec_("UPDATE employee SET salary = 70000 WHERE id = 1003")
+//! [37]
+
+ # DELETE1
+//! [38]
+ query = QSqlQuery()
+ query.exec_("DELETE FROM employee WHERE id = 1007")
+//! [38]
+
+ # TRANSACTION
+//! [39]
+ QSqlDatabase.database().transaction()
+ query = QSqlQuery()
+ query.exec_("SELECT id FROM employee WHERE name = 'Torild Halvorsen'")
+ if query.next():
+ employeeId = query.value(0)
+ query.exec_("INSERT INTO project (id, name, ownerid) "
+ "VALUES (201, 'Manhattan Project', "
+ + str(employeeId) + ')')
+
+ QSqlDatabase.database().commit()
+//! [39]
+
+ # SQLQUERYMODEL1
+//! [40]
+ model = QSqlQueryModel()
+ model.setQuery("SELECT * FROM employee")
+
+ for i in range(model.rowCount()):
+ _id = model.record(i).value("id")
+ name = model.record(i).value("name")
+ print _id, name
+
+//! [40]
+ }
+
+ {
+ # SQLTABLEMODEL1
+//! [41]
+ model = QSqlTableModel()
+ model.setTable("employee")
+ model.setFilter("salary > 50000")
+ model.setSort(2, Qt.DescendingOrder)
+ model.select()
+
+ for i in range(model.rowCount()):
+ name = model.record(i).value("name")
+ salary = model.record(i).value("salary")
+ print "%s: %d" % (name, salary)
+
+//! [41]
+
+ # SQLTABLEMODEL2
+ model = QSqlTableModel()
+ model.setTable("employee")
+
+//! [42]
+ for i in range(model.rowCount()):
+ record = model.record(i)
+ salary = record.value("salary")
+ salary *= 1.1
+ record.setValue("salary", salary)
+ model.setRecord(i, record)
+
+ model.submitAll()
+//! [42]
+
+ # SQLTABLEMODEL3
+ row = 1
+ column = 2
+//! [43]
+ model.setData(model.index(row, column), 75000)
+ model.submitAll()
+//! [43]
+
+ # SQLTABLEMODEL4
+//! [44]
+ model.insertRows(row, 1)
+ model.setData(model.index(row, 0), 1013)
+ model.setData(model.index(row, 1), "Peter Gordon")
+ model.setData(model.index(row, 2), 68500)
+ model.submitAll()
+//! [44]
+
+//! [45]
+ model.removeRows(row, 5)
+//! [45]
+
+//! [46]
+ model.submitAll()
+//! [46]
+
+//! [47]
+class XyzResult(QSqlResult):
+ def __init__(driver):
+ QSqlResult.__init__(self, driver)
+ pass
+
+ def data(self, index):
+ return QVariant()
+
+ def isNull(self, index):
+ return False
+
+ def reset(self, query):
+ return False
+
+ def fetch(self, index):
+ return False
+
+ def fetchFirst(self):
+ return False
+
+ def fetchLast(self):
+ return False
+
+ def size(self):
+ return 0
+
+ def numRowsAffected(self):
+ return 0
+
+ def record(self):
+ return QSqlRecord()
+
+//! [47]
+
+//! [48]
+class XyzDriver(QSqlDriver)
+ def hasFeature(self, feature):
+ return False
+
+ def open(self, db, user, password, host, port, options):
+ return False
+
+ def close(self):
+ pass
+
+ def createResult(self):
+ return XyzResult(self)
+
+//! [48]
+
+def main():
+ app = QApplication([])
+
+ QSqlDatabase_snippets()
+ QSqlField_snippets()
+ QSqlQuery_snippets()
+ QSqlQueryModel_snippets()
+ QSqlTableModel_snippets()
+
+ driver = XyzDriver()
+ result = XyzResult(driver)
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp
index 79c449d79..79c449d79 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h
index 5868952d5..5868952d5 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/stringlistmodel/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/styles/styles.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/styles/styles.cpp
index b17445179..b17445179 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/styles/styles.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/styles/styles.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp
index a8dfe2514..a8dfe2514 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/stylesheet/common-mistakes.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h
index 4b691b543..4b691b543 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h
index 56ce14089..56ce14089 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textblock-fragments/xmlwriter.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h
index 4b691b543..4b691b543 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h
index 562ce5dd0..562ce5dd0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-blocks/xmlwriter.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp
index 987489d4b..987489d4b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-css/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h
index 9aad859dc..9aad859dc 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h
index 707af5152..707af5152 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-frames/xmlwriter.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h
index a80481a4d..a80481a4d 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imagedrop/textedit.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc
index 6473daf34..6473daf34 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png
index 40e10d522..40e10d522 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/advert.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png
index 0eec048a7..0eec048a7 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-imageformat/images/newimage.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc
index 09e305e8f..09e305e8f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png
index 40e10d522..40e10d522 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-images/images/advert.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h
index deeeab85a..deeeab85a 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-listitems/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h
index a52fa764f..a52fa764f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-lists/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h
index c80d42bb0..c80d42bb0 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-printing/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h
index ba889195e..ba889195e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-selections/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp
index cf43b08c9..cf43b08c9 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h
index 36fd19709..36fd19709 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/mainwindow.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h
index ebfbc826f..ebfbc826f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-tables/xmlwriter.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp
index b6622636c..b6622636c 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/textdocument-texttable/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/threads/threads.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/threads/threads.h
index 2c4894315..2c4894315 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/threads/threads.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/threads/threads.h
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/timers/timers.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/timers/timers.cpp
new file mode 100644
index 000000000..f1d70446b
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/timers/timers.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+from PySide6.QtCore import QTimer
+
+class Foo : public QObject
+{
+public:
+ Foo()
+}
+
+Foo::Foo()
+{
+//! [0]
+ timer = QTimer(self)
+//! [0] //! [1]
+ timer.timeout.connect(self.updateCaption)
+//! [1] //! [2]
+ timer.start(1000)
+//! [2]
+
+//! [3]
+ QTimer.singleShot(200, self.updateCaption)
+//! [3]
+
+ {
+ // ZERO-CASE
+//! [4]
+ timer = QTimer(self)
+//! [4] //! [5]
+ timer.timeout.connect(self.processOneThing)
+//! [5] //! [6]
+ timer.start()
+//! [6]
+ }
+}
+
+int main()
+{
+
+}
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/transform/main.cpp
index 325ea1c7e..325ea1c7e 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/transform/main.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/transform/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui b/sources/pyside6/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui
index dda0e62dd..dda0e62dd 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/uitools/calculatorform/calculatorform.ui
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/model.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/model.h
index 6b4076815..6b4076815 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/model.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/model.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/window.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/window.h
index ba4a36a03..ba4a36a03 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/updating-selections/window.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/updating-selections/window.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp
index ea97d1e35..ea97d1e35 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/whatsthis/whatsthis.cpp
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc b/sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc
index 92f227253..92f227253 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/mask.qrc
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/tux.png b/sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/tux.png
index a95527f3f..a95527f3f 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/widget-mask/tux.png
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/widget-mask/tux.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp b/sources/pyside6/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp
index 960d50158..960d50158 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/widgetdelegate.cpp
diff --git a/sources/pyside6/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py b/sources/pyside6/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py
new file mode 100644
index 000000000..6f8f2ed39
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/widgets-tutorial/template.py
@@ -0,0 +1,66 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the documentation of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+//! [main.cpp body]
+import sys
+from PySide6.QtWidgets import QApplication
+
+# Include header files for application components.
+# ...
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ # Set up and show widgets.
+ # ...
+
+ sys.exit(app.exec_())
+}
+//! [main.cpp body]
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h
index 89acb5d36..89acb5d36 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/handler.h
diff --git a/sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h b/sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h
index c7d75528b..c7d75528b 100644
--- a/sources/pyside2/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h
+++ b/sources/pyside6/doc/codesnippets/doc/src/snippets/xml/rsslisting/rsslisting.h
diff --git a/sources/pyside6/doc/codesnippets/examples/dbus/example-client.py b/sources/pyside6/doc/codesnippets/examples/dbus/example-client.py
new file mode 100644
index 000000000..663c02e96
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/dbus/example-client.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the documentation of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## # Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## # Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## # Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# -*- coding: utf-8 -*-
+
+# DBUS Client using PySide integration
+
+import sys
+from traceback import print_exc
+
+# import python dbus module
+import dbus
+# import python dbus GLib mainloop support
+import dbus.mainloop.glib
+# import QtCore
+from PySide6.QtCore import *
+
+# signal handler
+def button_clicked():
+ print "button clicked"
+
+# main function
+if __name__ == '__main__':
+
+ # Enable glib main loop support
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+ # Get the session bus
+ bus = dbus.SessionBus()
+
+ try:
+ # Get the remote object
+ remote_object = bus.get_object("com.example.SampleService",
+ "/DBusWidget")
+ # Get the remote interface for the remote object
+ iface = dbus.Interface(remote_object, "com.example.SampleWidget")
+ except dbus.DBusException:
+ print_exc()
+ sys.exit(1)
+
+ # Start the application
+ app = QCoreApplication([])
+
+ # Call some methods of the remote interface
+ iface.show()
+ iface.setText("Emit signal")
+ # connect the DBus signal clicked to the function button_clicked
+ iface.connect_to_signal("clicked", button_clicked)
+ iface.connect_to_signal("lastWindowClosed", app.quit)
+
+ # enter in the main loop
+ app.exec_()
diff --git a/sources/pyside6/doc/codesnippets/examples/dbus/example-server.py b/sources/pyside6/doc/codesnippets/examples/dbus/example-server.py
new file mode 100644
index 000000000..78f6eac2e
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/dbus/example-server.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the documentation of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## # Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## # Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## # Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# -*- coding: utf-8 -*-
+
+# DBUS Server Example of use PySide with PyDBus library
+
+import dbus
+import dbus.service
+import dbus.mainloop.glib
+import random
+
+from PySide6.QtCore import *
+from PySide6.QtGui import QPushButton, QApplication
+
+# The adaptor, MUST inherit dbus.service.Object
+class DBusWidget(dbus.service.Object):
+ def __init__(self, name, session):
+ # export this object to dbus
+ dbus.service.Object.__init__(self, name, session)
+
+ # create a simple widget
+ self.widget = QPushButton()
+ self.widget.resize(200, 50)
+
+ # To export a Qt signal as a DBus-signal, you need to connect it to a method in this class.
+ # The method MUST have the signal annotation, so python-dbus will export it as a dbus-signal
+ QObject.connect(self.widget, SIGNAL("clicked()"), self.clicked)
+ QObject.connect(QApplication.instance(), SIGNAL("lastWindowClosed()"), self.lastWindowClosed)
+
+ # You can export methods to dbus like you do in python-dbus.
+ @dbus.service.method("com.example.SampleWidget", in_signature='', out_signature='')
+ def show(self):
+ self.widget.show()
+
+ # Another method... now with a parameter
+ @dbus.service.method("com.example.SampleWidget", in_signature='s', out_signature='')
+ def setText(self, value):
+ self.widget.setText(value)
+
+ # Another one...
+ @dbus.service.method("com.example.SampleWidget", in_signature='', out_signature='')
+ def exit(self):
+ qApp().quit()
+
+ # A signal that will be exported to dbus
+ @dbus.service.signal("com.example.SampleWidget", signature='')
+ def clicked(self):
+ pass
+
+ # Another signal that will be exported to dbus
+ @dbus.service.signal("com.example.SampleWidget", signature='')
+ def lastWindowClosed(self):
+ pass
+
+
+if __name__ == '__main__':
+ app = QApplication([])
+ # Use qt/glib mainloop integration to get dbus mainloop working
+ dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+ session_bus = dbus.SessionBus()
+ # Export the service
+ name = dbus.service.BusName("com.example.SampleService", session_bus)
+ # Export the object
+ widget = DBusWidget(session_bus, '/DBusWidget')
+
+ print "Running example service."
+ app.exec_()
+
diff --git a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp b/sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp
index 4b8b9234f..4b8b9234f 100644
--- a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugin.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml b/sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml
index 415531885..415531885 100644
--- a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml
+++ b/sources/pyside6/doc/codesnippets/examples/declarative/cppextensions/plugins/plugins.qml
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.py b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.py
index 08032cf2a..08032cf2a 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.py
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.py
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc
index 41a5ddc7d..41a5ddc7d 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/classwizard.qrc
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/background.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/background.png
index 44c7badb8..44c7badb8 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/background.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/background.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/banner.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/banner.png
index 3169152b8..3169152b8 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/banner.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/banner.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png
index f9b594aaf..f9b594aaf 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo1.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png
index 5dcbd4669..5dcbd4669 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo2.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png
index 9fd3ea235..9fd3ea235 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/logo3.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png
index 0091f5c17..0091f5c17 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark1.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png
index 3b88f2e36..3b88f2e36 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/classwizard/images/watermark2.png
Binary files differ
diff --git a/sources/pyside6/doc/codesnippets/examples/dialogs/extension/finddialog.py b/sources/pyside6/doc/codesnippets/examples/dialogs/extension/finddialog.py
new file mode 100644
index 000000000..fc007ab85
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/extension/finddialog.py
@@ -0,0 +1,119 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+
+from PySide6.QtGui import *
+
+//! [0]
+def __init__(self, parent):
+ QDialog.__init__(self, parent)
+ label = QLabel(self.tr("Find &what:"))
+ lineEdit = QLineEdit()
+ label.setBuddy(lineEdit)
+
+ caseCheckBox = QCheckBox(self.tr("Match &case"))
+ fromStartCheckBox = QCheckBox(self.tr("Search from &start"))
+ fromStartCheckBox.setChecked(True)
+
+//! [1]
+ findButton = QPushButton(self.tr("&Find"))
+ findButton.setDefault(True)
+
+ moreButton = QPushButton(self.tr("&More"))
+ moreButton.setCheckable(True)
+//! [0]
+ moreButton.setAutoDefault(False)
+
+ buttonBox = QDialogButtonBox(Qt.Vertical)
+ buttonBox.addButton(findButton, QDialogButtonBox.ActionRole)
+ buttonBox.addButton(moreButton, QDialogButtonBox.ActionRole)
+//! [1]
+
+//! [2]
+ extension = QWidget()
+
+ wholeWordsCheckBox = QCheckBox(self.tr("&Whole words"))
+ backwardCheckBox = QCheckBox(self.tr("Search &backward"))
+ searchSelectionCheckBox = QCheckBox(self.tr("Search se&lection"))
+//! [2]
+
+//! [3]
+ moreButton.toggled[bool].connect(extension.setVisible)
+
+ extensionLayout = QVBoxLayout()
+ extensionLayout.setMargin(0)
+ extensionLayout.addWidget(wholeWordsCheckBox)
+ extensionLayout.addWidget(backwardCheckBox)
+ extensionLayout.addWidget(searchSelectionCheckBox)
+ extension.setLayout(extensionLayout)
+//! [3]
+
+//! [4]
+ topLeftLayout = QHBoxLayout()
+ topLeftLayout.addWidget(label)
+ topLeftLayout.addWidget(lineEdit)
+
+ leftLayout = QVBoxLayout()
+ leftLayout.addLayout(topLeftLayout)
+ leftLayout.addWidget(caseCheckBox)
+ leftLayout.addWidget(fromStartCheckBox)
+ leftLayout.addSself.tretch(1)
+
+ mainLayout = QGridLayout()
+ mainLayout.setSizeConsself.traint(QLayout.SetFixedSize)
+ mainLayout.addLayout(leftLayout, 0, 0)
+ mainLayout.addWidget(buttonBox, 0, 1)
+ mainLayout.addWidget(extension, 1, 0, 1, 2)
+ setLayout(mainLayout)
+
+ setWindowTitle(self.tr("Extension"))
+//! [4] //! [5]
+ extension.hide()
+//! [5]
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png
index 56f17a3e5..56f17a3e5 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/logo.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png
index 124a05068..124a05068 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/images/watermark.png
Binary files differ
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h
index f0be5fa60..f0be5fa60 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.h
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc
index b06993851..b06993851 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/licensewizard/licensewizard.qrc
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp b/sources/pyside6/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp
index db11e22f8..db11e22f8 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/standarddialogs/dialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp b/sources/pyside6/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp
index 4fff4d631..4fff4d631 100644
--- a/sources/pyside2/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/dialogs/tabdialog/tabdialog.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp b/sources/pyside6/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp
index 818d865e3..818d865e3 100644
--- a/sources/pyside2/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/graphicsview/simpleanchorlayout/main.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider-example.qml b/sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider-example.qml
index 58f2599dc..58f2599dc 100644
--- a/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider-example.qml
+++ b/sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider-example.qml
diff --git a/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider.cpp b/sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider.cpp
index b3890114b..b3890114b 100644
--- a/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/imageprovider/imageprovider.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/sources/pyside6/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
index f99b7e18e..f99b7e18e 100644
--- a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp b/sources/pyside6/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp
index 7c207d19c..7c207d19c 100644
--- a/sources/pyside2/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/itemviews/pixelator/pixeldelegate.cpp
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.h b/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.h
new file mode 100644
index 000000000..ce3eafb89
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QMainWindow, QMenu,
+ QPlainTextEdit, QSessionManager)
+
+
+//! [0]
+class MainWindow(QMainWindow):
+ def __init__(self, parent=None):
+ self.textEdit = QPlainTextEdit()
+ self.curFile = ""
+ # ...
+
+ def loadFile(self, fileName):
+ pass
+
+ def closeEvent(self, event):
+ pass
+
+ def newFile(self):
+ pass
+
+ def open(self):
+ pass
+
+ def save(self):
+ pass
+
+ def saveAs(self):
+ pass
+
+ def about(self):
+ pass
+
+ def documentWasModified(self):
+ pass
+ # Enable this only if QT_NO_SESSIONMANAGER is not defined
+ # def commitData(self):
+ # pass
+
+ def createActions(self):
+ pass
+
+ def createStatusBar(self):
+ pass
+
+ def readSettings(self):
+ pass
+
+ def writeSettings(self):
+ pass
+
+ def maybeSave(self):
+ pass
+
+ def saveFile(self, fileName):
+ pass
+
+ def setCurrentFile(self, fileName):
+ pass
+
+ def strippedName(self, fullFileName):
+ pass
+//! [0]
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.py b/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.py
new file mode 100644
index 000000000..f9a93cfc8
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/application/mainwindow.py
@@ -0,0 +1,357 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+//! [0]
+from PySide6.QtCore import Qt, QFile, QFileInfo, QSettings, QTextStream
+from PySide6.QtGui import QIcon
+from PySide6.Widgets import (QAction, QApplication, QFileDialog, QMainWindow,
+ QPlainTextEdit, QFileDialog, QMessageBox, )
+//! [0]
+
+//! [1]
+def __init__(self, parent=None):
+ QMainWindow.__init__(self)
+//! [1] //! [2]
+ self.textEdit = QPlainTextEdit()
+ self.setCentralWidget(textEdit)
+
+ self.createActions()
+ self.createMenus()
+ self.createToolBars()
+ self.createStatusBar()
+
+ self.readSettings()
+
+ self.textEdit.document().contentsChanged.connect(self.documentWasModified)
+
+ self.setCurrentFile("")
+ self.setUnifiedTitleAndToolBarOnMac(True)
+
+//! [2]
+
+//! [3]
+def closeEvent(self, event):
+//! [3] //! [4]
+ if maybeSave():
+ writeSettings()
+ event.accept()
+ else:
+ event.ignore()
+//! [4]
+
+//! [5]
+def File(self):
+//! [5] //! [6]
+ if maybeSave():
+ textEdit.clear()
+ setCurrentFile("")
+//! [6]
+
+//! [7]
+def open(self):
+//! [7] //! [8]
+ if maybeSave():
+ fileName = QFileDialog.getOpenFileName(self)
+ if not fileName.isEmpty():
+ loadFile(fileName)
+//! [8]
+
+//! [9]
+def save(self):
+//! [9] //! [10]
+ if curFile.isEmpty():
+ return saveAs()
+ else:
+ return saveFile(curFile)
+//! [10]
+
+//! [11]
+def saveAs(self):
+//! [11] //! [12]
+ fileName = QFileDialog.getSaveFileName(self)
+ if fileName.isEmpty():
+ return False
+
+ return saveFile(fileName)
+//! [12]
+
+//! [13]
+def about(self):
+//! [13] //! [14]
+ QMessageBox.about(self, tr("About Application"),
+ tr("The <b>Application</b> example demonstrates how to "
+ "write modern GUI applications using Qt, with a menu bar, "
+ "toolbars, and a status bar."))
+
+//! [14]
+
+//! [15]
+def documentWasModified(self):
+//! [15] //! [16]
+ setWindowModified(textEdit.document().isModified())
+//! [16]
+
+//! [17]
+def MainWindow.createActions(self):
+//! [17] //! [18]
+ Act = QAction(QIcon(":/images/new.png"), tr("&New"), self)
+ Act.setShortcuts(QKeySequence.New)
+ Act.setStatusTip(tr("Create a new file"))
+ Act.triggered.connect(newFile)
+
+//! [19]
+ openAct = QAction(QIcon(":/images/open.png"), tr("&Open..."), self)
+ openAct.setShortcuts(QKeySequence.Open)
+ openAct.setStatusTip(tr("Open an existing file"))
+ openAct.triggered.connect(open)
+//! [18] //! [19]
+
+ saveAct = QAction(QIcon(":/images/save.png"), tr("&Save"), self)
+ saveAct.setShortcuts(QKeySequence.Save)
+ saveAct.setStatusTip(tr("Save the document to disk"))
+ saveAct.triggered.connect(save)
+
+ saveAsAct = QAction(tr("Save &As..."), self)
+ saveAsAct.setShortcuts(QKeySequence.SaveAs)
+ saveAsAct.setStatusTip(tr("Save the document under a name"))
+ saveAsAct.triggered.connect(saveAs)
+
+//! [20]
+ exitAct = QAction(tr("E&xit"), self)
+ exitAct.setShortcut(tr("Ctrl+Q"))
+//! [20]
+ exitAct.setStatusTip(tr("Exit the application"))
+ exitAct.triggered.connect(close)
+
+//! [21]
+ cutAct = QAction(QIcon(":/images/cut.png"), tr("Cu&t"), self)
+//! [21]
+ cutAct.setShortcuts(QKeySequence.Cut)
+ cutAct.setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"))
+ cutAct.triggered.connect(cut)
+
+ copyAct = QAction(QIcon(":/images/copy.png"), tr("&Copy"), self)
+ copyAct.setShortcuts(QKeySequence.Copy)
+ copyAct.setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"))
+ copyAct.triggered.connect(copy)
+
+ pasteAct = QAction(QIcon(":/images/paste.png"), tr("&Paste"), self)
+ pasteAct.setShortcuts(QKeySequence.Paste)
+ pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"))
+ pasteAct.triggered.connect(textEdit.paste)
+
+ aboutAct = QAction(tr("&About"), self)
+ aboutAct.setStatusTip(tr("Show the application's About box"))
+ aboutAct.triggered.connect(about)
+
+//! [22]
+ aboutQtAct = QAction(tr("About &Qt"), self)
+ aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
+ aboutQtAct.triggered.connect(qApp.aboutQt)
+//! [22]
+
+//! [23]
+ cutAct.setEnabled(False)
+//! [23] //! [24]
+ copyAct.setEnabled(False)
+ textEdit.copyAvailable[bool].connect(cutAct.setEnabled)
+ textEdit.copyAvailable[bool].connect(copyAct.setEnabled)
+}
+//! [24]
+
+//! [25] //! [26]
+def createMenus(self):
+//! [25] //! [27]
+ fileMenu = menuBar().addMenu(tr("&File"))
+ fileMenu.addAction(Act)
+//! [28]
+ fileMenu.addAction(openAct)
+//! [28]
+ fileMenu.addAction(saveAct)
+//! [26]
+ fileMenu.addAction(saveAsAct)
+ fileMenu.addSeparator()
+ fileMenu.addAction(exitAct)
+
+ editMenu = menuBar().addMenu(tr("&Edit"))
+ editMenu.addAction(cutAct)
+ editMenu.addAction(copyAct)
+ editMenu.addAction(pasteAct)
+
+ menuBar().addSeparator()
+
+ helpMenu = menuBar().addMenu(tr("&Help"))
+ helpMenu.addAction(aboutAct)
+ helpMenu.addAction(aboutQtAct)
+
+//! [27]
+
+//! [29] //! [30]
+def createToolBars(self):
+ fileToolBar = addToolBar(tr("File"))
+ fileToolBar.addAction(Act)
+//! [29] //! [31]
+ fileToolBar.addAction(openAct)
+//! [31]
+ fileToolBar.addAction(saveAct)
+
+ editToolBar = addToolBar(tr("Edit"))
+ editToolBar.addAction(cutAct)
+ editToolBar.addAction(copyAct)
+ editToolBar.addAction(pasteAct)
+//! [30]
+
+//! [32]
+def createStatusBar(self):
+//! [32] //! [33]
+ statusBar().showMessage(tr("Ready"))
+
+//! [33]
+
+//! [34] //! [35]
+def readSettings(self):
+//! [34] //! [36]
+ settings("Trolltech", "Application Example")
+ pos = settings.value("pos", QPoint(200, 200)).toPoint()
+ size = settings.value("size", QSize(400, 400)).toSize()
+ resize(size)
+ move(pos)
+
+//! [35] //! [36]
+
+//! [37] //! [38]
+def writeSettings(self):
+//! [37] //! [39]
+ settings = QSettings("Trolltech", "Application Example")
+ settings.setValue("pos", pos())
+ settings.setValue("size", size())
+
+//! [38] //! [39]
+
+//! [40]
+def maybeSave(self):
+//! [40] //! [41]
+ if textEdit.document()->isModified():
+ ret = QMessageBox.warning(self, tr("Application"),
+ tr("The document has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
+ if ret == QMessageBox.Save:
+ return save()
+ elif ret == QMessageBox.Cancel:
+ return False
+ return True
+//! [41]
+
+//! [42]
+def loadFile(self, fileName):
+//! [42] //! [43]
+ file = QFile(fileName)
+ if !file.open(QFile.ReadOnly | QFile.Text):
+ QMessageBox.warning(self, tr("Application"), tr("Cannot read file "
+ "{}:\n{}.".format(fileName, file.errorString())))
+ return
+
+ in = QTextStream(file)
+ QApplication.setOverrideCursor(Qt::WaitCursor)
+ textEdit.setPlainText(in.readAll())
+ QApplication.restoreOverrideCursor()
+
+ self.setCurrentFile(fileName)
+ self.statusBar().showMessage(tr("File loaded"), 2000)
+
+//! [43]
+
+//! [44]
+def saveFile(self, fileName):
+//! [44] //! [45]
+ file = QFile(fileName)
+ if !file.open(QFile.WriteOnly | QFile::Text):
+ QMessageBox.warning(self, tr("Application"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()))
+ return False
+
+ out = QTextStream(file)
+ QApplication.setOverrideCursor(Qt.WaitCursor)
+ out << textEdit.toPlainText()
+ QApplication.restoreOverrideCursor()
+
+ setCurrentFile(fileName)
+ statusBar().showMessage(tr("File saved"), 2000)
+ return True
+
+//! [45]
+
+//! [46]
+def setCurrentFile(fileName):
+//! [46] //! [47]
+ curFile = fileName
+ textEdit.document().setModified(False)
+ setWindowModified(False)
+
+ if curFile.isEmpty():
+ shownName = "untitled.txt"
+ else:
+ shownName = strippedName(curFile)
+
+ setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Application")))
+
+//! [47]
+
+//! [48]
+def strippedName(self, fullFileName):
+//! [48] //! [49]
+ return QFileInfo(fullFileName).fileName()
+//! [49]
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py b/sources/pyside6/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py
new file mode 100644
index 000000000..b8ff9d5bc
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.py
@@ -0,0 +1,253 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+//! [0]
+from PySide6.QtGui import *
+//! [0]
+
+//! [1]
+def __init__(self):
+ textEdit = QTextEdit()
+ setCentralWidget(textEdit)
+
+ createActions()
+ createMenus()
+ createToolBars()
+ createStatusBar()
+ createDockWindows()
+
+ setWindowTitle(tr("Dock Widgets"))
+
+ Letter()
+ setUnifiedTitleAndToolBarOnMac(True)
+//! [1]
+
+//! [2]
+def Letter(self)
+ textEdit.clear()
+
+ cursor = QTextCursor(textEdit.textCursor())
+ cursor.movePosition(QTextCursor.Start)
+ topFrame = cursor.currentFrame()
+ topFrameFormat = topFrame.frameFormat()
+ topFrameFormat.setPadding(16)
+ topFrame.setFrameFormat(topFrameFormat)
+
+ textFormat = QTextCharFormat()
+ boldFormat = QTextCharFormat()
+ boldFormat.setFontWeight(QFont.Bold)
+ italicFormat = QTextCharFormat()
+ italicFormat.setFontItalic(True)
+
+ tableFormat = QTextTableFormat()
+ tableFormat.setBorder(1)
+ tableFormat.setCellPadding(16)
+ tableFormat.setAlignment(Qt.AlignRight)
+ cursor.insertTable(1, 1, tableFormat)
+ cursor.insertText("The Firm", boldFormat)
+ cursor.insertBlock()
+ cursor.insertText("321 City Street", textFormat)
+ cursor.insertBlock()
+ cursor.insertText("Industry Park")
+ cursor.insertBlock()
+ cursor.insertText("Some Country")
+ cursor.setPosition(topFrame.lastPosition())
+ cursor.insertText(QDate.currentDate().toString("d MMMM yyyy"), textFormat)
+ cursor.insertBlock()
+ cursor.insertBlock()
+ cursor.insertText("Dear ", textFormat)
+ cursor.insertText("NAME", italicFormat)
+ cursor.insertText(",", textFormat)
+ for i in range(3):
+ cursor.insertBlock()
+ cursor.insertText(tr("Yours sincerely,"), textFormat)
+ for i in range(3):
+ cursor.insertBlock()
+ cursor.insertText("The Boss", textFormat)
+ cursor.insertBlock()
+ cursor.insertText("ADDRESS", italicFormat)
+//! [2]
+
+//! [3]
+def print(self)
+ document = textEdit.document()
+ printer = QPrinter()
+
+ dlg = QPrintDialog(&printer, self)
+ if dlg.exec() != QDialog.Accepted:
+ return
+
+ document.print(printer)
+ statusBar().showMessage(tr("Ready"), 2000)
+//! [3]
+
+//! [4]
+def save(self):
+ fileName = QFileDialog.getSaveFileName(self,
+ tr("Choose a file name"), ".",
+ tr("HTML (*.html *.htm)"))
+ if fileName.isEmpty():
+ return
+ file = QFile(fileName)
+ if !file.open(QFile.WriteOnly | QFile::Text):
+ QMessageBox.warning(self, tr("Dock Widgets"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()))
+ return
+
+
+ out = QTextStream(file)
+ QApplication.setOverrideCursor(Qt::WaitCursor)
+ out << textEdit.toHtml()
+ QApplication.restoreOverrideCursor()
+
+ statusBar().showMessage(tr("Saved '%1'").arg(fileName), 2000)
+
+//! [4]
+
+//! [5]
+def undo(self):
+ document = textEdit.document()
+ document.undo()
+
+//! [5]
+
+//! [6]
+def insertCustomer(self, customer):
+ if customer.isEmpty():
+ return
+
+ customerList = customer.split(", ")
+ document = textEdit.document()
+ cursor = document.find("NAME")
+ if not cursor.isNull():
+ cursor.beginEditBlock()
+ cursor.insertText(customerList.at(0))
+ oldcursor = cursor
+ cursor = document.find("ADDRESS")
+ if not cursor.isNull():
+ for i in range(customerList.size()):
+ cursor.insertBlock()
+ cursor.insertText(customerList.at(i))
+
+ cursor.endEditBlock()
+ else:
+ oldcursor.endEditBlock()
+//! [6]
+
+//! [7]
+def addParagraph(self, paragraph):
+ if (paragraph.isEmpty())
+ return
+
+ document = textEdit.document()
+ cursor = document.find(tr("Yours sincerely,"))
+ if cursor.isNull():
+ return
+ cursor.beginEditBlock()
+ cursor.movePosition(QTextCursor.PreviousBlock, QTextCursor.MoveAnchor, 2)
+ cursor.insertBlock()
+ cursor.insertText(paragraph)
+ cursor.insertBlock()
+ cursor.endEditBlock()
+
+//! [7]
+
+
+//! [8]
+def createStatusBar(self):
+ statusBar().showMessage(tr("Ready"))
+
+//! [8]
+
+//! [9]
+def createDockWindows(self):
+ dock = QDockWidget(tr("Customers"), self)
+ dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
+ customerList = QListWidget(dock)
+ customerList.addItems(QStringList()
+ << "John Doe, Harmony Enterprises, 12 Lakeside, Ambleton"
+ << "Jane Doe, Memorabilia, 23 Watersedge, Beaton"
+ << "Tammy Shea, Tiblanka, 38 Sea Views, Carlton"
+ << "Tim Sheen, Caraba Gifts, 48 Ocean Way, Deal"
+ << "Sol Harvey, Chicos Coffee, 53 New Springs, Eccleston"
+ << "Sally Hobart, Tiroli Tea, 67 Long River, Fedula")
+ dock.setWidget(customerList)
+ addDockWidget(Qt.RightDockWidgetArea, dock)
+ viewMenu.addAction(dock.toggleViewAction())
+
+ dock = QDockWidget(tr("Paragraphs"), self)
+ paragraphsList = QListWidget(dock)
+ paragraphsList.addItems(QStringList()
+ << "Thank you for your payment which we have received today."
+ << "Your order has been dispatched and should be with you "
+ "within 28 days."
+ << "We have dispatched those items that were in stock. The "
+ "rest of your order will be dispatched once all the "
+ "remaining items have arrived at our warehouse. No "
+ "additional shipping charges will be made."
+ << "You made a small overpayment (less than $5) which we "
+ "will keep on account for you, or return at your request."
+ << "You made a small underpayment (less than $1), but we have "
+ "sent your order anyway. We'll add self underpayment to "
+ "your next bill."
+ << "Unfortunately you did not send enough money. Please remit "
+ "an additional $. Your order will be dispatched as soon as "
+ "the complete amount has been received."
+ << "You made an overpayment (more than $5). Do you wish to "
+ "buy more items, or should we return the excess to you?")
+ dock.setWidget(paragraphsList)
+ addDockWidget(Qt.RightDockWidgetArea, dock)
+ viewMenu.addAction(dock.toggleViewAction())
+
+ customerList.currentTextChanged[str].connect(self.insertCostumer)
+ paragraphsList.currentTextChanged[str].connect(self.addParagraph)
+//! [9]
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/mainwindow.py b/sources/pyside6/doc/codesnippets/examples/mainwindows/mainwindow.py
new file mode 100644
index 000000000..d39604b6c
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/mainwindow.py
@@ -0,0 +1,366 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+
+//! [0]
+def __init__(self):
+ Q__init__(self)
+
+ widget = QWidget()
+ setCentralWidget(widget)
+//! [0]
+
+//! [1]
+ topFiller = QWidget()
+ topFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+
+ infoLabel = QLabel(tr("<i>Choose a menu option, or right-click to "
+ "invoke a context menu</i>"))
+ infoLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
+ infoLabel.setAlignment(Qt.AlignCenter)
+
+ bottomFiller = QWidget()
+ bottomFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+
+ layout = QVBoxLayout()
+ layout.setMargin(5)
+ layout.addWidget(topFiller)
+ layout.addWidget(infoLabel)
+ layout.addWidget(bottomFiller)
+ widget.setLayout(layout)
+//! [1]
+
+//! [2]
+ createActions()
+ createMenus()
+
+ message = tr("A context menu is available by right-clicking")
+ statusBar().showMessage(message)
+
+ setWindowTitle(tr("Menus"))
+ setMinimumSize(160, 160)
+ resize(480, 320)
+
+//! [2]
+
+//! [3]
+def contextMenuEvent(self, event):
+ menu = QMenu(self)
+ menu.addAction(cutAct)
+ menu.addAction(copyAct)
+ menu.addAction(pasteAct)
+ menu.exec_(event.globalPos()")
+
+//! [3]
+
+def File(self):
+ infoLabel.setText(tr("Invoked <b>File|New</b>"))
+
+
+def open(self):
+ infoLabel.setText(tr("Invoked <b>File|Open</b>"))
+
+
+def save(self):
+ infoLabel.setText(tr("Invoked <b>File|Save</b>"))
+
+def print_(self):
+ infoLabel.setText(tr("Invoked <b>File|Print</b>"))
+
+def undo(self):
+ infoLabel.setText(tr("Invoked <b>Edit|Undo</b>"))
+
+def redo(self):
+ infoLabel.setText(tr("Invoked <b>Edit|Redo</b>"))
+
+def cut(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Cut</b>"))
+
+
+def copy(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Copy</b>"))
+
+
+def paste(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Paste</b>"))
+
+
+def bold(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Bold</b>"))
+
+
+def italic(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Italic</b>"))
+
+
+def leftAlign(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Left Align</b>"))
+
+
+def rightAlign(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Right Align</b>"))
+
+
+def justify(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Justify</b>"))
+
+
+def center(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Center</b>"))
+
+
+def setLineSpacing(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Set Line Spacing</b>"))
+
+
+def setParagraphSpacing(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Set Paragraph Spacing</b>"))
+
+
+def about(self):
+
+ infoLabel.setText(tr("Invoked <b>Help|About</b>"))
+ QMessageBox.about(self, tr("About Menu"),
+ tr("The <b>Menu</b> example shows how to create "
+ "menu-bar menus and context menus."))
+
+
+def aboutQt(self):
+
+ infoLabel.setText(tr("Invoked <b>Help|About Qt</b>"))
+
+
+//! [4]
+def createActions(self):
+
+//! [5]
+ Act = new QAction(tr("&New"), self)
+ Act.setShortcuts(QKeySequence.New)
+ Act.setStatusTip(tr("Create a new file"))
+ Act.triggered.connect(newFile)
+//! [4]
+
+ openAct = QAction(tr("&Open..."), self)
+ openAct.setShortcuts(QKeySequence.Open)
+ openAct.setStatusTip(tr("Open an existing file"))
+ openAct.triggered.connect(open)
+//! [5]
+
+ saveAct = QAction(tr("&Save"), self)
+ saveAct.setShortcuts(QKeySequence.Save)
+ saveAct.setStatusTip(tr("Save the document to disk"))
+ saveAct.triggered.connect(save)
+
+ printAct = QAction(tr("&Print..."), self)
+ printAct.setShortcuts(QKeySequence.Print)
+ printAct.setStatusTip(tr("Print the document"))
+ printAct.triggered.connect(print_)
+
+ exitAct = QAction(tr("E&xit"), self)
+ exitAct.setShortcut(tr("Ctrl+Q"))
+ exitAct.setStatusTip(tr("Exit the application"))
+ exitAct.triggered.connect(close)
+
+ undoAct = QAction(tr("&Undo"), self)
+ undoAct.setShortcuts(QKeySequence.Undo)
+ undoAct.setStatusTip(tr("Undo the last operation"))
+ undoAct.triggered.connect(undo)
+
+ redoAct = QAction(tr("&Redo"), self)
+ redoAct.setShortcuts(QKeySequence.Redo)
+ redoAct.setStatusTip(tr("Redo the last operation"))
+ redoAct.triggered.connect(redo)
+
+ cutAct = QAction(tr("Cu&t"), self)
+ cutAct.setShortcuts(QKeySequence.Cut)
+ cutAct.setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"))
+ cutAct.triggered.connect(cut)
+
+ copyAct = QAction(tr("&Copy"), self)
+ copyAct.setShortcut(tr("Ctrl+C"))
+ copyAct.setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"))
+ copyAct.triggered.connect(copy)
+
+ pasteAct = QAction(tr("&Paste"), self)
+ pasteAct.setShortcuts(QKeySequence.Paste)
+ pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"))
+ pasteAct.triggered.connect(paste)
+
+ boldAct = QAction(tr("&Bold"), self)
+ boldAct.setCheckable(True)
+ boldAct.setShortcut(tr("Ctrl+B"))
+ boldAct.setStatusTip(tr("Make the text bold"))
+ boldAct.triggered.connect(bold)
+
+ QFont boldFont = boldAct.font()
+ boldFont.setBold(True)
+ boldAct.setFont(boldFont)
+
+ italicAct = QAction(tr("&Italic"), self)
+ italicAct.setCheckable(True)
+ italicAct.setShortcut(tr("Ctrl+I"))
+ italicAct.setStatusTip(tr("Make the text italic"))
+ italicAct.triggered.connect(italic)
+
+ QFont italicFont = italicAct.font()
+ italicFont.setItalic(True)
+ italicAct.setFont(italicFont)
+
+ setLineSpacingAct = QAction(tr("Set &Line Spacing..."), self)
+ setLineSpacingAct.setStatusTip(tr("Change the gap between the lines of a "
+ "paragraph"))
+ setLineSpacingAct.triggered.connect(setLineSpacing)
+
+ setParagraphSpacingAct = QAction(tr("Set &Paragraph Spacing..."), self)
+ setLineSpacingAct.setStatusTip(tr("Change the gap between paragraphs"))
+ setParagraphSpacingAct.triggered.connect(setParagraphSpacing)
+
+ aboutAct = QAction(tr("&About"), self)
+ aboutAct.setStatusTip(tr("Show the application's About box"))
+ aboutAct.triggered.connect(about)
+
+ aboutQtAct = QAction(tr("About &Qt"), self)
+ aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
+ aboutQtAct.triggered.connect(qApp.aboutQt)
+ aboutQtAct.triggered.connect(aboutQt)
+
+ leftAlignAct = QAction(tr("&Left Align"), self)
+ leftAlignAct.setCheckable(True)
+ leftAlignAct.setShortcut(tr("Ctrl+L"))
+ leftAlignAct.setStatusTip(tr("Left align the selected text"))
+ leftAlignAct.triggered.connect(leftAlign)
+
+ rightAlignAct = QAction(tr("&Right Align"), self)
+ rightAlignAct.setCheckable(True)
+ rightAlignAct.setShortcut(tr("Ctrl+R"))
+ rightAlignAct.setStatusTip(tr("Right align the selected text"))
+ rightAlignAct.triggered.connect.(rightAlign)
+
+ justifyAct = QAction(tr("&Justify"), self)
+ justifyAct.setCheckable(True)
+ justifyAct.setShortcut(tr("Ctrl+J"))
+ justifyAct.setStatusTip(tr("Justify the selected text"))
+ justifyAct.triggered.connect(justify)
+
+ centerAct = QAction(tr("&Center"), self)
+ centerAct.setCheckable(True)
+ centerAct.setShortcut(tr("Ctrl+E"))
+ centerAct.setStatusTip(tr("Center the selected text"))
+ centerAct.triggered.connect(center)
+
+//! [6] //! [7]
+ alignmentGroup = QActionGroup(self)
+ alignmentGroup.addAction(leftAlignAct)
+ alignmentGroup.addAction(rightAlignAct)
+ alignmentGroup.addAction(justifyAct)
+ alignmentGroup.addAction(centerAct)
+ leftAlignAct.setChecked(True)
+//! [6]
+
+//! [7]
+
+//! [8]
+def createMenus(self):
+
+//! [9] //! [10]
+ fileMenu = menuBar().addMenu(tr("&File"))
+ fileMenu.addAction(Act)
+//! [9]
+ fileMenu.addAction(openAct)
+//! [10]
+ fileMenu.addAction(saveAct)
+ fileMenu.addAction(printAct)
+//! [11]
+ fileMenu.addSeparator()
+//! [11]
+ fileMenu.addAction(exitAct)
+
+ editMenu = menuBar().addMenu(tr("&Edit"))
+ editMenu.addAction(undoAct)
+ editMenu.addAction(redoAct)
+ editMenu.addSeparator()
+ editMenu.addAction(cutAct)
+ editMenu.addAction(copyAct)
+ editMenu.addAction(pasteAct)
+ editMenu.addSeparator()
+
+ helpMenu = menuBar().addMenu(tr("&Help"))
+ helpMenu.addAction(aboutAct)
+ helpMenu.addAction(aboutQtAct)
+//! [8]
+
+//! [12]
+ formatMenu = editMenu.addMenu(tr("&Format"))
+ formatMenu.addAction(boldAct)
+ formatMenu.addAction(italicAct)
+ formatMenu.addSeparator()->setText(tr("Alignment"))
+ formatMenu.addAction(leftAlignAct)
+ formatMenu.addAction(rightAlignAct)
+ formatMenu.addAction(justifyAct)
+ formatMenu.addAction(centerAct)
+ formatMenu.addSeparator()
+ formatMenu.addAction(setLineSpacingAct)
+ formatMenu.addAction(setParagraphSpacingAct)
+//! [12]
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py b/sources/pyside6/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py
new file mode 100644
index 000000000..9d0572d9a
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/mdi/mainwindow.py
@@ -0,0 +1,360 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+
+class QMdiSubWindow(QMainWindow):
+ def __init__(self, parent=None):
+ QMainWindow.__init__(self, parent)
+
+ mdiArea = QMdiArea()
+ mdiArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
+ mdiArea.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
+ setCentralWidget(mdiArea)
+ mdiArea.subWindowActivated[QMdiSubWindow].connect(updateMenus)
+ windowMapper = QSignalMapper(self)
+ windowMapper.mapped[QWidget].connect(setActiveSubWindow)
+
+ self.createActions()
+ self.createMenus()
+ self.createToolBars()
+ self.createStatusBar()
+ self.updateMenus()
+ self.readSettings()
+ self.setWindowTitle(tr("MDI"))
+ self.setUnifiedTitleAndToolBarOnMac(True)
+
+
+ def closeEvent(self, event):
+ mdiArea.closeAllSubWindows()
+ if self.activeMdiChild():
+ event.ignore()
+ else:
+ self.writeSettings()
+ event.accept()
+
+ def File(self):
+ child = self.createMdiChild()
+ child.File()
+ child.show()
+
+
+ def open(self):
+ fileName = QFileDialog.getOpenFileName(self)
+ if not fileName.isEmpty():
+ existing = self.findMdiChild(fileName)
+ if existing:
+ mdiArea.setActiveSubWindow(existing)
+ return
+
+ child = createMdiChild()
+ if child.loadFile(fileName):
+ statusBar().showMessage(tr("File loaded"), 2000)
+ child.show()
+ else:
+ child.close()
+
+ def save(self):
+ if self.activeMdiChild() and self.activeMdiChild().save():
+ self.statusBar().showMessage(tr("File saved"), 2000)
+
+ def saveAs(self):
+ if self.activeMdiChild() and self.activeMdiChild().saveAs():
+ self.statusBar().showMessage(tr("File saved"), 2000)
+
+ def cut(self):
+ if self.activeMdiChild():
+ self.activeMdiChild().cut()
+
+ def copy(self):
+ if self.activeMdiChild():
+ activeMdiChild().copy()
+
+ def paste(self):
+ if self.activeMdiChild():
+ activeMdiChild().paste()
+
+ def about(self):
+ QMessageBox.about(self, tr("About MDI"),
+ tr("The <b>MDI</b> example demonstrates how to write multiple "
+ "document interface applications using Qt."))
+
+ def updateMenus(self):
+ hasMdiChild = (activeMdiChild() != 0)
+ self.saveAct.setEnabled(hasMdiChild)
+ self.saveAsAct.setEnabled(hasMdiChild)
+ self.pasteAct.setEnabled(hasMdiChild)
+ self.closeAct.setEnabled(hasMdiChild)
+ self.closeAllAct.setEnabled(hasMdiChild)
+ self.tileAct.setEnabled(hasMdiChild)
+ self.cascadeAct.setEnabled(hasMdiChild)
+ self.nextAct.setEnabled(hasMdiChild)
+ self.previousAct.setEnabled(hasMdiChild)
+ self.separatorAct.setVisible(hasMdiChild)
+
+ hasSelection = (self.activeMdiChild() and
+ self.activeMdiChild().textCursor().hasSelection())
+ self.cutAct.setEnabled(hasSelection)
+ self.copyAct.setEnabled(hasSelection)
+
+ def updateWindowMenu(self):
+ self.windowMenu.clear()
+ self.windowMenu.addAction(closeAct)
+ self.windowMenu.addAction(closeAllAct)
+ self.windowMenu.addSeparator()
+ self.windowMenu.addAction(tileAct)
+ self.windowMenu.addAction(cascadeAct)
+ self.windowMenu.addSeparator()
+ self.windowMenu.addAction(nextAct)
+ self.windowMenu.addAction(previousAct)
+ self.windowMenu.addAction(separatorAct)
+
+ windows = mdiArea.subWindowList()
+ separatorAct.setVisible(not windows.isEmpty())
+
+ for i in range(0, windows.size()):
+ child = windows.at(i).widget()
+
+ text = ""
+ if i < 9:
+ text = "{} {}".format(i + 1, child.userFriendlyCurrentFile())
+ else:
+ text = "{} {}".format(i + 1, child.userFriendlyCurrentFile())
+
+ action = windowMenu.addAction(text)
+ action.setCheckable(True)
+ action.setChecked(child == activeMdiChild())
+ action.triggered.connect(windowMapper.map)
+ windowMapper.setMapping(action, windows.at(i))
+
+ createMdiChild = MdiChild()
+
+ child = MdiChild()
+ mdiArea.addSubWindow(child)
+
+ child.copyAvailable[bool].connect(cutAct.setEnabled)
+ child.copyAvailable[bool].connect(copyAct.setEnabled)
+
+ return child
+
+
+ def createActions(self):
+
+ Act = QAction(QIcon(":/images/new.png"), tr("&New"), self)
+ Act.setShortcuts(QKeySequence.New)
+ Act.setStatusTip(tr("Create a new file"))
+ Act.triggered.connect(self.newFile)
+
+ openAct = QAction(QIcon(":/images/open.png"), tr("&Open..."), self)
+ openAct.setShortcuts(QKeySequence.Open)
+ openAct.setStatusTip(tr("Open an existing file"))
+ openAct.triggered.connect(self.open)
+
+ saveAct = QAction(QIcon(":/images/save.png"), tr("&Save"), self)
+ saveAct.setShortcuts(QKeySequence.Save)
+ saveAct.setStatusTip(tr("Save the document to disk"))
+ saveAct.triggered.connect(self.save)
+
+ saveAsAct = QAction(tr("Save &As..."), self)
+ saveAsAct.setShortcuts(QKeySequence.SaveAs)
+ saveAsAct.setStatusTip(tr("Save the document under a name"))
+ saveAsAct.triggered.connect(self.saveAs)
+
+//! [0]
+ exitAct = QAction(tr("E&xit"), self)
+ exitAct.setShortcut(tr("Ctrl+Q"))
+ exitAct.setStatusTip(tr("Exit the application"))
+ exitAct.triggered.connect(qApp.closeAllWindows)
+//! [0]
+
+ cutAct = QAction(QIcon(":/images/cut.png"), tr("Cu&t"), self)
+ cutAct.setShortcuts(QKeySequence.Cut)
+ cutAct.setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"))
+ cutAct.triggered.connect(self.cut)
+
+ copyAct = QAction(QIcon(":/images/copy.png"), tr("&Copy"), self)
+ copyAct.setShortcuts(QKeySequence.Copy)
+ copyAct.setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"))
+ copyAct.triggered.connect(self.copy)
+
+ pasteAct = QAction(QIcon(":/images/paste.png"), tr("&Paste"), self)
+ pasteAct.setShortcuts(QKeySequence.Paste)
+ pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"))
+ pasteAct.triggered.connect(self.paste)
+
+ closeAct = QAction(tr("Cl&ose"), self)
+ closeAct.setShortcut(tr("Ctrl+F4"))
+ closeAct.setStatusTip(tr("Close the active window"))
+ closeAct.triggered.connect(mdiArea.closeActiveSubWindow)
+
+ closeAllAct = QAction(tr("Close &All"), self)
+ closeAllAct.setStatusTip(tr("Close all the windows"))
+ closeAllAct.triggered.connect(mdiArea.closeAllSubWindows)
+
+ tileAct = QAction(tr("&Tile"), self)
+ tileAct.setStatusTip(tr("Tile the windows"))
+ tileAct.triggered.connect(mdiArea.tileSubWindows)
+
+ cascadeAct = QAction(tr("&Cascade"), self)
+ cascadeAct.setStatusTip(tr("Cascade the windows"))
+ cascadeAct.triggered.connect(mdiArea.cascadeSubWindows)
+
+ nextAct = QAction(tr("Ne&xt"), self)
+ nextAct.setShortcuts(QKeySequence.NextChild)
+ nextAct.setStatusTip(tr("Move the focus to the next window"))
+ nextAct.triggered.connect(mdiArea.activateNextSubWindow)
+
+ previousAct = QAction(tr("Pre&vious"), self)
+ previousAct.setShortcuts(QKeySequence.PreviousChild)
+ previousAct.setStatusTip(tr("Move the focus to the previous "
+ "window"))
+ previousAct.triggered.connect(mdiArea.activatePreviousSubWindow)
+
+ separatorAct = QAction(self)
+ separatorAct.setSeparator(True)
+
+ aboutAct = QAction(tr("&About"), self)
+ aboutAct.setStatusTip(tr("Show the application's About box"))
+ aboutAct.triggered.connect(self.about)
+
+ aboutQtAct = QAction(tr("About &Qt"), self)
+ aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
+ aboutQtAct.triggered.connect(qApp.aboutQt)
+
+
+ def createMenus(self):
+
+ fileMenu = menuBar().addMenu(tr("&File"))
+ fileMenu.addAction(Act)
+ fileMenu.addAction(openAct)
+ fileMenu.addAction(saveAct)
+ fileMenu.addAction(saveAsAct)
+ fileMenu.addSeparator()
+ action = fileMenu.addAction(tr("Switch layout direction"))
+ action.triggered.connect(self.switchLayoutDirection)
+ fileMenu.addAction(exitAct)
+
+ editMenu = menuBar().addMenu(tr("&Edit"))
+ editMenu.addAction(cutAct)
+ editMenu.addAction(copyAct)
+ editMenu.addAction(pasteAct)
+
+ windowMenu = menuBar().addMenu(tr("&Window"))
+ updateWindowMenu()
+ windowMenu.aboutToShow.connect(self.updateWindowMenu)
+
+ menuBar().addSeparator()
+
+ helpMenu = menuBar().addMenu(tr("&Help"))
+ helpMenu.addAction(aboutAct)
+ helpMenu.addAction(aboutQtAct)
+
+
+ def createToolBars(self):
+ fileToolBar = addToolBar(tr("File"))
+ fileToolBar.addAction(Act)
+ fileToolBar.addAction(openAct)
+ fileToolBar.addAction(saveAct)
+
+ editToolBar = addToolBar(tr("Edit"))
+ editToolBar.addAction(cutAct)
+ editToolBar.addAction(copyAct)
+ editToolBar.addAction(pasteAct)
+
+
+ def createStatusBar(self):
+ statusBar().showMessage(tr("Ready"))
+
+
+ def readSettings(self):
+ settings = QSettings("Trolltech", "MDI Example")
+ QPoint pos = settings.value("pos", QPoint(200, 200)").toPoint()
+ QSize size = settings.value("size", QSize(400, 400)").toSize()
+ move(pos)
+ resize(size)
+
+ def writeSettings(self):
+ QSettings settings("Trolltech", "MDI Example")
+ settings.setValue("pos", pos()")
+ settings.setValue("size", size()")
+
+
+ activeMdiChild = MdiChild()
+ activeSubWindow = mdiArea.activeSubWindow()
+ if activeSubWindow:
+ return activeSubWindow.widget()
+ return 0
+
+
+ def findMdiChild(self, fileName):
+
+ canonicalFilePath = QFileInfo(fileName).canonicalFilePath()
+
+ for window in mdiArea.subWindowList():
+ mdiChild = window.widget()
+ if mdiChild.currentFile() == canonicalFilePath:
+ return window
+ return 0
+
+
+ def switchLayoutDirection(self)
+ if layoutDirection() == Qt.LeftToRight:
+ qApp.setLayoutDirection(Qt.RightToLeft)
+ else:
+ qApp.setLayoutDirection(Qt.LeftToRight)
+
+
+ def setActiveSubWindow(self, window):
+ if not window:
+ return
+ mdiArea.setActiveSubWindow(window)
diff --git a/sources/pyside6/doc/codesnippets/examples/mainwindows/menus/mainwindow.py b/sources/pyside6/doc/codesnippets/examples/mainwindows/menus/mainwindow.py
new file mode 100644
index 000000000..71586723e
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/menus/mainwindow.py
@@ -0,0 +1,366 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+
+//! [0]
+def __init__(self):
+ Q__init__(self)
+
+ widget = QWidget()
+ setCentralWidget(widget)
+//! [0]
+
+//! [1]
+ topFiller = QWidget()
+ topFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+
+ infoLabel = QLabel(tr("<i>Choose a menu option, or right-click to "
+ "invoke a context menu</i>"))
+ infoLabel.setFrameStyle(QFrame.StyledPanel | QFrame.Sunken)
+ infoLabel.setAlignment(Qt.AlignCenter)
+
+ bottomFiller = QWidget()
+ bottomFiller.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+
+ layout = QVBoxLayout()
+ layout.setMargin(5)
+ layout.addWidget(topFiller)
+ layout.addWidget(infoLabel)
+ layout.addWidget(bottomFiller)
+ widget.setLayout(layout)
+//! [1]
+
+//! [2]
+ createActions()
+ createMenus()
+
+ message = tr("A context menu is available by right-clicking")
+ statusBar().showMessage(message)
+
+ setWindowTitle(tr("Menus"))
+ setMinimumSize(160, 160)
+ resize(480, 320)
+
+//! [2]
+
+//! [3]
+def contextMenuEvent(self, event):
+ menu = QMenu(self)
+ menu.addAction(cutAct)
+ menu.addAction(copyAct)
+ menu.addAction(pasteAct)
+ menu.exec_(event.globalPos()")
+
+//! [3]
+
+def File(self):
+ infoLabel.setText(tr("Invoked <b>File|New</b>"))
+
+
+def open(self):
+ infoLabel.setText(tr("Invoked <b>File|Open</b>"))
+
+
+def save(self):
+ infoLabel.setText(tr("Invoked <b>File|Save</b>"))
+
+def print_(self):
+ infoLabel.setText(tr("Invoked <b>File|Print</b>"))
+
+def undo(self):
+ infoLabel.setText(tr("Invoked <b>Edit|Undo</b>"))
+
+def redo(self):
+ infoLabel.setText(tr("Invoked <b>Edit|Redo</b>"))
+
+def cut(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Cut</b>"))
+
+
+def copy(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Copy</b>"))
+
+
+def paste(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Paste</b>"))
+
+
+def bold(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Bold</b>"))
+
+
+def italic(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Italic</b>"))
+
+
+def leftAlign(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Left Align</b>"))
+
+
+def rightAlign(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Right Align</b>"))
+
+
+def justify(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Justify</b>"))
+
+
+def center(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Center</b>"))
+
+
+def setLineSpacing(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Set Line Spacing</b>"))
+
+
+def setParagraphSpacing(self):
+
+ infoLabel.setText(tr("Invoked <b>Edit|Format|Set Paragraph Spacing</b>"))
+
+
+def about(self):
+
+ infoLabel.setText(tr("Invoked <b>Help|About</b>"))
+ QMessageBox.about(self, tr("About Menu"),
+ tr("The <b>Menu</b> example shows how to create "
+ "menu-bar menus and context menus."))
+
+
+def aboutQt(self):
+
+ infoLabel.setText(tr("Invoked <b>Help|About Qt</b>"))
+
+
+//! [4]
+def createActions(self):
+
+//! [5]
+ Act = new QAction(tr("&New"), self)
+ Act.setShortcuts(QKeySequence.New)
+ Act.setStatusTip(tr("Create a new file"))
+ Act.triggered.connect(newFile)
+//! [4]
+
+ openAct = QAction(tr("&Open..."), self)
+ openAct.setShortcuts(QKeySequence.Open)
+ openAct.setStatusTip(tr("Open an existing file"))
+ openAct.triggered.connect(open)
+//! [5]
+
+ saveAct = QAction(tr("&Save"), self)
+ saveAct.setShortcuts(QKeySequence.Save)
+ saveAct.setStatusTip(tr("Save the document to disk"))
+ saveAct.triggered.connect(save)
+
+ printAct = QAction(tr("&Print..."), self)
+ printAct.setShortcuts(QKeySequence.Print)
+ printAct.setStatusTip(tr("Print the document"))
+ printAct.triggered.connect(print_)
+
+ exitAct = QAction(tr("E&xit"), self)
+ exitAct.setShortcut(tr("Ctrl+Q"))
+ exitAct.setStatusTip(tr("Exit the application"))
+ exitAct.triggered.connect(close)
+
+ undoAct = QAction(tr("&Undo"), self)
+ undoAct.setShortcuts(QKeySequence.Undo)
+ undoAct.setStatusTip(tr("Undo the last operation"))
+ undoAct.triggered.connect(undo)
+
+ redoAct = QAction(tr("&Redo"), self)
+ redoAct.setShortcuts(QKeySequence.Redo)
+ redoAct.setStatusTip(tr("Redo the last operation"))
+ redoAct.triggered.connect(redo)
+
+ cutAct = QAction(tr("Cu&t"), self)
+ cutAct.setShortcuts(QKeySequence.Cut)
+ cutAct.setStatusTip(tr("Cut the current selection's contents to the "
+ "clipboard"))
+ cutAct.triggered.connect(cut)
+
+ copyAct = QAction(tr("&Copy"), self)
+ copyAct.setShortcut(tr("Ctrl+C"))
+ copyAct.setStatusTip(tr("Copy the current selection's contents to the "
+ "clipboard"))
+ copyAct.triggered.connect(copy)
+
+ pasteAct = QAction(tr("&Paste"), self)
+ pasteAct.setShortcuts(QKeySequence.Paste)
+ pasteAct.setStatusTip(tr("Paste the clipboard's contents into the current "
+ "selection"))
+ pasteAct.triggered.connect(paste)
+
+ boldAct = QAction(tr("&Bold"), self)
+ boldAct.setCheckable(True)
+ boldAct.setShortcut(tr("Ctrl+B"))
+ boldAct.setStatusTip(tr("Make the text bold"))
+ boldAct.triggered.connect(bold)
+
+ QFont boldFont = boldAct.font()
+ boldFont.setBold(True)
+ boldAct.setFont(boldFont)
+
+ italicAct = QAction(tr("&Italic"), self)
+ italicAct.setCheckable(True)
+ italicAct.setShortcut(tr("Ctrl+I"))
+ italicAct.setStatusTip(tr("Make the text italic"))
+ italicAct.triggered.connect(italic)
+
+ QFont italicFont = italicAct.font()
+ italicFont.setItalic(True)
+ italicAct.setFont(italicFont)
+
+ setLineSpacingAct = QAction(tr("Set &Line Spacing..."), self)
+ setLineSpacingAct.setStatusTip(tr("Change the gap between the lines of a "
+ "paragraph"))
+ setLineSpacingAct.triggered.connect(setLineSpacing)
+
+ setParagraphSpacingAct = QAction(tr("Set &Paragraph Spacing..."), self)
+ setLineSpacingAct.setStatusTip(tr("Change the gap between paragraphs"))
+ setParagraphSpacingAct.triggered.connect(setParagraphSpacing)
+
+ aboutAct = QAction(tr("&About"), self)
+ aboutAct.setStatusTip(tr("Show the application's About box"))
+ aboutAct.triggered.connect(about)
+
+ aboutQtAct = QAction(tr("About &Qt"), self)
+ aboutQtAct.setStatusTip(tr("Show the Qt library's About box"))
+ aboutQtAct.triggered.connect(qApp.aboutQt)
+ aboutQtAct.triggered.connect(aboutQt)
+
+ leftAlignAct = QAction(tr("&Left Align"), self)
+ leftAlignAct.setCheckable(True)
+ leftAlignAct.setShortcut(tr("Ctrl+L"))
+ leftAlignAct.setStatusTip(tr("Left align the selected text"))
+ leftAlignAct.triggered.connect(leftAlign)
+
+ rightAlignAct = QAction(tr("&Right Align"), self)
+ rightAlignAct.setCheckable(True)
+ rightAlignAct.setShortcut(tr("Ctrl+R"))
+ rightAlignAct.setStatusTip(tr("Right align the selected text"))
+ rightAlignAct.triggered.connect(rightAlign)
+
+ justifyAct = QAction(tr("&Justify"), self)
+ justifyAct.setCheckable(True)
+ justifyAct.setShortcut(tr("Ctrl+J"))
+ justifyAct.setStatusTip(tr("Justify the selected text"))
+ justifyAct.triggered.connect(justify)
+
+ centerAct = QAction(tr("&Center"), self)
+ centerAct.setCheckable(True)
+ centerAct.setShortcut(tr("Ctrl+E"))
+ centerAct.setStatusTip(tr("Center the selected text"))
+ centerAct.triggered.connect(center)
+
+//! [6] //! [7]
+ alignmentGroup = QActionGroup(self)
+ alignmentGroup.addAction(leftAlignAct)
+ alignmentGroup.addAction(rightAlignAct)
+ alignmentGroup.addAction(justifyAct)
+ alignmentGroup.addAction(centerAct)
+ leftAlignAct.setChecked(True)
+//! [6]
+
+//! [7]
+
+//! [8]
+def createMenus(self):
+
+//! [9] //! [10]
+ fileMenu = menuBar().addMenu(tr("&File"))
+ fileMenu.addAction(Act)
+//! [9]
+ fileMenu.addAction(openAct)
+//! [10]
+ fileMenu.addAction(saveAct)
+ fileMenu.addAction(printAct)
+//! [11]
+ fileMenu.addSeparator()
+//! [11]
+ fileMenu.addAction(exitAct)
+
+ editMenu = menuBar().addMenu(tr("&Edit"))
+ editMenu.addAction(undoAct)
+ editMenu.addAction(redoAct)
+ editMenu.addSeparator()
+ editMenu.addAction(cutAct)
+ editMenu.addAction(copyAct)
+ editMenu.addAction(pasteAct)
+ editMenu.addSeparator()
+
+ helpMenu = menuBar().addMenu(tr("&Help"))
+ helpMenu.addAction(aboutAct)
+ helpMenu.addAction(aboutQtAct)
+//! [8]
+
+//! [12]
+ formatMenu = editMenu.addMenu(tr("&Format"))
+ formatMenu.addAction(boldAct)
+ formatMenu.addAction(italicAct)
+ formatMenu.addSeparator()->setText(tr("Alignment"))
+ formatMenu.addAction(leftAlignAct)
+ formatMenu.addAction(rightAlignAct)
+ formatMenu.addAction(justifyAct)
+ formatMenu.addAction(centerAct)
+ formatMenu.addSeparator()
+ formatMenu.addAction(setLineSpacingAct)
+ formatMenu.addAction(setParagraphSpacingAct)
+//! [12]
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp b/sources/pyside6/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp
index de169b20d..de169b20d 100644
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/mainwindows/sdi/mainwindow.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml b/sources/pyside6/doc/codesnippets/examples/quick/plugins/plugins.qml
index f1b5c2354..f1b5c2354 100644
--- a/sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml
+++ b/sources/pyside6/doc/codesnippets/examples/quick/plugins/plugins.qml
diff --git a/sources/pyside6/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp b/sources/pyside6/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp
new file mode 100644
index 000000000..822b66c76
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp
@@ -0,0 +1,120 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+from PySide6.QtSql import *
+
+def initializeModel(model):
+//! [0]
+ model.setTable("employee")
+//! [0]
+
+ model.setEditStrategy(QSqlTableModel.OnManualSubmit)
+//! [1]
+ model.setRelation(2, QSqlRelation("city", "id", "name"))
+//! [1] //! [2]
+ model.setRelation(3, QSqlRelation("country", "id", "name"))
+//! [2]
+
+//! [3]
+ model.setHeaderData(0, Qt.Horizontal, QObject::tr("ID"))
+ model.setHeaderData(1, Qt.Horizontal, QObject::tr("Name"))
+ model.setHeaderData(2, Qt.Horizontal, QObject::tr("City"))
+ model.setHeaderData(3, Qt.Horizontal, QObject::tr("Country"))
+//! [3]
+
+ model.select()
+
+
+def createView(title, model):
+//! [4]
+ view = QTableView()
+ view.setModel(model)
+ view.setItemDelegate(QSqlRelationalDelegate(view))
+//! [4]
+ view.setWindowTitle(title)
+ return view
+
+
+def createRelationalTables():
+ query = QSqlQuery()
+ query.exec_("create table employee(id int primary key, name varchar(20), city int, country int)")
+ query.exec_("insert into employee values(1, 'Espen', 5000, 47)")
+ query.exec_("insert into employee values(2, 'Harald', 80000, 49)")
+ query.exec_("insert into employee values(3, 'Sam', 100, 1)")
+
+ query.exec_("create table city(id int, name varchar(20))")
+ query.exec_("insert into city values(100, 'San Jose')")
+ query.exec_("insert into city values(5000, 'Oslo')")
+ query.exec_("insert into city values(80000, 'Munich')")
+
+ query.exec_("create table country(id int, name varchar(20))")
+ query.exec_("insert into country values(1, 'USA')")
+ query.exec_("insert into country values(47, 'Norway')")
+ query.exec_("insert into country values(49, 'Germany')")
+
+
+def main():
+
+ app = QApplication([])
+ if !createConnection():
+ return 1
+
+ createRelationalTables()
+
+ model = QSqlRelationalTableModel()
+
+ initializeModel(model)
+
+ view = createView(QObject.tr("Relational Table Model"), model)
+ view.show()
+
+ return app.exec_()
+
diff --git a/sources/pyside2/doc/codesnippets/examples/richtext/textobject/svgtextobject.h b/sources/pyside6/doc/codesnippets/examples/richtext/textobject/svgtextobject.h
index d0b9abf40..d0b9abf40 100644
--- a/sources/pyside2/doc/codesnippets/examples/richtext/textobject/svgtextobject.h
+++ b/sources/pyside6/doc/codesnippets/examples/richtext/textobject/svgtextobject.h
diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/groupbox/window.cpp b/sources/pyside6/doc/codesnippets/examples/widgets/groupbox/window.cpp
index a24e3536f..a24e3536f 100644
--- a/sources/pyside2/doc/codesnippets/examples/widgets/groupbox/window.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/widgets/groupbox/window.cpp
diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp b/sources/pyside6/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp
index a289c5cea..a289c5cea 100644
--- a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp
+++ b/sources/pyside6/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp
diff --git a/sources/pyside6/doc/codesnippets/examples/widgets/spinboxes/window.py b/sources/pyside6/doc/codesnippets/examples/widgets/spinboxes/window.py
new file mode 100644
index 000000000..f54e40bca
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/examples/widgets/spinboxes/window.py
@@ -0,0 +1,247 @@
+############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the examples of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## BSD License Usage
+## Alternatively, you may use this file under the terms of the BSD license
+## as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+from PySide6.QtGui import *
+
+//! [0]
+def __init__(self):
+ createSpinBoxes()
+ createDateTimeEdits()
+ createDoubleSpinBoxes()
+
+ layout = QHBoxLayout()
+ layout.addWidget(spinBoxesGroup)
+ layout.addWidget(editsGroup)
+ layout.addWidget(doubleSpinBoxesGroup)
+ setLayout(layout)
+
+ setWindowTitle(tr("Spin Boxes"))
+//! [0]
+
+//! [1]
+def createSpinBoxes(self):
+ spinBoxesGroup = QGroupBox(tr("Spinboxes"))
+
+ integerLabel = QLabel(tr("Enter a value between "
+ "%1 and %2:").arg(-20).arg(20))
+ integerSpinBox = QSpinBox()
+ integerSpinBox.setRange(-20, 20)
+ integerSpinBox.setSingleStep(1)
+ integerSpinBox.setValue(0)
+//! [1]
+
+//! [2]
+ zoomLabel = QLabel(tr("Enter a zoom value between "
+ "%1 and %2:").arg(0).arg(1000))
+//! [3]
+ zoomSpinBox = QSpinBox()
+ zoomSpinBox.setRange(0, 1000)
+ zoomSpinBox.setSingleStep(10)
+ zoomSpinBox.setSuffix("%")
+ zoomSpinBox.setSpecialValueText(tr("Automatic"))
+ zoomSpinBox.setValue(100)
+//! [2] //! [3]
+
+//! [4]
+ priceLabel = QLabel(tr("Enter a price between "
+ "%1 and %2:").arg(0).arg(999))
+ priceSpinBox = QSpinBox()
+ priceSpinBox.setRange(0, 999)
+ priceSpinBox.setSingleStep(1)
+ priceSpinBox.setPrefix("$")
+ priceSpinBox.setValue(99)
+//! [4] //! [5]
+
+ spinBoxLayout = QVBoxLayout()
+ spinBoxLayout.addWidget(integerLabel)
+ spinBoxLayout.addWidget(integerSpinBox)
+ spinBoxLayout.addWidget(zoomLabel)
+ spinBoxLayout.addWidget(zoomSpinBox)
+ spinBoxLayout.addWidget(priceLabel)
+ spinBoxLayout.addWidget(priceSpinBox)
+ spinBoxesGroup.setLayout(spinBoxLayout)
+
+//! [5]
+
+//! [6]
+def createDateTimeEdits(self):
+ editsGroup = QGroupBox(tr("Date and time spin boxes"))
+
+ dateLabel = QLabel()
+ dateEdit = QDateEdit(QDate.currentDate())
+ dateEdit.setDateRange(QDate(2005, 1, 1), QDate(2010, 12, 31))
+ dateLabel.setText(tr("Appointment date (between %0 and %1):")
+ .arg(dateEdit.minimumDate().toString(Qt.ISODate))
+ .arg(dateEdit.maximumDate().toString(Qt.ISODate)))
+//! [6]
+
+//! [7]
+ timeLabel = QLabel()
+ timeEdit = QTimeEdit(QTime.currentTime())
+ timeEdit.setTimeRange(QTime(9, 0, 0, 0), QTime(16, 30, 0, 0))
+ timeLabel.setText(tr("Appointment time (between %0 and %1):")
+ .arg(timeEdit.minimumTime().toString(Qt.ISODate))
+ .arg(timeEdit.maximumTime().toString(Qt.ISODate)))
+//! [7]
+
+//! [8]
+ meetingLabel = QLabel()
+ meetingEdit = QDateTimeEdit(QDateTime.currentDateTime())
+//! [8]
+
+//! [9]
+ formatLabel = QLabel(tr("Format string for the meeting date "
+ "and time:"))
+ formatComboBox = QComboBox()
+ formatComboBox.addItem("yyyy-MM-dd hh:mm:ss (zzz 'ms')")
+ formatComboBox.addItem("hh:mm:ss MM/dd/yyyy")
+ formatComboBox.addItem("hh:mm:ss dd/MM/yyyy")
+ formatComboBox.addItem("hh:mm:ss")
+ formatComboBox.addItem("hh:mm ap")
+//! [9] //! [10]
+
+ formatComboBox.activated[str].connect(setFormatString)
+//! [10]
+
+ setFormatString(formatComboBox.currentText())
+
+//! [11]
+ editsLayout = QVBoxLayout()
+ editsLayout.addWidget(dateLabel)
+ editsLayout.addWidget(dateEdit)
+ editsLayout.addWidget(timeLabel)
+ editsLayout.addWidget(timeEdit)
+ editsLayout.addWidget(meetingLabel)
+ editsLayout.addWidget(meetingEdit)
+ editsLayout.addWidget(formatLabel)
+ editsLayout.addWidget(formatComboBox)
+ editsGroup.setLayout(editsLayout)
+//! [11]
+
+//! [12]
+def setFormatString(self, formatString):
+ meetingEdit.setDisplayFormat(formatString)
+//! [12] //! [13]
+ if meetingEdit.displayedSections() & QDateTimeEdit.DateSections_Mask:
+ meetingEdit.setDateRange(QDate(2004, 11, 1), QDate(2005, 11, 30))
+ meetingLabel.setText(tr("Meeting date (between %0 and %1):")
+ .arg(meetingEdit.minimumDate().toString(Qt.ISODate))
+ .arg(meetingEdit.maximumDate().toString(Qt.ISODate)))
+ else:
+ meetingEdit.setTimeRange(QTime(0, 7, 20, 0), QTime(21, 0, 0, 0))
+ meetingLabel.setText(tr("Meeting time (between %0 and %1):")
+ .arg(meetingEdit.minimumTime().toString(Qt.ISODate))
+ .arg(meetingEdit.maximumTime().toString(Qt.ISODate)))
+//! [13]
+
+//! [14]
+def createDoubleSpinBoxes():
+ doubleSpinBoxesGroup = QGroupBox(tr("Double precision spinboxes"))
+
+ precisionLabel = QLabel(tr("Number of decimal places "
+ "to show:"))
+ precisionSpinBox = QSpinBox()
+ precisionSpinBox.setRange(0, 100)
+ precisionSpinBox.setValue(2)
+//! [14]
+
+//! [15]
+ doubleLabel = QLabel(tr("Enter a value between "
+ "%1 and %2:").arg(-20).arg(20))
+ doubleSpinBox = QDoubleSpinBox ()
+ doubleSpinBox.setRange(-20.0, 20.0)
+ doubleSpinBox.setSingleStep(1.0)
+ doubleSpinBox.setValue(0.0)
+//! [15]
+
+//! [16]
+ scaleLabel = QLabel(tr("Enter a scale factor between "
+ "%1 and %2:").arg(0).arg(1000.0))
+ scaleSpinBox = QDoubleSpinBox()
+ scaleSpinBox.setRange(0.0, 1000.0)
+ scaleSpinBox.setSingleStep(10.0)
+ scaleSpinBox.setSuffix("%")
+ scaleSpinBox.setSpecialValueText(tr("No scaling"))
+ scaleSpinBox.setValue(100.0)
+//! [16]
+
+//! [17]
+ priceLabel = QLabel(tr("Enter a price between "
+ "%1 and %2:").arg(0).arg(1000))
+ priceSpinBox = QDoubleSpinBox()
+ priceSpinBox.setRange(0.0, 1000.0)
+ priceSpinBox.setSingleStep(1.0)
+ priceSpinBox.setPrefix("$")
+ priceSpinBox.setValue(99.99)
+
+ precisionSpinBox.valueChanged[int].connect(changePrecision)
+//! [17]
+
+//! [18]
+ spinBoxLayout = QVBoxLayout()
+ spinBoxLayout.addWidget(precisionLabel)
+ spinBoxLayout.addWidget(precisionSpinBox)
+ spinBoxLayout.addWidget(doubleLabel)
+ spinBoxLayout.addWidget(doubleSpinBox)
+ spinBoxLayout.addWidget(scaleLabel)
+ spinBoxLayout.addWidget(scaleSpinBox)
+ spinBoxLayout.addWidget(priceLabel)
+ spinBoxLayout.addWidget(priceSpinBox)
+ doubleSpinBoxesGroup.setLayout(spinBoxLayout)
+}
+//! [18]
+
+//! [19]
+def changePrecision(self, int)
+ doubleSpinBox.setDecimals(decimals)
+ scaleSpinBox.setDecimals(decimals)
+ priceSpinBox.setDecimals(decimals)
+
+//! [19]
diff --git a/sources/pyside2/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h b/sources/pyside6/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h
index cb7207333..cb7207333 100644
--- a/sources/pyside2/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h
+++ b/sources/pyside6/doc/codesnippets/examples/xml/streambookmarks/xbelreader.h
diff --git a/sources/pyside6/doc/codesnippets/snippets/customstyle/main.cpp b/sources/pyside6/doc/codesnippets/snippets/customstyle/main.cpp
new file mode 100644
index 000000000..a656ed708
--- /dev/null
+++ b/sources/pyside6/doc/codesnippets/snippets/customstyle/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [using a custom style]
+import sys
+from PySide6.QtGui import *
+
+QApplication.setStyle(CustomStyle())
+app = QApplication(sys.argv)
+spinBox = QSpinBox()
+spinBox.show()
+sys.exit(app.exec_())
+
+//! [using a custom style]
diff --git a/sources/pyside6/doc/conf.py.in b/sources/pyside6/doc/conf.py.in
new file mode 100644
index 000000000..c9686de96
--- /dev/null
+++ b/sources/pyside6/doc/conf.py.in
@@ -0,0 +1,190 @@
+# -*- coding: utf-8 -*-
+#
+# PySide documentation build configuration file, created by
+# sphinx-quickstart on Wed Apr 22 15:04:20 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@')
+sys.path.append('@pyside_BINARY_DIR@')
+if @HAS_WEBENGINE_WIDGETS@:
+ sys.path.append('@CMAKE_CURRENT_SOURCE_DIR@/../../../examples/webenginewidgets/tabbedbrowser')
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = ['sphinx.ext.todo', 'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
+'sphinx.ext.coverage', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
+'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude',
+'sphinx.ext.viewcode']
+
+output_format='@DOC_OUTPUT_FORMAT@'
+
+def setup(app):
+ app.add_config_value('output_format','qthelp','env')
+
+rst_epilog = """
+.. |project| replace:: Qt for Python
+.. |pymodname| replace:: PySide6
+"""
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'PySide'
+copyright = u'© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/license/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.'
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '@BINDING_API_VERSION@'
+# The full version, including alpha/beta/rc tags.
+release = '@BINDING_API_VERSION_FULL@'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_patterns = ['_build', 'extras']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'pysidedocs'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {
+#}
+
+# Add any paths that contain custom themes here, relative to this directory.
+html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+html_title = u'Qt for Python'
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = { '' : ''}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = { 'index' : 'index.html'}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+html_use_index = False
+
+# If true, the index is split into individual pages for each letter.
+html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = False
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+#htmlhelp_basename = 'PySideDoc'
+
+# Link to the shiboken6 sphinx project to enable linking
+# between the two projects.
+intersphinx_mapping = {'shiboken6': ('shiboken6','@SHIBOKEN_INTERSPHINX_FILE@')}
+
+add_module_names = False
+
+# Skip some warnings when building the documentation with
+# 'build_rst_docs' due to the lack of qdoc generated files, in charge
+# of sphinx modules (autodoc) and references.
+if @SKIP_SPHINX_WARNINGS@:
+ suppress_warnings = ["autodoc", "autodoc.import_object", "ref.ref"]
+
+# -- Options for qthelp output ---------------------------------------------------
+qthelp_theme = 'pysidedocs_qthelp'
+
diff --git a/sources/pyside6/doc/considerations.rst b/sources/pyside6/doc/considerations.rst
new file mode 100644
index 000000000..e386d21ee
--- /dev/null
+++ b/sources/pyside6/doc/considerations.rst
@@ -0,0 +1,149 @@
+.. _pysideapi2:
+
+|project| Considerations
+=========================
+
+API Changes
+-----------
+
+One of the goals of |pymodname| is to be API compatible with PyQt5,
+with certain exceptions.
+
+The latest considerations and known issues will be also reported
+in the `wiki <https://wiki.qt.io/Qt_for_Python/Considerations>`_.
+
+__hash__() function return value
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The hash value returned for the classes :class:`PySide6.QtCore.QDate`,
+:class:`PySide6.QtCore.QDateTime`, :class:`PySide6.QtCore.QTime`, :class:`PySide6.QtCore.QUrl`
+will be based on their string representations, thus objects with the same value will produce the
+same hash.
+
+
+QString
+~~~~~~~
+
+Methods and functions that change the contents of a QString argument were modified to receive an
+immutable Python Unicode (or str) and return another Python Unicode/str as the modified string.
+
+The following methods had their return types modified this way:
+
+**Classes:** QAbstractSpinBox, QDateTimeEdit, QDoubleSpinBox, QSpinBox, QValidator
+
+* ``fixup(string): string``
+* ``validate(string, int): [QValidator.State, string, int]``
+
+**Classes:** QDoubleValidator, QIntValidator, QRegExpValidator
+
+* ``validate(string, int): [QValidator.State, string, int]``
+
+**Class:** QClipboard
+
+* ``text(string, QClipboard.Mode mode=QClipboard.Clipboard): [string, string]``
+
+**Class:** QFileDialog
+
+Instead of ``getOpenFileNameAndFilter()``, ``getOpenFileNamesAndFilter()`` and
+``getSaveFileNameAndFilter()`` like PyQt does, PySide has modified the original methods to return
+a tuple.
+
+* ``getOpenFileName(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [string, filter]``
+* ``getOpenFileNames(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [list(string), filter]``
+* ``getSaveFileName(QWidget parent=None, str caption=None, str dir=None, str filter=None, QFileDialog.Options options=0): [string, filter]``
+
+**Class:** QWebPage
+
+* ``javaScriptPrompt(QWebFrame, string, string): [bool, string]``
+
+**Classes:** QFontMetrics and QFontMetricsF
+
+They had two new methods added. Both take a string of one character and convert to a QChar
+(to call the C++ counterpart):
+
+* ``widthChar(string)``
+* ``boundingRectChar(string)``
+
+
+QTextStream
+~~~~~~~~~~~
+
+Inside this class some renames were applied to avoid clashes with native Python functions.
+They are: ``bin_()``, ``hex_()`` and ``oct_()``.
+The only modification was the addition of the '_' character.
+
+
+QVariant
+~~~~~~~~
+
+As ``QVariant`` was removed, any function expecting it can receive any Python object (``None`` is
+an invalid ``QVariant``).
+The same rule is valid when returning something: the returned ``QVariant`` will be converted to
+its original Python object type.
+
+When a method expects a ``QVariant::Type`` the programmer can use a string (the type name) or the
+type itself.
+
+
+qApp "macro"
+~~~~~~~~~~~~
+
+The C++ API of QtWidgets provides a macro called ``qApp`` that roughly expands to
+``QtWidgets::QApplication->instance()``.
+
+In PySide, we tried to create a macro-like experience.
+For that, the ``qApp`` variable was implemented as a normal variable
+that lives in the builtins.
+After importing ``PySide6``, you can immediately use ``qApp``.
+
+As a useful shortcut for the action "create an application if it was not created", we recommend::
+
+ qApp or QtWidgets.QApplication()
+
+or if you want to check if there is one, simply use the truth value::
+
+ if qApp:
+ # do something if an application was created
+ pass
+
+Comparing to ``None`` is also possible, but slightly over-specified.
+
+
+Testing support
++++++++++++++++
+
+For testing purposes, you can also get rid of the application by calling::
+
+ qApp.shutdown()
+
+As for 5.14.2, this is currently an experimental feature that is not fully tested.
+
+
+Embedding status
+++++++++++++++++
+
+In embedded mode, application objects that are pre-created in C++ don't have a Python wrapper.
+The ``qApp`` variable is created together with a wrapped application.
+Therefore, ``qApp`` does not exist in that embedded mode.
+Please note that you always can use ``QtWidgets.QApplication.instance()`` instead.
+
+
+Abandoned Alternative
++++++++++++++++++++++
+
+We also tried an alternative implementation with a ``qApp()`` function that was more *pythonic*
+and problem free, but many people liked the ``qApp`` macro better for its brevity, so here it is.
+
+
+Rich Comparison
+~~~~~~~~~~~~~~~
+
+There was a long-standing bug in the ``tp_richcompare`` implementation of PySide classes.
+
+* When a class did not implement it, the default implementation of ``object`` is used.
+ This implements ``==`` and ``!=`` like the ``is`` operator.
+
+* When a class implements only a single function like ``<``, then the default implementation
+ was disabled, and expressions like ``obj in sequence`` failed with ``NotImplemented``.
+
+This oversight was fixed in version 5.15.1 .
diff --git a/sources/pyside2/doc/contents.rst b/sources/pyside6/doc/contents.rst
index 6d0b25fb7..6d0b25fb7 100644
--- a/sources/pyside2/doc/contents.rst
+++ b/sources/pyside6/doc/contents.rst
diff --git a/sources/pyside6/doc/deployment-briefcase.rst b/sources/pyside6/doc/deployment-briefcase.rst
new file mode 100644
index 000000000..4042f78bb
--- /dev/null
+++ b/sources/pyside6/doc/deployment-briefcase.rst
@@ -0,0 +1,199 @@
+|project| & Briefcase
+#######################
+
+`Briefcase <https://briefcase.readthedocs.io>`_ is a packaging tool that lets you create a standalone package for a Python application. It supports the following installer formats:
+
+ * .app application bundle for macOS
+ * MSI installer for Windows
+ * AppImage for Linux
+
+For more details, see the `official documentation <https://briefcase.readthedocs.io/en/latest/index.html>`_.
+
+Preparation
+===========
+
+Install `Briefcase` using the following **pip** command::
+
+ pip install briefcase
+
+You also need : docker on linux, `WixToolset`_ on windows,
+
+If you're using a virtual environment, remember to activate it before installing `Briefcase`.
+
+After installation, the `briefcase` binary is located in your virtual environment's `bin/`
+directory, or where your Python executable is located.
+
+You can either create a brand new project using the briefcase assistant or setup your own.
+
+.. _`WixToolset`: https://wixtoolset.org/
+
+Use Briefcase Assistant
+=======================
+
+Run the following command and answer the questions to get started::
+
+ briefcase new
+
+Ensure that `PySide6` is chosen as the `GUI toolkit choice`.
+Your PySide6 application is now configured. You can jump to `Build the package`_.
+
+
+Set up your project
+===================
+
+Create a pyproject.toml
+-----------------------
+
+At the root level of your project, create a `pyproject.toml` file::
+
+ [tool.briefcase]
+ project_name = "MyPySideApp"
+ bundle = "com.example"
+ version = "0.0.1"
+ url = "https://somwhere/on/the/net"
+ license = "GNU General Public License v3 (GPLv3)"
+ author = 'MyName Firstname'
+ author_email = "cool@mailexample.com"
+
+ [tool.briefcase.app.mypysideapp]
+ formal_name = "A Cool App"
+ description = "The coolest app ever"
+ icon = "src/mypysideapp/resources/appicon" # Briecase will choose the right extension depending the os (png,ico,...)
+ sources = ['src/mypysideapp']
+ requires = ['pyside6==5.15.0',
+ 'pony>=0.7.11,<0.8',
+ 'dickens==1.0.1',
+ 'Pillow==7.1.2',
+ 'mako==1.1.2',
+ 'beautifulsoup4']
+
+
+ [tool.briefcase.app.mypysideapp.macOS]
+ requires = []
+
+ [tool.briefcase.app.mypysideapp.linux]
+ requires = []
+ system_requires = []
+
+ [tool.briefcase.app.mypysideapp.windows]
+ requires = []
+
+
+Write some code
+----------------
+
+Let's say your project tree is like this::
+
+ pyproject.toml
+ setup.cfg
+ pytest.ini
+ src/
+
+ mypysideapp/
+ resources/
+ appicon.png
+ appicon.ico
+ __init__.py
+ __main__.py
+ app.py
+
+
+Content of `__main__.py`::
+
+ import sys
+ from PySide6.QtWidgets import QApplication
+ from mypysideapp.app import MyWidget
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec_())
+
+
+Content of `app.py`::
+
+ import random
+ from PySide6.QtWidgets import (QLabel, QPushButton,
+ QVBoxLayout, QWidget)
+ from PySide6.QtCore import Slot, Qt
+
+ class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
+ "Hola Mundo", "Привет мир"]
+
+ self.button = QPushButton("Click me!")
+ self.text = QLabel("Hello World")
+ self.text.setAlignment(Qt.AlignCenter)
+
+ self.layout = QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ # Connecting the signal
+ self.button.clicked.connect(self.magic)
+
+ @Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+
+Build the package
+==================
+
+Initialize the package
+------------------------
+
+Just run::
+
+ briefcase create
+
+Run the following command to initialize the building the packages for Windows, Linux, and macOS.
+It creates a subdirectory each for the different platforms.
+This step takes longer as it adds the packages listed in `requires` sections in the `pyproject.toml` file.
+
+Build the application
+---------------------
+::
+
+ briefcase build
+
+You'll get::
+
+ macOS/A Cool App/A Cool App.app
+ or
+ linux/A Cool App-x86_64-0.0.1.AppImage
+ or
+ windows\A Cool App
+
+
+Run the application
+-------------------
+::
+
+ briefcase run
+
+.. note:: You can run your project in `dev` mode (your source code not packaged) with `briefcase dev`
+
+
+Build the installer (only Windows and macOS)
+---------------------------------------------
+
+macOS::
+
+ briefcase package --no-sign
+
+It's possible to sign, see the `documentation <https://briefcase.readthedocs.io/en/latest/how-to/code-signing/index.html>`_. You get `macOS/A Cool App-0.0.1.dmg`
+
+Windows::
+
+ briefcase package
+
+You get `windows\A_Cool_App-0.0.1.msi`
diff --git a/sources/pyside6/doc/deployment-cxfreeze.rst b/sources/pyside6/doc/deployment-cxfreeze.rst
new file mode 100644
index 000000000..371e48f49
--- /dev/null
+++ b/sources/pyside6/doc/deployment-cxfreeze.rst
@@ -0,0 +1,130 @@
+=====================
+|project| & cx_Freeze
+=====================
+
+`cx_Freeze <https://anthony-tuininga.github.io/cx_Freeze/>`_ lets you
+freeze your Python application into executables. The supported
+platforms are Linux, macOS, Windows, FreeBSD, among others.
+
+You can read the `official documentation <https://cx-freeze.readthedocs.io/en/latest/index.html>`_
+to clarify any further question, and remember to contribute to
+the project by `filing issues <https://sourceforge.net/projects/cx-freeze/>`_
+if you find any, or contributing to `their development <https://bitbucket.org/anthony_tuininga/cx_freeze/src>`_.
+
+Preparation
+===========
+
+Installing `cx_Freeze` can be done using **pip**::
+
+ pip install cx_freeze
+
+If you are using a virtual environment, remember to activate it before
+installing `cx_Freeze` into it.
+
+After the installation, you will have the `cxfreeze` binary to deploy
+your application.
+
+Freezing an application
+=======================
+
+There are three options to work with `cx_Freeze`:
+
+ 1. Using the `cxfreeze` script.
+ 2. Creating `setup.py` script to build the project.
+ 3. Using the module classes directly (for advanced purposes).
+
+The following sections cover the first two use cases.
+
+Creating an example
+-------------------
+
+Now, consider the following simple script, named `hello.py`::
+
+ import sys
+ import random
+ from PySide6.QtWidgets import (QApplication, QLabel, QPushButton,
+ QVBoxLayout, QWidget)
+ from PySide6.QtCore import Slot, Qt
+
+ class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
+ "Hola Mundo", "Привет мир"]
+
+ self.button = QPushButton("Click me!")
+ self.text = QLabel("Hello World")
+ self.text.setAlignment(Qt.AlignCenter)
+
+ self.layout = QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ # Connecting the signal
+ self.button.clicked.connect(self.magic)
+
+ @Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec_())
+
+
+Using `cxfreeze` executable
+---------------------------
+
+Now that we have an application, try freezing it with the following
+command::
+
+ cxfreeze hello.py
+
+This command creates a `dist/` directory containing the executable.
+and a `lib/` directory containing all the shared libraries.
+
+To launch the application, go to the `dist/` directory and execute
+the file::
+
+ cd dist/
+ ./main
+
+
+Using a setuptools script
+-------------------------
+
+For this process, you need an additional script called `setup.py`::
+
+ import sys
+ from cx_Freeze import setup, Executable
+
+ setup(name = "MyApp",
+ version = "0.1",
+ description = "My GUI App",
+ executables = [Executable("hello.py")])
+
+Now, build the project using it::
+
+ python setup.py build
+
+This step creates a `build/` directory with the following structure::
+
+ build
+ └── exe.linux-x86_64-3.7
+ └── lib
+ └── main
+
+The first directory inside `build/` depends on the platform
+you are using, in this case a `x86_64` Linux using Python 3.7.
+The structure is the same as previously described, and you can simply
+enter the directory and execute the file::
+
+ cd build/exe.linux-x86_64-3.7
+ ./main
diff --git a/sources/pyside6/doc/deployment-fbs.rst b/sources/pyside6/doc/deployment-fbs.rst
new file mode 100644
index 000000000..27f4850b3
--- /dev/null
+++ b/sources/pyside6/doc/deployment-fbs.rst
@@ -0,0 +1,97 @@
+|project| & fbs
+####################
+
+`fbs`_ provides a powerful environment for packaging, creating installers, and signing your
+application. It also lets you manage updates to your application. Since `fbs` is based on
+PyInstaller, it supports Linux, macOS, and Windows.
+
+For more details, see the `fbs tutorial`_ and the `fbs manual`_.
+
+.. _fbs: https://build-system.fman.io/
+.. _fbs tutorial: https://github.com/mherrmann/fbs-tutorial
+.. _fbs manual: https://build-system.fman.io/manual/
+
+Preparation
+===========
+
+Installing `fbs`_ (>= 0.7.6) is done via **pip**::
+
+ pip install fbs
+
+If you're using a virtual environment, remember to activate it before installing `fbs`_.
+
+After the installation, you can use the `fbs`_ executable.
+
+Starting a new project
+======================
+
+`fbs`_ provides useful features for you to create a base project structure with the following
+command::
+
+ fbs startproject
+
+This command prompts you to answer a few questions to configure the details of your project, like:
+
+ * Application name
+ * Author name
+ * Qt bindings (PySide6 or PyQt5)
+ * Bundle indentified (for macOS)
+
+Afterwards, you have a `src/` directory that contains the following structure::
+
+ └── src
+ ├── build
+ │ └── settings
+ └── main
+ ├── icons
+ │ ├── base
+ │ ├── linux
+ │ └── mac
+ └── python
+
+Inside the `settings` directory, there are a few JSON files that can be edited to include more
+information about your project.
+
+The `main` file is in the `python` directory, and its default content is::
+
+ from fbs_runtime.application_context import ApplicationContext
+ from PySide6.QtWidgets import QMainWindow
+
+ import sys
+
+ if __name__ == '__main__':
+ appctxt = ApplicationContext() # 1. Instantiate ApplicationContext
+ window = QMainWindow()
+ window.resize(250, 150)
+ window.show()
+ exit_code = appctxt.app.exec_() # 2. Invoke appctxt.app.exec_()
+ sys.exit(exit_code)
+
+This example shows an empty `QMainWindow`. You can run it using the following command::
+
+ fbs run
+
+Freezing the application
+========================
+
+Once you've verified that the application is working properly, you can continue with the freezing
+process using the following command::
+
+ fbs freeze
+
+After the process completes, you see a message stating the location of your executable. For
+example::
+
+ Done. You can now run `target/MyApp/MyApp`. If that doesn't work, see
+ https://build-system.fman.io/troubleshooting.
+
+
+Now, you can try to run the application. The result is the same window as the one you saw with the
+`fbs run` command::
+
+ cd target/MyApp/
+ ./MyApp
+
+.. note:: This is the case for Linux. For other platforms like macOS, you need to enter the
+ directory: `target/MyApp.app/Contents/macOS`. For Windows, you need to find the `MyApp.exe`
+ executable.
diff --git a/sources/pyside6/doc/deployment-pyinstaller.rst b/sources/pyside6/doc/deployment-pyinstaller.rst
new file mode 100644
index 000000000..5771f0bec
--- /dev/null
+++ b/sources/pyside6/doc/deployment-pyinstaller.rst
@@ -0,0 +1,145 @@
+|project| & PyInstaller
+#######################
+
+`PyInstaller <https://www.pyinstaller.org/>`_ lets you freeze your python application into a
+stand-alone executable. This installer supports Linux, macOS, Windows, and more; and is also
+compatible with 3rd-party Python modules, such as |pymodname|.
+
+For more details, see the `official documentation <https://www.pyinstaller.org/documentation.html>`_.
+
+Preparation
+===========
+
+Install the `PyInstaller` via **pip** with the following command::
+
+ pip install pyinstaller
+
+If you're using a virtual environment, remember to activate it before installing `PyInstaller`.
+
+After installation, the `pyinstaller` binary is located in your virtual environment's `bin/`
+directory, or where your Python executable is located. If that directory isn't in your `PATH`,
+include the whole path when you run `pyinstaller`.
+
+.. warning:: If you already have a PySide6 or Shiboken6 version installed in your
+ system path, PyInstaller uses them instead of your virtual environment version.
+
+Freeze an application
+=======================
+
+`PyInstaller` has many options that you can use. To list them all, run `pyinstaller -h`.
+
+There are two main features:
+
+ * the option to package the whole project (including shared libraries) into one executable file
+ (`--onefile`)
+ * the option to place it in a directory containing the libraries
+
+Additionally, on Windows when the command is running, you can open a console with the `-c` option
+(or `--console` or `--nowindowed` equivalent).
+
+Otherwise, you can specify to not open such a console window on macOS and Windows with the `-w`
+option (or `--windowed` or `--noconsole` equivalent).
+
+Create an example
+-----------------
+
+Now, consider the following script, named `hello.py`::
+
+ import sys
+ import random
+ from PySide6.QtWidgets import (QApplication, QLabel, QPushButton,
+ QVBoxLayout, QWidget)
+ from PySide6.QtCore import Slot, Qt
+
+ class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
+ "Hola Mundo", "Привет мир"]
+
+ self.button = QPushButton("Click me!")
+ self.text = QLabel("Hello World")
+ self.text.setAlignment(Qt.AlignCenter)
+
+ self.layout = QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ # Connecting the signal
+ self.button.clicked.connect(self.magic)
+
+ @Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec_())
+
+
+Since it has a UI, you use the `--windowed` option.
+
+The command line to proceed looks like this::
+
+ pyinstaller --name="MyApplication" --windowed hello.py
+
+This process creates two directories: `dist/` and `build/`. The application executable and the
+required shared libraries are placed in `dist/MyApplication`.
+
+To run the application, go to `dist/MyApplication` and run the program::
+
+ cd dist/MyApplication/
+ ./MyApplication
+
+.. note:: The directory inside `dist/` and the executable have the same name.
+
+Use the `--onefile` option if you prefer to have everything bundled into one executable, without
+the shared libraries next to it::
+
+ pyinstaller --name="MyApplication" --windowed --onefile hello.py
+
+This process takes a bit longer, but in the end you have one executable in the `dist/` directory::
+
+ cd dist/
+ ./MyApplication
+
+
+Some Caveats
+============
+
+
+PyInstaller Issue
+-----------------
+
+As mentioned before, if available, `PyInstaller` picks a system installation of PySide6 or
+Shiboken6 instead of your `virtualenv` version without notice. This is negligible if those
+two versions are the same.
+
+If you're working with different versions, this can result in frustrating debugging sessions
+when you think you are testing the latest version, but `PyInstaller` is working with an older
+version.
+
+
+Safety Instructions
+-------------------
+
+- When using `PyInstaller` with `virtualenv`, make sure that there is no system
+ installation of PySide6 or shiboken6.
+
+- Before compiling, use `pip -uninstall pyside6 shiboken6 -y` multiple times, until
+ none of the programs are found anymore.
+
+- Pip is usually a good tool. But to be 100 % sure, you should directly remove
+ the PySide6 and shiboken6 folders from site-packages.
+
+- Be sure to use the right version of pip. The safest way to really run the right
+ pip, is to use the Python that you mean: Instead of the pip command, better use::
+
+ <path/to/your/>python -m pip
diff --git a/sources/pyside2/doc/deployment.rst b/sources/pyside6/doc/deployment.rst
index 3d6aa218e..3d6aa218e 100644
--- a/sources/pyside2/doc/deployment.rst
+++ b/sources/pyside6/doc/deployment.rst
diff --git a/sources/pyside2/doc/examples/images/tabbedbrowser.png b/sources/pyside6/doc/examples/images/tabbedbrowser.png
index 27c3daa09..27c3daa09 100644
--- a/sources/pyside2/doc/examples/images/tabbedbrowser.png
+++ b/sources/pyside6/doc/examples/images/tabbedbrowser.png
Binary files differ
diff --git a/sources/pyside6/doc/examples/index.rst b/sources/pyside6/doc/examples/index.rst
new file mode 100644
index 000000000..069d54404
--- /dev/null
+++ b/sources/pyside6/doc/examples/index.rst
@@ -0,0 +1,14 @@
+|project| Examples
+===================
+
+A collection of examples are provided with |project| to help new users
+to understand different use cases of the module.
+You can find all the examples inside the ``pyside-setup`` on the ``examples``
+directory, or you can access them after installing |pymodname| from ``pip``
+inside the ``site-packages/PySide6/examples`` directory.
+
+.. toctree::
+ :maxdepth: 1
+
+ tabbedbrowser.rst
+ ../pyside-examples/all-pyside-examples.rst
diff --git a/sources/pyside2/doc/examples/tabbedbrowser.rst b/sources/pyside6/doc/examples/tabbedbrowser.rst
index c34c50647..c34c50647 100644
--- a/sources/pyside2/doc/examples/tabbedbrowser.rst
+++ b/sources/pyside6/doc/examples/tabbedbrowser.rst
diff --git a/sources/pyside6/doc/extras/QtCore.ClassInfo.rst b/sources/pyside6/doc/extras/QtCore.ClassInfo.rst
new file mode 100644
index 000000000..b767ae153
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.ClassInfo.rst
@@ -0,0 +1,23 @@
+.. currentmodule:: PySide6.QtCore
+.. _ClassInfo:
+
+ClassInfo
+*********
+
+This class is used to associates extra information to the class, which is available
+using QObject.metaObject(). Qt and PySide doesn't use this information.
+
+The extra information takes the form of a dictionary with key and value in a literal string.
+
+.. note:: This Class is a implementation of Q_CLASSINFO macro.
+
+
+Example
+-------
+
+::
+
+ @ClassInfo(Author='PySide Team', URL='http://www.pyside.org')
+ class MyObject(QObject):
+ ...
+
diff --git a/sources/pyside6/doc/extras/QtCore.Property.rst b/sources/pyside6/doc/extras/QtCore.Property.rst
new file mode 100644
index 000000000..c6b2bf32e
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.Property.rst
@@ -0,0 +1,62 @@
+.. currentmodule:: PySide6.QtCore
+.. _Property:
+Property
+********
+
+Detailed Description
+--------------------
+
+The Property function lets you declare properties that
+behave both as Qt and Python properties, and have their
+setters and getters defined as Python functions.
+
+Here is an example that illustrates how to use this
+function:
+
+.. code-block::
+ :linenos:
+
+ from PySide6.QtCore import QObject, Property
+
+ class MyObject(QObject):
+ def __init__(self,startval=42):
+ QObject.__init__(self)
+ self.ppval = startval
+
+ def readPP(self):
+ return self.ppval
+
+ def setPP(self,val):
+ self.ppval = val
+
+ pp = Property(int, readPP, setPP)
+
+ obj = MyObject()
+ obj.pp = 47
+ print(obj.pp)
+
+Properties in QML expressions
+-----------------------------
+
+If you are using properties of your objects in QML expressions,
+QML requires that the property changes are notified. Here is an
+example illustrating how to do this:
+
+.. code-block::
+ :linenos:
+
+ from PySide6.QtCore import QObject, Signal, Property
+
+ class Person(QObject):
+ def __init__(self, name):
+ QObject.__init__(self)
+ self._person_name = name
+
+ def _name(self):
+ return self._person_name
+
+ @Signal
+ def name_changed(self):
+ pass
+
+ name = Property(str, _name, notify=name_changed)
diff --git a/sources/pyside6/doc/extras/QtCore.QEnum.rst b/sources/pyside6/doc/extras/QtCore.QEnum.rst
new file mode 100644
index 000000000..d33134264
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.QEnum.rst
@@ -0,0 +1,92 @@
+.. currentmodule:: PySide6.QtCore
+.. _QEnum:
+
+QEnum/QFlag
+***********
+
+This class decorator is equivalent to the `Q_ENUM` macro from Qt.
+The decorator is used to register an Enum to the meta-object system,
+which is available via `QObject.staticMetaObject`.
+The enumerator must be in a QObject derived class to be registered.
+
+
+Example
+-------
+
+::
+
+ from enum import Enum, Flag, auto
+
+ from PySide6.QtCore import QEnum, QFlag, QObject
+
+ class Demo(QObject):
+
+ @QEnum
+ class Orientation(Enum):
+ North, East, South, West = range(4)
+
+ class Color(Flag):
+ RED = auto()
+ BLUE = auto()
+ GREEN = auto()
+ WHITE = RED | BLUE | GREEN
+
+ QFlag(Color) # identical to @QFlag usage
+
+
+Caution:
+--------
+
+QEnum registers a Python Enum derived class.
+QFlag treats a variation of the Python Enum, the Flag class.
+
+Please do not confuse that with the Qt QFlags concept. Python does
+not use that concept, it has its own class hierarchy, instead.
+For more details, see the `Python enum documentation <https://docs.python.org/3/library/enum.html>`_.
+
+
+Details about Qt Flags:
+-----------------------
+
+There are some small differences between Qt flags and Python flags.
+In Qt, we have for instance these declarations:
+
+::
+
+ enum QtGui::RenderHint { Antialiasing, TextAntialiasing, SmoothPixmapTransform,
+ HighQualityAntialiasing, NonCosmeticDefaultPen }
+ flags QtGui::RenderHints
+
+The equivalent Python notation would look like this:
+
+::
+
+ @QFlag
+ class RenderHints(enum.Flag)
+ Antialiasing = auto()
+ TextAntialiasing = auto()
+ SmoothPixmapTransform = auto()
+ HighQualityAntialiasing = auto()
+ NonCosmeticDefaultPen = auto()
+
+
+As another example, the Qt::AlignmentFlag flag has 'AlignmentFlag' as the enum
+name, but 'Alignment' as the type name. Non flag enums have the same type and
+enum names.
+
+::
+
+ enum Qt::AlignmentFlag
+ flags Qt::Alignment
+
+The Python way to specify this would be
+
+::
+
+ @QFlag
+ class Alignment(enum.Flag):
+ ...
+
+We are considering to map all builtin enums and flags to Python enums as well
+in a later release.
+
diff --git a/sources/pyside6/doc/extras/QtCore.Signal.rst b/sources/pyside6/doc/extras/QtCore.Signal.rst
new file mode 100644
index 000000000..60c611482
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.Signal.rst
@@ -0,0 +1,39 @@
+.. currentmodule:: PySide6.QtCore
+.. _Signal:
+
+Signal
+******
+
+Synopsis
+--------
+
+Functions
+^^^^^^^^^
+
++---------------------------------------------------------------------------------------------+
+|def :meth:`connect<Signal.connect>` (receiver) |
++---------------------------------------------------------------------------------------------+
+|def :meth:`disconnect<Signal.disconnect>` (receiver) |
++---------------------------------------------------------------------------------------------+
+|def :meth:`emit<Signal.disconnect>` (\*args) |
++---------------------------------------------------------------------------------------------+
+
+Detailed Description
+--------------------
+
+ The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way.
+
+ PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow.
+
+.. method:: Signal.connect(receiver[, type=Qt.AutoConnection])
+
+ Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
+
+.. method:: Signal.disconnect(receiver)
+
+ Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
+
+.. method:: Signal.emit(*args)
+
+ `args` is the arguments to pass to any connected slots, if any.
+
diff --git a/sources/pyside6/doc/extras/QtCore.Slot.rst b/sources/pyside6/doc/extras/QtCore.Slot.rst
new file mode 100644
index 000000000..99e00b5ca
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.Slot.rst
@@ -0,0 +1,39 @@
+.. currentmodule:: PySide6.QtCore
+.. _Slot:
+
+Slot
+****
+
+Detailed Description
+--------------------
+
+ PySide6 adopt PyQt5's new signal and slot syntax as-is. The PySide6
+ implementation is functionally compatible with the PyQt5 one, with the
+ exceptions listed below.
+
+ PyQt5's new signal and slot style utilizes method and decorator names
+ specific to their implementation. These will be generalized according to
+ the table below:
+
+ ======= ======================= =============
+ Module PyQt5 factory function PySide6 class
+ ======= ======================= =============
+ QtCore pyqtSignal Signal
+ QtCore pyqtSlot Slot
+ ======= ======================= =============
+
+Q_INVOKABLE
+-----------
+
+ There is no equivalent of the Q_INVOKABLE macro of Qt
+ since PySide6 slots can actually have return values.
+ If you need to create a invokable method that returns some value,
+ declare it as a slot, e.g.:
+
+ ::
+
+ class Foo(QObject):
+
+ @Slot(float, result=int)
+ def getFloatReturnInt(self, f):
+ return int(f)
diff --git a/sources/pyside6/doc/extras/QtCore.rst b/sources/pyside6/doc/extras/QtCore.rst
new file mode 100644
index 000000000..694fb84e9
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.rst
@@ -0,0 +1,5 @@
+All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtCore
diff --git a/sources/pyside6/doc/extras/QtGui.rst b/sources/pyside6/doc/extras/QtGui.rst
new file mode 100644
index 000000000..d55212bdf
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtGui.rst
@@ -0,0 +1,7 @@
+To include the definitions of modules classes, use the following directive:
+
+::
+
+ import PySide6.QtGui
+
+.. seealso:: :mod:`PySide6.QtCore`
diff --git a/sources/pyside6/doc/extras/QtHelp.rst b/sources/pyside6/doc/extras/QtHelp.rst
new file mode 100644
index 000000000..845d1f968
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtHelp.rst
@@ -0,0 +1,5 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtHelp
diff --git a/sources/pyside6/doc/extras/QtMultimedia.rst b/sources/pyside6/doc/extras/QtMultimedia.rst
new file mode 100644
index 000000000..9b6b702ce
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtMultimedia.rst
@@ -0,0 +1,7 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtMultimedia
+
+
diff --git a/sources/pyside6/doc/extras/QtNetwork.rst b/sources/pyside6/doc/extras/QtNetwork.rst
new file mode 100644
index 000000000..070ab77f7
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtNetwork.rst
@@ -0,0 +1,5 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtNetwork
diff --git a/sources/pyside6/doc/extras/QtOpenGL.rst b/sources/pyside6/doc/extras/QtOpenGL.rst
new file mode 100644
index 000000000..9979f9f03
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtOpenGL.rst
@@ -0,0 +1,14 @@
+OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms.
+
+.. note:: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.
+
+The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents.
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtOpenGL
+
+The Qt OpenGL module is implemented as a platform-independent wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality.
+
+The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded Systems). \ No newline at end of file
diff --git a/sources/pyside6/doc/extras/QtQml.QmlElement.rst b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
new file mode 100644
index 000000000..b567bb3cc
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
@@ -0,0 +1,28 @@
+.. currentmodule:: PySide6.QtQml
+.. _QmlElement:
+
+QmlElement
+**********
+
+.. py:decorator:: QmlElement
+
+ This decorator registers a class it is attached to for use in QML, using
+ global variables to specify the import name and version.
+
+ ::
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlElement
+ class ClassForQml(QObject):
+ # ...
+
+ Afterwards the class may be used in QML:
+
+ ::
+ import com.library.name 1.0
+
+ ClassForQml {
+ // ...
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst
new file mode 100644
index 000000000..83102bf86
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst
@@ -0,0 +1,44 @@
+.. currentmodule:: PySide6.QtQml
+.. _qmlRegisterSingletonType:
+
+qmlRegisterSingletonType
+************************
+
+.. 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.
+
+.. 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.
+
+
+.. 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.
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst
new file mode 100644
index 000000000..079e15bf1
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst
@@ -0,0 +1,41 @@
+.. currentmodule:: PySide6.QtQml
+.. _qmlRegisterType:
+
+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.
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst
new file mode 100644
index 000000000..2f34cd987
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst
@@ -0,0 +1,36 @@
+.. currentmodule:: PySide6.QtQml
+.. _qmlRegisterUncreatableType:
+
+
+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.
diff --git a/sources/pyside6/doc/extras/QtScript.rst b/sources/pyside6/doc/extras/QtScript.rst
new file mode 100644
index 000000000..1d2a1bd04
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtScript.rst
@@ -0,0 +1,21 @@
+The QtScript module only provides core scripting facilities; the QtScriptTools module provides additional Qt Script-related components that application developers may find useful.
+
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtScript
+
+License Information
+-------------------
+
+Qt Commercial Edition licensees that wish to distribute applications that use the QtScript module need to be aware of their obligations under the GNU Library General Public License (LGPL).
+
+Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL.
+QtScript is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code.
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/sources/pyside6/doc/extras/QtScriptTools.rst b/sources/pyside6/doc/extras/QtScriptTools.rst
new file mode 100644
index 000000000..8f0c7e12b
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtScriptTools.rst
@@ -0,0 +1,5 @@
+Applications that use the Qt Script Tools classes need to be configured to be built against the QtScriptTools module. To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtScriptTools
diff --git a/sources/pyside6/doc/extras/QtSql.rst b/sources/pyside6/doc/extras/QtSql.rst
new file mode 100644
index 000000000..fb62f887c
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtSql.rst
@@ -0,0 +1,5 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtSql
diff --git a/sources/pyside6/doc/extras/QtSvg.rst b/sources/pyside6/doc/extras/QtSvg.rst
new file mode 100644
index 000000000..eae02c41e
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtSvg.rst
@@ -0,0 +1,5 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtSvg
diff --git a/sources/pyside6/doc/extras/QtTest.rst b/sources/pyside6/doc/extras/QtTest.rst
new file mode 100644
index 000000000..1b3f98940
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtTest.rst
@@ -0,0 +1,7 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtTest
+
+.. note:: All macros in the C++ version of QtTest were not binded in PySide, this module is useful only for GUI testing and benchmarking, for ordinary unit testing you should use the ``unittest`` Python module.
diff --git a/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst b/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst
new file mode 100644
index 000000000..8a8c4bef0
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst
@@ -0,0 +1,36 @@
+.. currentmodule:: PySide6.QtUiTools
+.. _loadUiType:
+
+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()
diff --git a/sources/pyside6/doc/extras/QtUiTools.rst b/sources/pyside6/doc/extras/QtUiTools.rst
new file mode 100644
index 000000000..2769da4d6
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtUiTools.rst
@@ -0,0 +1,9 @@
+These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a UI file is needed.
+
+A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The :meth:`PySide6.QtUiTools.QUiLoader.load` function takes the user interface description contained in the file and constructs the form widget.
+
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide.QtUiTools
diff --git a/sources/pyside6/doc/extras/QtXml.rst b/sources/pyside6/doc/extras/QtXml.rst
new file mode 100644
index 000000000..39c384e77
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtXml.rst
@@ -0,0 +1,5 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtXml
diff --git a/sources/pyside6/doc/extras/QtXmlPatterns.rst b/sources/pyside6/doc/extras/QtXmlPatterns.rst
new file mode 100644
index 000000000..258fdf28d
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtXmlPatterns.rst
@@ -0,0 +1,12 @@
+To include the definitions of the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtXmlPatterns
+
+Further Reading
+---------------
+
+General overviews of XQuery and XSchema can be found in the XQuery document.
+
+An introduction to the XQuery language can be found in A Short Path to XQuery.
diff --git a/sources/pyside6/doc/faq.rst b/sources/pyside6/doc/faq.rst
new file mode 100644
index 000000000..39084261e
--- /dev/null
+++ b/sources/pyside6/doc/faq.rst
@@ -0,0 +1,37 @@
+.. _faq:
+
+:orphan:
+
+Frequently Asked Questions
+==========================
+
+**When did The Qt Company adopt PySide6?**
+ In April 2016 `The Qt Company <https://qt.io>`_ decided to properly support the port. For more
+ information, see `<https://groups.google.com/forum/#!topic/pyside-dev/pqwzngAGLWE>`_.
+
+**Why use PySide6 and not PySide?**
+ Since PySide was developed for Qt 4, we now use PySide6 to imply that it is for a newer version,
+ after it was ported to support Qt 5.
+
+**Where I can find information about the old PySide project?**
+ The project's old wiki page is available on PySide, but the project is now deprecated and not
+ supported.
+
+**There are three wheels (pyside6, shiboken6, and shiboken6_generator), what's the difference?**
+
+ Before the official release, everything was in one big wheel, so it made sense to split these
+ into separate wheels, each for the major projects currently in development:
+
+ * **pyside6**: contains all the PySide6 modules to use the Qt framework; also depends on the
+ shiboken6 module.
+ * **shiboken6**: contains the shiboken6 module with helper functions for PySide6.
+ * **shiboken6_generator**: contains the generator binary that can work with a C++ project and a
+ typesystem to generate Python bindings.
+ If you want to generate bindings for a Qt/C++ project, there won't be any linking to the Qt
+ shared libraries; you need to do this by hand. We recommend building PySide6 from scratch
+ to have everything properly linked.
+
+**Why is the shiboken6_generator not installed automatically?**
+ It's not necessary to install the shiboken6_generator to use PySide6. The package is a result of
+ the wheel splitting process. To use the generator, it's recommended to build it from scratch to
+ have the proper Qt linking.
diff --git a/sources/pyside6/doc/gettingstarted-linux.rst b/sources/pyside6/doc/gettingstarted-linux.rst
new file mode 100644
index 000000000..cf3479f81
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted-linux.rst
@@ -0,0 +1,96 @@
+Getting Started on Linux
+==========================
+
+Requirements
+------------
+
+ * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably 5.15)
+ * A Python interpreter (version Python 3.6+).
+ You can either use the one provided by your OS, or get it
+ from the `official website`_.
+ * GCC
+ * `CMake`_ version 3.1 or greater
+ * Git version 2 or greater
+ * `libclang`_ from your system or the prebuilt version from the ``Qt Downloads`` page is
+ recommended. libclang10 is required for PySide 5.15.
+ * ``sphinx`` package for the documentation (optional).
+ * Depending on your linux distribution, the following dependencies might also be required:
+
+ * ``libgl-dev``,
+ * ``python-dev``,
+ * ``python-distutils``,
+ * and ``python-setuptools``.
+
+.. _here: https://qt.io/download
+.. _official website: https://www.python.org/downloads/
+.. _CMake: https://cmake.org/download/
+.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
+
+
+Building from source
+--------------------
+
+Creating a virtual environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
+which arbitrary modules can be installed and which can be removed after use::
+
+ python -m venv testenv
+ source testenv/bin/activate
+ pip install -r requirements.txt # General dependencies, documentation, and examples.
+
+will create and use a new virtual environment, which is indicated by the command prompt changing.
+
+Setting up CLANG
+~~~~~~~~~~~~~~~~
+
+If you don't have libclang already in your system, you can download from the Qt servers::
+
+ wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
+
+Extract the files, and leave it on any desired path, and then set these two required
+environment variables::
+
+ 7z x libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
+ export CLANG_INSTALL_DIR=$PWD/libclang
+
+Getting PySide6
+~~~~~~~~~~~~~~~
+
+Cloning the official repository can be done by::
+
+ git clone --recursive https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, e.g. 5.15::
+
+ cd pyside-setup && git checkout 5.15
+
+.. note:: Keep in mind you need to use the same version as your Qt installation.
+ Additionally, ``git checkout -b 5.15 --track origin/5.14`` could be a better option
+ in case you want to work on it.
+
+Building PySide6
+~~~~~~~~~~~~~~~~
+
+Check your Qt installation path, to specifically use that version of qmake to build PySide6.
+e.g. ``/opt/Qt/5.14.0/gcc_64/bin/qmake``.
+
+Build can take a few minutes, so it is recommended to use more than one CPU core::
+
+ python setup.py build --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+
+Installing PySide6
+~~~~~~~~~~~~~~~~~~
+
+To install on the current directory, just run::
+
+ python setup.py install --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+
+Test installation
+~~~~~~~~~~~~~~~~~
+
+You can execute one of the examples to verify the process is properly working.
+Remember to properly set the environment variables for Qt and PySide6::
+
+ python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/gettingstarted-macOS.rst b/sources/pyside6/doc/gettingstarted-macOS.rst
new file mode 100644
index 000000000..9777306db
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted-macOS.rst
@@ -0,0 +1,95 @@
+Getting Started on macOS
+========================
+
+Requirements
+------------
+
+ * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably 5.15)
+ * A Python interpreter (version Python 3.6+).
+ You can use the one provided by HomeBrew, or you can get
+ python from the `official website`_.
+ * `XCode`_ 8.2 (macOS 10.11), 8.3.3 (macOS 10.12), 9 (macOS 10.13), 10.1 (macOS 10.14)
+ * `CMake`_ version 3.1 or greater
+ * Git version 2 or greater
+ * `libclang`_ from your system or the prebuilt version from the ``Qt Downloads`` page is
+ recommended. libclang10 is required for PySide 5.15.
+ * ``sphinx`` package for the documentation (optional).
+ * Depending on your OS, the following dependencies might also be required:
+
+ * ``libgl-dev``,
+ * ``python-dev``,
+ * ``python-distutils``,
+ * and ``python-setuptools``.
+
+.. _XCode: https://developer.apple.com/xcode/
+.. _here: https://qt.io/download
+.. _official website: https://www.python.org/downloads/
+.. _CMake: https://cmake.org/download/
+.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
+
+
+Building from source
+--------------------
+
+Creating a virtual environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
+which arbitrary modules can be installed and which can be removed after use::
+
+ python -m venv testenv # your interpreter could be called 'python3'
+ source testenv/bin/activate
+ pip install -r requirements.txt # General dependencies, documentation, and examples.
+
+will create and use a new virtual environment, which is indicated by the command prompt changing.
+
+Setting up CLANG
+~~~~~~~~~~~~~~~~
+
+If you don't have libclang already in your system, you can download from the Qt servers::
+
+ wget http://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-mac.7z
+
+Extract the files, and leave it on any desired path, and then set these two required
+environment variables::
+
+ 7z x libclang-release_100-based-mac.7z
+ export CLANG_INSTALL_DIR=$PWD/libclang
+
+Getting PySide6
+~~~~~~~~~~~~~~~
+
+Cloning the official repository can be done by::
+
+ git clone --recursive https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, e.g. 5.15::
+
+ cd pyside-setup && git checkout 5.15
+
+.. note:: Keep in mind you need to use the same version as your Qt installation
+
+Building PySide6
+~~~~~~~~~~~~~~~~
+
+Check your Qt installation path, to specifically use that version of qmake to build PySide6.
+e.g. ``/opt/Qt/5.15.0/gcc_64/bin/qmake``.
+
+Build can take a few minutes, so it is recommended to use more than one CPU core::
+
+ python setup.py build --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+
+Installing PySide6
+~~~~~~~~~~~~~~~~~~
+
+To install on the current directory, just run::
+
+ python setup.py install --qmake=/opt/Qt/5.15.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+
+Test installation
+~~~~~~~~~~~~~~~~~
+
+You can execute one of the examples to verify the process is properly working.
+Remember to properly set the environment variables for Qt and PySide6::
+
+ python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/gettingstarted-windows.rst b/sources/pyside6/doc/gettingstarted-windows.rst
new file mode 100644
index 000000000..d9eb1a61c
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted-windows.rst
@@ -0,0 +1,97 @@
+Getting Started on Windows
+==========================
+
+The Qt library has to be built with the same version of MSVC as Python and PySide6, this can be
+selected when using the online installer.
+
+Requirements
+------------
+
+ * Qt package from `here`_ or a custom build of Qt 5.12+ (preferably Qt 5.15)
+ * A Python interpreter (version Python 3.6+). Preferably get it from the `official website`_.
+ * `MSVC2017`_ (or MSVC2019) for Python 3 on Windows,
+ * `CMake`_ version 3.1 or greater
+ * `Git`_ version 2 or greater
+ * `libclang`_ prebuilt version from the ``Qt Downloads`` page is recommended. We recommend
+ libclang10 for PySide 5.15.
+ * `OpenSSL`_ (optional for SSL support, Qt must have been configured using the same SSL library).
+ * ``venv`` or ``virtualenv`` is strongly recommended, but optional.
+ * ``sphinx`` package for the documentation (optional).
+
+.. note:: Python 3.8.0 was missing some API required for PySide/Shiboken so it's not possible
+ to use it for a Windows build.
+
+
+.. _here: https://qt.io/download
+.. _official website: https://www.python.org/downloads/
+.. _MSVC2017: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools
+.. _CMake: https://cmake.org/download/
+.. _Git: https://git-scm.com/download/win
+.. _libclang: http://download.qt.io/development_releases/prebuilt/libclang/
+.. _OpenSSL: https://sourceforge.net/projects/openssl/
+
+
+Building from source on Windows 10
+----------------------------------
+
+Creating a virtual environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
+which arbitrary modules can be installed and which can be removed after use::
+
+ python -m venv testenv
+ call testenv\Scripts\activate
+ pip install -r requirements.txt # General dependencies, documentation, and examples.
+
+will create and use a new virtual environment, which is indicated by the command prompt changing.
+
+Setting up CLANG
+~~~~~~~~~~~~~~~~
+
+If you don't have libclang already in your system, you can download from the Qt servers,
+e.g. ``libclang-release_100-based-windows-vs2019_64.7z``.
+
+Extract the files, and leave it on any desired path, e.g ``c:\``, and then set these two required
+environment variables::
+
+ set LLVM_INSTALL_DIR=c:\libclang
+ set PATH=C:\libclang\bin;%PATH%
+
+Getting PySide6
+~~~~~~~~~~~~~~~
+
+Cloning the official repository can be done by::
+
+ git clone --recursive https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, e.g. 5.15::
+
+ cd pyside-setup && git checkout 5.15
+
+.. note:: Keep in mind you need to use the same version as your Qt installation
+
+Building PySide6
+~~~~~~~~~~~~~~~~
+
+Check your Qt installation path, to specifically use that version of qmake to build PySide6.
+e.g. ``E:\Qt\5.15.0\msvc2019_64\bin\qmake.exe``.
+
+Build can take a few minutes, so it is recommended to use more than one CPU core::
+
+ python setup.py build --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
+
+Installing PySide6
+~~~~~~~~~~~~~~~~~~
+
+To install on the current directory, just run::
+
+ python setup.py install --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
+
+Test installation
+~~~~~~~~~~~~~~~~~
+
+You can execute one of the examples to verify the process is properly working.
+Remember to properly set the environment variables for Qt and PySide6::
+
+ python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/gettingstarted.rst b/sources/pyside6/doc/gettingstarted.rst
new file mode 100644
index 000000000..da683f21d
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted.rst
@@ -0,0 +1,218 @@
+|project| Getting Started
+==========================
+
+This page is focused on building |project| from source, if you just want to install |pymodname|
+with ``pip`` you need to run::
+
+ pip install pyside6
+
+for more details, refer to our `Quick Start`_ guide. Additionally, you can
+check the :ref:`FAQ <faq>` related to the project.
+
+.. _Quick Start: quickstart.html
+
+General Requirements
+--------------------
+
+ * **Python**: 3.6+
+ * **Qt:** 5.12+ is recommended
+ * **libclang:** The libclang library, recommended: version 10 for PySide6 5.15.
+ Prebuilt versions of it can be `downloaded here`_.
+ * **CMake:** 3.1+ is needed.
+
+.. _downloaded here: http://download.qt.io/development_releases/prebuilt/libclang/
+
+Guides per platform
+-------------------
+
+You can refer to the following pages for platform specific instructions:
+
+ * `Windows`_
+ * `macOS`_
+ * `Linux`_
+ * Mobile platforms (iOS/Android) **(no support)**
+ * Embedded platforms **(no official support)**
+
+ .. note:: Most Linux-based embedded OS provide PySide6 with their official
+ package manager (e.g. `Raspbian`_ and `ArchlinuxARM`_).
+
+.. _Windows: gettingstarted-windows.html
+.. _macOS: gettingstarted-macOS.html
+.. _Linux: gettingstarted-linux.html
+.. _Raspbian: https://www.raspbian.org/
+.. _ArchlinuxARM: https://archlinuxarm.org/
+
+A normal building command will look like this::
+
+ python setup.py install --qmake=/path/to/qmake \
+ --ignore-git \
+ --debug \
+ --build-tests \
+ --parallel=8 \
+ --make-spec=ninja \
+ --verbose-build \
+ --module-subset=Core,Gui,Widgets
+
+Which will build and install the project with **debug** symbols, including the **tests**,
+using **ninja** (instead of make), and considering only the **module subset** of QtCore, QtGUI
+and QtWidgets.
+
+Other important options to consider are:
+ * ``--cmake``, to specify the path to the cmake binary,
+ * ``--reuse-build``, to rebuild only the modified files,
+ * ``--openssl=/path/to/openssl/bin``, to use a different path for OpenSSL,
+ * ``--standalone``, to copy over the Qt libraries into the final package
+ to make it work on other machines,
+ * ``--doc-build-online``, to build documentation using the online template.
+
+Testing the installation
+------------------------
+
+Once the installation finishes, you will be able to execute any of our examples::
+
+ python examples/widgets/widgets/tetrix.py
+
+Running Tests
+-------------
+
+Using the ``--build-tests`` option will enable us to run all the auto tests inside the project::
+
+ python testrunner.py test > testlog.txt
+
+.. note:: On Windows, don't forget to have qmake in your path
+ (``set PATH=E:\Path\to\Qt\5.15\msvc2017_64\bin;%PATH%``)
+
+You can also run a specific test (for example ``qpainter_test``) by running::
+
+ ctest -R qpainter_test --verbose
+
+Building the documentation
+--------------------------
+
+Starting from 5.15, there are two options to build the documentation:
+
+1. Building rst-only documentation (no API)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The process of parsing Qt headers to generate the PySide API documentation can take several
+minutes, this means that modifying a specific section of the rst files we currently have, might
+become a hard task.
+
+For this, you can install ``sphinx`` on a virtual environment, and execute the following command::
+
+ python setup.py build_rst_docs
+
+which will generate a ``html/`` directory with the following structure::
+
+ html
+ └── pyside6
+ ├── index.html
+ ├── ...
+ └── shiboken6
+ ├── index.html
+ └── ...
+
+so you can open the main page ``html/pyside6/index.html`` on your browser to check the generated
+files.
+
+This is useful when updating the general sections of the documentation, adding tutorials,
+modifying the build instructions, and more.
+
+2. Building the documentation (rst + API)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The documentation is being generated using **qdoc** to get the API information, and also **sphinx**
+for the local Python related notes.
+
+The system required ``libxml2`` and ``libxslt``, also on the Python environment, ``sphinx`` and
+``graphviz`` need to be installed before running the installation process::
+
+ pip install graphviz sphinx
+
+After installing ``graphviz``, the ``dot`` command needs to be in PATH, otherwise,
+the process will fail. Installing ``graphviz`` system-wide is also an option.
+
+Since the process rely on a Qt installation, you need to specify where the ``qtbase`` directory
+you will use with your ``qmake`` is located::
+
+ export QT_SRC_DIR=/path/to/qtbase
+
+Once the build process finishes, you can go to the generated ``*_build/*_release/pyside6``
+directory, and run::
+
+ make apidoc
+
+.. note:: The ``apidoc`` make target builds offline documenation in QCH (Qt Creator Help) format
+ by default. You can switch to building for the online use with the ``--doc-build-online``
+ configure option.
+
+Finally, you will get a ``html`` directory containing all the generated documentation. The offline
+help files, ``PySide.qch`` and ``Shiboken.qch``, can be moved to any directory of your choice. You
+can find ``Shiboken.qch`` in the build directory, ``*_build\*_release\shiboken6\doc\html``.
+
+Viewing offline documentation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The offline documentation (QCH) can be viewed using the Qt Creator IDE or Qt Assistant, which is
+a standalone application for viewing QCH files.
+
+To view the QCH using Qt Creator, following the instructions outlined in
+`Using Qt Creator Help Mode <https://doc.qt.io/qtcreator/creator-help.html>`_. If you chose to
+use Qt Assistant instead, use the following command to register the QCH file before launching
+Qt Assistant:
+
+ assistant -register PySide.qch
+
+.. note:: Qt Assistant renders the QCH content using the QTextBrowser backend, which supports
+ a subset of the CSS styles, However, Qt Creator offers an alternative litehtml-based
+ backend, which offers better browsing experience. At the moment, this is not the default
+ backend, so you have to select the litehtml backend
+ explicitly under the ``General`` tab in ``Qt Creator >> Tools >> Options >> Help``.
+
+Using the internal tools
+------------------------
+
+A set of tools can be found under the ``tools/`` directory inside the ``pyside-setup`` repository.
+
+* ``checklibs.py``: Script to analyze dynamic library dependencies of Mach-O binaries.
+ To use this utility, just run::
+
+ python checklibs.py /path/to/some.app/Contents/MacOS/Some
+
+ This script was fetched from this repository_.
+
+* ``create_changelog.py``: Script used to create the CHANGELOG that you can find in the ``dist/``
+ directory. Usage::
+
+ python create_changelog.py -r 5.15.1 -v v5.15.0..5.15 -t bug-fix
+
+* ``debug_windows.py``: This script can be used to find out why PySide6 modules
+ fail to load with various DLL errors like Missing DLL or Missing symbol in DLL.
+
+ You can think of it as a Windows version of ``ldd`` / ``LD_DEBUG``.
+
+ Underneath it uses the ``cdb.exe`` command line debugger, and the ``gflags.exe`` tool, both
+ installed with the latest Windows Kit.
+
+ The aim is to ask users to run this script when they encounter PySide6 imports not working on
+ Windows. The user should then provide the generated log file.
+
+ Incidentally it can also be used for any Windows executables, not just Python.
+ To use it just run::
+
+ python debug_windows.py
+
+* ``missing_bindings.py``: This script is used to compare the state of PySide6 and PyQt5
+ regarding available modules and classses. This content is displayed in our `wiki page`_,
+ and can be used as follows::
+
+ python missing_bindings.py --qt-version 5.15.1 -w all
+
+ Please keep in mind we rely on BeautifulSoup_ to parse the content, so you will be to install
+ it besides PySide6 and PyQt5 (Including additional modules like DataVisualiztion, QtCharts,
+ WebEngine, etc).
+
+
+.. _repository: https://github.com/liyanage/macosx-shell-scripts/
+.. _`wiki page`: https://wiki.qt.io/Qt_for_Python_Missing_Bindings
+.. _BeautifulSoup: https://www.crummy.com/software/BeautifulSoup/
diff --git a/sources/pyside6/doc/index.rst b/sources/pyside6/doc/index.rst
new file mode 100644
index 000000000..339b96275
--- /dev/null
+++ b/sources/pyside6/doc/index.rst
@@ -0,0 +1,104 @@
+|project|
+*********
+
+.. ifconfig:: output_format == 'html'
+
+ **Qt for Python** offers the official Python bindings for `Qt`_, and
+ has two main components:
+
+ * `PySide6`_, so that you can use Qt5 APIs in your Python applications, and
+ * `Shiboken6 <shiboken6/index.html>`__, a binding generator tool, which can
+ be used to expose C++ projects to Python, and a Python module with
+ some utility functions.
+
+.. ifconfig:: output_format == 'qthelp'
+
+ **Qt for Python** offers the official Python bindings for `Qt`_, and
+ has two main components:
+
+ * `PySide6`_, so that you can use Qt5 APIs in your Python applications, and
+ * `Shiboken6 <../shiboken6/index.html>`__, a binding generator tool, which can
+ be used to expose C++ projects to Python, and a Python module with
+ some utility functions.
+
+This project is available under the LGPLv3/GPLv3 and the `Qt commercial license`_.
+
+.. _Qt: https://doc.qt.io
+.. _PySide6: quickstart.html
+.. _`Qt commercial license`: https://www.qt.io/licensing/
+
+
+
+Documentation
+=============
+
+.. ifconfig:: output_format == 'html'
+
+ .. raw:: html
+
+ <table class="special">
+ <colgroup>
+ <col style="width: 33%" />
+ <col style="width: 33%" />
+ <col style="width: 33%" />
+ </colgroup>
+ <tr>
+ <td><a href="quickstart.html"><p><strong>Check It Out!</strong><br/>Write your first Qt app.</p></a></td>
+ <td><a href="gettingstarted.html"><p><strong>Getting Started</strong><br/>Install and build from source.</p></a></td>
+ <td><a href="api.html"><p><strong>API Docs</strong><br/>Qt for Python API reference.</p></a></td>
+ </tr>
+
+ <tr>
+ <td><a href="tutorials/index.html"><p><strong>Tutorials</strong><br/>Learn with step-by-step guides.</p></a></td>
+ <td><a href="examples/index.html"><p><strong>Examples</strong><br/>Check all the available examples.</p></a></td>
+ <td><a href="videos.html"><p><strong>Videos</strong><br/>Watch webinars, Talks, and more.</p></a></td>
+ </tr>
+
+ <tr>
+ <td><a href="deployment.html" style="display: block;"><p><strong>Deployment</strong><br/>Learn to deploy your apps.</p></a></td>
+ <td><a href="considerations.html" style="display: block;"><p><strong>Considerations</strong><br/>API differences and known issues.</p></a></td>
+ <td><a href="shiboken6/index.html" style="display: block;"><p><strong>Shiboken</strong><br/>Generate C++ to Python binding.</p></a></td>
+ </tr>
+ </table>
+
+.. ifconfig :: output_format == 'qthelp'
+
+ .. raw:: html
+
+ <table class="special">
+ <colgroup>
+ <col style="width: 33%" />
+ <col style="width: 33%" />
+ <col style="width: 33%" />
+ </colgroup>
+ <tr>
+ <td><a href="quickstart.html"><p><strong>Check It Out!</strong><br/>Write your first Qt app.</p></a></td>
+ <td><a href="gettingstarted.html"><p><strong>Getting Started</strong><br/>Install and build from source.</p></a></td>
+ <td><a href="api.html"><p><strong>API Docs</strong><br/>Qt for Python API reference.</p></a></td>
+ </tr>
+
+ <tr>
+ <td><a href="tutorials/index.html"><p><strong>Tutorials</strong><br/>Learn with step-by-step guides.</p></a></td>
+ <td><a href="examples/index.html"><p><strong>Examples</strong><br/>Check all the available examples.</p></a></td>
+ <td><a href="videos.html"><p><strong>Videos</strong><br/>Watch webinars, Talks, and more.</p></a></td>
+ </tr>
+
+ <tr>
+ <td><a href="deployment.html" style="display: block;"><p><strong>Deployment</strong><br/>Learn to deploy your apps.</p></a></td>
+ <td><a href="considerations.html" style="display: block;"><p><strong>Considerations</strong><br/>API differences and known issues.</p></a></td>
+ <td><a href="../shiboken6/index.html" style="display: block;"><p><strong>Shiboken</strong><br/>Generate C++ to Python binding.</p></a></td>
+ </tr>
+ </table>
+
+We have also a `wiki page`_ where you can find how to report bugs, contribute or contact the community.
+
+.. _`wiki page`: https://wiki.qt.io/Qt_for_Python
+
+.. toctree::
+ :hidden:
+ :glob:
+
+ contents.rst
+ gettingstarted*
+ pyside-examples/pysideexamples*
+ overviews/*
diff --git a/sources/pyside6/doc/inheritance_diagram.py b/sources/pyside6/doc/inheritance_diagram.py
new file mode 100644
index 000000000..e8dc69532
--- /dev/null
+++ b/sources/pyside6/doc/inheritance_diagram.py
@@ -0,0 +1,372 @@
+# -*- coding: utf-8 -*-
+r"""
+ sphinx.ext.inheritance_diagram
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Defines a docutils directive for inserting inheritance diagrams.
+
+ Provide the directive with one or more classes or modules (separated
+ by whitespace). For modules, all of the classes in that module will
+ be used.
+
+ Example::
+
+ Given the following classes:
+
+ class A: pass
+ class B(A): pass
+ class C(A): pass
+ class D(B, C): pass
+ class E(B): pass
+
+ .. inheritance-diagram: D E
+
+ Produces a graph like the following:
+
+ A
+ / \
+ B C
+ / \ /
+ E D
+
+ The graph is inserted as a PNG+image map into HTML and a PDF in
+ LaTeX.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2010-2011 by the PySide team.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os
+import re
+import sys
+import inspect
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
+
+from docutils import nodes
+from docutils.parsers.rst import directives, Directive
+
+from sphinx.ext.graphviz import render_dot_html, render_dot_latex
+
+class InheritanceException(Exception):
+ pass
+
+# When passed something like:
+# PySide6.QtCore.QStateMachine.SignalEvent
+# try to import the underlying module and return a
+# handle to the object. In a loop, import
+# PySide6.QtCore.QStateMachine.SignalEvent
+# PySide6.QtCore.QStateMachine
+# PySide6.QtCore
+# until the import succeeds and walk up the attributes
+# to obtain the object
+
+def importClassOrModule(name):
+ components = name.split('.')
+ for i in range(len(components), 0, -1):
+ importPath = '.'.join(components[: i])
+ try:
+ __import__(importPath)
+ except ImportError:
+ continue
+ if i == len(components):
+ return sys.modules[importPath]
+ remaining = components[i :]
+ cls = sys.modules[importPath]
+ for component in remaining:
+ try:
+ cls = getattr(cls, component)
+ except Exception: # No such attribute
+ return None
+ return cls
+ return None
+
+class InheritanceGraph(object):
+ """
+ Given a list of classes, determines the set of classes that they inherit
+ from all the way to the root "object", and then is able to generate a
+ graphviz dot graph from them.
+ """
+ def __init__(self, class_names, currmodule, show_builtins=False, parts=0):
+ """
+ *class_names* is a list of child classes to show bases from.
+
+ If *show_builtins* is True, then Python builtins will be shown
+ in the graph.
+ """
+ self.class_names = class_names
+ classes = self._import_classes(class_names, currmodule)
+ self.class_info = self._class_info(classes, show_builtins, parts)
+ if not self.class_info:
+ raise InheritanceException('No classes found for '
+ 'inheritance diagram')
+
+ def _import_class_or_module(self, name, currmodule):
+ """
+ Import a class using its fully-qualified *name*.
+ """
+ todoc = importClassOrModule(name)
+ if not todoc and currmodule is not None:
+ todoc = importClassOrModule(currmodule + '.' + name)
+ if not todoc:
+ moduleStr = '(module {})'.format(currmodule) if currmodule else ''
+ raise InheritanceException('Could not import class {} specified for '
+ 'inheritance diagram {}.'.format(name, moduleStr))
+ if inspect.isclass(todoc):
+ return [todoc]
+ elif inspect.ismodule(todoc):
+ classes = []
+ for cls in todoc.__dict__.values():
+ if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
+ classes.append(cls)
+ return classes
+ raise InheritanceException('%r specified for inheritance diagram is '
+ 'not a class or module' % name)
+
+ def _import_classes(self, class_names, currmodule):
+ """Import a list of classes."""
+ classes = []
+ for name in class_names:
+ classes.extend(self._import_class_or_module(name, currmodule))
+ return classes
+
+ def _class_info(self, classes, show_builtins, parts):
+ """Return name and bases for all classes that are ancestors of
+ *classes*.
+
+ *parts* gives the number of dotted name parts that is removed from the
+ displayed node names.
+ """
+ all_classes = {}
+ builtins = __builtins__.values()
+
+ def recurse(cls):
+ if not show_builtins and cls in builtins:
+ return
+
+ nodename = self.class_name(cls, parts)
+ fullname = self.class_name(cls, 0)
+
+ baselist = []
+ all_classes[cls] = (nodename, fullname, baselist)
+ for base in cls.__bases__:
+ if not show_builtins and base in builtins:
+ continue
+ if base.__name__ == "Object" and base.__module__ == "Shiboken":
+ continue
+ baselist.append(self.class_name(base, parts))
+ if base not in all_classes:
+ recurse(base)
+
+ for cls in classes:
+ recurse(cls)
+
+ return list(all_classes.values())
+
+ def class_name(self, cls, parts=0):
+ """Given a class object, return a fully-qualified name.
+
+ This works for things I've tested in matplotlib so far, but may not be
+ completely general.
+ """
+ module = cls.__module__
+ if module == '__builtin__':
+ fullname = cls.__name__
+ else:
+ fullname = '%s.%s' % (module, cls.__qualname__)
+ if parts == 0:
+ return fullname
+ name_parts = fullname.split('.')
+ return '.'.join(name_parts[-parts:])
+
+ def get_all_class_names(self):
+ """
+ Get all of the class names involved in the graph.
+ """
+ return [fullname for (_, fullname, _) in self.class_info]
+
+ # These are the default attrs for graphviz
+ default_graph_attrs = {
+ 'rankdir': 'LR',
+ 'size': '"8.0, 12.0"',
+ }
+ default_node_attrs = {
+ 'shape': 'box',
+ 'fontsize': 10,
+ 'height': 0.25,
+ 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, '
+ 'Arial, Helvetica, sans"',
+ 'style': '"setlinewidth(0.5)"',
+ }
+ default_edge_attrs = {
+ 'arrowsize': 0.5,
+ 'style': '"setlinewidth(0.5)"',
+ }
+
+ def _format_node_attrs(self, attrs):
+ return ','.join(['%s=%s' % x for x in attrs.items()])
+
+ def _format_graph_attrs(self, attrs):
+ return ''.join(['%s=%s;\n' % x for x in attrs.items()])
+
+ def generate_dot(self, name, urls={}, env=None,
+ graph_attrs={}, node_attrs={}, edge_attrs={}):
+ """
+ Generate a graphviz dot graph from the classes that
+ were passed in to __init__.
+
+ *name* is the name of the graph.
+
+ *urls* is a dictionary mapping class names to HTTP URLs.
+
+ *graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing
+ key/value pairs to pass on as graphviz properties.
+ """
+ g_attrs = self.default_graph_attrs.copy()
+ n_attrs = self.default_node_attrs.copy()
+ e_attrs = self.default_edge_attrs.copy()
+ g_attrs.update(graph_attrs)
+ n_attrs.update(node_attrs)
+ e_attrs.update(edge_attrs)
+ if env:
+ g_attrs.update(env.config.inheritance_graph_attrs)
+ n_attrs.update(env.config.inheritance_node_attrs)
+ e_attrs.update(env.config.inheritance_edge_attrs)
+
+ res = []
+ res.append('digraph %s {\n' % name)
+ res.append(self._format_graph_attrs(g_attrs))
+
+ for name, fullname, bases in self.class_info:
+ # Write the node
+ this_node_attrs = n_attrs.copy()
+ url = urls.get(fullname)
+ if url is not None:
+ this_node_attrs['URL'] = '"%s"' % url
+ res.append(' "%s" [%s];\n' %
+ (name, self._format_node_attrs(this_node_attrs)))
+
+ # Write the edges
+ for base_name in bases:
+ res.append(' "%s" -> "%s" [%s];\n' %
+ (base_name, name,
+ self._format_node_attrs(e_attrs)))
+ res.append('}\n')
+ return ''.join(res)
+
+
+class inheritance_diagram(nodes.General, nodes.Element):
+ """
+ A docutils node to use as a placeholder for the inheritance diagram.
+ """
+ pass
+
+
+class InheritanceDiagram(Directive):
+ """
+ Run when the inheritance_diagram directive is first encountered.
+ """
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 0
+ final_argument_whitespace = True
+ option_spec = {
+ 'parts': directives.nonnegative_int,
+ }
+
+ def run(self):
+ node = inheritance_diagram()
+ node.document = self.state.document
+ env = self.state.document.settings.env
+ class_names = self.arguments[0].split()
+ class_role = env.get_domain('py').role('class')
+ # Store the original content for use as a hash
+ node['parts'] = self.options.get('parts', 0)
+ node['content'] = ', '.join(class_names)
+
+ # Create a graph starting with the list of classes
+ try:
+ graph = InheritanceGraph(
+ class_names, env.temp_data.get('py:module'),
+ parts=node['parts'])
+ except InheritanceException as err:
+ return [node.document.reporter.warning(err.args[0],
+ line=self.lineno)]
+
+ # Create xref nodes for each target of the graph's image map and
+ # add them to the doc tree so that Sphinx can resolve the
+ # references to real URLs later. These nodes will eventually be
+ # removed from the doctree after we're done with them.
+ for name in graph.get_all_class_names():
+ refnodes, x = class_role(
+ 'class', ':class:`%s`' % name, name, 0, self.state)
+ node.extend(refnodes)
+ # Store the graph object so we can use it to generate the
+ # dot file later
+ node['graph'] = graph
+ return [node]
+
+
+def get_graph_hash(node):
+ hashString = node['content'] + str(node['parts'])
+ return md5(hashString.encode('utf-8')).hexdigest()[-10:]
+
+
+def html_visit_inheritance_diagram(self, node):
+ """
+ Output the graph for HTML. This will insert a PNG with clickable
+ image map.
+ """
+ graph = node['graph']
+
+ graph_hash = get_graph_hash(node)
+ name = 'inheritance%s' % graph_hash
+
+ # Create a mapping from fully-qualified class names to URLs.
+ urls = {}
+ for child in node:
+ if child.get('refuri') is not None:
+ urls[child['reftitle']] = child.get('refuri')
+ elif child.get('refid') is not None:
+ urls[child['reftitle']] = '#' + child.get('refid')
+
+ dotcode = graph.generate_dot(name, urls, env=self.builder.env)
+ render_dot_html(self, node, dotcode, {}, 'inheritance', 'inheritance',
+ alt='Inheritance diagram of ' + node['content'])
+ raise nodes.SkipNode
+
+
+def latex_visit_inheritance_diagram(self, node):
+ """
+ Output the graph for LaTeX. This will insert a PDF.
+ """
+ graph = node['graph']
+
+ graph_hash = get_graph_hash(node)
+ name = 'inheritance%s' % graph_hash
+
+ dotcode = graph.generate_dot(name, env=self.builder.env,
+ graph_attrs={'size': '"6.0,6.0"'})
+ render_dot_latex(self, node, dotcode, {}, 'inheritance')
+ raise nodes.SkipNode
+
+
+def skip(self, node):
+ raise nodes.SkipNode
+
+
+def setup(app):
+ app.setup_extension('sphinx.ext.graphviz')
+ app.add_node(
+ inheritance_diagram,
+ latex=(latex_visit_inheritance_diagram, None),
+ html=(html_visit_inheritance_diagram, None),
+ text=(skip, None),
+ man=(skip, None))
+ app.add_directive('inheritance-diagram', InheritanceDiagram)
+ app.add_config_value('inheritance_graph_attrs', {}, False),
+ app.add_config_value('inheritance_node_attrs', {}, False),
+ app.add_config_value('inheritance_edge_attrs', {}, False),
diff --git a/sources/pyside6/doc/modules.rst b/sources/pyside6/doc/modules.rst
new file mode 100644
index 000000000..830570edc
--- /dev/null
+++ b/sources/pyside6/doc/modules.rst
@@ -0,0 +1,97 @@
+Qt Modules
+===========
+
+.. toctree::
+ :hidden:
+ :glob:
+
+ PySide6/Qt*/index
+
+.. list-table::
+ :widths: 150, 150
+ :align: left
+
+ * - :mod:`Qt Core <PySide6.QtCore>`
+ Provides core non-GUI functionality.
+ - :mod:`Qt 3D Animation <PySide6.Qt3DAnimation>`
+ Provides basic elements required to animate 3D objects.
+ * - :mod:`Qt Gui <PySide6.QtGui>`
+ Extends QtCore with GUI functionality.
+ - :mod:`Qt Help <PySide6.QtHelp>`
+ Provides classes for integrating online documentation in applications.
+ * - :mod:`Qt Network <PySide6.QtNetwork>`
+ Offers classes that let you to write TCP/IP clients and servers.
+ - :mod:`Qt OpenGL <PySide6.QtOpenGL>`
+ Offers classes that make it easy to use OpenGL in Qt applications.
+ * - :mod:`Qt PrintSupport <PySide6.QtPrintSupport>`
+ Provides extensive cross-platform support for printing.
+ - :mod:`Qt Qml <PySide6.QtQml>`
+ Python API for Qt QML.
+ * - :mod:`Qt Charts <PySide6.QtCharts>`
+ Provides a set of easy to use chart components.
+ - :mod:`Qt Quick <PySide6.QtQuick>`
+ Provides classes for embedding Qt Quick in Qt applications.
+ * - :mod:`Qt DataVisualization <PySide6.QtDataVisualization>`
+ Provides a way to visualize data in 3D as bar, scatter, and surface graphs.
+ - :mod:`Qt QuickWidgets <PySide6.QtQuickWidgets>`
+ Provides the QQuickWidget class for embedding Qt Quick in widget-based applications.
+ * - :mod:`Qt TextToSpeech <PySide6.QtTextToSpeech>`
+ Provides API to access text-to-speech engines.
+ - :mod:`Qt Sql <PySide6.QtSql>`
+ Helps you provide seamless database integration to your Qt applications.
+ * - :mod:`Qt Multimedia <PySide6.QtMultimedia>`
+ Provides low-level multimedia functionality.
+ - :mod:`Qt MultimediaWidgets <PySide6.QtMultimediaWidgets>`
+ Provides the widget-based multimedia API.
+ * - :mod:`Qt MacExtras <PySide6.QtMacExtras>`
+ Provides classes and functions specific to
+ macOS and iOS operating systems.
+ - :mod:`Qt Svg <PySide6.QtSvg>`
+ Provides classes for displaying the contents of SVG files.
+ * - :mod:`Qt UiTools <PySide6.QtUiTools>`
+ Provides classes to handle forms created with Qt Designer.
+ - :mod:`Qt Test <PySide6.QtTest>`
+ Provides classes for unit testing Qt applications and libraries.
+ * - :mod:`Qt Concurrent <PySide6.QtConcurrent>`
+ Provides high-level APIs that make it possible
+ to write multi-threaded programs without using low-level threading
+ primitives such as mutexes, read-write locks, wait conditions, or semaphores.
+ - :mod:`Qt AxContainer <PySide6.QtAxContainer>`
+ Provides QAxObject and QAxWidget which act as
+ containers for COM objects and ActiveX controls.
+ * - :mod:`Qt WebEngineCore <PySide6.QtWebEngineCore>`
+ Provides the core functionality to integrate web content.
+ - :mod:`Qt WebEngineWidgets <PySide6.QtWebEngineWidgets>`
+ Provides widgets that can handle web content.
+ * - :mod:`Qt WebChannel <PySide6.QtWebChannel>`
+ Enables peer-to-peer communication between a server and a client
+ (HTML/JavaScript or QML application).
+ - :mod:`Qt WebSockets <PySide6.QtWebSockets>`
+ Provides interfaces that enable Qt applications
+ to act as a server that can process WebSocket requests, or a client that
+ can consume data received from the server, or both.
+ * - :mod:`Qt Widgets <PySide6.QtWidgets>`
+ Extends Qt GUI with C++ widget functionality.
+ - :mod:`Qt WinExtras <PySide6.QtWinExtras>`
+ Provides classes and functions for using some Windows APIs in a Qt way.
+ * - :mod:`Qt X11Extras <PySide6.QtX11Extras>`
+ Provides information about the X display configuration.
+ - :mod:`Qt Xml <PySide6.QtXml>`
+ Provides C++ implementations of SAX and DOM.
+ * - :mod:`Qt 3D Extras <PySide6.Qt3DExtras>`
+ Provides a set of prebuilt elements to help you get started with Qt 3D.
+ - :mod:`Qt 3D Input <PySide6.Qt3DInput>`
+ Provides classes for handling user input in applications using Qt 3D.
+ * - :mod:`Qt 3D Logic <PySide6.Qt3DLogic>`
+ Enables synchronizing frames with the Qt 3D backend.
+ - :mod:`Qt 3D Render <PySide6.Qt3DRender>`
+ Contains functionality to support 2D and 3D rendering using Qt 3D.
+ * - :mod:`Qt Positioning <PySide6.QtPositioning>`
+ Provides positioning information via QML and Python interfaces.
+ - :mod:`Qt Location <PySide6.QtLocation>`
+ Helps you create viable mapping solutions using the data available from some of the popular location services.
+ * - :mod:`Qt Sensors <PySide6.QtSensors>`
+ Provides access to sensor hardware via QML and Python interfaces and a motion gesture recognition API for devices.
+ - :mod:`Qt Scxml <PySide6.QtScxml>`
+ Provides classes to create and use state machines from SCXML files.
+
diff --git a/sources/pyside6/doc/pyside-config.qdocconf.in b/sources/pyside6/doc/pyside-config.qdocconf.in
new file mode 100644
index 000000000..7807c9d52
--- /dev/null
+++ b/sources/pyside6/doc/pyside-config.qdocconf.in
@@ -0,0 +1,19 @@
+buildversion = @PYSIDE_QT_VERSION@
+navigation.homepage = Qt for Python
+
+macro.nullptr = "\\c{None}"
+
+outputdir = @DOC_DATA_DIR@
+outputformats = WebXML
+WebXML.quotinginformation = true
+WebXML.nosubdirs = true
+WebXML.outputsubdir = webxml
+
+spurious += "Hostile character .*"
+
+#excludes qdoc statements that are not relevant for PySide6
+defines += qtforpython
+
+includepaths += \
+ -I @QT_INCLUDE_DIR@ \
+ -I @mkspecInclude@ \
diff --git a/sources/pyside6/doc/pyside-examples/examples.qdoc b/sources/pyside6/doc/pyside-examples/examples.qdoc
new file mode 100644
index 000000000..116ed65bb
--- /dev/null
+++ b/sources/pyside6/doc/pyside-examples/examples.qdoc
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \group all-pyside-examples
+ \title All Qt for Python Examples
+ \brief A varied selection of examples can be found in the 'examples' directory of the
+ pyside-setup repository. This can be accessed after installing
+ PySide6 via pip, checking the 'site-packages/PySide6/examples' directory.
+
+ This page aims to document the most important use cases of the module
+ and it will be extended with each release.
+*/
diff --git a/sources/pyside2/doc/pyside-examples/images/pysideexample-classwizard.png b/sources/pyside6/doc/pyside-examples/images/pysideexample-classwizard.png
index 1706772d8..1706772d8 100644
--- a/sources/pyside2/doc/pyside-examples/images/pysideexample-classwizard.png
+++ b/sources/pyside6/doc/pyside-examples/images/pysideexample-classwizard.png
Binary files differ
diff --git a/sources/pyside2/doc/pyside-examples/images/pysideexample-stardelegate.png b/sources/pyside6/doc/pyside-examples/images/pysideexample-stardelegate.png
index 343416397..343416397 100644
--- a/sources/pyside2/doc/pyside-examples/images/pysideexample-stardelegate.png
+++ b/sources/pyside6/doc/pyside-examples/images/pysideexample-stardelegate.png
Binary files differ
diff --git a/sources/pyside2/doc/pyside-examples/images/screenshot_hello.png b/sources/pyside6/doc/pyside-examples/images/screenshot_hello.png
index 41ebbf01b..41ebbf01b 100644
--- a/sources/pyside2/doc/pyside-examples/images/screenshot_hello.png
+++ b/sources/pyside6/doc/pyside-examples/images/screenshot_hello.png
Binary files differ
diff --git a/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc b/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc
new file mode 100644
index 000000000..edfd68fd5
--- /dev/null
+++ b/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/dialogs/classwizard
+ \title PySide6.QtWidgets - Classwizard Example
+ \ingroup all-pyside-examples
+ \brief Demonstrates the use of QDialog in a wizard application
+
+ This example demonstrates the use a custom QDialog in a wizard,
+ which generates necessary C++ class template code.
+
+ \image pysideexample-classwizard.png
+
+*/
diff --git a/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc b/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc
new file mode 100644
index 000000000..6251ff3e1
--- /dev/null
+++ b/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/itemviews/stardelegate
+ \title PySide6.QtWidgets - Star Delegate Example
+ \ingroup all-pyside-examples
+ \brief Demonstrates Qt's itemview architecture
+
+ This example demonstrates the itemview architecture, which
+ is unique to Qt.
+
+ \image pysideexample-stardelegate.png
+*/
+
diff --git a/sources/pyside2/doc/pysideinclude.py b/sources/pyside6/doc/pysideinclude.py
index 91fffe115..91fffe115 100644
--- a/sources/pyside2/doc/pysideinclude.py
+++ b/sources/pyside6/doc/pysideinclude.py
diff --git a/sources/pyside2/doc/qtattributionsscannertorst.py b/sources/pyside6/doc/qtattributionsscannertorst.py
index ff966b4cf..ff966b4cf 100644
--- a/sources/pyside2/doc/qtattributionsscannertorst.py
+++ b/sources/pyside6/doc/qtattributionsscannertorst.py
diff --git a/sources/pyside2/doc/qtmodules/pyside-examples.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in
index 349c7f0f7..349c7f0f7 100644
--- a/sources/pyside2/doc/qtmodules/pyside-examples.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qt3dextras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qt3dextras.qdocconf.in
index 20bd8d730..20bd8d730 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qt3dextras.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qt3dextras.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtcharts.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtcharts.qdocconf.in
index 1a58c2dc4..1a58c2dc4 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtcharts.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtcharts.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtconcurrent.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtconcurrent.qdocconf.in
index a6976c24b..a6976c24b 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtconcurrent.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtconcurrent.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtcore.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtcore.qdocconf.in
index 5fb7248c9..5fb7248c9 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtcore.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtcore.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in
index c9fcb317c..c9fcb317c 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtdatavisualization.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtgui.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtgui.qdocconf.in
index 77e7e6e18..77e7e6e18 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtgui.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtgui.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qthelp.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qthelp.qdocconf.in
index 9336909c1..9336909c1 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qthelp.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qthelp.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtlocation.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in
index 5536e0c8b..5536e0c8b 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtlocation.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtmacextras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in
index 3e0e40019..3e0e40019 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtmacextras.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in
index 5415c392c..5415c392c 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtmultimediawidgets.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtnetwork.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtnetwork.qdocconf.in
index addec9aee..addec9aee 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtnetwork.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtnetwork.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtopengl.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtopengl.qdocconf.in
index 34895f0c6..34895f0c6 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtopengl.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtopengl.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtpositioning.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in
index 4a2c677d5..4a2c677d5 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtpositioning.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtprintsupport.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtprintsupport.qdocconf.in
index 04c554434..04c554434 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtprintsupport.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtprintsupport.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtqml.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtqml.qdocconf.in
index 546ea7b0a..546ea7b0a 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtqml.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtqml.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in
index 6f59645f3..6f59645f3 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtquickwidgets.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtscxml.qdocconf.in
index 30b61a785..30b61a785 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtscxml.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtsensors.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtsensors.qdocconf.in
index b407db75c..b407db75c 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtsensors.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtsensors.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtsql.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtsql.qdocconf.in
index 8f41c552c..8f41c552c 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtsql.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtsql.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtsvg.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtsvg.qdocconf.in
index e3c39a645..e3c39a645 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtsvg.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtsvg.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qttest.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qttest.qdocconf.in
index b092d9294..b092d9294 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qttest.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qttest.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qttexttospeech.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
index ed49121c1..ed49121c1 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtuitools.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in
index 7bd3941f7..7bd3941f7 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtuitools.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwebchannel.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwebchannel.qdocconf.in
index f3f2f5cf4..f3f2f5cf4 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtwebchannel.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtwebchannel.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in
index 038c803df..038c803df 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtwebenginewidgets.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwebsockets.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwebsockets.qdocconf.in
index 082b94883..082b94883 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtwebsockets.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtwebsockets.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwidgets.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwidgets.qdocconf.in
index 90e887f38..90e887f38 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtwidgets.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtwidgets.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtwinextras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in
index d2c1d5be7..d2c1d5be7 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtwinextras.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtx11extras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in
index 9315fa58c..9315fa58c 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtx11extras.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtxml.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtxml.qdocconf.in
index f9ccce7d7..f9ccce7d7 100644
--- a/sources/pyside2/doc/qtmodules/pyside-qtxml.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtxml.qdocconf.in
diff --git a/sources/pyside6/doc/quickstart.rst b/sources/pyside6/doc/quickstart.rst
new file mode 100644
index 000000000..37fbb0415
--- /dev/null
+++ b/sources/pyside6/doc/quickstart.rst
@@ -0,0 +1,118 @@
+|project| Quick start
+======================
+
+Requirements
+------------
+
+Before you can install |project|, first you must install the following software:
+
+ * Python 3.6+,
+ * We recommend using a virtual environment, such as
+ `venv <https://docs.python.org/3/library/venv.html>`_ or
+ `virtualenv <https://virtualenv.pypa.io/en/latest>`_
+
+Creating and activating an environment
+--------------------------------------
+
+You can do this by running the following on a terminal::
+
+ $ python -m venv env/ # Your binary is maybe called 'python3'
+ $ source env/bin/activate # for Linux and macOS
+ $ env\Scripts\activate.bat # for Windows
+
+
+
+Installation
+------------
+
+Now you are ready to install the |project| packages using ``pip``.
+From the terminal, run the following command::
+
+ # For the latest version on PyPi
+ pip install PySide6
+
+ # For a specific version
+ pip install PySide6==5.15.0
+
+or::
+
+ pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.15/latest pyside6 --trusted-host download.qt.io
+
+Test your Installation
+----------------------
+
+Now that you have |project| installed, you can test your setup by running the following Python
+constructs to print version information::
+
+ import PySide6.QtCore
+
+ # Prints PySide6 version
+ print(PySide6.__version__)
+
+ # Prints the Qt version used to compile PySide6
+ print(PySide6.QtCore.__version__)
+
+.. note::
+
+ As it happened in 5.14.2, PySide had a couple of new releases to fix
+ issues in 5.14.2, adding yet another version level. In that case, you
+ will have different versions being shown for Qt and PySide.
+
+Create a Simple Application
+---------------------------
+
+Your |project| setup is ready. You can explore it further by developing a simple application
+that prints "Hello World" in several languages. The following instructions will
+guide you through the development process:
+
+1. Create a new file named :code:`hello_world.py`, and add the following imports to it.::
+
+ import sys
+ import random
+ from PySide6 import QtCore, QtWidgets, QtGui
+
+ The |pymodname| Python module provides access to the Qt APIs as its submodule.
+ In this case, you are importing the :code:`QtCore`, :code:`QtWidgets`, and :code:`QtGui` submodules.
+
+2. Define a class named :code:`MyWidget`, which extends QWidget and includes a QPushButton and
+ QLabel.::
+
+ class MyWidget(QtWidgets.QWidget):
+ def __init__(self):
+ super().__init__()
+
+ self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
+
+ self.button = QtWidgets.QPushButton("Click me!")
+ self.text = QtWidgets.QLabel("Hello World",
+ alignment=QtCore.Qt.AlignCenter)
+
+ self.layout = QtWidgets.QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ self.button.clicked.connect(self.magic)
+
+ @QtCore.Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+ The MyWidget class has the :code:`magic` member function that randomly chooses an item from the
+ :code:`hello` list. When you click the button, the :code:`magic` function is called.
+
+3. Now, add a main function where you instantiate :code:`MyWidget` and :code:`show` it.::
+
+ if __name__ == "__main__":
+ app = QtWidgets.QApplication([])
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec_())
+
+Run your example. Try clicking the button at the bottom to see which greeting you get.
+
+.. image:: pyside-examples/images/screenshot_hello.png
+ :alt: Hello World application
diff --git a/sources/pyside2/doc/src/README.md b/sources/pyside6/doc/src/README.md
index df37cf691..df37cf691 100644
--- a/sources/pyside2/doc/src/README.md
+++ b/sources/pyside6/doc/src/README.md
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
new file mode 100644
index 000000000..bd45f1f64
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
@@ -0,0 +1,90 @@
+A Simple Button Tutorial
+************************
+
+In this tutorial, we'll show you how to handle **signals and slots**
+using Qt for Python. **Signals and slots** is a Qt feature that lets
+your graphical widgets communicate with other graphical widgets or
+your python code. Our application creates a button that logs the
+`Button clicked, Hello!` message to the python console each time you
+click it.
+
+Let's start by importing the necessary PySide6 classes and python
+`sys` module:
+::
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QPushButton
+ from PySide6.QtCore import Slot
+
+Let's also create a python function that logs the message to the
+console:
+::
+
+ # Greetings
+ @Slot()
+ def say_hello():
+ print("Button clicked, Hello!")
+
+.. note:: The `@Slot()` is a decorator that identifies a function as
+ a slot. It is not important to understand why for now,
+ but use it always to avoid unexpected behavior.
+
+Now, as mentioned in previous examples you must create the
+`QApplication` to run your PySide6 code:
+::
+
+ # Create the Qt Application
+ app = QApplication(sys.argv)
+
+Let's create the clickable button, which is a `QPushButton` instance.
+To label the button, we pass a python string to the constructor:
+::
+
+ # Create a button
+ button = QPushButton("Click me")
+
+Before we show the button, we must connect it to the `say_hello()`
+function that we defined earlier. There are two ways of doing this;
+using the old style or the new style, which is more pythonic. Let's
+use the new style in this case. You can find more information about
+both these styles in the
+`Signals and Slots in PySide6 <https://wiki.qt.io/Qt_for_Python_Signals_and_Slots>`_
+wiki page.
+
+The `QPushButton` has a predefined signal called **clicked**, which
+is triggered every time the button is clicked. We'll connect this
+signal to the `say_hello()` function:
+::
+
+ # Connect the button to the function
+ button.clicked.connect(say_hello)
+
+Finally, we show the button and start the Qt main loop:
+::
+
+ # Show the button
+ button.show()
+ # Run the main Qt loop
+ app.exec_()
+
+Here is the complete code for this example:
+::
+
+ #!/usr/bin/python
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QPushButton
+ from PySide6.QtCore import Slot
+
+ @Slot()
+ def say_hello():
+ print("Button clicked, Hello!")
+
+ # Create the Qt Application
+ app = QApplication(sys.argv)
+ # Create a button, connect it and show it
+ button = QPushButton("Click me")
+ button.clicked.connect(say_hello)
+ button.show()
+ # Run the main Qt loop
+ app.exec_()
diff --git a/sources/pyside6/doc/tutorials/basictutorial/dialog.rst b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
new file mode 100644
index 000000000..0ced571db
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
@@ -0,0 +1,145 @@
+Creating a Simple PySide6 Dialog Application
+*********************************************
+
+This tutorial shows how to build a simple dialog with some
+basic widgets. The idea is to let users provide their name
+in a `QLineEdit`, and the dialog greets them on click of a
+`QPushButton`.
+
+Let us just start with a simple stub that creates and shows
+a dialog. This stub is updated during the course of this
+tutorial, but you can use this stub as is if you need to:
+::
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton
+
+ class Form(QDialog):
+
+ def __init__(self, parent=None):
+ super(Form, self).__init__(parent)
+ self.setWindowTitle("My Form")
+
+
+ if __name__ == '__main__':
+ # Create the Qt Application
+ app = QApplication(sys.argv)
+ # Create and show the form
+ form = Form()
+ form.show()
+ # Run the main Qt loop
+ sys.exit(app.exec_())
+
+The imports aren't new to you, the same for the creation of the
+`QApplication` and the execution of the Qt main loop.
+The only novelty here is the **class definition**.
+
+You can create any class that subclasses PySide6 widgets.
+In this case, we are subclassing `QDialog` to define a custom
+dialog, which we name as **Form**. We have also implemented the
+`init()` method that calls the `QDialog`'s init method with the
+parent widget, if any. Also, the new `setWindowTitle()` method
+just sets the title of the dialog window. In `main()`, you can see
+that we are creating a *Form object* and showing it to the world.
+
+Create the Widgets
+===================
+
+We are going to create two widgets: a `QLineEdit` where users can
+enter their name, and a `QPushButton` that prints the contents of
+the `QLineEdit`.
+So, let's add the following code to the `init()` method of our Form:
+::
+
+ # Create widgets
+ self.edit = QLineEdit("Write my name here..")
+ self.button = QPushButton("Show Greetings")
+
+It's obvious from the code that both widgets will show the corresponding
+texts.
+
+Create a layout to organize the Widgets
+========================================
+
+Qt comes with layout-support that helps you organize the widgets
+in your application. In this case, let's use `QVBoxLayout` to lay out
+the widgets vertically. Add the following code to the `init()` method,
+after creating the widgets:
+::
+
+ # Create layout and add widgets
+ layout = QVBoxLayout()
+ layout.addWidget(self.edit)
+ layout.addWidget(self.button)
+ # Set dialog layout
+ self.setLayout(layout)
+
+So, we create the layout, add the widgets with `addWidget()`,
+and finally we say that our **Form** will have our `QVBoxLayout`
+as its layout.
+
+Create the function to greet and connect the Button
+====================================================
+
+Finally, we just have to add a function to our custom **Form**
+and *connect* our button to it. Our function will be a part of
+the Form, so you have to add it after the `init()` function:
+::
+
+ # Greets the user
+ def greetings(self):
+ print ("Hello {}".format(self.edit.text()))
+
+Our function just prints the contents of the `QLineEdit` to the
+python console. We have access to the text by means of the
+`QLineEdit.text()` method.
+
+Now that we have everything, we just need to *connect* the
+`QPushButton` to the `Form.greetings()` method. To do so, add the
+following line to the `init()` method:
+::
+
+ # Add button signal to greetings slot
+ self.button.clicked.connect(self.greetings)
+
+Once executed, you can enter your name in the `QLineEdit` and watch
+the console for greetings.
+
+Complete code
+=============
+
+Here is the complete code for this tutorial:
+::
+
+ import sys
+ from PySide6.QtWidgets import (QLineEdit, QPushButton, QApplication,
+ QVBoxLayout, QDialog)
+
+ class Form(QDialog):
+
+ def __init__(self, parent=None):
+ super(Form, self).__init__(parent)
+ # Create widgets
+ self.edit = QLineEdit("Write my name here")
+ self.button = QPushButton("Show Greetings")
+ # Create layout and add widgets
+ layout = QVBoxLayout()
+ layout.addWidget(self.edit)
+ layout.addWidget(self.button)
+ # Set dialog layout
+ self.setLayout(layout)
+ # Add button signal to greetings slot
+ self.button.clicked.connect(self.greetings)
+
+ # Greets the user
+ def greetings(self):
+ print ("Hello %s" % self.edit.text())
+
+ if __name__ == '__main__':
+ # Create the Qt Application
+ app = QApplication(sys.argv)
+ # Create and show the form
+ form = Form()
+ form.show()
+ # Run the main Qt loop
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons.png b/sources/pyside6/doc/tutorials/basictutorial/icons.png
index 0bcfd7d77..0bcfd7d77 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons/forward.png b/sources/pyside6/doc/tutorials/basictutorial/icons/forward.png
index c7a532dfe..c7a532dfe 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons/forward.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons/forward.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons/pause.png b/sources/pyside6/doc/tutorials/basictutorial/icons/pause.png
index d0beadb43..d0beadb43 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons/pause.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons/pause.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons/play.png b/sources/pyside6/doc/tutorials/basictutorial/icons/play.png
index 345685337..345685337 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons/play.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons/play.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons/previous.png b/sources/pyside6/doc/tutorials/basictutorial/icons/previous.png
index 979f18565..979f18565 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons/previous.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons/previous.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/icons/stop.png b/sources/pyside6/doc/tutorials/basictutorial/icons/stop.png
index 1e88ded3a..1e88ded3a 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/icons/stop.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons/stop.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/player-new.png b/sources/pyside6/doc/tutorials/basictutorial/player-new.png
index e1f660e5f..e1f660e5f 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/player-new.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/player-new.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/player.png b/sources/pyside6/doc/tutorials/basictutorial/player.png
index 3060a990d..3060a990d 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/player.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/player.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/qml.rst b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
new file mode 100644
index 000000000..c972daa00
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
@@ -0,0 +1,67 @@
+Your First Application Using PySide6 and QtQuick/QML
+*****************************************************
+
+QML is a declarative language that lets you develop applications
+faster than with traditional languages. It is ideal for designing the
+UI of your application because of its declarative nature. In QML, a
+user interface is specified as a tree of objects with properties. In
+this tutorial, we will show how to make a simple "Hello World"
+application with PySide6 and QML.
+
+A PySide6/QML application consists, at least, of two different files -
+a file with the QML description of the user interface, and a python file
+that loads the QML file. To make things easier, let's save both files in
+the same directory.
+
+Here is a simple QML file called `view.qml`:
+
+.. code-block:: javascript
+
+ import QtQuick 2.0
+
+ Rectangle {
+ width: 200
+ height: 200
+ color: "green"
+
+ Text {
+ text: "Hello World"
+ anchors.centerIn: parent
+ }
+ }
+
+We start by importing `QtQuick 2.0`, which is a QML module.
+
+The rest of the QML code is pretty straightforward for those who
+have previously used HTML or XML files. Basically, we are creating
+a green rectangle with the size `200*200`, and adding a Text element
+that reads "Hello World". The code `anchors.centerIn: parent` makes
+the text appear centered in relation to its immediate parent, which
+is the Rectangle in this case.
+
+Now, let's see how the code looks on the PySide6.
+Let's call it `main.py`:
+
+.. code-block:: python
+
+ from PySide6.QtWidgets import QApplication
+ from PySide6.QtQuick import QQuickView
+ from PySide6.QtCore import QUrl
+
+ app = QApplication([])
+ view = QQuickView()
+ url = QUrl("view.qml")
+
+ view.setSource(url)
+ view.show()
+ app.exec_()
+
+If you are already familiar with PySide6 and have followed our
+tutorials, you have already seen much of this code.
+The only novelties are that you must `import QtQuick` and set the
+source of the `QQuickView` object to the URL of your QML file.
+Then, as any Qt widget, you call `QQuickView.show()`.
+
+.. note:: If you are programming for desktop, you should consider
+ adding `view.setResizeMode(QQuickView.SizeRootObjectToView)`
+ before showing the view.
diff --git a/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst b/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst
new file mode 100644
index 000000000..5ac560a8f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst
@@ -0,0 +1,169 @@
+Using `.qrc` Files (`pyside6-rcc`)
+**********************************
+
+The `Qt Resource System`_ is a mechanism for storing binary files
+in an application.
+
+The most common uses are for custom images, icons, fonts, among others.
+
+In this tutorial you will learn how to load custom images as button icons.
+
+For inspiration, we will try to adapt the multimedia player example
+from Qt.
+
+As you can see on the following image, the `QPushButton` that are used
+for the media actions (play, pause, stop, and so on) are using the
+default icons meant for such actions.
+
+.. image:: player.png
+ :alt: Multimedia Player Qt Example
+
+You could make the application more attractive by designing the icons,
+but in case you don't want to design them, `download the following set`_
+and use them.
+
+.. image:: icons.png
+ :alt: New Multimedia icons
+
+You can find more information about the `rcc` command, and `.qrc` file
+format, and the resource system in general in the `Qt Resource System`_
+site.
+
+.. _`download the following set`: icons/
+
+
+The `.qrc` file
+================
+
+Before running any command, add information about the resources to a `.qrc`
+file.
+In the following example, notice how the resources are listed in `icons.qrc`
+
+::
+
+ </ui>
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>icons/play.png</file>
+ <file>icons/pause.png</file>
+ <file>icons/stop.png</file>
+ <file>icons/previous.png</file>
+ <file>icons/forward.png</file>
+ </qresource>
+ </RCC>
+
+
+Generating a Python file
+=========================
+
+Now that the `icons.qrc` file is ready, use the `pyside6-rcc` tool to generate
+a Python class containing the binary information about the resources
+
+To do this, we need to run::
+
+ pyside6-rcc icons.rc -o rc_icons.py
+
+The `-o` option lets you specify the output filename,
+which is `rc_icons.py` in this case.
+
+To use the generated file, add the following import at the top of your main Python file::
+
+ import rc_icons
+
+
+Changes in the code
+===================
+
+As you are modifying an existing example, you need to modify the following
+lines:
+
+.. code-block:: python
+
+ from PySide6.QtGui import QIcon, QKeySequence
+ playIcon = self.style().standardIcon(QStyle.SP_MediaPlay)
+ previousIcon = self.style().standardIcon(QStyle.SP_MediaSkipBackward)
+ pauseIcon = self.style().standardIcon(QStyle.SP_MediaPause)
+ nextIcon = self.style().standardIcon(QStyle.SP_MediaSkipForward)
+ stopIcon = self.style().standardIcon(QStyle.SP_MediaStop)
+
+and replace them with the following:
+
+.. code-block:: python
+
+ from PySide6.QtGui import QIcon, QKeySequence, QPixmap
+ playIcon = QIcon(QPixmap(":/icons/play.png"))
+ previousIcon = QIcon(QPixmap(":/icons/previous.png"))
+ pauseIcon = QIcon(QPixmap(":/icons/pause.png"))
+ nextIcon = QIcon(QPixmap(":/icons/forward.png"))
+ stopIcon = QIcon(QPixmap(":/icons/stop.png"))
+
+This ensures that the new icons are used instead of the default ones provided
+by the application theme.
+Notice that the lines are not consecutive, but are in different parts
+of the file.
+
+After all your imports, add the following
+
+.. code-block:: python
+
+ import rc_icons
+
+Now, the constructor of your class should look like this:
+
+.. code-block:: python
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.playlist = QMediaPlaylist()
+ self.player = QMediaPlayer()
+
+ toolBar = QToolBar()
+ self.addToolBar(toolBar)
+
+ fileMenu = self.menuBar().addMenu("&File")
+ openAction = QAction(QIcon.fromTheme("document-open"),
+ "&Open...", self, shortcut=QKeySequence.Open,
+ triggered=self.open)
+ fileMenu.addAction(openAction)
+ exitAction = QAction(QIcon.fromTheme("application-exit"), "E&xit",
+ self, shortcut="Ctrl+Q", triggered=self.close)
+ fileMenu.addAction(exitAction)
+
+ playMenu = self.menuBar().addMenu("&Play")
+ playIcon = QIcon(QPixmap(":/icons/play.png"))
+ self.playAction = toolBar.addAction(playIcon, "Play")
+ self.playAction.triggered.connect(self.player.play)
+ playMenu.addAction(self.playAction)
+
+ previousIcon = QIcon(QPixmap(":/icons/previous.png"))
+ self.previousAction = toolBar.addAction(previousIcon, "Previous")
+ self.previousAction.triggered.connect(self.previousClicked)
+ playMenu.addAction(self.previousAction)
+
+ pauseIcon = QIcon(QPixmap(":/icons/pause.png"))
+ self.pauseAction = toolBar.addAction(pauseIcon, "Pause")
+ self.pauseAction.triggered.connect(self.player.pause)
+ playMenu.addAction(self.pauseAction)
+
+ nextIcon = QIcon(QPixmap(":/icons/forward.png"))
+ self.nextAction = toolBar.addAction(nextIcon, "Next")
+ self.nextAction.triggered.connect(self.playlist.next)
+ playMenu.addAction(self.nextAction)
+
+ stopIcon = QIcon(QPixmap(":/icons/stop.png"))
+ self.stopAction = toolBar.addAction(stopIcon, "Stop")
+ self.stopAction.triggered.connect(self.player.stop)
+ playMenu.addAction(self.stopAction)
+
+ # many lines were omitted
+
+Executing the example
+=====================
+
+Run the application by calling `python main.py` to checkout the new icon-set:
+
+.. image:: player-new.png
+ :alt: New Multimedia Player Qt Example
+
+.. _`Qt Resource System`: https://doc.qt.io/qt-5/resources.html
diff --git a/sources/pyside2/doc/tutorials/basictutorial/style.qss b/sources/pyside6/doc/tutorials/basictutorial/style.qss
index b84b98f05..b84b98f05 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/style.qss
+++ b/sources/pyside6/doc/tutorials/basictutorial/style.qss
diff --git a/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
new file mode 100644
index 000000000..50bb2514c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
@@ -0,0 +1,187 @@
+Using `.ui` files from Designer or QtCreator with `QUiLoader` and `pyside6-uic`
+*******************************************************************************
+
+This page describes the use of Qt Creator to create graphical
+interfaces for your Qt for Python project.
+You will need **Qt Creator** to design and modify your interface (UI file).
+
+If you don't know how to use Qt Creator, refer to the
+`Using Qt Designer <http://doc.qt.io/qtcreator/creator-using-qt-designer.html>`_
+documentation page.
+
+At Qt Creator, create a new Qt Design Form, choose "Main Window" for template.
+And save as `mainwindow.ui`.
+Add a `QPushButton` to the center of the centralwidget.
+
+Your file ``mainwindow.ui`` should look something like this:
+
+.. code-block:: xml
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>80</y>
+ <width>201</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PushButton</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>20</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QToolBar" name="mainToolBar">
+ <attribute name="toolBarArea">
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+ </ui>
+
+Now we are ready to decide how to use the **UI file** from Python.
+
+Option A: Generating a Python class
+===================================
+
+Another option to interact with a **UI file** is to generate a Python
+class from it. This is possible thanks to the `pyside6-uic` tool.
+To use this tool, you need to run the following command on a console::
+
+ pyside6-uic mainwindow.ui > ui_mainwindow.py
+
+We redirect all the output of the command to a file called `ui_mainwindow.py`,
+which will be imported directly::
+
+ from ui_mainwindow import Ui_MainWindow
+
+Now to use it, we should create a personalized class for our widget
+to **setup** this generated design.
+
+To understand the idea, let's take a look at the whole code:
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QMainWindow
+ from PySide6.QtCore import QFile
+ from ui_mainwindow import Ui_MainWindow
+
+ class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ self.ui = Ui_MainWindow()
+ self.ui.setupUi(self)
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.show()
+
+ sys.exit(app.exec_())
+
+What is inside the *if* statement is already known from the previous
+examples, and our new basic class contains only two new lines
+that are in charge of loading the generated python class from the UI
+file:
+
+.. code-block:: python
+
+ self.ui = Ui_MainWindow()
+ self.ui.setupUi(self)
+
+.. note::
+
+ You must run `pyside6-uic` again every time you make changes
+ to the **UI file**.
+
+Option B: Loading it directly
+=============================
+
+To load the UI file directly, we will need a class from the **QtUiTools**
+module:
+
+.. code-block:: python
+
+ from PySide6.QtUiTools import QUiLoader
+
+The `QUiLoader` lets us load the **ui file** dynamically
+and use it right away:
+
+.. code-block:: python
+
+ ui_file = QFile("mainwindow.ui")
+ ui_file.open(QFile.ReadOnly)
+
+ loader = QUiLoader()
+ window = loader.load(ui_file)
+ window.show()
+
+The complete code of this example looks like this:
+
+.. code-block:: python
+
+ # File: main.py
+ import sys
+ from PySide6.QtUiTools import QUiLoader
+ from PySide6.QtWidgets import QApplication
+ from PySide6.QtCore import QFile, QIODevice
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ ui_file_name = "mainwindow.ui"
+ ui_file = QFile(ui_file_name)
+ if not ui_file.open(QIODevice.ReadOnly):
+ print("Cannot open {}: {}".format(ui_file_name, ui_file.errorString()))
+ sys.exit(-1)
+ loader = QUiLoader()
+ window = loader.load(ui_file)
+ ui_file.close()
+ if not window:
+ print(loader.errorString())
+ sys.exit(-1)
+ window.show()
+
+ sys.exit(app.exec_())
+
+Then to execute it we just need to run the following on a
+command prompt:
+
+.. code-block:: python
+
+ python main.py
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgets.rst b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
new file mode 100644
index 000000000..d86ba2623
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
@@ -0,0 +1,45 @@
+Your First QtWidgets Application
+*********************************
+
+As with any other programming framework,
+you start with the traditional "Hello World" program.
+
+Here is a simple example of a Hello World application in PySide6:
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QLabel
+
+ app = QApplication(sys.argv)
+ label = QLabel("Hello World!")
+ label.show()
+ app.exec_()
+
+
+For a widget application using PySide6, you must always start by
+importing the appropriate class from the `PySide6.QtWidgets` module.
+
+After the imports, you create a `QApplication` instance. As Qt can
+receive arguments from command line, you may pass any argument to
+the QApplication object. Usually, you don't need to pass any
+arguments so you can leave it as is, or use the following approach:
+
+.. code-block:: python
+
+ app = QApplication([])
+
+After the creation of the application object, we have created a
+`QLabel` object. A `QLabel` is a widget that can present text
+(simple or rich, like html), and images:
+
+.. code-block:: python
+
+ # This HTML approach will be valid too!
+ label = QLabel("<font color=red size=40>Hello World!</font>")
+
+.. note:: After creating the label, we call `show()` on it.
+
+Finally, we call `app.exec_()` to enter the Qt main loop and start
+to execute the Qt code. In reality, it is only here where the label
+is shown, but this can be ignored for now.
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-no.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png
index c30dd621b..c30dd621b 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-no.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-no.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png
index eb90e216d..eb90e216d 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-no.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-yes.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
index 5a714977e..5a714977e 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-yes.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png
index 8ba49bd26..8ba49bd26 100644
--- a/sources/pyside2/doc/tutorials/basictutorial/widgetstyling-yes.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
new file mode 100644
index 000000000..94e44c5c5
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
@@ -0,0 +1,95 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QListWidget,
+ QListWidgetItem, QPushButton, QVBoxLayout,
+ QWidget)
+
+_placeholder = """
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
+tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
+veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
+commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
+velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
+occaecat cupidatat non proident, sunt in culpa qui officia deserunt
+mollit anim id est laborum
+"""
+
+
+class Widget(QWidget):
+ def __init__(self, parent=None):
+ super(Widget, self).__init__(parent)
+
+ menu_widget = QListWidget()
+ for i in range(10):
+ item = QListWidgetItem("Item {}".format(i))
+ item.setTextAlignment(Qt.AlignCenter)
+ menu_widget.addItem(item)
+
+ text_widget = QLabel(_placeholder)
+ button = QPushButton("Something")
+
+ content_layout = QVBoxLayout()
+ content_layout.addWidget(text_widget)
+ content_layout.addWidget(button)
+ main_widget = QWidget()
+ main_widget.setLayout(content_layout)
+
+ layout = QHBoxLayout()
+ layout.addWidget(menu_widget, 1)
+ layout.addWidget(main_widget, 4)
+ self.setLayout(layout)
+
+
+if __name__ == "__main__":
+ app = QApplication()
+
+ w = Widget()
+ w.show()
+
+ _style = None
+ with open("style.qss", "r") as f:
+ _style = f.read()
+ app.setStyleSheet(_style)
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
new file mode 100644
index 000000000..8deef1d7f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
@@ -0,0 +1,169 @@
+Widget Styling
+**************
+
+Qt Widgets application use a default theme depending on the platform.
+In some cases, there are system-wide configurations that modify the Qt theme,
+and applications are displayed differently.
+
+However, you can take care of your own widgets and provide a custom style
+to each component. As an example, look at the following simple snippet:
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtCore import Qt
+ from PySide6.QtWidgets import QApplication, QLabel
+
+ if __name__ == "__main__":
+ app = QApplication()
+ w = QLabel("This is a placeholder text")
+ w.setAlignment(Qt.AlignCenter)
+ w.show()
+ sys.exit(app.exec_())
+
+When you execute this code, you will see a simple `QLabel` aligned at the
+center, and with a placeholder text.
+
+.. image:: widgetstyling-simple-no.png
+ :alt: Simple Widget with no style
+
+You can style your application using the CSS-like syntax.
+For more information, see `Qt Style Sheets Reference`_.
+
+A `QLabel` can be styled differently by setting some of its CSS
+properties, such as `background-color` and `font-family`,
+so let's see how does the code look like with these changes:
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtCore import Qt
+ from PySide6.QtWidgets import QApplication, QLabel
+
+ if __name__ == "__main__":
+ app = QApplication()
+ w = QLabel("This is a placeholder text")
+ w.setAlignment(Qt.AlignCenter)
+ w.setStyleSheet("""
+ background-color: #262626;
+ color: #FFFFFF;
+ font-family: Titillium;
+ font-size: 18px;
+ """)
+ w.show()
+ sys.exit(app.exec_())
+
+Now when you run the code, notice that the `QLabel` looks different with your
+custom style:
+
+.. image:: widgetstyling-simple-yes.png
+ :alt: Simple Widget with Style
+
+
+.. note::
+
+ If you don't have the font `Titillium` installed, you can try with any
+ other you prefer.
+ Remember you can list your installed fonts using `QFontDatabase`,
+ specifically the `families()` method.
+
+
+Styling each UI element separately like you did in the previous snippet is a
+lot of work. The easier alternative for this is to use Qt Style Sheets,
+which is one or more `.qss` files defining the style for the UI elements in
+your application.
+
+More examples can be found in the `Qt Style Sheet Examples`_ documentation
+page.
+
+
+.. _`Qt Style Sheets Reference`: https://doc.qt.io/qt-5/stylesheet-reference.html
+.. _`Qt Style Sheet Examples`: https://doc.qt.io/qt-5/stylesheet-examples.html
+
+Qt Style Sheets
+===============
+
+.. warning::
+
+ Before starting modifying your application, keep in mind that you will be
+ responsible for all the graphical details of the application.
+ Altering margins, and sizes might end up looking strange or incorrect, so you
+ need to be careful when altering the style.
+ It's recommended to create a full new Qt style to cover all the possible
+ corner cases.
+
+A `qss` file is quite similar to a CSS file, but you need to specify the Widget
+component and optionally the name of the object::
+
+ QLabel {
+ background-color: red;
+ }
+
+ QLabel#title {
+ font-size: 20px;
+ }
+
+The first style defines a `background-color` for all `QLabel` objects in your
+application, whereas the later one styles the `title` object only.
+
+.. note::
+
+ You can set object names with the `setObjectName(str)` function to any Qt
+ object, for example: for a `label = QLabel("Test")`, you can write
+ `label.setObjectName("title")`
+
+
+Once you have a `qss` file for your application, you can apply it by reading
+the file and using the `QApplication.setStyleSheet(str)` function:
+
+.. code-block:: python
+
+ if __name__ == "__main__":
+ app = QApplication()
+
+ w = Widget()
+ w.show()
+
+ with open("style.qss", "r") as f:
+ _style = f.read()
+ app.setStyleSheet(_style)
+
+ sys.exit(app.exec_())
+
+Having a general `qss` file allows you to decouple the styling aspects of
+the code, without mixing it in the middle of the general functionality, and you
+can simply enable it or disable it.
+
+Look at this new example, with more widgets components:
+
+.. literalinclude:: widgetstyling.py
+ :linenos:
+ :lines: 59-81
+
+This displays a two column widget, with a `QListWidget` on the left and a
+`QLabel` and a `QPushButton` on the right. It looks like this when you run the
+code:
+
+.. image:: widgetstyling-no.png
+ :alt: Widget with no style
+
+If you add content to the previously described `style.qss` file, you can modify
+the look-n-feel of the previous example:
+
+.. literalinclude:: style.qss
+ :linenos:
+
+The style changes mainly the color of the different widgets, alter the
+alignment, and includes some spacing.
+You can also use state-based styling on the QListWidget *items* for example, to
+style them differently depending on whether they are *selected* or not.
+
+After applying all the styling alternatives you explored in this topic, notice
+that the `QLabel` example looks a lot different now.
+Try running the code to check its new look:
+
+.. image:: widgetstyling-yes.png
+ :alt: Widget with style
+
+You have the freedom to tune your style sheets and provide a really nice
+look-n-feel to all your applications.
diff --git a/sources/pyside2/doc/tutorials/datavisualize/add_chart.rst b/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst
index 95b2092b3..95b2092b3 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/add_chart.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/add_mainwindow.rst b/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst
index a9ff38a30..a9ff38a30 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/add_mainwindow.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/add_tableview.rst b/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst
index 720918008..720918008 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/add_tableview.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/all_hour.csv b/sources/pyside6/doc/tutorials/datavisualize/all_hour.csv
index 400947c3c..400947c3c 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/all_hour.csv
+++ b/sources/pyside6/doc/tutorials/datavisualize/all_hour.csv
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize.tar.bz2 b/sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2
index 5fe12769a..5fe12769a 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize.tar.bz2
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize1/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py
index 8a8a1dfda..8a8a1dfda 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize1/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py
new file mode 100644
index 000000000..864cb1a6c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import argparse
+import pandas as pd
+
+from PySide6.QtCore import QDateTime, QTimeZone
+
+
+def transform_date(utc, timezone=None):
+ utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
+ new_date = QDateTime().fromString(utc, utc_fmt)
+ if timezone:
+ new_date.setTimeZone(timezone)
+ return new_date
+
+
+def read_data(fname):
+ # Read the CSV content
+ df = pd.read_csv(fname)
+
+ # Remove wrong magnitudes
+ df = df.drop(df[df.mag < 0].index)
+ magnitudes = df["mag"]
+
+ # My local timezone
+ timezone = QTimeZone(b"Europe/Berlin")
+
+ # Get timestamp transformed to our timezone
+ times = df["time"].apply(lambda x: transform_date(x, timezone))
+
+ return times, magnitudes
+
+
+if __name__ == "__main__":
+ options = argparse.ArgumentParser()
+ options.add_argument("-f", "--file", type=str, required=True)
+ args = options.parse_args()
+ data = read_data(args.file)
+ print(data)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py
new file mode 100644
index 000000000..5dac460a5
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import argparse
+import pandas as pd
+
+from PySide6.QtCore import QDateTime, QTimeZone
+from PySide6.QtWidgets import QApplication
+from main_window import MainWindow
+
+
+def transform_date(utc, timezone=None):
+ utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
+ new_date = QDateTime().fromString(utc, utc_fmt)
+ if timezone:
+ new_date.setTimeZone(timezone)
+ return new_date
+
+
+def read_data(fname):
+ # Read the CSV content
+ df = pd.read_csv(fname)
+
+ # Remove wrong magnitudes
+ df = df.drop(df[df.mag < 0].index)
+ magnitudes = df["mag"]
+
+ # My local timezone
+ timezone = QTimeZone(b"Europe/Berlin")
+
+ # Get timestamp transformed to our timezone
+ times = df["time"].apply(lambda x: transform_date(x, timezone))
+
+ return times, magnitudes
+
+
+if __name__ == "__main__":
+ options = argparse.ArgumentParser()
+ options.add_argument("-f", "--file", type=str, required=True)
+ args = options.parse_args()
+ data = read_data(args.file)
+
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.show()
+
+ sys.exit(app.exec_())
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py
new file mode 100644
index 000000000..17fe0e141
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Eartquakes information")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut(QKeySequence.Quit)
+ exit_action.triggered.connect(self.close)
+
+ self.file_menu.addAction(exit_action)
+
+ # Status Bar
+ self.status = self.statusBar()
+ self.status.showMessage("Data loaded and plotted")
+
+ # Window dimensions
+ geometry = qApp.desktop().availableGeometry(self)
+ self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py
new file mode 100644
index 000000000..ffb4d00b0
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py
@@ -0,0 +1,90 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import argparse
+import pandas as pd
+
+from PySide6.QtCore import QDateTime, QTimeZone
+from PySide6.QtWidgets import QApplication
+from main_window import MainWindow
+from main_widget import Widget
+
+
+def transform_date(utc, timezone=None):
+ utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
+ new_date = QDateTime().fromString(utc, utc_fmt)
+ if timezone:
+ new_date.setTimeZone(timezone)
+ return new_date
+
+
+def read_data(fname):
+ # Read the CSV content
+ df = pd.read_csv(fname)
+
+ # Remove wrong magnitudes
+ df = df.drop(df[df.mag < 0].index)
+ magnitudes = df["mag"]
+
+ # My local timezone
+ timezone = QTimeZone(b"Europe/Berlin")
+
+ # Get timestamp transformed to our timezone
+ times = df["time"].apply(lambda x: transform_date(x, timezone))
+
+ return times, magnitudes
+
+
+if __name__ == "__main__":
+ options = argparse.ArgumentParser()
+ options.add_argument("-f", "--file", type=str, required=True)
+ args = options.parse_args()
+ data = read_data(args.file)
+
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ widget = Widget(data)
+ window = MainWindow(widget)
+ window.show()
+
+ sys.exit(app.exec_())
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py
new file mode 100644
index 000000000..5113ae0b8
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtWidgets import (QHBoxLayout, QHeaderView, QSizePolicy,
+ QTableView, QWidget)
+
+from table_model import CustomTableModel
+
+
+class Widget(QWidget):
+ def __init__(self, data):
+ QWidget.__init__(self)
+
+ # Getting the Model
+ self.model = CustomTableModel(data)
+
+ # Creating a QTableView
+ self.table_view = QTableView()
+ self.table_view.setModel(self.model)
+
+ # QTableView Headers
+ self.horizontal_header = self.table_view.horizontalHeader()
+ self.vertical_header = self.table_view.verticalHeader()
+ self.horizontal_header.setSectionResizeMode(
+ QHeaderView.ResizeToContents
+ )
+ self.vertical_header.setSectionResizeMode(
+ QHeaderView.ResizeToContents
+ )
+ self.horizontal_header.setStretchLastSection(True)
+
+ # QWidget Layout
+ self.main_layout = QHBoxLayout()
+ size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
+
+ ## Left layout
+ size.setHorizontalStretch(1)
+ self.table_view.setSizePolicy(size)
+ self.main_layout.addWidget(self.table_view)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.main_layout)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py
new file mode 100644
index 000000000..a60a4a1b1
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Eartquakes information")
+ self.setCentralWidget(widget)
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ ## Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut(QKeySequence.Quit)
+ exit_action.triggered.connect(self.close)
+
+ self.file_menu.addAction(exit_action)
+
+ # Status Bar
+ self.status = self.statusBar()
+ self.status.showMessage("Data loaded and plotted")
+
+ # Window dimensions
+ geometry = qApp.desktop().availableGeometry(self)
+ self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py
new file mode 100644
index 000000000..d9c50acb3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
+from PySide6.QtGui import QColor
+
+
+class CustomTableModel(QAbstractTableModel):
+ def __init__(self, data=None):
+ QAbstractTableModel.__init__(self)
+ self.load_data(data)
+
+ def load_data(self, data):
+ self.input_dates = data[0].values
+ self.input_magnitudes = data[1].values
+
+ self.column_count = 2
+ self.row_count = len(self.input_magnitudes)
+
+ def rowCount(self, parent=QModelIndex()):
+ return self.row_count
+
+ def columnCount(self, parent=QModelIndex()):
+ return self.column_count
+
+ def headerData(self, section, orientation, role):
+ if role != Qt.DisplayRole:
+ return None
+ if orientation == Qt.Horizontal:
+ return ("Date", "Magnitude")[section]
+ else:
+ return "{}".format(section)
+
+ def data(self, index, role=Qt.DisplayRole):
+ column = index.column()
+ row = index.row()
+
+ if role == Qt.DisplayRole:
+ if column == 0:
+ raw_date = self.input_dates[row]
+ date = "{}".format(raw_date.toPython())
+ return date[:-3]
+ elif column == 1:
+ return "{:.2f}".format(self.input_magnitudes[row])
+ elif role == Qt.BackgroundRole:
+ return QColor(Qt.white)
+ elif role == Qt.TextAlignmentRole:
+ return Qt.AlignRight
+
+ return None
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py
new file mode 100644
index 000000000..ffb4d00b0
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py
@@ -0,0 +1,90 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import argparse
+import pandas as pd
+
+from PySide6.QtCore import QDateTime, QTimeZone
+from PySide6.QtWidgets import QApplication
+from main_window import MainWindow
+from main_widget import Widget
+
+
+def transform_date(utc, timezone=None):
+ utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
+ new_date = QDateTime().fromString(utc, utc_fmt)
+ if timezone:
+ new_date.setTimeZone(timezone)
+ return new_date
+
+
+def read_data(fname):
+ # Read the CSV content
+ df = pd.read_csv(fname)
+
+ # Remove wrong magnitudes
+ df = df.drop(df[df.mag < 0].index)
+ magnitudes = df["mag"]
+
+ # My local timezone
+ timezone = QTimeZone(b"Europe/Berlin")
+
+ # Get timestamp transformed to our timezone
+ times = df["time"].apply(lambda x: transform_date(x, timezone))
+
+ return times, magnitudes
+
+
+if __name__ == "__main__":
+ options = argparse.ArgumentParser()
+ options.add_argument("-f", "--file", type=str, required=True)
+ args = options.parse_args()
+ data = read_data(args.file)
+
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ widget = Widget(data)
+ window = MainWindow(widget)
+ window.show()
+
+ sys.exit(app.exec_())
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py
new file mode 100644
index 000000000..0f9b14df3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py
@@ -0,0 +1,91 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import QDateTime, Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
+ QSizePolicy)
+from PySide6.QtCharts import QtCharts
+
+from table_model import CustomTableModel
+
+
+class Widget(QWidget):
+ def __init__(self, data):
+ QWidget.__init__(self)
+
+ # Getting the Model
+ self.model = CustomTableModel(data)
+
+ # Creating a QTableView
+ self.table_view = QTableView()
+ self.table_view.setModel(self.model)
+
+ # QTableView Headers
+ self.horizontal_header = self.table_view.horizontalHeader()
+ self.vertical_header = self.table_view.verticalHeader()
+ self.horizontal_header.setSectionResizeMode(QHeaderView.ResizeToContents)
+ self.vertical_header.setSectionResizeMode(QHeaderView.ResizeToContents)
+ self.horizontal_header.setStretchLastSection(True)
+
+ # Creating QChart
+ self.chart = QtCharts.QChart()
+ self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
+
+ # Creating QChartView
+ self.chart_view = QtCharts.QChartView(self.chart)
+ self.chart_view.setRenderHint(QPainter.Antialiasing)
+
+ # QWidget Layout
+ self.main_layout = QHBoxLayout()
+ size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
+
+ ## Left layout
+ size.setHorizontalStretch(1)
+ self.table_view.setSizePolicy(size)
+ self.main_layout.addWidget(self.table_view)
+
+ ## Right Layout
+ size.setHorizontalStretch(4)
+ self.chart_view.setSizePolicy(size)
+ self.main_layout.addWidget(self.chart_view)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.main_layout)
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py
new file mode 100644
index 000000000..4b0920133
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Eartquakes information")
+ self.setCentralWidget(widget)
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut(QKeySequence.Quit)
+ exit_action.triggered.connect(self.close)
+
+ self.file_menu.addAction(exit_action)
+
+ # Status Bar
+ self.status = self.statusBar()
+ self.status.showMessage("Data loaded and plotted")
+
+ # Window dimensions
+ geometry = qApp.desktop().availableGeometry(self)
+ self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py
new file mode 100644
index 000000000..d9c50acb3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
+from PySide6.QtGui import QColor
+
+
+class CustomTableModel(QAbstractTableModel):
+ def __init__(self, data=None):
+ QAbstractTableModel.__init__(self)
+ self.load_data(data)
+
+ def load_data(self, data):
+ self.input_dates = data[0].values
+ self.input_magnitudes = data[1].values
+
+ self.column_count = 2
+ self.row_count = len(self.input_magnitudes)
+
+ def rowCount(self, parent=QModelIndex()):
+ return self.row_count
+
+ def columnCount(self, parent=QModelIndex()):
+ return self.column_count
+
+ def headerData(self, section, orientation, role):
+ if role != Qt.DisplayRole:
+ return None
+ if orientation == Qt.Horizontal:
+ return ("Date", "Magnitude")[section]
+ else:
+ return "{}".format(section)
+
+ def data(self, index, role=Qt.DisplayRole):
+ column = index.column()
+ row = index.row()
+
+ if role == Qt.DisplayRole:
+ if column == 0:
+ raw_date = self.input_dates[row]
+ date = "{}".format(raw_date.toPython())
+ return date[:-3]
+ elif column == 1:
+ return "{:.2f}".format(self.input_magnitudes[row])
+ elif role == Qt.BackgroundRole:
+ return QColor(Qt.white)
+ elif role == Qt.TextAlignmentRole:
+ return Qt.AlignRight
+
+ return None
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py
new file mode 100644
index 000000000..3402ff856
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import argparse
+import pandas as pd
+
+from PySide6.QtCore import QDateTime, QTimeZone
+from PySide6.QtWidgets import QApplication
+
+from main_window import MainWindow
+from main_widget import Widget
+
+
+def transform_date(utc, timezone=None):
+ utc_fmt = "yyyy-MM-ddTHH:mm:ss.zzzZ"
+ new_date = QDateTime().fromString(utc, utc_fmt)
+ if timezone:
+ new_date.setTimeZone(timezone)
+ return new_date
+
+
+def read_data(fname):
+ # Read the CSV content
+ df = pd.read_csv(fname)
+
+ # Remove wrong magnitudes
+ df = df.drop(df[df.mag < 0].index)
+ magnitudes = df["mag"]
+
+ # My local timezone
+ timezone = QTimeZone(b"Europe/Berlin")
+
+ # Get timestamp transformed to our timezone
+ times = df["time"].apply(lambda x: transform_date(x, timezone))
+
+ return times, magnitudes
+
+
+if __name__ == "__main__":
+ options = argparse.ArgumentParser()
+ options.add_argument("-f", "--file", type=str, required=True)
+ args = options.parse_args()
+ data = read_data(args.file)
+
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ # QWidget
+ widget = Widget(data)
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+
+ window.show()
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py
new file mode 100644
index 000000000..2934a361f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py
@@ -0,0 +1,131 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import QDateTime, Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
+ QSizePolicy)
+from PySide6.QtCharts import QtCharts
+
+from table_model import CustomTableModel
+
+
+class Widget(QWidget):
+ def __init__(self, data):
+ QWidget.__init__(self)
+
+ # Getting the Model
+ self.model = CustomTableModel(data)
+
+ # Creating a QTableView
+ self.table_view = QTableView()
+ self.table_view.setModel(self.model)
+
+ # QTableView Headers
+ resize = QHeaderView.ResizeToContents
+ self.horizontal_header = self.table_view.horizontalHeader()
+ self.vertical_header = self.table_view.verticalHeader()
+ self.horizontal_header.setSectionResizeMode(resize)
+ self.vertical_header.setSectionResizeMode(resize)
+ self.horizontal_header.setStretchLastSection(True)
+
+ # Creating QChart
+ self.chart = QtCharts.QChart()
+ self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
+ self.add_series("Magnitude (Column 1)", [0, 1])
+
+ # Creating QChartView
+ self.chart_view = QtCharts.QChartView(self.chart)
+ self.chart_view.setRenderHint(QPainter.Antialiasing)
+
+ # QWidget Layout
+ self.main_layout = QHBoxLayout()
+ size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
+
+ # Left layout
+ size.setHorizontalStretch(1)
+ self.table_view.setSizePolicy(size)
+ self.main_layout.addWidget(self.table_view)
+
+ # Right Layout
+ size.setHorizontalStretch(4)
+ self.chart_view.setSizePolicy(size)
+ self.main_layout.addWidget(self.chart_view)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.main_layout)
+
+ def add_series(self, name, columns):
+ # Create QLineSeries
+ self.series = QtCharts.QLineSeries()
+ self.series.setName(name)
+
+ # Filling QLineSeries
+ for i in range(self.model.rowCount()):
+ # Getting the data
+ t = self.model.index(i, 0).data()
+ date_fmt = "yyyy-MM-dd HH:mm:ss.zzz"
+
+ x = QDateTime().fromString(t, date_fmt).toSecsSinceEpoch()
+ y = float(self.model.index(i, 1).data())
+
+ if x > 0 and y > 0:
+ self.series.append(x, y)
+
+ self.chart.addSeries(self.series)
+
+ # Setting X-axis
+ self.axis_x = QtCharts.QDateTimeAxis()
+ self.axis_x.setTickCount(10)
+ self.axis_x.setFormat("dd.MM (h:mm)")
+ self.axis_x.setTitleText("Date")
+ self.chart.addAxis(self.axis_x, Qt.AlignBottom)
+ self.series.attachAxis(self.axis_x)
+ # Setting Y-axis
+ self.axis_y = QtCharts.QValueAxis()
+ self.axis_y.setTickCount(10)
+ self.axis_y.setLabelFormat("%.2f")
+ self.axis_y.setTitleText("Magnitude")
+ self.chart.addAxis(self.axis_y, Qt.AlignLeft)
+ self.series.attachAxis(self.axis_y)
+
+ # Getting the color from the QChart to use it on the QTableView
+ self.model.color = "{}".format(self.series.pen().color().name())
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py
new file mode 100644
index 000000000..450f6de41
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py
@@ -0,0 +1,70 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Eartquakes information")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut(QKeySequence.Quit)
+ exit_action.triggered.connect(self.close)
+
+ self.file_menu.addAction(exit_action)
+
+ # Status Bar
+ self.status = self.statusBar()
+ self.status.showMessage("Data loaded and plotted")
+
+ # Window dimensions
+ geometry = qApp.desktop().availableGeometry(self)
+ self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
+ self.setCentralWidget(widget)
+
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py
new file mode 100644
index 000000000..abe3bf2ae
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
+from PySide6.QtGui import QColor
+
+
+class CustomTableModel(QAbstractTableModel):
+ def __init__(self, data=None):
+ QAbstractTableModel.__init__(self)
+ self.color = None
+ self.load_data(data)
+
+ def load_data(self, data):
+ self.input_dates = data[0].values
+ self.input_magnitudes = data[1].values
+
+ self.column_count = 2
+ self.row_count = len(self.input_magnitudes)
+
+ def rowCount(self, parent=QModelIndex()):
+ return self.row_count
+
+ def columnCount(self, parent=QModelIndex()):
+ return self.column_count
+
+ def headerData(self, section, orientation, role):
+ if role != Qt.DisplayRole:
+ return None
+ if orientation == Qt.Horizontal:
+ return ("Date", "Magnitude")[section]
+ else:
+ return "{}".format(section)
+
+ def data(self, index, role=Qt.DisplayRole):
+ column = index.column()
+ row = index.row()
+
+ if role == Qt.DisplayRole:
+ if column == 0:
+ raw_date = self.input_dates[row]
+ date = "{}".format(raw_date.toPython())
+ return date[:-3]
+ elif column == 1:
+ return "{:.2f}".format(self.input_magnitudes[row])
+ elif role == Qt.BackgroundRole:
+ return (QColor(Qt.white), QColor(self.color))[column]
+ elif role == Qt.TextAlignmentRole:
+ return Qt.AlignRight
+
+ return None
diff --git a/sources/pyside2/doc/tutorials/datavisualize/filter_data.rst b/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst
index b06b2fa15..b06b2fa15 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/filter_data.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/images/QMainWindow-layout.png b/sources/pyside6/doc/tutorials/datavisualize/images/QMainWindow-layout.png
index 075d796b8..075d796b8 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/images/QMainWindow-layout.png
+++ b/sources/pyside6/doc/tutorials/datavisualize/images/QMainWindow-layout.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/datavisualize/images/datavisualization_app.png b/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png
index ddac43fc3..ddac43fc3 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/images/datavisualization_app.png
+++ b/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/datavisualize/index.rst b/sources/pyside6/doc/tutorials/datavisualize/index.rst
index ff18c654e..ff18c654e 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/index.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/index.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/plot_datapoints.rst b/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst
index 8ebdd2b08..8ebdd2b08 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/plot_datapoints.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst
diff --git a/sources/pyside2/doc/tutorials/datavisualize/read_data.rst b/sources/pyside6/doc/tutorials/datavisualize/read_data.rst
index f7bf9337a..f7bf9337a 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/read_data.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/read_data.rst
diff --git a/sources/pyside6/doc/tutorials/expenses/expenses.rst b/sources/pyside6/doc/tutorials/expenses/expenses.rst
new file mode 100644
index 000000000..2aa3fb459
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/expenses.rst
@@ -0,0 +1,314 @@
+######################
+Expenses Tool Tutorial
+######################
+
+In this tutorial you will learn the following concepts:
+ * creating user interfaces programatically,
+ * layouts and widgets,
+ * overloading Qt classes,
+ * connecting signal and slots,
+ * interacting with QWidgets,
+ * and building your own application.
+
+The requirements:
+ * A simple window for the application
+ (`QMainWindow <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QMainWindow.html>`_).
+ * A table to keep track of the expenses
+ (`QTableWidget <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QTableWidget.html>`_).
+ * Two input fields to add expense information
+ (`QLineEdit <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QLineEdit.html>`_).
+ * Buttons to add information to the table, plot data, clear table, and exit the application
+ (`QPushButton <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QPushButton.html>`_).
+ * A verification step to avoid invalid data entry.
+ * A chart to visualize the expense data
+ (`QChart <https://doc.qt.io/qtforpython/PySide6/QtCharts/QtCharts.QChart.html>`_) that will
+ be embedded in a chart view
+ (`QChartView <https://doc.qt.io/qtforpython/PySide6/QtCharts/QtCharts.QChartView.html>`_).
+
+Empty window
+------------
+
+The base structure for a `QApplication` is located inside the `if __name__ == "__main__":`
+code block.
+
+.. code-block:: python
+ :linenos:
+
+ if __name__ == "__main__":
+ app = QApplication([])
+ # ...
+ sys.exit(app.exec_())
+
+Now, to start the development, create an empty window called `MainWindow`.
+You could do that by defining a class that inherits from `QMainWindow`.
+
+.. literalinclude:: steps/01-expenses.py
+ :linenos:
+ :lines: 45-59
+ :emphasize-lines: 1-4
+
+Now that our class is defined, create an instance of it and call `show()`.
+
+.. literalinclude:: steps/01-expenses.py
+ :linenos:
+ :lines: 45-59
+ :emphasize-lines: 10-12
+
+Menu bar
+--------
+
+Using a `QMainWindow` gives some features for free, among them a *menu bar*. To use it, you need
+to call the method `menuBar()` and populate it inside the `MainWindow` class.
+
+.. literalinclude:: steps/02-expenses.py
+ :linenos:
+ :lines: 46-58
+ :emphasize-lines: 6
+
+Notice that the code snippet adds a *File* menu with the *Exit* option only.
+
+First signal/slot connection
+----------------------------
+
+The *Exit* option must be connected to a slot that triggers the application to exit. The main
+idea to achieve this, is the following:
+
+.. code-block:: python
+
+ element.signal_name.connect(slot_name)
+
+All the interface's elements could be connected through signals to certain slots,
+in the case of a `QAction`, the signal `triggered` can be used:
+
+.. code-block:: python
+
+ exit_action.triggered.connect(slot_name)
+
+.. note:: Now a *slot* needs to be defined to exit the application, which can be done using
+ `QApplication.quit()`. If we put all these concepts together you will end up with the
+ following code:
+
+.. literalinclude:: steps/03-expenses.py
+ :linenos:
+ :lines: 56-65
+ :emphasize-lines: 4, 8-10
+
+Notice that the decorator `@Slot()` is required for each slot you declare to properly
+register them. Slots are normal functions, but the main difference is that they
+will be invokable from `Signals` of QObjects when connected.
+
+Empty widget and data
+---------------------
+
+The `QMainWindow` enables us to set a central widget that will be displayed when showing the window
+(`read more <https://doc.qt.io/qt-5/qmainwindow.html#details>`_).
+This central widget could be another class derived from `QWidget`.
+
+Additionally, you will define example data to visualize later.
+
+.. literalinclude:: steps/04-expenses.py
+ :linenos:
+ :lines: 46-53
+
+With the `Widget` class in place, modify `MainWindow`'s initialization code
+
+.. literalinclude:: steps/04-expenses.py
+ :linenos:
+ :lines: 80-84
+
+Window layout
+-------------
+
+Now that the main empty window is in place, you need to start adding widgets to achieve the main
+goal of creating an expenses application.
+
+After declaring the example data, you can visualize it on a simple `QTableWidget`. To do so, you
+will add this procedure to the `Widget` constructor.
+
+.. warning:: Only for the example purpose a QTableWidget will be used,
+ but for more performance-critical applications the combination
+ of a model and a QTableView is encouraged.
+
+.. literalinclude:: steps/05-expenses.py
+ :linenos:
+ :lines: 48-73
+
+As you can see, the code also includes a `QHBoxLayout` that provides the container to place widgets
+horizontally.
+
+Additionally, the `QTableWidget` allows for customizing it, like adding the labels for the two
+columns that will be used, and to *stretch* the content to use the whole `Widget` space.
+
+The last line of code refers to *filling the table**, and the code to perform that task is
+displayed below.
+
+.. literalinclude:: steps/05-expenses.py
+ :linenos:
+ :lines: 75-81
+
+Having this process on a separate method is a good practice to leave the constructor more readable,
+and to split the main functions of the class in independent processes.
+
+
+Right side layout
+-----------------
+
+Because the data that is being used is just an example, you are required to include a mechanism to
+input items to the table, and extra buttons to clear the table's content, and also quit the
+application.
+
+To distribute these input lines and buttons, you will use a `QVBoxLayout` that allows you to place
+elements vertically inside a layout.
+
+.. literalinclude:: steps/06-expenses.py
+ :linenos:
+ :lines: 64-80
+
+Leaving the table on the left side and these newly included widgets to the right side
+will be just a matter to add a layout to our main `QHBoxLayout` as you saw in the previous
+example:
+
+.. literalinclude:: steps/06-expenses.py
+ :linenos:
+ :lines: 42-47
+
+The next step will be connecting those new buttons to slots.
+
+
+Adding elements
+---------------
+
+Each `QPushButton` have a signal called *clicked*, that is emitted when you click on the button.
+This will be more than enough for this example, but you can see other signals in the `official
+documentation <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QAbstractButton.html#signals>`_.
+
+.. literalinclude:: steps/07-expenses.py
+ :linenos:
+ :lines: 92-95
+
+As you can see on the previous lines, we are connecting each *clicked* signal to different slots.
+In this example slots are normal class methods in charge of perform a determined task associated
+with our buttons. It is really important to decorate each method declaration with a `@Slot()`, in
+that way PySide6 knows internally how to register them into Qt.
+
+.. literalinclude:: steps/07-expenses.py
+ :linenos:
+ :lines: 100-129
+ :emphasize-lines: 2,16,28
+
+Since these slots are methods, we can access the class variables, like our `QTableWidget` to
+interact with it.
+
+The mechanism to add elements into the table is described as the following:
+
+ * get the *description* and *price* from the fields,
+ * insert a new empty row to the table,
+ * set the values for the empty row in each column,
+ * clear the input text fields,
+ * include the global count of table rows.
+
+To exit the application you can use the `quit()` method of the unique `QApplication` instance, and
+to clear the content of the table you can just set the table *row count*, and the internal count to
+zero.
+
+Verification step
+-----------------
+
+Adding information to the table needs to be a critical action that require a verification step
+to avoid adding invalid information, for example, empty information.
+
+You can use a signal from `QLineEdit` called *textChanged[str]* which will be emitted every
+time something inside changes, i.e.: each key stroke.
+Notice that this time, there is a *[str]* section on the signal, this means that the signal
+will also emit the value of the text that was changed, which will be really useful to verify
+the current content of the `QLineEdit`.
+
+You can connect two different object's signal to the same slot, and this will be the case
+for your current application:
+
+.. literalinclude:: steps/08-expenses.py
+ :linenos:
+ :lines: 99-100
+
+The content of the *check_disable* slot will be really simple:
+
+.. literalinclude:: steps/08-expenses.py
+ :linenos:
+ :lines: 119-124
+
+You have two options, write a verification based on the current value
+of the string you retrieve, or manually get the whole content of both
+`QLineEdit`. The second is preferred in this case, so you can verify
+if the two inputs are not empty to enable the button *Add*.
+
+.. note:: Qt also provides a special class called
+ `QValidator <https://doc.qt.io/qtforpython/PySide6/QtGui/QValidator.html?highlight=qvalidator>`_
+ that you can use to validate any input.
+
+Empty chart view
+----------------
+
+New items can be added to the table, and the visualization is so far
+OK, but you can accomplish more by representing the data graphically.
+
+First you will include an empty `QChartView` placeholder into the right
+side of your application.
+
+.. literalinclude:: steps/09-expenses.py
+ :linenos:
+ :lines: 66-68
+
+Additionally the order of how you include widgets to the right
+`QVBoxLayout` will also change.
+
+.. literalinclude:: steps/09-expenses.py
+ :linenos:
+ :lines: 81-91
+ :emphasize-lines: 9
+
+Notice that before we had a line with `self.right.addStretch()`
+to fill up the vertical space between the *Add* and the *Clear* buttons,
+but now, with the `QChartView` it will not be necessary.
+
+Also, you need include a *Plot* button if you want to do it on-demand.
+
+Full application
+----------------
+
+For the final step, you will need to connect the *Plot* button
+to a slot that creates a chart and includes it into your `QChartView`.
+
+.. literalinclude:: steps/10-expenses.py
+ :linenos:
+ :lines: 103-109
+ :emphasize-lines: 6
+
+That is nothing new, since you already did it for the other buttons,
+but now take a look at how to create a chart and include it into
+your `QChartView`.
+
+.. literalinclude:: steps/10-expenses.py
+ :linenos:
+ :lines: 139-151
+
+The following steps show how to fill a `QPieSeries`:
+
+ * create a `QPieSeries`,
+ * iterate over the table row IDs,
+ * get the items at the *i* position,
+ * add those values to the *series*.
+
+Once the series has been populated with our data, you create a new `QChart`,
+add the series on it, and optionally set an alignment for the legend.
+
+The final line `self.chart_view.setChart(chart)` is in charge of bringing
+your newly created chart to the `QChartView`.
+
+The application will look like this:
+
+.. image:: expenses_tool.png
+
+And now you can see the whole code:
+
+.. literalinclude:: main.py
+ :linenos:
diff --git a/sources/pyside2/doc/tutorials/expenses/expenses_tool.png b/sources/pyside6/doc/tutorials/expenses/expenses_tool.png
index 7a6f6d1f0..7a6f6d1f0 100644
--- a/sources/pyside2/doc/tutorials/expenses/expenses_tool.png
+++ b/sources/pyside6/doc/tutorials/expenses/expenses_tool.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/expenses/main.py b/sources/pyside6/doc/tutorials/expenses/main.py
new file mode 100644
index 000000000..2eec5defb
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/main.py
@@ -0,0 +1,207 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QPainter
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+from PySide6.QtCharts import QtCharts
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Chart
+ self.chart_view = QtCharts.QChartView()
+ self.chart_view.setRenderHint(QPainter.Antialiasing)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+ self.plot = QPushButton("Plot")
+
+ # Disabling 'Add' button
+ self.add.setEnabled(False)
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addWidget(self.plot)
+ self.right.addWidget(self.chart_view)
+ self.right.addWidget(self.clear)
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.plot.clicked.connect(self.plot_data)
+ self.clear.clicked.connect(self.clear_table)
+ self.description.textChanged[str].connect(self.check_disable)
+ self.price.textChanged[str].connect(self.check_disable)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text()
+ price = self.price.text()
+
+ self.table.insertRow(self.items)
+ description_item = QTableWidgetItem(des)
+ price_item = QTableWidgetItem("{:.2f}".format(float(price)))
+ price_item.setTextAlignment(Qt.AlignRight)
+
+ self.table.setItem(self.items, 0, description_item)
+ self.table.setItem(self.items, 1, price_item)
+
+ self.description.setText("")
+ self.price.setText("")
+
+ self.items += 1
+
+ @Slot()
+ def check_disable(self, s):
+ if not self.description.text() or not self.price.text():
+ self.add.setEnabled(False)
+ else:
+ self.add.setEnabled(True)
+
+ @Slot()
+ def plot_data(self):
+ # Get table information
+ series = QtCharts.QPieSeries()
+ for i in range(self.table.rowCount()):
+ text = self.table.item(i, 0).text()
+ number = float(self.table.item(i, 1).text())
+ series.append(text, number)
+
+ chart = QtCharts.QChart()
+ chart.addSeries(series)
+ chart.legend().setAlignment(Qt.AlignLeft)
+ self.chart_view.setChart(chart)
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ description_item = QTableWidgetItem(desc)
+ price_item = QTableWidgetItem("{:.2f}".format(price))
+ price_item.setTextAlignment(Qt.AlignRight)
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, description_item)
+ self.table.setItem(self.items, 1, price_item)
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.setRowCount(0)
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py b/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py
new file mode 100644
index 000000000..cea2f5767
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py
@@ -0,0 +1,210 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import QMargins, Qt, Slot, QSize
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+from PySide6.QtCharts import QtCharts
+
+from __feature__ import snake_case, true_property
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.column_count = 2
+ self.table.horizontal_header_labels = ["Description", "Price"]
+ self.table.horizontal_header().section_resize_mode = QHeaderView.Stretch
+
+ # Chart
+ self.chart_view = QtCharts.QChartView()
+ self.chart_view.render_hint = QPainter.Antialiasing
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+ self.plot = QPushButton("Plot")
+
+ # Disabling 'Add' button
+ self.add.enabled = False
+
+ self.right = QVBoxLayout()
+
+ self.right.contents_margins = QMargins(10, 10, 10, 10)
+ self.right.add_widget(QLabel("Description"))
+ self.right.add_widget(self.description)
+ self.right.add_widget(QLabel("Price"))
+ self.right.add_widget(self.price)
+ self.right.add_widget(self.add)
+ self.right.add_widget(self.plot)
+ self.right.add_widget(self.chart_view)
+ self.right.add_widget(self.clear)
+ self.right.add_widget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.add_widget(self.table)
+ self.layout.add_layout(self.right)
+
+ # Set the layout to the QWidget
+ self.set_layout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.plot.clicked.connect(self.plot_data)
+ self.clear.clicked.connect(self.clear_table)
+ self.description.textChanged[str].connect(self.check_disable)
+ self.price.textChanged[str].connect(self.check_disable)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text
+ price = self.price.text
+
+ self.table.insert_row(self.items)
+ description_item = QTableWidgetItem(des)
+ price_item = QTableWidgetItem("{:.2f}".format(float(price)))
+ price_item.text_alignment = Qt.AlignRight
+
+ self.table.set_item(self.items, 0, description_item)
+ self.table.set_item(self.items, 1, price_item)
+
+ self.description.text = ""
+ self.price.text = ""
+
+ self.items += 1
+
+ @Slot()
+ def check_disable(self, s):
+ if not self.description.text or not self.price.text:
+ self.add.enabled = False
+ else:
+ self.add.enabled = True
+
+ @Slot()
+ def plot_data(self):
+ # Get table information
+ series = QtCharts.QPieSeries()
+ for i in range(self.table.row_count):
+ text = self.table.item(i, 0).text()
+ number = float(self.table.item(i, 1).text())
+ series.append(text, number)
+
+ chart = QtCharts.QChart()
+ chart.add_series(series)
+ chart.legend().alignment = Qt.AlignLeft
+ self.chart_view.set_chart(chart)
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ description_item = QTableWidgetItem(desc)
+ price_item = QTableWidgetItem("{:.2f}".format(price))
+ price_item.text_alignment = Qt.AlignRight
+ self.table.insert_row(self.items)
+ self.table.set_item(self.items, 0, description_item)
+ self.table.set_item(self.items, 1, price_item)
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.row_count = 0
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.window_title = "Tutorial"
+
+ # Menu
+ self.menu = self.menu_bar()
+ self.file_menu = self.menu.add_menu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.shortcut = "Ctrl+Q"
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.add_action(exit_action)
+ self.set_central_widget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.size = QSize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py
new file mode 100644
index 000000000..efbbc59fc
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtWidgets import QApplication, QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py
new file mode 100644
index 000000000..783283d4f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py
@@ -0,0 +1,71 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QApplication, QMainWindow
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+
+ self.file_menu.addAction(exit_action)
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py
new file mode 100644
index 000000000..bebf0b3ce
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCharts import QtCharts
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py
new file mode 100644
index 000000000..a9a4c10a1
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py
@@ -0,0 +1,90 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QApplication, QMainWindow, QWidget
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py
new file mode 100644
index 000000000..3b22c2631
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py
@@ -0,0 +1,118 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QMainWindow,
+ QTableWidget, QTableWidgetItem, QWidget)
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Fill example data
+ self.fill_table()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(desc))
+ self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
+ self.items += 1
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py
new file mode 100644
index 000000000..5e6bcc0e9
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py
@@ -0,0 +1,138 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addStretch()
+ self.right.addWidget(self.clear)
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Fill example data
+ self.fill_table()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(desc))
+ self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
+ self.items += 1
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py
new file mode 100644
index 000000000..aa7ee6a3a
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py
@@ -0,0 +1,165 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addStretch()
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.clear.clicked.connect(self.clear_table)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text()
+ price = self.price.text()
+
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(des))
+ self.table.setItem(self.items, 1, QTableWidgetItem(price))
+
+ self.description.setText("")
+ self.price.setText("")
+
+ self.items += 1
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(desc))
+ self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.setRowCount(0)
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py
new file mode 100644
index 000000000..0c5eb7c61
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py
@@ -0,0 +1,178 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+
+ # Disabling 'Add' button
+ self.add.setEnabled(False)
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addStretch()
+ self.right.addWidget(self.clear)
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.clear.clicked.connect(self.clear_table)
+ self.description.textChanged[str].connect(self.check_disable)
+ self.price.textChanged[str].connect(self.check_disable)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text()
+ price = self.price.text()
+
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(des))
+ self.table.setItem(self.items, 1, QTableWidgetItem(price))
+
+ self.description.setText("")
+ self.price.setText("")
+
+ self.items += 1
+
+ @Slot()
+ def check_disable(self, s):
+ if not self.description.text() or not self.price.text():
+ self.add.setEnabled(False)
+ else:
+ self.add.setEnabled(True)
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(desc))
+ self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.setRowCount(0)
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py
new file mode 100644
index 000000000..30e1d7f3f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py
@@ -0,0 +1,185 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Slot
+from PySide6.QtGui import QAction, QPainter
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+from PySide6.QtCharts import QtCharts
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Chart
+ self.chart_view = QtCharts.QChartView()
+ self.chart_view.setRenderHint(QPainter.Antialiasing)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+ self.plot = QPushButton("Plot")
+
+ # Disabling 'Add' button
+ self.add.setEnabled(False)
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addWidget(self.plot)
+ self.right.addWidget(self.chart_view)
+ self.right.addWidget(self.clear)
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.clear.clicked.connect(self.clear_table)
+ self.description.textChanged[str].connect(self.check_disable)
+ self.price.textChanged[str].connect(self.check_disable)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text()
+ price = self.price.text()
+
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(des))
+ self.table.setItem(self.items, 1, QTableWidgetItem(price))
+
+ self.description.setText("")
+ self.price.setText("")
+
+ self.items += 1
+
+ @Slot()
+ def check_disable(self, s):
+ if not self.description.text() or not self.price.text():
+ self.add.setEnabled(False)
+ else:
+ self.add.setEnabled(True)
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, QTableWidgetItem(desc))
+ self.table.setItem(self.items, 1, QTableWidgetItem(str(price)))
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.setRowCount(0)
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py
new file mode 100644
index 000000000..2329805a7
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py
@@ -0,0 +1,207 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QPainter
+from PySide6.QtWidgets import (QQApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+ QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+ QVBoxLayout, QWidget)
+from PySide6.QtCharts import QtCharts
+
+
+class Widget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.items = 0
+
+ # Example data
+ self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
+ "Supermarket": 230.4, "Internet": 29.99, "Bars": 21.85,
+ "Public transportation": 60.0, "Coffee": 22.45, "Restaurants": 120}
+
+ # Left
+ self.table = QTableWidget()
+ self.table.setColumnCount(2)
+ self.table.setHorizontalHeaderLabels(["Description", "Price"])
+ self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+
+ # Chart
+ self.chart_view = QtCharts.QChartView()
+ self.chart_view.setRenderHint(QPainter.Antialiasing)
+
+ # Right
+ self.description = QLineEdit()
+ self.price = QLineEdit()
+ self.add = QPushButton("Add")
+ self.clear = QPushButton("Clear")
+ self.quit = QPushButton("Quit")
+ self.plot = QPushButton("Plot")
+
+ # Disabling 'Add' button
+ self.add.setEnabled(False)
+
+ self.right = QVBoxLayout()
+ self.right.setMargin(10)
+ self.right.addWidget(QLabel("Description"))
+ self.right.addWidget(self.description)
+ self.right.addWidget(QLabel("Price"))
+ self.right.addWidget(self.price)
+ self.right.addWidget(self.add)
+ self.right.addWidget(self.plot)
+ self.right.addWidget(self.chart_view)
+ self.right.addWidget(self.clear)
+ self.right.addWidget(self.quit)
+
+ # QWidget Layout
+ self.layout = QHBoxLayout()
+
+ #self.table_view.setSizePolicy(size)
+ self.layout.addWidget(self.table)
+ self.layout.addLayout(self.right)
+
+ # Set the layout to the QWidget
+ self.setLayout(self.layout)
+
+ # Signals and Slots
+ self.add.clicked.connect(self.add_element)
+ self.quit.clicked.connect(self.quit_application)
+ self.plot.clicked.connect(self.plot_data)
+ self.clear.clicked.connect(self.clear_table)
+ self.description.textChanged[str].connect(self.check_disable)
+ self.price.textChanged[str].connect(self.check_disable)
+
+ # Fill example data
+ self.fill_table()
+
+ @Slot()
+ def add_element(self):
+ des = self.description.text()
+ price = self.price.text()
+
+ self.table.insertRow(self.items)
+ description_item = QTableWidgetItem(des)
+ price_item = QTableWidgetItem("{:.2f}".format(float(price)))
+ price_item.setTextAlignment(Qt.AlignRight)
+
+ self.table.setItem(self.items, 0, description_item)
+ self.table.setItem(self.items, 1, price_item)
+
+ self.description.setText("")
+ self.price.setText("")
+
+ self.items += 1
+
+ @Slot()
+ def check_disable(self, s):
+ if not self.description.text() or not self.price.text():
+ self.add.setEnabled(False)
+ else:
+ self.add.setEnabled(True)
+
+ @Slot()
+ def plot_data(self):
+ # Get table information
+ series = QtCharts.QPieSeries()
+ for i in range(self.table.rowCount()):
+ text = self.table.item(i, 0).text()
+ number = float(self.table.item(i, 1).text())
+ series.append(text, number)
+
+ chart = QtCharts.QChart()
+ chart.addSeries(series)
+ chart.legend().setAlignment(Qt.AlignLeft)
+ self.chart_view.setChart(chart)
+
+ @Slot()
+ def quit_application(self):
+ QApplication.quit()
+
+ def fill_table(self, data=None):
+ data = self._data if not data else data
+ for desc, price in data.items():
+ description_item = QTableWidgetItem(desc)
+ price_item = QTableWidgetItem("{:.2f}".format(price))
+ price_item.setTextAlignment(Qt.AlignRight)
+ self.table.insertRow(self.items)
+ self.table.setItem(self.items, 0, description_item)
+ self.table.setItem(self.items, 1, price_item)
+ self.items += 1
+
+ @Slot()
+ def clear_table(self):
+ self.table.setRowCount(0)
+ self.items = 0
+
+
+class MainWindow(QMainWindow):
+ def __init__(self, widget):
+ QMainWindow.__init__(self)
+ self.setWindowTitle("Tutorial")
+
+ # Menu
+ self.menu = self.menuBar()
+ self.file_menu = self.menu.addMenu("File")
+
+ # Exit QAction
+ exit_action = QAction("Exit", self)
+ exit_action.setShortcut("Ctrl+Q")
+ exit_action.triggered.connect(self.exit_app)
+
+ self.file_menu.addAction(exit_action)
+ self.setCentralWidget(widget)
+
+ @Slot()
+ def exit_app(self, checked):
+ QApplication.quit()
+
+
+if __name__ == "__main__":
+ # Qt Application
+ app = QApplication(sys.argv)
+ # QWidget
+ widget = Widget()
+ # QMainWindow using QWidget as central widget
+ window = MainWindow(widget)
+ window.resize(800, 600)
+ window.show()
+
+ # Execute application
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/index.rst b/sources/pyside6/doc/tutorials/index.rst
index a159725a7..a159725a7 100644
--- a/sources/pyside2/doc/tutorials/index.rst
+++ b/sources/pyside6/doc/tutorials/index.rst
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter1/chapter1.rst b/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst
index 20b11065a..20b11065a 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter1/chapter1.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py
new file mode 100644
index 000000000..c3f27162d
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py
@@ -0,0 +1,131 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
+from datetime import date
+
+
+def add_book(q, title, year, authorId, genreId, rating):
+ q.addBindValue(title)
+ q.addBindValue(year)
+ q.addBindValue(authorId)
+ q.addBindValue(genreId)
+ q.addBindValue(rating)
+ q.exec_()
+
+
+def add_genre(q, name):
+ q.addBindValue(name)
+ q.exec_()
+ return q.lastInsertId()
+
+
+def add_author(q, name, birthdate):
+ q.addBindValue(name)
+ q.addBindValue(str(birthdate))
+ q.exec_()
+ return q.lastInsertId()
+
+BOOKS_SQL = """
+ create table books(id integer primary key, title varchar, author integer,
+ genre integer, year integer, rating integer)
+ """
+AUTHORS_SQL = """
+ create table authors(id integer primary key, name varchar, birthdate text)
+ """
+GENRES_SQL = """
+ create table genres(id integer primary key, name varchar)
+ """
+INSERT_AUTHOR_SQL = """
+ insert into authors(name, birthdate) values(?, ?)
+ """
+INSERT_GENRE_SQL = """
+ insert into genres(name) values(?)
+ """
+INSERT_BOOK_SQL = """
+ insert into books(title, year, author, genre, rating)
+ values(?, ?, ?, ?, ?)
+ """
+
+def init_db():
+ """
+ init_db()
+ Initializes the database.
+ If tables "books" and "authors" are already in the database, do nothing.
+ Return value: None or raises ValueError
+ The error value is the QtSql error instance.
+ """
+ def check(func, *args):
+ if not func(*args):
+ raise ValueError(func.__self__.lastError())
+ db = QSqlDatabase.addDatabase("QSQLITE")
+ db.setDatabaseName(":memory:")
+
+ check(db.open)
+
+ q = QSqlQuery()
+ check(q.exec_, BOOKS_SQL)
+ check(q.exec_, AUTHORS_SQL)
+ check(q.exec_, GENRES_SQL)
+ check(q.prepare, INSERT_AUTHOR_SQL)
+
+ asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
+ greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
+ pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
+
+ check(q.prepare,INSERT_GENRE_SQL)
+ sfiction = add_genre(q, "Science Fiction")
+ fiction = add_genre(q, "Fiction")
+ fantasy = add_genre(q, "Fantasy")
+
+ check(q.prepare,INSERT_BOOK_SQL)
+ add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
+ add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
+ add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
+ add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
+ add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
+ add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
+ add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
+ add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
+ add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
+ add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
+ add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter1/images/chapter1_books.png b/sources/pyside6/doc/tutorials/portingguide/chapter1/images/chapter1_books.png
index 164674220..164674220 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter1/images/chapter1_books.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/images/chapter1_books.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter1/initdb.h b/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h
index 773e3fb74..773e3fb74 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter1/initdb.h
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py
new file mode 100644
index 000000000..5b42a61a1
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+
+from PySide6.QtSql import QSqlQueryModel
+from PySide6.QtWidgets import QTableView, QApplication
+
+import createdb
+
+if __name__ == "__main__":
+ app = QApplication()
+ createdb.init_db()
+
+ model = QSqlQueryModel()
+ model.setQuery("select * from books")
+
+ table_view = QTableView()
+ table_view.setModel(model)
+ table_view.resize(800, 600)
+ table_view.show()
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.cpp b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
index 4115f80cf..4115f80cf 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.h b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h
index f1b432699..f1b432699 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/bookdelegate.h
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py
new file mode 100644
index 000000000..d6c16972b
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py
@@ -0,0 +1,134 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import copy, os
+from PySide6.QtSql import QSqlRelationalDelegate
+from PySide6.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
+ QStyle, QStyleOptionViewItem)
+from PySide6.QtGui import QMouseEvent, QPixmap, QPalette, QImage
+from PySide6.QtCore import QEvent, QSize, Qt, QUrl
+
+class BookDelegate(QSqlRelationalDelegate):
+ """Books delegate to rate the books"""
+
+ def __init__(self, parent=None):
+ QSqlRelationalDelegate.__init__(self, parent)
+ star_png = os.path.dirname(__file__) + "\images\star.png"
+ self.star = QPixmap(star_png)
+
+ def paint(self, painter, option, index):
+ """ Paint the items in the table.
+
+ If the item referred to by <index> is a StarRating, we
+ handle the painting ourselves. For the other items, we
+ let the base class handle the painting as usual.
+
+ In a polished application, we'd use a better check than
+ the column number to find out if we needed to paint the
+ stars, but it works for the purposes of this example.
+ """
+ if index.column() != 5:
+ # Since we draw the grid ourselves:
+ opt = copy.copy(option)
+ opt.rect = option.rect.adjusted(0, 0, -1, -1)
+ QSqlRelationalDelegate.paint(self, painter, opt, index)
+ else:
+ model = index.model()
+ if option.state & QStyle.State_Enabled:
+ if option.state & QStyle.State_Active:
+ color_group = QPalette.Normal
+ else:
+ color_group = QPalette.Inactive
+ else:
+ color_group = QPalette.Disabled
+
+ if option.state & QStyle.State_Selected:
+ painter.fillRect(option.rect,
+ option.palette.color(color_group, QPalette.Highlight))
+ rating = model.data(index, Qt.DisplayRole)
+ width = self.star.width()
+ height = self.star.height()
+ x = option.rect.x()
+ y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
+ for i in range(rating):
+ painter.drawPixmap(x, y, self.star)
+ x += width
+
+ # Since we draw the grid ourselves:
+ self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
+
+ pen = painter.pen()
+ painter.setPen(option.palette.color(QPalette.Mid))
+ painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
+ painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
+ painter.setPen(pen)
+
+ def sizeHint(self, option, index):
+ """ Returns the size needed to display the item in a QSize object. """
+ if index.column() == 5:
+ size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
+ return size_hint
+ # Since we draw the grid ourselves:
+ return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
+
+ def editorEvent(self, event, model, option, index):
+ if index.column() != 5:
+ return False
+
+ if event.type() == QEvent.MouseButtonPress:
+ mouse_pos = event.pos()
+ new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
+ stars = max(0, min(new_stars, 5))
+ model.setData(index, stars)
+ # So that the selection can change
+ return False
+
+ return True
+
+ def createEditor(self, parent, option, index):
+ if index.column() != 4:
+ return QSqlRelationalDelegate.createEditor(self, parent, option, index)
+
+ # For editing the year, return a spinbox with a range from -1000 to 2100.
+ spinbox = QSpinBox(parent)
+ spinbox.setFrame(False)
+ spinbox.setMaximum(2100)
+ spinbox.setMinimum(-1000)
+ return spinbox
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/chapter2.rst b/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst
index a574218fd..a574218fd 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/chapter2.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py
new file mode 100644
index 000000000..c3f27162d
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py
@@ -0,0 +1,131 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
+from datetime import date
+
+
+def add_book(q, title, year, authorId, genreId, rating):
+ q.addBindValue(title)
+ q.addBindValue(year)
+ q.addBindValue(authorId)
+ q.addBindValue(genreId)
+ q.addBindValue(rating)
+ q.exec_()
+
+
+def add_genre(q, name):
+ q.addBindValue(name)
+ q.exec_()
+ return q.lastInsertId()
+
+
+def add_author(q, name, birthdate):
+ q.addBindValue(name)
+ q.addBindValue(str(birthdate))
+ q.exec_()
+ return q.lastInsertId()
+
+BOOKS_SQL = """
+ create table books(id integer primary key, title varchar, author integer,
+ genre integer, year integer, rating integer)
+ """
+AUTHORS_SQL = """
+ create table authors(id integer primary key, name varchar, birthdate text)
+ """
+GENRES_SQL = """
+ create table genres(id integer primary key, name varchar)
+ """
+INSERT_AUTHOR_SQL = """
+ insert into authors(name, birthdate) values(?, ?)
+ """
+INSERT_GENRE_SQL = """
+ insert into genres(name) values(?)
+ """
+INSERT_BOOK_SQL = """
+ insert into books(title, year, author, genre, rating)
+ values(?, ?, ?, ?, ?)
+ """
+
+def init_db():
+ """
+ init_db()
+ Initializes the database.
+ If tables "books" and "authors" are already in the database, do nothing.
+ Return value: None or raises ValueError
+ The error value is the QtSql error instance.
+ """
+ def check(func, *args):
+ if not func(*args):
+ raise ValueError(func.__self__.lastError())
+ db = QSqlDatabase.addDatabase("QSQLITE")
+ db.setDatabaseName(":memory:")
+
+ check(db.open)
+
+ q = QSqlQuery()
+ check(q.exec_, BOOKS_SQL)
+ check(q.exec_, AUTHORS_SQL)
+ check(q.exec_, GENRES_SQL)
+ check(q.prepare, INSERT_AUTHOR_SQL)
+
+ asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
+ greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
+ pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
+
+ check(q.prepare,INSERT_GENRE_SQL)
+ sfiction = add_genre(q, "Science Fiction")
+ fiction = add_genre(q, "Fiction")
+ fantasy = add_genre(q, "Fantasy")
+
+ check(q.prepare,INSERT_BOOK_SQL)
+ add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
+ add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
+ add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
+ add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
+ add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
+ add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
+ add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
+ add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
+ add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
+ add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
+ add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books.png b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books.png
index e456b7d8f..e456b7d8f 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png
index 82a5f449c..82a5f449c 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/chapter2_books_with_relation.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/star.png b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/star.png
index 87f4464bd..87f4464bd 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter2/images/star.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/images/star.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py
new file mode 100644
index 000000000..c9c907f90
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py
@@ -0,0 +1,63 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+
+from PySide6.QtCore import Qt
+from PySide6.QtSql import QSqlQueryModel
+from PySide6.QtWidgets import QTableView, QApplication
+
+import createdb
+from bookdelegate import BookDelegate
+
+if __name__ == "__main__":
+ app = QApplication()
+ createdb.init_db()
+
+ model = QSqlQueryModel()
+ model.setQuery("select title, author, genre, year, rating from books")
+
+ table = QTableView()
+ table.setModel(model)
+ table.setItemDelegate(BookDelegate())
+ table.resize(800, 600)
+ table.show()
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
new file mode 100644
index 000000000..0c0f1ee69
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
@@ -0,0 +1,134 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import copy, os
+from PySide6.QtSql import QSqlRelationalDelegate
+from PySide6.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
+ QStyle, QStyleOptionViewItem)
+from PySide6.QtGui import QMouseEvent, QPixmap, QPalette, QImage
+from PySide6.QtCore import QEvent, QSize, Qt, QUrl
+
+class BookDelegate(QSqlRelationalDelegate):
+ """Books delegate to rate the books"""
+
+ def __init__(self, star_png, parent=None):
+ QSqlRelationalDelegate.__init__(self, parent)
+ star_png = os.path.dirname(__file__) + "\images\star.png"
+ self.star = QPixmap(star_png)
+
+ def paint(self, painter, option, index):
+ """ Paint the items in the table.
+
+ If the item referred to by <index> is a StarRating, we
+ handle the painting ourselves. For the other items, we
+ let the base class handle the painting as usual.
+
+ In a polished application, we'd use a better check than
+ the column number to find out if we needed to paint the
+ stars, but it works for the purposes of this example.
+ """
+ if index.column() != 5:
+ # Since we draw the grid ourselves:
+ opt = copy.copy(option)
+ opt.rect = option.rect.adjusted(0, 0, -1, -1)
+ QSqlRelationalDelegate.paint(self, painter, opt, index)
+ else:
+ model = index.model()
+ if option.state & QStyle.State_Enabled:
+ if option.state & QStyle.State_Active:
+ color_group = QPalette.Normal
+ else:
+ color_group = QPalette.Inactive
+ else:
+ color_group = QPalette.Disabled
+
+ if option.state & QStyle.State_Selected:
+ painter.fillRect(option.rect,
+ option.palette.color(color_group, QPalette.Highlight))
+ rating = model.data(index, Qt.DisplayRole)
+ width = self.star.width()
+ height = self.star.height()
+ x = option.rect.x()
+ y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
+ for i in range(rating):
+ painter.drawPixmap(x, y, self.star)
+ x += width
+
+ # Since we draw the grid ourselves:
+ self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
+
+ pen = painter.pen()
+ painter.setPen(option.palette.color(QPalette.Mid))
+ painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
+ painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
+ painter.setPen(pen)
+
+ def sizeHint(self, option, index):
+ """ Returns the size needed to display the item in a QSize object. """
+ if index.column() == 5:
+ size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
+ return size_hint
+ # Since we draw the grid ourselves:
+ return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
+
+ def editorEvent(self, event, model, option, index):
+ if index.column() != 5:
+ return False
+
+ if event.type() == QEvent.MouseButtonPress:
+ mouse_pos = event.pos()
+ new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
+ stars = max(0, min(new_stars, 5))
+ model.setData(index, stars)
+ # So that the selection can change
+ return False
+
+ return True
+
+ def createEditor(self, parent, option, index):
+ if index.column() != 4:
+ return QSqlRelationalDelegate.createEditor(self, parent, option, index)
+
+ # For editing the year, return a spinbox with a range from -1000 to 2100.
+ spinbox = QSpinBox(parent)
+ spinbox.setFrame(False)
+ spinbox.setMaximum(2100)
+ spinbox.setMinimum(-1000)
+ return spinbox
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py
new file mode 100644
index 000000000..4594508d5
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py
@@ -0,0 +1,133 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import copy, os
+from PySide6.QtSql import QSqlRelationalDelegate
+from PySide6.QtWidgets import (QItemDelegate, QSpinBox, QStyledItemDelegate,
+ QStyle, QStyleOptionViewItem)
+from PySide6.QtGui import QMouseEvent, QPixmap, QPalette, QImage
+from PySide6.QtCore import QEvent, QSize, Qt, QUrl
+
+class BookDelegate(QSqlRelationalDelegate):
+ """Books delegate to rate the books"""
+
+ def __init__(self, star_png, parent=None):
+ QSqlRelationalDelegate.__init__(self, parent)
+ self.star = QPixmap(":/images/star.png")
+
+ def paint(self, painter, option, index):
+ """ Paint the items in the table.
+
+ If the item referred to by <index> is a StarRating, we
+ handle the painting ourselves. For the other items, we
+ let the base class handle the painting as usual.
+
+ In a polished application, we'd use a better check than
+ the column number to find out if we needed to paint the
+ stars, but it works for the purposes of this example.
+ """
+ if index.column() != 5:
+ # Since we draw the grid ourselves:
+ opt = copy.copy(option)
+ opt.rect = option.rect.adjusted(0, 0, -1, -1)
+ QSqlRelationalDelegate.paint(self, painter, opt, index)
+ else:
+ model = index.model()
+ if option.state & QStyle.State_Enabled:
+ if option.state & QStyle.State_Active:
+ color_group = QPalette.Normal
+ else:
+ color_group = QPalette.Inactive
+ else:
+ color_group = QPalette.Disabled
+
+ if option.state & QStyle.State_Selected:
+ painter.fillRect(option.rect,
+ option.palette.color(color_group, QPalette.Highlight))
+ rating = model.data(index, Qt.DisplayRole)
+ width = self.star.width()
+ height = self.star.height()
+ x = option.rect.x()
+ y = option.rect.y() + (option.rect.height() / 2) - (height / 2)
+ for i in range(rating):
+ painter.drawPixmap(x, y, self.star)
+ x += width
+
+ # Since we draw the grid ourselves:
+ self.drawFocus(painter, option, option.rect.adjusted(0, 0, -1, -1))
+
+ pen = painter.pen()
+ painter.setPen(option.palette.color(QPalette.Mid))
+ painter.drawLine(option.rect.bottomLeft(), option.rect.bottomRight())
+ painter.drawLine(option.rect.topRight(), option.rect.bottomRight())
+ painter.setPen(pen)
+
+ def sizeHint(self, option, index):
+ """ Returns the size needed to display the item in a QSize object. """
+ if index.column() == 5:
+ size_hint = QSize(5 * self.star.width(), self.star.height()) + QSize(1, 1)
+ return size_hint
+ # Since we draw the grid ourselves:
+ return QSqlRelationalDelegate.sizeHint(self, option, index) + QSize(1, 1)
+
+ def editorEvent(self, event, model, option, index):
+ if index.column() != 5:
+ return False
+
+ if event.type() == QEvent.MouseButtonPress:
+ mouse_pos = event.pos()
+ new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width())
+ stars = max(0, min(new_stars, 5))
+ model.setData(index, stars)
+ # So that the selection can change
+ return False
+
+ return True
+
+ def createEditor(self, parent, option, index):
+ if index.column() != 4:
+ return QSqlRelationalDelegate.createEditor(self, parent, option, index)
+
+ # For editing the year, return a spinbox with a range from -1000 to 2100.
+ spinbox = QSpinBox(parent)
+ spinbox.setFrame(False)
+ spinbox.setMaximum(2100)
+ spinbox.setMinimum(-1000)
+ return spinbox
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/books.qrc b/sources/pyside6/doc/tutorials/portingguide/chapter3/books.qrc
index d6ad21337..d6ad21337 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/books.qrc
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/books.qrc
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.cpp b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp
index 76f3c9da8..76f3c9da8 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.cpp
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py
new file mode 100644
index 000000000..0b20e8ad5
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py
@@ -0,0 +1,138 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
+ QHeaderView, QMainWindow, QMessageBox)
+from PySide6.QtGui import QKeySequence
+from PySide6.QtSql import (QSqlRelation, QSqlRelationalTableModel, QSqlTableModel,
+ QSqlError)
+from PySide6.QtCore import QAbstractItemModel, QObject, QSize, Qt, Slot
+import createdb
+from ui_bookwindow import Ui_BookWindow
+from bookdelegate import BookDelegate
+
+
+class BookWindow(QMainWindow, Ui_BookWindow):
+ # """A window to show the books available"""
+
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.setupUi(self)
+
+ #Initialize db
+ createdb.init_db()
+
+ model = QSqlRelationalTableModel(self.bookTable)
+ model.setEditStrategy(QSqlTableModel.OnManualSubmit)
+ model.setTable("books")
+
+ # Remember the indexes of the columns:
+ author_idx = model.fieldIndex("author")
+ genre_idx = model.fieldIndex("genre")
+
+ # Set the relations to the other database tables:
+ model.setRelation(author_idx, QSqlRelation("authors", "id", "name"))
+ model.setRelation(genre_idx, QSqlRelation("genres", "id", "name"))
+
+ # Set the localized header captions:
+ model.setHeaderData(author_idx, Qt.Horizontal, self.tr("Author Name"))
+ model.setHeaderData(genre_idx, Qt.Horizontal, self.tr("Genre"))
+ model.setHeaderData(model.fieldIndex("title"), Qt.Horizontal, self.tr("Title"))
+ model.setHeaderData(model.fieldIndex("year"), Qt.Horizontal, self.tr("Year"))
+ model.setHeaderData(model.fieldIndex("rating"), Qt.Horizontal, self.tr("Rating"))
+
+ if not model.select():
+ print(model.lastError())
+
+ # Set the model and hide the ID column:
+ self.bookTable.setModel(model)
+ self.bookTable.setItemDelegate(BookDelegate(self.bookTable))
+ self.bookTable.setColumnHidden(model.fieldIndex("id"), True)
+ self.bookTable.setSelectionMode(QAbstractItemView.SingleSelection)
+
+ # Initialize the Author combo box:
+ self.authorEdit.setModel(model.relationModel(author_idx))
+ self.authorEdit.setModelColumn(model.relationModel(author_idx).fieldIndex("name"))
+
+ self.genreEdit.setModel(model.relationModel(genre_idx))
+ self.genreEdit.setModelColumn(model.relationModel(genre_idx).fieldIndex("name"))
+
+ # Lock and prohibit resizing of the width of the rating column:
+ self.bookTable.horizontalHeader().setSectionResizeMode(model.fieldIndex("rating"),
+ QHeaderView.ResizeToContents)
+
+ mapper = QDataWidgetMapper(self)
+ mapper.setModel(model)
+ mapper.setItemDelegate(BookDelegate(self))
+ mapper.addMapping(self.titleEdit, model.fieldIndex("title"))
+ mapper.addMapping(self.yearEdit, model.fieldIndex("year"))
+ mapper.addMapping(self.authorEdit, author_idx)
+ mapper.addMapping(self.genreEdit, genre_idx)
+ mapper.addMapping(self.ratingEdit, model.fieldIndex("rating"))
+
+ selection_model = self.bookTable.selectionModel()
+ selection_model.currentRowChanged.connect(mapper.setCurrentModelIndex)
+
+ self.bookTable.setCurrentIndex(model.index(0, 0))
+ self.create_menubar()
+
+ def showError(err):
+ QMessageBox.critical(self, "Unable to initialize Database",
+ "Error initializing database: " + err.text())
+
+ def create_menubar(self):
+ file_menu = self.menuBar().addMenu(self.tr("&File"))
+ quit_action = file_menu.addAction(self.tr("&Quit"))
+ quit_action.triggered.connect(qApp.quit)
+
+ help_menu = self.menuBar().addMenu(self.tr("&Help"))
+ about_action = help_menu.addAction(self.tr("&About"))
+ about_action.setShortcut(QKeySequence.HelpContents)
+ about_action.triggered.connect(self.about)
+ aboutQt_action = help_menu.addAction("&About Qt")
+ aboutQt_action.triggered.connect(qApp.aboutQt)
+
+ def about(self):
+ QMessageBox.about(self, self.tr("About Books"),
+ self.tr("<p>The <b>Books</b> example shows how to use Qt SQL classes "
+ "with a model/view framework."))
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.ui b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.ui
index e1668288f..e1668288f 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.ui
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.ui
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst b/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst
new file mode 100644
index 000000000..b2e06b144
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst
@@ -0,0 +1,121 @@
+Chapter 3: Port ``bookdwindow.cpp`` to ``bookwindow.py``
+*********************************************************
+
+After the bookdelegate, port the C++ code for the
+``BookWindow`` class. It offers a QMainWindow, containing a
+``QTableView`` to present the books data, and a **Details**
+section with a set of input fields to edit the selected row
+in the table. To begin with, create the ``bookwindow.py``
+and add the following imports to it:
+
+.. literalinclude:: bookwindow.py
+ :language: python
+ :linenos:
+ :lines: 40-53
+
+.. note:: The imports include the ``BookDelegate`` you
+ ported earlier and the ``Ui_BookWindow``. The pyside-uic
+ tool generates the ``ui_bookwindow`` Python code based
+ on the ``bookwindow.ui`` XML file.
+
+To generate this Python code, run the following command on the
+prompt:
+
+.. code-block::
+
+ pyside6-uic bookwindow.ui > ui_bookwindow.py
+
+Try porting the remaining code now. To begin with, here is
+how both the versions of the constructor code looks:
+
+C++ version
+------------
+
+.. literalinclude:: bookwindow.cpp
+ :language: c++
+ :linenos:
+ :lines: 57-140
+
+Python version
+---------------
+
+.. literalinclude:: bookwindow.py
+ :language: python
+ :linenos:
+ :lines: 53-116
+
+.. note:: The Python version of the ``BookWindow`` class
+ definition inherits from both ``QMainWindow`` and
+ ``Ui_BookWindow``, which is defined in the
+ ``ui_bookwindow.py`` file that you generated earlier.
+
+Here is how the rest of the code looks like:
+
+C++ version
+------------
+
+.. literalinclude:: bookwindow.cpp
+ :language: c++
+ :linenos:
+ :lines: 115-
+
+Python version
+---------------
+
+.. literalinclude:: bookwindow.py
+ :language: python
+ :linenos:
+ :lines: 117-
+
+Now that all the necessary pieces are in place, try to put
+them together in ``main.py``.
+
+.. literalinclude:: main.py
+ :language: python
+ :linenos:
+ :lines: 40-
+
+Try running this to see if you get the following output:
+
+.. image:: images/chapter3-books.png
+ :alt: BookWindow with a QTableView and a few input fields
+
+Now, if you look back at :doc:`chapter2 <../chapter2/chapter2>`,
+you'll notice that the ``bookdelegate.py`` loads the
+``star.png`` from the filesytem. Instead, you could add it
+to a ``qrc`` file, and load from it. The later approach is
+rececommended if your application is targeted for
+different platforms, as most of the popular platforms
+employ stricter file access policy these days.
+
+To add the ``star.png`` to a ``.qrc``, create a file called
+``books.qrc`` and the following XML content to it:
+
+.. literalinclude:: books.qrc
+ :linenos:
+
+This is a simple XML file defining a list all resources that
+your application needs. In this case, it is the ``star.png``
+image only.
+
+Now, run the ``pyside6-rcc`` tool on the ``books.qrc`` file
+to generate ``rc_books.py``.
+
+.. code-block::
+
+ pyside6-rcc books.qrc > rc_books.py
+
+Once you have the Python script generated, make the
+following changes to ``bookdelegate.py`` and ``main.py``:
+
+.. literalinclude:: bookdelegate.py
+ :diff: ../chapter2/bookdelegate.py
+
+.. literalinclude:: main.py
+ :diff: main-old.py
+
+Although there will be no noticeable difference in the UI
+after these changes, using a ``.qrc`` is a better approach.
+
+Now that you have successfully ported the SQL Books example,
+you know how easy it is. Try porting another C++ application.
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py
new file mode 100644
index 000000000..c3f27162d
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py
@@ -0,0 +1,131 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
+from datetime import date
+
+
+def add_book(q, title, year, authorId, genreId, rating):
+ q.addBindValue(title)
+ q.addBindValue(year)
+ q.addBindValue(authorId)
+ q.addBindValue(genreId)
+ q.addBindValue(rating)
+ q.exec_()
+
+
+def add_genre(q, name):
+ q.addBindValue(name)
+ q.exec_()
+ return q.lastInsertId()
+
+
+def add_author(q, name, birthdate):
+ q.addBindValue(name)
+ q.addBindValue(str(birthdate))
+ q.exec_()
+ return q.lastInsertId()
+
+BOOKS_SQL = """
+ create table books(id integer primary key, title varchar, author integer,
+ genre integer, year integer, rating integer)
+ """
+AUTHORS_SQL = """
+ create table authors(id integer primary key, name varchar, birthdate text)
+ """
+GENRES_SQL = """
+ create table genres(id integer primary key, name varchar)
+ """
+INSERT_AUTHOR_SQL = """
+ insert into authors(name, birthdate) values(?, ?)
+ """
+INSERT_GENRE_SQL = """
+ insert into genres(name) values(?)
+ """
+INSERT_BOOK_SQL = """
+ insert into books(title, year, author, genre, rating)
+ values(?, ?, ?, ?, ?)
+ """
+
+def init_db():
+ """
+ init_db()
+ Initializes the database.
+ If tables "books" and "authors" are already in the database, do nothing.
+ Return value: None or raises ValueError
+ The error value is the QtSql error instance.
+ """
+ def check(func, *args):
+ if not func(*args):
+ raise ValueError(func.__self__.lastError())
+ db = QSqlDatabase.addDatabase("QSQLITE")
+ db.setDatabaseName(":memory:")
+
+ check(db.open)
+
+ q = QSqlQuery()
+ check(q.exec_, BOOKS_SQL)
+ check(q.exec_, AUTHORS_SQL)
+ check(q.exec_, GENRES_SQL)
+ check(q.prepare, INSERT_AUTHOR_SQL)
+
+ asimovId = add_author(q, "Isaac Asimov", date(1920, 2, 1))
+ greeneId = add_author(q, "Graham Greene", date(1904, 10, 2))
+ pratchettId = add_author(q, "Terry Pratchett", date(1948, 4, 28))
+
+ check(q.prepare,INSERT_GENRE_SQL)
+ sfiction = add_genre(q, "Science Fiction")
+ fiction = add_genre(q, "Fiction")
+ fantasy = add_genre(q, "Fantasy")
+
+ check(q.prepare,INSERT_BOOK_SQL)
+ add_book(q, "Foundation", 1951, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Empire", 1952, asimovId, sfiction, 4)
+ add_book(q, "Second Foundation", 1953, asimovId, sfiction, 3)
+ add_book(q, "Foundation's Edge", 1982, asimovId, sfiction, 3)
+ add_book(q, "Foundation and Earth", 1986, asimovId, sfiction, 4)
+ add_book(q, "Prelude to Foundation", 1988, asimovId, sfiction, 3)
+ add_book(q, "Forward the Foundation", 1993, asimovId, sfiction, 3)
+ add_book(q, "The Power and the Glory", 1940, greeneId, fiction, 4)
+ add_book(q, "The Third Man", 1950, greeneId, fiction, 5)
+ add_book(q, "Our Man in Havana", 1958, greeneId, fiction, 4)
+ add_book(q, "Guards! Guards!", 1989, pratchettId, fantasy, 3)
+ add_book(q, "Night Watch", 2002, pratchettId, fantasy, 3)
+ add_book(q, "Going Postal", 2004, pratchettId, fantasy, 3)
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/images/chapter3-books.png b/sources/pyside6/doc/tutorials/portingguide/chapter3/images/chapter3-books.png
index 952cb14e8..952cb14e8 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/images/chapter3-books.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/images/chapter3-books.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/images/star.png b/sources/pyside6/doc/tutorials/portingguide/chapter3/images/star.png
index 87f4464bd..87f4464bd 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/images/star.png
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/images/star.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py
new file mode 100644
index 000000000..675f8032b
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtWidgets import QApplication
+from bookwindow import BookWindow
+
+if __name__ == "__main__":
+ app = QApplication([])
+
+ window = BookWindow()
+ window.resize(800, 600)
+ window.show()
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py
new file mode 100644
index 000000000..e957869ac
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from PySide6.QtWidgets import QApplication
+from bookwindow import BookWindow
+import rc_books
+
+if __name__ == "__main__":
+ app = QApplication([])
+
+ window = BookWindow()
+ window.resize(800, 600)
+ window.show()
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py b/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py
new file mode 100644
index 000000000..81b63b7ea
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py
@@ -0,0 +1,76 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import random
+
+from PySide6.QtWidgets import (QApplication, QLabel,
+ QPushButton, QVBoxLayout, QWidget)
+from PySide6.QtCore import Qt, Slot
+
+class MyWidget(QWidget):
+ def __init__(self):
+ super().__init__()
+
+ self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
+
+ self.button = QPushButton("Click me!")
+ self.text = QLabel("Hello World")
+ self.text.setAlignment(Qt.AlignCenter)
+
+ self.layout = QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ self.button.clicked.connect(self.magic)
+
+ @Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/portingguide/index.rst b/sources/pyside6/doc/tutorials/portingguide/index.rst
new file mode 100644
index 000000000..12f76d3fc
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/portingguide/index.rst
@@ -0,0 +1,194 @@
+Porting a C++ Application to Python
+*************************************
+
+Qt for Python lets you use Qt APIs in a Python application.
+So the next question is: What does it take to port an
+existing C++ application? Try porting a Qt C++ application
+to Python to understand this.
+
+Before you start, ensure that all the prerequisites for
+Qt for Python are met. See
+:doc:`Getting Started <../../gettingstarted>` for more
+information. In addition, familiarize yourself with the
+basic differences between Qt in C++ and in Python.
+
+Basic differences
+==================
+
+This section highlights some of the basic differences
+between C++ and Python, and how Qt differs between these
+two contexts.
+
+C++ vs Python
+--------------
+
+* In the interest of code reuse, both C++ and Python
+ provide ways for one file of code to use facilities
+ provided by another. In C++, this is done using the
+ ``#include`` directive to access the API definition of
+ the reused code. The Python equivalent is an ``import``
+ statement.
+* The constructor of a C++ class shares the name of its
+ class and automatically calls the constructor of any
+ base-classes (in a predefined order) before it runs.
+ In Python, the ``__init__()`` method is the constructor
+ of the class, and it can explicitly call base-class
+ constructors in any order.
+* C++ uses the keyword, ``this``, to implicitly refer to
+ the current object. In python, you need to explicitly
+ mention the current object as the first parameter
+ to each instance method of the class; it is conventionally
+ named ``self``.
+* And more importantly, forget about curly braces, {}, and
+ semi-colon, ;.
+* Precede variable definitions with the ``global`` keyword,
+ only if they need global scope.
+
+.. code:: python
+
+ var = None
+ def func(key, value = None):
+ """Does stuff with a key and an optional value.
+
+ If value is omitted or None, the value from func()'s
+ last call is reused.
+ """
+ global var
+ if value is None:
+ if var is None:
+ raise ValueError("Must pass a value on first call", key, value)
+ value = var
+ else:
+ var = value
+ doStuff(key, value)
+
+In this example, ``func()`` would treat ``var`` as a local
+name without the ``global`` statement. This would lead to
+a ``NameError`` in the ``value is None`` handling, on
+accessing ``var``. For more information about this, see
+`Python refernce documentation <python refdoc>`_.
+
+.. _python refdoc: https://docs.python.org/3/reference/simple_stmts.html#the-global-statement
+
+.. tip:: Python being an interpreted language, most often
+ the easiest way is to try your idea in the interperter.
+ You could call the ``help()`` function in the
+ interpreter on any built-in function or keyword in
+ Python. For example, a call to ``help(import)`` should
+ provide documentation about the ``import`` statment
+
+Last but not the least, try out a few examples to
+familiarize yourself with the Python coding style and
+follow the guidelines outlined in the
+`PEP8 - Style Guide <pep8>`_.
+
+.. _pep8: <https://www.python.org/dev/peps/pep-0008/#naming-conventions>
+
+.. code-block:: python
+
+ import sys
+
+ from PySide6.QtWidgets import QApplication, QLabel
+
+ app = QApplication(sys.argv)
+ label = QLabel("Hello World")
+ label.show()
+ sys.exit(app.exec_())
+
+.. note:: Qt provides classes that are meant to manage
+ the application-specific requirements depending on
+ whether the application is console-only
+ (QCoreApplication), GUI with QtWidgets (QApplication),
+ or GUI without QtWidgets (QGuiApplication). These
+ classes load necessary plugins, such as the GUI
+ libraries required by an application. In this case, it is
+ QApplication that is initialized first as the application
+ has a GUI with QtWidgets.
+
+Qt in the C++ and Python context
+---------------------------------
+
+Qt behaves the same irrespective of whether it is used
+in a C++ or a Python application. Considering that C++
+and Python use different language semantics, some
+differences between the two variants of Qt are inevitable.
+Here are a few important ones that you must be aware of:
+
+* **Qt Properties**: ``Q_PROPERTY`` macros are used in C++ to add a
+ public member variable with getter and setter functions. Python's
+ alternative for this is the ``@property`` decorator before the
+ getter and setter function definitions.
+* **Qt Signals and Slots**: Qt offers a unique callback mechanism,
+ where a signal is emitted to notify the occurrence of an event, so
+ that slots connected to this signal can react to it. In C++,
+ the class definition must define the slots under the
+ ``public Q_SLOTS:`` and signals under ``Q_SIGNALS:``
+ access specifier. You connect these two using one of the
+ several variants of the QObject::connect() function. Python's
+ equivalent for this is the `@Slot`` decorator just before the
+ function definition. This is necessary to register the slots
+ with the QtMetaObject.
+* **QString, QVariant, and other types**
+
+ - Qt for Python does not provide access to QString and
+ QVariant. You must use Python's native types instead.
+ - QChar and QStringRef are represented as Python strings,
+ and QStringList is converted to a list of strings.
+ - QDate, QDateTime, QTime, and QUrl's __hash__() methods
+ return a string representation so that identical dates
+ (and identical date/times or times or URLs) have
+ identical hash values.
+ - QTextStream's bin(), hex(), and oct() functions are
+ renamed to bin_(), hex_(), and oct_() respectively. This
+ should avoid name conflicts with Python's built-in
+ functions.
+
+* **QByteArray**: A QByteArray is treated as a list of
+ bytes without encoding. Python 3 uses
+ "bytes". QString is represented as an encoded human readable string,
+ which means it is a "str".
+
+Here is the improved version of the Hello World example,
+demonstrating some of these differences:
+
+.. literalinclude:: hello_world_ex.py
+ :linenos:
+ :lines: 40-
+
+.. note:: The ``if`` block is just a good practice when
+ developing a Python application. It lets the Python file
+ behave differently depending on whether it is imported
+ as a module in another file or run directly. The
+ ``__name__`` variable will have different values in
+ these two scenarios. It is ``__main__`` when the file is
+ run directly, and the module's file name
+ (``hello_world_ex`` in this case) when imported as a
+ module. In the later case, everything defined in the
+ module except the ``if`` block is available to the
+ importing file.
+
+Notice that the QPushButton's ``clicked`` signal is
+connected to the ``magic`` function to randomly change the
+QLabel's ``text`` property. The `@Slot`` decorator marks
+the methods that are slots and informs the QtMetaObject about
+them.
+
+Porting a Qt C++ example
+=========================
+
+Qt offers several C++ examples to showcase its features and help
+beginners learn. You can try porting one of these C++ examples to
+Python. The
+`books SQL example <https://code.qt.io/cgit/qt/qtbase.git/tree/examples/sql/books>`_
+is a good starting point as it does not require you to write UI-specific code in
+Python, but can use its ``.ui`` file instead.
+
+The following chapters guides you through the porting process:
+
+.. toctree::
+ :glob:
+ :titlesonly:
+
+ chapter1/chapter1
+ chapter2/chapter2
+ chapter3/chapter3
diff --git a/sources/pyside2/doc/tutorials/qmlapp/logo.png b/sources/pyside6/doc/tutorials/qmlapp/logo.png
index 30c621c9c..30c621c9c 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/logo.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/logo.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/qmlapp/main.py b/sources/pyside6/doc/tutorials/qmlapp/main.py
new file mode 100644
index 000000000..5946538d9
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlapp/main.py
@@ -0,0 +1,82 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+#!/usr/bin/env python
+# -*- conding: utf-8 -*-
+
+import os, sys, urllib.request, json
+import PySide6.QtQml
+from PySide6.QtQuick import QQuickView
+from PySide6.QtCore import QStringListModel, Qt, QUrl
+from PySide6.QtGui import QGuiApplication
+
+if __name__ == '__main__':
+
+ #get our data
+ url = "http://country.io/names.json"
+ response = urllib.request.urlopen(url)
+ data = json.loads(response.read().decode('utf-8'))
+
+ #Format and sort the data
+ data_list = list(data.values())
+ data_list.sort()
+
+ #Set up the application window
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+
+ #Expose the list to the Qml code
+ my_model = QStringListModel()
+ my_model.setStringList(data_list)
+ view.rootContext().setContextProperty("myModel",my_model)
+
+ #Load the QML file
+ qml_file = os.path.join(os.path.dirname(__file__),"view.qml")
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qml_file)))
+
+ #Show the window
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+
+ #execute and cleanup
+ app.exec_()
+ del view
diff --git a/sources/pyside2/doc/tutorials/qmlapp/newpyproject.png b/sources/pyside6/doc/tutorials/qmlapp/newpyproject.png
index 93968a52d..93968a52d 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/newpyproject.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/newpyproject.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlapp/projectsmode.png b/sources/pyside6/doc/tutorials/qmlapp/projectsmode.png
index c66d88723..c66d88723 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/projectsmode.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/projectsmode.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlapp/pyprojname.png b/sources/pyside6/doc/tutorials/qmlapp/pyprojname.png
index 98328074d..98328074d 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/pyprojname.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/pyprojname.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlapp/pyprojxplor.png b/sources/pyside6/doc/tutorials/qmlapp/pyprojxplor.png
index e01e2ebeb..e01e2ebeb 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/pyprojxplor.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/pyprojxplor.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlapp/qmlapplication.png b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.png
index ec0ad3dea..ec0ad3dea 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/qmlapplication.png
+++ b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst
new file mode 100644
index 000000000..082490f4b
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst
@@ -0,0 +1,132 @@
+#########################
+QML Application Tutorial
+#########################
+
+This tutorial provides a quick walk-through of a python application
+that loads a QML file. QML is a declarative language that lets you
+design UIs faster than a traditional language, such as C++. The
+QtQml and QtQuick modules provides the necessary infrastructure for
+QML-based UIs.
+
+In this tutorial, you'll also learn how to provide data from Python
+as a QML context property, which is then consumed by the ListView
+defined in the QML file.
+
+Before you begin, install the following prerequisites:
+
+* The `PySide6 <https://pypi.org/project/PySide6/>`_ Python packages.
+* Qt Creator v4.9 beta1 or later from
+ `http://download.qt.io
+ <http://download.qt.io/snapshots/qtcreator/4.9/4.9.0-beta1/>`_.
+
+
+The following step-by-step instructions guide you through application
+development process using Qt Creator:
+
+#. Open Qt Creator and select **File > New File or Project..** menu item
+ to open following dialog:
+
+ .. image:: newpyproject.png
+
+#. Select **Qt for Python - Empty** from the list of application templates
+ and select **Choose**.
+
+ .. image:: pyprojname.png
+
+#. Give a **Name** to your project, choose its location in the
+ filesystem, and select **Finish** to create an empty ``main.py``
+ and ``main.pyproject``.
+
+ .. image:: pyprojxplor.png
+
+ This should create a ``main.py`` and ```main.pyproject`` files
+ for the project.
+
+#. Download :download:`view.qml<view.qml>` and :download:`logo.png <logo.png>`
+ and move them to your project folder.
+
+#. Double-click on ``main.pyproject`` to open it in edit mode, and append
+ ``view.qml`` and ``logo.png`` to the **files** list. This is how your
+ project file should look after this change:
+
+ .. code::
+
+ {
+ "files": ["main.py", "view.qml", "logo.png"]
+ }
+
+#. Now that you have the necessary bits for the application, import the
+ Python modules in your ``main.py``, and download country data and
+ format it:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-60
+ :emphasize-lines: 12-20
+
+#. Now, set up the application window using
+ :ref:`PySide6.QtGui.QGuiApplication<qguiapplication>`, which manages the application-wide
+ settings.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-65
+ :emphasize-lines: 23-25
+
+ .. note:: Setting the resize policy is important if you want the
+ root item to resize itself to fit the window or vice-a-versa.
+ Otherwise, the root item will retain its original size on
+ resizing the window.
+
+#. You can now expose the ``data_list`` variable as a QML context
+ property, which will be consumed by the QML ListView item in ``view.qml``.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-70
+ :emphasize-lines: 27-30
+
+#. Load the ``view.qml`` to the ``QQuickView`` and call ``show()`` to
+ display the application window.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-79
+ :emphasize-lines: 33-39
+
+#. Finally, execute the application to start the event loop and clean up.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-
+ :emphasize-lines: 41-43
+
+#. Your application is ready to be run now. Select **Projects** mode to
+ choose the Python version to run it.
+
+ .. image:: projectsmode.png
+
+Run the application by using the ``CTRL+R`` keyboard shortcut to see if it
+looks like this:
+
+.. image:: qmlapplication.png
+
+You could also watch the following video tutorial for guidance to develop
+this application:
+
+.. raw:: html
+
+ <div style="position: relative; padding-bottom: 56.25%; height: 0;
+ overflow: hidden; max-width: 100%; height: auto;">
+ <iframe src="https://www.youtube.com/embed/JxfiUx60Mbg" frameborder="0"
+ allowfullscreen style="position: absolute; top: 0; left: 0;
+ width: 100%; height: 100%;">
+ </iframe>
+ </div>
+
+********************
+Related information
+********************
+
+* `QML Reference <https://doc.qt.io/qt-5/qmlreference.html>`_
+* :doc:`../qmlintegration/qmlintegration`
diff --git a/sources/pyside2/doc/tutorials/qmlapp/view.qml b/sources/pyside6/doc/tutorials/qmlapp/view.qml
index c75052b29..c75052b29 100644
--- a/sources/pyside2/doc/tutorials/qmlapp/view.qml
+++ b/sources/pyside6/doc/tutorials/qmlapp/view.qml
diff --git a/sources/pyside6/doc/tutorials/qmlintegration/main.py b/sources/pyside6/doc/tutorials/qmlintegration/main.py
new file mode 100644
index 000000000..884d239b3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlintegration/main.py
@@ -0,0 +1,113 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+from os.path import abspath, dirname, join
+
+from PySide6.QtCore import QObject, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlApplicationEngine
+
+from style_rc import *
+
+
+class Bridge(QObject):
+
+ @Slot(str, result=str)
+ def getColor(self, color_name):
+ if color_name.lower() == "red":
+ return "#ef9a9a"
+ elif color_name.lower() == "green":
+ return "#a5d6a7"
+ elif color_name.lower() == "blue":
+ return "#90caf9"
+ else:
+ return "white"
+
+ @Slot(float, result=int)
+ def getSize(self, s):
+ size = int(s * 42) # Maximum font size
+ if size <= 0:
+ return 1
+ else:
+ return size
+
+ @Slot(str, result=bool)
+ def getItalic(self, s):
+ if s.lower() == "italic":
+ return True
+ else:
+ return False
+
+ @Slot(str, result=bool)
+ def getBold(self, s):
+ if s.lower() == "bold":
+ return True
+ else:
+ return False
+
+ @Slot(str, result=bool)
+ def getUnderline(self, s):
+ if s.lower() == "underline":
+ return True
+ else:
+ return False
+
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ engine = QQmlApplicationEngine()
+
+ # Instance of the Python object
+ bridge = Bridge()
+
+ # Expose the Python object to QML
+ context = engine.rootContext()
+ context.setContextProperty("con", bridge)
+
+ # Get the path of the current directory, and then add the name
+ # of the QML file, to load it.
+ qmlFile = join(dirname(__file__), 'view.qml')
+ engine.load(abspath(qmlFile))
+
+ if not engine.rootObjects():
+ sys.exit(-1)
+
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst b/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst
new file mode 100644
index 000000000..5bbb89609
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst
@@ -0,0 +1,111 @@
+########################
+QML Integration Tutorial
+########################
+
+This tutorial provides a quick walk-through of a python application that loads, and interacts with
+a QML file. QML is a declarative language that lets you design UIs faster than a traditional
+language, such as C++. The QtQml and QtQuick modules provides the necessary infrastructure for
+QML-based UIs.
+
+In this tutorial, you will learn how to integrate Python with a QML application through a context
+property. This mechanism will help us to understand how to use Python as a backend for certain
+signals from the UI elements in the QML interface. Additionally, you will learn how to provide
+a modern look to your QML application using one of the features from Qt Quick Controls 2.
+
+The tutorial is based on an application that allow you to set many text properties, like increasing
+the font size, changing the color, changing the style, and so on. Before you begin, install the
+`PySide6 <https://pypi.org/project/PySide6/>`_ Python packages.
+
+The following step-by-step process will guide you through the key elements of the QML based
+application and PySide6 integration:
+
+#. First, let's start with the following QML-based UI:
+
+ .. image:: textproperties_default.png
+
+ The design is based on a `GridLayout`, containing two `ColumnLayout`.
+ Inside the UI you will find many `RadioButton`, `Button`, and a `Slider`.
+
+#. With the QML file in place, you can load it from Python:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 98-108
+ :emphasize-lines: 6,9
+
+ Notice that we specify the name of the context property, **con**,
+ and also we explicitly load our QML file.
+
+#. Define the `Bridge` class, containing all the logic for the context property:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 51-91
+
+#. Now, go back to the QML file and connect the signals to the slots defined in the `Bridge` class:
+
+ .. literalinclude:: view.qml
+ :linenos:
+ :lines: 85-93
+ :emphasize-lines: 5-7
+
+ The properties *Italic*, *Bold*, and *Underline* are mutually
+ exclusive, this means only one can be active at any time.
+ To achieve this each time we select one of these options, we
+ check the three properties via the context property as you can
+ see in the above snippet.
+ Only one of the three will return *True*, while the other two
+ will return *False*, that is how we make sure only one is being
+ applied to the text.
+
+#. Each slot verifies if the selected option contains the text associated
+ to the property:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 79-84
+ :emphasize-lines: 4,6
+
+ Returning *True* or *False* allows you to activate and deactivate
+ the properties of the QML UI elements.
+
+ It is also possible to return other values that are not *Boolean*,
+ like the slot in charge of returning the font size:
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 64-70
+
+#. Now, for changing the look of our application, you have two options:
+
+ 1. Use the command line: execute the python file adding the option, `--style`::
+
+ python main.py --style material
+
+ 2. Use a `qtquickcontrols2.conf` file:
+
+ .. literalinclude:: qtquickcontrols2.conf
+ :linenos:
+
+ Then add it to your `.qrc` file:
+
+ .. literalinclude:: style.qrc
+ :linenos:
+
+ Generate the *rc* file running, `pyside6-rcc style.qrc > style_rc.py`
+ And finally import it from your `main.py` script.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 41-48
+ :emphasize-lines: 8
+
+ You can read more about this configuration file
+ `here <https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html>`_.
+
+ The final look of your application will be:
+
+ .. image:: textproperties_material.png
+
+You can :download:`view.qml <view.qml>` and
+:download:`main.py <main.py>` to try this example.
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf b/sources/pyside6/doc/tutorials/qmlintegration/qtquickcontrols2.conf
index 850646021..850646021 100644
--- a/sources/pyside2/doc/tutorials/qmlintegration/qtquickcontrols2.conf
+++ b/sources/pyside6/doc/tutorials/qmlintegration/qtquickcontrols2.conf
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/style.qrc b/sources/pyside6/doc/tutorials/qmlintegration/style.qrc
index e313f5ed6..e313f5ed6 100644
--- a/sources/pyside2/doc/tutorials/qmlintegration/style.qrc
+++ b/sources/pyside6/doc/tutorials/qmlintegration/style.qrc
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png b/sources/pyside6/doc/tutorials/qmlintegration/textproperties_default.png
index cfeac9368..cfeac9368 100644
--- a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_default.png
+++ b/sources/pyside6/doc/tutorials/qmlintegration/textproperties_default.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png b/sources/pyside6/doc/tutorials/qmlintegration/textproperties_material.png
index 47866c10e..47866c10e 100644
--- a/sources/pyside2/doc/tutorials/qmlintegration/textproperties_material.png
+++ b/sources/pyside6/doc/tutorials/qmlintegration/textproperties_material.png
Binary files differ
diff --git a/sources/pyside2/doc/tutorials/qmlintegration/view.qml b/sources/pyside6/doc/tutorials/qmlintegration/view.qml
index 97968d691..97968d691 100644
--- a/sources/pyside2/doc/tutorials/qmlintegration/view.qml
+++ b/sources/pyside6/doc/tutorials/qmlintegration/view.qml
diff --git a/sources/pyside2/doc/tutorials/qmlsqlintegration/chat.qml b/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml
index 487f5b36c..487f5b36c 100644
--- a/sources/pyside2/doc/tutorials/qmlsqlintegration/chat.qml
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml
diff --git a/sources/pyside2/doc/tutorials/qmlsqlintegration/example_list_view.png b/sources/pyside6/doc/tutorials/qmlsqlintegration/example_list_view.png
index a0c189665..a0c189665 100644
--- a/sources/pyside2/doc/tutorials/qmlsqlintegration/example_list_view.png
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/example_list_view.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py
new file mode 100644
index 000000000..50a3d43fe
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py
@@ -0,0 +1,85 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python project.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import logging
+
+from PySide6.QtCore import QDir, QFile, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtSql import QSqlDatabase
+
+from sqlDialog import SqlConversationModel
+
+logging.basicConfig(filename="chat.log", level=logging.DEBUG)
+logger = logging.getLogger("logger")
+
+
+def connectToDatabase():
+ database = QSqlDatabase.database()
+ if not database.isValid():
+ database = QSqlDatabase.addDatabase("QSQLITE")
+ if not database.isValid():
+ logger.error("Cannot add database")
+
+ write_dir = QDir()
+ if not write_dir.mkpath("."):
+ logger.error("Failed to create writable directory")
+
+ # Ensure that we have a writable location on all devices.
+ filename = "{}/chat-database.sqlite3".format(write_dir.absolutePath())
+
+ # When using the SQLite driver, open() will create the SQLite
+ # database if it doesn't exist.
+ database.setDatabaseName(filename)
+ if not database.open():
+ logger.error("Cannot open database")
+ QFile.remove(filename)
+
+
+if __name__ == "__main__":
+ app = QGuiApplication()
+ connectToDatabase()
+ sql_conversation_model = SqlConversationModel()
+
+ engine = QQmlApplicationEngine()
+ # Export pertinent objects to QML
+ engine.rootContext().setContextProperty("chat_model", sql_conversation_model)
+ engine.load(QUrl("chat.qml"))
+
+ app.exec_()
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst b/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
new file mode 100644
index 000000000..0df6dd30c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
@@ -0,0 +1,225 @@
+QML, SQL and PySide Integration Tutorial
+########################################
+
+This tutorial is very similar to the `Qt Chat Tutorial`_ one but it focuses on explaining how to
+integrate a SQL database into a PySide6 application using QML for its UI.
+
+.. _`Qt Chat Tutorial`: https://doc.qt.io/qt-5/qtquickcontrols-chattutorial-example.html
+
+sqlDialog.py
+------------
+
+We import the pertinent libraries to our program, define a global variable that hold the
+name of our table, and define the global function ``createTable()`` that creates a new table if it
+doesn't already exist.
+The database contains a single line to mock the beginning of a conversation.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 40-77
+
+The ``SqlConversationModel`` class offers the read-only data model required for the non-editable
+contacts list. It derives from the :ref:`QSqlQueryModel` class, which is the logical choice for
+this use case.
+Then, we proceed to create the table, set its name to the one defined previously with the
+:meth:`~.QSqlTableModel.setTable` method.
+We add the necessary attributes to the table, to have a program that reflects the idea
+of a chat application.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 80-91
+
+In ``setRecipient()``, you set a filter over the returned results from the database, and
+emit a signal every time the recipient of the message changes.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 93-103
+
+The ``data()`` function falls back to ``QSqlTableModel``'s implementation if the role is not a
+custom user role.
+If you get a user role, we can subtract :meth:`~.QtCore.Qt.UserRole` from it to get the index of
+that field, and then use that index to find the value to be returned.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 105-112
+
+
+In ``roleNames()``, we return a Python dictionary with our custom role and role names as key-values
+pairs, so we can use these roles in QML.
+Alternatively, it can be useful to declare an Enum to hold all of the role values.
+Note that ``names`` has to be a hash to be used as a dictionary key,
+and that's why we're using the ``hash`` function.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 114-128
+
+The ``send_message()`` function uses the given recipient and message to insert a new record into
+the database.
+Using :meth:`~.QSqlTableModel.OnManualSubmit` requires you to also call ``submitAll()``,
+since all the changes will be cached in the model until you do so.
+
+ .. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 130-146
+
+chat.qml
+--------
+
+Let's look at the ``chat.qml`` file.
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 40-42
+
+First, import the Qt Quick module.
+This gives us access to graphical primitives such as Item, Rectangle, Text, and so on.
+For a full list of types, see the `Qt Quick QML Types`_ documentation.
+We then add QtQuick.Layouts import, which we'll cover shortly.
+
+Next, import the Qt Quick Controls module.
+Among other things, this provides access to ``ApplicationWindow``, which replaces the existing
+root type, Window:
+
+Let's step through the ``chat.qml`` file.
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 44-49
+
+``ApplicationWindow`` is a Window with some added convenience for creating a header and a footer.
+It also provides the foundation for popups and supports some basic styling, such as the background
+color.
+
+There are three properties that are almost always set when using ApplicationWindow: ``width``,
+``height``, and ``visible``.
+Once we've set these, we have a properly sized, empty window ready to be filled with content.
+
+There are two ways of laying out items in QML: `Item Positioners`_ and `Qt Quick Layouts`_.
+
+- Item positioners (`Row`_, `Column`_, and so on) are useful for situations where the size of items
+ is known or fixed, and all that is required is to neatly position them in a certain formation.
+- The layouts in Qt Quick Layouts can both position and resize items, making them well suited for
+ resizable user interfaces.
+ Below, we use `ColumnLayout`_ to vertically lay out a `ListView`_ and a `Pane`_.
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 50-53
+
+Pane is basically a rectangle whose color comes from the application's style.
+It's similar to `Frame`_, but it has no stroke around its border.
+
+Items that are direct children of a layout have various `attached properties`_ available to them.
+We use `Layout.fillWidth`_ and `Layout.fillHeight`_ on the `ListView`_ to ensure that it takes as
+much space within the `ColumnLayout`_ as it can, and the same is done for the Pane.
+As `ColumnLayout`_ is a vertical layout, there aren't any items to the left or right of each child,
+so this results in each item consuming the entire width of the layout.
+
+On the other hand, the `Layout.fillHeight`_ statement in the `ListView`_ enables it to occupy the
+remaining space that is left after accommodating the Pane.
+
+.. _Item Positioners: https://doc.qt.io/qt-5/qtquick-positioning-layouts.html
+.. _Qt Quick Layouts: https://doc.qt.io/qt-5/qtquicklayouts-index.html
+.. _Row: https://doc.qt.io/qt-5/qml-qtquick-row.html
+.. _Column: https://doc.qt.io/qt-5/qml-qtquick-column.html
+.. _ColumnLayout: https://doc.qt.io/qt-5/qml-qtquick-layouts-columnlayout.html
+.. _ListView: https://doc.qt.io/qt-5/qml-qtquick-listview.html
+.. _Pane: https://doc.qt.io/qt-5/qml-qtquick-controls2-pane.html
+.. _Frame: https://doc.qt.io/qt-5/qml-qtquick-controls2-frame.html
+.. _attached properties: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html
+.. _Layout.fillWidth: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillWidth-attached-prop
+.. _Layout.fillHeight: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillHeight-attached-prop
+.. _ListView: https://doc.qt.io/qt-5/qml-qtquick-listview.html
+.. _Qt Quick QML Types: https://doc.qt.io/qt-5/qtquick-qmlmodule.html
+
+Let's look at the ``Listview`` in detail:
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 53-99
+
+After filling the ``width`` and ``height`` of its parent, we also set some margins on the view.
+
+
+Next, we set `displayMarginBeginning`_ and `displayMarginEnd`_.
+These properties ensure that the delegates outside the view don't disappear when you
+scroll at the edges of the view.
+To get a better understanding, consider commenting out the properties and then rerun your code.
+Now watch what happens when you scroll the view.
+
+We then flip the vertical direction of the view, so that first items are at the bottom.
+
+Additionally, messages sent by the contact should be distinguished from those sent by a contact.
+For now, when a message is sent by you, we set a ``sentByMe`` property, to alternate between
+different contacts.
+Using this property, we distinguish between different contacts in two ways:
+
+* Messages sent by the contact are aligned to the right side of the screen by setting
+ ``anchors.right`` to ``parent.right``.
+* We change the color of the rectangle depending on the contact.
+ Since we don't want to display dark text on a dark background, and vice versa, we also set the
+ text color depending on who the contact is.
+
+At the bottom of the screen, we place a `TextArea`_ item to allow multi-line text input, and a
+button to send the message.
+We use Pane to cover the area under these two items:
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 101-125
+
+The `TextArea`_ should fill the available width of the screen.
+We assign some placeholder text to provide a visual cue to the contact as to where they should begin
+typing.
+The text within the input area is wrapped to ensure that it does not go outside of the screen.
+
+Lastly, we have a button that allows us to call the ``send_message`` method we defined on
+``sqlDialog.py``, since we're just having a mock up example here and there is only one possible
+recipient and one possible sender for this conversation we're just using strings here.
+
+.. _displayMarginBeginning: https://doc.qt.io/qt-5/qml-qtquick-listview.html#displayMarginBeginning-prop
+.. _displayMarginEnd: https://doc.qt.io/qt-5/qml-qtquick-listview.html#displayMarginEnd-prop
+.. _TextArea: https://doc.qt.io/qt-5/qml-qtquick-controls2-textarea.html
+
+
+main.py
+-------
+
+We use ``logging`` instead of Python's ``print()``, because it provides a better way to control the
+messages levels that our application will generate (errors, warnings, and information messages).
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 40-50
+
+``connectToDatabase()`` creates a connection with the SQLite database, creating the actual file
+if it doesn't already exist.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 53-72
+
+
+
+A few interesting things happen in the ``main`` function:
+
+- Declaring a :ref:`QGuiApplication`.
+ You should use a :ref:`QGuiApplication` instead of :ref:`QApplication` because we're not
+ using the **QtWidgets** module.
+- Connecting to the database,
+- Declaring a :ref:`QQmlApplicationEngine`.
+ This allows you to access the QML context property to connect Python
+ and QML from the conversation model we built on ``sqlDialog.py``.
+- Loading the ``.qml`` file that defines the UI.
+
+Finally, the Qt application runs, and your program starts.
+
+ .. literalinclude:: main.py
+ :linenos:
+ :lines: 75-85
+
+.. image:: example_list_view.png
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py b/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py
new file mode 100644
index 000000000..a9745051b
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py
@@ -0,0 +1,146 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Qt for Python project.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import datetime
+import logging
+
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtSql import QSqlDatabase, QSqlQuery, QSqlRecord, QSqlTableModel
+
+table_name = "Conversations"
+
+
+def createTable():
+ if table_name in QSqlDatabase.database().tables():
+ return
+
+ query = QSqlQuery()
+ if not query.exec_(
+ """
+ CREATE TABLE IF NOT EXISTS 'Conversations' (
+ 'author' TEXT NOT NULL,
+ 'recipient' TEXT NOT NULL,
+ 'timestamp' TEXT NOT NULL,
+ 'message' TEXT NOT NULL,
+ FOREIGN KEY('author') REFERENCES Contacts ( name ),
+ FOREIGN KEY('recipient') REFERENCES Contacts ( name )
+ )
+ """
+ ):
+ logging.error("Failed to query database")
+
+ # This adds the first message from the Bot
+ # and further development is required to make it interactive.
+ query.exec_(
+ """
+ INSERT INTO Conversations VALUES(
+ 'machine', 'Me', '2019-01-07T14:36:06', 'Hello!'
+ )
+ """
+ )
+ logging.info(query)
+
+
+class SqlConversationModel(QSqlTableModel):
+ def __init__(self, parent=None):
+ super(SqlConversationModel, self).__init__(parent)
+
+ createTable()
+ self.setTable(table_name)
+ self.setSort(2, Qt.DescendingOrder)
+ self.setEditStrategy(QSqlTableModel.OnManualSubmit)
+ self.recipient = ""
+
+ self.select()
+ logging.debug("Table was loaded successfully.")
+
+ def setRecipient(self, recipient):
+ if recipient == self.recipient:
+ pass
+
+ self.recipient = recipient
+
+ filter_str = (
+ "(recipient = '{}' AND author = 'Me') OR " "(recipient = 'Me' AND author='{}')"
+ ).format(self.recipient)
+ self.setFilter(filter_str)
+ self.select()
+
+ def data(self, index, role):
+ if role < Qt.UserRole:
+ return QSqlTableModel.data(self, index, role)
+
+ sql_record = QSqlRecord()
+ sql_record = self.record(index.row())
+
+ return sql_record.value(role - Qt.UserRole)
+
+ def roleNames(self):
+ """Converts dict to hash because that's the result expected
+ by QSqlTableModel"""
+ names = {}
+ author = "author".encode()
+ recipient = "recipient".encode()
+ timestamp = "timestamp".encode()
+ message = "message".encode()
+
+ names[hash(Qt.UserRole)] = author
+ names[hash(Qt.UserRole + 1)] = recipient
+ names[hash(Qt.UserRole + 2)] = timestamp
+ names[hash(Qt.UserRole + 3)] = message
+
+ return names
+
+ def send_message(self, recipient, message, author):
+ timestamp = datetime.datetime.now()
+
+ new_record = self.record()
+ new_record.setValue("author", author)
+ new_record.setValue("recipient", recipient)
+ new_record.setValue("timestamp", str(timestamp))
+ new_record.setValue("message", message)
+
+ logging.debug('Message: "{}" \n Received by: "{}"'.format(message, recipient))
+
+ if not self.insertRecord(self.rowCount(), new_record):
+ logging.error("Failed to send message: {}".format(self.lastError().text()))
+ return
+
+ self.submitAll()
+ self.select()
diff --git a/sources/pyside2/doc/typesystem_doc.xml.in b/sources/pyside6/doc/typesystem_doc.xml.in
index 94260fea0..94260fea0 100644
--- a/sources/pyside2/doc/typesystem_doc.xml.in
+++ b/sources/pyside6/doc/typesystem_doc.xml.in
diff --git a/sources/pyside2/doc/videos.rst b/sources/pyside6/doc/videos.rst
index 5c72c90df..5c72c90df 100644
--- a/sources/pyside2/doc/videos.rst
+++ b/sources/pyside6/doc/videos.rst
diff --git a/sources/pyside6/libpyside/CMakeLists.txt b/sources/pyside6/libpyside/CMakeLists.txt
new file mode 100644
index 000000000..33e23063b
--- /dev/null
+++ b/sources/pyside6/libpyside/CMakeLists.txt
@@ -0,0 +1,210 @@
+project(libpyside)
+
+if(${Qt${QT_MAJOR_VERSION}Qml_FOUND})
+ if(NOT "${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS}" MATCHES "/QtQml/")
+ string(REPLACE "/QtCore" "/QtQml" replaceme "${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}")
+ list(APPEND Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS ${replaceme})
+ list(REMOVE_DUPLICATES Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS)
+ endif()
+endif()
+
+if(${Qt${QT_MAJOR_VERSION}Quick_FOUND})
+ if(NOT "${Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS}" MATCHES "/QtQuick/")
+ string(REPLACE "/QtCore" "/QtQuick" replaceme "${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}")
+ list(APPEND Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS ${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS})
+ list(APPEND Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS ${replaceme})
+ list(REMOVE_DUPLICATES Qt${QT_MAJOR_VERSION}Quick_PRIVATE_INCLUDE_DIRS)
+ endif()
+endif()
+
+set(QML_PRIVATE_API_SUPPORT 0)
+if(Qt${QT_MAJOR_VERSION}Qml_FOUND)
+ # Used for registering custom QQuickItem classes defined in Python code.
+ set(QML_SUPPORT 1)
+ set(QML_INCLUDES ${Qt${QT_MAJOR_VERSION}Qml_INCLUDE_DIRS})
+ set(QML_LIBRARIES ${Qt${QT_MAJOR_VERSION}Qml_LIBRARIES})
+
+ if(Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS)
+ # Used for transforming QML exceptions into Python exceptions.
+ set(QML_PRIVATE_API_SUPPORT 1)
+ set(QML_INCLUDES ${QML_INCLUDES} ${Qt${QT_MAJOR_VERSION}Qml_PRIVATE_INCLUDE_DIRS})
+ else()
+ message(WARNING "QML private API include files could not be found, support for catching QML exceptions inside Python code will not work.")
+ endif()
+else()
+ set(QML_SUPPORT 0)
+ set(QML_PRIVATE_API_SUPPORT 0)
+ set(QML_INCLUDES "")
+ set(QML_LIBRARIES "")
+endif()
+
+set(libpyside_SRC
+ class_property.cpp
+ dynamicqmetaobject.cpp
+ feature_select.cpp
+ signalmanager.cpp
+ globalreceiverv2.cpp
+ pysideclassinfo.cpp
+ pysideqenum.cpp
+ pysidemetafunction.cpp
+ pysidesignal.cpp
+ pysideslot.cpp
+ pysideproperty.cpp
+ pysideqflags.cpp
+ pysideweakref.cpp
+ pyside.cpp
+ pysidestaticstrings.cpp
+)
+
+# Add python files to project explorer in Qt Creator, when opening the CMakeLists.txt as a project,
+# so you can look up python files with the Locator.
+macro(add_other_files)
+ foreach(_it ${ARGN})
+ if(NOT IS_DIRECTORY ${_it})
+ get_filename_component(name ${_it} NAME)
+ if(NOT ${_it} MATCHES "^/\\\\..*$;~$")
+ set_source_files_properties(${_it} PROPERTIES HEADER_FILE_ONLY TRUE)
+ endif()
+ endif()
+ endforeach()
+endmacro()
+
+# Test files.
+file(GLOB_RECURSE pyside_folder_py_files "../*.py")
+
+# Mostly for setup.py.
+file(GLOB setup_folder_py_files "../../../*.py")
+
+set(other_files ${pyside_folder_py_files} ${setup_folder_py_files})
+add_other_files(${other_files})
+
+add_library(pyside6 SHARED ${libpyside_SRC} ${other_files})
+add_library(PySide6::pyside6 ALIAS pyside6)
+
+target_include_directories(pyside6 PRIVATE
+ ${QML_INCLUDES}
+ ${Qt${QT_MAJOR_VERSION}Core_PRIVATE_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+)
+
+target_include_directories(pyside6 PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include/PySide6>
+)
+
+target_link_libraries(pyside6
+ PRIVATE Shiboken6::libshiboken
+ PRIVATE ${QML_LIBRARIES}
+ PRIVATE ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES})
+
+set_target_properties(pyside6 PROPERTIES
+ VERSION ${BINDING_API_VERSION}
+ SOVERSION "${PYSIDE_SO_VERSION}"
+ OUTPUT_NAME "pyside6${pyside6_SUFFIX}${SHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX}"
+ DEFINE_SYMBOL BUILD_LIBPYSIDE)
+
+if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
+ set_property(TARGET pyside6 PROPERTY CXX_STANDARD 17)
+else()
+ set_property(TARGET pyside6 PROPERTY CXX_STANDARD 11)
+endif()
+
+if(QML_SUPPORT)
+ target_compile_definitions(pyside6 PUBLIC PYSIDE_QML_SUPPORT=1)
+endif()
+target_compile_definitions(pyside6 PRIVATE PYSIDE_QML_PRIVATE_API_SUPPORT=${QML_PRIVATE_API_SUPPORT})
+
+if(PYSIDE_QT_CONF_PREFIX)
+ set_property(SOURCE pyside.cpp
+ APPEND
+ PROPERTY COMPILE_DEFINITIONS
+ PYSIDE_QT_CONF_PREFIX=${PYSIDE_QT_CONF_PREFIX})
+endif()
+
+#
+# install stuff
+#
+
+set(libpyside_HEADERS
+ class_property.h
+ dynamicqmetaobject.h
+ feature_select.h
+ pysideclassinfo.h
+ pysideqenum.h
+ pysidemacros.h
+ signalmanager.h
+ pyside.h
+ pysidestaticstrings.h
+ pysidemetafunction.h
+ pysidesignal.h
+ pysideproperty.h
+ pysideqflags.h
+ pysideweakref.h
+)
+
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
+else()
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
+endif()
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII")
+
+# create pkg-config file
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pyside6.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/pyside6${pyside6_SUFFIX}.pc" @ONLY)
+
+# for creating cmake-config files
+include(CMakePackageConfigHelpers)
+
+# Build-tree / super project package config file.
+set(PYSIDE_PYTHONPATH "${pysidebindings_BINARY_DIR}/PySide6")
+set(PYSIDE_TYPESYSTEMS "${pysidebindings_SOURCE_DIR}/PySide6/templates/")
+set(PYSIDE_GLUE "${pysidebindings_SOURCE_DIR}/PySide6/glue")
+
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/PySide6Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
+ PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
+ INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+set(PYSIDE_PYTHONPATH "${PYTHON_SITE_PACKAGES}/PySide6")
+set(PYSIDE_TYPESYSTEMS "${CMAKE_INSTALL_PREFIX}/share/PySide6${pyside6_SUFFIX}/typesystems")
+set(PYSIDE_GLUE "${CMAKE_INSTALL_PREFIX}/share/PySide6${pyside6_SUFFIX}/glue")
+
+# Install-tree / relocatable package config file.
+configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/PySide6Config-spec.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/install/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ INSTALL_DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}"
+ PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
+)
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide6Config.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config.cmake" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide6ConfigVersion.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/PySide6ConfigVersion.cmake" @ONLY)
+
+install(FILES ${libpyside_HEADERS}
+ DESTINATION include/${BINDING_NAME}${pyside6_SUFFIX})
+
+install(TARGETS pyside6 EXPORT PySide6Targets
+ LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
+ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
+ RUNTIME DESTINATION bin)
+install(EXPORT PySide6Targets NAMESPACE PySide6::
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside6${pyside6_SUFFIX}.pc"
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide6ConfigVersion.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6-${BINDING_API_VERSION}")
diff --git a/sources/pyside6/libpyside/PySide6Config-spec.cmake.in b/sources/pyside6/libpyside/PySide6Config-spec.cmake.in
new file mode 100644
index 000000000..fd3de1e75
--- /dev/null
+++ b/sources/pyside6/libpyside/PySide6Config-spec.cmake.in
@@ -0,0 +1,16 @@
+# PYSIDE_PYTHONPATH - Path to where the PySide6 Python module files could be found
+# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide6
+# PYSIDE_GLUE - Path to module glue files.
+
+@PACKAGE_INIT@
+
+# Import targets only when using an installed PySide6 config file (so not during a regular
+# PySide6 build, or during a super project build).
+if (NOT TARGET PySide6::pyside6)
+ include("${CMAKE_CURRENT_LIST_DIR}/PySide6Targets.cmake")
+endif()
+
+# Set relocatable variables.
+set_and_check(PYSIDE_PYTHONPATH "@PACKAGE_PYSIDE_PYTHONPATH@")
+set_and_check(PYSIDE_TYPESYSTEMS "@PACKAGE_PYSIDE_TYPESYSTEMS@")
+set_and_check(PYSIDE_GLUE "@PACKAGE_PYSIDE_GLUE@")
diff --git a/sources/pyside6/libpyside/PySide6Config.cmake.in b/sources/pyside6/libpyside/PySide6Config.cmake.in
new file mode 100644
index 000000000..037a5c44f
--- /dev/null
+++ b/sources/pyside6/libpyside/PySide6Config.cmake.in
@@ -0,0 +1,5 @@
+if (NOT PYTHON_CONFIG_SUFFIX)
+ message(STATUS "PySide6Config: Using default python: @SHIBOKEN_PYTHON_CONFIG_SUFFIX@")
+ SET(PYTHON_CONFIG_SUFFIX @SHIBOKEN_PYTHON_CONFIG_SUFFIX@)
+endif()
+include(${CMAKE_CURRENT_LIST_DIR}/PySide6Config${PYTHON_CONFIG_SUFFIX}.cmake)
diff --git a/sources/pyside2/libpyside/PySide2ConfigVersion.cmake.in b/sources/pyside6/libpyside/PySide6ConfigVersion.cmake.in
index f5073ce08..f5073ce08 100644
--- a/sources/pyside2/libpyside/PySide2ConfigVersion.cmake.in
+++ b/sources/pyside6/libpyside/PySide6ConfigVersion.cmake.in
diff --git a/sources/pyside6/libpyside/class_property.cpp b/sources/pyside6/libpyside/class_property.cpp
new file mode 100644
index 000000000..edbb63769
--- /dev/null
+++ b/sources/pyside6/libpyside/class_property.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pyside.h"
+#include "pysidestaticstrings.h"
+#include "feature_select.h"
+#include "class_property.h"
+
+#include <shiboken.h>
+#include <sbkstaticstrings.h>
+
+extern "C" {
+
+/*
+ * A `classproperty` is the same as a `property` but the `__get__()` and `__set__()`
+ * methods are modified to always use the object class instead of a concrete instance.
+ *
+ * Note: A "static property" as it is often called does not exist per se.
+ * Static methods do not receive anything when created. Static methods which
+ * should participate in a property must be turned into class methods, before.
+ * See function `createProperty` in `feature_select.cpp`.
+ */
+
+// `class_property.__get__()`: Always pass the class instead of the instance.
+static PyObject *PyClassProperty_get(PyObject *self, PyObject * /*ob*/, PyObject *cls)
+{
+ return PyProperty_Type.tp_descr_get(self, cls, cls);
+}
+
+// `class_property.__set__()`: Just like the above `__get__()`.
+static int PyClassProperty_set(PyObject *self, PyObject *obj, PyObject *value)
+{
+ PyObject *cls = PyType_Check(obj) ? obj : reinterpret_cast<PyObject *>(Py_TYPE(obj));
+ return PyProperty_Type.tp_descr_set(self, cls, value);
+}
+
+// The property `__doc__` default does not work for class properties
+// because PyProperty_Type.tp_init thinks this is a subclass which needs PyObject_SetAttr.
+// We call `__init__` while pretending to be a PyProperty_Type instance.
+static int PyClassProperty_init(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ auto hold = Py_TYPE(self);
+ Py_TYPE(self) = &PyProperty_Type;
+ auto ret = PyProperty_Type.tp_init(self, args, kwargs);
+ Py_TYPE(self) = hold;
+ return ret;
+}
+
+static PyType_Slot PyClassProperty_slots[] = {
+ {Py_tp_getset, nullptr}, // will be set below
+ {Py_tp_base, reinterpret_cast<void *>(&PyProperty_Type)},
+ {Py_tp_descr_get, reinterpret_cast<void *>(PyClassProperty_get)},
+ {Py_tp_descr_set, reinterpret_cast<void *>(PyClassProperty_set)},
+ {Py_tp_init, reinterpret_cast<void *>(PyClassProperty_init)},
+ {0, 0}
+};
+
+static PyType_Spec PyClassProperty_spec = {
+ "PySide6.PyClassProperty",
+ sizeof(propertyobject),
+ 0,
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
+ PyClassProperty_slots,
+};
+
+PyTypeObject *PyClassPropertyTypeF()
+{
+ static PyTypeObject *type = nullptr;
+ if (type == nullptr) {
+ // Provide the same `tp_getset`, which is not inherited.
+ PyClassProperty_slots[0].pfunc = PyProperty_Type.tp_getset;
+ type = reinterpret_cast<PyTypeObject *>(
+ PyType_FromSpec(&PyClassProperty_spec));
+ }
+ return type;
+}
+
+/*
+ * Types with class properties need to handle `Type.class_prop = x` in a specific way.
+ * By default, Python replaces the `class_property` itself, but for wrapped C++ types
+ * we need to call `class_property.__set__()` in order to propagate the new value to
+ * the underlying C++ data structure.
+ */
+static int SbkObjectType_meta_setattro(PyObject *obj, PyObject *name, PyObject *value)
+{
+ // Use `_PepType_Lookup()` instead of `PyObject_GetAttr()` in order to get the raw
+ // descriptor (`property`) instead of calling `tp_descr_get` (`property.__get__()`).
+ auto type = reinterpret_cast<PyTypeObject *>(obj);
+ PyObject *descr = _PepType_Lookup(type, name);
+
+ // The following assignment combinations are possible:
+ // 1. `Type.class_prop = value` --> descr_set: `Type.class_prop.__set__(value)`
+ // 2. `Type.class_prop = other_class_prop` --> setattro: replace existing `class_prop`
+ // 3. `Type.regular_attribute = value` --> setattro: regular attribute assignment
+ const auto class_prop = reinterpret_cast<PyObject *>(PyClassPropertyTypeF());
+ const auto call_descr_set = descr && PyObject_IsInstance(descr, class_prop)
+ && !PyObject_IsInstance(value, class_prop);
+ if (call_descr_set) {
+ // Call `class_property.__set__()` instead of replacing the `class_property`.
+ return Py_TYPE(descr)->tp_descr_set(descr, obj, value);
+ } else {
+ // Replace existing attribute.
+ return PyType_Type.tp_setattro(obj, name, value);
+ }
+}
+
+} // extern "C"
+
+/*
+ * These functions are added to the SbkObjectType_TypeF() dynamically.
+ */
+namespace PySide { namespace ClassProperty {
+
+void init()
+{
+ PyTypeObject *type = SbkObjectType_TypeF();
+ type->tp_setattro = SbkObjectType_meta_setattro;
+ Py_TYPE(PyClassPropertyTypeF()) = type;
+}
+
+} // namespace ClassProperty
+} // namespace PySide
diff --git a/sources/pyside2/libpyside/class_property.h b/sources/pyside6/libpyside/class_property.h
index f94fdde31..f94fdde31 100644
--- a/sources/pyside2/libpyside/class_property.h
+++ b/sources/pyside6/libpyside/class_property.h
diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
new file mode 100644
index 000000000..d63fa281b
--- /dev/null
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
@@ -0,0 +1,588 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dynamicqmetaobject.h"
+#include "dynamicqmetaobject_p.h"
+#include "pysidesignal.h"
+#include "pysidesignal_p.h"
+#include "pysideproperty.h"
+#include "pysideproperty_p.h"
+#include "pysideslot_p.h"
+#include "pysideqenum.h"
+
+#include <shiboken.h>
+
+#include <QtCore/QByteArray>
+#include <QtCore/QObject>
+#include <QtCore/QStringList>
+#include <QtCore/QTextStream>
+#include <QtCore/QVector>
+#include <private/qmetaobjectbuilder_p.h>
+
+#include <cstring>
+#include <vector>
+
+using namespace PySide;
+
+// MetaObjectBuilder: Provides the QMetaObject's returned by
+// QObject::metaObject() for PySide6 objects. There are several
+// scenarios to consider:
+// 1) A plain Qt class (say QTimer) is instantiated. In that case,
+// return the base meta object until a modification is made by
+// adding methods, properties or class info (cf qmetaobject_test.py).
+// In that case, instantiate a QMetaObjectBuilder inheriting the
+// base meta meta object, add the method and return the result
+// of QMetaObjectBuilder::toMetaObject() (with dirty handling should
+// further modifications be made).
+// 2) A Python class inheriting a Qt class is instantiated. For this,
+// instantiate a QMetaObjectBuilder and add the methods/properties
+// found by inspecting the Python class.
+
+class MetaObjectBuilderPrivate
+{
+public:
+ using MetaObjects = std::vector<const QMetaObject *>;
+
+ QMetaObjectBuilder *ensureBuilder();
+ void parsePythonType(PyTypeObject *type);
+ int indexOfMethod(QMetaMethod::MethodType mtype,
+ const QByteArray &signature) const;
+ int indexOfProperty(const QByteArray &name) const;
+ int addSlot(const QByteArray &signature);
+ int addSlot(const QByteArray &signature, const QByteArray &type);
+ int addSignal(const QByteArray &signature);
+ void removeMethod(QMetaMethod::MethodType mtype, int index);
+ int getPropertyNotifyId(PySideProperty *property) const;
+ int addProperty(const QByteArray &property, PyObject *data);
+ void addInfo(const QByteArray &key, const QByteArray &value);
+ void addInfo(const QMap<QByteArray, QByteArray> &info);
+ void addEnumerator(const char *name,
+ bool flag,
+ bool scoped,
+ const QVector<QPair<QByteArray, int> > &entries);
+ void removeProperty(int index);
+ const QMetaObject *update();
+
+ QMetaObjectBuilder *m_builder = nullptr;
+
+ const QMetaObject *m_baseObject = nullptr;
+ MetaObjects m_cachedMetaObjects;
+ bool m_dirty = true;
+};
+
+QMetaObjectBuilder *MetaObjectBuilderPrivate::ensureBuilder()
+{
+ if (!m_builder) {
+ m_builder = new QMetaObjectBuilder();
+ m_builder->setClassName(m_baseObject->className());
+ m_builder->setSuperClass(m_baseObject);
+ }
+ return m_builder;
+}
+
+MetaObjectBuilder::MetaObjectBuilder(const char *className, const QMetaObject *metaObject) :
+ m_d(new MetaObjectBuilderPrivate)
+{
+ m_d->m_baseObject = metaObject;
+ m_d->m_builder = new QMetaObjectBuilder();
+ m_d->m_builder->setClassName(className);
+ m_d->m_builder->setSuperClass(metaObject);
+ m_d->m_builder->setClassName(className);
+}
+
+MetaObjectBuilder::MetaObjectBuilder(PyTypeObject *type, const QMetaObject *metaObject)
+ : m_d(new MetaObjectBuilderPrivate)
+{
+ m_d->m_baseObject = metaObject;
+ const char *className = type->tp_name;
+ if (const char *lastDot = strrchr(type->tp_name, '.'))
+ className = lastDot + 1;
+ // Different names indicate a Python class inheriting a Qt class.
+ // Parse the type.
+ if (strcmp(className, metaObject->className()) != 0) {
+ m_d->m_builder = new QMetaObjectBuilder();
+ m_d->m_builder->setClassName(className);
+ m_d->m_builder->setSuperClass(metaObject);
+ m_d->parsePythonType(type);
+ }
+}
+
+MetaObjectBuilder::~MetaObjectBuilder()
+{
+ for (auto *metaObject : m_d->m_cachedMetaObjects)
+ free(const_cast<QMetaObject*>(metaObject));
+ delete m_d->m_builder;
+ delete m_d;
+}
+
+int MetaObjectBuilderPrivate::indexOfMethod(QMetaMethod::MethodType mtype,
+ const QByteArray &signature) const
+{
+ int result = -1;
+ if (m_builder) {
+ switch (mtype) {
+ case QMetaMethod::Signal:
+ result = m_builder->indexOfSignal(signature);
+ break;
+ case QMetaMethod::Slot:
+ result = m_builder->indexOfSlot(signature);
+ break;
+ case QMetaMethod::Constructor:
+ result = m_builder->indexOfConstructor(signature);
+ break;
+ case QMetaMethod::Method:
+ result = m_builder->indexOfMethod(signature);
+ break;
+ }
+ if (result >= 0)
+ return result + m_baseObject->methodCount();
+ }
+ switch (mtype) {
+ case QMetaMethod::Signal:
+ result = m_baseObject->indexOfSignal(signature);
+ break;
+ case QMetaMethod::Slot:
+ result = m_baseObject->indexOfSlot(signature);
+ break;
+ case QMetaMethod::Constructor:
+ result = m_baseObject->indexOfConstructor(signature);
+ break;
+ case QMetaMethod::Method:
+ result = m_baseObject->indexOfMethod(signature);
+ break;
+ }
+ return result;
+}
+
+int MetaObjectBuilder::indexOfMethod(QMetaMethod::MethodType mtype,
+ const QByteArray &signature) const
+{
+ return m_d->indexOfMethod(mtype, signature);
+}
+
+int MetaObjectBuilderPrivate::indexOfProperty(const QByteArray &name) const
+{
+ if (m_builder) {
+ const int result = m_builder->indexOfProperty(name);
+ if (result >= 0)
+ return m_baseObject->propertyCount() + result;
+ }
+ return m_baseObject->indexOfProperty(name);
+}
+
+int MetaObjectBuilder::indexOfProperty(const QByteArray &name) const
+{
+ return m_d->indexOfProperty(name);
+}
+
+static bool checkMethodSignature(const QByteArray &signature)
+{
+ // Common mistake not to add parentheses to the signature.
+ const int openParen = signature.indexOf('(');
+ const int closingParen = signature.lastIndexOf(')');
+ const bool ok = openParen != -1 && closingParen != -1 && openParen < closingParen;
+ if (!ok) {
+ const QByteArray message =
+ "MetaObjectBuilder::addMethod: Invalid method signature provided for \""
+ + signature + '"';
+ PyErr_WarnEx(PyExc_RuntimeWarning, message.constData(), 0);
+ }
+ return ok;
+}
+
+int MetaObjectBuilderPrivate::addSlot(const QByteArray &signature)
+{
+ if (!checkMethodSignature(signature))
+ return -1;
+ m_dirty = true;
+ return m_baseObject->methodCount()
+ + ensureBuilder()->addSlot(signature).index();
+}
+
+int MetaObjectBuilder::addSlot(const char *signature)
+{
+ return m_d->addSlot(signature);
+}
+
+int MetaObjectBuilderPrivate::addSlot(const QByteArray &signature,
+ const QByteArray &type)
+{
+ if (!checkMethodSignature(signature))
+ return -1;
+ m_dirty = true;
+ QMetaMethodBuilder methodBuilder = ensureBuilder()->addSlot(signature);
+ methodBuilder.setReturnType(type);
+ return m_baseObject->methodCount() + methodBuilder.index();
+}
+
+int MetaObjectBuilder::addSlot(const char *signature, const char *type)
+{
+ return m_d->addSlot(signature, type);
+}
+
+int MetaObjectBuilderPrivate::addSignal(const QByteArray &signature)
+{
+ if (!checkMethodSignature(signature))
+ return -1;
+ m_dirty = true;
+ return m_baseObject->methodCount()
+ + ensureBuilder()->addSignal(signature).index();
+}
+
+int MetaObjectBuilder::addSignal(const char *signature)
+{
+ return m_d->addSignal(signature);
+}
+
+void MetaObjectBuilderPrivate::removeMethod(QMetaMethod::MethodType mtype,
+ int index)
+{
+ index -= m_baseObject->methodCount();
+ auto builder = ensureBuilder();
+ Q_ASSERT(index >= 0 && index < builder->methodCount());
+ switch (mtype) {
+ case QMetaMethod::Constructor:
+ builder->removeConstructor(index);
+ break;
+ default:
+ builder->removeMethod(index);
+ break;
+ }
+ m_dirty = true;
+}
+
+void MetaObjectBuilder::removeMethod(QMetaMethod::MethodType mtype, int index)
+{
+ m_d->removeMethod(mtype, index);
+}
+
+int MetaObjectBuilderPrivate::getPropertyNotifyId(PySideProperty *property) const
+{
+ int notifyId = -1;
+ if (property->d->notify) {
+ if (const char *signalNotify = PySide::Property::getNotifyName(property))
+ notifyId = indexOfMethod(QMetaMethod::Signal, signalNotify);
+ }
+ return notifyId;
+}
+
+int MetaObjectBuilderPrivate::addProperty(const QByteArray &propertyName,
+ PyObject *data)
+{
+ int index = indexOfProperty(propertyName);
+ if (index != -1)
+ return index;
+
+ PySideProperty *property = reinterpret_cast<PySideProperty *>(data);
+ int propertyNotifyId = getPropertyNotifyId(property);
+ if (propertyNotifyId >= 0)
+ propertyNotifyId -= m_baseObject->methodCount();
+ auto newProperty =
+ ensureBuilder()->addProperty(propertyName, property->d->typeName,
+ propertyNotifyId);
+ // Adding property attributes
+ newProperty.setReadable(PySide::Property::isReadable(property));
+ newProperty.setWritable(PySide::Property::isWritable(property));
+ newProperty.setResettable(PySide::Property::hasReset(property));
+ newProperty.setDesignable(PySide::Property::isDesignable(property));
+ newProperty.setScriptable(PySide::Property::isScriptable(property));
+ newProperty.setStored(PySide::Property::isStored(property));
+ newProperty.setUser(PySide::Property::isUser(property));
+ newProperty.setConstant(PySide::Property::isConstant(property));
+ newProperty.setFinal(PySide::Property::isFinal(property));
+
+ index = newProperty.index() + m_baseObject->propertyCount();
+ m_dirty = true;
+ return index;
+}
+
+int MetaObjectBuilder::addProperty(const char *property, PyObject *data)
+{
+ return m_d->addProperty(property, data);
+}
+
+void MetaObjectBuilderPrivate::addInfo(const QByteArray &key,
+ const QByteArray &value)
+{
+ ensureBuilder()->addClassInfo(key, value);
+ m_dirty = true;
+}
+
+void MetaObjectBuilder::addInfo(const char *key, const char *value)
+{
+ m_d->addInfo(key, value);
+}
+
+void MetaObjectBuilderPrivate::addInfo(const QMap<QByteArray, QByteArray> &info)
+{
+ auto builder = ensureBuilder();
+ for (auto i = info.constBegin(), end = info.constEnd(); i != end; ++i)
+ builder->addClassInfo(i.key(), i.value());
+ m_dirty = true;
+}
+
+void MetaObjectBuilder::addInfo(const QMap<QByteArray, QByteArray> &info)
+{
+ m_d->addInfo(info);
+}
+
+void MetaObjectBuilder::addEnumerator(const char *name, bool flag, bool scoped,
+ const QVector<QPair<QByteArray, int> > &entries)
+{
+ m_d->addEnumerator(name, flag, scoped, entries);
+}
+
+void MetaObjectBuilderPrivate::addEnumerator(const char *name, bool flag, bool scoped,
+ const QVector<QPair<QByteArray, int> > &entries)
+{
+ auto builder = ensureBuilder();
+ int have_already = builder->indexOfEnumerator(name);
+ if (have_already >= 0)
+ builder->removeEnumerator(have_already);
+ auto enumbuilder = builder->addEnumerator(name);
+ enumbuilder.setIsFlag(flag);
+ enumbuilder.setIsScoped(scoped);
+
+ for (auto item : entries)
+ enumbuilder.addKey(item.first, item.second);
+ m_dirty = true;
+}
+
+void MetaObjectBuilderPrivate::removeProperty(int index)
+{
+ index -= m_baseObject->propertyCount();
+ auto builder = ensureBuilder();
+ Q_ASSERT(index >= 0 && index < builder->propertyCount());
+ builder->removeProperty(index);
+ m_dirty = true;
+}
+
+void MetaObjectBuilder::removeProperty(int index)
+{
+ m_d->removeProperty(index);
+}
+
+// PYSIDE-315: Instead of sorting the items and maybe breaking indices, we
+// ensure that the signals and slots are sorted by the improved
+// parsePythonType() (signals must go before slots). The order can only
+// become distorted if the class is modified after creation. In that
+// case, we give a warning.
+
+static QString msgMethodSortOrder(const QMetaObject *mo, int offendingIndex)
+{
+ QString result;
+ QTextStream str(&result);
+ str << "\n\n*** Sort Warning ***\nSignals and slots in QMetaObject '"
+ << mo->className()
+ << "' are not ordered correctly, this may lead to issues.\n";
+ const int methodOffset = mo->methodOffset();
+ for (int m = methodOffset, methodCount = mo->methodCount(); m < methodCount; ++m) {
+ const auto method = mo->method(m);
+ str << (m - methodOffset + 1) << (m > offendingIndex ? '!' : ' ')
+ << (method.methodType() == QMetaMethod::Signal ? " Signal " : " Slot ")
+ << method.methodSignature() << '\n';
+ }
+ return result;
+}
+
+static void checkMethodOrder(const QMetaObject *metaObject)
+{
+ const int lastMethod = metaObject->methodCount() - 1;
+ for (int m = metaObject->methodOffset(); m < lastMethod; ++m) {
+ if (metaObject->method(m).methodType() == QMetaMethod::Slot
+ && metaObject->method(m + 1).methodType() == QMetaMethod::Signal) {
+ const auto message = msgMethodSortOrder(metaObject, m);
+ PyErr_WarnEx(PyExc_RuntimeWarning, qPrintable(message), 0);
+ // Prevent a warning from being turned into an error. We cannot easily unwind.
+ PyErr_Clear();
+ break;
+ }
+ }
+}
+
+const QMetaObject *MetaObjectBuilderPrivate::update()
+{
+ if (!m_builder)
+ return m_baseObject;
+ if (m_cachedMetaObjects.empty() || m_dirty) {
+ // PYSIDE-803: The dirty branch needs to be protected by the GIL.
+ // This was moved from SignalManager::retrieveMetaObject to here,
+ // which is only the update in "return builder->update()".
+ Shiboken::GilState gil;
+ m_cachedMetaObjects.push_back(m_builder->toMetaObject());
+ checkMethodOrder(m_cachedMetaObjects.back());
+ m_dirty = false;
+ }
+ return m_cachedMetaObjects.back();
+}
+
+const QMetaObject *MetaObjectBuilder::update()
+{
+ return m_d->update();
+}
+
+using namespace Shiboken;
+
+void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
+{
+ // Get all non-QObject-derived base types in method resolution order, filtering out the types
+ // that can't have signals, slots or properties.
+ // This enforces registering of all signals and slots at type parsing time, and not later at
+ // signal connection time, thus making sure no method indices change which would break
+ // existing connections.
+ const PyObject *mro = type->tp_mro;
+ const Py_ssize_t basesCount = PyTuple_GET_SIZE(mro);
+ PyTypeObject *qObjectType = Conversions::getPythonTypeObject("QObject*");
+
+ std::vector<PyTypeObject *> basesToCheck;
+ // Prepend the actual type that we are parsing.
+ basesToCheck.reserve(1u + basesCount);
+ basesToCheck.push_back(type);
+
+ auto sbkObjTypeF = reinterpret_cast<PyTypeObject *>(SbkObject_TypeF());
+ auto baseObjType = reinterpret_cast<PyTypeObject *>(&PyBaseObject_Type);
+ for (Py_ssize_t i = 0; i < basesCount; ++i) {
+ auto baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, i));
+ if (baseType != sbkObjTypeF && baseType != baseObjType
+ && PyType_IsSubtype(baseType, qObjectType) == 0) {
+ basesToCheck.push_back(baseType);
+ }
+ }
+
+ // PYSIDE-315: Handle all signals first, in all involved types.
+ // Leave the properties to be registered after signals because they may depend on
+ // notify signals.
+ for (PyTypeObject *baseType : basesToCheck) {
+ PyObject *attrs = baseType->tp_dict;
+ PyObject *key = nullptr;
+ PyObject *value = nullptr;
+ Py_ssize_t pos = 0;
+
+ while (PyDict_Next(attrs, &pos, &key, &value)) {
+ if (Signal::checkType(value)) {
+ // Register signals.
+ auto data = reinterpret_cast<PySideSignal *>(value);
+ if (data->data->signalName.isEmpty())
+ data->data->signalName = String::toCString(key);
+ for (const auto &s : data->data->signatures) {
+ const auto sig = data->data->signalName + '(' + s.signature + ')';
+ if (m_baseObject->indexOfSignal(sig) == -1) {
+ // Registering the parameterNames to the QMetaObject (PYSIDE-634)
+ // from:
+ // Signal(..., arguments=['...', ...]
+ // the arguments are now on data-data->signalArguments
+ if (!data->data->signalArguments->isEmpty()) {
+ m_builder->addSignal(sig).setParameterNames(*data->data->signalArguments);
+ } else {
+ m_builder->addSignal(sig);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ AutoDecRef slotAttrName(String::fromCString(PYSIDE_SLOT_LIST_ATTR));
+ // PYSIDE-315: Now take care of the rest.
+ // Signals and slots should be separated, unless the types are modified, later.
+ // We check for this using "is_sorted()". Sorting no longer happens at all.
+ for (PyTypeObject *baseType : basesToCheck) {
+ PyObject *attrs = baseType->tp_dict;
+ PyObject *key = nullptr;
+ PyObject *value = nullptr;
+ Py_ssize_t pos = 0;
+
+ while (PyDict_Next(attrs, &pos, &key, &value)) {
+ if (Property::checkType(value)) {
+ const int index = m_baseObject->indexOfProperty(String::toCString(key));
+ if (index == -1)
+ addProperty(String::toCString(key), value);
+ } else if (Py_TYPE(value)->tp_call != nullptr) {
+ // PYSIDE-198: PyFunction_Check does not work with Nuitka.
+ // Register slots.
+ if (PyObject_HasAttr(value, slotAttrName)) {
+ PyObject *signatureList = PyObject_GetAttr(value, slotAttrName);
+ for (Py_ssize_t i = 0, i_max = PyList_Size(signatureList); i < i_max; ++i) {
+ PyObject *pySignature = PyList_GET_ITEM(signatureList, i);
+ QByteArray signature(String::toCString(pySignature));
+ // Split the slot type and its signature.
+ QByteArray type;
+ const int spacePos = signature.indexOf(' ');
+ if (spacePos != -1) {
+ type = signature.left(spacePos);
+ signature.remove(0, spacePos + 1);
+ }
+ const int index = m_baseObject->indexOfSlot(signature);
+ if (index == -1) {
+ if (type.isEmpty() || type == "void")
+ addSlot(signature);
+ else
+ addSlot(signature, type);
+ }
+ }
+ }
+ }
+ }
+ }
+ // PYSIDE-957: Collect the delayed QEnums
+ auto collectedEnums = PySide::QEnum::resolveDelayedQEnums(type);
+ for (PyObject *obEnumType : collectedEnums) {
+ bool isFlag = PySide::QEnum::isFlag(obEnumType);
+ AutoDecRef obName(PyObject_GetAttr(obEnumType, PyMagicName::name()));
+ // Everything has been checked already in resolveDelayedQEnums.
+ // Therefore, we don't need to error-check here again.
+ auto name = String::toCString(obName);
+ AutoDecRef members(PyObject_GetAttr(obEnumType, PyMagicName::members()));
+ AutoDecRef items(PyMapping_Items(members));
+ Py_ssize_t nr_items = PySequence_Length(items);
+
+ QVector<QPair<QByteArray, int> > entries;
+ for (Py_ssize_t idx = 0; idx < nr_items; ++idx) {
+ AutoDecRef item(PySequence_GetItem(items, idx));
+ AutoDecRef key(PySequence_GetItem(item, 0));
+ AutoDecRef member(PySequence_GetItem(item, 1));
+ AutoDecRef value(PyObject_GetAttr(member, Shiboken::PyName::value()));
+ auto ckey = String::toCString(key);
+ auto ivalue = PyInt_AsSsize_t(value); // int/long cheating
+ auto thing = QPair<QByteArray, int>(ckey, int(ivalue));
+ entries.push_back(thing);
+ }
+ addEnumerator(name, isFlag, true, entries);
+ }
+}
diff --git a/sources/pyside2/libpyside/dynamicqmetaobject.h b/sources/pyside6/libpyside/dynamicqmetaobject.h
index 7279d5c26..7279d5c26 100644
--- a/sources/pyside2/libpyside/dynamicqmetaobject.h
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.h
diff --git a/sources/pyside2/libpyside/dynamicqmetaobject_p.h b/sources/pyside6/libpyside/dynamicqmetaobject_p.h
index 9199630b7..9199630b7 100644
--- a/sources/pyside2/libpyside/dynamicqmetaobject_p.h
+++ b/sources/pyside6/libpyside/dynamicqmetaobject_p.h
diff --git a/sources/pyside6/libpyside/feature_select.cpp b/sources/pyside6/libpyside/feature_select.cpp
new file mode 100644
index 000000000..d6d77a530
--- /dev/null
+++ b/sources/pyside6/libpyside/feature_select.cpp
@@ -0,0 +1,766 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "feature_select.h"
+#include "pyside.h"
+#include "pysidestaticstrings.h"
+#include "class_property.h"
+
+#include <shiboken.h>
+#include <sbkstaticstrings.h>
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PYSIDE-1019: Support switchable extensions
+//
+// This functionality is no longer implemented in the signature module, since
+// the PyCFunction getsets do not have to be modified any longer.
+// Instead, we simply exchange the complete class dicts. This is done in the
+// basewrapper.cpp file and in every generated `tp_(get|set)attro`.
+//
+// This is the general framework of the switchable extensions.
+// A maximum of eight features is planned so far. This seems to be enough.
+// More features are possible, but then we must somehow register the
+// extra `select_id`s above 255.
+//
+
+/*****************************************************************************
+
+ How Does This Feature Selection Work?
+ -------------------------------------
+
+The basic idea is to replace the `tp_dict` of a QObject derived type.
+This way, we can replace the methods of the class in no time.
+
+The crucial point to understand is how the `tp_dict` is actually accessed:
+When you type "QObject.__dict__", the descriptor of `SbkObjectType_Type`
+is called. This descriptor is per default unassigned, so the base class
+PyType_Type provides the tp_getset method `type_dict`:
+
+ static PyObject *
+ type_dict(PyTypeObject *type, void *context)
+ {
+ if (type->tp_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return PyDictProxy_New(type->tp_dict);
+ }
+
+In order to change that, we need to insert our own version into SbkObjectType:
+
+ static PyObject *Sbk_TypeGet___dict__(PyTypeObject *type, void *context)
+ {
+ auto dict = type->tp_dict;
+ if (dict == NULL)
+ Py_RETURN_NONE;
+ if (SelectFeatureSet != nullptr)
+ dict = SelectFeatureSet(type);
+ return PyDictProxy_New(dict);
+ }
+
+This way, the Python function `type_ready()` does not fill in the default,
+but uses our modified version. It a similar way, we overwrite type_getattro
+with our own version, again in SbkObjectType, replacing the default of
+PyType_Type.
+
+Now we can exchange the dict with a customized version.
+We have our own derived type `ChameleonDict` with additional attributes.
+These allow us to create a ring of dicts which can be rotated to the actual
+needed dict version:
+
+Every dict has a field `select_id` which is selected by the `from __feature__`
+import. The dicts are cyclic connected by the `dict_ring` field.
+
+When a class dict is required, now always `SelectFeatureSet` is called, which
+looks into the `__name__` attribute of the active module and decides which
+version of `tp_dict` is needed. Then the right dict is searched in the ring
+and created if not already there.
+
+Furthermore, we need to overwrite every `tp_(get|set)attro` with a version
+that switches dicts right before looking up methods.
+The dict changing must walk the whole `tp_mro` in order to change all names.
+
+This is everything that the following code does.
+
+*****************************************************************************/
+
+
+namespace PySide { namespace Feature {
+
+using namespace Shiboken;
+
+typedef bool(*FeatureProc)(PyTypeObject *type, PyObject *prev_dict, int id);
+
+static FeatureProc *featurePointer = nullptr;
+
+static PyObject *cached_globals = nullptr;
+static PyObject *last_select_id = nullptr;
+
+static PyObject *_fast_id_array[1 + 256] = {};
+// this will point to element 1 to allow indexing from -1
+static PyObject **fast_id_array;
+
+static inline PyObject *getFeatureSelectId()
+{
+ static PyObject *undef = fast_id_array[-1];
+ static PyObject *feature_dict = GetFeatureDict();
+ // these things are all borrowed
+ PyObject *globals = PyEval_GetGlobals();
+ if ( globals == nullptr
+ || globals == cached_globals)
+ return last_select_id;
+
+ PyObject *modname = PyDict_GetItem(globals, PyMagicName::name());
+ if (modname == nullptr)
+ return last_select_id;
+
+ PyObject *select_id = PyDict_GetItem(feature_dict, modname);
+ if ( select_id == nullptr
+ || !PyInt_Check(select_id) // int/long cheating
+ || select_id == undef)
+ return last_select_id;
+
+ cached_globals = globals;
+ last_select_id = select_id;
+ assert(PyInt_AsSsize_t(select_id) >= 0);
+ return select_id;
+}
+
+// Create a derived dict class
+static PyTypeObject *
+createDerivedDictType()
+{
+ // It is not easy to create a compatible dict object with the
+ // limited API. Easier is to use Python to create a derived
+ // type and to modify that a bit from the C code.
+ PyObject *ChameleonDict = PepRun_GetResult(R"CPP(if True:
+
+ class ChameleonDict(dict):
+ __slots__ = ("dict_ring", "select_id")
+
+ result = ChameleonDict
+
+ )CPP");
+ return reinterpret_cast<PyTypeObject *>(ChameleonDict);
+}
+
+static PyTypeObject *new_dict_type = nullptr;
+
+static void ensureNewDictType()
+{
+ if (new_dict_type == nullptr) {
+ new_dict_type = createDerivedDictType();
+ if (new_dict_type == nullptr)
+ Py_FatalError("PySide6: Problem creating ChameleonDict");
+ }
+}
+
+static inline PyObject *nextInCircle(PyObject *dict)
+{
+ // returns a borrowed ref
+ AutoDecRef next_dict(PyObject_GetAttr(dict, PyName::dict_ring()));
+ return next_dict;
+}
+
+static inline void setNextDict(PyObject *dict, PyObject *next_dict)
+{
+ PyObject_SetAttr(dict, PyName::dict_ring(), next_dict);
+}
+
+static inline void setSelectId(PyObject *dict, PyObject *select_id)
+{
+ PyObject_SetAttr(dict, PyName::select_id(), select_id);
+}
+
+static inline PyObject *getSelectId(PyObject *dict)
+{
+ auto select_id = PyObject_GetAttr(dict, PyName::select_id());
+ return select_id;
+}
+
+static inline void setCurrentSelectId(PyTypeObject *type, PyObject *select_id)
+{
+ SbkObjectType_SetReserved(type, PyInt_AsSsize_t(select_id)); // int/long cheating
+}
+
+static inline void setCurrentSelectId(PyTypeObject *type, int id)
+{
+ SbkObjectType_SetReserved(type, id);
+}
+
+static inline PyObject *getCurrentSelectId(PyTypeObject *type)
+{
+ int id = SbkObjectType_GetReserved(type);
+ // This can be too early.
+ if (id < 0)
+ id = 0;
+ return fast_id_array[id];
+}
+
+static bool replaceClassDict(PyTypeObject *type)
+{
+ /*
+ * Replace the type dict by the derived ChameleonDict.
+ * This is mandatory for all type dicts when they are touched.
+ */
+ ensureNewDictType();
+ PyObject *dict = type->tp_dict;
+ auto ob_ndt = reinterpret_cast<PyObject *>(new_dict_type);
+ PyObject *new_dict = PyObject_CallObject(ob_ndt, nullptr);
+ if (new_dict == nullptr || PyDict_Update(new_dict, dict) < 0)
+ return false;
+ // Insert the default id. Cannot fail for small numbers.
+ AutoDecRef select_id(PyInt_FromLong(0));
+ setSelectId(new_dict, select_id);
+ // insert the dict into itself as ring
+ setNextDict(new_dict, new_dict);
+ // We have now an exact copy of the dict with a new type.
+ // Replace `__dict__` which usually has refcount 1 (but see cyclic_test.py)
+ Py_DECREF(type->tp_dict);
+ type->tp_dict = new_dict;
+ return true;
+}
+
+static bool addNewDict(PyTypeObject *type, PyObject *select_id)
+{
+ /*
+ * Add a new dict to the ring and set it as `type->tp_dict`.
+ * A 'false' return is fatal.
+ */
+ auto dict = type->tp_dict;
+ auto ob_ndt = reinterpret_cast<PyObject *>(new_dict_type);
+ auto new_dict = PyObject_CallObject(ob_ndt, nullptr);
+ if (new_dict == nullptr)
+ return false;
+ setSelectId(new_dict, select_id);
+ // insert the dict into the ring
+ auto next_dict = nextInCircle(dict);
+ setNextDict(dict, new_dict);
+ setNextDict(new_dict, next_dict);
+ type->tp_dict = new_dict;
+ return true;
+}
+
+static bool moveToFeatureSet(PyTypeObject *type, PyObject *select_id)
+{
+ /*
+ * Rotate the ring to the given `select_id` and return `true`.
+ * If not found, stay at the current position and return `false`.
+ */
+ auto initial_dict = type->tp_dict;
+ auto dict = initial_dict;
+ do {
+ dict = nextInCircle(dict);
+ AutoDecRef current_id(getSelectId(dict));
+ // This works because small numbers are singleton objects.
+ if (current_id == select_id) {
+ type->tp_dict = dict;
+ setCurrentSelectId(type, select_id);
+ return true;
+ }
+ } while (dict != initial_dict);
+ type->tp_dict = initial_dict;
+ return false;
+}
+
+static bool createNewFeatureSet(PyTypeObject *type, PyObject *select_id)
+{
+ /*
+ * Create a new feature set.
+ * A `false` return value is a fatal error.
+ *
+ * A FeatureProc sees an empty `type->tp_dict` and the previous dict
+ * content in `prev_dict`. It is responsible of filling `type->tp_dict`
+ * with modified content.
+ */
+ static auto small_1 = PyInt_FromLong(255);
+ Q_UNUSED(small_1);
+ static auto small_2 = PyInt_FromLong(255);
+ Q_UNUSED(small_2);
+ // make sure that small integers are cached
+ assert(small_1 != nullptr && small_1 == small_2);
+
+ static auto zero = fast_id_array[0];
+ bool ok = moveToFeatureSet(type, zero);
+ Q_UNUSED(ok);
+ assert(ok);
+
+ AutoDecRef prev_dict(type->tp_dict);
+ Py_INCREF(prev_dict); // keep the first ref unchanged
+ if (!addNewDict(type, select_id))
+ return false;
+ auto id = PyInt_AsSsize_t(select_id); // int/long cheating
+ if (id == -1)
+ return false;
+ setCurrentSelectId(type, id);
+ FeatureProc *proc = featurePointer;
+ for (int idx = id; *proc != nullptr; ++proc, idx >>= 1) {
+ if (idx & 1) {
+ // clear the tp_dict that will get new content
+ PyDict_Clear(type->tp_dict);
+ // let the proc re-fill the tp_dict
+ if (!(*proc)(type, prev_dict, id))
+ return false;
+ // if there is still a step, prepare `prev_dict`
+ if (idx >> 1) {
+ prev_dict.reset(PyDict_Copy(type->tp_dict));
+ if (prev_dict.isNull())
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+static bool SelectFeatureSetSubtype(PyTypeObject *type, PyObject *select_id)
+{
+ /*
+ * This is the selector for one sublass. We need to call this for
+ * every subclass until no more subclasses or reaching the wanted id.
+ */
+ if (Py_TYPE(type->tp_dict) == Py_TYPE(PyType_Type.tp_dict)) {
+ // On first touch, we initialize the dynamic naming.
+ // The dict type will be replaced after the first call.
+ if (!replaceClassDict(type)) {
+ Py_FatalError("failed to replace class dict!");
+ return false;
+ }
+ }
+ if (!moveToFeatureSet(type, select_id)) {
+ if (!createNewFeatureSet(type, select_id)) {
+ Py_FatalError("failed to create a new feature set!");
+ return false;
+ }
+ }
+ return true;
+}
+
+static inline PyObject *SelectFeatureSet(PyTypeObject *type)
+{
+ /*
+ * This is the main function of the module.
+ * The purpose of this function is to switch the dict of a class right
+ * before a (get|set)attro call is performed.
+ *
+ * Generated functions call this directly.
+ * Shiboken will assign it via a public hook of `basewrapper.cpp`.
+ */
+ if (Py_TYPE(type->tp_dict) == Py_TYPE(PyType_Type.tp_dict)) {
+ // We initialize the dynamic features by using our own dict type.
+ if (!replaceClassDict(type))
+ return nullptr;
+ }
+ PyObject *select_id = getFeatureSelectId(); // borrowed
+ PyObject *current_id = getCurrentSelectId(type); // borrowed
+ static PyObject *undef = fast_id_array[-1];
+
+ // PYSIDE-1019: During import PepType_SOTP is still zero.
+ if (current_id == undef)
+ current_id = select_id = fast_id_array[0];
+
+ if (select_id != current_id) {
+ PyObject *mro = type->tp_mro;
+ Py_ssize_t idx, n = PyTuple_GET_SIZE(mro);
+ // We leave 'Shiboken.Object' and 'object' alone, therefore "n - 2".
+ for (idx = 0; idx < n - 2; idx++) {
+ auto *sub_type = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, idx));
+ // When any subtype is already resolved (false), we can stop.
+ if (!SelectFeatureSetSubtype(sub_type, select_id))
+ break;
+ }
+ }
+ return type->tp_dict;
+}
+
+// For cppgenerator:
+void Select(PyObject *obj)
+{
+ if (featurePointer == nullptr)
+ return;
+ auto type = Py_TYPE(obj);
+ type->tp_dict = SelectFeatureSet(type);
+}
+
+PyObject *Select(PyTypeObject *type)
+{
+ if (featurePointer != nullptr)
+ type->tp_dict = SelectFeatureSet(type);
+ return type->tp_dict;
+}
+
+static bool feature_01_addLowerNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_02_true_property(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_04_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_08_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_10_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_20_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_40_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+static bool feature_80_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id);
+
+static FeatureProc featureProcArray[] = {
+ feature_01_addLowerNames,
+ feature_02_true_property,
+ feature_04_addDummyNames,
+ feature_08_addDummyNames,
+ feature_10_addDummyNames,
+ feature_20_addDummyNames,
+ feature_40_addDummyNames,
+ feature_80_addDummyNames,
+ nullptr
+};
+
+void finalize()
+{
+ for (int idx = -1; idx < 256; ++idx)
+ Py_DECREF(fast_id_array[idx]);
+}
+
+static bool patch_property_impl();
+
+void init()
+{
+ // This function can be called multiple times.
+ static bool is_initialized = false;
+ if (!is_initialized) {
+ fast_id_array = &_fast_id_array[1];
+ for (int idx = -1; idx < 256; ++idx)
+ fast_id_array[idx] = PyInt_FromLong(idx);
+ last_select_id = fast_id_array[0];
+ featurePointer = featureProcArray;
+ initSelectableFeature(SelectFeatureSet);
+ registerCleanupFunction(finalize);
+ patch_property_impl();
+ PySide::ClassProperty::init();
+ is_initialized = true;
+ }
+ // Reset the cache. This is called at any "from __feature__ import".
+ cached_globals = nullptr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PYSIDE-1019: Support switchable extensions
+//
+// Feature 0x01: Allow snake_case instead of camelCase
+//
+// This functionality is no longer implemented in the signature module, since
+// the PyCFunction getsets do not have to be modified any longer.
+// Instead, we simply exchange the complete class dicts. This is done in the
+// basewrapper.cpp file.
+//
+
+static PyObject *methodWithNewName(PyTypeObject *type,
+ PyMethodDef *meth,
+ const char *new_name)
+{
+ /*
+ * Create a method with a lower case name.
+ */
+ auto obtype = reinterpret_cast<PyObject *>(type);
+ int len = strlen(new_name);
+ auto name = new char[len + 1];
+ strcpy(name, new_name);
+ auto new_meth = new PyMethodDef;
+ new_meth->ml_name = name;
+ new_meth->ml_meth = meth->ml_meth;
+ new_meth->ml_flags = meth->ml_flags;
+ new_meth->ml_doc = meth->ml_doc;
+ PyObject *descr = nullptr;
+ if (new_meth->ml_flags & METH_STATIC) {
+ AutoDecRef cfunc(PyCFunction_NewEx(new_meth, obtype, nullptr));
+ if (cfunc.isNull())
+ return nullptr;
+ descr = PyStaticMethod_New(cfunc);
+ }
+ else {
+ descr = PyDescr_NewMethod(type, new_meth);
+ }
+ return descr;
+}
+
+static bool feature_01_addLowerNames(PyTypeObject *type, PyObject *prev_dict, int id)
+{
+ /*
+ * Add objects with lower names to `type->tp_dict` from 'prev_dict`.
+ */
+ PyObject *lower_dict = type->tp_dict;
+ PyObject *key, *value;
+ Py_ssize_t pos = 0;
+
+ // We first copy the things over which will not be changed:
+ while (PyDict_Next(prev_dict, &pos, &key, &value)) {
+ if ( Py_TYPE(value) != PepMethodDescr_TypePtr
+ && Py_TYPE(value) != PepStaticMethod_TypePtr) {
+ if (PyDict_SetItem(lower_dict, key, value))
+ return false;
+ continue;
+ }
+ }
+ // Then we walk over the tp_methods to get all methods and insert
+ // them with changed names.
+ PyMethodDef *meth = type->tp_methods;
+ if (!meth)
+ return true;
+
+ for (; meth != nullptr && meth->ml_name != nullptr; ++meth) {
+ const char *name = String::toCString(String::getSnakeCaseName(meth->ml_name, true));
+ AutoDecRef new_method(methodWithNewName(type, meth, name));
+ if (new_method.isNull())
+ return false;
+ if (PyDict_SetItemString(lower_dict, name, new_method) < 0)
+ return false;
+ }
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PYSIDE-1019: Support switchable extensions
+//
+// Feature 0x02: Use true properties instead of getters and setters
+//
+
+// This is the Python 2 version for inspection of m_ml, only.
+// The actual Python 3 version is larget.
+
+typedef struct {
+ PyObject_HEAD
+ PyMethodDef *m_ml; /* Description of the C function to call */
+ PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
+ PyObject *m_module; /* The __module__ attribute, can be anything */
+} PyCFunctionObject;
+
+static PyObject *modifyStaticToClassMethod(PyTypeObject *type, PyObject *sm)
+{
+ AutoDecRef func_ob(PyObject_GetAttr(sm, PyMagicName::func()));
+ if (func_ob.isNull())
+ return nullptr;
+ auto func = reinterpret_cast<PyCFunctionObject *>(func_ob.object());
+ auto new_func = new PyMethodDef;
+ new_func->ml_name = func->m_ml->ml_name;
+ new_func->ml_meth = func->m_ml->ml_meth;
+ new_func->ml_flags = (func->m_ml->ml_flags & ~METH_STATIC) | METH_CLASS;
+ new_func->ml_doc = func->m_ml->ml_doc;
+ auto cfunc = PyCFunction_NewEx(new_func, nullptr, nullptr);
+ cfunc = PyDescr_NewClassMethod(type, new_func);
+ return cfunc;
+}
+
+static PyObject *createProperty(PyTypeObject *type, PyObject *getter, PyObject *setter)
+{
+ bool chassprop = false;
+ assert(getter != nullptr);
+ if (setter == nullptr)
+ setter = Py_None;
+ auto ptype = &PyProperty_Type;
+ if (Py_TYPE(getter) == PepStaticMethod_TypePtr) {
+ ptype = PyClassPropertyTypeF();
+ chassprop = true;
+ getter = modifyStaticToClassMethod(type, getter);
+ if (setter != Py_None)
+ setter = modifyStaticToClassMethod(type, setter);
+ }
+ auto obtype = reinterpret_cast<PyObject *>(ptype);
+ PyObject *prop = PyObject_CallFunctionObjArgs(obtype, getter, setter, nullptr);
+ return prop;
+}
+
+static QStringList parseFields(const char *propstr)
+{
+ /*
+ * Break the string into subfields at ':' and add defaults.
+ */
+ QString s = QString(QLatin1String(propstr));
+ auto list = s.split(QLatin1Char(':'));
+ assert(list.size() == 2 || list.size() == 3);
+ auto name = list[0];
+ auto read = list[1];
+ if (read.size() == 0)
+ list[1] = name;
+ if (list.size() == 2)
+ return list;
+ auto write = list[2];
+ if (write.size() == 0) {
+ list[2] = QLatin1String("set") + name;
+ list[2][3] = list[2][3].toUpper();
+ }
+ return list;
+}
+
+static PyObject *make_snake_case(QString s, bool lower)
+{
+ if (s.isNull())
+ return nullptr;
+ return String::getSnakeCaseName(s.toLatin1().data(), lower);
+}
+
+static bool feature_02_true_property(PyTypeObject *type, PyObject *prev_dict, int id)
+{
+ /*
+ * Use the property info to create true Python property objects.
+ */
+
+ // The empty `tp_dict` gets populated by the previous dict.
+ PyObject *prop_dict = type->tp_dict;
+ if (PyDict_Update(prop_dict, prev_dict) < 0)
+ return false;
+
+ // We then replace methods by properties.
+ bool lower = (id & 0x01) != 0;
+ auto props = SbkObjectType_GetPropertyStrings(type);
+ if (props == nullptr || *props == nullptr)
+ return true;
+ for (; *props != nullptr; ++props) {
+ auto propstr = *props;
+ auto fields = parseFields(propstr);
+ bool haveWrite = fields.size() == 3;
+ PyObject *name = make_snake_case(fields[0], lower);
+ PyObject *read = make_snake_case(fields[1], lower);
+ PyObject *write = haveWrite ? make_snake_case(fields[2], lower) : nullptr;
+ PyObject *getter = PyDict_GetItem(prev_dict, read);
+ if (getter == nullptr || !(Py_TYPE(getter) == PepMethodDescr_TypePtr ||
+ Py_TYPE(getter) == PepStaticMethod_TypePtr))
+ continue;
+ PyObject *setter = haveWrite ? PyDict_GetItem(prev_dict, write) : nullptr;
+
+ AutoDecRef PyProperty(createProperty(type, getter, setter));
+ if (PyProperty.isNull())
+ return false;
+ if (PyDict_SetItem(prop_dict, name, PyProperty) < 0)
+ return false;
+ if (fields[0] != fields[1] && PyDict_GetItem(prop_dict, read))
+ if (PyDict_DelItem(prop_dict, read) < 0)
+ return false;
+ // Theoretically, we need to check for multiple signatures to be exact.
+ // But we don't do so intentionally because it would be confusing.
+ if (haveWrite && PyDict_GetItem(prop_dict, write))
+ if (PyDict_DelItem(prop_dict, write) < 0)
+ return false;
+ }
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// These are a number of patches to make Python's property object better
+// suitable for us.
+// We turn `__doc__` into a lazy attribute saving signature initialization.
+//
+// There is now also a class property implementation which inherits
+// from this one.
+//
+
+static PyObject *property_doc_get(PyObject *self, void *)
+{
+ auto po = reinterpret_cast<propertyobject *>(self);
+
+ if (po->prop_doc != nullptr && po->prop_doc != Py_None) {
+ Py_INCREF(po->prop_doc);
+ return po->prop_doc;
+ }
+ if (po->prop_get) {
+ // PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
+ auto txt = PyObject_GetAttr(po->prop_get, PyMagicName::doc());
+ if (txt != nullptr) {
+ Py_INCREF(txt);
+ po->prop_doc = txt;
+ Py_INCREF(txt);
+ return txt;
+ }
+ PyErr_Clear();
+ }
+ Py_RETURN_NONE;
+}
+
+static int property_doc_set(PyObject *self, PyObject *value, void *)
+{
+ auto po = reinterpret_cast<propertyobject *>(self);
+
+ Py_INCREF(value);
+ po->prop_doc = value;
+ return 0;
+}
+
+static PyGetSetDef property_getset[] = {
+ // This gets added to the existing getsets
+ {const_cast<char *>("__doc__"), property_doc_get, property_doc_set, nullptr, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr}
+};
+
+static bool patch_property_impl()
+{
+ // Turn `__doc__` into a computed attribute without changing writability.
+ auto gsp = property_getset;
+ auto type = &PyProperty_Type;
+ auto dict = type->tp_dict;
+ AutoDecRef descr(PyDescr_NewGetSet(type, gsp));
+ if (descr.isNull())
+ return false;
+ if (PyDict_SetItemString(dict, gsp->name, descr) < 0)
+ return false;
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// PYSIDE-1019: Support switchable extensions
+//
+// Feature 0x04..0x40: A fake switchable option for testing
+//
+
+#define SIMILAR_FEATURE(xx) \
+static bool feature_##xx##_addDummyNames(PyTypeObject *type, PyObject *prev_dict, int id) \
+{ \
+ PyObject *dict = type->tp_dict; \
+ if (PyDict_Update(dict, prev_dict) < 0) \
+ return false; \
+ if (PyDict_SetItemString(dict, "fake_feature_" #xx, Py_None) < 0) \
+ return false; \
+ return true; \
+}
+
+SIMILAR_FEATURE(04)
+SIMILAR_FEATURE(08)
+SIMILAR_FEATURE(10)
+SIMILAR_FEATURE(20)
+SIMILAR_FEATURE(40)
+SIMILAR_FEATURE(80)
+
+} // namespace PySide
+} // namespace Feature
diff --git a/sources/pyside2/libpyside/feature_select.h b/sources/pyside6/libpyside/feature_select.h
index 845828a4c..845828a4c 100644
--- a/sources/pyside2/libpyside/feature_select.h
+++ b/sources/pyside6/libpyside/feature_select.h
diff --git a/sources/pyside6/libpyside/globalreceiverv2.cpp b/sources/pyside6/libpyside/globalreceiverv2.cpp
new file mode 100644
index 000000000..72197fe51
--- /dev/null
+++ b/sources/pyside6/libpyside/globalreceiverv2.cpp
@@ -0,0 +1,348 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "globalreceiverv2.h"
+#include "dynamicqmetaobject_p.h"
+#include "pysideweakref.h"
+#include "signalmanager.h"
+
+#include <autodecref.h>
+#include <gilstate.h>
+
+#include <QtCore/QMetaMethod>
+#include <QtCore/QSet>
+
+#define RECEIVER_DESTROYED_SLOT_NAME "__receiverDestroyed__(QObject*)"
+
+namespace
+{
+ static int DESTROY_SIGNAL_ID = 0;
+ static int DESTROY_SLOT_ID = 0;
+}
+
+namespace PySide
+{
+class DynamicSlotDataV2
+{
+ Q_DISABLE_COPY(DynamicSlotDataV2)
+ public:
+ DynamicSlotDataV2(PyObject *callback, GlobalReceiverV2 *parent);
+ ~DynamicSlotDataV2();
+
+ int addSlot(const char *signature);
+ int id(const char *signature) const;
+ PyObject *callback();
+ QByteArray hash() const;
+ void notify();
+
+ static void onCallbackDestroyed(void *data);
+ static QByteArray hash(PyObject *callback);
+
+
+ private:
+ bool m_isMethod;
+ PyObject *m_callback;
+ PyObject *m_pythonSelf;
+ PyObject *m_pyClass;
+ PyObject *m_weakRef;
+ QMap<QByteArray, int> m_signatures;
+ GlobalReceiverV2 *m_parent;
+ QByteArray m_hash;
+};
+
+}
+
+using namespace PySide;
+
+DynamicSlotDataV2::DynamicSlotDataV2(PyObject *callback, GlobalReceiverV2 *parent)
+ : m_pythonSelf(0), m_pyClass(0), m_weakRef(0), m_parent(parent)
+{
+ Shiboken::GilState gil;
+
+ m_isMethod = PyMethod_Check(callback);
+ if (m_isMethod) {
+ //Can not store calback pointe because this will be destroyed at the end of the scope
+ //To avoid increment intance reference keep the callback information
+ m_callback = PyMethod_GET_FUNCTION(callback);
+ m_pythonSelf = PyMethod_GET_SELF(callback);
+
+ //monitor class from method lifetime
+ m_weakRef = WeakRef::create(m_pythonSelf, DynamicSlotDataV2::onCallbackDestroyed, this);
+
+ m_hash = QByteArray::number((qlonglong)PyObject_Hash(m_callback))
+ + QByteArray::number((qlonglong)PyObject_Hash(m_pythonSelf));
+
+ } else {
+ m_callback = callback;
+ Py_INCREF(m_callback);
+
+ m_hash = QByteArray::number((qlonglong)PyObject_Hash(m_callback));
+ }
+}
+
+QByteArray DynamicSlotDataV2::hash() const
+{
+ return m_hash;
+}
+
+QByteArray DynamicSlotDataV2::hash(PyObject *callback)
+{
+ Shiboken::GilState gil;
+ if (PyMethod_Check(callback)) {
+ return QByteArray::number((qlonglong)PyObject_Hash(PyMethod_GET_FUNCTION(callback)))
+ + QByteArray::number((qlonglong)PyObject_Hash(PyMethod_GET_SELF(callback)));
+ }
+ return QByteArray::number(qlonglong(PyObject_Hash(callback)));
+}
+
+PyObject *DynamicSlotDataV2::callback()
+{
+ PyObject *callback = m_callback;
+
+ //create a callback based on method data
+ if (m_isMethod)
+ callback = PyMethod_New(m_callback, m_pythonSelf);
+ else
+ Py_INCREF(callback);
+
+ return callback;
+}
+
+int DynamicSlotDataV2::id(const char *signature) const
+{
+ const auto it = m_signatures.constFind(signature);
+ return it != m_signatures.cend() ? it.value() : -1;
+}
+
+int DynamicSlotDataV2::addSlot(const char *signature)
+{
+ int index = id(signature);
+ if (index == -1)
+ index = m_signatures[signature] = m_parent->metaObjectBuilder().addSlot(signature);
+ return index;
+}
+
+void DynamicSlotDataV2::onCallbackDestroyed(void *data)
+{
+ auto self = reinterpret_cast<DynamicSlotDataV2 *>(data);
+ self->m_weakRef = 0;
+ Py_BEGIN_ALLOW_THREADS
+ delete self->m_parent;
+ Py_END_ALLOW_THREADS
+}
+
+DynamicSlotDataV2::~DynamicSlotDataV2()
+{
+ Shiboken::GilState gil;
+
+ Py_XDECREF(m_weakRef);
+ m_weakRef = 0;
+
+ if (!m_isMethod)
+ Py_DECREF(m_callback);
+}
+
+GlobalReceiverV2::GlobalReceiverV2(PyObject *callback, SharedMap map) :
+ QObject(nullptr),
+ m_metaObject("__GlobalReceiver__", &QObject::staticMetaObject),
+ m_sharedMap(std::move(map))
+{
+ m_data = new DynamicSlotDataV2(callback, this);
+ m_metaObject.addSlot(RECEIVER_DESTROYED_SLOT_NAME);
+ m_metaObject.update();
+ m_refs.append(NULL);
+
+
+ if (DESTROY_SIGNAL_ID == 0)
+ DESTROY_SIGNAL_ID = QObject::staticMetaObject.indexOfSignal("destroyed(QObject*)");
+
+ if (DESTROY_SLOT_ID == 0)
+ DESTROY_SLOT_ID = m_metaObject.indexOfMethod(QMetaMethod::Slot, RECEIVER_DESTROYED_SLOT_NAME);
+
+
+}
+
+GlobalReceiverV2::~GlobalReceiverV2()
+{
+ m_refs.clear();
+ // Remove itself from map.
+ m_sharedMap->remove(m_data->hash());
+ // Suppress handling of destroyed() for objects whose last reference is contained inside
+ // the callback object that will now be deleted. The reference could be a default argument,
+ // a callback local variable, etc.
+ // The signal has to be suppressed because it would lead to the following situation:
+ // Callback is deleted, hence the last reference is decremented,
+ // leading to the object being deleted, which emits destroyed(), which would try to invoke
+ // the already deleted callback, and also try to delete the object again.
+ DynamicSlotDataV2 *data = m_data;
+ m_data = Q_NULLPTR;
+ delete data;
+}
+
+int GlobalReceiverV2::addSlot(const char *signature)
+{
+ return m_data->addSlot(signature);
+}
+
+void GlobalReceiverV2::incRef(const QObject *link)
+{
+ if (link) {
+ if (!m_refs.contains(link)) {
+ bool connected;
+ Py_BEGIN_ALLOW_THREADS
+ connected = QMetaObject::connect(link, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
+ Py_END_ALLOW_THREADS
+ if (connected)
+ m_refs.append(link);
+ else
+ Q_ASSERT(false);
+ } else {
+ m_refs.append(link);
+ }
+ } else {
+ m_refs.append(NULL);
+ }
+}
+
+void GlobalReceiverV2::decRef(const QObject *link)
+{
+ if (m_refs.empty())
+ return;
+
+
+ m_refs.removeOne(link);
+ if (link) {
+ if (!m_refs.contains(link)) {
+ bool result;
+ Py_BEGIN_ALLOW_THREADS
+ result = QMetaObject::disconnect(link, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
+ Py_END_ALLOW_THREADS
+ Q_ASSERT(result);
+ if (!result)
+ return;
+ }
+ }
+
+ if (m_refs.empty())
+ Py_BEGIN_ALLOW_THREADS
+ delete this;
+ Py_END_ALLOW_THREADS
+
+}
+
+int GlobalReceiverV2::refCount(const QObject *link) const
+{
+ if (link)
+ return m_refs.count(link);
+
+ return m_refs.size();
+}
+
+void GlobalReceiverV2::notify()
+{
+ const QSet<const QObject *> objSet(m_refs.cbegin(), m_refs.cend());
+ Py_BEGIN_ALLOW_THREADS
+ for (const QObject *o : objSet) {
+ QMetaObject::disconnect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
+ QMetaObject::connect(o, DESTROY_SIGNAL_ID, this, DESTROY_SLOT_ID);
+ }
+ Py_END_ALLOW_THREADS
+}
+
+QByteArray GlobalReceiverV2::hash() const
+{
+ return m_data->hash();
+}
+
+QByteArray GlobalReceiverV2::hash(PyObject *callback)
+{
+ return DynamicSlotDataV2::hash(callback);
+}
+
+const QMetaObject *GlobalReceiverV2::metaObject() const
+{
+ return const_cast<GlobalReceiverV2 *>(this)->m_metaObject.update();
+}
+
+int GlobalReceiverV2::qt_metacall(QMetaObject::Call call, int id, void **args)
+{
+ Shiboken::GilState gil;
+ Q_ASSERT(call == QMetaObject::InvokeMetaMethod);
+ Q_ASSERT(id >= QObject::staticMetaObject.methodCount());
+
+ QMetaMethod slot = metaObject()->method(id);
+ Q_ASSERT(slot.methodType() == QMetaMethod::Slot);
+
+ if (!m_data) {
+ if (id != DESTROY_SLOT_ID) {
+ const QByteArray message = "PySide6 Warning: Skipping callback call "
+ + slot.methodSignature() + " because the callback object is being destructed.";
+ PyErr_WarnEx(PyExc_RuntimeWarning, message.constData(), 0);
+ }
+ return -1;
+ }
+
+ if (id == DESTROY_SLOT_ID) {
+ if (m_refs.empty())
+ return -1;
+ auto obj = *reinterpret_cast<QObject **>(args[1]);
+ incRef(); //keep the object live (safe ref)
+ m_refs.removeAll(obj); // remove all refs to this object
+ decRef(); //remove the safe ref
+ } else {
+ bool isShortCuit = (strstr(slot.methodSignature(), "(") == 0);
+ Shiboken::AutoDecRef callback(m_data->callback());
+ SignalManager::callPythonMetaMethod(slot, args, callback, isShortCuit);
+ }
+
+ // SignalManager::callPythonMetaMethod might have failed, in that case we have to print the
+ // error so it considered "handled".
+ if (PyErr_Occurred()) {
+ int reclimit = Py_GetRecursionLimit();
+ // Inspired by Python's errors.c: PyErr_GivenExceptionMatches() function.
+ // Temporarily bump the recursion limit, so that PyErr_Print will not raise a recursion
+ // error again. Don't do it when the limit is already insanely high, to avoid overflow.
+ if (reclimit < (1 << 30))
+ Py_SetRecursionLimit(reclimit + 5);
+ PyErr_Print();
+ Py_SetRecursionLimit(reclimit);
+ }
+
+ return -1;
+}
diff --git a/sources/pyside2/libpyside/globalreceiverv2.h b/sources/pyside6/libpyside/globalreceiverv2.h
index 433f587a9..433f587a9 100644
--- a/sources/pyside2/libpyside/globalreceiverv2.h
+++ b/sources/pyside6/libpyside/globalreceiverv2.h
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp
new file mode 100644
index 000000000..3eca161fd
--- /dev/null
+++ b/sources/pyside6/libpyside/pyside.cpp
@@ -0,0 +1,616 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pyside.h"
+#include "pyside_p.h"
+#include "signalmanager.h"
+#include "pysideclassinfo_p.h"
+#include "pysideproperty_p.h"
+#include "pysideproperty.h"
+#include "pysidesignal.h"
+#include "pysidesignal_p.h"
+#include "pysidestaticstrings.h"
+#include "pysideslot_p.h"
+#include "pysidemetafunction_p.h"
+#include "pysidemetafunction.h"
+#include "dynamicqmetaobject.h"
+
+#include <autodecref.h>
+#include <basewrapper.h>
+#include <bindingmanager.h>
+#include <gilstate.h>
+#include <sbkconverter.h>
+#include <sbkstring.h>
+#include <sbkstaticstrings.h>
+#include <qapp_macro.h>
+
+#include <QtCore/QByteArray>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtCore/QFileInfo>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QStack>
+
+#include <algorithm>
+#include <cstring>
+#include <cctype>
+#include <typeinfo>
+
+static QStack<PySide::CleanupFunction> cleanupFunctionList;
+static void *qobjectNextAddr;
+
+QT_BEGIN_NAMESPACE
+extern bool qRegisterResourceData(int, const unsigned char *, const unsigned char *,
+ const unsigned char *);
+QT_END_NAMESPACE
+
+namespace PySide
+{
+
+void init(PyObject *module)
+{
+ qobjectNextAddr = 0;
+ ClassInfo::init(module);
+ Signal::init(module);
+ Slot::init(module);
+ Property::init(module);
+ MetaFunction::init(module);
+ // Init signal manager, so it will register some meta types used by QVariant.
+ SignalManager::instance();
+ initQApp();
+}
+
+static bool _setProperty(PyObject *qObj, PyObject *name, PyObject *value, bool *accept)
+{
+ QByteArray propName(Shiboken::String::toCString(name));
+ propName[0] = std::toupper(propName[0]);
+ propName.prepend("set");
+
+ Shiboken::AutoDecRef propSetter(PyObject_GetAttrString(qObj, propName.constData()));
+ if (!propSetter.isNull()) {
+ *accept = true;
+ Shiboken::AutoDecRef args(PyTuple_Pack(1, value));
+ Shiboken::AutoDecRef retval(PyObject_CallObject(propSetter, args));
+ if (retval.isNull())
+ return false;
+ } else {
+ PyErr_Clear();
+ Shiboken::AutoDecRef attr(PyObject_GenericGetAttr(qObj, name));
+ if (PySide::Property::checkType(attr)) {
+ *accept = true;
+ if (PySide::Property::setValue(reinterpret_cast<PySideProperty *>(attr.object()), qObj, value) < 0)
+ return false;
+ }
+ }
+ return true;
+}
+
+bool fillQtProperties(PyObject *qObj, const QMetaObject *metaObj, PyObject *kwds, const char **blackList, unsigned int blackListSize)
+{
+
+ PyObject *key, *value;
+ Py_ssize_t pos = 0;
+
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ if (!blackListSize || !std::binary_search(blackList, blackList + blackListSize, std::string(Shiboken::String::toCString(key)))) {
+ QByteArray propName(Shiboken::String::toCString(key));
+ bool accept = false;
+ if (metaObj->indexOfProperty(propName) != -1) {
+ if (!_setProperty(qObj, key, value, &accept))
+ return false;
+ } else {
+ propName.append("()");
+ if (metaObj->indexOfSignal(propName) != -1) {
+ accept = true;
+ propName.prepend('2');
+ if (!PySide::Signal::connect(qObj, propName, value))
+ return false;
+ }
+ }
+ if (!accept) {
+ // PYSIDE-1019: Allow any existing attribute in the constructor.
+ if (!_setProperty(qObj, key, value, &accept))
+ return false;
+ }
+ if (!accept) {
+ PyErr_Format(PyExc_AttributeError, "'%s' is not a Qt property or a signal",
+ propName.constData());
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+void registerCleanupFunction(CleanupFunction func)
+{
+ cleanupFunctionList.push(func);
+}
+
+void runCleanupFunctions()
+{
+ while (!cleanupFunctionList.isEmpty()) {
+ CleanupFunction f = cleanupFunctionList.pop();
+ f();
+ }
+}
+
+static void destructionVisitor(SbkObject *pyObj, void *data)
+{
+ auto realData = reinterpret_cast<void **>(data);
+ auto pyQApp = reinterpret_cast<SbkObject *>(realData[0]);
+ auto pyQObjectType = reinterpret_cast<PyTypeObject *>(realData[1]);
+
+ if (pyObj != pyQApp && PyObject_TypeCheck(pyObj, pyQObjectType)) {
+ if (Shiboken::Object::hasOwnership(pyObj) && Shiboken::Object::isValid(pyObj, false)) {
+ Shiboken::Object::setValidCpp(pyObj, false);
+
+ Py_BEGIN_ALLOW_THREADS
+ Shiboken::callCppDestructor<QObject>(Shiboken::Object::cppPointer(pyObj, pyQObjectType));
+ Py_END_ALLOW_THREADS
+ }
+ }
+
+};
+
+void destroyQCoreApplication()
+{
+ QCoreApplication *app = QCoreApplication::instance();
+ if (!app)
+ return;
+ SignalManager::instance().clear();
+
+ Shiboken::BindingManager &bm = Shiboken::BindingManager::instance();
+ SbkObject *pyQApp = bm.retrieveWrapper(app);
+ PyTypeObject *pyQObjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
+ assert(pyQObjectType);
+
+ void *data[2] = {pyQApp, pyQObjectType};
+ bm.visitAllPyObjects(&destructionVisitor, &data);
+
+ // in the end destroy app
+ // Allow threads because the destructor calls
+ // QThreadPool::globalInstance().waitForDone() which may deadlock on the GIL
+ // if there is a worker working with python objects.
+ Py_BEGIN_ALLOW_THREADS
+ delete app;
+ Py_END_ALLOW_THREADS
+ // PYSIDE-571: make sure to create a singleton deleted qApp.
+ Py_DECREF(MakeQAppWrapper(nullptr));
+}
+
+std::size_t getSizeOfQObject(SbkObjectType *type)
+{
+ return retrieveTypeUserData(type)->cppObjSize;
+}
+
+void initDynamicMetaObject(SbkObjectType *type, const QMetaObject *base, std::size_t cppObjSize)
+{
+ //create DynamicMetaObject based on python type
+ auto userData = new TypeUserData(reinterpret_cast<PyTypeObject *>(type), base, cppObjSize);
+ userData->mo.update();
+ Shiboken::ObjectType::setTypeUserData(type, userData, Shiboken::callCppDestructor<TypeUserData>);
+
+ //initialize staticQMetaObject property
+ void *metaObjectPtr = const_cast<QMetaObject *>(userData->mo.update());
+ static SbkConverter *converter = Shiboken::Conversions::getConverter("QMetaObject");
+ if (!converter)
+ return;
+ Shiboken::AutoDecRef pyMetaObject(Shiboken::Conversions::pointerToPython(converter, metaObjectPtr));
+ PyObject_SetAttr(reinterpret_cast<PyObject *>(type),
+ PySide::PyName::qtStaticMetaObject(), pyMetaObject);
+}
+
+TypeUserData *retrieveTypeUserData(SbkObjectType *sbkTypeObj)
+{
+ return reinterpret_cast<TypeUserData *>(Shiboken::ObjectType::getTypeUserData(sbkTypeObj));
+}
+
+TypeUserData *retrieveTypeUserData(PyTypeObject *pyTypeObj)
+{
+ return retrieveTypeUserData(reinterpret_cast<SbkObjectType *>(pyTypeObj));
+}
+
+TypeUserData *retrieveTypeUserData(PyObject *pyObj)
+{
+ auto pyTypeObj = PyType_Check(pyObj)
+ ? reinterpret_cast<PyTypeObject *>(pyObj) : Py_TYPE(pyObj);
+ return retrieveTypeUserData(pyTypeObj);
+}
+
+const QMetaObject *retrieveMetaObject(PyTypeObject *pyTypeObj)
+{
+ TypeUserData *userData = retrieveTypeUserData(pyTypeObj);
+ return userData ? userData->mo.update() : nullptr;
+}
+
+const QMetaObject *retrieveMetaObject(PyObject *pyObj)
+{
+ auto pyTypeObj = PyType_Check(pyObj)
+ ? reinterpret_cast<PyTypeObject *>(pyObj) : Py_TYPE(pyObj);
+ return retrieveMetaObject(pyTypeObj);
+}
+
+void initQObjectSubType(SbkObjectType *type, PyObject *args, PyObject * /* kwds */)
+{
+ PyTypeObject *qObjType = Shiboken::Conversions::getPythonTypeObject("QObject*");
+ QByteArray className(Shiboken::String::toCString(PyTuple_GET_ITEM(args, 0)));
+
+ PyObject *bases = PyTuple_GET_ITEM(args, 1);
+ int numBases = PyTuple_GET_SIZE(bases);
+
+ TypeUserData *userData = nullptr;
+
+ for (int i = 0; i < numBases; ++i) {
+ auto base = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(bases, i));
+ if (PyType_IsSubtype(base, qObjType)) {
+ userData = retrieveTypeUserData(base);
+ break;
+ }
+ }
+ if (!userData) {
+ qWarning("Sub class of QObject not inheriting QObject!? Crash will happen when using %s.", className.constData());
+ return;
+ }
+ initDynamicMetaObject(type, userData->mo.update(), userData->cppObjSize);
+}
+
+void initQApp()
+{
+ /*
+ * qApp will not be initialized when embedding is active.
+ * That means that qApp exists already when PySide is initialized.
+ * We could solve that by creating a qApp variable, but in embedded
+ * mode, we also have the effect that the first assignment to qApp
+ * is persistent! Therefore, we can never be sure to have created
+ * qApp late enough to get the right type for the instance.
+ *
+ * I would appreciate very much if someone could explain or even fix
+ * this issue. It exists only when a pre-existing application exists.
+ */
+ if (!qApp)
+ Py_DECREF(MakeQAppWrapper(nullptr));
+}
+
+PyObject *getMetaDataFromQObject(QObject *cppSelf, PyObject *self, PyObject *name)
+{
+ PyObject *attr = PyObject_GenericGetAttr(self, name);
+ if (!Shiboken::Object::isValid(reinterpret_cast<SbkObject *>(self), false))
+ return attr;
+
+ if (attr && Property::checkType(attr)) {
+ PyObject *value = Property::getValue(reinterpret_cast<PySideProperty *>(attr), self);
+ Py_DECREF(attr);
+ if (!value)
+ return 0;
+ attr = value;
+ }
+
+ //mutate native signals to signal instance type
+ if (attr && PyObject_TypeCheck(attr, PySideSignalTypeF())) {
+ PyObject *signal = reinterpret_cast<PyObject *>(Signal::initialize(reinterpret_cast<PySideSignal *>(attr), name, self));
+ PyObject_SetAttr(self, name, reinterpret_cast<PyObject *>(signal));
+ return signal;
+ }
+
+ //search on metaobject (avoid internal attributes started with '__')
+ if (!attr) {
+ const char *cname = Shiboken::String::toCString(name);
+ uint cnameLen = qstrlen(cname);
+ if (std::strncmp("__", cname, 2)) {
+ const QMetaObject *metaObject = cppSelf->metaObject();
+ //signal
+ QList<QMetaMethod> signalList;
+ for(int i=0, i_max = metaObject->methodCount(); i < i_max; i++) {
+ QMetaMethod method = metaObject->method(i);
+ const QByteArray methSig_ = method.methodSignature();
+ const char *methSig = methSig_.constData();
+ bool methMacth = !std::strncmp(cname, methSig, cnameLen) && methSig[cnameLen] == '(';
+ if (methMacth) {
+ if (method.methodType() == QMetaMethod::Signal) {
+ signalList.append(method);
+ } else {
+ PySideMetaFunction *func = MetaFunction::newObject(cppSelf, i);
+ if (func) {
+ PyObject *result = reinterpret_cast<PyObject *>(func);
+ PyObject_SetAttr(self, name, result);
+ return result;
+ }
+ }
+ }
+ }
+ if (!signalList.empty()) {
+ PyObject *pySignal = reinterpret_cast<PyObject *>(Signal::newObjectFromMethod(self, signalList));
+ PyObject_SetAttr(self, name, pySignal);
+ return pySignal;
+ }
+ }
+ }
+ return attr;
+}
+
+bool inherits(PyTypeObject *objType, const char *class_name)
+{
+ if (strcmp(objType->tp_name, class_name) == 0)
+ return true;
+
+ PyTypeObject *base = objType->tp_base;
+ if (base == 0)
+ return false;
+
+ return inherits(base, class_name);
+}
+
+void *nextQObjectMemoryAddr()
+{
+ return qobjectNextAddr;
+}
+
+void setNextQObjectMemoryAddr(void *addr)
+{
+ qobjectNextAddr = addr;
+}
+
+} // namespace PySide
+
+// A QSharedPointer is used with a deletion function to invalidate a pointer
+// when the property value is cleared. This should be a QSharedPointer with
+// a void *pointer, but that isn't allowed
+typedef char any_t;
+Q_DECLARE_METATYPE(QSharedPointer<any_t>);
+
+namespace PySide
+{
+
+static void invalidatePtr(any_t *object)
+{
+ Shiboken::GilState state;
+
+ SbkObject *wrapper = Shiboken::BindingManager::instance().retrieveWrapper(object);
+ if (wrapper != NULL)
+ Shiboken::BindingManager::instance().releaseWrapper(wrapper);
+}
+
+static const char invalidatePropertyName[] = "_PySideInvalidatePtr";
+
+// PYSIDE-1214, when creating new wrappers for classes inheriting QObject but
+// not exposed to Python, try to find the best-matching (most-derived) Qt
+// class by walking up the meta objects.
+static const char *typeName(QObject *cppSelf)
+{
+ const char *typeName = typeid(*cppSelf).name();
+ if (!Shiboken::Conversions::getConverter(typeName)) {
+ for (auto metaObject = cppSelf->metaObject(); metaObject; metaObject = metaObject->superClass()) {
+ const char *name = metaObject->className();
+ if (Shiboken::Conversions::getConverter(name)) {
+ typeName = name;
+ break;
+ }
+ }
+ }
+ return typeName;
+}
+
+PyObject *getWrapperForQObject(QObject *cppSelf, SbkObjectType *sbk_type)
+{
+ PyObject *pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppSelf));
+ if (pyOut) {
+ Py_INCREF(pyOut);
+ return pyOut;
+ }
+
+ // Setting the property will trigger an QEvent notification, which may call into
+ // code that creates the wrapper so only set the property if it isn't already
+ // set and check if it's created after the set call
+ QVariant existing = cppSelf->property(invalidatePropertyName);
+ if (!existing.isValid()) {
+ QSharedPointer<any_t> shared_with_del(reinterpret_cast<any_t *>(cppSelf), invalidatePtr);
+ cppSelf->setProperty(invalidatePropertyName, QVariant::fromValue(shared_with_del));
+ pyOut = reinterpret_cast<PyObject *>(Shiboken::BindingManager::instance().retrieveWrapper(cppSelf));
+ if (pyOut) {
+ Py_INCREF(pyOut);
+ return pyOut;
+ }
+ }
+
+ pyOut = Shiboken::Object::newObject(sbk_type, cppSelf, false, false, typeName(cppSelf));
+
+ return pyOut;
+}
+
+#ifdef PYSIDE_QML_SUPPORT
+static QuickRegisterItemFunction quickRegisterItem;
+
+QuickRegisterItemFunction getQuickRegisterItemFunction()
+{
+ return quickRegisterItem;
+}
+
+void setQuickRegisterItemFunction(QuickRegisterItemFunction function)
+{
+ quickRegisterItem = function;
+}
+#endif // PYSIDE_QML_SUPPORT
+
+// Inspired by Shiboken::String::toCString;
+QString pyStringToQString(PyObject *str) {
+ if (str == Py_None)
+ return QString();
+
+ if (PyUnicode_Check(str)) {
+ const char *unicodeBuffer = _PepUnicode_AsString(str);
+ if (unicodeBuffer)
+ return QString::fromUtf8(unicodeBuffer);
+ }
+ if (PyBytes_Check(str)) {
+ const char *asciiBuffer = PyBytes_AS_STRING(str);
+ if (asciiBuffer)
+ return QString::fromLatin1(asciiBuffer);
+ }
+ return QString();
+}
+
+static const unsigned char qt_resource_name[] = {
+ // qt
+ 0x0,0x2,
+ 0x0,0x0,0x7,0x84,
+ 0x0,0x71,
+ 0x0,0x74,
+ // etc
+ 0x0,0x3,
+ 0x0,0x0,0x6c,0xa3,
+ 0x0,0x65,
+ 0x0,0x74,0x0,0x63,
+ // qt.conf
+ 0x0,0x7,
+ 0x8,0x74,0xa6,0xa6,
+ 0x0,0x71,
+ 0x0,0x74,0x0,0x2e,0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x66
+};
+
+static const unsigned char qt_resource_struct[] = {
+ // :
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
+ // :/qt
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
+ // :/qt/etc
+ 0x0,0x0,0x0,0xa,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x3,
+ // :/qt/etc/qt.conf
+ 0x0,0x0,0x0,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0
+};
+
+bool registerInternalQtConf()
+{
+ // Guard to ensure single registration.
+#ifdef PYSIDE_QT_CONF_PREFIX
+ static bool registrationAttempted = false;
+#else
+ static bool registrationAttempted = true;
+#endif
+ static bool isRegistered = false;
+ if (registrationAttempted)
+ return isRegistered;
+ registrationAttempted = true;
+
+ // Support PyInstaller case when a qt.conf file might be provided next to the generated
+ // PyInstaller executable.
+ // This will disable the internal qt.conf which points to the PySide6 subdirectory (due to the
+ // subdirectory not existing anymore).
+ QString executablePath =
+ QString::fromWCharArray(Py_GetProgramFullPath());
+ QString appDirPath = QFileInfo(executablePath).absolutePath();
+ QString maybeQtConfPath = QDir(appDirPath).filePath(QStringLiteral("qt.conf"));
+ bool executableQtConfAvailable = QFileInfo::exists(maybeQtConfPath);
+ maybeQtConfPath = QDir::toNativeSeparators(maybeQtConfPath);
+
+ // Allow disabling the usage of the internal qt.conf. This is necessary for tests to work,
+ // because tests are executed before the package is installed, and thus the Prefix specified
+ // in qt.conf would point to a not yet existing location.
+ bool disableInternalQtConf =
+ qEnvironmentVariableIntValue("PYSIDE_DISABLE_INTERNAL_QT_CONF") > 0 ? true : false;
+ if (disableInternalQtConf || executableQtConfAvailable) {
+ registrationAttempted = true;
+ return false;
+ }
+
+ PyObject *pysideModule = PyImport_ImportModule("PySide6");
+ if (!pysideModule)
+ return false;
+
+ // Querying __file__ should be done only for modules that have finished their initialization.
+ // Thus querying for the top-level PySide6 package works for us whenever any Qt-wrapped module
+ // is loaded.
+ PyObject *pysideInitFilePath = PyObject_GetAttr(pysideModule, Shiboken::PyMagicName::file());
+ Py_DECREF(pysideModule);
+ if (!pysideInitFilePath)
+ return false;
+
+ QString initPath = pyStringToQString(pysideInitFilePath);
+ Py_DECREF(pysideInitFilePath);
+ if (initPath.isEmpty())
+ return false;
+
+ // pysideDir - absolute path to the directory containing the init file, which also contains
+ // the rest of the PySide6 modules.
+ // prefixPath - absolute path to the directory containing the installed Qt (prefix).
+ QDir pysideDir = QFileInfo(QDir::fromNativeSeparators(initPath)).absoluteDir();
+ QString setupPrefix;
+#ifdef PYSIDE_QT_CONF_PREFIX
+ setupPrefix = QStringLiteral(PYSIDE_QT_CONF_PREFIX);
+#endif
+ const QString prefixPathStr = pysideDir.absoluteFilePath(setupPrefix);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const QByteArray prefixPath = prefixPathStr.toLocal8Bit();
+#else
+ // PYSIDE-972, QSettings used by QtCore uses Latin1
+ const QByteArray prefixPath = prefixPathStr.toLatin1();
+#endif
+
+ // rccData needs to be static, otherwise when it goes out of scope, the Qt resource system
+ // will point to invalid memory.
+ static QByteArray rccData = QByteArrayLiteral("[Paths]\nPrefix = ") + prefixPath
+#ifdef Q_OS_WIN
+ // LibraryExecutables needs to point to Prefix instead of ./bin because we don't
+ // currently conform to the Qt default directory layout on Windows. This is necessary
+ // for QtWebEngineCore to find the location of QtWebEngineProcess.exe.
+ + QByteArray("\nLibraryExecutables = ") + prefixPath
+#endif
+ ;
+ rccData.append('\n');
+
+ // The RCC data structure expects a 4-byte size value representing the actual data.
+ int size = rccData.size();
+
+ for (int i = 0; i < 4; ++i) {
+ rccData.prepend((size & 0xff));
+ size >>= 8;
+ }
+
+ const int version = 0x01;
+ isRegistered = qRegisterResourceData(version, qt_resource_struct, qt_resource_name,
+ reinterpret_cast<const unsigned char *>(
+ rccData.constData()));
+
+ return isRegistered;
+}
+
+
+
+} //namespace PySide
+
diff --git a/sources/pyside2/libpyside/pyside.h b/sources/pyside6/libpyside/pyside.h
index e241ac74d..e241ac74d 100644
--- a/sources/pyside2/libpyside/pyside.h
+++ b/sources/pyside6/libpyside/pyside.h
diff --git a/sources/pyside6/libpyside/pyside6.pc.in b/sources/pyside6/libpyside/pyside6.pc.in
new file mode 100644
index 000000000..394372539
--- /dev/null
+++ b/sources/pyside6/libpyside/pyside6.pc.in
@@ -0,0 +1,15 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@CMAKE_INSTALL_PREFIX@/include/PySide6@pyside6_SUFFIX@
+typesystemdir=@CMAKE_INSTALL_PREFIX@/share/PySide6@pyside6_SUFFIX@/typesystems
+gluedir=@CMAKE_INSTALL_PREFIX@/share/PySide6@pyside6_SUFFIX@/glue
+pythonpath=@PYTHON_SITE_PACKAGES@
+
+Name: PySide6@pyside6_SUFFIX@
+Description: Support library for Python bindings of Qt5-based libraries.
+Version: @BINDING_API_VERSION_FULL@
+Libs: -L${libdir} -lpyside6@pyside6_SUFFIX@@SHIBOKEN_PYTHON_CONFIG_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
+Cflags: -I${includedir}
+Requires: shiboken6
+
diff --git a/sources/pyside2/libpyside/pyside_p.h b/sources/pyside6/libpyside/pyside_p.h
index 1084a40a1..1084a40a1 100644
--- a/sources/pyside2/libpyside/pyside_p.h
+++ b/sources/pyside6/libpyside/pyside_p.h
diff --git a/sources/pyside6/libpyside/pysideclassinfo.cpp b/sources/pyside6/libpyside/pysideclassinfo.cpp
new file mode 100644
index 000000000..67334f2f4
--- /dev/null
+++ b/sources/pyside6/libpyside/pysideclassinfo.cpp
@@ -0,0 +1,207 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sbkpython.h>
+
+#include "pysideclassinfo.h"
+#include "pyside_p.h"
+#include "pysideclassinfo_p.h"
+#include "dynamicqmetaobject.h"
+
+#include <shiboken.h>
+#include <signature.h>
+
+extern "C"
+{
+
+static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject *args, PyObject *kwds);
+static int classInfoTpInit(PyObject *, PyObject *, PyObject *);
+static void classInfoFree(void *);
+static PyObject *classCall(PyObject *, PyObject *, PyObject *);
+
+static PyType_Slot PySideClassInfoType_slots[] = {
+ {Py_tp_call, (void *)classCall},
+ {Py_tp_init, (void *)classInfoTpInit},
+ {Py_tp_new, (void *)classInfoTpNew},
+ {Py_tp_free, (void *)classInfoFree},
+ {Py_tp_dealloc, (void *)Sbk_object_dealloc},
+ {0, 0}
+};
+static PyType_Spec PySideClassInfoType_spec = {
+ "2:PySide6.QtCore.ClassInfo",
+ sizeof(PySideClassInfo),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideClassInfoType_slots,
+};
+
+
+PyTypeObject *PySideClassInfoTypeF(void)
+{
+ static PyTypeObject *type =
+ reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideClassInfoType_spec));
+ return type;
+}
+
+PyObject *classCall(PyObject *self, PyObject *args, PyObject * /* kw */)
+{
+ if (!PyTuple_Check(args) || PyTuple_Size(args) != 1) {
+ PyErr_Format(PyExc_TypeError,
+ "The ClassInfo decorator takes exactly 1 positional argument (%zd given)",
+ PyTuple_Size(args));
+ return 0;
+ }
+
+ PySideClassInfo *data = reinterpret_cast<PySideClassInfo *>(self);
+ PySideClassInfoPrivate *pData = data->d;
+
+ if (pData->m_alreadyWrapped) {
+ PyErr_SetString(PyExc_TypeError, "This instance of ClassInfo() was already used to wrap an object");
+ return 0;
+ }
+
+ PyObject *klass = PyTuple_GetItem(args, 0);
+ bool validClass = false;
+
+ // This will sometimes segfault if you mistakenly use it on a function declaration
+ if (!PyType_Check(klass)) {
+ PyErr_SetString(PyExc_TypeError, "This decorator can only be used on class declarations");
+ return 0;
+ }
+
+ PyTypeObject *klassType = reinterpret_cast<PyTypeObject *>(klass);
+ if (Shiboken::ObjectType::checkType(klassType)) {
+ if (auto userData = PySide::retrieveTypeUserData(klassType)) {
+ PySide::MetaObjectBuilder &mo = userData->mo;
+ mo.addInfo(PySide::ClassInfo::getMap(data));
+ pData->m_alreadyWrapped = true;
+ validClass = true;
+ }
+ }
+
+ if (!validClass) {
+ PyErr_SetString(PyExc_TypeError, "This decorator can only be used on classes that are subclasses of QObject");
+ return 0;
+ }
+
+ Py_INCREF(klass);
+ return klass;
+}
+
+static PyObject *classInfoTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
+{
+ PySideClassInfo *me = reinterpret_cast<PySideClassInfo *>(subtype->tp_alloc(subtype, 0));
+ me->d = new PySideClassInfoPrivate;
+
+ me->d->m_alreadyWrapped = false;
+
+ return reinterpret_cast<PyObject *>(me);
+}
+
+int classInfoTpInit(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ if (PyTuple_Check(args) && PyTuple_Size(args) > 0) {
+ PyErr_Format(PyExc_TypeError, "ClassInfo() takes exactly 0 positional arguments (%zd given)", PyTuple_Size(args));
+ return -1;
+ }
+
+ PySideClassInfo *data = reinterpret_cast<PySideClassInfo *>(self);
+ PySideClassInfoPrivate *pData = data->d;
+
+ PyObject *key;
+ PyObject *value;
+ Py_ssize_t pos = 0;
+
+ // PyDict_Next causes a segfault if kwds is empty
+ if (kwds && PyDict_Check(kwds) && PyDict_Size(kwds) > 0) {
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ if (Shiboken::String::check(key) && Shiboken::String::check(value)) {
+ pData->m_data[Shiboken::String::toCString(key)] = Shiboken::String::toCString(value);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "All keys and values provided to ClassInfo() must be strings");
+ return -1;
+ }
+ }
+ }
+
+ return PyErr_Occurred() ? -1 : 0;
+}
+
+void classInfoFree(void *self)
+{
+ auto pySelf = reinterpret_cast<PyObject *>(self);
+ auto data = reinterpret_cast<PySideClassInfo *>(self);
+
+ delete data->d;
+ Py_TYPE(pySelf)->tp_base->tp_free(self);
+}
+
+
+} // extern "C"
+
+
+namespace PySide { namespace ClassInfo {
+
+static const char *ClassInfo_SignatureStrings[] = {
+ "PySide6.QtCore.ClassInfo(**info:typing.Dict[str,str])",
+ nullptr}; // Sentinel
+
+void init(PyObject *module)
+{
+ if (InitSignatureStrings(PySideClassInfoTypeF(), ClassInfo_SignatureStrings) < 0)
+ return;
+
+ Py_INCREF(PySideClassInfoTypeF());
+ PyModule_AddObject(module, "ClassInfo", reinterpret_cast<PyObject *>(PySideClassInfoTypeF()));
+}
+
+bool checkType(PyObject *pyObj)
+{
+ if (pyObj)
+ return PyType_IsSubtype(Py_TYPE(pyObj), PySideClassInfoTypeF());
+ return false;
+}
+
+QMap<QByteArray, QByteArray> getMap(PySideClassInfo *obj)
+{
+ return obj->d->m_data;
+}
+
+} //namespace Property
+} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysideclassinfo.h b/sources/pyside6/libpyside/pysideclassinfo.h
index ff60b91c3..ff60b91c3 100644
--- a/sources/pyside2/libpyside/pysideclassinfo.h
+++ b/sources/pyside6/libpyside/pysideclassinfo.h
diff --git a/sources/pyside2/libpyside/pysideclassinfo_p.h b/sources/pyside6/libpyside/pysideclassinfo_p.h
index 021aa58e9..021aa58e9 100644
--- a/sources/pyside2/libpyside/pysideclassinfo_p.h
+++ b/sources/pyside6/libpyside/pysideclassinfo_p.h
diff --git a/sources/pyside2/libpyside/pysidemacros.h b/sources/pyside6/libpyside/pysidemacros.h
index fcdfe3c6e..fcdfe3c6e 100644
--- a/sources/pyside2/libpyside/pysidemacros.h
+++ b/sources/pyside6/libpyside/pysidemacros.h
diff --git a/sources/pyside6/libpyside/pysidemetafunction.cpp b/sources/pyside6/libpyside/pysidemetafunction.cpp
new file mode 100644
index 000000000..6d93e7629
--- /dev/null
+++ b/sources/pyside6/libpyside/pysidemetafunction.cpp
@@ -0,0 +1,231 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pysidemetafunction.h"
+#include "pysidemetafunction_p.h"
+
+#include <shiboken.h>
+#include <signature.h>
+
+#include <QtCore/QMetaMethod>
+
+extern "C"
+{
+
+struct PySideMetaFunctionPrivate
+{
+ QObject *qobject;
+ int methodIndex;
+};
+
+//methods
+static void functionFree(void *);
+static PyObject *functionCall(PyObject *, PyObject *, PyObject *);
+
+static PyType_Slot PySideMetaFunctionType_slots[] = {
+ {Py_tp_call, (void *)functionCall},
+ {Py_tp_new, (void *)PyType_GenericNew},
+ {Py_tp_free, (void *)functionFree},
+ {Py_tp_dealloc, (void *)Sbk_object_dealloc},
+ {0, 0}
+};
+static PyType_Spec PySideMetaFunctionType_spec = {
+ "2:PySide6.QtCore.MetaFunction",
+ sizeof(PySideMetaFunction),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideMetaFunctionType_slots,
+};
+
+
+PyTypeObject *PySideMetaFunctionTypeF(void)
+{
+ static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
+ SbkType_FromSpec(&PySideMetaFunctionType_spec));
+ return type;
+}
+
+void functionFree(void *self)
+{
+ PySideMetaFunction *function = reinterpret_cast<PySideMetaFunction *>(self);
+ delete function->d;
+}
+
+PyObject *functionCall(PyObject *self, PyObject *args, PyObject * /* kw */)
+{
+ PySideMetaFunction *function = reinterpret_cast<PySideMetaFunction *>(self);
+
+ PyObject *retVal;
+ if (!PySide::MetaFunction::call(function->d->qobject, function->d->methodIndex, args, &retVal))
+ return 0;
+ return retVal;
+}
+
+} // extern "C"
+
+namespace PySide { namespace MetaFunction {
+
+static const char *MetaFunction_SignatureStrings[] = {
+ "PySide6.QtCore.MetaFunction.__call__(*args:typing.Any)->typing.Any",
+ nullptr}; // Sentinel
+
+void init(PyObject *module)
+{
+ if (InitSignatureStrings(PySideMetaFunctionTypeF(), MetaFunction_SignatureStrings) < 0)
+ return;
+
+ Py_INCREF(PySideMetaFunctionTypeF());
+ PyModule_AddObject(module, "MetaFunction", reinterpret_cast<PyObject *>(PySideMetaFunctionTypeF()));
+}
+
+PySideMetaFunction *newObject(QObject *source, int methodIndex)
+{
+ if (methodIndex >= source->metaObject()->methodCount())
+ return 0;
+
+ QMetaMethod method = source->metaObject()->method(methodIndex);
+ if ((method.methodType() == QMetaMethod::Slot) ||
+ (method.methodType() == QMetaMethod::Method)) {
+ PySideMetaFunction *function = PyObject_New(PySideMetaFunction, PySideMetaFunctionTypeF());
+ function->d = new PySideMetaFunctionPrivate();
+ function->d->qobject = source;
+ function->d->methodIndex = methodIndex;
+ return function;
+ }
+ return 0;
+}
+
+bool call(QObject *self, int methodIndex, PyObject *args, PyObject **retVal)
+{
+
+ QMetaMethod method = self->metaObject()->method(methodIndex);
+ QList<QByteArray> argTypes = method.parameterTypes();
+
+ // args given plus return type
+ Shiboken::AutoDecRef sequence(PySequence_Fast(args, 0));
+ int numArgs = PySequence_Fast_GET_SIZE(sequence.object()) + 1;
+
+ if (numArgs - 1 > argTypes.count()) {
+ PyErr_Format(PyExc_TypeError, "%s only accepts %d argument(s), %d given!",
+ method.methodSignature().constData(),
+ argTypes.count(), numArgs - 1);
+ return false;
+ }
+
+ if (numArgs - 1 < argTypes.count()) {
+ PyErr_Format(PyExc_TypeError, "%s needs %d argument(s), %d given!",
+ method.methodSignature().constData(),
+ argTypes.count(), numArgs - 1);
+ return false;
+ }
+
+ QVariant *methValues = new QVariant[numArgs];
+ void **methArgs = new void *[numArgs];
+
+ // Prepare room for return type
+ const char *returnType = method.typeName();
+ if (returnType && std::strcmp("void", returnType))
+ argTypes.prepend(returnType);
+ else
+ argTypes.prepend(QByteArray());
+
+ int i;
+ for (i = 0; i < numArgs; ++i) {
+ const QByteArray &typeName = argTypes.at(i);
+ // This must happen only when the method hasn't return type.
+ if (typeName.isEmpty()) {
+ methArgs[i] = 0;
+ continue;
+ }
+
+ Shiboken::Conversions::SpecificConverter converter(typeName);
+ if (converter) {
+ QMetaType metaType = QMetaType::fromName(typeName);
+ if (!Shiboken::Conversions::pythonTypeIsObjectType(converter)) {
+ if (!metaType.isValid()) {
+ PyErr_Format(PyExc_TypeError, "Value types used on meta functions (including signals) need to be "
+ "registered on meta type: %s", typeName.data());
+ break;
+ }
+ methValues[i] = QVariant(metaType);
+ }
+ methArgs[i] = methValues[i].data();
+ if (i == 0) // Don't do this for return type
+ continue;
+ if (metaType.id() == QMetaType::QString) {
+ QString tmp;
+ converter.toCpp(PySequence_Fast_GET_ITEM(sequence.object(), i - 1), &tmp);
+ methValues[i] = tmp;
+ } else {
+ converter.toCpp(PySequence_Fast_GET_ITEM(sequence.object(), i - 1), methArgs[i]);
+ }
+ } else {
+ PyErr_Format(PyExc_TypeError, "Unknown type used to call meta function (that may be a signal): %s", argTypes[i].constData());
+ break;
+ }
+ }
+
+ bool ok = i == numArgs;
+ if (ok) {
+ Py_BEGIN_ALLOW_THREADS
+ QMetaObject::metacall(self, QMetaObject::InvokeMetaMethod, method.methodIndex(), methArgs);
+ Py_END_ALLOW_THREADS
+
+ if (retVal) {
+ if (methArgs[0]) {
+ static SbkConverter *qVariantTypeConverter = Shiboken::Conversions::getConverter("QVariant");
+ Q_ASSERT(qVariantTypeConverter);
+ *retVal = Shiboken::Conversions::copyToPython(qVariantTypeConverter, &methValues[0]);
+ } else {
+ *retVal = Py_None;
+ Py_INCREF(*retVal);
+ }
+ }
+ }
+
+ delete[] methArgs;
+ delete[] methValues;
+
+ return ok;
+}
+
+
+} //namespace MetaFunction
+} //namespace PySide
+
diff --git a/sources/pyside2/libpyside/pysidemetafunction.h b/sources/pyside6/libpyside/pysidemetafunction.h
index f7cc5307b..f7cc5307b 100644
--- a/sources/pyside2/libpyside/pysidemetafunction.h
+++ b/sources/pyside6/libpyside/pysidemetafunction.h
diff --git a/sources/pyside2/libpyside/pysidemetafunction_p.h b/sources/pyside6/libpyside/pysidemetafunction_p.h
index c67233857..c67233857 100644
--- a/sources/pyside2/libpyside/pysidemetafunction_p.h
+++ b/sources/pyside6/libpyside/pysidemetafunction_p.h
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp
new file mode 100644
index 000000000..b031c5b12
--- /dev/null
+++ b/sources/pyside6/libpyside/pysideproperty.cpp
@@ -0,0 +1,634 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sbkpython.h>
+#include "pysideproperty.h"
+#include "pysideproperty_p.h"
+#include "dynamicqmetaobject_p.h"
+#include "pysidesignal.h"
+#include "pysidesignal_p.h"
+
+#include <shiboken.h>
+#include <signature.h>
+
+using namespace Shiboken;
+
+extern "C"
+{
+
+static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject *args, PyObject *kwds);
+static int qpropertyTpInit(PyObject *, PyObject *, PyObject *);
+static void qpropertyDeAlloc(PyObject *self);
+
+//methods
+static PyObject *qPropertyGetter(PyObject *, PyObject *);
+static PyObject *qPropertySetter(PyObject *, PyObject *);
+static PyObject *qPropertyResetter(PyObject *, PyObject *);
+static PyObject *qPropertyDeleter(PyObject *, PyObject *);
+static PyObject *qPropertyCall(PyObject *, PyObject *, PyObject *);
+static int qpropertyTraverse(PyObject *self, visitproc visit, void *arg);
+static int qpropertyClear(PyObject *self);
+
+// Attributes
+static PyObject *qPropertyDocGet(PyObject *, void *);
+static int qPropertyDocSet(PyObject *, PyObject *, void *);
+static PyObject *qProperty_fget(PyObject *, void *);
+static PyObject *qProperty_fset(PyObject *, void *);
+static PyObject *qProperty_freset(PyObject *, void *);
+static PyObject *qProperty_fdel(PyObject *, void *);
+
+static PyMethodDef PySidePropertyMethods[] = {
+ {"getter", (PyCFunction)qPropertyGetter, METH_O, 0},
+ {"setter", (PyCFunction)qPropertySetter, METH_O, 0},
+ {"resetter", (PyCFunction)qPropertyResetter, METH_O, 0},
+ {"deleter", (PyCFunction)qPropertyDeleter, METH_O, 0},
+ // Synonyms from Qt
+ {"read", (PyCFunction)qPropertyGetter, METH_O, 0},
+ {"write", (PyCFunction)qPropertySetter, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyGetSetDef PySidePropertyType_getset[] = {
+ // Note: we could not use `PyMemberDef` like Python's properties,
+ // because of the indirection of PySidePropertyPrivate.
+ {const_cast<char *>("fget"), qProperty_fget, nullptr, nullptr, nullptr},
+ {const_cast<char *>("fset"), qProperty_fset, nullptr, nullptr, nullptr},
+ {const_cast<char *>("freset"), qProperty_freset, nullptr, nullptr, nullptr},
+ {const_cast<char *>("fdel"), qProperty_fdel, nullptr, nullptr, nullptr},
+ {const_cast<char *>("__doc__"), qPropertyDocGet, qPropertyDocSet, nullptr, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr}
+};
+
+static PyType_Slot PySidePropertyType_slots[] = {
+ {Py_tp_dealloc, (void *)qpropertyDeAlloc},
+ {Py_tp_call, (void *)qPropertyCall},
+ {Py_tp_traverse, (void *)qpropertyTraverse},
+ {Py_tp_clear, (void *)qpropertyClear},
+ {Py_tp_methods, (void *)PySidePropertyMethods},
+ {Py_tp_init, (void *)qpropertyTpInit},
+ {Py_tp_new, (void *)qpropertyTpNew},
+ {Py_tp_getset, PySidePropertyType_getset},
+ {0, 0}
+};
+// Dotted modulename is crucial for SbkType_FromSpec to work. Is this name right?
+static PyType_Spec PySidePropertyType_spec = {
+ "2:PySide6.QtCore.Property",
+ sizeof(PySideProperty),
+ 0,
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE,
+ PySidePropertyType_slots,
+};
+
+
+PyTypeObject *PySidePropertyTypeF(void)
+{
+ static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
+ SbkType_FromSpec(&PySidePropertyType_spec));
+ return type;
+}
+
+static void qpropertyMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::Call call, void **args)
+{
+ Shiboken::Conversions::SpecificConverter converter(pp->d->typeName);
+ Q_ASSERT(converter);
+
+ QByteArray type(pp->d->typeName);
+
+ switch(call) {
+ case QMetaObject::ReadProperty:
+ {
+ Shiboken::GilState gil;
+ PyObject *value = PySide::Property::getValue(pp, self);
+ if (value) {
+ converter.toCpp(value, args[0]);
+ Py_DECREF(value);
+ }
+ break;
+ }
+
+ case QMetaObject::WriteProperty:
+ {
+ Shiboken::GilState gil;
+ Shiboken::AutoDecRef value(converter.toPython(args[0]));
+ PySide::Property::setValue(pp, self, value);
+ break;
+ }
+
+ case QMetaObject::ResetProperty:
+ {
+ Shiboken::GilState gil;
+ PySide::Property::reset(pp, self);
+ break;
+ }
+
+ // just to avoid gcc warnings
+ case QMetaObject::BindableProperty:
+ case QMetaObject::InvokeMetaMethod:
+ case QMetaObject::CreateInstance:
+ case QMetaObject::IndexOfMethod:
+ case QMetaObject::RegisterPropertyMetaType:
+ case QMetaObject::RegisterMethodArgumentMetaType:
+ break;
+ }
+}
+
+
+static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
+{
+ PySideProperty *me = reinterpret_cast<PySideProperty *>(subtype->tp_alloc(subtype, 0));
+ me->d = new PySidePropertyPrivate;
+ return reinterpret_cast<PyObject *>(me);
+}
+
+static int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *type = nullptr;
+ auto data = reinterpret_cast<PySideProperty *>(self);
+ PySidePropertyPrivate *pData = data->d;
+ pData->metaCallHandler = &qpropertyMetaCall;
+
+ static const char *kwlist[] = {"type", "fget", "fset", "freset", "fdel", "doc", "notify",
+ "designable", "scriptable", "stored",
+ "user", "constant", "final", 0};
+ char *doc{};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds,
+ "O|OOOOsObbbbbb:QtCore.Property",
+ const_cast<char **>(kwlist),
+ /*OO*/ &type, &(pData->fget),
+ /*OOO*/ &(pData->fset), &(pData->freset), &(pData->fdel),
+ /*s*/ &doc,
+ /*O*/ &(pData->notify),
+ /*bbb*/ &(pData->designable), &(pData->scriptable), &(pData->stored),
+ /*bbb*/ &(pData->user), &(pData->constant), &(pData->final))) {
+ return -1;
+ }
+
+ // PYSIDE-1019: Fetching the default `__doc__` from fget would fail for inherited functions
+ // because we don't initialize the mro with signatures (and we will not!).
+ // But it is efficient and in-time to do that on demand in qPropertyDocGet.
+ pData->getter_doc = false;
+ if (doc)
+ pData->doc = doc;
+ else
+ pData->doc.clear();
+
+ pData->typeName = PySide::Signal::getTypeName(type);
+
+ if (pData->typeName.isEmpty())
+ PyErr_SetString(PyExc_TypeError, "Invalid property type or type name.");
+ else if (pData->constant && (pData->fset || pData->notify))
+ PyErr_SetString(PyExc_TypeError, "A constant property cannot have a WRITE method or a NOTIFY signal.");
+
+ if (!PyErr_Occurred()) {
+ Py_XINCREF(pData->fget);
+ Py_XINCREF(pData->fset);
+ Py_XINCREF(pData->freset);
+ Py_XINCREF(pData->fdel);
+ Py_XINCREF(pData->notify);
+ return 0;
+ }
+ pData->fget = nullptr;
+ pData->fset = nullptr;
+ pData->freset = nullptr;
+ pData->fdel = nullptr;
+ pData->notify = nullptr;
+ return -1;
+}
+
+static void qpropertyDeAlloc(PyObject *self)
+{
+ qpropertyClear(self);
+ if (PepRuntime_38_flag) {
+ // PYSIDE-939: Handling references correctly.
+ // This was not needed before Python 3.8 (Python issue 35810)
+ Py_DECREF(Py_TYPE(self));
+ }
+ Py_TYPE(self)->tp_free(self);
+}
+
+static PyObject *
+_property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *reset, PyObject *del)
+{
+ PySideProperty *pold = reinterpret_cast<PySideProperty *>(old);
+ PySidePropertyPrivate *pData = pold->d;
+
+ AutoDecRef type(PyObject_Type(old));
+ QByteArray doc{};
+ if (type.isNull())
+ return nullptr;
+
+ if (get == nullptr || get == Py_None) {
+ Py_XDECREF(get);
+ get = pData->fget ? pData->fget : Py_None;
+ }
+ if (set == nullptr || set == Py_None) {
+ Py_XDECREF(set);
+ set = pData->fset ? pData->fset : Py_None;
+ }
+ if (reset == nullptr || reset == Py_None) {
+ Py_XDECREF(reset);
+ reset = pData->freset ? pData->freset : Py_None;
+ }
+ if (del == nullptr || del == Py_None) {
+ Py_XDECREF(del);
+ del = pData->fdel ? pData->fdel : Py_None;
+ }
+ if (pData->getter_doc && get != Py_None) {
+ /* make _init use __doc__ from getter */
+ doc = "";
+ }
+ else {
+ doc = !pData->doc.isEmpty() ? pData->doc : "";
+ }
+ auto notify = pData->notify ? pData->notify : Py_None;
+
+ PyObject *typeName = String::fromCString(pData->typeName);
+ PyObject *obNew = PyObject_CallFunction(type, const_cast<char *>("OOOOOsO" "bbb" "bbb"),
+ typeName, get, set, reset, del, doc.data(), notify,
+ pData->designable, pData->scriptable, pData->stored,
+ pData->user, pData->constant, pData->final);
+
+ return obNew;
+}
+
+static PyObject *qPropertyGetter(PyObject *self, PyObject *getter)
+{
+ return _property_copy(self, getter, nullptr, nullptr, nullptr);
+}
+
+static PyObject *qPropertySetter(PyObject *self, PyObject *setter)
+{
+ return _property_copy(self, nullptr, setter, nullptr, nullptr);
+}
+
+static PyObject *qPropertyResetter(PyObject *self, PyObject *resetter)
+{
+ return _property_copy(self, nullptr, nullptr, resetter, nullptr);
+}
+
+static PyObject *qPropertyDeleter(PyObject *self, PyObject *deleter)
+{
+ return _property_copy(self, nullptr, nullptr, nullptr, deleter);
+}
+
+static PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
+{
+ PyObject *getter = PyTuple_GetItem(args, 0);
+ return _property_copy(self, getter, nullptr, nullptr, nullptr);
+}
+
+// PYSIDE-1019: Provide the same getters as Pythons `PyProperty`.
+
+static PyObject *qProperty_fget(PyObject *self, void *)
+{
+ auto func = reinterpret_cast<PySideProperty *>(self)->d->fget;
+ auto ret = func != nullptr ? func : Py_None;
+ Py_INCREF(ret);
+ return ret;
+}
+
+static PyObject *qProperty_fset(PyObject *self, void *)
+{
+ auto func = reinterpret_cast<PySideProperty *>(self)->d->fset;
+ auto ret = func != nullptr ? func : Py_None;
+ Py_INCREF(ret);
+ return ret;
+}
+
+static PyObject *qProperty_freset(PyObject *self, void *)
+{
+ auto func = reinterpret_cast<PySideProperty *>(self)->d->freset;
+ auto ret = func != nullptr ? func : Py_None;
+ Py_INCREF(ret);
+ return ret;
+}
+
+static PyObject *qProperty_fdel(PyObject *self, void *)
+{
+ auto func = reinterpret_cast<PySideProperty *>(self)->d->fdel;
+ auto ret = func != nullptr ? func : Py_None;
+ Py_INCREF(ret);
+ return ret;
+}
+
+static PyObject *qPropertyDocGet(PyObject *self, void *)
+{
+ auto data = reinterpret_cast<PySideProperty *>(self);
+ PySidePropertyPrivate *pData = data->d;
+
+ QByteArray doc(pData->doc);
+ if (!doc.isEmpty())
+ return PyUnicode_FromString(doc);
+ if (pData->fget != nullptr) {
+ // PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
+ AutoDecRef get_doc(PyObject_GetAttr(pData->fget, PyMagicName::doc()));
+ if (!get_doc.isNull()) {
+ pData->doc = String::toCString(get_doc);
+ pData->getter_doc = true;
+ if (Py_TYPE(self) == PySidePropertyTypeF())
+ return qPropertyDocGet(self, nullptr);
+ /*
+ * If this is a property subclass, put __doc__ in dict of the
+ * subclass instance instead, otherwise it gets shadowed by
+ * __doc__ in the class's dict.
+ */
+ auto get_doc_obj = get_doc.object();
+ int err = PyObject_SetAttr(self, PyMagicName::doc(), get_doc);
+ return err < 0 ? nullptr : (Py_INCREF(get_doc_obj), get_doc_obj);
+ }
+ PyErr_Clear();
+ }
+ Py_RETURN_NONE;
+}
+
+static int qPropertyDocSet(PyObject *self, PyObject *value, void *)
+{
+ auto data = reinterpret_cast<PySideProperty *>(self);
+ PySidePropertyPrivate *pData = data->d;
+
+ if (String::check(value)) {
+ pData->doc = String::toCString(value);
+ return 0;
+ }
+ PyErr_SetString(PyExc_TypeError, "String argument expected.");
+ return -1;
+}
+
+static int qpropertyTraverse(PyObject *self, visitproc visit, void *arg)
+{
+ PySidePropertyPrivate *data = reinterpret_cast<PySideProperty *>(self)->d;
+ if (!data)
+ return 0;
+
+ Py_VISIT(data->fget);
+ Py_VISIT(data->fset);
+ Py_VISIT(data->freset);
+ Py_VISIT(data->fdel);
+ Py_VISIT(data->notify);
+ return 0;
+}
+
+static int qpropertyClear(PyObject *self)
+{
+ PySidePropertyPrivate *data = reinterpret_cast<PySideProperty *>(self)->d;
+ if (!data)
+ return 0;
+
+ Py_CLEAR(data->fget);
+ Py_CLEAR(data->fset);
+ Py_CLEAR(data->freset);
+ Py_CLEAR(data->fdel);
+ Py_CLEAR(data->notify);
+
+
+ delete data;
+ reinterpret_cast<PySideProperty *>(self)->d = nullptr;
+ return 0;
+}
+
+} // extern "C"
+
+namespace {
+
+static PyObject *getFromType(PyTypeObject *type, PyObject *name)
+{
+ PyObject *attr = nullptr;
+ attr = PyDict_GetItem(type->tp_dict, name);
+ if (!attr) {
+ PyObject *bases = type->tp_bases;
+ int size = PyTuple_GET_SIZE(bases);
+ for(int i=0; i < size; i++) {
+ PyObject *base = PyTuple_GET_ITEM(bases, i);
+ attr = getFromType(reinterpret_cast<PyTypeObject *>(base), name);
+ if (attr)
+ return attr;
+ }
+ }
+ return attr;
+}
+
+} //namespace
+
+
+namespace PySide { namespace Property {
+
+static const char *Property_SignatureStrings[] = {
+ "PySide6.QtCore.Property(self,type:type,fget:typing.Callable=None,fset:typing.Callable=None,"
+ "freset:typing.Callable=None,fdel:typing.Callable=None,doc:str=None,"
+ "notify:typing.Callable=None,designable:bool=True,scriptable:bool=True,"
+ "stored:bool=True,user:bool=False,constant:bool=False,final:bool=False)"
+ "->PySide6.QtCore.Property",
+ "PySide6.QtCore.Property.deleter(self,func:typing.Callable)",
+ "PySide6.QtCore.Property.fdel(self)->typing.Callable",
+ "PySide6.QtCore.Property.fget(self)->typing.Callable",
+ "PySide6.QtCore.Property.freset(self)->typing.Callable",
+ "PySide6.QtCore.Property.fset(self)->typing.Callable",
+ "PySide6.QtCore.Property.getter(self,func:typing.Callable)",
+ "PySide6.QtCore.Property.read(self,func:typing.Callable)",
+ "PySide6.QtCore.Property.setter(self,func:typing.Callable)",
+ "PySide6.QtCore.Property.write(self,func:typing.Callable)",
+ nullptr}; // Sentinel
+
+void init(PyObject *module)
+{
+ if (InitSignatureStrings(PySidePropertyTypeF(), Property_SignatureStrings) < 0)
+ return;
+
+ Py_INCREF(PySidePropertyTypeF());
+ PyModule_AddObject(module, "Property", reinterpret_cast<PyObject *>(PySidePropertyTypeF()));
+}
+
+bool checkType(PyObject *pyObj)
+{
+ if (pyObj) {
+ return PyType_IsSubtype(Py_TYPE(pyObj), PySidePropertyTypeF());
+ }
+ return false;
+}
+
+int setValue(PySideProperty *self, PyObject *source, PyObject *value)
+{
+ PyObject *fset = self->d->fset;
+ if (fset && value) {
+ Shiboken::AutoDecRef args(PyTuple_New(2));
+ PyTuple_SET_ITEM(args, 0, source);
+ PyTuple_SET_ITEM(args, 1, value);
+ Py_INCREF(source);
+ Py_INCREF(value);
+ Shiboken::AutoDecRef result(PyObject_CallObject(fset, args));
+ return (result.isNull() ? -1 : 0);
+ }
+ PyObject *fdel = self->d->fdel;
+ if (fdel) {
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ PyTuple_SET_ITEM(args, 0, source);
+ Py_INCREF(source);
+ Shiboken::AutoDecRef result(PyObject_CallObject(fdel, args));
+ return (result.isNull() ? -1 : 0);
+ }
+ PyErr_SetString(PyExc_AttributeError, "Attibute read only");
+ return -1;
+}
+
+PyObject *getValue(PySideProperty *self, PyObject *source)
+{
+ PyObject *fget = self->d->fget;
+ if (fget) {
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ Py_INCREF(source);
+ PyTuple_SET_ITEM(args, 0, source);
+ return PyObject_CallObject(fget, args);
+ }
+ return 0;
+}
+
+int reset(PySideProperty *self, PyObject *source)
+{
+ PyObject *freset = self->d->freset;
+ if (freset) {
+ Shiboken::AutoDecRef args(PyTuple_New(1));
+ Py_INCREF(source);
+ PyTuple_SET_ITEM(args, 0, source);
+ Shiboken::AutoDecRef result(PyObject_CallObject(freset, args));
+ return (result.isNull() ? -1 : 0);
+ }
+ return -1;
+}
+
+const char *getTypeName(const PySideProperty *self)
+{
+ return self->d->typeName;
+}
+
+PySideProperty *getObject(PyObject *source, PyObject *name)
+{
+ PyObject *attr = nullptr;
+
+ attr = getFromType(Py_TYPE(source), name);
+ if (attr && checkType(attr)) {
+ Py_INCREF(attr);
+ return reinterpret_cast<PySideProperty *>(attr);
+ }
+
+ if (!attr)
+ PyErr_Clear(); //Clear possible error caused by PyObject_GenericGetAttr
+
+ return 0;
+}
+
+bool isReadable(const PySideProperty * /* self */)
+{
+ return true;
+}
+
+bool isWritable(const PySideProperty *self)
+{
+ return (self->d->fset != 0);
+}
+
+bool hasReset(const PySideProperty *self)
+{
+ return (self->d->freset != 0);
+}
+
+bool isDesignable(const PySideProperty *self)
+{
+ return self->d->designable;
+}
+
+bool isScriptable(const PySideProperty *self)
+{
+ return self->d->scriptable;
+}
+
+bool isStored(const PySideProperty *self)
+{
+ return self->d->stored;
+}
+
+bool isUser(const PySideProperty *self)
+{
+ return self->d->user;
+}
+
+bool isConstant(const PySideProperty *self)
+{
+ return self->d->constant;
+}
+
+bool isFinal(const PySideProperty *self)
+{
+ return self->d->final;
+}
+
+const char *getNotifyName(PySideProperty *self)
+{
+ if (self->d->notifySignature.isEmpty()) {
+ PyObject *str = PyObject_Str(self->d->notify);
+ self->d->notifySignature = Shiboken::String::toCString(str);
+ Py_DECREF(str);
+ }
+
+ return self->d->notifySignature.isEmpty()
+ ? nullptr : self->d->notifySignature.constData();
+}
+
+void setMetaCallHandler(PySideProperty *self, MetaCallHandler handler)
+{
+ self->d->metaCallHandler = handler;
+}
+
+void setTypeName(PySideProperty *self, const char *typeName)
+{
+ self->d->typeName = typeName;
+}
+
+void setUserData(PySideProperty *self, void *data)
+{
+ self->d->userData = data;
+}
+
+void *userData(PySideProperty *self)
+{
+ return self->d->userData;
+}
+
+} //namespace Property
+} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysideproperty.h b/sources/pyside6/libpyside/pysideproperty.h
index 4a467b186..4a467b186 100644
--- a/sources/pyside2/libpyside/pysideproperty.h
+++ b/sources/pyside6/libpyside/pysideproperty.h
diff --git a/sources/pyside2/libpyside/pysideproperty_p.h b/sources/pyside6/libpyside/pysideproperty_p.h
index e7b6e4d77..e7b6e4d77 100644
--- a/sources/pyside2/libpyside/pysideproperty_p.h
+++ b/sources/pyside6/libpyside/pysideproperty_p.h
diff --git a/sources/pyside2/libpyside/pysideqenum.cpp b/sources/pyside6/libpyside/pysideqenum.cpp
index 07a548cb6..07a548cb6 100644
--- a/sources/pyside2/libpyside/pysideqenum.cpp
+++ b/sources/pyside6/libpyside/pysideqenum.cpp
diff --git a/sources/pyside2/libpyside/pysideqenum.h b/sources/pyside6/libpyside/pysideqenum.h
index fc4e55982..fc4e55982 100644
--- a/sources/pyside2/libpyside/pysideqenum.h
+++ b/sources/pyside6/libpyside/pysideqenum.h
diff --git a/sources/pyside2/libpyside/pysideqflags.cpp b/sources/pyside6/libpyside/pysideqflags.cpp
index b07a73332..b07a73332 100644
--- a/sources/pyside2/libpyside/pysideqflags.cpp
+++ b/sources/pyside6/libpyside/pysideqflags.cpp
diff --git a/sources/pyside2/libpyside/pysideqflags.h b/sources/pyside6/libpyside/pysideqflags.h
index 71f30808d..71f30808d 100644
--- a/sources/pyside2/libpyside/pysideqflags.h
+++ b/sources/pyside6/libpyside/pysideqflags.h
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
new file mode 100644
index 000000000..d14f32525
--- /dev/null
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -0,0 +1,1040 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sbkpython.h>
+#include "pysidesignal.h"
+#include "pysidesignal_p.h"
+#include "pysidestaticstrings.h"
+#include "signalmanager.h"
+
+#include <shiboken.h>
+
+#include <QtCore/QObject>
+#include <QtCore/QMetaMethod>
+#include <QtCore/QMetaObject>
+#include <signature.h>
+
+#include <algorithm>
+#include <utility>
+
+#define QT_SIGNAL_SENTINEL '2'
+
+namespace PySide {
+namespace Signal {
+ //aux
+ class SignalSignature {
+ public:
+ SignalSignature() = default;
+ explicit SignalSignature(QByteArray parameterTypes) :
+ m_parameterTypes(std::move(parameterTypes)) {}
+ explicit SignalSignature(QByteArray parameterTypes, QMetaMethod::Attributes attributes) :
+ m_parameterTypes(std::move(parameterTypes)),
+ m_attributes(attributes) {}
+
+ QByteArray m_parameterTypes;
+ QMetaMethod::Attributes m_attributes = QMetaMethod::Compatibility;
+ };
+
+ static QByteArray buildSignature(const QByteArray &, const QByteArray &);
+ static void appendSignature(PySideSignal *, const SignalSignature &);
+ static void instanceInitialize(PySideSignalInstance *, PyObject *, PySideSignal *, PyObject *, int);
+ static QByteArray parseSignature(PyObject *);
+ static PyObject *buildQtCompatible(const QByteArray &);
+}
+}
+
+extern "C"
+{
+
+// Signal methods
+static int signalTpInit(PyObject *, PyObject *, PyObject *);
+static void signalFree(void *);
+static void signalInstanceFree(void *);
+static PyObject *signalGetItem(PyObject *self, PyObject *key);
+static PyObject *signalToString(PyObject *self);
+static PyObject *signalDescrGet(PyObject *self, PyObject *obj, PyObject *type);
+
+// Signal Instance methods
+static PyObject *signalInstanceConnect(PyObject *, PyObject *, PyObject *);
+static PyObject *signalInstanceDisconnect(PyObject *, PyObject *);
+static PyObject *signalInstanceEmit(PyObject *, PyObject *);
+static PyObject *signalInstanceGetItem(PyObject *, PyObject *);
+
+static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw);
+static PyObject *signalCall(PyObject *, PyObject *, PyObject *);
+
+static PyObject *metaSignalCheck(PyObject *, PyObject *);
+
+
+static PyMethodDef MetaSignal_methods[] = {
+ {"__instancecheck__", (PyCFunction)metaSignalCheck, METH_O|METH_STATIC, NULL},
+ {0, 0, 0, 0}
+};
+
+static PyType_Slot PySideMetaSignalType_slots[] = {
+ {Py_tp_methods, reinterpret_cast<void *>(MetaSignal_methods)},
+ {Py_tp_base, reinterpret_cast<void *>(&PyType_Type)},
+ {Py_tp_free, reinterpret_cast<void *>(PyObject_GC_Del)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
+ {0, 0}
+};
+static PyType_Spec PySideMetaSignalType_spec = {
+ "2:PySide6.QtCore.MetaSignal",
+ 0,
+ // sizeof(PyHeapTypeObject) is filled in by SbkType_FromSpecWithBases
+ // which calls PyType_Ready which calls inherit_special.
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideMetaSignalType_slots,
+};
+
+
+static PyTypeObject *PySideMetaSignalTypeF(void)
+{
+ static PyTypeObject *type = nullptr;
+ if (!type) {
+ PyObject *bases = Py_BuildValue("(O)", &PyType_Type);
+ type = (PyTypeObject *)SbkType_FromSpecWithBases(&PySideMetaSignalType_spec, bases);
+ Py_XDECREF(bases);
+ }
+ return type;
+}
+
+static PyType_Slot PySideSignalType_slots[] = {
+ {Py_mp_subscript, reinterpret_cast<void *>(signalGetItem)},
+ {Py_tp_descr_get, reinterpret_cast<void *>(signalDescrGet)},
+ {Py_tp_call, reinterpret_cast<void *>(signalCall)},
+ {Py_tp_str, reinterpret_cast<void *>(signalToString)},
+ {Py_tp_init, reinterpret_cast<void *>(signalTpInit)},
+ {Py_tp_new, reinterpret_cast<void *>(PyType_GenericNew)},
+ {Py_tp_free, reinterpret_cast<void *>(signalFree)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
+ {0, 0}
+};
+static PyType_Spec PySideSignalType_spec = {
+ "2:PySide6.QtCore.Signal",
+ sizeof(PySideSignal),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideSignalType_slots,
+};
+
+
+PyTypeObject *PySideSignalTypeF(void)
+{
+ static PyTypeObject *type = nullptr;
+ if (!type) {
+ type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalType_spec));
+ PyTypeObject *hold = Py_TYPE(type);
+ Py_TYPE(type) = PySideMetaSignalTypeF();
+ Py_INCREF(Py_TYPE(type));
+ Py_DECREF(hold);
+ }
+ return type;
+}
+
+static PyMethodDef SignalInstance_methods[] = {
+ {"connect", (PyCFunction)signalInstanceConnect, METH_VARARGS|METH_KEYWORDS, 0},
+ {"disconnect", signalInstanceDisconnect, METH_VARARGS, 0},
+ {"emit", signalInstanceEmit, METH_VARARGS, 0},
+ {0, 0, 0, 0} /* Sentinel */
+};
+
+static PyType_Slot PySideSignalInstanceType_slots[] = {
+ {Py_mp_subscript, reinterpret_cast<void *>(signalInstanceGetItem)},
+ {Py_tp_call, reinterpret_cast<void *>(signalInstanceCall)},
+ {Py_tp_methods, reinterpret_cast<void *>(SignalInstance_methods)},
+ {Py_tp_new, reinterpret_cast<void *>(PyType_GenericNew)},
+ {Py_tp_free, reinterpret_cast<void *>(signalInstanceFree)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
+ {0, 0}
+};
+static PyType_Spec PySideSignalInstanceType_spec = {
+ "2:PySide6.QtCore.SignalInstance",
+ sizeof(PySideSignalInstance),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideSignalInstanceType_slots,
+};
+
+
+PyTypeObject *PySideSignalInstanceTypeF(void)
+{
+ static PyTypeObject *type =
+ reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalInstanceType_spec));
+ return type;
+}
+
+static int signalTpInit(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ static PyObject *emptyTuple = nullptr;
+ static const char *kwlist[] = {"name", "arguments", nullptr};
+ char *argName = nullptr;
+ PyObject *argArguments = nullptr;
+
+ if (emptyTuple == 0)
+ emptyTuple = PyTuple_New(0);
+
+ if (!PyArg_ParseTupleAndKeywords(emptyTuple, kwds,
+ "|sO:QtCore.Signal", const_cast<char **>(kwlist), &argName, &argArguments))
+ return -1;
+
+ bool tupledArgs = false;
+ PySideSignal *data = reinterpret_cast<PySideSignal *>(self);
+ if (!data->data)
+ data->data = new PySideSignalData;
+ if (argName)
+ data->data->signalName = argName;
+
+ data->data->signalArguments = new QByteArrayList();
+ if (argArguments && PySequence_Check(argArguments)) {
+ Py_ssize_t argument_size = PySequence_Size(argArguments);
+ for (Py_ssize_t i = 0; i < argument_size; ++i) {
+ PyObject *item = PySequence_GetItem(argArguments, i);
+ PyObject *strObj = PyUnicode_AsUTF8String(item);
+ char *s = PyBytes_AsString(strObj);
+ Py_DECREF(strObj);
+ Py_DECREF(item);
+ if (s != nullptr)
+ data->data->signalArguments->append(QByteArray(s));
+ }
+ }
+
+ for (Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
+ PyObject *arg = PyTuple_GET_ITEM(args, i);
+ if (PySequence_Check(arg) && !Shiboken::String::check(arg) && !PyEnumMeta_Check(arg)) {
+ tupledArgs = true;
+ const auto sig = PySide::Signal::parseSignature(arg);
+ PySide::Signal::appendSignature(
+ data,
+ PySide::Signal::SignalSignature(sig));
+ }
+ }
+
+ if (!tupledArgs) {
+ const auto sig = PySide::Signal::parseSignature(args);
+ PySide::Signal::appendSignature(
+ data,
+ PySide::Signal::SignalSignature(sig));
+ }
+
+ return 0;
+}
+
+static void signalFree(void *self)
+{
+ auto pySelf = reinterpret_cast<PyObject *>(self);
+ auto data = reinterpret_cast<PySideSignal *>(self);
+ delete data->data;
+ data->data = nullptr;
+ Py_XDECREF(data->homonymousMethod);
+ data->homonymousMethod = 0;
+
+ Py_TYPE(pySelf)->tp_base->tp_free(self);
+}
+
+static PyObject *signalGetItem(PyObject *self, PyObject *key)
+{
+ auto data = reinterpret_cast<PySideSignal *>(self);
+ QByteArray sigKey;
+ if (key) {
+ sigKey = PySide::Signal::parseSignature(key);
+ } else {
+ sigKey = data->data == nullptr || data->data->signatures.isEmpty()
+ ? PySide::Signal::voidType() : data->data->signatures.constFirst().signature;
+ }
+ auto sig = PySide::Signal::buildSignature(data->data->signalName, sigKey);
+ return Shiboken::String::fromCString(sig.constData());
+}
+
+
+static PyObject *signalToString(PyObject *self)
+{
+ return signalGetItem(self, 0);
+}
+
+static void signalInstanceFree(void *self)
+{
+ auto pySelf = reinterpret_cast<PyObject *>(self);
+ auto data = reinterpret_cast<PySideSignalInstance *>(self);
+
+ PySideSignalInstancePrivate *dataPvt = data->d;
+
+ Py_XDECREF(dataPvt->homonymousMethod);
+
+ if (dataPvt->next) {
+ Py_DECREF(dataPvt->next);
+ dataPvt->next = 0;
+ }
+ delete dataPvt;
+ data->d = 0;
+ Py_TYPE(pySelf)->tp_base->tp_free(self);
+}
+
+static PyObject *signalInstanceConnect(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *slot = nullptr;
+ PyObject *type = nullptr;
+ static const char *kwlist[] = {"slot", "type", nullptr};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds,
+ "O|O:SignalInstance", const_cast<char **>(kwlist), &slot, &type))
+ return 0;
+
+ PySideSignalInstance *source = reinterpret_cast<PySideSignalInstance *>(self);
+ Shiboken::AutoDecRef pyArgs(PyList_New(0));
+
+ bool match = false;
+ if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) {
+ PySideSignalInstance *sourceWalk = source;
+ PySideSignalInstance *targetWalk;
+
+ //find best match
+ while (sourceWalk && !match) {
+ targetWalk = reinterpret_cast<PySideSignalInstance *>(slot);
+ while (targetWalk && !match) {
+ if (QMetaObject::checkConnectArgs(sourceWalk->d->signature, targetWalk->d->signature)) {
+ PyList_Append(pyArgs, sourceWalk->d->source);
+ Shiboken::AutoDecRef sourceSignature(PySide::Signal::buildQtCompatible(sourceWalk->d->signature));
+ PyList_Append(pyArgs, sourceSignature);
+
+ PyList_Append(pyArgs, targetWalk->d->source);
+ Shiboken::AutoDecRef targetSignature(PySide::Signal::buildQtCompatible(targetWalk->d->signature));
+ PyList_Append(pyArgs, targetSignature);
+
+ match = true;
+ }
+ targetWalk = reinterpret_cast<PySideSignalInstance *>(targetWalk->d->next);
+ }
+ sourceWalk = reinterpret_cast<PySideSignalInstance *>(sourceWalk->d->next);
+ }
+ } else {
+ // Check signature of the slot (method or function) to match signal
+ int slotArgs = -1;
+ bool useSelf = false;
+ bool isMethod = PyMethod_Check(slot);
+ bool isFunction = PyFunction_Check(slot);
+ bool matchedSlot = false;
+
+ QByteArray functionName;
+ PySideSignalInstance *it = source;
+
+ if (isMethod || isFunction) {
+ PyObject *function = isMethod ? PyMethod_GET_FUNCTION(slot) : slot;
+ auto *objCode = reinterpret_cast<PepCodeObject *>(PyFunction_GET_CODE(function));
+ useSelf = isMethod;
+ slotArgs = PepCode_GET_FLAGS(objCode) & CO_VARARGS ? -1 : PepCode_GET_ARGCOUNT(objCode);
+ if (useSelf)
+ slotArgs -= 1;
+
+ // Get signature args
+ bool isShortCircuit = false;
+ int signatureArgs = 0;
+ QStringList argsSignature;
+
+ argsSignature = PySide::Signal::getArgsFromSignature(it->d->signature,
+ &isShortCircuit);
+ signatureArgs = argsSignature.length();
+
+ // Iterate the possible types of connection for this signal and compare
+ // it with slot arguments
+ if (signatureArgs != slotArgs) {
+ while (it->d->next != nullptr) {
+ it = it->d->next;
+ argsSignature = PySide::Signal::getArgsFromSignature(it->d->signature,
+ &isShortCircuit);
+ signatureArgs = argsSignature.length();
+ if (signatureArgs == slotArgs) {
+ matchedSlot = true;
+ break;
+ }
+ }
+ }
+ }
+
+ // Adding references to pyArgs
+ PyList_Append(pyArgs, source->d->source);
+
+ if (matchedSlot) {
+ // If a slot matching the same number of arguments was found,
+ // include signature to the pyArgs
+ Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(it->d->signature));
+ PyList_Append(pyArgs, signature);
+ } else {
+ // Try the first by default if the slot was not found
+ Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(source->d->signature));
+ PyList_Append(pyArgs, signature);
+ }
+ PyList_Append(pyArgs, slot);
+ match = true;
+ }
+
+ if (type)
+ PyList_Append(pyArgs, type);
+
+ if (match) {
+ Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
+ Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
+ PySide::PyName::qtConnect()));
+ if (pyMethod.isNull()) { // PYSIDE-79: check if pyMethod exists.
+ PyErr_SetString(PyExc_RuntimeError, "method 'connect' vanished!");
+ return 0;
+ }
+ PyObject *result = PyObject_CallObject(pyMethod, tupleArgs);
+ if (result == Py_True || result == Py_False)
+ return result;
+ Py_XDECREF(result);
+ }
+ if (!PyErr_Occurred()) // PYSIDE-79: inverse the logic. A Null return needs an error.
+ PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s.",
+ source->d->signature.constData());
+ return 0;
+}
+
+static int argCountInSignature(const char *signature)
+{
+ return QByteArray(signature).count(",") + 1;
+}
+
+static PyObject *signalInstanceEmit(PyObject *self, PyObject *args)
+{
+ PySideSignalInstance *source = reinterpret_cast<PySideSignalInstance *>(self);
+
+ Shiboken::AutoDecRef pyArgs(PyList_New(0));
+ int numArgsGiven = PySequence_Fast_GET_SIZE(args);
+ int numArgsInSignature = argCountInSignature(source->d->signature);
+
+ // If number of arguments given to emit is smaller than the first source signature expects,
+ // it is possible it's a case of emitting a signal with default parameters.
+ // Search through all the overloaded signals with the same name, and try to find a signature
+ // with the same number of arguments as given to emit, and is also marked as a cloned method
+ // (which in metaobject parlance means a signal with default parameters).
+ // @TODO: This should be improved to take into account argument types as well. The current
+ // assumption is there are no signals which are both overloaded on argument types and happen to
+ // have signatures with default parameters.
+ if (numArgsGiven < numArgsInSignature) {
+ PySideSignalInstance *possibleDefaultInstance = source;
+ while ((possibleDefaultInstance = possibleDefaultInstance->d->next)) {
+ if (possibleDefaultInstance->d->attributes & QMetaMethod::Cloned
+ && argCountInSignature(possibleDefaultInstance->d->signature) == numArgsGiven) {
+ source = possibleDefaultInstance;
+ break;
+ }
+ }
+ }
+ Shiboken::AutoDecRef sourceSignature(PySide::Signal::buildQtCompatible(source->d->signature));
+
+ PyList_Append(pyArgs, sourceSignature);
+ for (Py_ssize_t i = 0, max = PyTuple_Size(args); i < max; i++)
+ PyList_Append(pyArgs, PyTuple_GetItem(args, i));
+
+ Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
+ PySide::PyName::qtEmit()));
+
+ Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
+ return PyObject_CallObject(pyMethod, tupleArgs);
+}
+
+static PyObject *signalInstanceGetItem(PyObject *self, PyObject *key)
+{
+ auto data = reinterpret_cast<PySideSignalInstance *>(self);
+ const auto sigName = data->d->signalName;
+ const auto sigKey = PySide::Signal::parseSignature(key);
+ const auto sig = PySide::Signal::buildSignature(sigName, sigKey);
+ while (data) {
+ if (data->d->signature == sig) {
+ PyObject *result = reinterpret_cast<PyObject *>(data);
+ Py_INCREF(result);
+ return result;
+ }
+ data = data->d->next;
+ }
+
+ PyErr_Format(PyExc_IndexError, "Signature %s not found for signal: %s",
+ sig.constData(), sigName.constData());
+ return 0;
+}
+
+static PyObject *signalInstanceDisconnect(PyObject *self, PyObject *args)
+{
+ auto source = reinterpret_cast<PySideSignalInstance *>(self);
+ Shiboken::AutoDecRef pyArgs(PyList_New(0));
+
+ PyObject *slot;
+ if (PyTuple_Check(args) && PyTuple_GET_SIZE(args))
+ slot = PyTuple_GET_ITEM(args, 0);
+ else
+ slot = Py_None;
+
+ bool match = false;
+ if (Py_TYPE(slot) == PySideSignalInstanceTypeF()) {
+ PySideSignalInstance *target = reinterpret_cast<PySideSignalInstance *>(slot);
+ if (QMetaObject::checkConnectArgs(source->d->signature, target->d->signature)) {
+ PyList_Append(pyArgs, source->d->source);
+ Shiboken::AutoDecRef source_signature(PySide::Signal::buildQtCompatible(source->d->signature));
+ PyList_Append(pyArgs, source_signature);
+
+ PyList_Append(pyArgs, target->d->source);
+ Shiboken::AutoDecRef target_signature(PySide::Signal::buildQtCompatible(target->d->signature));
+ PyList_Append(pyArgs, target_signature);
+ match = true;
+ }
+ } else {
+ //try the first signature
+ PyList_Append(pyArgs, source->d->source);
+ Shiboken::AutoDecRef signature(PySide::Signal::buildQtCompatible(source->d->signature));
+ PyList_Append(pyArgs, signature);
+
+ // disconnect all, so we need to use the c++ signature disconnect(qobj, signal, 0, 0)
+ if (slot == Py_None)
+ PyList_Append(pyArgs, slot);
+ PyList_Append(pyArgs, slot);
+ match = true;
+ }
+
+ if (match) {
+ Shiboken::AutoDecRef tupleArgs(PyList_AsTuple(pyArgs));
+ Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
+ PySide::PyName::qtDisconnect()));
+ PyObject *result = PyObject_CallObject(pyMethod, tupleArgs);
+ if (!result || result == Py_True)
+ return result;
+ else
+ Py_DECREF(result);
+ }
+
+ PyErr_Format(PyExc_RuntimeError, "Failed to disconnect signal %s.",
+ source->d->signature.constData());
+ return 0;
+}
+
+// PYSIDE-68: Supply the missing __get__ function
+static PyObject *signalDescrGet(PyObject *self, PyObject *obj, PyObject * /*type*/)
+{
+ auto signal = reinterpret_cast<PySideSignal *>(self);
+ // Return the unbound signal if there is nothing to bind it to.
+ if (obj == nullptr || obj == Py_None) {
+ Py_INCREF(self);
+ return self;
+ }
+ Shiboken::AutoDecRef name(Py_BuildValue("s", signal->data->signalName.data()));
+ return reinterpret_cast<PyObject *>(PySide::Signal::initialize(signal, name, obj));
+}
+
+static PyObject *signalCall(PyObject *self, PyObject *args, PyObject *kw)
+{
+ auto signal = reinterpret_cast<PySideSignal *>(self);
+
+ // Native C++ signals can't be called like functions, thus we throw an exception.
+ // The only way calling a signal can succeed (the Python equivalent of C++'s operator() )
+ // is when a method with the same name as the signal is attached to an object.
+ // An example is QProcess::error() (don't check the docs, but the source code of qprocess.h).
+ if (!signal->homonymousMethod) {
+ PyErr_SetString(PyExc_TypeError, "native Qt signal is not callable");
+ return 0;
+ }
+
+ descrgetfunc getDescriptor = Py_TYPE(signal->homonymousMethod)->tp_descr_get;
+
+ // Check if there exists a method with the same name as the signal, which is also a static
+ // method in C++ land.
+ Shiboken::AutoDecRef homonymousMethod(getDescriptor(signal->homonymousMethod, 0, 0));
+ if (PyCFunction_Check(homonymousMethod)
+ && (PyCFunction_GET_FLAGS(homonymousMethod.object()) & METH_STATIC)) {
+#if PY_VERSION_HEX >= 0x03090000
+ return PyObject_Call(homonymousMethod, args, kw);
+#else
+ return PyCFunction_Call(homonymousMethod, args, kw);
+#endif
+ }
+
+ // Assumes homonymousMethod is not a static method.
+ ternaryfunc callFunc = Py_TYPE(signal->homonymousMethod)->tp_call;
+ return callFunc(homonymousMethod, args, kw);
+}
+
+static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw)
+{
+ auto PySideSignal = reinterpret_cast<PySideSignalInstance *>(self);
+ if (!PySideSignal->d->homonymousMethod) {
+ PyErr_SetString(PyExc_TypeError, "native Qt signal is not callable");
+ return 0;
+ }
+
+ descrgetfunc getDescriptor = Py_TYPE(PySideSignal->d->homonymousMethod)->tp_descr_get;
+ Shiboken::AutoDecRef homonymousMethod(getDescriptor(PySideSignal->d->homonymousMethod, PySideSignal->d->source, 0));
+#if PY_VERSION_HEX >= 0x03090000
+ return PyObject_Call(homonymousMethod, args, kw);
+#else
+ return PyCFunction_Call(homonymousMethod, args, kw);
+#endif
+}
+
+static PyObject *metaSignalCheck(PyObject * /* klass */, PyObject *arg)
+{
+ if (PyType_IsSubtype(Py_TYPE(arg), PySideSignalInstanceTypeF()))
+ Py_RETURN_TRUE;
+ else
+ Py_RETURN_FALSE;
+}
+
+} // extern "C"
+
+namespace PySide {
+namespace Signal {
+
+static const char *MetaSignal_SignatureStrings[] = {
+ "PySide6.QtCore.MetaSignal.__instancecheck__(object:object)->bool",
+ nullptr}; // Sentinel
+
+static const char *Signal_SignatureStrings[] = {
+ "PySide6.QtCore.Signal(*types:type,name:str=nullptr,arguments:str=nullptr)",
+ nullptr}; // Sentinel
+
+static const char *SignalInstance_SignatureStrings[] = {
+ "PySide6.QtCore.SignalInstance.connect(slot:object,type:type=nullptr)",
+ "PySide6.QtCore.SignalInstance.disconnect(slot:object=nullptr)",
+ "PySide6.QtCore.SignalInstance.emit(*args:typing.Any)",
+ nullptr}; // Sentinel
+
+void init(PyObject *module)
+{
+ if (InitSignatureStrings(PySideMetaSignalTypeF(), MetaSignal_SignatureStrings) < 0)
+ return;
+ Py_INCREF(PySideMetaSignalTypeF());
+ PyModule_AddObject(module, "MetaSignal", reinterpret_cast<PyObject *>(PySideMetaSignalTypeF()));
+
+ if (InitSignatureStrings(PySideSignalTypeF(), Signal_SignatureStrings) < 0)
+ return;
+ Py_INCREF(PySideSignalTypeF());
+ PyModule_AddObject(module, "Signal", reinterpret_cast<PyObject *>(PySideSignalTypeF()));
+
+ if (InitSignatureStrings(PySideSignalInstanceTypeF(), SignalInstance_SignatureStrings) < 0)
+ return;
+ Py_INCREF(PySideSignalInstanceTypeF());
+ PyModule_AddObject(module, "SignalInstance", reinterpret_cast<PyObject *>(PySideSignalInstanceTypeF()));
+}
+
+bool checkType(PyObject *pyObj)
+{
+ if (pyObj)
+ return PyType_IsSubtype(Py_TYPE(pyObj), PySideSignalTypeF());
+ return false;
+}
+
+void updateSourceObject(PyObject *source)
+{
+ PyTypeObject *objType = reinterpret_cast<PyTypeObject *>(PyObject_Type(source));
+
+ Py_ssize_t pos = 0;
+ PyObject *value;
+ PyObject *key;
+
+ while (PyDict_Next(objType->tp_dict, &pos, &key, &value)) {
+ if (PyObject_TypeCheck(value, PySideSignalTypeF())) {
+ Shiboken::AutoDecRef signalInstance(reinterpret_cast<PyObject *>(PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF())));
+ instanceInitialize(signalInstance.cast<PySideSignalInstance *>(), key, reinterpret_cast<PySideSignal *>(value), source, 0);
+ PyObject_SetAttr(source, key, signalInstance);
+ }
+ }
+
+ Py_XDECREF(objType);
+}
+
+QByteArray getTypeName(PyObject *type)
+{
+ if (PyType_Check(type)) {
+ if (PyType_IsSubtype(reinterpret_cast<PyTypeObject *>(type),
+ reinterpret_cast<PyTypeObject *>(SbkObject_TypeF()))) {
+ auto objType = reinterpret_cast<SbkObjectType *>(type);
+ return Shiboken::ObjectType::getOriginalName(objType);
+ }
+ // Translate python types to Qt names
+ auto objType = reinterpret_cast<PyTypeObject *>(type);
+ if (Shiboken::String::checkType(objType))
+ return QByteArrayLiteral("QString");
+ if (objType == &PyInt_Type)
+ return QByteArrayLiteral("int");
+ if (objType == &PyLong_Type)
+ return QByteArrayLiteral("long");
+ if (objType == &PyFloat_Type)
+ return QByteArrayLiteral("double");
+ if (objType == &PyBool_Type)
+ return QByteArrayLiteral("bool");
+ if (objType == &PyList_Type)
+ return QByteArrayLiteral("QVariantList");
+ if (Py_TYPE(objType) == SbkEnumType_TypeF())
+ return Shiboken::Enum::getCppName(objType);
+ return QByteArrayLiteral("PyObject");
+ }
+ if (type == Py_None) // Must be checked before as Shiboken::String::check accepts Py_None
+ return voidType();
+ if (Shiboken::String::check(type)) {
+ QByteArray result = Shiboken::String::toCString(type);
+ if (result == "qreal")
+ result = sizeof(qreal) == sizeof(double) ? "double" : "float";
+ return result;
+ }
+ return QByteArray();
+}
+
+static QByteArray buildSignature(const QByteArray &name, const QByteArray &signature)
+{
+ return QMetaObject::normalizedSignature(name + '(' + signature + ')');
+}
+
+static QByteArray parseSignature(PyObject *args)
+{
+ if (args && (Shiboken::String::check(args) || !PySequence_Check(args)))
+ return getTypeName(args);
+
+ QByteArray signature;
+ for (Py_ssize_t i = 0, i_max = PySequence_Size(args); i < i_max; i++) {
+ Shiboken::AutoDecRef arg(PySequence_GetItem(args, i));
+ const auto typeName = getTypeName(arg);
+ if (!typeName.isEmpty()) {
+ if (!signature.isEmpty())
+ signature += ',';
+ signature += typeName;
+ }
+ }
+ return signature;
+}
+
+static void appendSignature(PySideSignal *self, const SignalSignature &signature)
+{
+ self->data->signatures.append({signature.m_parameterTypes, signature.m_attributes});
+}
+
+static void instanceInitialize(PySideSignalInstance *self, PyObject *name, PySideSignal *data, PyObject *source, int index)
+{
+ self->d = new PySideSignalInstancePrivate;
+ PySideSignalInstancePrivate *selfPvt = self->d;
+ selfPvt->next = nullptr;
+ if (data->data->signalName.isEmpty())
+ data->data->signalName = Shiboken::String::toCString(name);
+ selfPvt->signalName = data->data->signalName;
+
+ selfPvt->source = source;
+ const auto &signature = data->data->signatures.at(index);
+ selfPvt->signature = buildSignature(self->d->signalName, signature.signature);
+ selfPvt->attributes = signature.attributes;
+ selfPvt->homonymousMethod = 0;
+ if (data->homonymousMethod) {
+ selfPvt->homonymousMethod = data->homonymousMethod;
+ Py_INCREF(selfPvt->homonymousMethod);
+ }
+ index++;
+
+ if (index < data->data->signatures.size()) {
+ selfPvt->next = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF());
+ instanceInitialize(selfPvt->next, name, data, source, index);
+ }
+}
+
+PySideSignalInstance *initialize(PySideSignal *self, PyObject *name, PyObject *object)
+{
+ PySideSignalInstance *instance = PyObject_New(PySideSignalInstance,
+ PySideSignalInstanceTypeF());
+ instanceInitialize(instance, name, self, object, 0);
+ auto sbkObj = reinterpret_cast<SbkObject *>(object);
+ if (!Shiboken::Object::wasCreatedByPython(sbkObj))
+ Py_INCREF(object); // PYSIDE-79: this flag was crucial for a wrapper call.
+ return instance;
+}
+
+bool connect(PyObject *source, const char *signal, PyObject *callback)
+{
+ Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source,
+ PySide::PyName::qtConnect()));
+ if (pyMethod.isNull())
+ return false;
+
+ Shiboken::AutoDecRef pySignature(Shiboken::String::fromCString(signal));
+ Shiboken::AutoDecRef pyArgs(PyTuple_Pack(3, source, pySignature.object(), callback));
+ PyObject *result = PyObject_CallObject(pyMethod, pyArgs);
+ if (result == Py_False) {
+ PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s, to python callable object.", signal);
+ Py_DECREF(result);
+ result = 0;
+ }
+ return result;
+}
+
+PySideSignalInstance *newObjectFromMethod(PyObject *source, const QList<QMetaMethod>& methodList)
+{
+ PySideSignalInstance *root = nullptr;
+ PySideSignalInstance *previous = nullptr;
+ for (const QMetaMethod &m : methodList) {
+ PySideSignalInstance *item = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF());
+ if (!root)
+ root = item;
+
+ if (previous)
+ previous->d->next = item;
+
+ item->d = new PySideSignalInstancePrivate;
+ PySideSignalInstancePrivate *selfPvt = item->d;
+ selfPvt->source = source;
+ Py_INCREF(selfPvt->source); // PYSIDE-79: an INCREF is missing.
+ QByteArray cppName(m.methodSignature());
+ cppName.truncate(cppName.indexOf('('));
+ // separe SignalName
+ selfPvt->signalName = cppName;
+ selfPvt->signature = m.methodSignature();
+ selfPvt->attributes = m.attributes();
+ selfPvt->homonymousMethod = 0;
+ selfPvt->next = 0;
+ }
+ return root;
+}
+
+template<typename T>
+static typename T::value_type join(T t, const char *sep)
+{
+ typename T::value_type res;
+ if (t.isEmpty())
+ return res;
+
+ typename T::const_iterator it = t.begin();
+ typename T::const_iterator end = t.end();
+ res += *it;
+ ++it;
+
+ while (it != end) {
+ res += sep;
+ res += *it;
+ ++it;
+ }
+ return res;
+}
+
+static void _addSignalToWrapper(SbkObjectType *wrapperType, const char *signalName, PySideSignal *signal)
+{
+ auto typeDict = reinterpret_cast<PyTypeObject *>(wrapperType)->tp_dict;
+ PyObject *homonymousMethod;
+ if ((homonymousMethod = PyDict_GetItemString(typeDict, signalName))) {
+ Py_INCREF(homonymousMethod);
+ signal->homonymousMethod = homonymousMethod;
+ }
+ PyDict_SetItemString(typeDict, signalName, reinterpret_cast<PyObject *>(signal));
+}
+
+// This function is used by qStableSort to promote empty signatures
+static bool compareSignals(const SignalSignature &sig1, const SignalSignature &)
+{
+ return sig1.m_parameterTypes.isEmpty();
+}
+
+static PyObject *buildQtCompatible(const QByteArray &signature)
+{
+ const auto ba = QT_SIGNAL_SENTINEL + signature;
+ return Shiboken::String::fromStringAndSize(ba, ba.size());
+}
+
+void registerSignals(SbkObjectType *pyObj, const QMetaObject *metaObject)
+{
+ typedef QHash<QByteArray, QList<SignalSignature> > SignalSigMap;
+ SignalSigMap signalsFound;
+ for (int i = metaObject->methodOffset(), max = metaObject->methodCount(); i < max; ++i) {
+ QMetaMethod method = metaObject->method(i);
+
+ if (method.methodType() == QMetaMethod::Signal) {
+ QByteArray methodName(method.methodSignature());
+ methodName.chop(methodName.size() - methodName.indexOf('('));
+ SignalSignature signature;
+ signature.m_parameterTypes = join(method.parameterTypes(), ",");
+ if (method.attributes() & QMetaMethod::Cloned)
+ signature.m_attributes = QMetaMethod::Cloned;
+ signalsFound[methodName] << signature;
+ }
+ }
+
+ SignalSigMap::Iterator it = signalsFound.begin();
+ SignalSigMap::Iterator end = signalsFound.end();
+ for (; it != end; ++it) {
+ PySideSignal *self = PyObject_New(PySideSignal, PySideSignalTypeF());
+ self->data = new PySideSignalData;
+ self->data->signalName = it.key();
+ self->homonymousMethod = 0;
+
+ // Empty signatures comes first! So they will be the default signal signature
+ std::stable_sort(it.value().begin(), it.value().end(), &compareSignals);
+ SignalSigMap::mapped_type::const_iterator j = it.value().begin();
+ SignalSigMap::mapped_type::const_iterator endJ = it.value().end();
+ for (; j != endJ; ++j) {
+ const SignalSignature &sig = *j;
+ appendSignature(self, sig);
+ }
+
+ _addSignalToWrapper(pyObj, it.key(), self);
+ Py_DECREF(reinterpret_cast<PyObject *>(self));
+ }
+}
+
+PyObject *getObject(PySideSignalInstance *signal)
+{
+ return signal->d->source;
+}
+
+const char *getSignature(PySideSignalInstance *signal)
+{
+ return signal->d->signature;
+}
+
+QStringList getArgsFromSignature(const char *signature, bool *isShortCircuit)
+{
+ QString qsignature = QString::fromLatin1(signature).trimmed();
+ QStringList result;
+
+ if (isShortCircuit)
+ *isShortCircuit = !qsignature.contains(QLatin1Char('('));
+ if (qsignature.contains(QLatin1String("()")) || qsignature.contains(QLatin1String("(void)")))
+ return result;
+ if (qsignature.endsWith(QLatin1Char(')'))) {
+ const int paren = qsignature.indexOf(QLatin1Char('('));
+ if (paren >= 0) {
+ qsignature.chop(1);
+ qsignature.remove(0, paren + 1);
+ result = qsignature.split(QLatin1Char(','));
+ for (QString &type : result)
+ type = type.trimmed();
+ }
+ }
+ return result;
+}
+
+QString getCallbackSignature(const char *signal, QObject *receiver, PyObject *callback, bool encodeName)
+{
+ QByteArray functionName;
+ int numArgs = -1;
+ bool useSelf = false;
+ bool isMethod = PyMethod_Check(callback);
+ bool isFunction = PyFunction_Check(callback);
+
+ if (isMethod || isFunction) {
+ PyObject *function = isMethod ? PyMethod_GET_FUNCTION(callback) : callback;
+ auto objCode = reinterpret_cast<PepCodeObject *>(PyFunction_GET_CODE(function));
+ functionName = Shiboken::String::toCString(PepFunction_GetName(function));
+ useSelf = isMethod;
+ numArgs = PepCode_GET_FLAGS(objCode) & CO_VARARGS ? -1 : PepCode_GET_ARGCOUNT(objCode);
+ } else if (PyCFunction_Check(callback)) {
+ const PyCFunctionObject *funcObj = reinterpret_cast<const PyCFunctionObject *>(callback);
+ functionName = PepCFunction_GET_NAMESTR(funcObj);
+ useSelf = PyCFunction_GET_SELF(funcObj);
+ const int flags = PyCFunction_GET_FLAGS(funcObj);
+
+ if (receiver) {
+ //Search for signature on metaobject
+ const QMetaObject *mo = receiver->metaObject();
+ QByteArray prefix(functionName);
+ prefix += '(';
+ for (int i = 0; i < mo->methodCount(); i++) {
+ QMetaMethod me = mo->method(i);
+ if ((strncmp(me.methodSignature(), prefix, prefix.size()) == 0) &&
+ QMetaObject::checkConnectArgs(signal, me.methodSignature())) {
+ numArgs = me.parameterTypes().size() + useSelf;
+ break;
+ }
+ }
+ }
+
+ if (numArgs == -1) {
+ if (flags & METH_VARARGS)
+ numArgs = -1;
+ else if (flags & METH_NOARGS)
+ numArgs = 0;
+ }
+ } else if (PyCallable_Check(callback)) {
+ functionName = "__callback" + QByteArray::number((qlonglong)callback);
+ }
+
+ Q_ASSERT(!functionName.isEmpty());
+
+ bool isShortCircuit = false;
+
+ const QString functionNameS = QLatin1String(functionName);
+ QString signature = encodeName ? codeCallbackName(callback, functionNameS) : functionNameS;
+ QStringList args = getArgsFromSignature(signal, &isShortCircuit);
+
+ if (!isShortCircuit) {
+ signature.append(QLatin1Char('('));
+ if (numArgs == -1)
+ numArgs = std::numeric_limits<int>::max();
+ while (args.count() && (args.count() > (numArgs - useSelf))) {
+ args.removeLast();
+ }
+ signature.append(args.join(QLatin1Char(',')));
+ signature.append(QLatin1Char(')'));
+ }
+ return signature;
+}
+
+bool isQtSignal(const char *signal)
+{
+ return (signal && signal[0] == QT_SIGNAL_SENTINEL);
+}
+
+bool checkQtSignal(const char *signal)
+{
+ if (!isQtSignal(signal)) {
+ PyErr_SetString(PyExc_TypeError, "Use the function PySide6.QtCore.SIGNAL on signals");
+ return false;
+ }
+ return true;
+}
+
+QString codeCallbackName(PyObject *callback, const QString &funcName)
+{
+ if (PyMethod_Check(callback)) {
+ PyObject *self = PyMethod_GET_SELF(callback);
+ PyObject *func = PyMethod_GET_FUNCTION(callback);
+ return funcName + QString::number(quint64(self), 16) + QString::number(quint64(func), 16);
+ }
+ return funcName + QString::number(quint64(callback), 16);
+}
+
+QByteArray voidType()
+{
+ return QByteArrayLiteral("void");
+}
+
+} //namespace Signal
+} //namespace PySide
+
diff --git a/sources/pyside2/libpyside/pysidesignal.h b/sources/pyside6/libpyside/pysidesignal.h
index 973644b0a..973644b0a 100644
--- a/sources/pyside2/libpyside/pysidesignal.h
+++ b/sources/pyside6/libpyside/pysidesignal.h
diff --git a/sources/pyside2/libpyside/pysidesignal_p.h b/sources/pyside6/libpyside/pysidesignal_p.h
index 337feaa8a..337feaa8a 100644
--- a/sources/pyside2/libpyside/pysidesignal_p.h
+++ b/sources/pyside6/libpyside/pysidesignal_p.h
diff --git a/sources/pyside6/libpyside/pysideslot.cpp b/sources/pyside6/libpyside/pysideslot.cpp
new file mode 100644
index 000000000..99c3cdf55
--- /dev/null
+++ b/sources/pyside6/libpyside/pysideslot.cpp
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "dynamicqmetaobject_p.h"
+#include "pysidesignal_p.h"
+#include "pysideslot_p.h"
+
+#include <shiboken.h>
+
+#include <QtCore/QMetaObject>
+#include <QtCore/QString>
+#include <signature.h>
+
+using namespace Shiboken;
+
+struct SlotData
+{
+ QByteArray name;
+ QByteArray args;
+ QByteArray resultType;
+};
+
+typedef struct
+{
+ PyObject_HEAD
+ SlotData *slotData;
+} PySideSlot;
+
+extern "C"
+{
+
+static int slotTpInit(PyObject *, PyObject *, PyObject *);
+static PyObject *slotCall(PyObject *, PyObject *, PyObject *);
+
+// Class Definition -----------------------------------------------
+static PyType_Slot PySideSlotType_slots[] = {
+ {Py_tp_call, (void *)slotCall},
+ {Py_tp_init, (void *)slotTpInit},
+ {Py_tp_new, (void *)PyType_GenericNew},
+ {Py_tp_dealloc, (void *)Sbk_object_dealloc},
+ {0, 0}
+};
+static PyType_Spec PySideSlotType_spec = {
+ "2:PySide6.QtCore.Slot",
+ sizeof(PySideSlot),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ PySideSlotType_slots,
+};
+
+
+static PyTypeObject *PySideSlotTypeF(void)
+{
+ static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
+ SbkType_FromSpec(&PySideSlotType_spec));
+ return type;
+}
+
+int slotTpInit(PyObject *self, PyObject *args, PyObject *kw)
+{
+ static PyObject *emptyTuple = nullptr;
+ static const char *kwlist[] = {"name", "result", nullptr};
+ char *argName = nullptr;
+ PyObject *argResult = nullptr;
+
+ if (emptyTuple == 0)
+ emptyTuple = PyTuple_New(0);
+
+ if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot",
+ const_cast<char **>(kwlist), &argName, &argResult)) {
+ return -1;
+ }
+
+ PySideSlot *data = reinterpret_cast<PySideSlot *>(self);
+ if (!data->slotData)
+ data->slotData = new SlotData;
+ for(Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
+ PyObject *argType = PyTuple_GET_ITEM(args, i);
+ const auto typeName = PySide::Signal::getTypeName(argType);
+ if (typeName.isEmpty()) {
+ PyErr_Format(PyExc_TypeError, "Unknown signal argument type: %s", Py_TYPE(argType)->tp_name);
+ return -1;
+ }
+ if (!data->slotData->args.isEmpty())
+ data->slotData->args += ',';
+ data->slotData->args += typeName;
+ }
+
+ if (argName)
+ data->slotData->name = argName;
+
+ data->slotData->resultType = argResult
+ ? PySide::Signal::getTypeName(argResult) : PySide::Signal::voidType();
+
+ return 0;
+}
+
+PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */)
+{
+ static PyObject *pySlotName = nullptr;
+ PyObject *callback;
+ callback = PyTuple_GetItem(args, 0);
+ Py_INCREF(callback);
+
+ if (Py_TYPE(callback)->tp_call != nullptr) {
+ PySideSlot *data = reinterpret_cast<PySideSlot *>(self);
+
+ if (!data->slotData)
+ data->slotData = new SlotData;
+
+ if (data->slotData->name.isEmpty()) {
+ // PYSIDE-198: Use PyObject_GetAttr instead of PepFunction_GetName to support Nuitka.
+ AutoDecRef funcName(PyObject_GetAttr(callback, PyMagicName::name()));
+ data->slotData->name = String::toCString(funcName);
+ }
+ const QByteArray returnType = QMetaObject::normalizedType(data->slotData->resultType);
+ const QByteArray signature =
+ returnType + ' ' + data->slotData->name + '(' + data->slotData->args + ')';
+
+ if (!pySlotName)
+ pySlotName = String::fromCString(PYSIDE_SLOT_LIST_ATTR);
+
+ PyObject *pySignature = String::fromCString(signature);
+ PyObject *signatureList = 0;
+ if (PyObject_HasAttr(callback, pySlotName)) {
+ signatureList = PyObject_GetAttr(callback, pySlotName);
+ } else {
+ signatureList = PyList_New(0);
+ PyObject_SetAttr(callback, pySlotName, signatureList);
+ Py_DECREF(signatureList);
+ }
+
+ PyList_Append(signatureList, pySignature);
+ Py_DECREF(pySignature);
+
+ //clear data
+ delete data->slotData;
+ data->slotData = nullptr;
+ return callback;
+ }
+ return callback;
+}
+
+} // extern "C"
+
+namespace PySide {
+namespace Slot {
+
+static const char *Slot_SignatureStrings[] = {
+ "PySide6.QtCore.Slot(*types:type,name:str=nullptr,result:str=nullptr)->typing.Callable[...,typing.Optional[str]]",
+ nullptr}; // Sentinel
+
+void init(PyObject *module)
+{
+ if (InitSignatureStrings(PySideSlotTypeF(), Slot_SignatureStrings) < 0)
+ return;
+
+ Py_INCREF(PySideSlotTypeF());
+ PyModule_AddObject(module, "Slot", reinterpret_cast<PyObject *>(PySideSlotTypeF()));
+}
+
+} // namespace Slot
+} // namespace PySide
diff --git a/sources/pyside2/libpyside/pysideslot_p.h b/sources/pyside6/libpyside/pysideslot_p.h
index 3d98e15c4..3d98e15c4 100644
--- a/sources/pyside2/libpyside/pysideslot_p.h
+++ b/sources/pyside6/libpyside/pysideslot_p.h
diff --git a/sources/pyside2/libpyside/pysidestaticstrings.cpp b/sources/pyside6/libpyside/pysidestaticstrings.cpp
index 760d77632..760d77632 100644
--- a/sources/pyside2/libpyside/pysidestaticstrings.cpp
+++ b/sources/pyside6/libpyside/pysidestaticstrings.cpp
diff --git a/sources/pyside2/libpyside/pysidestaticstrings.h b/sources/pyside6/libpyside/pysidestaticstrings.h
index 1222d8f47..1222d8f47 100644
--- a/sources/pyside2/libpyside/pysidestaticstrings.h
+++ b/sources/pyside6/libpyside/pysidestaticstrings.h
diff --git a/sources/pyside2/libpyside/pysideweakref.cpp b/sources/pyside6/libpyside/pysideweakref.cpp
index cd90634bd..cd90634bd 100644
--- a/sources/pyside2/libpyside/pysideweakref.cpp
+++ b/sources/pyside6/libpyside/pysideweakref.cpp
diff --git a/sources/pyside2/libpyside/pysideweakref.h b/sources/pyside6/libpyside/pysideweakref.h
index 628c1eda4..628c1eda4 100644
--- a/sources/pyside2/libpyside/pysideweakref.h
+++ b/sources/pyside6/libpyside/pysideweakref.h
diff --git a/sources/pyside2/libpyside/signalmanager.cpp b/sources/pyside6/libpyside/signalmanager.cpp
index 0992cfcfd..0992cfcfd 100644
--- a/sources/pyside2/libpyside/signalmanager.cpp
+++ b/sources/pyside6/libpyside/signalmanager.cpp
diff --git a/sources/pyside2/libpyside/signalmanager.h b/sources/pyside6/libpyside/signalmanager.h
index fe077bd1a..fe077bd1a 100644
--- a/sources/pyside2/libpyside/signalmanager.h
+++ b/sources/pyside6/libpyside/signalmanager.h
diff --git a/sources/pyside6/plugins/CMakeLists.txt b/sources/pyside6/plugins/CMakeLists.txt
new file mode 100644
index 000000000..c3cd416a5
--- /dev/null
+++ b/sources/pyside6/plugins/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(plugins)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS UiPlugin)
+
+set(ui_plugin_src
+ customwidgets.cpp
+ customwidget.cpp
+)
+
+qt_wrap_cpp(MOC_FILES ${ui_plugin_moc})
+
+add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
+if(CMAKE_HOST_UNIX AND NOT CYGWIN)
+ add_definitions(-fPIC)
+endif()
+add_definitions(-DQT_STATICPLUGIN)
+
+if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
+ set_property(TARGET pyside6 PROPERTY CXX_STANDARD 17)
+else()
+ set_property(TARGET pyside6 PROPERTY CXX_STANDARD 11)
+endif()
+
+target_link_libraries(uiplugin
+ Qt::Core
+ Qt::Gui
+ Qt::UiPlugin
+ Qt::Widgets
+ Shiboken6::libshiboken)
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
+else()
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
+endif()
diff --git a/sources/pyside2/plugins/customwidget.cpp b/sources/pyside6/plugins/customwidget.cpp
index 3c54b02e4..3c54b02e4 100644
--- a/sources/pyside2/plugins/customwidget.cpp
+++ b/sources/pyside6/plugins/customwidget.cpp
diff --git a/sources/pyside2/plugins/customwidget.h b/sources/pyside6/plugins/customwidget.h
index b84a967bf..b84a967bf 100644
--- a/sources/pyside2/plugins/customwidget.h
+++ b/sources/pyside6/plugins/customwidget.h
diff --git a/sources/pyside2/plugins/customwidgets.cpp b/sources/pyside6/plugins/customwidgets.cpp
index 28a2a6cf6..28a2a6cf6 100644
--- a/sources/pyside2/plugins/customwidgets.cpp
+++ b/sources/pyside6/plugins/customwidgets.cpp
diff --git a/sources/pyside2/plugins/customwidgets.h b/sources/pyside6/plugins/customwidgets.h
index aec817cdf..aec817cdf 100644
--- a/sources/pyside2/plugins/customwidgets.h
+++ b/sources/pyside6/plugins/customwidgets.h
diff --git a/sources/pyside2/pyside_version.py b/sources/pyside6/pyside_version.py
index 88b65353f..88b65353f 100644
--- a/sources/pyside2/pyside_version.py
+++ b/sources/pyside6/pyside_version.py
diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside6/tests/CMakeLists.txt
index 86150ac1f..86150ac1f 100644
--- a/sources/pyside2/tests/CMakeLists.txt
+++ b/sources/pyside6/tests/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DAnimation/CMakeLists.txt b/sources/pyside6/tests/Qt3DAnimation/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DAnimation/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DAnimation/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DCore/CMakeLists.txt b/sources/pyside6/tests/Qt3DCore/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DCore/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DCore/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DExtras/CMakeLists.txt b/sources/pyside6/tests/Qt3DExtras/CMakeLists.txt
index 5f8d2e77b..5f8d2e77b 100644
--- a/sources/pyside2/tests/Qt3DExtras/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DExtras/CMakeLists.txt
diff --git a/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py b/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py
new file mode 100644
index 000000000..54b7e6e84
--- /dev/null
+++ b/sources/pyside6/tests/Qt3DExtras/qt3dextras_test.py
@@ -0,0 +1,161 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for Q3DExtras'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqguiapplication import UsesQGuiApplication
+
+from PySide6.QtCore import(Property, QObject, QPropertyAnimation, QTimer, Signal, Slot)
+from PySide6.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D, QWindow)
+from PySide6.Qt3DCore import (Qt3DCore)
+from PySide6.Qt3DRender import (Qt3DRender)
+from PySide6.Qt3DExtras import (Qt3DExtras)
+
+class OrbitTransformController(QObject):
+ def __init__(self, parent):
+ super(OrbitTransformController, self).__init__(parent)
+ self._target = None
+ self._matrix = QMatrix4x4()
+ self._radius = 1
+ self._angle = 0
+
+ def setTarget(self, t):
+ self._target = t
+
+ def getTarget(self):
+ return self._target
+
+ def setRadius(self, radius):
+ if self._radius != radius:
+ self._radius = radius
+ self.updateMatrix()
+ self.radiusChanged.emit()
+
+ def getRadius(self):
+ return self._radius
+
+ def setAngle(self, angle):
+ if self._angle != angle:
+ self._angle = angle
+ self.updateMatrix()
+ self.angleChanged.emit()
+
+ def getAngle(self):
+ return self._angle
+
+ def updateMatrix(self):
+ self._matrix.setToIdentity();
+ self._matrix.rotate(self._angle, QVector3D(0, 1, 0))
+ self._matrix.translate(self._radius, 0, 0)
+ if self._target is not None:
+ self._target.setMatrix(self._matrix)
+
+ angleChanged = Signal()
+ radiusChanged = Signal()
+ angle = Property(float, getAngle, setAngle, notify=angleChanged)
+ radius = Property(float, getRadius, setRadius, notify=radiusChanged)
+
+class Window(Qt3DExtras.Qt3DWindow):
+ def __init__(self):
+ super(Window, self).__init__()
+
+ # Camera
+ self.camera().lens().setPerspectiveProjection(45, 16 / 9, 0.1, 1000)
+ self.camera().setPosition(QVector3D(0, 0, 40))
+ self.camera().setViewCenter(QVector3D(0, 0, 0))
+
+ # For camera controls
+ self.createScene()
+ self.camController = Qt3DExtras.QOrbitCameraController(self.rootEntity)
+ self.camController.setLinearSpeed(50)
+ self.camController.setLookSpeed(180)
+ self.camController.setCamera(self.camera())
+
+ self.setRootEntity(self.rootEntity)
+
+ def createScene(self):
+ # Root entity
+ self.rootEntity = Qt3DCore.QEntity()
+
+ # Material
+ self.material = Qt3DExtras.QPhongMaterial(self.rootEntity)
+
+ # Torus
+ self.torusEntity = Qt3DCore.QEntity(self.rootEntity)
+ self.torusMesh = Qt3DExtras.QTorusMesh()
+ self.torusMesh.setRadius(5)
+ self.torusMesh.setMinorRadius(1)
+ self.torusMesh.setRings(100)
+ self.torusMesh.setSlices(20)
+
+ self.torusTransform = Qt3DCore.QTransform()
+ self.torusTransform.setScale3D(QVector3D(1.5, 1, 0.5))
+ self.torusTransform.setRotation(QQuaternion.fromAxisAndAngle(QVector3D(1, 0, 0), 45))
+
+ self.torusEntity.addComponent(self.torusMesh)
+ self.torusEntity.addComponent(self.torusTransform)
+ self.torusEntity.addComponent(self.material)
+
+ # Sphere
+ self.sphereEntity = Qt3DCore.QEntity(self.rootEntity)
+ self.sphereMesh = Qt3DExtras.QSphereMesh()
+ self.sphereMesh.setRadius(3)
+
+ self.sphereTransform = Qt3DCore.QTransform()
+ self.controller = OrbitTransformController(self.sphereTransform)
+ self.controller.setTarget(self.sphereTransform)
+ self.controller.setRadius(20)
+
+ self.sphereEntity.addComponent(self.sphereMesh)
+ self.sphereEntity.addComponent(self.sphereTransform)
+ self.sphereEntity.addComponent(self.material)
+
+class Qt3DExtrasTestCase(UsesQGuiApplication):
+ '''Tests related to Q3DExtras'''
+
+ def test3DExtras(self):
+
+ window = Window()
+ window.show()
+ while not window.isExposed():
+ self.app.processEvents()
+ QTimer.singleShot(2000, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/Qt3DInput/CMakeLists.txt b/sources/pyside6/tests/Qt3DInput/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DInput/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DInput/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DLogic/CMakeLists.txt b/sources/pyside6/tests/Qt3DLogic/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DLogic/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DLogic/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DQuick/CMakeLists.txt b/sources/pyside6/tests/Qt3DQuick/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DQuick/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DQuick/CMakeLists.txt
diff --git a/sources/pyside2/tests/Qt3DRender/CMakeLists.txt b/sources/pyside6/tests/Qt3DRender/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/Qt3DRender/CMakeLists.txt
+++ b/sources/pyside6/tests/Qt3DRender/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtAxContainer/CMakeLists.txt b/sources/pyside6/tests/QtAxContainer/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtAxContainer/CMakeLists.txt
+++ b/sources/pyside6/tests/QtAxContainer/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtCharts/CMakeLists.txt b/sources/pyside6/tests/QtCharts/CMakeLists.txt
index 16e8b4bc9..16e8b4bc9 100644
--- a/sources/pyside2/tests/QtCharts/CMakeLists.txt
+++ b/sources/pyside6/tests/QtCharts/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtCharts/qcharts_test.py b/sources/pyside6/tests/QtCharts/qcharts_test.py
new file mode 100644
index 000000000..a8660d8a3
--- /dev/null
+++ b/sources/pyside6/tests/QtCharts/qcharts_test.py
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QCharts'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QRect, QSize, QTimer
+from PySide6.QtGui import QGuiApplication, QScreen
+from PySide6.QtCharts import QtCharts
+
+class QChartsTestCase(UsesQApplication):
+ '''Tests related to QCharts'''
+
+ def testCharts(self):
+ self.series = QtCharts.QPieSeries()
+ self.series.append("Jane", 1);
+ self.series.append("Joe", 2);
+ self.series.append("Andy", 3);
+ self.series.append("Barbara", 4);
+ self.series.append("Axel", 5);
+ slice = self.series.slices()[1]
+ slice.setExploded();
+ slice.setLabelVisible();
+ self.chart = QtCharts.QChart()
+ self.chart.addSeries(self.series);
+ chartView = QtCharts.QChartView(self.chart)
+ screenSize = QGuiApplication.primaryScreen().geometry().size()
+ chartView.resize(screenSize / 2)
+ chartView.show()
+ QTimer.singleShot(500, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtConcurrent/CMakeLists.txt b/sources/pyside6/tests/QtConcurrent/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtConcurrent/CMakeLists.txt
+++ b/sources/pyside6/tests/QtConcurrent/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtCore/CMakeLists.txt b/sources/pyside6/tests/QtCore/CMakeLists.txt
index ee87345db..ee87345db 100644
--- a/sources/pyside2/tests/QtCore/CMakeLists.txt
+++ b/sources/pyside6/tests/QtCore/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtCore/attr_cache_py3k.py b/sources/pyside6/tests/QtCore/attr_cache_py3k.py
new file mode 100644
index 000000000..e2046ee3d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/attr_cache_py3k.py
@@ -0,0 +1,73 @@
+# This Python file uses the following encoding: utf-8
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''
+Unit tests for attribute cache in Python 3
+
+This is the original code from the bug report
+https://bugreports.qt.io/browse/PYSIDE-60
+'''
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import QObject
+
+
+class A(QObject):
+ instance = 1
+
+ @classmethod
+ def test(cls):
+ cls.instance
+ cls.instance = cls()
+ assert "<__main__.A(0x" in repr(cls.__dict__['instance'])
+ assert "<__main__.A(0x" in repr(cls.instance)
+ assert "<__main__.A(0x" in repr(type.__getattribute__(cls, 'instance'))
+
+
+if __name__ == "__main__":
+ A.test()
diff --git a/sources/pyside6/tests/QtCore/blocking_signals_test.py b/sources/pyside6/tests/QtCore/blocking_signals_test.py
new file mode 100644
index 000000000..6ab5ba0cc
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/blocking_signals_test.py
@@ -0,0 +1,148 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for QObject.signalsBlocked() and blockSignal()'''
+
+import os
+import sys
+from tempfile import mkstemp
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, QFile, QSignalBlocker
+
+class TestSignalsBlockedBasic(unittest.TestCase):
+ '''Basic test case for signalsBlocked'''
+
+ def testBasic(self):
+ '''QObject.signalsBlocked() and blockSignals()
+ The signals aren't blocked by default.
+ blockSignals returns the previous value'''
+ obj = QObject()
+ self.assertTrue(not obj.signalsBlocked())
+ self.assertTrue(not obj.blockSignals(True))
+ self.assertTrue(obj.signalsBlocked())
+ self.assertTrue(obj.blockSignals(False))
+ blocker = QSignalBlocker(obj)
+ self.assertTrue(obj.signalsBlocked())
+ blocker.unblock()
+ self.assertTrue(not obj.signalsBlocked())
+ blocker.reblock()
+ self.assertTrue(obj.signalsBlocked())
+ del blocker
+ self.assertTrue(not obj.signalsBlocked())
+
+
+class TestSignalsBlocked(unittest.TestCase):
+ '''Test case to check if the signals are really blocked'''
+
+ def setUp(self):
+ #Set up the basic resources needed
+ self.obj = QObject()
+ self.args = tuple()
+ self.called = False
+
+ def tearDown(self):
+ #Delete used resources
+ del self.obj
+ del self.args
+
+ def callback(self, *args):
+ #Default callback
+ if args == self.args:
+ self.called = True
+ else:
+ raise TypeError("Invalid arguments")
+
+ def testShortCircuitSignals(self):
+ #Blocking of Python short-circuit signals
+ QObject.connect(self.obj, SIGNAL('mysignal()'), self.callback)
+
+ self.obj.emit(SIGNAL('mysignal()'))
+ self.assertTrue(self.called)
+
+ self.called = False
+ self.obj.blockSignals(True)
+ self.obj.emit(SIGNAL('mysignal()'))
+ self.assertTrue(not self.called)
+
+ def testPythonSignals(self):
+ #Blocking of Python typed signals
+ QObject.connect(self.obj, SIGNAL('mysignal(int,int)'), self.callback)
+ self.args = (1, 3)
+
+ self.obj.emit(SIGNAL('mysignal(int,int)'), *self.args)
+ self.assertTrue(self.called)
+
+ self.called = False
+ self.obj.blockSignals(True)
+ self.obj.emit(SIGNAL('mysignal(int,int)'), *self.args)
+ self.assertTrue(not self.called)
+
+class TestQFileSignalBlocking(unittest.TestCase):
+ '''Test case for blocking the signal QIODevice.aboutToClose()'''
+
+ def setUp(self):
+ #Set up the needed resources - A temp file and a QFile
+ self.called = False
+ handle, self.filename = mkstemp()
+ os.close(handle)
+
+ self.qfile = QFile(self.filename)
+
+ def tearDown(self):
+ #Release acquired resources
+ os.remove(self.filename)
+ del self.qfile
+
+ def callback(self):
+ #Default callback
+ self.called = True
+
+ def testAboutToCloseBlocking(self):
+ #QIODevice.aboutToClose() blocking
+
+ QObject.connect(self.qfile, SIGNAL('aboutToClose()'), self.callback)
+
+ self.assertTrue(self.qfile.open(QFile.ReadOnly))
+ self.qfile.close()
+ self.assertTrue(self.called)
+
+ self.called = False
+ self.qfile.blockSignals(True)
+
+ self.assertTrue(self.qfile.open(QFile.ReadOnly))
+ self.qfile.close()
+ self.assertTrue(not self.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_1019.py b/sources/pyside6/tests/QtCore/bug_1019.py
new file mode 100644
index 000000000..14eff4155
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_1019.py
@@ -0,0 +1,67 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyTimer (QTimer):
+ def __init__(self):
+ QTimer.__init__(self)
+ self.startCalled = False
+
+ @Slot()
+ def slotUsedToIncreaseMethodOffset(self):
+ pass
+
+class MyTimer2 (MyTimer):
+
+ @Slot()
+ def slotUsedToIncreaseMethodOffset2(self):
+ pass
+
+ def start(self):
+ self.startCalled = True
+ QCoreApplication.instance().quit()
+
+class TestBug1019 (unittest.TestCase):
+ def testIt(self):
+ app = QCoreApplication([])
+ t = MyTimer2()
+ QTimer.singleShot(0, t.start)
+ app.exec_()
+ self.assertTrue(t.startCalled)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_1063.py b/sources/pyside6/tests/QtCore/bug_1063.py
new file mode 100644
index 000000000..9151c962c
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_1063.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1063 '''
+
+import os
+import sys
+import tempfile
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+class QTextStreamTestCase(unittest.TestCase):
+ def setUp(self):
+ self.temp_file = tempfile.NamedTemporaryFile(delete=False)
+ self.temp_file.close()
+ self.f = QtCore.QFile(self.temp_file.name)
+ self.f.open(QtCore.QIODevice.WriteOnly)
+ self.strings = ('foo', 'bar')
+ self.stream = QtCore.QTextStream(self.f)
+
+ def testIt(self):
+ for s in self.strings:
+ self.stream << s
+
+ self.f.close()
+
+ # make sure we didn't get an empty file
+ self.assertNotEqual(QtCore.QFile(self.temp_file.name).size(), 0)
+
+ os.unlink(self.temp_file.name)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_1069.py b/sources/pyside6/tests/QtCore/bug_1069.py
new file mode 100644
index 000000000..dd1bf2078
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_1069.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1069 '''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+class QDataStreamOpOverloadTestCase(unittest.TestCase):
+ def setUp(self):
+ self.ba = QtCore.QByteArray()
+ self.stream = QtCore.QDataStream(self.ba, QtCore.QIODevice.WriteOnly)
+
+ def testIt(self):
+ self.stream << "hello"
+ ok = False
+ for c in self.ba:
+ if c != b'\x00':
+ ok = True
+ break
+
+ self.assertEqual(ok, True)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_1313.py b/sources/pyside6/tests/QtCore/bug_1313.py
new file mode 100644
index 000000000..fd33495b2
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_1313.py
@@ -0,0 +1,82 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1313 '''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+class MyQObject(QtCore.QObject):
+ sig = QtCore.Signal()
+
+
+demo_coroutine_definition_code = """
+async def demo_coroutine():
+ my_qobject = MyQObject()
+ my_qobject.sig.connect(lambda: None)
+"""
+
+
+exec(demo_coroutine_definition_code)
+
+
+class CoroutineRaisesStopIterationTestCase(unittest.TestCase):
+ def setUp(self):
+ self.coroutine = demo_coroutine()
+
+ def testCoroutine(self):
+ with self.assertRaises(StopIteration):
+ self.coroutine.send(None)
+
+
+def demo_generator():
+ my_qobject = MyQObject()
+ my_qobject.sig.connect(lambda: None)
+ return
+ yield # to make it a generator
+
+
+class GeneratorRaisesStopIterationTestCase(unittest.TestCase):
+ def setUp(self):
+ self.generator = demo_generator()
+
+ def testGenerator(self):
+ with self.assertRaises(StopIteration):
+ self.generator.send(None)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_278_test.py b/sources/pyside6/tests/QtCore/bug_278_test.py
new file mode 100644
index 000000000..50e0089fe
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_278_test.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+def setValue(o):
+ values = ['Name']
+ o.setProperty('test1', values)
+
+class QQtVersionTest(unittest.TestCase):
+ '''Tests for QVariant conversion of QStringList'''
+
+ def testGet(self):
+ o = QtCore.QObject()
+ setValue(o)
+ self.assertEqual(o.property('test1'), ['Name'])
+
+
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/QtCore/bug_332.py b/sources/pyside6/tests/QtCore/bug_332.py
new file mode 100644
index 000000000..11f8ad7b7
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_332.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+class Lock(QtCore.QMutex):
+ def tryLock(self,timeoutt=10):
+ return QtCore.QMutex.tryLock(self,timeoutt)
+
+class TestBug(unittest.TestCase):
+
+ def testCase(self):
+ l = Lock()
+ l.tryLock() # this cause a assertion
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_408.py b/sources/pyside6/tests/QtCore/bug_408.py
new file mode 100644
index 000000000..d9809d216
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_408.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyDevice(QIODevice):
+ def __init__(self, txt):
+ QIODevice.__init__(self)
+ self.txt = txt
+ self.ptr = 0
+
+ def readData(self, size):
+ size = min(len(self.txt) - self.ptr, size)
+ retval = self.txt[self.ptr:size]
+ self.ptr += size
+ return retval
+
+class QIODeviceTest(unittest.TestCase):
+
+ def testIt(self):
+ device = MyDevice("hello world\nhello again")
+ device.open(QIODevice.ReadOnly)
+
+ s = QTextStream(device)
+ self.assertEqual(s.readLine(), "hello world")
+ self.assertEqual(s.readLine(), "hello again")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_428.py b/sources/pyside6/tests/QtCore/bug_428.py
new file mode 100644
index 000000000..338e26d9b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_428.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class MyBaseObject(QObject):
+ def __init__(self, number):
+ self.myMember = 'myMember' + number
+ QObject.__init__(self)
+
+class QObjectConstructorTest(unittest.TestCase):
+ def testBug(self):
+ for i in range(10):
+ number = str(i)
+ obj = MyBaseObject(number)
+ self.assertEqual(obj.myMember, 'myMember' + number)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_462.py b/sources/pyside6/tests/QtCore/bug_462.py
new file mode 100644
index 000000000..a267b2b02
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_462.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication, QEvent, QThread
+
+class MyEvent(QEvent):
+ def __init__(self,i):
+ print("TYPE:", type(QEvent.User))
+ super(MyEvent,self).__init__(QEvent.Type(QEvent.User + 100 ))
+ self.i = i
+
+class MyThread (QThread):
+ def __init__(self,owner):
+ super(MyThread,self).__init__()
+ self.owner=owner;
+
+ def run(self):
+ for i in range(3):
+ e=MyEvent(i);
+ QCoreApplication.postEvent(self.owner,e)
+
+class MyBaseObject(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.events = []
+ self.t = MyThread(self)
+ self.t.start()
+
+ def customEvent(self, event):
+ self.events.append(event)
+ if len(self.events) == 3:
+ self.t.wait()
+ self.app.quit()
+
+
+class CheckForEventsTypes(unittest.TestCase):
+ def testTypes(self):
+ o = MyBaseObject()
+ o.app = QCoreApplication(sys.argv)
+ o.app.exec_()
+ for e in o.events:
+ self.assertTrue(isinstance(e, MyEvent))
+ o.app = None
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_505.py b/sources/pyside6/tests/QtCore/bug_505.py
new file mode 100644
index 000000000..b1e7a2101
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_505.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class MyBaseObject(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self.setObjectName("PySide")
+
+ def __del__(self):
+ if self.objectName() != "PySide":
+ raise NameError('Fail')
+
+class CheckForEventsTypes(unittest.TestCase):
+ def testDelObject(self):
+ p = MyBaseObject()
+ o = MyBaseObject(p)
+ del o
+ del p
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_515.py b/sources/pyside6/tests/QtCore/bug_515.py
new file mode 100644
index 000000000..8dd79c310
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_515.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+""" Unittest for bug #515 """
+""" http://bugs.openbossa.org/show_bug.cgi?id=515 """
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtCore
+
+callCleanup = False
+def _cleanup():
+ global callCleanup
+ callCleanup = True
+
+def _checkCleanup():
+ global callCleanup
+ assert(callCleanup)
+
+app = QtCore.QCoreApplication([])
+QtCore.qAddPostRoutine(_cleanup)
+QtCore.qAddPostRoutine(_checkCleanup)
+del app
diff --git a/sources/pyside6/tests/QtCore/bug_606.py b/sources/pyside6/tests/QtCore/bug_606.py
new file mode 100644
index 000000000..12ae76901
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_606.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6.QtCore import QPoint, QPointF
+from PySide6.QtCore import QLine, QLineF
+from PySide6.QtCore import QSize, QSizeF
+
+class testCases(unittest.TestCase):
+ def testQPointToTuple(self):
+ p = QPoint(1, 2)
+ self.assertEqual((1, 2), p.toTuple())
+
+ def testQPointFToTuple(self):
+ p = QPointF(1, 2)
+ self.assertEqual((1, 2), p.toTuple())
+
+ def testQLineToTuple(self):
+ l = QLine(1, 2, 3, 4)
+ self.assertEqual((1, 2, 3, 4), l.toTuple())
+
+ def testQLineFToTuple(self):
+ l = QLineF(1, 2, 3, 4)
+ self.assertEqual((1, 2, 3, 4), l.toTuple())
+
+ def testQSizeToTuple(self):
+ s = QSize(1, 2)
+ self.assertEqual((1, 2), s.toTuple())
+
+ def testQSizeFToTuple(self):
+ s = QSizeF(1, 2)
+ self.assertEqual((1, 2), s.toTuple())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_656.py b/sources/pyside6/tests/QtCore/bug_656.py
new file mode 100644
index 000000000..855c32291
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_656.py
@@ -0,0 +1,45 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+
+class CoreApp(QCoreApplication):
+ def __init__(self,*args):
+ super(CoreApp,self).__init__(*args)
+ # It shouldn't crash after the __init__ call
+
+import sys
+app = CoreApp(sys.argv)
diff --git a/sources/pyside6/tests/QtCore/bug_686.py b/sources/pyside6/tests/QtCore/bug_686.py
new file mode 100644
index 000000000..0a6a2f710
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_686.py
@@ -0,0 +1,123 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import with_statement
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyWriteThread(QThread):
+ def __init__(self, lock):
+ QThread.__init__(self)
+ self.lock = lock
+ self.started = False
+ self.canQuit = False
+
+ def run(self):
+ self.started = True
+ while not self.lock.tryLockForWrite():
+ pass
+ self.canQuit = True
+
+class MyReadThread(QThread):
+ def __init__(self, lock):
+ QThread.__init__(self)
+ self.lock = lock
+ self.started = False
+ self.canQuit = False
+
+ def run(self):
+ self.started = True
+ while not self.lock.tryLockForRead():
+ pass
+ self.canQuit = True
+
+class MyMutexedThread(QThread):
+ def __init__(self, mutex):
+ QThread.__init__(self)
+ self.mutex = mutex
+ self.started = False
+ self.canQuit = False
+
+ def run(self):
+ self.started = True
+ while not self.mutex.tryLock():
+ pass
+ self.mutex.unlock()
+ self.canQuit = True
+
+class TestQMutex (unittest.TestCase):
+
+ def testReadLocker(self):
+ lock = QReadWriteLock()
+ thread = MyWriteThread(lock)
+
+ with QReadLocker(lock):
+ thread.start()
+ while not thread.started:
+ pass
+ self.assertFalse(thread.canQuit)
+
+ thread.wait(2000)
+ self.assertTrue(thread.canQuit)
+
+ def testWriteLocker(self):
+ lock = QReadWriteLock()
+ thread = MyReadThread(lock)
+
+ with QWriteLocker(lock):
+ thread.start()
+ while not thread.started:
+ pass
+ self.assertFalse(thread.canQuit)
+
+ thread.wait(2000)
+ self.assertTrue(thread.canQuit)
+
+ def testMutexLocker(self):
+ mutex = QMutex()
+ thread = MyMutexedThread(mutex)
+
+ with QMutexLocker(mutex):
+ thread.start()
+ while not thread.started:
+ pass
+ self.assertFalse(thread.canQuit)
+
+ thread.wait(2000)
+ self.assertTrue(thread.canQuit)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_699.py b/sources/pyside6/tests/QtCore/bug_699.py
new file mode 100644
index 000000000..3185a17e2
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_699.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class TestBug699 (unittest.TestCase):
+
+ def defClass(self):
+ class Foo (QObject):
+ def foo(self):
+ pass
+
+ prop = Property(foo, foo)
+
+ def testIt(self):
+ self.assertRaises(TypeError, self.defClass)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_706.py b/sources/pyside6/tests/QtCore/bug_706.py
new file mode 100644
index 000000000..e9c03b541
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_706.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyModel (QAbstractListModel):
+ def rowCount(self, parent = None):
+ return 3
+
+class TestBug706(unittest.TestCase):
+
+ def mySlot(self, idx, start, end):
+ self.start = start
+ self.end = end
+
+ def testIt(self):
+ self.start = None
+ self.end = None
+
+ app = QCoreApplication([])
+ model = MyModel()
+ model.columnsAboutToBeInserted.connect(self.mySlot)
+ model.columnsAboutToBeInserted.emit(QModelIndex(), 0, 1)
+ self.assertEqual(self.start, 0)
+ self.assertEqual(self.end, 1)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_820.py b/sources/pyside6/tests/QtCore/bug_820.py
new file mode 100644
index 000000000..fd7ca27d8
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_820.py
@@ -0,0 +1,103 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import functools
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Slot, Signal, SIGNAL
+
+def log_exception():
+ def log_exception_decorator(func):
+ @functools.wraps(func)
+ def wrapper(*args, **kwds):
+ try:
+ return func(*args, **kwds)
+ except Exception:
+ raise
+
+ return wrapper
+
+ return log_exception_decorator
+
+
+def log_exception2():
+ def log_exception_decorator(func):
+ def wrapper(*args, **kwds):
+ try:
+ return func(*args, **kwds)
+ except Exception:
+ raise
+
+ return wrapper
+
+ return log_exception_decorator
+
+class MyObject(QObject):
+
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self._mySlotcalled = False
+ self._mySlot2called = False
+
+ @Slot()
+ @log_exception()
+ def mySlot(self):
+ self._mySlotcalled = True
+
+ @Slot(name="mySlot2")
+ @log_exception2()
+ def mySlot2(self):
+ self._mySlot2called = True
+
+ def poke(self):
+ self.events.emit()
+
+ events = Signal()
+
+
+class SlotWithDecoratorTest(unittest.TestCase):
+ def testSlots(self):
+ o = MyObject()
+ self.assertTrue(o.metaObject().indexOfSlot("mySlot()") > 0)
+ self.assertTrue(o.metaObject().indexOfSlot("mySlot2()") > 0)
+
+ o.events.connect(o.mySlot)
+ o.events.connect(o.mySlot2)
+ o.poke()
+ self.assertTrue(o._mySlotcalled)
+ self.assertTrue(o._mySlot2called)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/bug_826.py b/sources/pyside6/tests/QtCore/bug_826.py
new file mode 100644
index 000000000..79c9611cc
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_826.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QEvent, Qt
+import PySide6
+
+
+TEST_EVENT_TYPE = QEvent.Type(QEvent.registerEventType())
+
+class TestEvent(QEvent):
+ TestEventType = QEvent.Type(QEvent.registerEventType())
+
+ def __init__(self, rand=0):
+ super(TestEvent, self).__init__(TestEvent.TestEventType)
+ self._rand = rand
+
+ def getRand(self):
+ return self._rand
+
+
+class TestEnums(unittest.TestCase):
+ def testUserTypesValues(self):
+ self.assertTrue(QEvent.User <= TestEvent.TestEventType <= QEvent.MaxUser)
+ self.assertTrue(QEvent.User <= TEST_EVENT_TYPE <= QEvent.MaxUser)
+
+ def testUserTypesRepr(self):
+ self.assertEqual(eval(repr(TestEvent.TestEventType)), TestEvent.TestEventType)
+ self.assertEqual(eval(repr(TEST_EVENT_TYPE)), TEST_EVENT_TYPE)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_829.py b/sources/pyside6/tests/QtCore/bug_829.py
new file mode 100644
index 000000000..2612331c6
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_829.py
@@ -0,0 +1,72 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2011 Thomas Perl <thp.io/about>
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Test case for PySide bug 829
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QDir, QSettings, QTemporaryFile
+
+
+class QVariantConversions(unittest.TestCase):
+
+ _confFileName = None
+
+ def testDictionary(self):
+ confFile = QTemporaryFile(QDir.tempPath() + '/pysidebug829_XXXXXX.ini')
+ confFile.setAutoRemove(False)
+ self.assertTrue(confFile.open())
+ confFile.close()
+ self._confFileName = confFile.fileName()
+ del confFile
+ s = QSettings(self._confFileName, QSettings.IniFormat)
+ self.assertEqual(s.status(), QSettings.NoError)
+ # Save value
+ s.setValue('x', {1: 'a'})
+ s.sync()
+ self.assertEqual(s.status(), QSettings.NoError)
+ del s
+
+ # Restore value
+ s = QSettings(self._confFileName, QSettings.IniFormat)
+ self.assertEqual(s.status(), QSettings.NoError)
+ self.assertEqual(s.value('x'), {1: 'a'})
+
+ def __del__(self):
+ if self._confFileName is not None:
+ os.unlink(QDir.toNativeSeparators(self._confFileName))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_835.py b/sources/pyside6/tests/QtCore/bug_835.py
new file mode 100644
index 000000000..ddcf8af17
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_835.py
@@ -0,0 +1,100 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+
+get_counter = 0
+set_counter = 0
+
+class Descriptor(object):
+ def __get__(self, obj, owner):
+ global get_counter
+
+ if not obj:
+ return self
+
+ get_counter += 1
+ return obj.var
+
+ def __set__(self, obj, value):
+ global set_counter
+
+ set_counter += 1
+ obj.var = value
+
+class FooBar(QObject):
+ test = Descriptor()
+ var = 0
+
+class SetAndGetTestCases(unittest.TestCase):
+ def setUp(self):
+ global get_counter
+ global set_counter
+
+ get_counter = 0
+ set_counter = 0
+
+ def testSetMethod(self):
+ global get_counter
+ global set_counter
+
+ f = FooBar()
+
+ f.test = 1
+ self.assertEqual(get_counter, 0)
+ self.assertEqual(set_counter, 1)
+
+ get_counter = 0
+ set_counter = 0
+
+ def testGetMethod(self):
+ global get_counter
+ global set_counter
+
+ f = FooBar()
+ f.test = 1
+ set_counter = 0
+
+ ret = f.test
+ self.assertEqual(get_counter, 1)
+ self.assertEqual(set_counter, 0)
+
+ get_counter = 0
+ set_counter = 0
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_920.py b/sources/pyside6/tests/QtCore/bug_920.py
new file mode 100644
index 000000000..c4fade929
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_920.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6.QtCore as QtCore
+
+class Signaller(QtCore.QObject):
+ s1 = QtCore.Signal()
+ s2 = QtCore.Signal()
+
+class TestBug920(unittest.TestCase):
+
+ def testIt(self):
+ s = Signaller()
+ s.s1.connect(self.onSignal)
+ s.s2.connect(self.onSignal)
+ self.assertTrue(s.s1.disconnect(self.onSignal))
+ self.assertTrue(s.s2.disconnect(self.onSignal))
+
+ def onSignal(self):
+ pass
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_927.py b/sources/pyside6/tests/QtCore/bug_927.py
new file mode 100644
index 000000000..15dccf92d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_927.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import time
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTime, QRunnable, QThreadPool
+
+class Task(QRunnable):
+ def run(self):
+ t = QTime()
+ t.start()
+ time.sleep(2) # Sleep 2 seconds
+
+
+class QThreadPoolTest(unittest.TestCase):
+ '''This used to cause a segfault due the ownership control on globalInstance function '''
+ def testSlowJobs(self):
+ for i in range(3):
+ task = Task()
+ QThreadPool.globalInstance().start(task)
+ time.sleep(1) # Sleep 1 second
+
+ QThreadPool.globalInstance().waitForDone()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_931.py b/sources/pyside6/tests/QtCore/bug_931.py
new file mode 100644
index 000000000..0a5342ab3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_931.py
@@ -0,0 +1,55 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal
+o = QObject()
+class MyObject(QObject):
+ s = Signal(int)
+
+class CheckSignalType(unittest.TestCase):
+ def testSignal(self):
+ self.assertTrue(isinstance(QObject.destroyed, Signal))
+ self.assertEqual(type(QObject.destroyed), Signal)
+
+ self.assertEqual(type(o.destroyed).__name__, "SignalInstance")
+ self.assertNotEqual(type(o.destroyed), Signal)
+
+ self.assertTrue(isinstance(o.destroyed, Signal))
+ self.assertTrue(isinstance(MyObject.s, Signal))
+ self.assertFalse(isinstance(int, Signal))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_938.py b/sources/pyside6/tests/QtCore/bug_938.py
new file mode 100644
index 000000000..8b318ec12
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_938.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+
+class TestBug938 (unittest.TestCase):
+
+ def testIt(self):
+ b = QBuffer()
+ b.open(QBuffer.WriteOnly)
+ b.write(bytes("\x0023\x005", "UTF-8"))
+ b.close()
+ self.assertEqual(b.buffer().size(), 5)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_953.py b/sources/pyside6/tests/QtCore/bug_953.py
new file mode 100644
index 000000000..53979c24e
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_953.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+
+class Dispatcher(QObject):
+ _me = None
+
+ def __init__(self):
+ super(Dispatcher, self).__init__()
+ self._me = self
+ QTimer.singleShot(0, self._finish)
+
+ def _finish(self):
+ del self._me # It can't crash here!
+ QTimer.singleShot(10, QCoreApplication.instance().quit)
+
+if __name__ == '__main__':
+ app = QCoreApplication([])
+ Dispatcher()
+ app.exec_()
diff --git a/sources/pyside6/tests/QtCore/bug_987.py b/sources/pyside6/tests/QtCore/bug_987.py
new file mode 100644
index 000000000..04ba1a7b5
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_987.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+
+class TestBug987(unittest.TestCase):
+ def callback(self):
+ pass
+
+ def testInvalidDisconnection(self):
+ o = QObject()
+ self.assertRaises(RuntimeError, o.destroyed.disconnect, self.callback)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_994.py b/sources/pyside6/tests/QtCore/bug_994.py
new file mode 100644
index 000000000..6caed7fc2
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_994.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QIODevice, QTextStream
+
+
+class MyIODevice (QIODevice):
+ def readData(self, amount):
+ return bytes("\0a" * int(amount/2), "UTF-8")
+
+ def readLineData(self, maxSize):
+ return bytes("\0b" * 4, "UTF-8")
+
+ def atEnd(self):
+ return False
+
+class TestBug944 (unittest.TestCase):
+
+ def testIt(self):
+ device = MyIODevice()
+ device.open(QIODevice.ReadOnly)
+ s = QTextStream(device)
+ self.assertEqual(s.read(4), "\0a\0a")
+ self.assertEqual(device.readLine(), "\0b\0b\0b\0b")
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py b/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py
new file mode 100644
index 000000000..7fef4e056
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_PYSIDE-164.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication, QEventLoop, QObject, Qt, QThread, QTimer, SIGNAL
+
+class Emitter(QThread):
+ def __init__(self):
+ QThread.__init__(self)
+
+ def run(self):
+ print("Before emit.")
+ self.emit(SIGNAL("signal(int)"), 0)
+ print("After emit.")
+
+class Receiver(QObject):
+ def __init__(self, eventloop):
+ QObject.__init__(self)
+ self.eventloop = eventloop
+
+ def receive(self, number):
+ print("Received number: %d" % number)
+ self.eventloop.exit(0)
+
+
+class TestBugPYSIDE164(unittest.TestCase):
+
+ def testBlockingSignal(self):
+ app = QCoreApplication.instance() or QCoreApplication([])
+ eventloop = QEventLoop()
+ emitter = Emitter()
+ receiver = Receiver(eventloop)
+ emitter.connect(emitter, SIGNAL("signal(int)"),
+ receiver.receive, Qt.BlockingQueuedConnection)
+ emitter.start()
+ retval = eventloop.exec_()
+ emitter.wait(2000)
+ self.assertEqual(retval, 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py b/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py
new file mode 100644
index 000000000..11a49649c
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+
+class TestBugPYSIDE42 (unittest.TestCase):
+
+ def testIt(self):
+ obj1 = QFile()
+ obj2 = QObject()
+ hash1 = hash(obj1)
+ hash2 = hash(obj2)
+
+ self.assertNotEqual(hash1, hash2)
+ self.assertEqual(hash1, hash(obj1))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/child_event_test.py b/sources/pyside6/tests/QtCore/child_event_test.py
new file mode 100644
index 000000000..47e437f6b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/child_event_test.py
@@ -0,0 +1,86 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for QObject.childEvent and QTimer.childEvent overloading'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer, QCoreApplication
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class ExtQObject(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.child_event_received = False
+
+ def childEvent(self, event):
+ QObject.childEvent(self, event)
+ self.child_event_received = True
+
+class ExtQTimer(QTimer):
+ def __init__(self):
+ QTimer.__init__(self)
+ self.child_event_received = False
+
+ def childEvent(self, event):
+ QTimer.childEvent(self, event)
+ self.child_event_received = True
+
+
+class TestChildEvent(UsesQCoreApplication):
+ '''Test case for QObject::childEvent and QTimer::childEvent'''
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+
+ def tearDown(self):
+ UsesQCoreApplication.tearDown(self)
+
+ def testQObject(self):
+ parent = ExtQObject()
+ child = QObject()
+ child.setParent(parent)
+ self.assertTrue(parent.child_event_received)
+
+ def testQTimer(self):
+ parent = ExtQTimer()
+ child = QObject()
+ child.setParent(parent)
+ self.assertTrue(parent.child_event_received)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/classinfo_test.py b/sources/pyside6/tests/QtCore/classinfo_test.py
new file mode 100644
index 000000000..405efb3c9
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/classinfo_test.py
@@ -0,0 +1,111 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication, ClassInfo
+
+class TestClassInfo(unittest.TestCase):
+ def test_metadata(self):
+ @ClassInfo(author='pyside', url='http://www.pyside.org')
+ class MyObject(QObject):
+ pass
+
+ o = MyObject()
+ mo = o.metaObject()
+ self.assertEqual(mo.classInfoCount(), 2)
+
+ ci = mo.classInfo(0) #author
+ self.assertEqual(ci.name(), 'author')
+ self.assertEqual(ci.value(), 'pyside')
+
+ ci = mo.classInfo(1) #url
+ self.assertEqual(ci.name(), 'url')
+ self.assertEqual(ci.value(), 'http://www.pyside.org')
+
+ def test_verify_metadata_types(self):
+ valid_dict = { '123': '456' }
+
+ invalid_dict_1 = { '123': 456 }
+ invalid_dict_2 = { 123: 456 }
+ invalid_dict_3 = { 123: '456' }
+
+ ClassInfo(**valid_dict)
+
+ self.assertRaises(TypeError, ClassInfo, **invalid_dict_1)
+
+ # assertRaises only allows for string keywords, so a `try` must be used here.
+ try:
+ ClassInfo(**invalid_dict_2)
+ self.fail('ClassInfo() accepted invalid_dict_2!')
+ except TypeError:
+ pass
+
+ try:
+ ClassInfo(**invalid_dict_3)
+ self.fail('ClassInfo() accepted invalid_dict_3!')
+ except TypeError:
+ pass
+
+ def test_can_not_use_instance_twice(self):
+ decorator = ClassInfo(author='pyside', url='http://www.pyside.org')
+
+ @decorator
+ class MyObject1(QObject):
+ pass
+
+ class MyObject2(QObject):
+ pass
+
+ self.assertRaises(TypeError, decorator, MyObject2)
+
+ def test_can_only_be_used_on_qobjects(self):
+ def test_function(): pass
+ self.assertRaises(TypeError, ClassInfo(), test_function)
+
+ class NotAQObject(object): pass
+ self.assertRaises(TypeError, ClassInfo(), NotAQObject)
+
+ class QObjectSubclass(QObject): pass
+ ClassInfo()(QObjectSubclass)
+
+ class SubclassOfNativeQObjectSubclass(QCoreApplication): pass
+ ClassInfo()(SubclassOfNativeQObjectSubclass)
+
+ class SubclassOfPythonQObjectSubclass(QObjectSubclass): pass
+ ClassInfo()(SubclassOfPythonQObjectSubclass)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/deepcopy_test.py b/sources/pyside6/tests/QtCore/deepcopy_test.py
new file mode 100644
index 000000000..779a64549
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/deepcopy_test.py
@@ -0,0 +1,117 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from copy import deepcopy
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
+from PySide6.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QDir, QPoint, QPointF
+try:
+ from PySide6.QtCore import QUuid
+ HAVE_Q = True
+except ImportError:
+ HAVE_Q = False
+
+class DeepCopyHelper:
+ def testCopy(self):
+ copy = deepcopy([self.original])[0]
+ self.assertTrue(copy is not self.original)
+ self.assertEqual(copy, self.original)
+
+class QByteArrayDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QByteArray(bytes('the quick brown fox jumps over the lazy dog', "UTF-8"))
+
+
+class QDateDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QDate(2010, 11, 22)
+
+
+class QTimeDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QTime(11, 37, 55, 692)
+
+
+class QDateTimeDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QDateTime(2010, 5, 18, 10, 24, 45, 223, Qt.LocalTime)
+
+
+class QSizeDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QSize(42, 190)
+
+
+class QSizeFDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QSizeF(42.7, 190.2)
+
+
+class QRectDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QRect(100, 200, 300, 400)
+
+
+class QRectFDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QRectF(100.33, 200.254, 300.321, 400.123)
+
+class QLineDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QLine(1, 2, 3, 4)
+
+class QLineFDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QLineF(1.1, 2.2, 3.3, 4.4)
+
+class QPointDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QPoint(1, 2)
+
+class QPointFDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QPointF(1.1, 2.2)
+
+class QDirDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QDir("./")
+
+class QUuiCopy(DeepCopyHelper, unittest.TestCase):
+ @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
+ def setUp(self):
+ self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/deletelater_test.py b/sources/pyside6/tests/QtCore/deletelater_test.py
new file mode 100644
index 000000000..fa48d6e0b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/deletelater_test.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QTimer.singleShot'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer, QCoreApplication, SIGNAL
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class TestDeleteLater(UsesQCoreApplication):
+ '''Test case for function DeleteLater'''
+
+ def testCase(self):
+ o = QObject()
+ o.deleteLater()
+ del o
+ QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/destroysignal_test.py b/sources/pyside6/tests/QtCore/destroysignal_test.py
new file mode 100644
index 000000000..825a4e372
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/destroysignal_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer, QObject
+
+
+class TestDestroySignal(unittest.TestCase):
+ def onObjectDestroyed(self, timer):
+ self.assertTrue(isinstance(timer, QObject))
+ self._destroyed = True
+
+ def testSignal(self):
+ self._destroyed = False
+ t = QTimer()
+ t.destroyed[QObject].connect(self.onObjectDestroyed)
+ del t
+ self.assertTrue(self._destroyed)
+
+ def testWithParent(self):
+ self._destroyed = False
+ p = QTimer()
+ t = QTimer(p)
+ t.destroyed[QObject].connect(self.onObjectDestroyed)
+ del p
+ self.assertTrue(self._destroyed)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/duck_punching_test.py b/sources/pyside6/tests/QtCore/duck_punching_test.py
new file mode 100644
index 000000000..40246f9fd
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/duck_punching_test.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for duck punching new implementations of C++ virtual methods into object instances.'''
+
+import os
+import sys
+import types
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+def MethodType(func, instance, instanceType):
+ return types.MethodType(func, instance)
+
+class Duck(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ def childEvent(self, event):
+ QObject.childEvent(self, event)
+
+class TestDuckPunchingOnQObjectInstance(UsesQCoreApplication):
+ '''Test case for duck punching new implementations of C++ virtual methods into object instances.'''
+
+ def setUp(self):
+ #Acquire resources
+ self.duck_childEvent_called = False
+ UsesQCoreApplication.setUp(self)
+
+ def tearDown(self):
+ #Release resources
+ del self.duck_childEvent_called
+ UsesQCoreApplication.tearDown(self)
+
+
+ def testChildEventMonkeyPatch(self):
+ #Test if the new childEvent injected on QObject instance is called from C++
+ parent = QObject()
+ def childEvent(obj, event):
+ self.duck_childEvent_called = True
+ parent.childEvent = MethodType(childEvent, parent, QObject)
+ child = QObject()
+ child.setParent(parent)
+ self.assertTrue(self.duck_childEvent_called)
+ # This is done to decrease the refcount of the vm object
+ # allowing the object wrapper to be deleted before the
+ # BindingManager. This is useful when compiling Shiboken
+ # for debug, since the BindingManager destructor has an
+ # assert that checks if the wrapper mapper is empty.
+ parent.childEvent = None
+
+ def testChildEventMonkeyPatchWithInheritance(self):
+ #Test if the new childEvent injected on a QObject's extension class instance is called from C++
+ parent = Duck()
+ def childEvent(obj, event):
+ QObject.childEvent(obj, event)
+ self.duck_childEvent_called = True
+ child = QObject()
+ child.setParent(parent)
+ parent.childEvent = MethodType(childEvent, parent, QObject)
+ child = QObject()
+ child.setParent(parent)
+ self.assertTrue(self.duck_childEvent_called)
+ # This is done to decrease the refcount of the vm object
+ # allowing the object wrapper to be deleted before the
+ # BindingManager. This is useful when compiling Shiboken
+ # for debug, since the BindingManager destructor has an
+ # assert that checks if the wrapper mapper is empty.
+ parent.childEvent = None
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/emoji_string_test.py b/sources/pyside6/tests/QtCore/emoji_string_test.py
new file mode 100644
index 000000000..2a4209086
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/emoji_string_test.py
@@ -0,0 +1,85 @@
+# This Python file uses the following encoding: utf-8
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+emoji-string-test.py
+
+This is the original code from the bug report
+https://bugreports.qt.io/browse/PYSIDE-336
+
+The only changes are the emoji constant creation which avoids unicode in the
+source itself, utf8 encoding in line 1 and a short plausibility test to make
+it safely fail.
+"""
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtCore
+
+emoji_str = u'\U0001f632' + u' ' # "😲 "
+
+class TestStuff(QtCore.QObject):
+ testsig = QtCore.Signal(str)
+
+ def a_nop(self, sendMeAnEmoji):
+ print(sendMeAnEmoji)
+ return
+
+ def __init__(self):
+ super(TestStuff, self).__init__()
+ self.testsig.connect(self.a_nop)
+ self.testsig.emit(emoji_str)
+
+ def plausi(self):
+ # Python 2 may be built with UCS-2 or UCS-4 support.
+ # UCS-2 creates 2 surrogate code points. See
+ # https://stackoverflow.com/questions/30775689/python-length-of-unicode-string-confusion
+ assert len(emoji_str) == 2 if sys.maxunicode > 0xffff else 3
+
+if __name__ == "__main__":
+ mything = TestStuff()
+ mything.plausi()
diff --git a/sources/pyside6/tests/QtCore/hash_test.py b/sources/pyside6/tests/QtCore/hash_test.py
new file mode 100644
index 000000000..917bcb43d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/hash_test.py
@@ -0,0 +1,93 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QDate, QDateTime, QTime, QUrl
+from PySide6.QtCore import QLine, QPoint, QRect, QSize
+
+class HashTest(unittest.TestCase):
+ def testInsert(self):
+ myHash = {}
+ qdate = QDate.currentDate()
+ qdatetime = QDateTime.currentDateTime()
+ qtime = QTime.currentTime()
+ qurl = QUrl("http://www.pyside.org")
+ qpoint = QPoint(12, 42)
+
+ myHash[qdate] = "QDate"
+ myHash[qdatetime] = "QDateTime"
+ myHash[qtime] = "QTime"
+ myHash[qurl] = "QUrl"
+ myHash[qpoint] = "QPoint"
+
+ self.assertEqual(myHash[qdate], "QDate")
+ self.assertEqual(myHash[qdatetime], "QDateTime")
+ self.assertEqual(myHash[qtime], "QTime")
+ self.assertEqual(myHash[qurl], "QUrl")
+ self.assertEqual(myHash[qpoint], "QPoint")
+
+ def testQPointHash(self):
+ p1 = QPoint(12, 34)
+ p2 = QPoint(12, 34)
+ self.assertFalse(p1 is p2)
+ self.assertEqual(p1, p2)
+ self.assertEqual(hash(p1), hash(p2))
+
+ def testQSizeHash(self):
+ s1 = QSize(12, 34)
+ s2 = QSize(12, 34)
+ self.assertFalse(s1 is s2)
+ self.assertEqual(s1, s2)
+ self.assertEqual(hash(s1), hash(s2))
+
+ def testQRectHash(self):
+ r1 = QRect(12, 34, 56, 78)
+ r2 = QRect(12, 34, 56, 78)
+ self.assertFalse(r1 is r2)
+ self.assertEqual(r1, r2)
+ self.assertEqual(hash(r1), hash(r2))
+
+ def testQLineHash(self):
+ l1 = QLine(12, 34, 56, 78)
+ l2 = QLine(12, 34, 56, 78)
+ self.assertFalse(l1 is l2)
+ self.assertEqual(l1, l2)
+ self.assertEqual(hash(l1), hash(l2))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/inherits_test.py b/sources/pyside6/tests/QtCore/inherits_test.py
new file mode 100644
index 000000000..c9a76e679
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/inherits_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class MyObject(QObject):
+ pass
+
+class MainTest(unittest.TestCase):
+ def testInherits(self):
+ o = MyObject()
+ mo = o.metaObject()
+ self.assertEqual(mo.className(), 'MyObject')
+ self.assertTrue(o.inherits('MyObject'))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/max_signals.py b/sources/pyside6/tests/QtCore/max_signals.py
new file mode 100644
index 000000000..349b62925
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/max_signals.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+class MyObject(QObject):
+ pass
+
+
+class TestSignalLimitless(unittest.TestCase):
+ SIGNAL_MAX = 100
+ def test100DynamicSignals(self):
+
+ self.count = 0
+ def onSignal():
+ self.count += 1
+
+ #create 100 dynamic signals
+ o = MyObject()
+ for i in range(self.SIGNAL_MAX):
+ o.connect(SIGNAL('sig%d()'%i), onSignal)
+
+ #chek if the signals are valid
+ m = o.metaObject()
+ for i in range(self.SIGNAL_MAX):
+ self.assertTrue(m.indexOfSignal('sig%d()'%i) > 0)
+
+ #emit all 100 signals
+ for i in range(self.SIGNAL_MAX):
+ o.emit(SIGNAL('sig%d()'%i))
+
+ self.assertEqual(self.count, self.SIGNAL_MAX)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/missing_symbols_test.py b/sources/pyside6/tests/QtCore/missing_symbols_test.py
new file mode 100644
index 000000000..18456529b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/missing_symbols_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''(Very) Simple test case for missing names from QtCore'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+class MissingClasses(unittest.TestCase):
+
+ def testQSettings(self): # Bug 232
+ getattr(QtCore, 'QSettings')
+
+ def testQtTrNoop(self): # Bug 220
+ getattr(QtCore, 'QT_TR_NOOP')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/mockclass_test.py b/sources/pyside6/tests/QtCore/mockclass_test.py
new file mode 100644
index 000000000..c759fd0c3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/mockclass_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Test case for PySide bug 634
+# http://bugs.pyside.org/show_bug.cgi?id=634
+# Marcus Lindblom <macke@yar.nu>; 2011-02-16
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication
+
+class Mock(object):
+ def __init__(self):
+ self.called = False
+ self.return_value = None
+
+ def __call__(self, *args, **kwargs):
+ self.called = True
+ return self.return_value
+
+
+class MockClassTest(unittest.TestCase):
+ def testMockQCoreApplication(self):
+ mock = Mock()
+ setattr(QCoreApplication, 'instance', mock)
+ QCoreApplication.instance()
+ self.assertTrue(mock.called)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/multiple_feature_test.py b/sources/pyside6/tests/QtCore/multiple_feature_test.py
new file mode 100644
index 000000000..0b57936cb
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/multiple_feature_test.py
@@ -0,0 +1,141 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+from PySide6.support import __feature__
+from textwrap import dedent
+
+"""
+multiple_feature_test.py
+------------------------
+
+This tests the selectable features in PySide.
+
+The first feature is `snake_case` instead of `camelCase`.
+There is much more to come.
+"""
+
+MethodDescriptorType = type(str.split)
+
+class FeaturesTest(unittest.TestCase):
+
+ def testAllFeatureCombinations(self):
+ """
+ Test for all 256 possible combinations of `__feature__` imports.
+ """
+
+ def tst_bit0(flag, self, bits):
+ if flag == 0:
+ QtCore.QCborArray.isEmpty
+ QtCore.QCborArray.__dict__["isEmpty"]
+ with self.assertRaises(AttributeError):
+ QtCore.QCborArray.is_empty
+ with self.assertRaises(KeyError):
+ QtCore.QCborArray.__dict__["is_empty"]
+ else:
+ QtCore.QCborArray.is_empty
+ QtCore.QCborArray.__dict__["is_empty"]
+ with self.assertRaises(AttributeError):
+ QtCore.QCborArray.isEmpty
+ with self.assertRaises(KeyError):
+ QtCore.QCborArray.__dict__["isEmpty"]
+
+ def tst_bit1(flag, self, bits):
+ getter_name = "object_name" if bits & 1 else "objectName"
+ setter_name = "set_object_name" if bits & 1 else "setObjectName"
+ thing = getattr(QtCore.QObject, getter_name)
+ if flag:
+ self.assertEqual(type(thing), property)
+ with self.assertRaises(AttributeError):
+ getattr(QtCore.QObject, setter_name)
+ else:
+ self.assertEqual(type(thing), MethodDescriptorType)
+ getattr(QtCore.QObject, setter_name)
+
+ edict = {}
+ for bit in range(2, 8):
+ # We are cheating here, since the functions are in the globals.
+
+ eval(compile(dedent("""
+
+ def tst_bit{0}(flag, self, bits):
+ if flag == 0:
+ with self.assertRaises(AttributeError):
+ QtCore.QCborArray.fake_feature_{1:02x}
+ with self.assertRaises(KeyError):
+ QtCore.QCborArray.__dict__["fake_feature_{1:02x}"]
+ else:
+ QtCore.QCborArray.fake_feature_{1:02x}
+ QtCore.QCborArray.__dict__["fake_feature_{1:02x}"]
+
+ """).format(bit, 1 << bit), "<string>", "exec"), globals(), edict)
+ globals().update(edict)
+ feature_list = __feature__._really_all_feature_names
+ func_list = [tst_bit0, tst_bit1, tst_bit2, tst_bit3,
+ tst_bit4, tst_bit5, tst_bit6, tst_bit7]
+
+ for idx in range(0x100):
+ __feature__.set_selection(0)
+ config = "feature_{:02x}".format(idx)
+ print()
+ print("--- Feature Test Config `{}` ---".format(config))
+ print("Imports:")
+ for bit in range(8):
+ if idx & 1 << bit:
+ feature = feature_list[bit]
+ text = "from __feature__ import {}".format(feature)
+ print(text)
+ eval(compile(text, "<string>", "exec"), globals(), edict)
+ for bit in range(8):
+ value = idx & 1 << bit
+ func_list[bit](value, self=self, bits=idx)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/python_conversion.py b/sources/pyside6/tests/QtCore/python_conversion.py
new file mode 100644
index 000000000..f34637cce
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/python_conversion.py
@@ -0,0 +1,100 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QLineF'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import datetime
+
+from PySide6.QtCore import QTime, QDateTime, QDate
+
+class TestDateTimeConversions (unittest.TestCase):
+ def testQDate(self):
+ date = datetime.date(2010, 4, 23)
+ other = QDate(date)
+ self.assertEqual(date.year, other.year())
+ self.assertEqual(date.month, other.month())
+ self.assertEqual(date.day, other.day())
+
+ self.assertEqual(date, other.toPython())
+
+ def testQTime(self):
+ time = datetime.time(11, 14, 0, 1000)
+ other = QTime(time)
+ self.assertEqual(time.hour, other.hour())
+ self.assertEqual(time.minute, other.minute())
+ self.assertEqual(time.second, other.second())
+ self.assertEqual(time.microsecond/1000, other.msec())
+
+ self.assertEqual(time, other.toPython())
+
+ def testQDateTime(self):
+ dateTime = datetime.datetime(2010, 4, 23, 11, 14, 0, 1000)
+ other = QDateTime(dateTime)
+
+ otherDate = other.date()
+ self.assertEqual(dateTime.year, otherDate.year())
+ self.assertEqual(dateTime.month, otherDate.month())
+ self.assertEqual(dateTime.day, otherDate.day())
+
+ otherTime = other.time()
+ self.assertEqual(dateTime.hour, otherTime.hour())
+ self.assertEqual(dateTime.minute, otherTime.minute())
+ self.assertEqual(dateTime.second, otherTime.second())
+ self.assertEqual(dateTime.microsecond/1000, otherTime.msec())
+
+ self.assertEqual(dateTime, other.toPython())
+
+ def testQDateTime6arg(self):
+ dateTime = datetime.datetime(2010, 4, 23, 11, 14, 7)
+ other = QDateTime(dateTime)
+
+ otherDate = other.date()
+ self.assertEqual(dateTime.year, otherDate.year())
+ self.assertEqual(dateTime.month, otherDate.month())
+ self.assertEqual(dateTime.day, otherDate.day())
+
+ otherTime = other.time()
+ self.assertEqual(dateTime.hour, otherTime.hour())
+ self.assertEqual(dateTime.minute, otherTime.minute())
+ self.assertEqual(dateTime.second, otherTime.second())
+ self.assertEqual(dateTime.microsecond/1000, otherTime.msec())
+
+ self.assertEqual(dateTime, other.toPython())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qabs_test.py b/sources/pyside6/tests/QtCore/qabs_test.py
new file mode 100644
index 000000000..71a3426af
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qabs_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+class QAbsTest(unittest.TestCase):
+ '''Tests for QtCore.qAbs'''
+
+ def testBasic(self):
+ def check(x):
+ self.assertEqual(QtCore.qAbs(x), abs(x))
+
+ check(0)
+ check(-10)
+ check(10)
+ check(10.5)
+ check(-10.5)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py b/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py
new file mode 100644
index 000000000..918bb7842
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyModel (QAbstractListModel):
+ pass
+
+
+class TestQModelIndexInternalPointer(unittest.TestCase):
+
+ def testInternalPointer(self):
+ m = MyModel()
+ foo = QObject()
+ idx = m.createIndex(0,0, foo)
+ check = m.checkIndex(idx, QAbstractItemModel.CheckIndexOption.IndexIsValid
+ | QAbstractItemModel.CheckIndexOption.DoNotUseParent
+ | QAbstractItemModel.CheckIndexOption.ParentIsInvalid)
+ self.assertTrue(check)
+
+ def testPassQPersistentModelIndexAsQModelIndex(self):
+ # Related to bug #716
+ m = MyModel()
+ idx = QPersistentModelIndex()
+ m.span(idx)
+
+ def testQIdentityProxyModel(self):
+ sourceModel = QStringListModel(['item1', 'item2'])
+ sourceIndex = sourceModel.index(0, 0)
+ sourceData = str(sourceModel.data(sourceIndex, Qt.DisplayRole))
+ proxyModel = QIdentityProxyModel()
+ proxyModel.setSourceModel(sourceModel)
+ proxyIndex = proxyModel.mapFromSource(sourceIndex)
+ proxyData = str(proxyModel.data(proxyIndex, Qt.DisplayRole))
+ self.assertEqual(sourceData, proxyData)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qanimationgroup_test.py b/sources/pyside6/tests/QtCore/qanimationgroup_test.py
new file mode 100644
index 000000000..9e8b50a93
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qanimationgroup_test.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class QAnimationGroupTest(unittest.TestCase):
+
+ def testBasic(self):
+ app = QCoreApplication([])
+
+ panim = QParallelAnimationGroup()
+ sanim = QSequentialAnimationGroup()
+ panim.addAnimation(sanim)
+
+ self.assertEqual(sanim.parent(), panim)
+
+ panim.clear()
+
+ self.assertRaises(RuntimeError, lambda :sanim.parent())
+
+ QTimer.singleShot(100, app.quit)
+ app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qbitarray_test.py b/sources/pyside6/tests/QtCore/qbitarray_test.py
new file mode 100644
index 000000000..2db36f48d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qbitarray_test.py
@@ -0,0 +1,154 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests if QBitArray class is iterable and also '~' (__invert__) and bitwise operators'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QBitArray
+
+def bool_list_from_qbitarray(qbitarray):
+ '''This function is used instead of a list comprehension because
+ the QBitArray is being tested also to check if it is providing
+ the iterable protocol.
+ '''
+ qbitarray_values = []
+ for i in range(qbitarray.size()):
+ qbitarray_values.append(qbitarray.at(i))
+ return qbitarray_values
+
+class QBitArrayIsIterableTest(unittest.TestCase):
+ '''Tests if QBitArray class is iterable and also '~' (__invert__) and bitwise operators'''
+
+ def setUp(self):
+ #Acquire resources
+ self.qbitarray = QBitArray(3)
+ self.qbitarray_values = [True, False, False]
+ # WARNING: do not pythonify the following loop
+ for i in range(len(self.qbitarray_values)):
+ self.qbitarray.setBit(i, self.qbitarray_values[i])
+
+ self.inverted_qbitarray_values = [not bit for bit in self.qbitarray_values]
+
+ self.other_qbitarray = QBitArray(3)
+ self.other_qbitarray_values = [True, True, False]
+ # WARNING: do not pythonify the following loop
+ for i in range(len(self.other_qbitarray_values)):
+ self.other_qbitarray.setBit(i, self.other_qbitarray_values[i])
+
+ def tearDown(self):
+ #Release resources
+ del self.qbitarray
+ del self.other_qbitarray
+ del self.qbitarray_values
+ del self.other_qbitarray_values
+ del self.inverted_qbitarray_values
+
+ def testQBitArrayIsIterable(self):
+ #Tests if QBitArray class is iterable
+ qbitarray_is_iterable = True
+ try:
+ bitarray = [bit for bit in self.qbitarray]
+ except:
+ qbitarray_is_iterable = False
+ self.assertTrue(qbitarray_is_iterable)
+
+ def testQBitArrayInvertOperator(self):
+ #Tests QBitArray '~' (__invert__) operator
+ inverted_qbitarray = ~self.qbitarray
+ # WARNING: do not pythonify the following loop, the
+ # iterability of QBitArray class is tested in another place
+ inverted_qbitarray_values = bool_list_from_qbitarray(inverted_qbitarray)
+ self.assertEqual(self.inverted_qbitarray_values, inverted_qbitarray_values)
+
+ def testQBitArrayOrBitwiseOperator(self):
+ #Tests QBitArray '|' (or) operator
+ has_or_bitwise_operator = True
+ ored_qbitarray, ored_bool_list = None, None
+ try:
+ ored_qbitarray = self.qbitarray | self.other_qbitarray
+ ored_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
+ except:
+ has_or_bitwise_operator = False
+ self.assertTrue(has_or_bitwise_operator)
+ self.assertEqual(bool_list_from_qbitarray(ored_qbitarray), ored_bool_list)
+
+ def testQBitArrayAndBitwiseOperator(self):
+ #Tests QBitArray '&' (and) operator
+ has_and_bitwise_operator = True
+ anded_qbitarray, anded_bool_list = None, None
+ try:
+ anded_qbitarray = self.qbitarray | self.other_qbitarray
+ anded_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
+ except:
+ has_and_bitwise_operator = False
+ self.assertTrue(has_and_bitwise_operator)
+ self.assertEqual(bool_list_from_qbitarray(anded_qbitarray), anded_bool_list)
+
+ def testQBitArrayXorBitwiseOperator(self):
+ #Tests QBitArray '^' (xor) operator
+ has_xor_bitwise_operator = True
+ xored_qbitarray, xored_bool_list = None, None
+ try:
+ xored_qbitarray = self.qbitarray | self.other_qbitarray
+ xored_bool_list = [b1 | b2 for b1, b2 in zip(self.qbitarray_values, self.other_qbitarray_values)]
+ except:
+ has_xor_bitwise_operator = False
+ self.assertTrue(has_xor_bitwise_operator)
+ self.assertEqual(bool_list_from_qbitarray(xored_qbitarray), xored_bool_list)
+
+
+class QBitArrayGetItemTest(unittest.TestCase):
+ '''Test case for []/__getitem__ operator'''
+
+ def create_bitarray(self, values):
+ '''helper function to create a bit array'''
+ obj = QBitArray(len(values))
+ for i, value in enumerate(values):
+ obj.setBit(i, value)
+ return obj
+
+ def testSequenceProtocol(self):
+ '''QBitArray sequence protocol'''
+ data = [True, False, True]
+ obj = self.create_bitarray(data)
+ for reference, value in zip(data, obj):
+ self.assertEqual(reference, value)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qbytearray_concatenation_operator_test.py b/sources/pyside6/tests/QtCore/qbytearray_concatenation_operator_test.py
new file mode 100644
index 000000000..086835868
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qbytearray_concatenation_operator_test.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QByteArray concatenation with '+' operator'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray
+
+
+class QByteArrayConcatenationOperatorTest(unittest.TestCase):
+ '''Test cases for QByteArray concatenation with '+' operator'''
+
+ def testConcatQByteArrayAndPythonString(self):
+ #Test concatenation of a QByteArray with a Python bytes, in this order
+ qba = QByteArray(bytes('foo', "UTF-8"))
+ result = qba + bytes('\x00bar', "UTF-8")
+ self.assertEqual(type(result), QByteArray)
+ self.assertEqual(result, bytes('foo\x00bar', "UTF-8"))
+
+ def testConcatPythonStringAndQByteArray(self):
+ #Test concatenation of a Python bytes with a QByteArray, in this order
+ concat_python_string_add_qbytearray_worked = True
+ qba = QByteArray(bytes('foo', "UTF-8"))
+ result = bytes('bar\x00', "UTF-8") + qba
+ self.assertEqual(type(result), QByteArray)
+ self.assertEqual(result, bytes('bar\x00foo', "UTF-8"))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py b/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py
new file mode 100644
index 000000000..f31e10cb5
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qbytearray_operator_iadd_test.py
@@ -0,0 +1,93 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray
+from helper.docmodifier import DocModifier
+
+
+class BaseQByteArrayOperatorIAdd(object):
+ '''Base class for QByteArray += operator tests.
+
+ Implementing classes should inherit from unittest.TestCase and implement
+ setUp, setting self.obj and self.orig_obj to the target QByteArray and original
+ one, respectively'''
+
+ __metaclass__ = DocModifier
+
+ def testSingleString(self):
+ '''QByteArray += bytes of size 1'''
+ s = bytes('0', "UTF-8")
+ self.obj += s
+ self.assertEqual(self.obj, self.orig_obj + s)
+ self.assertEqual(self.obj.size(), self.orig_obj.size() + len(s))
+
+ def testString(self):
+ '''QByteArray += bytes of size > 1'''
+ s = bytearray(bytes('dummy', "UTF-8"))
+ self.obj += s # XXx iadd support abytearray
+ self.assertEqual(self.obj, self.orig_obj + s)
+ self.assertEqual(self.obj.size(), self.orig_obj.size() + len(s))
+
+ def testQByteArray(self):
+ '''QByteArray += QByteArray'''
+ s = QByteArray(bytes('array', "UTF-8"))
+ self.obj += s
+ self.assertEqual(self.obj, self.orig_obj + s)
+
+
+class NullQByteArrayOperatorIAdd(unittest.TestCase, BaseQByteArrayOperatorIAdd):
+ '''Test case for operator QByteArray += on null QByteArrays'''
+
+ doc_prefix = 'Null object'
+ doc_filter = lambda x: x.startswith('test')
+
+ def setUp(self):
+ self.obj = QByteArray()
+ self.orig_obj = QByteArray()
+
+
+class ValidQByteArrayOperatorIAdd(unittest.TestCase, BaseQByteArrayOperatorIAdd):
+ '''Test case for operator QByteArray += on valid QByteArrays'''
+
+ doc_prefix = 'Valid object'
+ doc_filter = lambda x: x.startswith('test')
+
+ def setUp(self):
+ self.obj = QByteArray(bytes('some byte array', "UTF-8"))
+ self.orig_obj = QByteArray(bytes('some byte array', "UTF-8"))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qbytearray_operator_test.py b/sources/pyside6/tests/QtCore/qbytearray_operator_test.py
new file mode 100644
index 000000000..9303faf39
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qbytearray_operator_test.py
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QByteArray operators'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray
+
+class QByteArrayOperatorEqual(unittest.TestCase):
+ '''TestCase for operator QByteArray == QByteArray'''
+
+ def testDefault(self):
+ #QByteArray() == QByteArray()
+ obj1 = QByteArray()
+ obj2 = QByteArray()
+ self.assertEqual(obj1, obj2)
+
+ def testSimple(self):
+ #QByteArray(some_string) == QByteArray(some_string)
+ string = bytes('egg snakes', "UTF-8")
+ self.assertEqual(QByteArray(string), QByteArray(string))
+
+ def testPyString(self):
+ #QByteArray(string) == string
+ string = bytes('my test string', "UTF-8")
+ self.assertEqual(QByteArray(string), string)
+
+class QByteArrayOperatorAt(unittest.TestCase):
+ '''TestCase for operator QByteArray[]'''
+
+ def testInRange(self):
+ #QByteArray[x] where x is a valid index
+ string = 'abcdefgh'
+ obj = QByteArray(bytes(string, "UTF-8"))
+
+ for i in range(len(string)):
+ self.assertEqual(obj[i], bytes(string[i], "UTF-8"))
+
+ def testInRangeReverse(self):
+ #QByteArray[x] where x is a valid index (reverse order)
+ string = 'abcdefgh'
+ obj = QByteArray(bytes(string, "UTF-8"))
+
+ for i in range(len(string)-1, 0, -1):
+ self.assertEqual(obj[i], bytes(string[i], "UTF-8"))
+
+
+ def testOutOfRange(self):
+ #QByteArray[x] where x is out of index
+ string = bytes('1234567', "UTF-8")
+ obj = QByteArray(string)
+ self.assertRaises(IndexError, lambda :obj[len(string)])
+
+ def testNullStrings(self):
+ ba = QByteArray(bytes('\x00', "UTF-8"))
+ self.assertEqual(ba.at(0), '\x00')
+ self.assertEqual(ba[0], bytes('\x00', "UTF-8"))
+
+class QByteArrayOperatorLen(unittest.TestCase):
+ '''Test case for __len__ operator of QByteArray'''
+
+ def testBasic(self):
+ '''QByteArray __len__'''
+ self.assertEqual(len(QByteArray()), 0)
+ self.assertEqual(len(QByteArray(bytes('', "UTF-8"))), 0)
+ self.assertEqual(len(QByteArray(bytes(' ', "UTF-8"))), 1)
+ self.assertEqual(len(QByteArray(bytes('yabadaba', "UTF-8"))), 8)
+
+
+class QByteArrayOperatorStr(unittest.TestCase):
+ '''Test case for __str__ operator of QByteArray'''
+
+ def testBasic(self):
+ '''QByteArray __str__'''
+ self.assertEqual(QByteArray().__str__(), str(b''))
+ self.assertEqual(QByteArray(bytes('', "UTF-8")).__str__(), str(b''))
+ self.assertEqual(QByteArray(bytes('aaa', "UTF-8")).__str__(), str(b'aaa'))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qbytearray_test.py b/sources/pyside6/tests/QtCore/qbytearray_test.py
new file mode 100644
index 000000000..62c8e6839
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qbytearray_test.py
@@ -0,0 +1,279 @@
+# -*- coding:utf-8 -*-
+# !/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QByteArray'''
+
+import ctypes
+import os
+import pickle
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+
+from PySide6.QtCore import QByteArray, QSettings, QObject, QDataStream, QIODevice
+
+class QByteArrayTestToNumber(unittest.TestCase):
+ def testToNumberInt(self):
+ obj = QByteArray(bytes('37', "UTF8"))
+ self.assertEqual((37, True), obj.toInt())
+
+ def testToNumberUShort(self):
+ obj = QByteArray(bytes('37', "UTF8"))
+ self.assertEqual((37, True), obj.toUShort())
+
+ def testToNumberFloat(self):
+ obj = QByteArray(bytes('37.109', "UTF8"))
+ self.assertEqual((ctypes.c_float(37.109).value, True),
+ obj.toFloat())
+
+ def testToNumberDouble(self):
+ obj = QByteArray(bytes('37.109', "UTF8"))
+ self.assertEqual((ctypes.c_double(37.109).value, True),
+ obj.toDouble())
+
+ def testSetNum(self):
+ b = QByteArray()
+ b.setNum(int(-124124))
+ self.assertEqual(b, "-124124")
+ b = QByteArray()
+ b.setNum(-124124)
+ self.assertEqual(b, "-124124")
+ b = QByteArray()
+ b.setNum(-0.5)
+ self.assertEqual(b, "-0.5")
+
+ def testNumber(self):
+ b = QByteArray.number(int(-124124))
+ self.assertEqual(b, "-124124")
+ b = QByteArray.number(-124124)
+ self.assertEqual(b, "-124124")
+ b = QByteArray.number(-0.5)
+ self.assertEqual(b, "-0.5")
+
+ def testAppend(self):
+ b = QByteArray()
+ b.append(bytes("A", "UTF8"))
+ self.assertEqual(b.size(), 1)
+ b.append(bytes("AB", "UTF8"))
+ self.assertEqual(b.size(), 3)
+
+
+class QByteArraySplit(unittest.TestCase):
+ '''Test case for QByteArray.split'''
+
+ def testPathSeparator(self):
+ #QByteArray.split('/')
+ obj = QByteArray(bytes(unittest.__file__, "UTF8"))
+ self.assertEqual(obj.split('/'), unittest.__file__.split('/'))
+
+class QByteArrayData(unittest.TestCase):
+
+ '''Test case for QByteArray.data'''
+
+ def testData(self):
+ url = QByteArray(bytes("http://pyside.org", "UTF8"))
+ self.assertEqual(url.data(), bytes("http://pyside.org", "UTF8"))
+
+ def testDataWithZeros(self):
+ s1 = bytes("123\000321", "UTF8")
+ ba = QByteArray(s1)
+ s2 = ba.data()
+ self.assertEqual(s1, s2)
+ self.assertEqual(s1, ba)
+
+class QByteArrayOperatorAtSetter(unittest.TestCase):
+ '''Test case for operator QByteArray[] - __setitem__'''
+
+ def testSetterString(self):
+ '''QByteArray[x] = pythonstring'''
+ obj = QByteArray(bytes('123456', "UTF8"))
+ obj[1] = bytes('0', "UTF8")
+ self.assertEqual(obj, QByteArray(bytes('103456', "UTF8")))
+
+class QByteArrayOnQDataStream(unittest.TestCase):
+ '''
+ Bug PYSIDE-232
+ '''
+ def testIt(self):
+ a = QByteArray()
+ b = QDataStream(a, QIODevice.WriteOnly)
+ b.writeUInt16(5000)
+ # The __repr__ not suppose to crash anymore
+ self.assertNotEqual(repr(b), None)
+
+class TestBug664(unittest.TestCase):
+ '''
+ QByteArray.data() should return correct data
+ '''
+ def testIt(self):
+ a = QByteArray(bytes('hi 猫', "UTF-8"))
+ self.assertEqual(repr(a), "PySide6.QtCore.QByteArray(b'hi \\xe7\\x8c\\xab')")
+
+
+class QByteArrayOnQVariant(unittest.TestCase):
+ def testQByteArrayOnQVariant(self):
+ a = QSettings().value("some_prop", QByteArray())
+ self.assertEqual(type(a), QByteArray)
+
+class TestBug567(unittest.TestCase):
+ '''
+ QByteArray should support slices
+ '''
+ def testIt(self):
+ ba = QByteArray(bytes('1234567890', "UTF8"))
+ self.assertEqual(ba[2:4], '34')
+ self.assertEqual(ba[:4], '1234')
+ self.assertEqual(ba[4:], '567890')
+ self.assertEqual(len(ba[4:1]), 0)
+ self.assertEqual(ba[::-1], '0987654321')
+ self.assertEqual(ba[::2], '13579')
+ self.assertEqual(ba[::-2], '08642')
+ self.assertEqual(ba[2:8:3], '36')
+
+
+class TestPickler(unittest.TestCase):
+ def testIt(self):
+ ba = QByteArray(bytes("321\x00123", "UTF8"))
+ output = pickle.dumps(str(ba))
+ ba2 = pickle.loads(output)
+ self.assertEqual(str(ba), str(ba2))
+
+class QByteArrayBug720(unittest.TestCase):
+ def testIt(self):
+ ba = QByteArray(bytes("32\"1\x00123", "UTF8"))
+ self.assertEqual(str(ba), str(bytes("32\"1\x00123", "UTF-8")))
+ self.assertEqual(repr(ba), "PySide6.QtCore.QByteArray(b'32\"1\\x00123')")
+
+class QByteArrayImplicitConvert(unittest.TestCase):
+ def testString(self):
+ # No implicit conversions from QByteArray to python string
+ ba = QByteArray(bytes("object name", "UTF8"))
+ obj = QObject()
+ self.assertRaises(TypeError, obj.setObjectName, ba)
+
+
+class QByteArraySliceAssignment(unittest.TestCase):
+ def testIndexAssignment(self):
+ a = QByteArray(bytes('abc', "UTF8"))
+ a[0] = bytes('x', "UTF8")
+ self.assertEqual(a[0], bytes('x', "UTF8"))
+
+ def test_1():
+ a[0] = bytes('xy', "UTF8")
+ self.assertRaises(ValueError, test_1)
+
+ def testSliceAssignmentBytes(self):
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ b[2:8] = bytes('abcdef', "UTF8")
+ self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
+ # Delete behavior
+ b[2:8] = None
+ self.assertEqual(b, bytes('0189', "UTF8"))
+
+ # number of slots and number of values doesn't match
+ def test_2():
+ b[2:8:2] = bytes('', "UTF8")
+ self.assertRaises(ValueError, test_2)
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ # reverse slice
+ b[5:2:-1] = bytes('ABC', "UTF8")
+ self.assertEqual(b, bytes('012CBA6789', "UTF8"))
+ # step is not 1
+ b[2:9:3] = bytes('XYZ', "UTF8")
+ self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ b[9:2:-3] = bytes('XYZ', "UTF8")
+ self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
+
+ def testSliceAssignmentQByteArray(self):
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ b[2:8] = QByteArray(bytes('abcdef', "UTF8"))
+ self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
+ # shrink
+ b[2:8] = QByteArray(bytes('aaa', "UTF8"))
+ self.assertEqual(b, bytes('01aaa89', "UTF8"))
+ # expanse
+ b[2:5] = QByteArray(bytes('uvwxyz', "UTF8"))
+ self.assertEqual(b, bytes('01uvwxyz89', "UTF8"))
+ # Delete behavior
+ b[2:8] = QByteArray()
+ self.assertEqual(b, bytes('0189', "UTF8"))
+
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ # reverse assginment
+ b[5:2:-1] = QByteArray(bytes('ABC', "UTF8"))
+ self.assertEqual(b, bytes('012CBA6789', "UTF8"))
+ # step is not 1
+ b[2:9:3] = QByteArray(bytes('XYZ', "UTF8"))
+ self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ b[9:2:-3] = QByteArray(bytes('XYZ', "UTF8"))
+ self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
+
+ def testSliceAssignmentByteArray(self):
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ # replace
+ b[2:8] = bytearray(bytes('abcdef', "UTF8"))
+ self.assertEqual(b[2:8], bytes('abcdef', "UTF8"))
+ # shrink
+ b[2:8] = bytearray(bytes('aaa', "UTF8"))
+ self.assertEqual(b, bytes('01aaa89', "UTF8"))
+ # expanse
+ b[2:5] = bytearray(bytes('uvwxyz', "UTF8"))
+ self.assertEqual(b, bytes('01uvwxyz89', "UTF8"))
+ # Delete behavior
+ b[2:8] = bytearray(bytes('', "UTF8"))
+ self.assertEqual(b, bytes('0189', "UTF8"))
+
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ # reverse assginment
+ b[5:2:-1] = bytearray(bytes('ABC', "UTF8"))
+ self.assertEqual(b, bytes('012CBA6789', "UTF8"))
+ # step is not 1
+ b[2:9:3] = bytearray(bytes('XYZ', "UTF8"))
+ self.assertEqual(b, bytes('01XCBY67Z9', "UTF8"))
+ b = QByteArray(bytes('0123456789', "UTF8"))
+ b[9:2:-3] = bytearray(bytes('XYZ', "UTF8"))
+ self.assertEqual(b, bytes('012Z45Y78X', "UTF8"))
+
+ def testBufferProtocol(self):
+ orig_bytes = bytes('0123456789', "UTF8")
+ byte_array = QByteArray(orig_bytes)
+ actual_bytes = bytes(byte_array)
+ self.assertEqual(orig_bytes, actual_bytes)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qcalendar_test.py b/sources/pyside6/tests/QtCore/qcalendar_test.py
new file mode 100644
index 000000000..e589e7973
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcalendar_test.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QCalendar (5.14)'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCalendar
+
+class TestQCalendar (unittest.TestCase):
+ def testCalendar(self):
+ calendar = QCalendar(QCalendar.System.Gregorian)
+ self.assertTrue(calendar.isGregorian())
+ self.assertEqual(calendar.name(), 'Gregorian')
+ self.assertFalse(calendar.hasYearZero())
+ self.assertEqual(calendar.monthsInYear(2019), 12)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qcbor_test.py b/sources/pyside6/tests/QtCore/qcbor_test.py
new file mode 100644
index 000000000..aa54eb231
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcbor_test.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QCbor'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import (QByteArray, QCborStreamReader, QCborStreamWriter,
+ QCborValue)
+
+class TestCbor(unittest.TestCase):
+ def testReader(self):
+ ba = QByteArray()
+ writer = QCborStreamWriter(ba)
+ writer.append(42)
+ del writer
+ self.assertTrue(not ba.isEmpty())
+ reader = QCborStreamReader(ba)
+ self.assertTrue(reader.hasNext())
+ value = reader.toInteger()
+ self.assertEqual(value, 42)
+
+ def testReader(self):
+ ba = QByteArray()
+ writer = QCborStreamWriter(ba)
+ writer.append("hello")
+ del writer
+ self.assertTrue(not ba.isEmpty())
+ reader = QCborStreamReader(ba)
+ self.assertTrue(reader.hasNext())
+ if (reader.isByteArray()): # Python 2
+ value = reader.readByteArray()
+ self.assertTrue(value)
+ self.assertEqual(value.data, "hello")
+ else:
+ self.assertTrue(reader.isString())
+ value = reader.readString()
+ self.assertTrue(value)
+ self.assertEqual(value.data, "hello")
+
+ def testValue(self):
+ value = QCborValue('hello')
+ self.assertTrue(value.isString())
+ self.assertEqual(value.toString(), 'hello')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qcollator_test.py b/sources/pyside6/tests/QtCore/qcollator_test.py
new file mode 100644
index 000000000..53fdf2549
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcollator_test.py
@@ -0,0 +1,66 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QCollator'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class QCollatorTest(unittest.TestCase):
+ def testState(self):
+ c = QCollator()
+ c.setCaseSensitivity(Qt.CaseInsensitive)
+ c.setLocale(QLocale.German)
+
+ print("compare a and b:", c.compare("a", "b"))
+
+ self.assertEqual(c.caseSensitivity(), Qt.CaseInsensitive)
+ self.assertEqual(c.locale(), QLocale(QLocale.German))
+
+ c.setLocale(QLocale.French)
+ c.setNumericMode(True)
+ c.setIgnorePunctuation(True)
+ c.setLocale(QLocale.Norwegian)
+
+ self.assertEqual(c.caseSensitivity(), Qt.CaseInsensitive)
+ self.assertEqual(c.numericMode(), True)
+ self.assertEqual(c.ignorePunctuation(), True)
+ self.assertEqual(c.locale(), QLocale(QLocale.Norwegian))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qcommandlineparser_test.py b/sources/pyside6/tests/QtCore/qcommandlineparser_test.py
new file mode 100644
index 000000000..8dbdb7bfe
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcommandlineparser_test.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QCommandLineParser and QCommandLineOption'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class QCommandLineParserTest(unittest.TestCase):
+ def testParser(self):
+ app = QCoreApplication([])
+
+ parser1 = QCommandLineParser()
+ self.assertEqual(parser1.parse(["QtCore_qcommandlineparser_test", "file.txt"]), True)
+ self.assertEqual(parser1.positionalArguments(), ["file.txt"])
+
+ parser2 = QCommandLineParser()
+ self.assertEqual(parser2.addOption(QCommandLineOption("b")), True)
+ self.assertEqual(parser2.parse(["QtCore_qcommandlineparser_test", "-b"]), True)
+ self.assertEqual(parser2.optionNames(), ["b"])
+ self.assertEqual(parser2.isSet("b"), True)
+ self.assertEqual(parser2.values("b"), [])
+ self.assertEqual(parser2.positionalArguments(), [])
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qcoreapplication_instance_test.py b/sources/pyside6/tests/QtCore/qcoreapplication_instance_test.py
new file mode 100644
index 000000000..a9ae44857
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcoreapplication_instance_test.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QCoreApplication.instance static method'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication
+
+class QCoreApplicationInstanceTest(unittest.TestCase):
+ '''Test cases for QCoreApplication.instance static method'''
+
+ def testQCoreApplicationInstance(self):
+ #Tests QCoreApplication.instance()
+ self.assertEqual(QCoreApplication.instance(), None)
+ app = QCoreApplication([])
+ self.assertEqual(QCoreApplication.instance(), app)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qcoreapplication_test.py b/sources/pyside6/tests/QtCore/qcoreapplication_test.py
new file mode 100644
index 000000000..014b60ce0
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qcoreapplication_test.py
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication
+
+class TestQCoreApplication(unittest.TestCase):
+ def testNoArguments(self):
+ app = QCoreApplication()
+ self.assertIsInstance(app, QCoreApplication)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qdatastream_test.py b/sources/pyside6/tests/QtCore/qdatastream_test.py
new file mode 100644
index 000000000..32af56499
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qdatastream_test.py
@@ -0,0 +1,324 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QDataStream'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QBitArray, QByteArray, QIODevice, QDataStream, QDate, QTime, QDateTime
+
+def create_bitarray(string):
+ array = QBitArray(len(string))
+ for i, char in enumerate(string):
+ array.setBit(i, char != '0')
+ return array
+
+
+def serialize_bitarray(bit_array):
+ buffer = QByteArray()
+ stream = QDataStream(buffer, QIODevice.WriteOnly)
+ stream << bit_array
+ return buffer
+
+
+class QDataStreamWrite(unittest.TestCase):
+ '''Test case for QDatastream write* functions'''
+
+ def setUp(self):
+ self.ba = QByteArray()
+ self.read = QDataStream(self.ba, QIODevice.ReadOnly)
+ self.write = QDataStream(self.ba, QIODevice.WriteOnly)
+
+ def testWriteUInt8(self):
+ '''QDataStream.writeUInt8 (accepting str of size 1)'''
+ x = 0xFF
+ self.write.writeUInt8(x)
+ y = self.read.readUInt8()
+ self.assertEqual(x, y)
+
+ self.assertRaises(TypeError, self.write.writeUInt8, 'aaaaa')
+
+ def testWriteInt8(self):
+ '''QDataStream.writeInt8 (accepting str of size 1)'''
+ x = 65
+ self.write.writeInt8(chr(x))
+ y = self.read.readInt8()
+ self.assertEqual(x, y)
+
+ self.assertRaises(TypeError, self.write.writeInt8, 'aaaaa')
+
+ def testWriteUInt8Int(self):
+ '''QDataStream.writeUInt8 (accepting integer)'''
+ x = 0xFF
+ self.write.writeUInt8(x)
+ y = self.read.readUInt8()
+ self.assertEqual(x, y)
+
+ def testWriteInt8Int(self):
+ '''QDataStream.writeInt8 (accepting integer)'''
+ x = 65
+ self.write.writeInt8(x)
+ y = self.read.readInt8()
+ self.assertEqual(x, y)
+
+ def testWriteUInt16(self):
+ '''QDataStream.writeUInt16'''
+ x = 0x4423
+ self.write.writeUInt16(x)
+ y = int(self.read.readUInt16())
+ self.assertEqual(x, y)
+
+ def testWriteUInt32(self):
+ '''QDataStream.writeUInt32'''
+ x = 0xdeadbeef
+ self.write.writeUInt32(x)
+ y = int(self.read.readUInt32())
+ self.assertEqual(x, y)
+
+class QDataStreamShift(unittest.TestCase):
+ '''Test case for << and >> operators'''
+
+ def setUp(self):
+ self.ba = QByteArray()
+ self.stream = QDataStream(self.ba, QIODevice.WriteOnly)
+ self.read_stream = QDataStream(self.ba, QIODevice.ReadOnly)
+
+ def testQCharValid(self):
+ '''QDataStream <<>> QChar - valid'''
+ self.stream.writeQChar(42)
+
+ res = self.read_stream.readQChar()
+ self.assertEqual(res, chr(42))
+
+ def testQCharNull(self):
+ '''QDataStream <<>> QChar - null'''
+ self.stream.writeQChar(None)
+
+ res = self.read_stream.readQChar()
+ self.assertEqual(res, '\x00')
+
+ def testQByteArrayValid(self):
+ '''QDataStream <<>> QByteArray - valid'''
+ self.stream << QByteArray(bytes("hello", "UTF-8"))
+
+ res = QByteArray()
+
+ self.read_stream >> res
+ self.assertEqual(res, QByteArray(bytes("hello", "UTF-8")))
+
+ def testQByteArrayEmpty(self):
+ '''QDataStream <<>> QByteArray - empty'''
+ self.stream << QByteArray(bytes("", "UTF-8"))
+
+ res = QByteArray()
+
+ self.read_stream >> res
+ self.assertEqual(res, QByteArray(bytes("", "UTF-8")))
+ self.assertTrue(res.isEmpty())
+ self.assertFalse(res.isNull())
+
+ def testQByteArrayNull(self):
+ '''QDataStream <<>> QByteArray - null'''
+ self.stream << QByteArray()
+
+ res = QByteArray()
+
+ self.read_stream >> res
+ self.assertEqual(res, QByteArray())
+ self.assertTrue(res.isEmpty())
+ self.assertTrue(res.isNull())
+
+ def testQStringValid(self):
+ '''QDataStream <<>> QString - valid'''
+ self.stream.writeQString('Ka-boom')
+
+ res = self.read_stream.readQString()
+ self.assertEqual(res, 'Ka-boom')
+
+ def testQStringEmpty(self):
+ '''QDataStream <<>> QString - empty'''
+ self.stream.writeQString('')
+
+ res = self.read_stream.readQString()
+ self.assertEqual(res, '')
+
+ def testQStringNull(self):
+ '''QDataStream <<>> QString - null'''
+ self.stream.writeQString(None)
+
+ res = self.read_stream.readQString()
+ self.assertEqual(res, '')
+
+ def testQBitArrayNull(self):
+ '''QDataStream <<>> QBitArray - null'''
+ self.stream << QBitArray()
+
+ res = QBitArray()
+
+ self.read_stream >> res
+ self.assertEqual(res, QBitArray())
+
+ def testQBitArrayValid(self):
+ '''QDataStream <<>> QBitArray - valid'''
+ self.stream << create_bitarray('01010101')
+
+ res = QBitArray()
+
+ self.read_stream >> res
+ self.assertEqual(res, create_bitarray('01010101'))
+
+ def testQDateNull(self):
+ '''QDataStream <<>> QDate - null'''
+ self.stream << QDate()
+
+ res = QDate()
+
+ self.read_stream >> res
+ self.assertEqual(res, QDate())
+ self.assertFalse(res.isValid())
+ self.assertTrue(res.isNull())
+
+ def testQDateValid(self):
+ '''QDataStream <<>> QDate - valid'''
+ self.stream << QDate(2012, 12, 21)
+
+ res = QDate()
+
+ self.read_stream >> res
+ self.assertEqual(res, QDate(2012, 12, 21))
+ self.assertTrue(res.isValid())
+ self.assertFalse(res.isNull())
+
+
+ def testQTimeNull(self):
+ '''QDataStream <<>> QTime - null'''
+ self.stream << QTime()
+
+ res = QTime()
+
+ self.read_stream >> res
+ self.assertEqual(res, QTime())
+ self.assertFalse(res.isValid())
+ self.assertTrue(res.isNull())
+
+ def testQTimeValid(self):
+ '''QDataStream <<>> QTime - valid'''
+ self.stream << QTime(12, 12, 21)
+
+ res = QTime()
+
+ self.read_stream >> res
+ self.assertEqual(res, QTime(12, 12, 21))
+ self.assertTrue(res.isValid())
+ self.assertFalse(res.isNull())
+
+ def testQDateTimeNull(self):
+ '''QDataStream <<>> QDateTime - null'''
+
+ self.stream << QDateTime()
+
+ res = QDateTime()
+
+ self.read_stream >> res
+ self.assertEqual(res, QDateTime())
+ self.assertFalse(res.isValid())
+ self.assertTrue(res.isNull())
+
+ def testQDateTimeValid(self):
+ '''QDataStream <<>> QDateTime - valid'''
+ time = QTime(23, 23, 23)
+ date = QDate(2009, 1, 1)
+
+ self.stream << QDateTime(date, time)
+
+ res = QDateTime()
+
+ self.read_stream >> res
+ self.assertEqual(res, QDateTime(date, time))
+ self.assertTrue(res.isValid())
+ self.assertFalse(res.isNull())
+
+
+class QDataStreamShiftBitArray(unittest.TestCase):
+
+ def _check_bitarray(self, data_set):
+ '''Check the >> operator for the given data set'''
+
+ for data, expectedStatus, expectedString in data_set:
+ stream = QDataStream(data, QIODevice.ReadOnly)
+ string = QBitArray()
+ stream >> string
+
+ self.assertEqual(stream.status(), expectedStatus)
+ self.assertEqual(string.size(), expectedString.size())
+ self.assertEqual(string, expectedString)
+
+ def testOk(self):
+ '''QDataStream with valid QBitArray'''
+ test_set = [QBitArray()]
+ for i in range(1, 7):
+ test_set.append(create_bitarray(i * '1'))
+ for s in ['0111111', '0000000', '1001110']:
+ test_set.append(create_bitarray(s))
+
+ data = []
+ for expected in test_set:
+ data.append((serialize_bitarray(expected), QDataStream.Ok, expected))
+ self._check_bitarray(data)
+
+ def testPastEnd(self):
+ '''QDataStream >> QBitArray reading past the end of the data'''
+ serialized = serialize_bitarray(create_bitarray('1001110'))
+ serialized.resize(serialized.size() - 2)
+ self._check_bitarray([(serialized, QDataStream.ReadPastEnd, QBitArray())])
+
+
+class QDataStreamRawData(unittest.TestCase):
+ def testRawData(self):
+ data = QDataStream()
+ self.assertEqual(data.readRawData(4), None)
+
+ ba = QByteArray()
+ data = QDataStream(ba, QIODevice.WriteOnly)
+ data.writeRawData('AB\x00C')
+ self.assertEqual(ba.data(), bytes('AB\x00C', "UTF-8"))
+
+ data = QDataStream(ba)
+ self.assertEqual(data.readRawData(4), bytes('AB\x00C', "UTF-8"))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qdate_test.py b/sources/pyside6/tests/QtCore/qdate_test.py
new file mode 100644
index 000000000..bf8ca16b1
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qdate_test.py
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QDate'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class TestQDate (unittest.TestCase):
+ def testGetDate(self):
+ date = QDate(2009, 22, 9)
+ tuple_ = date.getDate()
+ self.assertEqual(tuple, tuple_.__class__)
+ (y, m, d) = tuple_
+ self.assertEqual(date.year(), y)
+ self.assertEqual(date.month(), m)
+ self.assertEqual(date.day(), d)
+
+ def testGetWeekNumber(self):
+ date = QDate(2000, 1, 1)
+ tuple_ = date.weekNumber()
+ self.assertEqual(tuple, tuple_.__class__)
+ (week, yearNumber) = tuple_
+ self.assertEqual(week, 52)
+ self.assertEqual(yearNumber, 1999)
+
+ def testBooleanCast(self):
+ today = QDate.currentDate()
+ self.assertTrue(today)
+ nodate = QDate()
+ self.assertFalse(nodate)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qdatetime_test.py b/sources/pyside6/tests/QtCore/qdatetime_test.py
new file mode 100644
index 000000000..4f4bd3728
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qdatetime_test.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import datetime
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QDateTime, QDate, QTime
+
+class TestQDate (unittest.TestCase):
+ def testDateConversion(self):
+ dateTime = QDateTime(QDate(2011, 5, 17), QTime(11, 1, 14, 15))
+ dateTimePy = QDateTime(datetime.date(2011, 5, 17), datetime.time(11, 1, 14, 15000))
+ self.assertEqual(dateTime, dateTimePy)
+
+ def testDateTimeConversion(self):
+ dateTime = QDateTime(QDate(2011, 5, 17), QTime(11, 1, 14, 15))
+ dateTimePy = QDateTime(datetime.datetime(2011, 5, 17, 11, 1, 14, 15000))
+ self.assertEqual(dateTime, dateTimePy)
+
+ def testDateTimeNow(self):
+ py = datetime.datetime.now()
+ qt = QDateTime(py)
+ self.assertEqual(qt, py)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qeasingcurve_test.py b/sources/pyside6/tests/QtCore/qeasingcurve_test.py
new file mode 100644
index 000000000..b27489c30
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qeasingcurve_test.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QEasingCurve
+
+def myFunction(progress):
+ if progress == 1.0:
+ return 100.0
+ else:
+ return -100.0
+
+class TestQEasingCurve(unittest.TestCase):
+ def testCustomType(self):
+ ec = QEasingCurve()
+ ec.setCustomType(myFunction)
+ self.assertEqual(ec.valueForProgress(1.0), 100.0)
+ self.assertEqual(ec.valueForProgress(0.5), -100.0)
+
+ def testObjectCleanup(self):
+ for i in range(100):
+ ec = QEasingCurve()
+ ec.setCustomType(myFunction)
+ self.assertEqual(ec.valueForProgress(1.0), 100.0)
+ self.assertEqual(ec.valueForProgress(0.5), -100.0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qenum_test.py b/sources/pyside6/tests/QtCore/qenum_test.py
new file mode 100644
index 000000000..546e023c8
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qenum_test.py
@@ -0,0 +1,243 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QEnum and QFlags'''
+
+import gc
+import os
+import sys
+import pickle
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QIODevice, QObject, QEnum, QFlag
+
+
+class TestEnum(unittest.TestCase):
+
+ def testToInt(self):
+ self.assertEqual(QIODevice.NotOpen, 0)
+ self.assertEqual(QIODevice.ReadOnly, 1)
+ self.assertEqual(QIODevice.WriteOnly, 2)
+ self.assertEqual(QIODevice.ReadWrite, 1 | 2)
+ self.assertEqual(QIODevice.Append, 4)
+ self.assertEqual(QIODevice.Truncate, 8)
+ self.assertEqual(QIODevice.Text, 16)
+ self.assertEqual(QIODevice.Unbuffered, 32)
+
+ def testToIntInFunction(self):
+ self.assertEqual(str(int(QIODevice.WriteOnly)), "2")
+
+ def testOperations(self):
+ k = Qt.Key.Key_1
+
+ # Integers
+ self.assertEqual(k + 2, 2 + k)
+ self.assertEqual(k - 2, -(2 - k))
+ self.assertEqual(k * 2, 2 * k)
+
+ # Floats
+ with self.assertRaises(TypeError):
+ a = k + 2.0
+
+ with self.assertRaises(TypeError):
+ a = k - 2.0
+
+ with self.assertRaises(TypeError):
+ a = k * 2.0
+
+ @unittest.skipUnless(getattr(sys, "getobjects", None), "requires --with-trace-refs")
+ @unittest.skipUnless(getattr(sys, "gettotalrefcount", None), "requires --with-pydebug")
+ def testEnumNew_NoLeak(self):
+ gc.collect()
+ total = sys.gettotalrefcount()
+ for idx in range(1000):
+ ret = Qt.Key(42)
+
+ gc.collect()
+ delta = sys.gettotalrefcount() - total
+ print("delta total refcount =", delta)
+ if abs(delta) >= 10:
+ all = [(sys.getrefcount(x), x) for x in sys.getobjects(0)]
+ all.sort(key=lambda x: x[0], reverse=True)
+ for ob in all[:10]:
+ print(ob)
+ self.assertTrue(abs(delta) < 10)
+
+
+class TestQFlags(unittest.TestCase):
+ def testToItn(self):
+ om = QIODevice.NotOpen
+
+ self.assertEqual(om, QIODevice.NotOpen)
+ self.assertTrue(om == 0)
+
+ self.assertTrue(om != QIODevice.ReadOnly)
+ self.assertTrue(om != 1)
+
+ def testToIntInFunction(self):
+ om = QIODevice.WriteOnly
+ self.assertEqual(int(om), 2)
+
+ def testNonExtensibleEnums(self):
+ try:
+ om = QIODevice.OpenMode(QIODevice.WriteOnly)
+ self.assertFail()
+ except:
+ pass
+
+
+# PYSIDE-15: Pickling of enums
+class TestEnumPickling(unittest.TestCase):
+ def testPickleEnum(self):
+
+ # Pickling of enums with different depth works.
+ ret = pickle.loads(pickle.dumps(QIODevice.Append))
+ self.assertEqual(ret, QIODevice.Append)
+
+ ret = pickle.loads(pickle.dumps(Qt.Key.Key_Asterisk))
+ self.assertEqual(ret, Qt.Key.Key_Asterisk)
+ self.assertEqual(ret, Qt.Key(42))
+
+ # We can also pickle the whole enum class (built in):
+ ret = pickle.loads(pickle.dumps(QIODevice))
+
+ # This works also with nested classes for Python 3, after we
+ # introduced the correct __qualname__ attribute.
+
+ # Note: For Python 2, we would need quite strange patches.
+ func = lambda: pickle.loads(pickle.dumps(Qt.Key))
+ func()
+
+# PYSIDE-957: The QEnum macro
+
+try:
+ import enum
+ HAVE_ENUM = True
+except ImportError:
+ HAVE_ENUM = False
+ QEnum = QFlag = lambda x: x
+ import types
+ class Enum: pass
+ enum = types.ModuleType("enum")
+ enum.Enum = enum.Flag = enum.IntEnum = enum.IntFlag = Enum
+ Enum.__module__ = "enum"
+ Enum.__members__ = {}
+ del Enum
+ enum.auto = lambda: 42
+
+HAVE_FLAG = hasattr(enum, "Flag")
+
+@QEnum
+class OuterEnum(enum.Enum):
+ A = 1
+ B = 2
+
+class SomeClass(QObject):
+
+ @QEnum
+ class SomeEnum(enum.Enum):
+ A = 1
+ B = 2
+ C = 3
+
+ @QEnum
+ class OtherEnum(enum.IntEnum):
+ A = 1
+ B = 2
+ C = 3
+
+ class InnerClass(QObject):
+
+ @QEnum
+ class InnerEnum(enum.Enum):
+ X = 42
+
+ class SomeEnum(enum.Enum):
+ A = 4
+ B = 5
+ C = 6
+
+ QEnum(SomeEnum) # works even without the decorator assignment
+
+
+@unittest.skipUnless(HAVE_ENUM, "requires 'enum' module (use 'pip install enum34' for Python 2)")
+class TestQEnumMacro(unittest.TestCase):
+ def testTopLevel(self):
+ self.assertEqual(type(OuterEnum).__module__, "enum")
+ self.assertEqual(type(OuterEnum).__name__, "EnumMeta")
+ self.assertEqual(len(OuterEnum.__members__), 2)
+
+ def testSomeClass(self):
+ self.assertEqual(type(SomeClass.SomeEnum).__module__, "enum")
+ self.assertEqual(type(SomeClass.SomeEnum).__name__, "EnumMeta")
+ self.assertEqual(len(SomeClass.SomeEnum.__members__), 3)
+ with self.assertRaises(TypeError):
+ int(SomeClass.SomeEnum.C) == 6
+ self.assertEqual(SomeClass.OtherEnum.C, 3)
+
+ @unittest.skipIf(sys.version_info[0] < 3, "we cannot support nested classes in Python 2")
+ def testInnerClass(self):
+ self.assertEqual(SomeClass.InnerClass.InnerEnum.__qualname__,
+ "SomeClass.InnerClass.InnerEnum")
+ with self.assertRaises(TypeError):
+ int(SomeClass.InnerClass.InnerEnum.X) == 42
+
+ @unittest.skipUnless(HAVE_FLAG, "some older Python versions have no 'Flag'")
+ def testEnumFlag(self):
+ with self.assertRaises(TypeError):
+ class WrongFlagForEnum(QObject):
+ @QEnum
+ class Bad(enum.Flag):
+ pass
+ with self.assertRaises(TypeError):
+ class WrongEnuForFlag(QObject):
+ @QFlag
+ class Bad(enum.Enum):
+ pass
+
+ def testIsRegistered(self):
+ mo = SomeClass.staticMetaObject
+ self.assertEqual(mo.enumeratorCount(), 2)
+ self.assertEqual(mo.enumerator(0).name(), "OtherEnum")
+ self.assertEqual(mo.enumerator(0).scope(), "SomeClass")
+ self.assertEqual(mo.enumerator(1).name(), "SomeEnum")
+ moi = SomeClass.InnerClass.staticMetaObject
+ self.assertEqual(moi.enumerator(0).name(), "InnerEnum")
+ ## Question: Should that scope not better be "SomeClass.InnerClass"?
+ ## But we have __qualname__ already:
+ self.assertEqual(moi.enumerator(0).scope(), "InnerClass")
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qevent_test.py b/sources/pyside6/tests/QtCore/qevent_test.py
new file mode 100644
index 000000000..cdf8881c8
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qevent_test.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QtCore.QEvent'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QEvent
+
+class QEventTypeFlag(unittest.TestCase):
+ '''Test case for usage of QEvent.Type flags'''
+
+ def testFlagAccess(self):
+ #QEvent.Type flags usage
+
+ event = QEvent(QEvent.Timer)
+ self.assertEqual(event.type(), QEvent.Timer)
+
+ event = QEvent(QEvent.Close)
+ self.assertEqual(event.type(), QEvent.Close)
+
+ event = QEvent(QEvent.IconTextChange)
+ self.assertEqual(event.type(), QEvent.IconTextChange)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qfile_test.py b/sources/pyside6/tests/QtCore/qfile_test.py
new file mode 100644
index 000000000..a2885ffe6
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qfile_test.py
@@ -0,0 +1,87 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import tempfile
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QDir, QFile, QIODevice, QSaveFile, QTemporaryDir
+
+class GetCharTest(unittest.TestCase):
+ '''Test case for QIODevice.getChar in QFile'''
+
+ def setUp(self):
+ '''Acquire resources'''
+ handle, self.filename = tempfile.mkstemp()
+ os.write(handle, bytes('a', "UTF-8"))
+ os.close(handle)
+
+ def tearDown(self):
+ '''release resources'''
+ os.remove(self.filename)
+
+ def testBasic(self):
+ '''QFile.getChar'''
+ obj = QFile(self.filename)
+ obj.open(QIODevice.ReadOnly)
+ try:
+ self.assertEqual(obj.getChar(), (True, 'a'))
+ self.assertFalse(obj.getChar()[0])
+ finally:
+ obj.close()
+
+ def testBug721(self):
+ obj = QFile(self.filename)
+ obj.open(QIODevice.ReadOnly)
+ try:
+ memory = obj.map(0, 1)
+ self.assertEqual(len(memory), 1)
+ self.assertEqual(memory[0], ord('a'))
+ # now memory points to wild bytes... :-)
+ # uncommenting this must cause a segfault.
+ # self.assertEqual(memory[0], 'a')
+ finally:
+ obj.unmap(memory)
+ obj.close()
+
+ def testQSaveFile(self):
+ dir = QTemporaryDir(QDir.tempPath() + "/XXXXXX.dir")
+ self.assertTrue(dir.isValid())
+ saveFile = QSaveFile(dir.path() + "/test.dat")
+ self.assertTrue(saveFile.open(QIODevice.WriteOnly))
+ saveFile.write(bytes("Test", "UTF-8"))
+ self.assertTrue(saveFile.commit())
+ self.assertTrue(os.path.exists(QDir.toNativeSeparators(saveFile.fileName())))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qfileinfo_test.py b/sources/pyside6/tests/QtCore/qfileinfo_test.py
new file mode 100644
index 000000000..756366e5d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qfileinfo_test.py
@@ -0,0 +1,48 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import tempfile
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QFile, QFileInfo
+
+class QFileConstructor(unittest.TestCase):
+ '''QFileInfo constructor with qfile'''
+
+ def testBasic(self):
+ '''QFileInfo(QFile)'''
+ obj = QFileInfo(QFile())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qfileread_test.py b/sources/pyside6/tests/QtCore/qfileread_test.py
new file mode 100644
index 000000000..04037b0cf
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qfileread_test.py
@@ -0,0 +1,87 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QIODevice, QTemporaryFile
+
+
+class FileChild1(QTemporaryFile):
+ pass
+
+class FileChild2(QTemporaryFile):
+ def readData(self, maxlen):
+ return super(FileChild2, self).readData(maxlen)
+ def readLineData(self, maxlen):
+ return super(FileChild2, self).readLineData(maxlen)
+
+class readDataTest(unittest.TestCase):
+ '''Test case for readData and readLineData'''
+
+ def setUp(self):
+ '''Acquire resources'''
+ self.filename1 = FileChild1()
+ self.assertTrue(self.filename1.open())
+ self.filename1.write(bytes('Test text for testing', "UTF-8"))
+
+ self.filename2 = FileChild2()
+ self.assertTrue(self.filename2.open())
+ self.filename2.write(bytes('Test text for testing', "UTF-8"))
+
+ def tearDown(self):
+ '''release resources'''
+ pass
+
+ def testBasic(self):
+ '''QTemporaryFile.read'''
+ self.filename1.seek(0)
+ s1 = self.filename1.read(50)
+ self.assertEqual(s1, 'Test text for testing')
+
+
+ def testBug40(self):
+ self.filename2.seek(0)
+ s2 = self.filename2.read(50)
+ self.assertEqual(s2, 'Test text for testing')
+
+ self.filename2.seek(0)
+ s2 = self.filename2.readLine(22)
+ self.assertEqual(s2, 'Test text for testing')
+
+ self.filename1.seek(0)
+ s1 = self.filename1.read(50)
+ self.assertEqual(s1, s2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qflags_test.py b/sources/pyside6/tests/QtCore/qflags_test.py
new file mode 100644
index 000000000..68d467265
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qflags_test.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QFlags'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QTemporaryFile, QFile, QIODevice, QObject
+
+class QFlagTest(unittest.TestCase):
+ '''Test case for usage of flags'''
+
+ def testCallFunction(self):
+ f = QTemporaryFile()
+ self.assertTrue(f.open())
+ fileName = f.fileName()
+ f.close()
+
+ f = QFile(fileName)
+ self.assertEqual(f.open(QIODevice.Truncate | QIODevice.Text | QIODevice.ReadWrite), True)
+ om = f.openMode()
+ self.assertEqual(om & QIODevice.Truncate, QIODevice.Truncate)
+ self.assertEqual(om & QIODevice.Text, QIODevice.Text)
+ self.assertEqual(om & QIODevice.ReadWrite, QIODevice.ReadWrite)
+ self.assertTrue(om == QIODevice.Truncate | QIODevice.Text | QIODevice.ReadWrite)
+ f.close()
+
+
+class QFlagOperatorTest(unittest.TestCase):
+ '''Test case for operators in QFlags'''
+
+ def testInvert(self):
+ '''QFlags ~ (invert) operator'''
+ self.assertEqual(type(~QIODevice.ReadOnly), QIODevice.OpenMode)
+
+ def testOr(self):
+ '''QFlags | (or) operator'''
+ self.assertEqual(type(QIODevice.ReadOnly | QIODevice.WriteOnly), QIODevice.OpenMode)
+
+ def testAnd(self):
+ '''QFlags & (and) operator'''
+ self.assertEqual(type(QIODevice.ReadOnly & QIODevice.WriteOnly), QIODevice.OpenMode)
+
+ def testIOr(self):
+ '''QFlags |= (ior) operator'''
+ flag = Qt.WindowFlags()
+ self.assertTrue(Qt.Widget == 0)
+ self.assertFalse(flag & Qt.Widget)
+ result = flag & Qt.Widget
+ self.assertTrue(result == 0)
+ flag |= Qt.WindowMinimizeButtonHint
+ self.assertTrue(flag & Qt.WindowMinimizeButtonHint)
+
+ def testInvertOr(self):
+ '''QFlags ~ (invert) operator over the result of an | (or) operator'''
+ self.assertEqual(type(~(Qt.ItemIsSelectable | Qt.ItemIsEditable)), Qt.ItemFlags)
+
+ def testEqual(self):
+ '''QFlags == operator'''
+ flags = Qt.Window
+ flags |= Qt.WindowMinimizeButtonHint
+ flag_type = (flags & Qt.WindowType_Mask)
+ self.assertEqual(flag_type, Qt.Window)
+
+ self.assertEqual(Qt.KeyboardModifiers(Qt.ControlModifier), Qt.ControlModifier)
+
+ def testOperatorBetweenFlags(self):
+ '''QFlags & QFlags'''
+ flags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
+ newflags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
+ self.assertTrue(flags & newflags)
+
+ def testOperatorDifferentOrder(self):
+ '''Different ordering of arguments'''
+ flags = Qt.NoItemFlags | Qt.ItemIsUserCheckable
+ self.assertEqual(flags | Qt.ItemIsEnabled, Qt.ItemIsEnabled | flags)
+
+class QFlagsOnQVariant(unittest.TestCase):
+ def testQFlagsOnQVariant(self):
+ o = QObject()
+ o.setProperty("foo", QIODevice.ReadOnly | QIODevice.WriteOnly)
+ self.assertEqual(type(o.property("foo")), QIODevice.OpenMode)
+
+class QFlagsWrongType(unittest.TestCase):
+ def testWrongType(self):
+ '''Wrong type passed to QFlags binary operators'''
+
+ self.assertRaises(TypeError, Qt.NoItemFlags | '43')
+ self.assertRaises(TypeError, Qt.NoItemFlags & '43')
+ self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags)
+ self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags)
+ self.assertRaises(TypeError, Qt.NoItemFlags & QObject())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qhandle_test.py b/sources/pyside6/tests/QtCore/qhandle_test.py
new file mode 100644
index 000000000..54a364c66
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qhandle_test.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QEnum and QFlags'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QThread, Qt
+
+class TestHANDLE(unittest.TestCase):
+ def testIntConversion(self):
+ i = 0
+ h = QThread.currentThreadId()
+ i = 0 + int(h)
+ self.assertEqual(i, int(h))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py
new file mode 100644
index 000000000..685a26485
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py
@@ -0,0 +1,86 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for qInstallMsgHandler'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+param = []
+
+def handler(msgt, ctx, msg):
+ global param
+ param = [msgt, ctx, msg.strip()]
+
+def handleruseless(msgt, ctx, msg):
+ pass
+
+class QInstallMsgHandlerTest(unittest.TestCase):
+
+ def tearDown(self):
+ # Ensure that next test will have a clear environment
+ qInstallMessageHandler(None)
+
+ def testNone(self):
+ ret = qInstallMessageHandler(None)
+ self.assertEqual(ret, None)
+
+ def testRet(self):
+ ret = qInstallMessageHandler(None)
+ self.assertEqual(ret, None)
+ refcount = sys.getrefcount(handleruseless)
+ retNone = qInstallMessageHandler(handleruseless)
+ self.assertEqual(sys.getrefcount(handleruseless), refcount + 1)
+ rethandler = qInstallMessageHandler(None)
+ self.assertEqual(rethandler, handleruseless)
+ del rethandler
+ self.assertEqual(sys.getrefcount(handleruseless), refcount)
+
+ def testHandler(self):
+ rethandler = qInstallMessageHandler(handler)
+ if QLibraryInfo.isDebugBuild():
+ qDebug("Test Debug")
+ self.assertEqual(param[0], QtDebugMsg)
+ self.assertEqual(param[2], "Test Debug")
+ qWarning("Test Warning")
+ self.assertEqual(param[0], QtWarningMsg)
+ self.assertEqual(param[2], "Test Warning")
+ qCritical("Test Critical")
+ self.assertEqual(param[0], QtCriticalMsg)
+ self.assertEqual(param[2], "Test Critical")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qjsondocument_test.py b/sources/pyside6/tests/QtCore/qjsondocument_test.py
new file mode 100644
index 000000000..bb80bed24
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qjsondocument_test.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QJsonDocument/nullptr_t'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QJsonDocument
+
+
+class QJsonDocumentTest(unittest.TestCase):
+
+ def testToVariant(self):
+ a = QJsonDocument.fromJson(b'{"test": null}')
+ self.assertIsInstance(a, QJsonDocument)
+ self.assertEqual(str(a.toVariant()), "{'test': None}")
+
+ b = QJsonDocument.fromJson(b'{"test": [null]}')
+ self.assertIsInstance(b, QJsonDocument)
+ self.assertEqual(str(b.toVariant()), "{'test': [None]}")
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qlinef_test.py b/sources/pyside6/tests/QtCore/qlinef_test.py
new file mode 100644
index 000000000..3451ef333
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qlinef_test.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QLineF'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class TestQLineF (unittest.TestCase):
+ def testIntersect(self):
+ l1 = QLineF(0, 0, 1, 0)
+ l2 = QLineF(1, -1, 1, 1)
+ tuple_ = l1.intersects(l2)
+ self.assertEqual(tuple, tuple_.__class__)
+ (value, p) = tuple_
+ self.assertEqual(QLineF.BoundedIntersection, value)
+ self.assertEqual(QPointF(1, 0), p)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qlocale_test.py b/sources/pyside6/tests/QtCore/qlocale_test.py
new file mode 100644
index 000000000..33129a5de
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qlocale_test.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QLocale'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QLocale
+
+class QLocaleTestToNumber(unittest.TestCase):
+ def testToNumberInt(self):
+ obj = QLocale(QLocale.C)
+ self.assertEqual((37, True), obj.toInt('37'))
+
+ def testToNumberFloat(self):
+ obj = QLocale(QLocale.C)
+ self.assertEqual((ctypes.c_float(37.109).value, True),
+ obj.toFloat('37.109'))
+
+ def testToNumberDouble(self):
+ obj = QLocale(QLocale.C)
+ self.assertEqual((ctypes.c_double(37.109).value, True),
+ obj.toDouble('37.109'))
+
+ def testToNumberShort(self):
+ obj = QLocale(QLocale.C)
+ self.assertEqual((ctypes.c_short(37).value, True),
+ obj.toShort('37'))
+
+ def testToNumberULongLong(self):
+ obj = QLocale(QLocale.C)
+ self.assertEqual((ctypes.c_ulonglong(37).value, True),
+ obj.toULongLong('37'))
+
+ def testToNumberULongLongNegative(self):
+ obj = QLocale(QLocale.C)
+ self.assertTrue(not obj.toULongLong('-37')[1])
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qlockfile_test.py b/sources/pyside6/tests/QtCore/qlockfile_test.py
new file mode 100644
index 000000000..dcd9ecc44
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qlockfile_test.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QLockFile'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import QDir, QLockFile, QCoreApplication
+
+class TestQMessageAuthenticationCode (unittest.TestCase):
+
+ def setUp(self):
+ pid = QCoreApplication.applicationPid()
+ self._fileName = "{}/pqlockfiletest{}.tmp".format(QDir.tempPath(), pid)
+
+ def tearDown(self):
+ if (os.path.exists(self._fileName)):
+ os.remove(self._fileName)
+
+ def test(self):
+ # Merely exercise the API, no locking against another processes.
+ lockFile = QLockFile(self._fileName)
+ self.assertTrue(lockFile.lock())
+ self.assertTrue(lockFile.isLocked())
+ lockFile.unlock()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qmessageauthenticationcode_test.py b/sources/pyside6/tests/QtCore/qmessageauthenticationcode_test.py
new file mode 100644
index 000000000..dfa1c3cf9
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qmessageauthenticationcode_test.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QMessageAuthenticationCode'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCryptographicHash, QMessageAuthenticationCode
+
+class TestQMessageAuthenticationCode (unittest.TestCase):
+ def test(self):
+ code = QMessageAuthenticationCode(QCryptographicHash.Sha1, bytes('bla', "UTF-8"))
+ result = code.result()
+ self.assertTrue(result.size() > 0)
+ print(result.toHex())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qmetaobject_test.py b/sources/pyside6/tests/QtCore/qmetaobject_test.py
new file mode 100644
index 000000000..6179b0d21
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qmetaobject_test.py
@@ -0,0 +1,96 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests for static methos conflicts with class methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class Foo(QFile):
+ pass
+
+class DynObject(QObject):
+ def slot(self):
+ pass
+
+class qmetaobject_test(unittest.TestCase):
+ """
+ def test_QMetaObject(self):
+ qobj = QObject()
+ qobj_metaobj = qobj.metaObject()
+ self.assertEqual(qobj_metaobj.className(), "QObject")
+
+ obj = QFile()
+ m = obj.metaObject()
+ self.assertEqual(m.className(), "QFile")
+ self.assertNotEqual(m.methodCount(), qobj_metaobj.methodCount())
+
+ obj = Foo()
+ m = obj.metaObject()
+ self.assertEqual(m.className(), "Foo")
+ f = QFile()
+ fm = f.metaObject()
+ self.assertEqual(m.methodCount(), fm.methodCount())
+ """
+
+ def test_DynamicSlotSignal(self):
+ o = DynObject()
+ o2 = QObject()
+
+ o.connect(o2, SIGNAL("bars()"), o.slot)
+ self.assertTrue(o2.metaObject().indexOfMethod("bars()") > -1)
+ #self.assertTrue(o.metaObject().indexOfMethod("bar()") == -1)
+ #self.assertTrue(o.metaObject().indexOfMethod("slot()") > -1)
+
+ #slot_index = o.metaObject().indexOfMethod("slot()")
+
+ #o.connect(o, SIGNAL("foo()"), o2, SIGNAL("bar()"))
+ #signal_index = o.metaObject().indexOfMethod("foo()");
+
+ #self.assertTrue(slot_index != signal_index)
+
+ # PYSIDE-784, plain Qt objects should not have intermediary
+ # metaObjects.
+ def test_PlainQObject(self):
+ timer = QTimer()
+ self.assertEqual(timer.metaObject().superClass().className(),
+ "QObject")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qmimedatabase_test.py b/sources/pyside6/tests/QtCore/qmimedatabase_test.py
new file mode 100644
index 000000000..98493a222
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qmimedatabase_test.py
@@ -0,0 +1,84 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QMimeDatabase'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QMimeDatabase, QLocale
+
+class QMimeDatabaseTest(unittest.TestCase):
+ def testMimeTypeForName(self):
+ db = QMimeDatabase()
+
+ s0 = db.mimeTypeForName("application/x-zerosize")
+ self.assertTrue(s0.isValid())
+ self.assertEqual(s0.name(), "application/x-zerosize")
+ if "en" in QLocale().name():
+ self.assertEqual(s0.comment(), "empty document")
+
+ s0Again = db.mimeTypeForName("application/x-zerosize")
+ self.assertEqual(s0Again.name(), s0.name())
+
+ s1 = db.mimeTypeForName("text/plain")
+ self.assertTrue(s1.isValid())
+ self.assertEqual(s1.name(), "text/plain")
+
+ krita = db.mimeTypeForName("application/x-krita")
+ self.assertTrue(krita.isValid())
+
+ rdf = db.mimeTypeForName("application/rdf+xml")
+ self.assertTrue(rdf.isValid())
+ self.assertEqual(rdf.name(), "application/rdf+xml")
+ if "en" in QLocale().name():
+ self.assertEqual(rdf.comment(), "RDF file")
+
+ bzip2 = db.mimeTypeForName("application/x-bzip2")
+ self.assertTrue(bzip2.isValid())
+ if "en" in QLocale().name():
+ self.assertEqual(bzip2.comment(), "Bzip archive")
+
+ defaultMime = db.mimeTypeForName("application/octet-stream")
+ self.assertTrue(defaultMime.isValid())
+ self.assertEqual(defaultMime.name(), "application/octet-stream")
+ self.assertTrue(defaultMime.isDefault())
+
+ doesNotExist = db.mimeTypeForName("foobar/x-doesnot-exist")
+ self.assertTrue(not doesNotExist.isValid())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py b/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py
new file mode 100644
index 000000000..bb29eea63
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for QAbstractListModel.createIndex and QModelIndex.internalPointer'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class MyModel (QAbstractListModel):
+ pass
+
+class TestQModelIndexInternalPointer(unittest.TestCase):
+ ''' Test case for QAbstractListModel.createIndex and QModelIndex.internalPointer'''
+
+ def setUp(self):
+ #Acquire resources
+ self.model = MyModel()
+
+ def tearDown(self):
+ #Release resources
+ del self.model
+
+ def testInternalPointer(self):
+ #Test QAbstractListModel.createIndex and
+ #QModelIndex.internalPointer with regular Python objects
+ obj = QObject()
+ idx = self.model.createIndex(0, 0, "Hello")
+ i = idx.internalPointer()
+ self.assertEqual(i, "Hello")
+
+ def testReferenceCounting(self):
+ #Test reference counting when retrieving data with
+ #QModelIndex.internalPointer
+ o = [1, 2, 3]
+ o_refcnt = sys.getrefcount(o)
+ idx = self.model.createIndex(0, 0, o)
+ ptr = idx.internalPointer()
+ self.assertEqual(sys.getrefcount(o), o_refcnt + 1)
+
+
+ def testIndexForDefaultDataArg(self):
+ #Test QAbstractListModel.createIndex with a default
+ #value for data argument
+ idx = self.model.createIndex(0, 0)
+ self.assertEqual(None, idx.internalPointer())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qobject_children_segfault_test.py b/sources/pyside6/tests/QtCore/qobject_children_segfault_test.py
new file mode 100644
index 000000000..426c38f21
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_children_segfault_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for parent-child relationship'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication
+
+class ChildrenCoreApplication(unittest.TestCase):
+ '''Test case for calling QObject.children after creating a QCoreApp'''
+
+ def testQCoreAppChildren(self):
+ #QObject.children() after creating a QCoreApplication
+ # Minimal test:
+ # 1- Create QCoreApp
+ # 2- Create parent and childrens
+ # 3- While keeping the children alive, call parent.children()
+ # 4- Delete parent
+ app = QCoreApplication([])
+ parent = QObject()
+ children = [QObject(parent) for x in range(25)]
+ # Uncomment the lines below to make the test pass
+ # del children
+ # del child2
+ del parent # XXX Segfaults here
+ self.assertTrue(True)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py
new file mode 100644
index 000000000..77954663a
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for QObject::connectNotify()'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+def cute_slot():
+ pass
+
+class Obj(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.con_notified = False
+ self.dis_notified = False
+ self.signal = ""
+
+ def connectNotify(self, signal):
+ self.con_notified = True
+ self.signal = signal
+
+ def disconnectNotify(self, signal):
+ self.dis_notified = True
+
+ def reset(self):
+ self.con_notified = False
+ self.dis_notified = False
+
+class TestQObjectConnectNotify(UsesQCoreApplication):
+ '''Test case for QObject::connectNotify'''
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.called = False
+
+ def tearDown(self):
+ UsesQCoreApplication.tearDown(self)
+
+ def testBasic(self):
+ sender = Obj()
+ receiver = QObject()
+ sender.connect(SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
+ self.assertTrue(sender.con_notified)
+ # When connecting to a regular slot, and not a python callback function, QObject::connect
+ # will use the non-cloned method signature, so connecting to destroyed() will actually
+ # connect to destroyed(QObject*).
+ self.assertEqual(sender.signal.methodSignature(), "destroyed(QObject*)")
+ sender.disconnect(SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
+ self.assertTrue(sender.dis_notified)
+
+ def testPySignal(self):
+ sender = Obj()
+ receiver = QObject()
+ sender.connect(SIGNAL("foo()"), receiver, SLOT("deleteLater()"))
+ self.assertTrue(sender.con_notified)
+ sender.disconnect(SIGNAL("foo()"), receiver, SLOT("deleteLater()"))
+ self.assertTrue(sender.dis_notified)
+
+ def testPySlots(self):
+ sender = Obj()
+ receiver = QObject()
+ sender.connect(SIGNAL("destroyed()"), cute_slot)
+ self.assertTrue(sender.con_notified)
+ sender.disconnect(SIGNAL("destroyed()"), cute_slot)
+ self.assertTrue(sender.dis_notified)
+
+ def testpyAll(self):
+ sender = Obj()
+ receiver = QObject()
+ sender.connect(SIGNAL("foo()"), cute_slot)
+ self.assertTrue(sender.con_notified)
+ sender.disconnect(SIGNAL("foo()"), cute_slot)
+ self.assertTrue(sender.dis_notified)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_destructor.py b/sources/pyside6/tests/QtCore/qobject_destructor.py
new file mode 100644
index 000000000..da4f882ee
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_destructor.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+class MyObject(QtCore.QObject):
+ def __init__(self, other=None):
+ QtCore.QObject.__init__(self, None)
+ self._o = other
+
+class TestDestructor(unittest.TestCase):
+ def testReference(self):
+ o = QtCore.QObject()
+ m = MyObject(o)
+ self.assertEqual(sys.getrefcount(o), 3)
+ del m
+ self.assertEqual(sys.getrefcount(o), 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_event_filter_test.py b/sources/pyside6/tests/QtCore/qobject_event_filter_test.py
new file mode 100644
index 000000000..a0900f795
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_event_filter_test.py
@@ -0,0 +1,148 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject.eventFilter'''
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimerEvent
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class FilterObject(QObject):
+ '''Filter object for the basic test'''
+ def __init__(self, obj=None, event_type=None, *args):
+ #Creates a new filter object
+ QObject.__init__(self, *args)
+ self.obj = obj
+ self.event_type = event_type
+ self.events_handled = 0
+ self.events_bypassed = 0
+
+ def setTargetObject(self, obj):
+ #Sets the object that will be filtered
+ self.obj = obj
+
+ def eventFilter(self, obj, event):
+ '''Just checks if is the correct object and event type
+ incrementing counter until reaching the limit. After that it
+ stops filtering the events for the object.'''
+ if (self.obj == obj):
+ if isinstance(event, self.event_type) and self.events_handled < 5:
+ self.events_handled += 1
+ return True
+ else:
+ self.events_bypassed += 1
+ return False
+ else:
+ return QObject.eventFilter(self, obj, event)
+
+class FilteredObject(QObject):
+ '''Class that will be filtered. Quits the app after 5 timer events'''
+ def __init__(self, app, *args):
+ QObject.__init__(self, *args)
+ self.app = app
+ self.times_called = 0
+
+ def timerEvent(self, evt):
+ #Overriden method
+ self.times_called += 1
+
+ if self.times_called == 5:
+ self.app.quit()
+
+class TestQObjectEventFilterPython(UsesQCoreApplication):
+ '''QObject.eventFilter - Reimplemented in python
+ Filters 5 TimerEvents and then bypasses the other events to the
+ timerEvent method. After 5 runs, the timerEvent method will ask
+ the core application to exit'''
+ def setUp(self):
+ #Acquire resources
+ UsesQCoreApplication.setUp(self)
+ self.obj_filter = FilterObject(event_type=QTimerEvent)
+ def tearDown(self):
+ #Release resources
+ del self.obj_filter
+ UsesQCoreApplication.tearDown(self)
+
+ def testEventFilter(self):
+ #QObject.eventFilter reimplemented in python
+ filtered = FilteredObject(self.app)
+ filtered.installEventFilter(self.obj_filter)
+ self.obj_filter.setTargetObject(filtered)
+
+ filtered.startTimer(0)
+
+ self.app.exec_()
+
+ self.assertEqual(filtered.times_called, 5)
+ self.assertEqual(self.obj_filter.events_handled, 5)
+
+ def testInstallEventFilterRefCountAfterDelete(self):
+ '''Bug 910 - installEventFilter() increments reference count on target object
+ http://bugs.pyside.org/show_bug.cgi?id=910'''
+ obj = QObject()
+ filt = QObject()
+
+ self.assertEqual(sys.getrefcount(obj), 2)
+ self.assertEqual(sys.getrefcount(filt), 2)
+ obj.installEventFilter(filt)
+ self.assertEqual(sys.getrefcount(obj), 2)
+ self.assertEqual(sys.getrefcount(filt), 2)
+
+ wref = weakref.ref(obj)
+ del obj
+ self.assertEqual(wref(), None)
+
+ def testInstallEventFilterRefCountAfterRemove(self):
+ # Bug 910
+ obj = QObject()
+ filt = QObject()
+
+ self.assertEqual(sys.getrefcount(obj), 2)
+ self.assertEqual(sys.getrefcount(filt), 2)
+ obj.installEventFilter(filt)
+ self.assertEqual(sys.getrefcount(obj), 2)
+ self.assertEqual(sys.getrefcount(filt), 2)
+ obj.removeEventFilter(filt)
+ self.assertEqual(sys.getrefcount(obj), 2)
+ self.assertEqual(sys.getrefcount(filt), 2)
+
+ wref = weakref.ref(obj)
+ del obj
+ self.assertEqual(wref(), None)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_inherits_test.py b/sources/pyside6/tests/QtCore/qobject_inherits_test.py
new file mode 100644
index 000000000..c3a34e69e
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_inherits_test.py
@@ -0,0 +1,131 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer
+from PySide6.QtWidgets import QApplication, QLabel, QVBoxLayout
+
+is_alive = None
+
+class InheritsCase(unittest.TestCase):
+ '''Test case for QObject.inherits'''
+
+ def testCppInheritance(self):
+ #QObject.inherits() for c++ classes
+ #An class inherits itself
+ self.assertTrue(QObject().inherits('QObject'))
+
+ def testPythonInheritance(self):
+ #QObject.inherits() for python classes
+
+ class Dummy(QObject):
+ #Dummy class
+ pass
+
+ self.assertTrue(Dummy().inherits('QObject'))
+ self.assertTrue(Dummy().inherits('Dummy'))
+ self.assertTrue(not Dummy().inherits('FooBar'))
+
+ def testPythonMultiInheritance(self):
+ #QObject.inherits() for multiple inheritance
+ # QObject.inherits(classname) should fail if classname isn't a
+ # QObject subclass
+
+ class Parent(object):
+ #Dummy parent
+ pass
+ class Dummy(QObject, Parent):
+ #Dummy class
+ pass
+
+ self.assertTrue(Dummy().inherits('QObject'))
+ self.assertTrue(not Dummy().inherits('Parent'))
+
+ def testSetAttributeBeforeCallingInitOnQObjectDerived(self):
+ '''Test for bug #428.'''
+ class DerivedObject(QObject):
+ def __init__(self):
+ self.member = 'member'
+ QObject.__init__(self)
+ obj0 = DerivedObject()
+ # The second instantiation of DerivedObject will generate an exception
+ # that will not come to surface immediately.
+ obj1 = DerivedObject()
+ # The mere calling of the object method causes
+ # the exception to "reach the surface".
+ obj1.objectName()
+
+ def testMultipleInheritance(self):
+ def declareClass():
+ class Foo(object, QObject):
+ pass
+
+ self.assertRaises(TypeError, declareClass)
+
+ # PYSIDE-11:
+ # The takeOwnership() method was relying that the SbkObject
+ # had a converter, which it's not the case when multiple
+ # inheritance is used.
+ # The deleteLater() method uses the takeOwnership() to give
+ # control of the object to C++, so it can be remove once
+ # the destructor is called.
+ # The solution was to add a default case when the object
+ # is null under the pythonTypeIsValueType() method in shiboken.
+ def testDeleteMultipleInheritance(self):
+ app = QApplication(sys.argv)
+ class DerivedLabel(QLabel, QObject):
+ def __del__(self):
+ global is_alive
+ is_alive = False
+
+ global is_alive
+ child = DerivedLabel('Hello')
+ is_alive = True
+ parent = QVBoxLayout()
+ parent.addWidget(child)
+ parent.removeWidget(child)
+ child.deleteLater()
+ self.assertTrue(is_alive)
+ del child
+ self.assertTrue(is_alive)
+ QTimer.singleShot(100, app.quit)
+ app.exec_()
+ self.assertFalse(is_alive)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py b/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py
new file mode 100644
index 000000000..1011e2400
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_objectproperty_test.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for the bug #378
+http://bugs.openbossa.org/show_bug.cgi?id=378
+'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class ExtQObject(QObject):
+ def __init__(self):
+ # "foobar" will become a object attribute that will not be
+ # listed on the among the type attributes. Thus for bug
+ # condition be correctly triggered the "foobar" attribute
+ # must not previously exist in the parent class.
+ self.foobar = None
+ # The parent __init__ method must be called after the
+ # definition of "self.foobar".
+ QObject.__init__(self)
+
+class TestBug378(unittest.TestCase):
+ '''Test case for the bug #378'''
+
+ def testBug378(self):
+ obj = ExtQObject()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qobject_parent_test.py b/sources/pyside6/tests/QtCore/qobject_parent_test.py
new file mode 100644
index 000000000..2a599ff45
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_parent_test.py
@@ -0,0 +1,292 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for parent-child relationship'''
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class ParentRefCountCase(unittest.TestCase):
+ '''Test case for the refcount changes of setParent'''
+
+ def setUp(self):
+ #Acquire resources
+ self.parent = QObject()
+ self.child = QObject()
+
+ def tearDown(self):
+ #Release resources
+ del self.child
+ del self.parent
+
+ def testSetParent(self):
+ #QObject.setParent() refcount changes
+ self.assertEqual(getrefcount(self.child), 2)
+ self.child.setParent(self.parent)
+ self.assertEqual(getrefcount(self.child), 3)
+
+ def testSetParentTwice(self):
+ self.assertEqual(getrefcount(self.child), 2)
+ self.child.setParent(self.parent)
+ self.assertEqual(getrefcount(self.child), 3)
+ self.child.setParent(self.parent)
+ self.assertEqual(getrefcount(self.child), 3)
+
+ def testConstructor(self):
+ #QObject(QObject) refcount changes
+ child = QObject(self.parent)
+ self.assertEqual(getrefcount(child), 3)
+
+class ParentCase(unittest.TestCase):
+ '''Small collection of tests related to parent-child relationship'''
+
+ def testSetParent(self):
+ #QObject.setParent()
+ parent = QObject()
+ child = QObject()
+ child.setParent(parent)
+
+ self.assertEqual(parent, child.parent())
+
+ def testParentConstructor(self):
+ #QObject(parent)
+ parent = QObject()
+ child = QObject(parent)
+
+ self.assertEqual(parent, child.parent())
+
+ orig_repr = repr(child)
+ del child
+ self.assertEqual(orig_repr, repr(parent.children()[0]))
+
+ def testChildren(self):
+ #QObject.children()
+ parent = QObject()
+ children = [QObject(parent) for x in range(25)]
+
+ self.assertEqual(parent.children(), children)
+
+ def testFindChild(self):
+ #QObject.findChild() with all QObject
+ parent = QObject()
+ name = 'object%d'
+ children = [QObject(parent) for i in range(20)]
+
+ for i, child in enumerate(children):
+ child.setObjectName(name % i)
+
+ for i, child in enumerate(children):
+ self.assertEqual(child, parent.findChild(QObject, name % i))
+
+ def testFindChildWithoutName(self):
+ parent = QObject()
+ name = 'object%d'
+ children = [QObject(parent) for i in range(20)]
+
+ for i, child in enumerate(children):
+ child.setObjectName(name % i)
+
+ child = parent.findChild(QObject)
+ self.assertTrue(isinstance(child, QObject))
+
+ def testFindChildren(self):
+ #QObject.findChildren() with all QObject
+ parent = QObject()
+ target_name = 'foo'
+ children = [QTimer(parent) for i in range(20)]
+ children.extend([QObject(parent) for i in range(20)])
+
+ for i, child in enumerate(children):
+ if i % 5 == 0:
+ child.setObjectName(target_name)
+ else:
+ child.setObjectName(str(i))
+
+ # Emulates findChildren with the intended outcome
+ target_children = [x for x in children if x.objectName() == target_name]
+ test_children = parent.findChildren(QObject, target_name)
+ self.assertEqual(target_children, test_children)
+
+ # test findChildren default value
+ res = parent.findChildren(QTimer)
+ self.assertEqual(len(res), 20)
+
+ # test findChildren with a QRegularExpression
+ res = parent.findChildren(QObject, QRegularExpression("^fo+"))
+ self.assertEqual(res, test_children)
+
+ def testParentEquality(self):
+ #QObject.parent() == parent
+ parent = QObject()
+ child = QObject(parent)
+ self.assertEqual(parent, child.parent())
+
+
+class TestParentOwnership(unittest.TestCase):
+ '''Test case for Parent/Child object ownership'''
+
+ def testParentDestructor(self):
+ parent = QObject()
+ self.assertEqual(getrefcount(parent), 2)
+
+ child = QObject(parent)
+ self.assertEqual(getrefcount(child), 3)
+ self.assertEqual(getrefcount(parent), 2)
+
+ del parent
+ self.assertEqual(getrefcount(child), 2)
+
+ # this will fail because parent deleted child cpp object
+ self.assertRaises(RuntimeError, lambda :child.objectName())
+
+ # test parent with multiples children
+ def testMultipleChildren(self):
+ o = QObject()
+ self.assertEqual(getrefcount(o), 2)
+
+ c = QObject(o)
+ self.assertEqual(getrefcount(c), 3)
+ self.assertEqual(getrefcount(o), 2)
+
+ c2 = QObject(o)
+ self.assertEqual(getrefcount(o), 2)
+ self.assertEqual(getrefcount(c), 3)
+ self.assertEqual(getrefcount(c2), 3)
+
+ del o
+ self.assertEqual(getrefcount(c), 2)
+ self.assertEqual(getrefcount(c2), 2)
+
+ # this will fail because parent deleted child cpp object
+ self.assertRaises(RuntimeError, lambda :c.objectName())
+ self.assertRaises(RuntimeError, lambda :c2.objectName())
+
+ # test recursive parent
+ def testRecursiveParent(self):
+ o = QObject()
+ self.assertEqual(getrefcount(o), 2)
+
+ c = QObject(o)
+ self.assertEqual(getrefcount(c), 3)
+ self.assertEqual(getrefcount(o), 2)
+
+ c2 = QObject(c)
+ self.assertEqual(getrefcount(o), 2)
+ self.assertEqual(getrefcount(c), 3)
+ self.assertEqual(getrefcount(c2), 3)
+
+ del o
+ self.assertEqual(getrefcount(c), 2)
+ self.assertEqual(getrefcount(c2), 2)
+
+ # this will fail because parent deleted child cpp object
+ self.assertRaises(RuntimeError, lambda :c.objectName())
+ self.assertRaises(RuntimeError, lambda :c2.objectName())
+
+ # test parent transfer
+ def testParentTransfer(self):
+ o = QObject()
+ self.assertEqual(getrefcount(o), 2)
+
+ c = QObject()
+ self.assertEqual(getrefcount(c), 2)
+
+ c.setParent(o)
+ self.assertEqual(getrefcount(c), 3)
+
+ c.setParent(None)
+ self.assertEqual(getrefcount(c), 2)
+
+ del c
+ del o
+
+
+class ExtQObject(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+class ReparentingTest(unittest.TestCase):
+ '''Test cases for reparenting'''
+
+ def testParentedQObjectIdentity(self):
+ object_list = []
+ parent = QObject()
+ for i in range(3):
+ obj = QObject()
+ object_list.append(obj)
+ obj.setParent(parent)
+ for child in parent.children():
+ self.assertTrue(child in object_list)
+
+ def testParentedExtQObjectType(self):
+ object_list = []
+ parent = QObject()
+ for i in range(3):
+ obj = ExtQObject()
+ object_list.append(obj)
+ obj.setParent(parent)
+ for orig, child in zip(object_list, parent.children()):
+ self.assertEqual(type(orig), type(child))
+
+ def testReparentedQObjectIdentity(self):
+ object_list = []
+ old_parent = QObject()
+ new_parent = QObject()
+ for i in range(3):
+ obj = QObject()
+ object_list.append(obj)
+ obj.setParent(old_parent)
+ for obj in object_list:
+ obj.setParent(new_parent)
+ for child in new_parent.children():
+ self.assertTrue(child in object_list)
+
+ def testReparentedExtQObjectType(self):
+ object_list = []
+ old_parent = QObject()
+ new_parent = QObject()
+ for i in range(3):
+ obj = ExtQObject()
+ object_list.append(obj)
+ obj.setParent(old_parent)
+ for obj in object_list:
+ obj.setParent(new_parent)
+ for orig, child in zip(object_list, new_parent.children()):
+ self.assertEqual(type(orig), type(child))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_property_test.py b/sources/pyside6/tests/QtCore/qobject_property_test.py
new file mode 100644
index 000000000..40d8bf9e5
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_property_test.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject property and setProperty'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Property, Signal
+
+class MyObjectWithNotifyProperty(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self.p = 0
+
+ def readP(self):
+ return self.p
+
+ def writeP(self, v):
+ self.p = v
+ self.notifyP.emit()
+
+ notifyP = Signal()
+ myProperty = Property(int, readP, fset=writeP, notify=notifyP)
+
+class PropertyWithNotify(unittest.TestCase):
+ def called(self):
+ self.called_ = True
+
+ def testNotify(self):
+ self.called_ = False
+ obj = MyObjectWithNotifyProperty()
+ obj.notifyP.connect(self.called)
+ obj.myProperty = 10
+ self.assertTrue(self.called_)
+
+ def testHasProperty(self):
+ o = MyObjectWithNotifyProperty()
+ o.setProperty("myProperty", 10)
+ self.assertEqual(o.myProperty, 10)
+ self.assertEqual(o.property("myProperty"), 10)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_protected_methods_test.py b/sources/pyside6/tests/QtCore/qobject_protected_methods_test.py
new file mode 100644
index 000000000..9e9f56117
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_protected_methods_test.py
@@ -0,0 +1,73 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject protected methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QThread, SIGNAL
+
+class Dummy(QObject):
+ '''Dummy class'''
+ pass
+
+class QObjectReceivers(unittest.TestCase):
+ '''Test case for QObject.receivers()'''
+
+ def cb(self, *args):
+ #Dummy callback
+ pass
+
+ def testQObjectReceiversExtern(self):
+ #QObject.receivers() - Protected method external access
+
+ obj = Dummy()
+ self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 0)
+
+ QObject.connect(obj, SIGNAL("destroyed()"), self.cb)
+ self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1)
+
+ def testQThreadReceiversExtern(self):
+ #QThread.receivers() - Inherited protected method
+
+ obj = QThread()
+ self.assertEqual(obj.receivers(SIGNAL('destroyed()')), 0)
+ QObject.connect(obj, SIGNAL("destroyed()"), self.cb)
+ self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_test.py b/sources/pyside6/tests/QtCore/qobject_test.py
new file mode 100644
index 000000000..879888794
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_test.py
@@ -0,0 +1,88 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal, Qt
+
+class Obj(QObject):
+ signal = Signal()
+ def empty(self):
+ pass
+
+class ObjectNameCase(unittest.TestCase):
+ '''Tests related to QObject object name'''
+
+ def testSimple(self):
+ #QObject.objectName(string)
+ name = 'object1'
+ obj = QObject()
+ obj.setObjectName(name)
+
+ self.assertEqual(name, obj.objectName())
+
+ def testEmpty(self):
+ #QObject.objectName('')
+ name = ''
+ obj = QObject()
+ obj.setObjectName(name)
+
+ self.assertEqual(name, obj.objectName())
+
+ def testDefault(self):
+ #QObject.objectName() default
+ obj = QObject()
+ self.assertEqual('', obj.objectName())
+
+ def testUnicode(self):
+ name = 'não'
+ #FIXME Strange error on upstream when using equal(name, obj)
+ obj = QObject()
+ obj.setObjectName(name)
+ self.assertEqual(obj.objectName(), name)
+
+ def testUniqueConnection(self):
+ obj = Obj()
+ # On first connect, UniqueConnection returns True, and on the second
+ # it must return False, and not a RuntimeError (PYSIDE-34)
+ self.assertTrue(obj.signal.connect(obj.empty, Qt.UniqueConnection))
+ self.assertFalse(obj.signal.connect(obj.empty, Qt.UniqueConnection))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_timer_event_test.py b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
new file mode 100644
index 000000000..c04093d2d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_timer_event_test.py
@@ -0,0 +1,79 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for QObject.timerEvent overloading'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class Dummy(QObject):
+
+ def __init__(self, app):
+ super(Dummy, self).__init__()
+ self.times_called = 0
+ self.app = app
+
+ def timerEvent(self, event):
+ QObject.timerEvent(self, event)
+ event.accept()
+ self.times_called += 1
+
+ if self.times_called == 5:
+ self.app.exit(0)
+
+class QObjectTimerEvent(UsesQCoreApplication):
+
+ def setUp(self):
+ #Acquire resources
+ super(QObjectTimerEvent, self).setUp()
+
+ def tearDown(self):
+ #Release resources
+ super(QObjectTimerEvent, self).tearDown()
+
+ def testTimerEvent(self):
+ #QObject.timerEvent overloading
+ obj = Dummy(self.app)
+ timer_id = obj.startTimer(200)
+ self.app.exec_()
+ obj.killTimer(timer_id)
+ self.assertEqual(obj.times_called, 5)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qobject_tr_as_instance_test.py b/sources/pyside6/tests/QtCore/qobject_tr_as_instance_test.py
new file mode 100644
index 000000000..50a4329e3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qobject_tr_as_instance_test.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QObject's tr static methods.'''
+
+import os
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+#from helper.usesqcoreapplication import UsesQCoreApplication
+
+class QObjectTrTest(unittest.TestCase):
+ '''Test case to check if QObject tr static methods could be treated as instance methods.'''
+
+ def setUp(self):
+ self.obj = QObject()
+
+ def tearDown(self):
+ del self.obj
+
+ def testTrCommonCase(self):
+ #Test common case for QObject.tr
+ invar1 = 'test1'
+ outvar1 = self.obj.tr(invar1)
+ invar2 = 'test2'
+ outvar2 = self.obj.tr(invar2, 'test comment')
+ self.assertEqual((invar1, invar2), (outvar1, outvar2))
+
+ def testTrAsInstanceMethod(self):
+ #Test QObject.tr as instance
+ invar1 = 'test1'
+ outvar1 = QObject.tr(self.obj, invar1)
+ invar2 = 'test2'
+ outvar2 = QObject.tr(self.obj, invar2, 'test comment')
+ self.assertEqual((invar1, invar2), (outvar1, outvar2))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qoperatingsystemversion_test.py b/sources/pyside6/tests/QtCore/qoperatingsystemversion_test.py
new file mode 100644
index 000000000..b9ed2d870
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qoperatingsystemversion_test.py
@@ -0,0 +1,47 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QOperatingSystemVersion
+
+class TestQOperatingSystemVersion(unittest.TestCase):
+ def test(self):
+ ov = QOperatingSystemVersion.current()
+ name = "{} v{}.{}.{}".format(ov.name(), ov.majorVersion(),
+ ov.minorVersion(), ov.microVersion())
+ print(name)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qpoint_test.py b/sources/pyside6/tests/QtCore/qpoint_test.py
new file mode 100644
index 000000000..343e21df4
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qpoint_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QPoint and QPointF'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPoint, QPointF
+
+
+class QPointTest(unittest.TestCase):
+
+ def testQPointCtor(self):
+ point = QPoint(QPoint(10,20))
+
+class QPointFTest(unittest.TestCase):
+
+ def testQPointFCtor(self):
+ pointf = QPointF(QPoint(10,20))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qprocess_test.py b/sources/pyside6/tests/QtCore/qprocess_test.py
new file mode 100644
index 000000000..06ca4b7ac
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qprocess_test.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QProcess'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class TestQProcess (unittest.TestCase):
+ def testStartDetached(self):
+ value, pid = QProcess.startDetached("dir", [], os.getcwd())
+ self.assertTrue(isinstance(value, bool))
+ self.assertTrue(isinstance(pid, int))
+
+ def testPid(self):
+ p = QProcess()
+ p.start("dir", [])
+ p.waitForStarted()
+ pid = p.processId()
+ # We can't test the pid method result because it returns 0 when the
+ # process isn't running
+ if p.state() == QProcess.Running:
+ self.assertNotEqual(pid, 0)
+ p.waitForFinished()
+ else:
+ print("PROCESS ALREADY DEAD :-/")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qproperty_decorator.py b/sources/pyside6/tests/QtCore/qproperty_decorator.py
new file mode 100644
index 000000000..557e91dcc
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qproperty_decorator.py
@@ -0,0 +1,71 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Property
+
+class MyObject(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self._value = None
+
+ @Property(int)
+ def value(self):
+ return self._value
+
+ @value.setter
+ # Note: The name of property and setter must be the same, because the
+ # object changes its identity all the time. `valueSet` no longer works.
+ def value(self, value):
+ self._value = value
+
+
+class PropertyTest(unittest.TestCase):
+ def destroyCB(self, obj):
+ self._obDestroyed = True
+
+ def testDecorator(self):
+ self._obDestroyed = False
+ o = MyObject()
+ weak = weakref.ref(o, self.destroyCB)
+ o.value = 10
+ self.assertEqual(o._value, 10)
+ self.assertEqual(o.value, 10)
+ del o
+ self.assertTrue(self._obDestroyed)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qrandomgenerator_test.py b/sources/pyside6/tests/QtCore/qrandomgenerator_test.py
new file mode 100644
index 000000000..ee7e9a5d9
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qrandomgenerator_test.py
@@ -0,0 +1,55 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QRandomGenerator, QRandomGenerator64
+
+class QRandomGeneratorTest(unittest.TestCase):
+ '''Test case for QRandomGenerator'''
+
+ def testGenerator(self):
+ self.assertTrue(QRandomGenerator.system())
+ self.assertTrue(QRandomGenerator.global_())
+ generator = QRandomGenerator()
+ r = generator.bounded(10, 20)
+ self.assertTrue(r >= 10)
+ self.assertTrue(r <= 20)
+
+ def testGenerator64(self):
+ generator = QRandomGenerator64()
+ r = generator.generate()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qrect_test.py b/sources/pyside6/tests/QtCore/qrect_test.py
new file mode 100644
index 000000000..f73ae39cc
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qrect_test.py
@@ -0,0 +1,147 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QRect'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPoint, QRect, QRectF
+
+class RectConstructor(unittest.TestCase):
+
+ def testDefault(self):
+ #QRect()
+ obj = QRect()
+
+ self.assertTrue(obj.isNull())
+
+ def testConstructorQPoint(self):
+ topLeft = QPoint(3, 0)
+ bottomRight = QPoint(0, 3)
+
+ rect1 = QRect(topLeft, bottomRight)
+ rect2 = QRect(topLeft, bottomRight)
+
+ self.assertEqual(rect1, rect2)
+
+class RectOperator(unittest.TestCase):
+ '''Test case for QRect operators'''
+
+ def testEqual(self):
+ '''QRect == QRect
+ Note: operator == must be working as it's the main check
+ for correctness'''
+ rect1 = QRect()
+ rect2 = QRect()
+ self.assertEqual(rect1, rect2)
+
+ rect1 = QRect(0, 4, 100, 300)
+ rect2 = QRect(0, 4, 100, 300)
+ self.assertEqual(rect1, rect2)
+
+ def testNullRectIntersection(self):
+ #QRect & QRect for null rects
+ rect1 = QRect()
+ rect2 = QRect()
+ rect3 = rect1 & rect2
+ self.assertEqual(rect3, rect1)
+ self.assertEqual(rect3, rect2)
+
+ def testNoIntersect(self):
+ '''QRect & QRect for non-intersecting QRects
+ Non-intersecting QRects return a 'null' QRect for operator &'''
+ rect1 = QRect(10, 10, 5, 5)
+ rect2 = QRect(20, 20, 5, 5)
+ rect3 = rect1 & rect2
+ self.assertEqual(rect3, QRect())
+
+ def testIntersectPartial(self):
+ #QRect & QRect for partial intersections
+ rect1 = QRect(10, 10, 10, 10)
+ rect2 = QRect(15, 15, 10, 10)
+ rect3 = rect1 & rect2
+ self.assertEqual(rect3, QRect(15, 15, 5, 5))
+
+ def testIntersetEnclosed(self):
+ #QRect & QRect for a qrect inside another
+ rect1 = QRect(10, 10, 20, 20)
+ rect2 = QRect(15, 15, 5, 5)
+ rect3 = rect1 & rect2
+ self.assertEqual(rect3, rect2)
+
+ def testNullRectIntersectBounding(self):
+ #QRect | QRect for null rects
+ rect1 = QRect()
+ rect2 = QRect()
+ rect3 = rect1 & rect2
+ self.assertEqual(rect3, rect1)
+ self.assertEqual(rect3, rect2)
+
+ def testNoIntersectBounding(self):
+ '''QRect | QRect for non-intersecting QRects
+ Non-intersecting QRects return a greater QRect for operator |'''
+ rect1 = QRect(10, 10, 5, 5)
+ rect2 = QRect(20, 20, 5, 5)
+ rect3 = rect1 | rect2
+ self.assertEqual(rect3, QRect(10, 10, 15, 15))
+
+ def testBoundingPartialIntersection(self):
+ #QRect | QRect for partial intersections
+ rect1 = QRect(10, 10, 10, 10)
+ rect2 = QRect(15, 15, 10, 10)
+ rect3 = rect1 | rect2
+ self.assertEqual(rect3, QRect(10, 10, 15, 15))
+
+ def testBoundingEnclosed(self):
+ #QRect | QRect for a qrect inside another
+ rect1 = QRect(10, 10, 20, 20)
+ rect2 = QRect(15, 15, 5, 5)
+ rect3 = rect1 | rect2
+ self.assertEqual(rect3, rect1)
+
+ def testGetCoordsAndRect(self):
+ rect1 = QRect(1, 2, 3, 4)
+ self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
+ self.assertEqual(rect1.getCoords(), (1, 2, 3, 5))
+
+ rect1 = QRectF(1, 2, 3, 4)
+ self.assertEqual(rect1.getRect(), (1, 2, 3, 4))
+ self.assertEqual(rect1.getCoords(), (1, 2, 4, 6))
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qregularexpression_test.py b/sources/pyside6/tests/QtCore/qregularexpression_test.py
new file mode 100644
index 000000000..3abdb84ca
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qregularexpression_test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QRegularExpression'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QRegularExpression, QRegularExpressionMatch, QRegularExpressionMatchIterator
+
+class QRegularExpressionTest(unittest.TestCase):
+
+ def testMatch(self):
+ re = QRegularExpression('^.*(word2).*$')
+ self.assertTrue(re.isValid())
+ match = re.match('word1 word2 word3')
+ self.assertTrue(match.isValid())
+ self.assertEqual(match.captured(1), 'word2')
+ self.assertEqual(match.capturedView(1), 'word2')
+
+ def testMatchIterator(self):
+ re = QRegularExpression('(\w+)')
+ self.assertTrue(re.isValid())
+ count = 0
+ it = re.globalMatch('word1 word2 word3');
+ while it.hasNext():
+ it.next()
+ count = count + 1
+ self.assertEqual(count, 3)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qresource_test.py b/sources/pyside6/tests/QtCore/qresource_test.py
new file mode 100644
index 000000000..d8d3ff76b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qresource_test.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QResource usage'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from PySide6.QtCore import QFile, QIODevice
+import resources_mc
+
+class ResourcesUsage(unittest.TestCase):
+ '''Test case for resources usage'''
+
+ def testPhrase(self):
+ #Test loading of quote.txt resource
+ f = open(adjust_filename('quoteEnUS.txt', __file__), "r")
+ orig = f.read()
+ f.close()
+
+ f = QFile(':/quote.txt')
+ f.open(QIODevice.ReadOnly) #|QIODevice.Text)
+ print("Error:", f.errorString())
+ copy = f.readAll()
+ f.close()
+ self.assertEqual(orig, copy)
+
+ def testImage(self):
+ #Test loading of sample.png resource
+ f = open(adjust_filename('sample.png', __file__), "rb")
+ orig = f.read()
+ f.close()
+
+ f = QFile(':/sample.png')
+ f.open(QIODevice.ReadOnly)
+ copy = f.readAll()
+ f.close()
+ self.assertEqual(len(orig), len(copy))
+ self.assertEqual(orig, copy)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtCore/qsettings_test.ini b/sources/pyside6/tests/QtCore/qsettings_test.ini
index f54ae0029..f54ae0029 100644
--- a/sources/pyside2/tests/QtCore/qsettings_test.ini
+++ b/sources/pyside6/tests/QtCore/qsettings_test.ini
diff --git a/sources/pyside6/tests/QtCore/qsettings_test.py b/sources/pyside6/tests/QtCore/qsettings_test.py
new file mode 100644
index 000000000..466d7d33b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qsettings_test.py
@@ -0,0 +1,115 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QDate'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from PySide6.QtCore import QSettings
+
+class TestQSettings(unittest.TestCase):
+ def testConversions(self):
+ file_path = adjust_filename('qsettings_test.ini', __file__)
+ settings = QSettings(file_path, QSettings.IniFormat)
+
+ r = settings.value('var1')
+ self.assertEqual(type(r), list)
+
+ r = settings.value('var2')
+ self.assertEqual(type(r), str)
+
+ r = settings.value('var2', type=list)
+ self.assertEqual(type(r), list)
+
+
+ def testDefaultValueConversion(self):
+ settings = QSettings('foo.ini', QSettings.IniFormat)
+ settings.setValue('zero_value', 0)
+ settings.setValue('empty_list', [])
+ settings.setValue('bool1', False)
+ settings.setValue('bool2', True)
+ del settings
+
+ # Loading values already set
+ settings = QSettings('foo.ini', QSettings.IniFormat)
+
+ # Getting value that doesn't exist
+ r = settings.value("variable")
+ self.assertEqual(type(r), type(None))
+
+ # Handling zero value
+ r = settings.value('zero_value')
+ self.assertEqual(type(r), int)
+
+ r = settings.value('zero_value', type=int)
+ self.assertEqual(type(r), int)
+
+ # Empty list
+ r = settings.value('empty_list')
+ self.assertTrue(len(r) == 0)
+ self.assertEqual(type(r), list)
+
+ r = settings.value('empty_list', type=list)
+ self.assertTrue(len(r) == 0)
+ self.assertEqual(type(r), list)
+
+ # Booleans
+ r = settings.value('bool1')
+ self.assertEqual(type(r), bool)
+
+ r = settings.value('bool2')
+ self.assertEqual(type(r), bool)
+
+ r = settings.value('bool1', type=bool)
+ self.assertEqual(type(r), bool)
+
+ r = settings.value('bool2', type=int)
+ self.assertEqual(type(r), int)
+
+ r = settings.value('bool2', type=bool)
+ self.assertEqual(type(r), bool)
+
+ # Not set variable, but with default value
+ r = settings.value('lala', 22, type=bytes)
+ self.assertEqual(type(r), bytes)
+
+ r = settings.value('lala', 22, type=int)
+ self.assertEqual(type(r), int)
+
+ r = settings.value('lala', 22, type=float)
+ self.assertEqual(type(r), float)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qsize_test.py b/sources/pyside6/tests/QtCore/qsize_test.py
new file mode 100644
index 000000000..3767c47f4
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qsize_test.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QSize'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QSize
+
+class QSizeOperator(unittest.TestCase):
+ def testOperatorMultiply(self):
+ #QSize operator * float
+ # bug 131
+ a = QSize(1, 1)
+ x = a * 3.4
+ self.assertEqual(QSize(3, 3), x)
+
+ def testOperatorRevertedMultiply(self):
+ #QSize operator * float, reverted
+ # bug 132
+ a = QSize(1, 1)
+ x = 3.4 * a
+ self.assertEqual(QSize(3, 3), x)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qslot_object_test.py b/sources/pyside6/tests/QtCore/qslot_object_test.py
new file mode 100644
index 000000000..4ece2116f
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qslot_object_test.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+from PySide6 import QtCore
+
+"""
+This is a simple slot test that was updated to use the qApp "macro".
+It is implicitly in builtins and does not need an import.
+"""
+
+class objTest(QtCore.QObject):
+
+ def __init__(self, parent=None):
+ QtCore.QObject.__init__(self, parent)
+
+ self.ok = False
+
+ def slot(self):
+ self.ok = True
+ qApp.quit()
+
+
+class slotTest(unittest.TestCase):
+ def quit_app(self):
+ qApp.quit()
+
+ def testBasic(self):
+ timer = QtCore.QTimer()
+ timer.setInterval(100)
+
+ my_obj = objTest()
+ my_slot = QtCore.SLOT("slot()")
+ QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), my_obj, my_slot)
+ timer.start(100)
+
+ QtCore.QTimer.singleShot(1000, self.quit_app)
+ qApp.exec_()
+
+ self.assertTrue(my_obj.ok)
+
+
+if __name__ == '__main__':
+ QtCore.QCoreApplication()
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qsocketnotifier_test.py b/sources/pyside6/tests/QtCore/qsocketnotifier_test.py
new file mode 100644
index 000000000..2414e1d13
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qsocketnotifier_test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QUuid'''
+
+import os
+import socket
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication
+from PySide6.QtCore import QSocketNotifier
+
+
+class QSocketNotifierTest(unittest.TestCase):
+ def testClass(self):
+ app = QApplication([])
+ # socketpair is not available on Windows
+ if os.name != "nt":
+ w_sock, r_sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
+
+ self.assertIsInstance(r_sock.fileno(), int)
+
+ notifier = QSocketNotifier(r_sock.fileno(), QSocketNotifier.Read)
+
+ self.assertIsNotNone(notifier)
+
+ w_sock.close()
+ r_sock.close()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qsrand_test.py b/sources/pyside6/tests/QtCore/qsrand_test.py
new file mode 100644
index 000000000..c97036831
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qsrand_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import gc
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QRandomGenerator
+
+class OverflowExceptionCollect(unittest.TestCase):
+ '''Test case for OverflowError exception during garbage collection. See bug #147'''
+
+ def testOverflow(self):
+ # NOTE: PyQt4 raises TypeError, but boost.python raises OverflowError
+ self.assertRaises(OverflowError, QRandomGenerator, 42415335332353253)
+ # should not abort if bug #147 is fixed
+ gc.collect()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qstandardpaths_test.py b/sources/pyside6/tests/QtCore/qstandardpaths_test.py
new file mode 100644
index 000000000..0def7f451
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qstandardpaths_test.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QStandardPaths'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QStandardPaths
+
+class QStandardPathsTest(unittest.TestCase):
+ def testTestModeEnabled(self):
+ print("QStandardPaths.isTestModeEnabled:", QStandardPaths.isTestModeEnabled())
+ sp = True
+ QStandardPaths.setTestModeEnabled(sp)
+ self.assertEqual(QStandardPaths.isTestModeEnabled(), sp)
+ sp = False
+ QStandardPaths.setTestModeEnabled(sp)
+ self.assertEqual(QStandardPaths.isTestModeEnabled(), sp)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qstorageinfo_test.py b/sources/pyside6/tests/QtCore/qstorageinfo_test.py
new file mode 100644
index 000000000..8dd1da73d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qstorageinfo_test.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QStorageInfo'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QStorageInfo
+
+class QandardPathsTest(unittest.TestCase):
+ def testQStorageInfo(self):
+ for v in QStorageInfo.mountedVolumes():
+ print(v.name(), v.rootPath(), v.device())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qstring_test.py b/sources/pyside6/tests/QtCore/qstring_test.py
new file mode 100644
index 000000000..86f55649f
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qstring_test.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QString'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class QStringConstructor(unittest.TestCase):
+ '''Test case for QString constructors'''
+
+ def testQStringDefault(self):
+ obj = QObject()
+ obj.setObjectName('foo')
+ self.assertEqual(obj.objectName(), 'foo')
+ obj.setObjectName('áâãà')
+ self.assertEqual(obj.objectName(), 'áâãà')
+ obj.setObjectName(None)
+ self.assertEqual(obj.objectName(), '')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qsysinfo_test.py b/sources/pyside6/tests/QtCore/qsysinfo_test.py
new file mode 100644
index 000000000..31c6f04a4
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qsysinfo_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QSysInfo
+
+class TestQSysInfo(unittest.TestCase):
+ def testEnumEndian(self):
+ self.assertEqual(QSysInfo.BigEndian, 0)
+ self.assertEqual(QSysInfo.LittleEndian, 1)
+ self.assertTrue(QSysInfo.ByteOrder > -1)
+
+ def testEnumSizes(self):
+ self.assertTrue(QSysInfo.WordSize > 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qtextstream_test.py b/sources/pyside6/tests/QtCore/qtextstream_test.py
new file mode 100644
index 000000000..1a60f8535
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qtextstream_test.py
@@ -0,0 +1,111 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QTextStream'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray, QTextStream, QIODevice, QFile
+
+class QTextStreamShiftTest(unittest.TestCase):
+
+ def setUp(self):
+ self.ba = QByteArray()
+ self.read = QTextStream(self.ba, QIODevice.ReadOnly)
+ self.write = QTextStream(self.ba, QIODevice.WriteOnly)
+
+ def testNumber(self):
+ '''QTextStream << number'''
+
+ self.write << '4'
+ self.write.flush()
+ res = self.read.readLine()
+ self.assertTrue(isinstance(res, str))
+ self.assertEqual(res, '4')
+
+class QTextStreamGetSet(unittest.TestCase):
+
+ def setUp(self):
+ self.obj = QTextStream()
+
+ def testDevice(self):
+ '''QTextStream get/set Device'''
+ device = QFile()
+ self.obj.setDevice(device)
+ self.assertEqual(device, self.obj.device())
+ self.obj.setDevice(None)
+ self.assertEqual(None, self.obj.device())
+
+class QTextStreamInitialization(unittest.TestCase):
+
+ def testConstruction(self):
+ '''QTextStream construction'''
+ obj = QTextStream()
+
+ self.assertEqual(obj.device(), None)
+ self.assertEqual(obj.string(), None)
+
+ self.assertTrue(obj.atEnd())
+ self.assertEqual(obj.readAll(), '')
+
+class QTextStreamReadLinesFromDevice(unittest.TestCase):
+
+ def _check_data(self, data_set):
+
+ for data, lines in data_set:
+ stream = QTextStream(data)
+
+ res = []
+ while not stream.atEnd():
+ res.append(stream.readLine())
+
+ self.assertEqual(res, lines)
+
+ def testLatin1(self):
+ '''QTextStream readLine for simple Latin1 strings'''
+
+ data = []
+
+ data.append((QByteArray(), []))
+ data.append((QByteArray(bytes('\n', "UTF-8")), ['']))
+ data.append((QByteArray(bytes('\r\n', "UTF-8")), ['']))
+ data.append((QByteArray(bytes('ole', "UTF-8")), ['ole']))
+ data.append((QByteArray(bytes('ole\n', "UTF-8")), ['ole']))
+ data.append((QByteArray(bytes('ole\r\n', "UTF-8")), ['ole']))
+ data.append((QByteArray(bytes('ole\r\ndole\r\ndoffen', "UTF-8")), ['ole', 'dole', 'doffen']))
+
+ self._check_data(data)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py b/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py
new file mode 100644
index 000000000..c055794f8
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qthread_prod_cons_test.py
@@ -0,0 +1,142 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Producer-Consumer test/example with QThread'''
+
+import logging
+import os
+from random import random
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+logging.basicConfig(level=logging.WARNING)
+
+from PySide6.QtCore import QThread, QCoreApplication, QObject, SIGNAL
+
+class Bucket(QObject):
+ '''Dummy class to hold the produced values'''
+ def __init__(self, max_size=10, *args):
+ #Constructor which receives the max number of produced items
+ super(Bucket, self).__init__(*args)
+ self.data = []
+ self.max_size = 10
+
+ def pop(self):
+ #Retrieves an item
+ return self.data.pop(0)
+
+ def push(self, data):
+ #Pushes an item
+ self.data.append(data)
+
+class Producer(QThread):
+ '''Producer thread'''
+
+ def __init__(self, bucket, *args):
+ #Constructor. Receives the bucket
+ super(Producer, self).__init__(*args)
+ self.runs = 0
+ self.bucket = bucket
+ self.production_list = []
+
+ def run(self):
+ #Produces at most bucket.max_size items
+ while self.runs < self.bucket.max_size:
+ value = int(random()*10) % 10
+ self.bucket.push(value)
+ self.production_list.append(value)
+ logging.debug('PRODUCER - pushed %d' % value)
+ self.runs += 1
+ self.msleep(5)
+
+
+
+class Consumer(QThread):
+ '''Consumer thread'''
+ def __init__(self, bucket, *args):
+ #Constructor. Receives the bucket
+ super(Consumer, self).__init__(*args)
+ self.runs = 0
+ self.bucket = bucket
+ self.consumption_list = []
+
+ def run(self):
+ #Consumes at most bucket.max_size items
+ while self.runs < self.bucket.max_size:
+ try:
+ value = self.bucket.pop()
+ self.consumption_list.append(value)
+ logging.debug('CONSUMER - got %d' % value)
+ self.runs += 1
+ except IndexError:
+ logging.debug('CONSUMER - empty bucket')
+ self.msleep(5)
+
+class ProducerConsumer(unittest.TestCase):
+ '''Basic test case for producer-consumer QThread'''
+
+ def setUp(self):
+ #Create fixtures
+ self.app = QCoreApplication([])
+
+ def tearDown(self):
+ #Destroy fixtures
+ del self.app
+
+ def finishCb(self):
+ #Quits the application
+ self.app.exit(0)
+
+ def testProdCon(self):
+ #QThread producer-consumer example
+ bucket = Bucket()
+ prod = Producer(bucket)
+ cons = Consumer(bucket)
+
+ prod.start()
+ cons.start()
+
+ QObject.connect(prod, SIGNAL('finished()'), self.finishCb)
+ QObject.connect(cons, SIGNAL('finished()'), self.finishCb)
+
+ self.app.exec_()
+
+ prod.wait(50)
+ cons.wait(50)
+
+ self.assertEqual(prod.production_list, cons.consumption_list)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qthread_signal_test.py b/sources/pyside6/tests/QtCore/qthread_signal_test.py
new file mode 100644
index 000000000..de795d740
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qthread_signal_test.py
@@ -0,0 +1,97 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for connecting signals between threads'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QThread, QObject, SIGNAL, QCoreApplication
+
+thread_run = False
+
+class Source(QObject):
+ def __init__(self, *args):
+ QObject.__init__(self, *args)
+
+ def emit_sig(self):
+ self.emit(SIGNAL('source()'))
+
+class Target(QObject):
+ def __init__(self, *args):
+ QObject.__init__(self, *args)
+ self.called = False
+
+ def myslot(self):
+ self.called = True
+
+class ThreadJustConnects(QThread):
+ def __init__(self, source, *args):
+ QThread.__init__(self, *args)
+ self.source = source
+ self.target = Target()
+
+ def run(self):
+ global thread_run
+ thread_run = True
+ QObject.connect(self.source, SIGNAL('source()'), self.target.myslot)
+
+ while not self.target.called:
+ pass
+
+
+
+class BasicConnection(unittest.TestCase):
+
+ def testEmitOutsideThread(self):
+ global thread_run
+
+ app = QCoreApplication([])
+ source = Source()
+ thread = ThreadJustConnects(source)
+
+ QObject.connect(thread, SIGNAL('finished()'), lambda: app.exit(0))
+ thread.start()
+
+ while not thread_run:
+ pass
+
+ source.emit_sig()
+
+ app.exec_()
+ thread.wait()
+
+ self.assertTrue(thread.target.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qthread_test.py b/sources/pyside6/tests/QtCore/qthread_test.py
new file mode 100644
index 000000000..951c89819
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qthread_test.py
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QThread'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QThread, QCoreApplication, QObject, SIGNAL, QMutex, QTimer
+from PySide6.QtCore import QEventLoop
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+mutex = QMutex()
+
+class Dummy(QThread):
+ '''Dummy thread'''
+ def __init__(self, *args):
+ super(Dummy, self).__init__(*args)
+ self.called = False
+
+ def run(self):
+ #Start-quit sequence
+ self.qobj = QObject()
+ mutex.lock()
+ self.called = True
+ mutex.unlock()
+
+class QThreadSimpleCase(UsesQCoreApplication):
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.called = False
+
+ def tearDown(self):
+ UsesQCoreApplication.tearDown(self)
+
+ def testThread(self):
+ #Basic QThread test
+ obj = Dummy()
+ obj.start()
+ self.assertTrue(obj.wait(100))
+
+ self.assertTrue(obj.called)
+
+ def cb(self, *args):
+ self.called = True
+ #self.exit_app_cb()
+
+ def abort_application(self):
+ if self._thread.isRunning():
+ self._thread.terminate()
+ self.app.quit()
+
+ def testSignalFinished(self):
+ #QThread.finished() (signal)
+ obj = Dummy()
+ QObject.connect(obj, SIGNAL('finished()'), self.cb)
+ mutex.lock()
+ obj.start()
+ mutex.unlock()
+
+ self._thread = obj
+ QTimer.singleShot(1000, self.abort_application)
+ self.app.exec_()
+
+ self.assertTrue(self.called)
+
+ def testSignalStarted(self):
+ #QThread.started() (signal)
+ obj = Dummy()
+ QObject.connect(obj, SIGNAL('started()'), self.cb)
+ obj.start()
+
+ self._thread = obj
+ QTimer.singleShot(1000, self.abort_application)
+ self.app.exec_()
+
+ self.assertEqual(obj.qobj.thread(), obj) # test QObject.thread() method
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
new file mode 100644
index 000000000..891e37a65
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qtimer_singleshot_test.py
@@ -0,0 +1,112 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QTimer.singleShot'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer, QCoreApplication, Signal
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class WatchDog(QObject):
+ '''Exits the QCoreApplication main loop after sometime.'''
+
+ def __init__(self, watched):
+ QObject.__init__(self)
+ self.times_called = 0
+ self.watched = watched
+
+ def timerEvent(self, evt):
+ self.times_called += 1
+ if self.times_called == 20:
+ self.watched.exit_app_cb()
+
+class TestSingleShot(UsesQCoreApplication):
+ '''Test case for QTimer.singleShot'''
+
+ def setUp(self):
+ #Acquire resources
+ UsesQCoreApplication.setUp(self)
+ self.watchdog = WatchDog(self)
+ self.called = False
+
+ def tearDown(self):
+ #Release resources
+ del self.watchdog
+ del self.called
+ UsesQCoreApplication.tearDown(self)
+
+ def callback(self):
+ self.called = True
+ self.app.quit()
+
+ def testSingleShot(self):
+ QTimer.singleShot(100, self.callback)
+ self.app.exec_()
+ self.assertTrue(self.called)
+
+class SigEmitter(QObject):
+
+ sig1 = Signal()
+
+
+class TestSingleShotSignal(UsesQCoreApplication):
+ '''Test case for QTimer.singleShot connecting to signals'''
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.watchdog = WatchDog(self)
+ self.called = False
+
+ def tearDown(self):
+ del self.watchdog
+ del self.called
+ UsesQCoreApplication.tearDown(self)
+
+ def callback(self):
+ self.called = True
+ self.app.quit()
+
+ def testSingleShotSignal(self):
+ emitter = SigEmitter()
+ emitter.sig1.connect(self.callback)
+ QTimer.singleShot(100, emitter.sig1)
+ self.app.exec_()
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qtimer_timeout_test.py b/sources/pyside6/tests/QtCore/qtimer_timeout_test.py
new file mode 100644
index 000000000..048555dd7
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qtimer_timeout_test.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for timeout() signals from QTimer object.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer, SIGNAL
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class WatchDog(QObject):
+ '''Exits the QCoreApplication main loop after sometime.'''
+
+ def __init__(self, watched):
+ QObject.__init__(self)
+ self.times_called = 0
+ self.watched = watched
+
+ def timerEvent(self, evt):
+ self.times_called += 1
+ if self.times_called == 20:
+ self.watched.exit_app_cb()
+
+
+class TestTimeoutSignal(UsesQCoreApplication):
+ '''Test case to check if the signals are really being caught'''
+
+ def setUp(self):
+ #Acquire resources
+ UsesQCoreApplication.setUp(self)
+ self.watchdog = WatchDog(self)
+ self.timer = QTimer()
+ self.called = False
+
+ def tearDown(self):
+ #Release resources
+ del self.watchdog
+ del self.timer
+ del self.called
+ UsesQCoreApplication.tearDown(self)
+
+ def callback(self, *args):
+ #Default callback
+ self.called = True
+
+ def testTimeoutSignal(self):
+ #Test the QTimer timeout() signal
+ refCount = sys.getrefcount(self.timer)
+ QObject.connect(self.timer, SIGNAL('timeout()'), self.callback)
+ self.timer.start(4)
+ self.watchdog.startTimer(10)
+
+ self.app.exec_()
+
+ self.assertTrue(self.called)
+ self.assertEqual(sys.getrefcount(self.timer), refCount)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/qtimezone_test.py b/sources/pyside6/tests/QtCore/qtimezone_test.py
new file mode 100644
index 000000000..0a0ec99a9
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qtimezone_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimeZone
+
+class TestQTimeZone (unittest.TestCase):
+ def testTimeZone(self):
+ id = bytes('Europe/Berlin', "UTF-8")
+ timeZone = QTimeZone(id)
+ self.assertTrue(timeZone.isValid())
+ self.assertEqual(timeZone.id(), id)
+ name = timeZone.displayName(QTimeZone.GenericTime, QTimeZone.DefaultName)
+ self.assertTrue(name)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qtnamespace_test.py b/sources/pyside6/tests/QtCore/qtnamespace_test.py
new file mode 100644
index 000000000..06287cb09
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qtnamespace_test.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test suite for QtCore.Qt namespace'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt
+
+class QtNamespace(unittest.TestCase):
+ '''Test case for accessing attributes from Qt namespace'''
+
+ def testBasic(self):
+ #Access to Qt namespace
+ getattr(Qt, 'Horizontal')
+ getattr(Qt, 'WindowMaximizeButtonHint')
+ self.assertTrue(True)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtCore/quoteEnUS.txt b/sources/pyside6/tests/QtCore/quoteEnUS.txt
index 909b4fa17..909b4fa17 100644
--- a/sources/pyside2/tests/QtCore/quoteEnUS.txt
+++ b/sources/pyside6/tests/QtCore/quoteEnUS.txt
diff --git a/sources/pyside6/tests/QtCore/qurl_test.py b/sources/pyside6/tests/QtCore/qurl_test.py
new file mode 100644
index 000000000..91924e7db
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qurl_test.py
@@ -0,0 +1,169 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test suite for QtCore.QUrl'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUrl
+from PySide6.QtCore import QUrlQuery
+
+class QUrlBasicConstructor(unittest.TestCase):
+ '''Tests the basic constructors'''
+
+ def testBasic(self):
+ #Default constructor for QUrl
+ url = QUrl()
+ self.assertEqual(url.toString(), "")
+
+ def testSetAttributes(self):
+ #Construct QUrl by set* methods
+ url = QUrl()
+
+ url.setScheme('ftp')
+ self.assertEqual(url.toString(), 'ftp:')
+
+ url.setHost('www.google.com')
+ self.assertEqual(url.toString(), 'ftp://www.google.com')
+
+ url.setPort(8080)
+ self.assertEqual(url.toString(), 'ftp://www.google.com:8080')
+
+ url.setPath('/mail/view')
+ self.assertEqual(url.toString(),
+ 'ftp://www.google.com:8080/mail/view')
+
+ url.setUserName('john')
+ self.assertEqual(url.toString(),
+ 'ftp://john@www.google.com:8080/mail/view')
+
+ url.setPassword('abc123')
+ self.assertEqual(url.toString(),
+ 'ftp://john:abc123@www.google.com:8080/mail/view')
+
+class QueryItemsTest(unittest.TestCase):
+ '''Test query item management'''
+
+ def testQueryItems(self):
+ url = QUrl('http://www.google.com/search?q=python&hl=en')
+ valid_data = [(('q'), ('python')), (('hl'), ('en'))]
+
+ self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
+
+ def testEncodedQueryItems(self):
+ url = QUrl('http://www.google.com/search?q=python&hl=en')
+ valid_data = [(('q'), ('python')), (('hl'), ('en'))]
+
+ self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
+
+ def testSetQueryItems(self):
+ urla = QUrl('http://www.google.com/search?q=python&hl=en')
+ urlb = QUrl('http://www.google.com/search')
+
+ urlb.setQuery(urla.query())
+
+ self.assertEqual(urla, urlb)
+
+ def testAddQueryItem(self):
+ url = QUrlQuery()
+ valid_data = [('hl', 'en'), ('user', 'konqui')]
+
+ url.addQueryItem(*valid_data[0])
+ self.assertEqual(url.queryItems()[0], valid_data[0])
+
+ url.addQueryItem(*valid_data[1])
+ self.assertEqual(sorted(url.queryItems()), sorted(valid_data))
+
+ def testAllQueryItemsValues(self):
+ url = QUrlQuery()
+ key = 'key'
+ valid_data = ['data', 'valid', 'test']
+
+ for i, data in enumerate(valid_data):
+ url.addQueryItem(key, data)
+ self.assertEqual(url.allQueryItemValues(key),
+ list(valid_data[:i+1]))
+
+ def testPath(self):
+ url = QUrl("http://qt-project.org/images/ban/pgs_front.jpg")
+ self.assertEqual(url.path(), "/images/ban/pgs_front.jpg")
+
+# PYSIDE-345: No bindings for QUrlQuery
+class QueryItemsTest(unittest.TestCase):
+ '''Test query item management'''
+
+ def testQueryItems(self):
+ url = QUrl('http://www.google.com/search?q=python&hl=en')
+ valid_data = [(('q'), ('python')), (('hl'), ('en'))]
+
+ self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
+
+ def testEncodedQueryItems(self):
+ url = QUrl('http://www.google.com/search?q=python&hl=en')
+ valid_data = [(('q'), ('python')), (('hl'), ('en'))]
+
+ self.assertEqual(sorted(QUrlQuery(url.query()).queryItems()), sorted(valid_data))
+
+ def testSetQueryItems(self):
+ urla = QUrl('http://www.google.com/search?q=python&hl=en')
+ urlb = QUrl('http://www.google.com/search')
+
+ urlb.setQuery(urla.query())
+
+ self.assertEqual(urla, urlb)
+
+ def testAddQueryItem(self):
+ url = QUrlQuery()
+ valid_data = [('hl', 'en'), ('user', 'konqui')]
+
+ url.addQueryItem(*valid_data[0])
+ self.assertEqual(url.queryItems()[0], valid_data[0])
+
+ url.addQueryItem(*valid_data[1])
+ self.assertEqual(sorted(url.queryItems()), sorted(valid_data))
+
+ def testAllQueryItemsValues(self):
+ url = QUrlQuery()
+ key = 'key'
+ valid_data = ['data', 'valid', 'test']
+
+ for i, data in enumerate(valid_data):
+ url.addQueryItem(key, data)
+ self.assertEqual(url.allQueryItemValues(key),
+ list(valid_data[:i+1]))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qurlquery_test.py b/sources/pyside6/tests/QtCore/qurlquery_test.py
new file mode 100644
index 000000000..698912630
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qurlquery_test.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QUrlQuery'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUrlQuery
+
+class QUrlQueryTest(unittest.TestCase):
+ def testConstructing(self):
+ empty = QUrlQuery()
+ self.assertTrue(empty.isEmpty())
+
+ empty.clear();
+ self.assertTrue(empty.isEmpty())
+
+ def testAddRemove(self):
+ query = QUrlQuery()
+
+ query.addQueryItem("a", "b");
+ self.assertTrue(not query.isEmpty())
+ self.assertTrue(query.hasQueryItem("a"))
+ self.assertEqual(query.queryItemValue("a"), "b")
+ self.assertEqual(query.allQueryItemValues("a"), ["b"])
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/quuid_test.py b/sources/pyside6/tests/QtCore/quuid_test.py
new file mode 100644
index 000000000..8e02687e0
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/quuid_test.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QUuid'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUuid
+
+class QUuidTest(unittest.TestCase):
+ def testFromString(self):
+ uuidString = '{fc69b59e-cc34-4436-a43c-ee95d128b8c5}'
+# testing overload QUUid::fromString(QStringView)
+ uuid = QUuid.fromString(uuidString)
+ self.assertTrue(not uuid.isNull())
+ self.assertEqual(uuid.toString(), uuidString)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/qversionnumber_test.py b/sources/pyside6/tests/QtCore/qversionnumber_test.py
new file mode 100644
index 000000000..3621bb69d
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/qversionnumber_test.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QVersionNumber'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QVersionNumber
+
+class QVersionNumberTest(unittest.TestCase):
+ def testFromString(self):
+ versionString = '5.9.2'
+ version = QVersionNumber.fromString(versionString)
+ self.assertTrue(not version.isNull())
+ self.assertEqual(version.majorVersion(), 5)
+ self.assertEqual(version.minorVersion(), 9)
+ self.assertEqual(version.microVersion(), 2)
+ self.assertEqual(version.toString(), versionString)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/repr_test.py b/sources/pyside6/tests/QtCore/repr_test.py
new file mode 100644
index 000000000..34797de0a
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/repr_test.py
@@ -0,0 +1,111 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF
+from PySide6.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QPoint, QPointF
+try:
+ from PySide6.QtCore import QUuid
+ HAVE_Q = True
+except ImportError:
+ HAVE_Q = False
+
+class ReprCopyHelper:
+ def testCopy(self):
+ copy = eval(self.original.__repr__())
+ self.assertTrue(copy is not self.original)
+ self.assertEqual(copy, self.original)
+
+class QByteArrayReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QByteArray(bytes('the quick brown fox jumps over the lazy dog', "UTF-8"))
+
+
+class QDateReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QDate(2010, 11, 22)
+
+
+class QTimeReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QTime(11, 37, 55, 692)
+
+
+class QDateTimeReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QDateTime(2010, 5, 18, 10, 24, 45, 223, Qt.LocalTime)
+
+
+class QSizeReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QSize(42, 190)
+
+
+class QSizeFReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QSizeF(42.7, 190.2)
+
+class QRectReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QRect(100, 200, 300, 400)
+
+class QRectFReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QRectF(100.33, 200.254, 300.321, 400.123)
+
+class QLineReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QLine(1, 2, 3, 4)
+
+class QLineFReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QLineF(1.1, 2.2, 3.3, 4.4)
+
+class QPointReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QPoint(1, 2)
+
+class QPointFReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QPointF(1.1, 2.2)
+
+class QUuiCopy(ReprCopyHelper, unittest.TestCase):
+ @unittest.skipUnless(HAVE_Q, "QUuid is currently not supported on this platform.")
+ def setUp(self):
+ self.original = QUuid("67C8770B-44F1-410A-AB9A-F9B5446F13EE")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtCore/resources.qrc b/sources/pyside6/tests/QtCore/resources.qrc
index 0a0b03d40..0a0b03d40 100644
--- a/sources/pyside2/tests/QtCore/resources.qrc
+++ b/sources/pyside6/tests/QtCore/resources.qrc
diff --git a/sources/pyside6/tests/QtCore/resources_mc.py b/sources/pyside6/tests/QtCore/resources_mc.py
new file mode 100644
index 000000000..0de0a8774
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/resources_mc.py
@@ -0,0 +1,3571 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Resource object code
+#
+# Created: Thu Feb 3 16:09:36 2011
+# by: The Resource Compiler for PySide (Qt v4.6.3)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PySide6 import QtCore
+
+qt_resource_data = b"""\
+\x00\x00\x00\x35\
+\x46\
+\x69\x6e\x65\x21\x20\x44\x69\x73\x68\x6f\x6e\x6f\x72\x21\x20\x44\
+\x69\x73\x68\x6f\x6e\x6f\x72\x20\x6f\x6e\x20\x79\x6f\x75\x2c\x20\
+\x64\x69\x73\x68\x6f\x6e\x6f\x72\x20\x6f\x6e\x20\x79\x61\x20\x63\
+\x6f\x77\x21\x0a\
+\x00\x00\xda\x88\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\xb1\x00\x00\x00\xd2\x08\x06\x00\x00\x00\x05\x49\x21\x31\
+\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\
+\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\
+\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\x01\
+\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xda\x03\x0a\
+\x0c\x02\x2e\xb0\x96\x99\x74\x00\x00\x00\x19\x74\x45\x58\x74\x43\
+\x6f\x6d\x6d\x65\x6e\x74\x00\x43\x72\x65\x61\x74\x65\x64\x20\x77\
+\x69\x74\x68\x20\x47\x49\x4d\x50\x57\x81\x0e\x17\x00\x00\x20\x00\
+\x49\x44\x41\x54\x78\xda\x94\xbd\xd9\xaf\x24\xd9\x7a\xdd\xf7\x8b\
+\x21\x33\x77\x44\xe4\x9c\xa7\xaa\xcf\xa9\xb1\xab\x87\x6b\xf2\x92\
+\xd4\x15\x49\x0b\x84\x64\xd9\x22\x64\x3f\xd8\x30\x0c\xd8\x8f\x34\
+\xfc\x68\x43\x7f\x8b\xfe\x04\x02\x06\xfc\x64\xbf\xd1\x06\x04\x13\
+\x7a\x30\x65\x59\x04\x4d\x03\xa4\x48\xba\x29\xf9\x72\xb8\xdd\x5d\
+\x55\x5d\xc3\x39\x75\xea\x9c\x9c\x23\xf6\xce\xcc\x18\xfc\xb0\x87\
+\x88\xc8\xcc\x6a\xd9\xd9\x68\x44\xce\x79\x2a\x73\xc5\x8a\xb5\xd7\
+\xb7\xbe\x2f\xbc\xdf\xff\x17\xbf\x57\x09\x00\x15\x82\xc8\x29\x89\
+\xb0\x97\x24\xaa\x90\x52\x51\x12\x91\x44\x95\xb9\x37\x42\x56\x1e\
+\x91\x97\x91\x4a\xcf\x3d\x27\x8a\x04\x12\x1a\xaf\xd6\xcf\x45\x54\
+\xa0\x3c\x7e\xfc\x22\xeb\xe7\x9b\xeb\xfa\xbd\xea\xdb\x08\x01\x4a\
+\x01\x11\x42\x54\x28\xe5\xe9\x2d\x20\xc0\xdd\x6e\x5e\xdc\x7d\x4a\
+\x02\x7d\x2a\xd1\x73\x8f\x79\x6a\x07\xa2\xa0\x22\xd6\xd7\x81\x24\
+\xdb\xe3\x8d\x87\xad\xf7\xc8\xe3\x12\x80\x30\xf3\xc9\xe3\x92\x30\
+\xf3\x09\x63\x81\x22\x43\x10\x03\x99\x79\x66\x6c\xfe\xce\x12\x94\
+\x5f\xbf\xc1\xd1\xed\x38\x28\xf4\xfb\x85\x11\x79\x2e\xf1\x37\x7d\
+\xb6\xb1\xe4\x61\x76\xe0\xf6\xe5\x82\xc3\x04\x46\xe3\x01\x00\x7d\
+\x42\xb6\xe4\x4c\xbd\x31\xd5\x70\xc3\xc6\xef\x33\x28\xb7\x78\xeb\
+\x01\xeb\x47\x01\x09\x3d\x52\x76\x24\xe8\x7f\x57\x90\x29\x3a\x71\
+\x0f\x45\xfd\x7d\x77\x85\x60\xaf\xd4\xc9\x37\x2e\x44\x81\x52\x01\
+\x82\x0a\x85\x87\xcc\x04\xdf\x7e\xbc\x67\x1c\x06\xfa\xfb\x99\x54\
+\xcc\x98\x50\x72\x4f\x12\x27\x88\x69\x42\x99\x15\x27\xef\xe3\xc7\
+\x41\xeb\xfe\xbd\x52\xc8\x4c\x00\x50\x72\x8f\xcf\x8c\x49\x2c\x29\
+\x45\x84\x1f\x07\x54\x9d\x11\xde\x61\xa5\x1f\xcf\x0a\x56\x73\xb8\
+\x5b\xbc\xa4\x5a\xae\x4f\xde\xdb\x1b\x0f\x19\x52\xf1\xd9\xe3\x11\
+\x4c\x1f\x52\x75\x46\x27\xcf\x79\xf4\xe8\x6b\x42\xfd\x63\x07\x20\
+\x72\x50\x01\xb0\xa7\x2b\xba\xec\x91\xec\xa5\x06\x88\xaf\x0e\x48\
+\x72\x03\x18\x0d\xea\x14\x8f\x3d\x12\x64\xc4\x1e\x40\xda\xfb\x61\
+\x8f\x44\x00\x25\x5e\x8d\x4f\xc0\x47\x52\x12\x31\x2c\x3d\xd6\x7e\
+\xe5\x6e\x83\x47\x15\x65\x78\xd2\xc3\x8f\xa0\x94\xfa\x47\x90\x91\
+\xa4\xb4\x3b\x8a\x52\x06\xd2\x12\x94\x05\xa9\xbe\x47\x99\x5d\x47\
+\x35\x76\x16\x0b\x68\x0d\xe4\x08\xa5\x4a\x03\x66\xe8\x09\xfd\xfc\
+\xca\x00\xaf\x12\x3d\xfa\xf3\x0d\x69\xdc\xa5\xf2\xf5\xeb\x06\xa5\
+\xc7\xc6\xaf\x18\x64\x3e\x79\x2c\xd0\x1f\x1a\x93\xc7\x10\x02\x82\
+\xb8\x01\xe4\x06\x58\x9b\x00\x06\x8a\x2a\x26\x40\x11\x67\x92\x2c\
+\x8e\xc8\x8a\x80\xa2\x27\x98\x50\xd6\xc0\xce\x24\x19\x53\x1e\xbe\
+\x80\x2d\x39\x7d\x42\xd4\x7c\x05\xd3\x11\x7d\x42\xf6\xd5\x16\x56\
+\x1e\x83\xd1\x96\xd5\x6a\x44\x39\xd8\x32\xe2\x82\x42\x1c\x10\xf8\
+\xa0\x34\x80\x01\x14\x1e\x5d\x21\xda\x80\xa5\xa2\x14\x91\x03\x73\
+\x57\x08\x94\x52\xee\x7e\x94\xe2\x2f\x6e\x7e\xce\x24\xeb\xc3\x64\
+\x48\x31\x9a\x10\x2c\x16\x94\x13\x0d\xc2\xae\xf8\x34\xfd\x34\x01\
+\x5c\x55\x63\xba\x62\x09\x68\x20\xfb\xcc\xea\xbf\xc9\x3e\x7f\x59\
+\x12\x24\xf5\x0e\xc0\xbc\x60\xbb\x08\x48\x3c\x48\xab\x09\x89\xb7\
+\x00\x20\x8d\xbb\x24\xcb\x35\x98\x1d\x1a\xc0\x3b\xac\x5a\x40\xf6\
+\x0e\x2b\x92\x7e\x07\xfd\x8d\x0b\xf3\x87\x88\x02\x44\x41\xa6\xe6\
+\x35\x9b\x01\x4a\xe4\x1a\xe8\xe6\xf6\x1e\xc9\x1e\x49\xd7\x80\xa7\
+\x4b\x64\x71\x85\xdf\x40\xed\xbe\x71\xbd\x06\x2c\x6c\xfd\xcc\xec\
+\xa9\x91\x7b\xcc\x93\xb1\x7e\x8e\xf4\xf0\x0d\xeb\x5b\x30\xa7\xd2\
+\x03\xa9\xdc\xbb\xc9\x06\x5f\xcb\x16\x9b\xd7\xcf\x50\xca\xd3\x47\
+\x81\x06\xb8\x85\xa8\xe8\x89\x88\x9d\x92\x20\x0a\xc7\xc0\x9e\xda\
+\xe9\x2f\x30\x38\xb8\x77\xdb\xf8\x15\xd1\x11\xb3\xb7\x18\x3a\x53\
+\xa7\x00\xb6\xc0\xed\x09\xb7\x0d\x76\x35\x80\x5b\xaf\xcf\x25\x59\
+\x11\x10\xb3\x26\x9c\x68\x60\x66\x0c\x99\x7a\x63\xba\x5e\x9f\x7c\
+\x9a\x68\x20\x37\x2e\x87\x95\xa7\x9f\x1f\xea\xf7\x4a\xf0\x89\x18\
+\x20\x44\x41\x11\x0b\x3a\x71\xef\x04\xc0\x80\x06\xea\x19\x66\xb6\
+\xc0\x96\x99\xe0\xe3\xdb\x1c\x80\x65\x5e\x10\xac\x34\x90\x3e\x96\
+\x17\x44\xb1\x3a\x01\xeb\xa7\x2e\x41\xb2\xd1\xdf\x7e\x56\xff\x0d\
+\xf6\xf5\x00\x45\x3a\x20\x48\x36\x54\x9d\x11\x65\x56\x50\xa4\x83\
+\xd6\xe3\x16\xc0\xcb\xaa\x20\xc9\xf6\xa4\x71\xb7\xf5\xfe\x16\xc0\
+\x96\xc9\x01\xd2\xed\x01\x3f\x57\x92\x03\x19\x76\xbb\xc9\x4b\x64\
+\xd8\x63\x93\x97\xe4\x4a\xb2\xc9\x4b\x0e\xee\x90\x69\x7e\x33\x15\
+\x9a\x43\xc7\xbe\x05\x5a\x0b\x72\xcb\x5b\xdd\x86\xb8\x28\x3f\x71\
+\xdd\x8f\x2a\x4a\x22\xfd\x3e\x91\xa8\x81\x6c\xbe\x78\xbb\xb5\xaf\
+\x29\xa5\x57\x33\xf5\xb1\xe4\x70\xd7\x23\x07\xe0\x63\x56\xf6\xcc\
+\xbf\x45\x19\x06\x06\xe8\x77\x05\x24\x29\x69\xd1\x31\xcc\x1c\x18\
+\x00\x1b\x90\x92\x91\xc7\x82\x4c\x1f\x73\xb4\x1c\x88\x85\x79\x9f\
+\x8c\xa2\x8a\xdb\x3f\xe6\x4e\x51\xf4\x04\x83\x3c\xa5\x9f\x45\x2d\
+\x70\x0f\x7b\x5d\x27\x27\xe2\xa0\x60\x3b\xd0\xe0\xf7\x37\x7d\xca\
+\xc1\x96\x65\xe5\xc3\xd8\x27\x9c\x8c\xc8\xa7\x89\xf9\xf4\x5a\xe2\
+\x6c\x07\x3e\x49\x6c\x8f\x44\x01\x3e\x29\x25\x09\x82\xaa\x75\x88\
+\xf7\xe3\xa0\x75\x88\x3f\xbe\xde\x7c\x7e\x3e\xd2\xdf\xe7\x22\xde\
+\x32\x0e\x03\x96\xb9\x06\xec\x67\x7e\xc5\xff\x9f\x4b\x91\x0e\xd8\
+\x2b\xd5\x02\xe6\xb9\xbf\xc1\x3b\xac\xf0\xe3\x80\x20\xd9\x38\xc0\
+\xa7\xd5\x84\x65\x55\xb0\xac\x0a\xc6\x5e\xe0\xe4\x5d\x4b\x5e\x18\
+\xf0\x1e\xcb\x0a\x1f\x40\xe5\xe6\x07\x31\xdb\x6a\xb5\x43\x76\x6f\
+\xc9\x52\xc3\x6b\xf7\x1e\x07\xb1\xa9\x59\x57\xe4\x0e\xa0\xea\x88\
+\x71\xbb\x47\xaa\xf8\xdf\x75\xb1\x80\x6c\x5e\xb7\x4c\xec\x47\x15\
+\xa5\x92\x24\x51\x85\x2f\x22\xf7\xce\xb5\x3e\xaf\xb9\x58\xfe\x88\
+\x0e\x3f\xa7\x97\x05\xe0\x91\x51\x88\x94\x8d\x5f\x69\x20\x43\x83\
+\x7d\x63\xc2\x4c\x19\x29\x11\x1b\x19\x12\xb6\x98\x16\xa0\xd3\x9b\
+\x12\xec\x94\xbb\xff\x18\xa8\x00\x59\x1c\x31\xec\x75\xb5\x84\x88\
+\x43\x26\x71\x5b\x72\x0c\x09\xf0\x1f\x7b\x84\x61\x84\xff\xd8\x63\
+\x1d\x7b\x24\x71\xc2\xe8\xf1\x23\xd4\x24\xc1\x9f\x14\x74\x27\x43\
+\xb6\x03\x9f\x69\xd8\x37\x47\x80\x94\xd5\xfa\xee\x93\x8c\xdb\xbc\
+\x58\x76\xb6\x5b\x61\x8e\xbc\x16\x58\xe1\xaa\x82\xcf\x87\x4c\xb2\
+\xbe\x03\x70\x1b\x24\xe9\x89\x0e\x3e\x77\xf1\xbc\x25\x9d\xde\x65\
+\x8b\x89\x9b\x92\xc6\x32\xb5\x05\x61\x91\x1a\xed\x3f\x29\x38\x70\
+\xe7\xc0\x6b\xc1\x9c\xc6\x5d\x56\xc5\x96\xdc\xdf\x9e\x30\xb1\x05\
+\x74\x52\x76\xf1\xe7\xb1\xbe\x21\xc3\x9e\x03\xef\x7d\x25\x51\xe9\
+\x73\x7d\x7f\xf7\x16\x6f\xd4\xc3\x33\xa0\xd8\x23\x41\x05\x7a\x2b\
+\x0a\xba\x44\x8e\x99\xed\xe3\x25\x91\xd6\xd2\x47\x2c\x7d\x0c\xc0\
+\x13\xc9\xd1\x7c\xcc\xcb\x5a\xbb\x43\xa9\x34\xc3\xfa\x51\x85\x3c\
+\x62\xbe\x7a\x39\x69\x24\x85\xf2\xea\x6d\x53\x52\x58\x80\x9a\x6d\
+\x45\x4c\xa0\x12\x06\xa5\xc7\x76\xaf\xa8\x44\x8f\x4c\x2f\x13\x90\
+\x4a\xb2\xf1\xab\xc6\xc2\x0d\x02\xe5\xd3\x31\x12\xa1\x29\x17\x8a\
+\x9e\xd0\x92\xe2\xdc\x4e\x3a\xd8\xd6\x6c\x1c\xd7\xdf\xd3\x64\x3a\
+\xe3\xb3\xe1\x8c\xd1\xf0\x82\x22\x16\x24\xf4\x98\x4d\x05\x13\x31\
+\x62\x22\x46\x88\x69\x42\x57\x08\x92\x38\x21\x89\x93\x13\xb0\x0a\
+\x62\x46\xc3\x36\x68\x7d\x25\x5b\x00\x6b\x5d\x37\x40\x14\x54\x2d\
+\xe9\xd3\x15\x82\x0f\xa5\xc7\x17\xd5\x80\x7c\x90\x30\x79\xe0\x9f\
+\x2c\x00\x7f\x4c\x07\x37\x3f\xa7\xaa\xc6\x1c\x76\x37\x6e\x51\xd7\
+\x94\x16\xcd\x1d\xcc\x02\xd0\x82\x7a\xbb\xa8\xc1\x0b\xb4\x98\xd8\
+\xf3\xe6\x84\x65\x9f\xd2\x5f\xb4\x64\x84\xdd\x01\x52\x7f\x8f\x2f\
+\x3e\xd6\xd4\xac\x1e\xac\x48\x6f\xbb\x04\xc9\x15\x22\x79\xcd\x32\
+\x1e\x9f\xa7\x4f\x51\x20\x54\x48\x97\x48\x83\x56\x74\xcc\xa2\x50\
+\x33\xb1\x05\xaf\x3a\xf3\xd2\x54\x1e\x39\x15\x91\xa8\xb7\x52\xd5\
+\xb7\x81\x2d\x9a\x85\x25\x90\x44\x42\xbb\x22\x44\x2d\x80\x47\x44\
+\x48\x64\x43\x54\x44\x48\x51\x19\x38\x37\x80\x2c\xaa\xda\xc5\x30\
+\x00\x2e\x44\xda\x62\xe2\x41\xe9\xe1\xa9\x82\x98\x2e\x91\xa8\x18\
+\x94\x9e\x63\xe1\x4e\x4f\xd0\x69\x68\x5d\x0b\x5a\xa7\x7f\xab\x98\
+\x49\xec\x33\xa1\x64\x81\xef\xd8\x36\x0c\x23\xfc\x49\xa1\xc1\x48\
+\x8f\x84\x1e\x13\x31\xd2\x32\x40\x44\x74\x85\xa0\x2b\x84\x5e\xfd\
+\xf7\x8b\x5a\x0a\x64\x6b\xf6\x4a\xb1\x5a\xdf\xb1\x79\xa7\x98\xe7\
+\x5b\xfa\x1b\xf3\x99\xf3\xa5\x01\x98\x80\x78\xe8\x40\x74\xcc\xc4\
+\x4d\xb0\xa5\x94\x27\x2e\x85\xd5\xc7\x0f\xfa\x4b\xe7\x4a\xe4\xe5\
+\xd4\x49\x8a\x7d\xfe\xf6\x64\xa1\xfa\x63\x8b\x3b\xcf\x5b\xb6\x34\
+\xbf\xd5\xc4\x4d\xe9\x52\x75\x46\x0e\x80\xe7\xdc\x06\x56\xa1\x03\
+\xf3\xb2\x2a\xa8\xd6\x93\x16\x13\xdb\xc5\x5d\x90\x6c\xdc\xe7\x86\
+\xcb\x78\xcc\xc4\x82\x2e\x7d\xce\xc5\x58\xb2\x38\x40\xb4\x7f\x48\
+\xd4\x91\xb0\x7f\xe8\x98\x7a\x00\xa0\x02\xba\xa2\x8b\x62\x6f\xd8\
+\x2e\xd0\xc7\xe6\xc6\x1e\x5b\x44\x15\x9e\x8c\xe9\x1e\x31\x6e\xd7\
+\x30\x69\x53\x42\x68\x17\x83\x1a\xc0\x66\x5b\x20\xe9\x13\x21\x1d\
+\xb0\x65\xad\x51\xab\x18\xe9\x65\x0e\xc0\xc7\xf6\x5c\xa4\x3c\x63\
+\xc9\x79\x2d\x69\xa1\x0c\x0b\x6b\xdd\x9e\x11\xa8\x84\xc8\x00\xde\
+\x31\xa4\x88\x0c\x30\x05\x01\x0a\xcf\x80\xf4\x90\x78\x3c\xac\x1a\
+\xd2\xa7\xf3\x04\xff\xb0\xa4\xec\x8c\x19\x1c\x24\x9b\x4e\x04\x87\
+\x25\xe5\xe8\x82\x27\x07\x49\xca\x8e\x72\x74\xc1\x2c\xa8\xce\xda\
+\x52\x30\x84\xac\x60\xaf\x94\x61\xbb\x21\x7e\x39\x39\x79\x6e\x18\
+\x46\x0c\x27\xda\x70\xc3\xab\xd9\x7e\xbf\xbd\xa5\xe4\x33\xba\xfd\
+\x05\x6c\x87\xf8\x86\x89\x89\xfb\x2d\x60\xed\x95\xa2\x10\x07\x22\
+\x06\xec\x51\x28\x3c\x07\xaa\xbd\x52\x74\x85\x60\x53\x44\x2c\xf3\
+\x3b\xc2\x4d\x4a\x10\x06\x5c\x4c\xc6\x6c\xbf\xff\x81\xd7\x6f\x97\
+\x84\xbf\x1e\x31\x11\x33\x67\xa5\x1d\x5b\x6a\xcd\x7f\x93\x9a\xa7\
+\xa4\x59\x0a\xa4\x5a\xe3\x4f\xee\x81\xc4\xd9\x6b\x7a\x61\xb7\x72\
+\xee\x84\x5b\xb0\xd2\x90\x45\xa3\xdc\x5d\x1d\x7b\x01\xde\x70\x01\
+\x8c\xf5\x77\x53\xb6\xdd\x89\xaa\x1a\x6b\x77\xe2\x59\xa4\x57\xe8\
+\x83\xd0\x67\xd2\x91\x6e\xdb\xbc\x0c\x42\x9f\x41\xe8\x23\x1a\x4e\
+\x46\x57\x74\xe9\x12\x39\x3b\xae\x7b\xc6\x69\x00\xa8\xa2\x0c\xdf\
+\x3c\xbe\x8f\x2a\xa7\xa1\xfd\xa8\x62\xdf\x94\x0f\x0d\x00\x97\xd2\
+\xd3\x00\x06\x22\xc3\xcc\xa9\xf4\x88\x3c\xfd\xfc\xc8\xab\xb0\x0a\
+\x39\x32\xff\x39\x96\x76\x87\x15\x0f\x41\xa6\xf7\x2f\x7c\xad\x89\
+\x0d\xa0\x2d\x13\xdb\x45\x5e\x24\x2a\x36\x7e\xe5\x3c\xe1\x09\x25\
+\xe3\x64\xc3\x70\xa2\xd9\xf5\x6a\x1a\xf2\xac\x17\x50\x4e\xa1\xec\
+\x8c\x29\xa7\x10\x07\x6b\x84\xf0\x99\x05\x15\x62\x9a\x30\x0b\x2a\
+\x26\x62\xc4\xe0\x20\xcd\xce\x30\xe2\xc1\xc0\x77\xcc\xea\x18\xb6\
+\xaf\xfd\xd0\xd2\x5f\xe0\xc7\x01\x62\x9a\x68\xe7\x27\xab\xef\xd7\
+\xd2\x63\x48\x21\x0e\x24\x71\x42\x11\x0b\xed\x3e\x3c\xaa\xdc\xf5\
+\x45\x19\x10\x64\x8a\xfd\x5d\x17\x5f\x49\x14\x9e\xf6\x87\xb3\xf5\
+\x09\x80\x03\xd5\x69\xb1\x70\xd3\x47\xde\x2b\xc5\xe0\x20\x19\x87\
+\x01\xf9\x20\x61\xbb\xd0\x7f\xc7\xe7\x5f\x3c\xe3\x65\x01\x7f\xfe\
+\xe7\x6f\xb9\xff\x6e\x89\x9a\xa7\xf8\xa4\xa8\x79\x4a\x31\x5f\x3a\
+\xf6\xf7\xe3\x00\x6f\x34\x85\xf9\x56\x1f\x31\x16\x01\xf3\x45\xc0\
+\xd8\x2b\x9d\x0c\xaa\xaa\xb1\x93\x0f\xe7\xd8\xb7\xc3\x05\xdb\xfd\
+\xde\x31\xb1\x05\xf0\xb2\x2a\x60\x51\x51\x6d\x47\x90\xad\x5b\x1e\
+\x33\x80\x3f\xf6\x49\xb7\x07\x2d\x00\xfd\x20\x01\x34\x80\xed\xed\
+\xc4\x93\x66\xd5\x18\x91\xab\x39\x21\x7d\x54\x83\x6d\xad\x96\x3d\
+\x5e\xc8\x95\x44\x54\x51\x46\xe9\x2c\xb3\x18\x90\x1a\xd4\xb2\x21\
+\x1f\xa4\xd2\xaf\x8d\xaa\x1f\x2d\x7f\x58\xa0\xa6\x46\x9c\xe8\x42\
+\xcb\xe9\x6b\x9a\xf7\x09\x7c\x14\x25\x8a\x58\xb3\x8e\x28\x50\xca\
+\xa3\x27\x22\x3c\x91\x39\x00\x6b\x9f\xb8\xf6\x85\x43\x2a\x2d\x13\
+\xa2\x10\xaf\x6a\xc8\x2c\x55\x32\x13\xa1\x96\xc7\xc1\x9a\x84\x29\
+\x25\x05\x1f\x45\x48\xe2\x57\x06\x80\x09\x92\x0d\x01\x7b\x20\xd1\
+\x2c\x87\x70\xee\x81\x64\x43\xc4\x00\x89\x07\x2c\x49\x08\x80\x35\
+\xc4\x43\x0d\xe4\xf9\x2d\xa8\x00\x21\x02\x4a\x0a\xe8\xaf\x09\x54\
+\x97\x94\x1d\x42\xf8\x04\xaa\x83\xa2\xa6\xb0\xd1\xf0\x82\x0e\x15\
+\x05\x70\xc8\x76\x04\x40\x11\x17\x28\x95\x50\x88\x0d\x81\xea\x18\
+\x1d\xdf\x39\xfb\xfd\x5a\x20\xdb\x62\x47\x31\x9a\xc0\xbd\x66\xc4\
+\xe5\xee\x9a\xe2\xb3\x2b\x7e\xf6\x1b\x3f\x43\xbe\x7a\xcd\xdb\xc5\
+\x9a\x3c\x2f\xf8\xea\xc1\x8c\x7c\xb1\xe4\xe5\xab\x1f\xe8\x7c\xbf\
+\xe6\x97\x7f\xf5\x21\x28\x78\x9b\xdd\xb1\xf9\x7e\xc3\xab\x97\xbf\
+\xa0\x3f\xb9\xe0\xf3\x17\xcf\xd9\x8e\xa7\x4c\xd0\x45\x8e\xaa\xaa\
+\xa5\x80\x95\x03\xf6\xfa\x87\xd2\xe3\xc0\x1d\x7d\x19\x43\x37\x87\
+\x51\x4e\x59\x6d\x59\xd2\xaf\x8f\xec\x71\x41\x27\x9e\xb5\x5e\x5b\
+\xa4\x03\x0e\xbb\xf7\x24\xfd\x8e\x06\xb1\x05\xac\x03\xa5\xbd\xad\
+\x02\x12\x21\x41\x44\x40\x61\xa4\x43\xe1\x00\x9c\x56\x8d\xe7\x36\
+\xfd\x60\x0b\xe0\x06\xa0\x01\x3a\x51\xc6\x41\x2a\x84\x01\xb2\x4f\
+\xd5\xf2\x85\x6d\xd5\xcf\x8f\xaa\x96\x71\x26\x91\x24\x51\xf4\x49\
+\x00\x9f\xfe\x40\x65\xcb\x5a\xb3\xd7\x2b\x2b\x29\x94\x44\x08\xed\
+\x4e\x48\x15\x13\x09\xcd\xc2\x21\x10\x1f\x2a\xaa\x78\xd5\x02\x71\
+\xbe\xde\xf0\x61\x0d\xa3\x61\x44\x21\xba\xa4\x99\xd6\x7e\x0f\xc2\
+\x0a\xca\x09\x29\x25\xb0\xb1\x4b\x57\x53\x45\xcb\x59\xd8\x4a\x20\
+\xf7\x28\x42\x02\x14\x59\x67\xc8\xe0\x70\x57\xaf\x17\x94\x22\x25\
+\x04\x42\xc8\x52\x56\x6b\x49\x18\x2a\x12\xa5\xdf\xc7\xee\x44\xed\
+\x23\x70\x0a\x24\x0e\x88\x6b\x34\xb9\x0c\xb3\x80\x22\xfe\x34\x70\
+\x8f\xdd\x82\x26\x98\x3f\xf3\x2b\x82\x30\x60\x39\x48\x58\xbe\x4b\
+\x11\xd3\x25\x0c\xe0\xf1\x6f\xfe\x1a\xf3\xfb\x35\xb3\xd5\x82\xbb\
+\xc5\x92\x8b\xc9\x98\xce\x62\xcd\xdd\x72\xc1\x9b\x77\x05\x30\xe1\
+\xf5\xea\x7b\xaa\x65\xc8\x7e\xf4\x80\x8b\xf1\x98\x8b\xc9\xf8\x93\
+\x8b\xb9\x26\x08\x83\x64\xc3\x67\x7e\x85\xe4\x82\x03\xcb\x9a\x89\
+\x8d\xa3\x58\x56\x5b\xaa\xf1\x8c\x73\xb5\x96\xc3\xee\x86\x34\x4b\
+\x35\x13\x77\x89\xd8\xab\xba\x4a\x67\x81\xbc\x57\xfb\x96\xce\x75\
+\xa5\xca\xc6\xe1\x3f\x91\xf2\x44\xf3\x5a\x3f\x57\xeb\x62\x08\xa4\
+\x47\x69\xc0\xad\x88\xe8\xe2\x81\x94\x4e\x3e\xf8\x8d\x85\x9c\x2b\
+\x63\x9b\xeb\xbe\xb9\x1e\x9d\x61\x5b\x0b\xee\xa8\xe1\x4e\xb4\xca\
+\xd1\xca\xab\x8b\x1c\xf8\xba\xb8\x41\xa6\xe5\x84\xa8\x1c\x1b\x6b\
+\x49\x11\xb9\xd2\x76\x10\x17\x44\xbd\x09\x4a\x95\x08\xa1\x8f\x4c\
+\x01\x11\xc5\xbb\x94\x70\xbc\x45\x70\xe1\x0e\xf7\x6c\xd7\xa4\xe6\
+\xcb\xd7\x40\xcb\x0d\xa0\xd1\xc0\xcc\x72\x88\x43\x03\x52\x48\xb3\
+\x14\x3f\xde\x91\x66\xf5\xe2\x47\xdb\x70\xfa\x79\xc4\x21\xa1\x71\
+\x32\x52\xeb\x6f\x1a\x47\xc3\x02\xda\x28\x65\xc0\xee\x20\x3d\x86\
+\x04\xac\x29\x28\xe2\xc2\x01\xbc\x59\x8e\xfe\x14\x13\x0b\x2a\xc7\
+\xc4\x51\xac\x28\x4a\xcd\xc6\x77\xcb\x05\x17\xff\x46\x4b\x8a\x7e\
+\xfa\x9a\x89\x0f\xc5\x63\xc1\x40\x1b\x7b\xfc\xf2\xaf\x3e\x44\x66\
+\xcf\xf8\x50\xea\xef\x77\xb6\x78\x00\x63\xf8\x7c\x32\x74\x00\x1e\
+\x4d\x6b\xdd\x1a\x24\x1b\x07\xda\xa6\x1c\xd0\xd2\x62\xce\x61\xb5\
+\xd4\x0c\xbc\x5a\x90\x45\x09\xfd\xf5\x18\x46\x39\xb3\xaa\xa0\xda\
+\x54\xe4\xfe\x96\x90\x87\xad\x85\x9d\x98\x42\xa7\x77\x59\x57\xec\
+\xba\xa2\x7b\x22\x0d\x9c\xe6\x6d\xdc\xa7\xce\xf9\xc0\x0d\x10\x36\
+\x75\x70\x20\x3d\x57\xc0\xd8\x9b\x6d\xb7\xc1\xba\xcd\xd7\x36\xfd\
+\x5f\xd9\xb8\x1e\xb5\x96\x6b\x5a\x4a\x70\x24\x33\xb0\x15\x2a\x03\
+\xdc\xf6\x4e\x57\x39\x37\xc5\x82\xba\x09\xe0\x8a\x18\xd1\x5c\xd1\
+\x2b\xc5\x26\x0b\x90\xbb\x05\x42\xf8\xba\x54\xdd\x94\x4a\xeb\x7a\
+\xa5\x9f\x66\x4b\x94\x52\xa8\xf9\x1e\xb9\x5b\x40\x96\xb3\xf5\x52\
+\x16\x59\xa9\xc1\x9b\x99\x05\x8a\xb9\xbe\x96\x5b\x88\x43\xfd\xb8\
+\x2d\xa1\x14\x0d\xbf\x35\xab\x17\x34\xe5\xa2\xed\xc3\xae\xe5\xf6\
+\x47\x59\xd5\x32\x71\x90\x05\x67\x01\x5c\x88\xc3\x89\x2b\x61\x4b\
+\xce\xda\xae\xab\xe8\x0a\xc1\x6c\x02\x83\x99\x96\x03\x87\xd5\x92\
+\x57\xdf\xff\xc0\xab\x05\x6c\x19\x93\xb2\x73\xef\xbb\xe9\xe8\xef\
+\x2c\x58\x2d\x90\xaf\x5e\xeb\x1d\x72\x90\x70\x31\x19\x73\x98\x8c\
+\x98\x4c\xd3\x56\x15\xaf\xcc\x0a\x67\xa7\x59\x67\x22\x48\x36\x94\
+\x4b\xfd\x5d\xac\xaa\x0a\x56\x21\xfe\x48\x2f\x6c\xcb\xa1\x26\x86\
+\x85\xaf\x8f\x86\x61\xd9\x3f\xa9\xd4\x55\x9d\xd1\x91\x26\x6e\x94\
+\x84\x9b\x8b\xb4\x63\x1f\x57\x57\xe2\x74\x2e\x42\x49\x45\x27\xaa\
+\x38\x48\x75\xe4\x4a\x68\xf6\xb5\x4c\x5b\x36\xae\xfb\x4d\x1b\xad\
+\x11\x2c\x6a\x32\x30\x47\xc0\x75\x60\x3d\x62\xe2\xda\x56\x13\x44\
+\x48\x04\xc2\x1d\x25\xd4\xa7\x02\x47\x8e\xa9\x33\x97\x9b\x50\x4a\
+\x22\x44\x44\x98\xf9\x60\x16\x76\x9b\x2c\x00\x16\xa4\x72\x07\xd9\
+\x54\x33\xe6\x7c\xc5\xbb\x65\xc9\x44\x7e\x64\xdb\xbf\x22\x3e\x54\
+\x06\x88\x3b\xf0\x04\x78\x8a\x78\xe5\x43\x08\x6b\x4f\xd5\xb9\x09\
+\x2f\x63\x58\x09\x5d\xd5\xcb\x72\x5b\x5f\xd2\x36\x5c\xaf\xcb\xda\
+\x53\x0c\xa3\x3e\x6b\xb9\x65\x68\xf3\x06\x93\x7b\x67\x51\x85\x59\
+\xc4\x30\xee\xff\x7f\xab\x98\x19\x26\x4e\x8e\xc4\xc7\x39\x79\x61\
+\xf3\x0c\x7a\xc1\xa7\xaf\x0f\x0e\x92\xd0\x17\x7c\x18\x4d\x18\xfe\
+\x6c\xc2\x37\x7f\xfe\x0d\x37\x7f\xfb\x1d\x00\x3f\x7d\xa8\xa9\xf5\
+\x62\x5c\x3b\x28\x77\xcb\x05\xe3\xa7\x4f\x18\xcc\x2e\xf8\xcc\xaf\
+\x0c\xfb\xae\xb4\x55\x58\x6a\x17\xc3\x3a\x1a\x96\x89\x2d\x98\x2d\
+\x90\xef\xbe\x5f\x3a\x57\xa2\x5c\x2d\xe8\xf3\x80\xb2\xb3\x87\x55\
+\x48\x39\x5c\xe2\x8d\x4a\xe0\x49\x4b\x8a\x34\xb5\x71\xd2\xef\x10\
+\x5a\xd0\xee\x39\x95\x06\x4e\x5a\x44\x15\x5d\xa9\x0b\x08\x5d\x0b\
+\x9d\x48\xa0\x9a\xbe\xae\x54\x1c\xa4\x87\x88\x2a\x0d\x77\x03\x52\
+\xcd\xce\xc2\x95\xa3\x6d\x65\x2e\x89\x04\xa9\xac\x8b\x1c\xf2\x18\
+\xbc\x55\x4c\xe4\x65\xad\x4c\x5b\x1b\xc0\xb5\x3f\x8c\x10\x67\x81\
+\xab\x8e\x00\x7c\x2c\x25\xdc\xfb\x29\x0f\xcf\x4f\xe9\x67\x09\x39\
+\x0a\x01\x7c\x54\x7a\xf7\x2e\x59\x72\xd8\xa4\xe0\x57\x78\xc5\x9c\
+\xc5\xed\x94\x22\x54\xed\x32\xbb\xf1\x52\x33\x51\x12\x28\x05\xf8\
+\xae\x10\x82\xd0\x80\x0d\xbc\x8c\x45\x15\x13\xec\x14\x0b\x63\xdb\
+\xad\x3d\x45\x51\xc5\x2c\xb2\x92\xc0\x33\xc0\x8e\x57\x90\xc1\x26\
+\x4c\x18\xe4\x69\xcd\xd2\x8d\x42\x89\x9f\x8d\x28\xe3\x15\x65\x67\
+\x0c\xc6\x0d\x19\x12\xb0\xce\xb4\x1f\x7d\x4e\x4a\x58\x4f\x58\xa7\
+\xd7\x54\xcb\x62\xf3\x95\x34\xe1\x28\x8f\xd1\x14\xba\xac\x51\xaa\
+\xe4\xef\xfc\xa3\x67\x8c\xdf\x3e\x61\xf9\xdd\x5b\xc6\x4f\x1f\x13\
+\x6e\x52\xc7\xba\x83\xd9\x05\x4f\x79\x6e\x4a\xd3\x95\x29\x35\x9b\
+\x85\xec\x76\xa8\x17\xa7\x8d\x94\x9b\x95\x14\x16\xbc\x45\x3a\xc0\
+\x1f\xfb\x5c\x4c\x0a\xde\x7c\xf8\x6b\x58\xc5\x64\x51\x42\x2c\x3f\
+\x92\x1d\x12\xe2\xe1\x12\xd6\x07\x2a\xff\xe2\x93\xba\xba\xea\x8c\
+\x1a\x9a\xb8\x01\xe4\x26\xa0\x1d\x78\xa5\x76\x85\x9b\x55\xb8\x52\
+\x7a\x0e\x94\x0a\x0c\x2b\x7b\x6e\xa1\x56\x1a\x4f\x58\x57\x1d\x6a\
+\xeb\xcc\x8f\x04\xbe\x94\x86\xcf\x9b\xa0\x6e\xfb\xb5\x78\x59\xcb\
+\xa9\x88\x1a\xce\x44\xdb\x1f\xe6\x4c\x04\xf4\x0c\x98\xcf\x00\xb8\
+\xa5\x8b\x55\x00\x5d\x1d\xb9\x54\x71\xd9\x08\xfa\xf8\x78\xc1\x80\
+\x70\xb1\x26\x1f\x02\x83\xda\x73\x0e\x33\x1f\x11\x0b\x17\x02\x2a\
+\xaa\x98\x40\x64\xa0\x34\x68\x8b\x5e\xac\x41\xdd\x03\x94\xcf\x20\
+\x48\xc9\x08\x08\xcc\xbf\xcd\x66\x2e\x26\xb1\xcf\x5a\xd6\xd2\x61\
+\x90\x14\x4c\xd2\x84\xfc\x53\xc5\x05\x53\x65\x1d\x1c\xa4\xa9\x88\
+\xa5\x4e\x52\x68\x4d\x5c\xeb\x68\x0b\x66\x6b\xb1\xd9\x20\x97\x95\
+\x19\x7b\x05\x5d\x11\xe9\x8a\x9e\x0a\xf0\x95\x24\xeb\x0c\x89\xc5\
+\x9a\x9f\x54\x4f\xf9\xc9\x17\x70\xff\xc5\x0b\xd6\xd5\x8a\x7c\xae\
+\x01\x35\x9b\x98\x52\xb5\x75\x4a\xa6\x38\x8a\x2a\x49\xa8\xaa\x31\
+\x9e\xb7\x3c\xf1\x96\xeb\x62\x48\xe0\x40\xf9\xa1\xf4\x28\xb2\x88\
+\x15\x15\x03\x99\x6a\x4d\x2c\x63\x4a\x99\xc2\xb0\x53\x07\xac\xce\
+\x64\x28\xbc\xc3\x4a\x97\x9d\x8f\x59\xb7\xbd\x72\x52\xee\x7e\x6d\
+\x87\x09\x2d\x3b\x4c\x50\xc7\x79\xbb\x86\x85\x5d\xde\xc1\xea\x61\
+\xf3\x7a\x11\x09\x84\x54\xee\xb1\xa8\xa1\xa3\x65\x83\x89\x9d\x94\
+\x30\x3f\xae\xb4\x8c\x6c\x41\xeb\x65\x48\xf3\x9f\xf3\x87\x95\xd2\
+\xc5\x8d\x63\x8b\xae\x51\xe4\xb0\x9f\x96\x37\xdc\x0a\x17\xc3\x24\
+\x76\xd7\x9b\xf9\x61\xfb\x3a\x1b\xf4\xc9\x5f\x0c\xa9\x82\xa9\xcb\
+\x16\xeb\xc7\x1a\x5f\xae\xf2\x5d\x39\xda\x7e\xe9\xc1\x4e\x11\x07\
+\x85\x03\xad\x8d\x61\x1e\x03\x78\x91\x95\x0c\x23\x2d\x19\x86\x95\
+\xc0\xab\x46\x2c\xf0\x5d\xe6\xb8\xa9\x9b\xfd\x6c\x84\x9f\x8d\x5c\
+\x49\x37\x8a\xef\x19\xd2\xd4\xd0\xc9\x09\x80\xcf\xbb\x13\x29\x89\
+\x0a\x11\x54\x8d\x50\x50\x0a\xa2\xe4\xc1\x21\x23\x62\x40\xb0\xbb\
+\x26\xf0\xde\x71\xe1\xad\xf8\x6a\x2f\xf9\xc9\x45\xc5\x2f\xf5\x33\
+\xfd\x78\xac\x18\x4d\x61\x38\x19\x9f\x94\xb6\x03\xef\xdd\x27\x3f\
+\xb7\x29\x2d\x9a\x21\xa3\xd1\x58\xef\x84\xb1\x4c\x29\xf9\x88\x3f\
+\x9a\x90\x1d\xba\xee\xbb\x3d\x97\x66\xab\x3a\x23\x5d\x76\xb6\xcc\
+\xeb\xd8\xf7\x48\x13\x1f\x87\x75\x2c\x38\x8b\x66\xe5\xcd\x80\xb2\
+\x4b\xa4\xb5\xaf\x88\xe8\x97\x71\xeb\xb1\xd2\x80\xce\x37\x1a\x98\
+\x23\x56\x6f\xb1\xaa\x97\x41\x15\x1b\x49\x51\xb5\x64\xc3\x89\x3f\
+\x7c\x9c\x9b\x68\x2c\x00\x2d\x5b\xdb\x05\x5d\xa0\x12\xc7\xc2\xde\
+\x51\x32\x0f\x60\xbb\x57\x28\x25\x1d\x50\x15\x31\x79\xa6\x1c\x90\
+\xbd\xf1\x90\x62\x90\x10\xc6\x25\x79\xe6\xbb\x14\x1b\xa2\xd4\x91\
+\x55\xfb\x85\xdb\x2f\x5d\x94\x64\x9d\xd3\x1d\xac\xa8\x62\x97\x27\
+\x5e\xcb\xad\x2e\x55\x67\xa5\x06\x34\x1a\xd4\xf6\x71\x1b\x22\x22\
+\xcb\xf1\x99\x69\x19\x61\x98\x38\x8a\x95\x73\x3a\x80\x86\x94\xc8\
+\x29\x3b\xe3\x23\x47\xa3\x1d\x06\x82\xd8\x2d\xec\xba\x42\x80\xf2\
+\xb5\x0f\x6d\xfe\x76\x5f\x69\x8f\xd7\x25\xe5\x6c\x9a\xb0\xb1\x18\
+\xf4\x95\x74\x59\x89\xbd\x52\x2d\x96\xf7\x49\x5d\xd1\xc5\xb2\xb1\
+\xbd\x7e\xbc\xc8\x6b\x16\x39\x36\xd5\x85\xbb\x1d\x77\xf6\x3f\x1a\
+\xc5\xb4\xdb\xb3\x9a\xd8\x8f\x2a\x94\x2d\x46\x9c\xa0\x46\xb3\xaf\
+\x27\xe3\xda\x03\x96\xed\x1d\x20\xf1\x32\xd6\xbe\xe7\xec\xb3\xd2\
+\xd9\x65\xed\xbc\xb0\x05\x78\xd3\xb1\x70\x4c\x6c\xca\xca\x2d\xb8\
+\x2a\x79\x26\xf0\x13\x9d\x08\x0a\x0d\x7c\x88\x84\xae\xcd\x09\x17\
+\x00\xca\xe8\xb5\x0a\x1d\x75\x97\x47\xbf\x2b\xd8\xfa\x29\x42\x44\
+\x48\xe5\x11\xc5\x25\x52\x49\xa2\xb8\x22\x37\x07\x68\x9d\x68\xcb\
+\x34\x58\xe3\x92\xdc\xb2\xbc\xf9\xe1\x85\xcd\x15\xdb\xc3\x9f\xbd\
+\xae\x7c\x17\xa0\x1f\xe4\xa9\x76\x25\x4c\xaa\x6d\x51\xc5\x2c\x4c\
+\x95\x70\x2d\x33\x26\x71\xdf\x69\xe0\x45\x56\x32\xc8\x53\x07\xe4\
+\x32\x5e\x39\x3d\xec\x67\x23\xd2\x78\x75\xe4\x1e\xef\xdc\xfd\xfe\
+\x61\x79\x96\x89\xf7\x4a\x91\xb2\x43\x66\x23\xee\xb3\x05\x33\x26\
+\xdc\xb3\x70\x5d\x1c\x92\x99\x0b\xef\x90\x65\xb5\xf7\x9d\xd5\x8c\
+\x5f\x4b\x17\xa3\xf7\x17\xef\xc8\x33\x9f\x65\x3e\x24\xdc\xdc\xd2\
+\x9f\x0c\xf9\xfa\x71\x8f\xa6\xc1\x7b\x5c\xaa\x76\x60\x36\x05\xca\
+\x55\x55\x31\xf0\xa0\x42\x67\xd9\xb7\x51\x46\xbc\x3e\xc0\xf8\x54\
+\x46\x1c\x83\x3a\x3c\xab\x21\x8d\x0c\x38\x66\x65\x5d\xc8\x88\x8c\
+\xcb\x60\x5d\x88\xca\xad\xc6\x6c\xf8\x27\x95\x6d\x5b\x4e\x44\x15\
+\xd8\x16\xa6\x33\x15\xba\xa8\xe1\x0b\x63\x98\x58\x36\x16\x70\xd1\
+\x89\x5f\xd1\xbe\x1e\xa4\x3e\x45\x22\x8d\xe7\x19\x6b\x29\x61\x74\
+\x70\x33\xb5\xe6\x18\x58\x05\xae\x72\x67\x3b\x3b\xb6\x4a\x01\x01\
+\x0a\x49\x64\x81\xec\x5e\x97\x91\xc7\x75\x2b\x92\x75\x34\x5c\x5b\
+\x92\x05\xaa\xf2\x81\x0c\xa1\xe2\x13\x1d\x67\x3b\x41\x28\xe2\xfa\
+\xc7\xdf\x29\xe7\x50\x60\x1d\x0c\xeb\x5c\x64\x39\x13\x80\x30\x3a\
+\xab\x87\xed\xd6\x7a\xc4\xc7\x8f\xdb\xd6\x25\xc7\xe0\x68\xc7\x63\
+\xbd\xe9\xb3\xdd\x5f\xa3\x78\x8b\x48\x07\xcc\x79\xa9\x19\x90\x0d\
+\x07\xee\xe8\x18\x49\x60\xf3\x0c\x1d\x2e\x38\xf0\x9a\x4e\x12\x41\
+\x9a\x40\x92\x9a\x0c\xf6\x15\xd3\x49\xa1\x8f\x18\x93\x0b\xfc\xde\
+\x88\xa7\xb1\x42\x66\x33\x3e\xbe\xfc\x86\x8f\x3c\xe7\xc1\x63\x23\
+\xad\xe2\xe1\x27\x43\xf5\x77\x8b\x25\xdb\xc5\x1d\xfd\xc9\x45\xeb\
+\xfe\xb8\xa9\x89\x8f\xd8\xfc\xb8\xb3\x23\xb4\xc0\xeb\x1c\x81\xd1\
+\x05\x76\x8c\xfd\xe6\xb6\x51\x45\x81\xc4\x23\xa6\x38\xb2\xd8\xdc\
+\x73\x84\x4e\x9a\xa9\xa3\x50\x8f\x05\x6a\xd4\xd0\xbb\x78\x19\x52\
+\x2a\x92\x48\x1c\x89\x04\xd9\x28\x33\x67\xed\x62\x88\x54\xf4\xcb\
+\x98\xad\x9f\xd1\x2f\x63\xca\x6a\x4b\x90\xf6\x51\x49\x0d\x9c\xc8\
+\x84\x7f\x44\xc3\x9d\xe8\x99\x9e\xb8\x4a\xf4\x4e\xe4\xc4\x09\x13\
+\x8b\x0a\xa9\x3c\x2a\x11\xe0\xa9\x82\x48\x64\xda\x86\x03\xfa\x24\
+\x90\x59\xfd\x9c\x81\x8a\x5d\x44\x53\x19\x50\x2b\xe5\x6b\x66\x36\
+\x92\x43\x58\xd6\xb6\x8f\x99\x85\xdf\xda\xfc\xdb\x16\xf8\x47\x6c\
+\x6c\xe4\xc6\x6e\xcf\xb0\xd7\xa5\x4a\xd2\x56\x15\xd1\xcf\x46\x44\
+\xf1\x3d\xeb\x46\x26\xb9\x20\x27\x25\xac\x01\x6c\x5e\x9f\x67\x2f\
+\x5d\x90\x3f\x8c\x25\xcf\x26\x0f\x5d\xae\x61\xd3\x79\xee\x02\x4c\
+\xb3\xe0\x19\x00\xf7\x85\xc7\xe0\xf0\xb0\xf1\xed\x3c\x44\x66\xc2\
+\x85\xe7\xa7\xfe\xe8\x24\x47\x6c\xfe\x71\x74\x7a\x63\xf2\xc5\x73\
+\xfc\xf9\x1b\x0e\xde\x63\x3a\x8f\x22\x5d\x5e\x27\x71\x0b\xbc\x63\
+\x40\xf7\x27\x17\x8e\x81\x87\x5e\xc9\xba\xf2\x09\xe3\x88\x78\x9d\
+\xe2\x0d\xe6\x28\x9e\x20\x3e\x91\x61\x66\xed\x69\x39\x21\x22\xa1\
+\xcb\xc1\x06\xcc\xbe\xd4\xdb\xbd\xd4\x8f\xf9\x52\xb6\xec\xb2\xc0\
+\x64\x1e\x8a\x06\xe0\xad\xee\xf5\x91\x94\x0a\xfc\x48\xcb\x05\xd1\
+\x14\x00\x86\x69\x2d\x18\x71\xcd\xa6\xfa\x59\x41\xea\xb3\xf6\x2b\
+\x92\x48\xd6\xcc\xac\xe6\x48\xd0\x1a\xdb\xd7\x00\x06\xd8\x26\x3a\
+\xb5\x5c\x50\x12\xa4\x7d\xca\x6a\xeb\x52\x6e\x51\x23\xbd\xa6\x0c\
+\x9b\xf6\x88\xd9\x71\x5e\x4e\xd8\x7e\xba\xfe\xa1\x64\x4b\x0d\x60\
+\xbd\x2d\x88\x44\x85\x52\x92\x64\x69\xbe\xfc\x81\x87\x17\x0c\x1a\
+\x7d\x76\x70\xd8\x29\x02\x51\x82\x52\x28\x15\x23\x0c\x58\x01\xa6\
+\x99\x47\x16\x57\x4e\xd3\x17\x76\xe1\xd7\x70\x60\x02\x2f\x63\x6d\
+\x16\x76\x64\xb9\x03\x35\xa2\x24\x3f\x48\xc2\x34\x69\x34\x9a\xe4\
+\x8e\x71\xf5\xdf\xbf\x65\xed\xf7\xcf\xba\x12\xf3\x6c\xce\xe2\xd5\
+\x86\xc9\xe7\xcf\xe8\x67\xe0\x4f\x6c\x61\x44\x7f\x8f\x63\x63\x44\
+\x0e\xe2\x94\x85\x79\xcb\x32\x97\x6c\x36\x7a\xa1\xb9\x04\x86\xcc\
+\x59\xe3\xb1\xfd\x3e\xa0\x3f\xd1\xa5\x66\xfd\x7b\xcf\x09\xe7\x26\
+\xa7\x3c\x1d\xd1\xf5\xfa\xc0\x9c\xed\xcb\x37\x7a\x31\x3c\x5d\xd2\
+\x7f\xb7\x25\xf9\x72\xd6\x62\x53\xbb\xd5\x72\xe0\xde\x01\x18\x60\
+\x5d\xf9\x0c\xbd\x12\x64\xda\x4e\x3a\x9e\x61\xe2\x32\x2b\x60\x58\
+\x11\x0a\xa0\x40\x22\xf0\x50\xc6\x45\x50\x40\xc7\xbe\x58\x7a\x54\
+\x51\x45\x60\x4b\xc5\xad\x36\xa4\x88\x22\xca\x60\x11\x22\xd8\x3a\
+\xf1\xaf\x5b\x8a\x32\x84\x01\x5c\x5c\x94\x64\x52\xe9\x6d\xe0\xeb\
+\xcc\x6f\xa3\xd8\x11\xa4\x3e\x65\xb5\x65\x1b\xf8\x0c\xcb\x98\xad\
+\x94\xe8\x67\xe9\x2c\x85\x8e\x66\xda\xfc\x80\xd0\xaf\x6f\xf8\x19\
+\x9d\x24\xe3\x90\xf6\x29\x1a\xcd\x97\x3d\x62\x76\x22\x73\xad\x52\
+\x4d\x00\x1f\x5f\x36\xbe\xce\x0e\x6f\x8b\x0e\xd1\xe0\xdf\x91\xcd\
+\x30\x00\xae\x8a\x8d\x0d\x91\x1e\xc9\x89\x1a\xc0\x7a\xab\x8b\x09\
+\xb6\x22\x88\x10\x47\xa5\x08\x0d\x5c\x5b\x20\xb1\xa5\xe6\x49\x96\
+\xb3\xf6\x14\xf1\xa1\x22\x0c\xa3\x9a\x89\x1b\x9e\xb1\x2e\x67\xe7\
+\x2c\xca\x80\xa9\x1f\x38\x56\xd6\xe5\x6f\x28\xdf\x55\x75\x45\x6c\
+\xf1\x3d\x0b\x60\xf5\x32\x60\xe0\xdd\x39\xb0\xcc\x06\x3e\x55\x30\
+\x65\x34\x1e\xb0\x5a\x6e\x1a\x7f\xd5\x7d\xbd\xe6\x32\xdb\x47\x93\
+\x81\x03\x6f\xdf\xe4\x3d\x6e\x57\x25\xbb\x72\x41\x6f\x55\x72\x98\
+\x68\x81\x3b\x1b\xe9\x9d\x77\x38\x99\xb2\x5f\xac\x51\x4a\xd1\x15\
+\xc9\x89\xe5\xe6\x9b\x1d\xd1\x63\x4a\xc5\x9c\x75\xe5\xb7\x81\xdc\
+\xac\x14\xf7\xd7\x94\xdb\xe1\x49\xe8\xdf\x55\xec\x02\x22\x8a\x48\
+\xd2\x95\x1e\x45\x54\x21\xa4\x87\x32\x7a\xb7\x59\x81\x73\x8b\x32\
+\x23\x0f\xb4\x5c\x88\x40\x28\x50\x03\x67\xbb\x95\x52\xea\xae\x65\
+\x22\x7c\x35\x27\x03\xf2\x55\x48\x16\xe7\x70\x00\x9f\xd0\x24\xdb\
+\x42\xed\xc2\x89\x9c\xb8\x71\x84\x89\x8c\xf4\x00\xed\x37\x27\x54\
+\xa7\xb5\x3c\x67\xa1\xe9\x18\xa2\xdc\xef\x89\x92\xb0\x4e\xb1\x19\
+\xf3\x5e\x9d\x69\xf6\xac\xce\xb0\xb1\x2d\x4f\xb7\xb5\x70\xa3\x5d\
+\x49\x05\x78\xe3\x1a\x7e\xc5\x20\xa1\xb0\x5a\x57\x65\x74\x7a\x53\
+\x0e\xbb\x66\x79\x25\xa3\xa8\xa6\xa8\xe5\x9a\x55\xb6\x67\xc4\x80\
+\x2c\xae\xc8\xe7\x7b\xe7\x6e\x0c\x07\x1d\xe6\xc5\x0e\x44\x0d\xe4\
+\xb5\xa7\x40\xc2\x10\xe1\xaa\x82\x6b\x4f\x31\x34\x4c\x6c\xf5\x32\
+\x71\xe8\x4a\xd5\xfd\x4d\xc9\x7a\x52\x34\x98\x38\x24\x5f\x6f\x08\
+\x27\x11\x53\x86\xae\x73\xa2\x3f\x29\x98\x4c\xe0\x62\xf2\x33\xf6\
+\x8b\xef\xf1\x99\x32\xf6\x4a\xf6\x95\x6e\x52\x7d\x61\xed\xb2\xb1\
+\x0f\xcb\x52\x6f\x81\x4e\xdc\xe3\x90\x35\x9c\x8e\xc6\x63\x4f\xbc\
+\x3e\xf0\x14\xc6\x3e\x45\x2c\x08\xde\x67\xfc\xdb\xf9\x96\xc3\x6a\
+\xc9\xaf\x98\x58\x67\x90\x05\xf8\x22\xc5\x25\x7b\x4c\xea\x4f\x4b\
+\x1c\xc9\x76\x71\x47\x32\xf1\x9d\x94\x38\x06\xb2\x00\x28\x27\xae\
+\x80\xd2\x64\x65\x9d\x9d\x30\x01\x74\xeb\x36\x78\xb2\xb6\xc6\x02\
+\x63\x7d\x15\x06\xb8\x2e\xd0\xde\xd0\xb9\x42\x2a\x23\x87\xf2\x96\
+\x13\xa1\x6d\x9a\x43\xa3\xb1\x32\x22\xee\xf4\x28\xc5\x54\x5b\x27\
+\x22\x32\x5b\x3d\xeb\xa2\xea\xc7\x44\x91\xa0\x30\xba\x56\xb7\x31\
+\x45\x6e\xdb\xea\xa8\x33\x00\x96\xe6\xf0\x2c\xa5\x32\x76\x4c\x64\
+\x42\xef\x25\x42\x54\x2e\x3b\x21\x1a\x8b\xba\x73\x00\xf6\xc8\xd8\
+\xf8\x15\xc9\xa1\x3c\xe9\x70\x96\xd6\x6b\x1e\xd7\x11\xff\xad\x9f\
+\x36\x58\x22\x43\x08\xdb\xb2\x94\x35\x58\x58\x7f\x6a\x12\x1c\x60\
+\xe0\xb1\xc6\xd3\x95\x3f\x20\xce\xbc\xba\x64\xed\xa4\x9d\x62\x10\
+\x17\x14\x55\xec\x00\x9d\x15\x01\x59\xc7\xd3\xc9\xba\x24\xd5\x76\
+\x5c\xec\xd7\x00\x8e\xdb\xeb\xf2\x66\x79\x24\x0c\x23\x92\x38\x61\
+\x32\x9d\xd5\x8c\x3f\xe8\xf0\xf4\xf1\x15\xc3\xc9\x98\x07\x5f\x7e\
+\xc1\x83\xc7\x3d\x18\xfb\x74\x27\x43\xc6\x13\x03\x5e\x03\x4e\xb7\
+\x35\x51\xcf\x4e\xdc\x70\x3a\xcc\x63\x55\xb9\x6a\xbd\x26\xc8\x14\
+\xc5\xa3\x98\x27\x13\x0d\x56\xdb\xad\xdd\x89\xf5\x71\xb4\xcc\x0a\
+\x17\x4d\xfd\xb1\x4b\x93\x85\x8f\x17\x76\xc7\x76\x5d\xba\x3d\xe0\
+\x97\xd2\xe3\x60\x80\x77\x68\x54\xdb\x9a\x16\x98\x03\x76\xc3\xdb\
+\x15\x0d\xbd\xdb\x64\xd0\x33\xc7\x5f\x10\x11\xd1\x24\x24\x4b\x2e\
+\xf0\x45\x0d\xd8\xaa\x1f\xeb\x34\x5c\x54\x39\x97\x57\x82\x03\x27\
+\xc7\xc5\x68\x0b\xda\xa6\xa1\x26\x74\x01\x46\xcb\x14\x79\xc6\x6a\
+\xf1\x5a\x1d\xd8\xad\x05\x89\xa9\xd6\x09\x11\xe9\xb6\xfd\x8e\xef\
+\x40\x6b\xc1\x7c\x0c\xea\x3c\x2e\xdb\xa1\x21\xd0\x92\x41\x94\xad\
+\x56\x26\x5b\xec\xf0\x2f\x9e\x52\x0c\x1e\x90\xc7\x25\xfe\xc5\x53\
+\xdd\x35\x1d\x47\x84\xd3\xae\x91\x1e\xb5\x2b\xb1\x34\xbe\xe9\x02\
+\xdf\xb1\x70\x7c\xa8\xc8\x3a\x9e\xc9\x73\x68\x3d\xbc\xc8\xca\x16\
+\x13\x77\x46\x55\x43\x5e\x68\x67\xc2\x76\x44\xef\x95\xe2\xd5\xcb\
+\x5f\xe8\xac\xef\xa6\xc4\xdf\x7e\xa0\xb8\xff\x86\xe2\xfb\xb9\x66\
+\x57\x13\xc2\x71\xdb\x26\xdb\x36\xfe\xdf\x6f\x6f\xf5\x76\xb1\x86\
+\x65\x49\x55\xae\x38\xac\x6a\x0f\xbc\x13\xf7\xdc\xc8\x80\xe9\x17\
+\x9f\xb3\xaa\x2a\x3e\x2e\xee\xe9\x4e\x86\x94\x62\xd6\xc8\x9b\x27\
+\xf8\xe8\x80\x7d\xdd\x28\x7a\xe1\xd8\x37\x59\x04\x2d\x36\x06\xc8\
+\xfd\xad\x2b\xa4\x9c\x6b\x52\x0d\xab\x28\x03\xe9\xd5\xe1\x19\x03\
+\x13\x81\x70\x5e\x71\x2d\x13\xbc\x56\x74\xb2\x95\x87\x20\x42\x52\
+\xb5\x53\x6a\x22\xd7\x93\x85\x9a\xa5\xe4\x46\x93\xe7\x71\xb9\xd8\
+\x39\xbe\x4a\x9d\x3c\x2e\xed\x82\xcd\xde\x67\x26\x02\x49\xa0\x5f\
+\x64\x7a\x87\x20\xd2\xbe\xb0\x69\x41\xe2\x4c\x97\x73\x93\x85\x2d\
+\x2b\x4b\xe5\xe1\x99\xd8\xa9\x05\xad\x95\x15\x76\xf2\x8f\x03\xb0\
+\x59\xcc\xe9\x49\x40\xa5\xb3\xd8\x94\x52\x08\x3b\x94\x44\x98\x8a\
+\x5c\x4f\x03\x39\x30\x56\x5c\xd1\xf0\x92\x6d\x89\x7a\x58\xe9\x06\
+\xad\x45\x55\x7b\xc8\x71\x50\xe0\x6f\xfa\xc4\x83\xed\x89\x76\x76\
+\x0b\xbe\x46\x1a\xee\xb0\xf2\xf4\x5a\xcb\xb1\x73\x6a\x5c\x0a\x78\
+\x9b\x49\x7e\xc8\xde\xf1\x2c\x7e\x4c\xc6\x90\xb2\xd4\xef\xe9\x57\
+\x3e\xf1\x62\x8d\x9a\x24\x0c\x97\x25\xeb\x71\x45\xb9\xd0\x7a\xb7\
+\x4e\xc7\x4d\xdd\xa2\x6e\xbc\xd2\x8b\x39\x7f\x92\xa0\xa8\x28\x17\
+\x23\xfc\x49\x41\xb6\x80\xb7\x8b\x35\x89\xb7\xe0\xd9\xaf\x3c\x41\
+\xc4\x7d\x3e\x6e\x34\x03\xaf\x4d\x85\xf3\x84\x55\x0d\x13\xd7\x8d\
+\xa2\x5a\x4e\x00\xdc\x72\xc0\x67\xc1\xc5\xe2\x21\xc1\xf4\x00\xf8\
+\xe4\x65\xff\xbc\x17\x6c\x41\x3c\xdf\x54\x44\xb9\x42\xe6\x25\x22\
+\x54\xd8\xce\xa4\xb2\x55\x46\x8e\xf0\xe5\xf9\x84\x82\x6a\x65\x2a\
+\xda\xc5\x0d\x0d\xe0\xcd\x49\x41\xc2\x5e\xfb\x54\xde\x41\x0a\x41\
+\xa4\x54\xed\x0f\x3b\xc0\x4a\x22\x21\x74\xa9\xb9\x51\xbd\xcb\x02\
+\x9f\x7e\xea\x53\xcc\xaa\xd6\xdf\x64\xab\x68\x9f\x5a\xd0\x35\xdb\
+\x93\xd4\x32\x68\x69\x62\xeb\x50\x0c\x4e\xfe\xbd\xd9\xc9\x6d\xa1\
+\x62\xc7\xc8\x1a\xc8\x3e\x42\x64\xee\xd8\x65\xc3\x40\x81\x97\xb5\
+\x87\xac\x54\x31\x50\xb2\xde\xed\xb5\x5f\x5c\x04\xf4\xb3\x88\x6d\
+\x2c\xc9\x81\x69\xa3\xec\xdc\x04\xb0\x5d\x04\x0e\x2b\x41\xb9\x08\
+\xd8\x0e\xf4\x2a\xc3\xb2\x73\xea\xe4\x46\x8f\x19\x13\x7e\xfa\xf8\
+\x67\x6e\x41\x96\x15\x11\x79\xa6\x18\x32\xe7\x36\x8e\x18\x02\x6f\
+\xa3\x1d\x43\xba\xf8\x93\x02\x1f\x5d\xf2\x1e\x8d\xa6\x4c\x0f\x4b\
+\xfc\xec\x0b\xc6\x23\x8f\xca\xd7\x12\xc1\x5f\xac\x18\x4e\xc6\xdc\
+\x4f\x2a\xfc\xc5\x8a\xf1\x17\x63\xc2\xc5\x92\xbb\xc5\x90\x37\xef\
+\x16\x4c\x33\xd8\xee\x74\xa5\xed\xcb\xa1\x47\xc7\x24\xeb\x9a\x12\
+\xa2\x29\x29\xf2\xec\x3c\x0a\xd2\x49\xe1\xa6\x6d\x08\x30\xc9\xb8\
+\xba\x68\xd2\x64\xe4\x50\x9b\xfd\x15\x03\x7c\x36\xb9\xa0\x13\xe2\
+\x1a\x3a\x05\xc2\xb8\x13\x19\x05\x10\x50\x39\xc6\x16\x26\x5b\x21\
+\x8e\x18\xd9\xea\xd9\x54\x7a\xf4\x3b\x7b\xb2\xc3\x00\xc8\xd9\x02\
+\x81\x54\x10\x9d\xd6\xdb\x4e\x8a\x1f\x8e\x89\x4d\x5a\xcd\x54\xea\
+\x22\x03\xe6\xd6\x7d\x40\x50\xc6\x4e\x4b\xdb\xe6\xd0\xf6\xac\x89\
+\xcc\xfd\x8d\xc7\x9a\xb8\x32\x0b\x33\x08\x8c\x4c\xa8\x5a\x5a\xf8\
+\xf4\x62\xbc\xe6\x62\xe3\x16\x27\xea\xcc\x0e\xa2\x41\xed\x1b\xfb\
+\x6d\x4e\x60\x3e\xaf\xe8\x09\x0d\xe6\xaa\xd6\xc2\xe0\xeb\xad\xd0\
+\x1d\xde\x76\xc1\xb3\xde\xc1\xb0\x17\x01\xca\x01\xbd\xc9\xca\xa0\
+\x47\x02\x9c\xbb\x24\xb1\xa9\xe0\x21\x18\x3f\x7d\x42\xb8\x49\xe9\
+\x4e\x9e\xd1\x05\xa2\x89\x62\xd3\x89\x74\x03\xd0\xea\x8e\x71\xef\
+\x8a\xe5\xee\x9a\x71\xef\x8a\xbb\xc5\x92\xe9\xa4\x60\xfe\xca\x94\
+\xd2\x78\x69\xaa\x6a\x13\x57\xa3\xbb\x5b\x4c\x18\x32\xe7\x8e\x29\
+\x77\x8b\xa5\x71\x78\x34\x83\x87\xbb\x3d\x79\x16\x71\x31\x9e\x50\
+\x4e\x86\x28\x8a\x13\xd9\x69\x01\x6c\x01\xb9\x1b\x97\xb0\x80\x64\
+\xe2\x73\x28\x3e\xf0\x78\xf1\x84\x74\x52\xb0\xae\xec\x20\x2c\xce\
+\x96\xaf\x7d\x52\x5d\xec\x18\x0c\x62\xa7\xe5\x06\xa6\x75\x48\x49\
+\x2d\x27\xea\x92\x70\x44\x61\xb5\x70\x43\x5b\xda\x38\xa6\x38\x93\
+\x03\xf6\x91\x26\xc0\xb1\xa9\xa1\x6a\x16\x91\xcd\x7e\x0c\x3b\x8c\
+\x30\x6a\x15\x94\xdb\xcd\x49\x91\x59\xb0\x49\x03\xee\x08\xd9\xaa\
+\xf4\xcd\x92\x82\xc2\xf6\xcb\xd9\xd6\xfc\xc6\xce\x55\x11\x23\x0c\
+\xd0\x76\xc6\xd7\x3d\x76\x29\x3c\x91\xa1\x96\x7b\x2a\xd1\x6b\x31\
+\xf1\xd6\x46\x34\xe3\xa3\x24\x55\x30\xe0\xb0\xd9\x20\x06\x89\x03\
+\xb6\xb2\xfa\x18\x9c\x57\x8c\x5b\xe4\x95\x2d\x06\x0e\x3c\x3d\x39\
+\x28\x35\x16\x5d\x62\x99\xdc\x56\xf6\x8c\x55\xb7\x46\xdb\x6c\x04\
+\x85\x8b\x74\x5a\x56\x76\x51\xcd\x66\xb0\xde\xb2\x31\x90\xc4\x39\
+\x12\x1d\x74\x0f\xc2\x80\x57\x1f\xfe\x8a\x7e\x57\x10\xee\x04\x79\
+\x76\xad\xa5\x6f\x3e\xe4\x62\x78\xed\x7a\xeb\xc2\x18\xe6\x8b\x88\
+\x3c\x96\x84\x59\x44\x1e\x0b\x53\xc8\x91\x0d\xfa\x92\x6c\x7a\x13\
+\xf2\x9d\x74\x05\x9d\x61\x35\x61\x34\x9a\xea\x46\xd9\x09\xbc\x01\
+\x62\xd6\x08\x1e\xb4\xfe\xed\xad\x30\x90\x92\x2c\xf3\x82\xa9\x17\
+\xba\x8e\x98\x4e\xf0\x19\xe9\xa4\x40\x72\x4f\xd4\x82\xb0\x0d\x18\
+\x0d\x1b\x8b\xbc\xc4\x44\x31\xed\x62\xce\xe8\x5d\xd5\xe8\x81\xb3\
+\xb2\xa0\x38\xb3\x60\xb2\x61\x20\xa1\x6c\x0f\x5e\x0d\x3e\x69\x3d\
+\x61\x36\x8d\xc7\x3e\x7d\xb1\x15\x38\xcb\xa6\x16\xe6\x91\x6d\xbb\
+\x6f\x48\x15\x07\x6f\xc3\xca\x49\x54\x71\x48\x03\x48\x24\xa8\xa8\
+\x9e\x94\x69\x62\x97\x98\xc5\x9b\x05\x74\xaf\x31\xc9\xd2\x02\xd8\
+\xca\x09\x31\xee\x1a\x56\x8e\x1c\x13\x27\x87\x92\x66\x48\x2c\x63\
+\x4f\x6c\xf4\x71\xb0\xd1\x51\xcd\x30\x36\xa0\xb3\x9f\xd3\x00\xad\
+\x6a\xe6\x2b\x44\xc9\x61\x37\x77\xce\xc5\x61\x37\x87\xa8\x24\x69\
+\xac\x13\x6a\x56\xcf\x48\xbd\x92\x40\xfa\xf8\xa2\x44\x1c\x22\x07\
+\xe0\xb5\xa7\x75\xf6\x49\xca\xed\xf8\x90\x4c\x08\xdc\xb3\xb9\x87\
+\x8b\xe1\x9e\x71\x3c\x26\xcf\x14\x0b\x25\x19\x18\xef\xfa\x62\xb8\
+\x67\xdc\xbb\xa2\x8c\x57\xae\x6b\x63\x70\x90\x04\x19\x74\x26\x3d\
+\x14\xa6\x0b\x64\x3a\xf9\xd1\xdf\xd0\xc6\x2f\x2b\xff\xd2\x84\x82\
+\x16\x74\xbd\x91\x2b\xbf\x5b\x09\xe1\xb6\x26\x60\x34\x0e\x77\xbc\
+\x5d\x94\x8e\x8d\xfd\xc9\x82\x74\x31\x21\x99\xcc\x18\x2c\xbe\x85\
+\xe1\x57\xba\x3d\x69\x7b\xa1\x19\xdc\x3a\x1c\x59\xe2\x2c\xb6\xd0\
+\xfa\xbe\x55\x54\x51\xca\xb8\x66\xd7\x48\xb4\x17\x69\xcd\x85\x9f\
+\x54\xf8\x4d\xf7\x41\x6d\x80\x01\xd2\xa6\x39\xc0\xb0\xf0\xce\x59\
+\x74\x41\x43\x38\x14\x48\x02\x3b\x53\xc2\x14\x43\xb6\x41\xe6\xc8\
+\xd7\x8d\x89\x35\xc5\x01\x54\x04\xaa\xd6\xc3\x56\x7f\x46\xa6\xca\
+\xe7\xba\x76\x45\xd5\x72\x20\x9a\x96\x9a\x65\xdf\xe3\xaa\x9d\x6d\
+\x16\xf5\x44\x81\x5a\xee\x9d\x2e\xb2\x4c\x7c\x2a\x26\x72\x0a\x21\
+\x08\x94\xc2\x0b\x29\xf9\xbd\x95\x00\x00\x20\x00\x49\x44\x41\x54\
+\x06\x6c\xf7\x77\x24\x45\x8f\xce\x80\x46\x67\x89\x72\xec\xac\x7d\
+\xe4\x7a\xf8\xa0\x10\x82\xd4\xcb\x48\x2a\xed\x4c\xf8\x55\xc6\x6e\
+\xa7\x0b\x0b\xc1\x46\x5b\xa9\x5f\x4c\x47\x2c\x6d\x2b\x96\xf9\xda\
+\x8a\x95\x2e\x96\xac\x1b\x9e\xf2\x8f\x01\xb8\xd9\xf2\x14\x74\x57\
+\x14\xbd\x09\x4f\xe2\x88\xee\x95\x68\xb5\xf2\xd7\xbf\x6a\xcf\x65\
+\x94\x01\x96\xa3\x89\xbb\xbe\xc8\x22\x4a\x5b\xf2\x68\xb4\x51\x35\
+\x27\x13\x09\xf1\xce\xe8\x7d\xc9\x3a\x8b\x78\x44\x40\x35\xdc\x00\
+\xbd\x96\x23\xe1\xa4\x84\x19\x66\x68\xc7\x66\xf5\x96\x3e\xfe\x64\
+\x41\xb9\x98\xe0\x4f\x16\xc0\x8c\xcd\xe4\x2b\x2e\x4c\x7b\x52\xd9\
+\x2f\xf0\xb7\xfa\xf5\xf6\x3d\xf6\x4a\xe9\xb2\xb3\xed\xc0\x08\xa4\
+\x6c\x31\x5e\x13\xb4\xcd\x7f\x6a\x57\x7a\x0e\xc0\x71\x51\x92\x89\
+\x9c\xb8\xe8\x91\x1d\x36\x2d\x85\xab\x7d\xdb\x1e\x19\xd0\x27\x62\
+\x6b\x80\x6b\x8b\x2b\x4d\x19\xd2\xeb\x47\xf8\x69\x40\x91\xa4\x48\
+\xe9\x1d\x39\x15\x5e\xad\x9e\x8d\x0e\xce\x84\x47\xac\xac\x7f\xbc\
+\xa3\x93\x14\x3a\xb3\xa0\x70\x4c\x6c\x01\xaa\x27\x60\xd6\x32\xa8\
+\xf7\x09\x9f\xd8\x16\x3b\x6c\x76\xc2\x96\xa3\xb7\x45\x87\x04\xad\
+\x7f\xad\x53\xb1\x53\xb9\x63\xe3\x3e\x17\x1a\xc8\xef\x2b\x78\xd4\
+\x6f\x15\x3b\x9a\x3e\xb2\x65\x66\x9f\x0c\x5d\x14\xcc\xb8\x55\x8a\
+\xe2\xed\x82\x0f\xab\x5b\x76\x77\x7b\x3e\x2c\xdf\xf2\x48\xe4\xfc\
+\xd5\x93\x9f\xf0\xd3\xe7\xda\x76\xaa\x06\x53\x3a\x55\xc2\xd5\x64\
+\x4c\xe0\x95\x40\x41\xbe\x92\x70\x26\xe2\xd9\xb4\xdd\xec\xed\xf5\
+\x22\x73\x76\x1f\x71\xa9\x3b\xb0\x33\x93\xcb\xcb\xd2\xd3\xd7\x34\
+\x0f\xdd\x71\x42\x9a\xa5\x5a\x5f\x37\x82\x44\xee\x08\x9a\x09\xfa\
+\x2c\x59\x2e\x20\x98\xe0\xbc\xe4\x92\x7b\x32\x86\x8c\x58\x81\xf2\
+\x4d\xa1\x83\xf6\xe2\x4e\x49\xba\x22\x22\xdc\xdc\x36\xdc\xa9\x19\
+\xcb\xe2\x9a\x31\x57\xa4\x8b\x92\xab\xa9\xfe\x4b\x9a\x4c\xdc\xf2\
+\x8a\x15\xba\xec\x8c\x49\xa4\x45\xd1\x84\x54\xea\x6a\x91\x30\x76\
+\x1a\x26\x81\x56\x18\xe0\xb9\xd2\x85\x19\xc8\x9d\xf5\xe3\xfa\xe7\
+\x92\xbe\x2b\x2b\x47\x91\x60\x7b\x34\x1c\xb0\xa9\x77\xb7\x48\x44\
+\x14\xd5\x95\x3f\x24\x24\x11\x30\xa5\x44\x11\xa4\x1e\x45\x52\x3a\
+\x2d\x8c\x8a\x9c\x6b\x81\x52\xc4\xf4\x88\x84\x44\xa8\x8c\x83\x9e\
+\xd3\xd3\xea\xa1\xeb\x89\xc8\x01\xd3\x5e\xb7\xba\xb8\x82\x93\xf6\
+\x24\x77\x5b\x05\x48\xea\x8a\x5d\x4e\x45\x1f\xc1\x76\x0f\xc9\x26\
+\x85\x60\xe0\xd8\xb8\xe9\x1b\x57\xfe\x0c\xaf\xeb\xa1\x96\x8a\x24\
+\x38\xb8\xb2\xb4\x17\x0c\x34\xd0\xb7\xd7\x6c\xc3\x09\x87\x4d\xca\
+\xdb\xbb\x0f\x6c\xb2\x15\x3f\x7c\xfb\xbd\xfe\x61\xa3\x4b\xd4\xf5\
+\x3b\xae\xf7\x1a\xe4\x7f\x79\xb7\x81\x3f\xff\xd7\xfc\xcb\x8b\x01\
+\x5f\x3e\xec\x90\x2d\x0b\xe2\x71\xc0\xdf\xfb\xfa\x37\x99\x3d\x0b\
+\x18\x8b\x3e\xb3\xcf\x1e\x30\x59\xc3\x75\x67\x8f\x98\x07\x84\x93\
+\x91\x2e\x96\x78\x05\x1e\xc9\x09\x30\x3d\xb5\x23\x4e\xba\x75\x07\
+\x36\xb0\x5e\x64\xc4\x41\x41\xb6\x08\x18\xf6\xba\x8d\xce\x6b\xbd\
+\x28\x94\xd9\x0c\x50\x8e\x6d\x93\x38\x41\x70\x8f\x6a\x4d\xe0\x94\
+\x2c\xb2\x31\xdb\xf8\x9a\x07\xf1\xd8\xb1\xeb\x7a\xb7\xe7\x89\xd7\
+\x83\x46\x50\xc8\x02\xf8\xb8\xd8\x91\x0f\xea\xeb\xe9\xc2\xca\xc9\
+\x7b\x60\xc2\x87\x6a\xc1\x8c\x19\x61\xb7\x51\x59\xb5\xd5\xbe\x6c\
+\x4d\x57\x24\x86\x89\x5b\xae\x6d\xbb\x4d\xc8\xea\x61\xcb\xa0\x96\
+\x4f\x14\x15\x42\x49\x5d\xc9\x33\x00\xb7\x56\x17\x46\x0a\xb8\x09\
+\xf2\x26\xff\x10\x48\x0f\x19\xd1\x7a\x3f\x5b\x1c\xd1\x96\x9a\xfe\
+\x1b\x92\x08\x48\xeb\x50\x7b\xa4\x1a\xf6\x9c\x93\x17\x0a\x44\x84\
+\x42\xb5\x7a\x1a\x6c\x5e\xa2\x6d\xff\x65\x8d\x83\xe5\xa9\x57\xdc\
+\x6a\x4f\x32\x5e\xf1\x71\xe9\x19\xd0\x63\x5f\x8b\x3b\x44\x3c\x3d\
+\x11\x18\x91\xc8\x08\xd1\xab\xfd\x3c\xee\x12\x66\xba\x2c\x1d\x6c\
+\x36\x04\x1b\xf8\xb6\x90\xdc\xbe\x7b\xc5\xab\x77\x19\xea\xfa\x1d\
+\x37\xcb\x37\xf5\x0e\x14\x6b\x6a\x98\x45\x4f\xb9\x97\x6f\x78\xf6\
+\xf4\xa7\x74\x0b\x0d\xea\xef\x6e\x0f\xa4\x77\x1b\x7e\x7a\x7b\xe0\
+\x7f\xf8\x8b\xff\x91\x17\xcf\x03\xa2\xc7\xff\x21\xff\xf1\x3f\xe8\
+\xf1\x60\xf4\x1f\x10\xcb\x15\x74\x21\xcf\xbb\xf8\x1d\x89\x57\x3d\
+\x04\x8e\x3a\xad\x9b\x15\x3c\x7a\x48\x46\x94\xdc\x33\xec\x75\xf5\
+\x00\xed\xd0\xce\x10\x6e\x57\xd1\xce\x8d\x67\x55\xce\x8d\xa9\x07\
+\xaf\x44\xb1\x62\x9f\x17\x7a\x04\x80\x29\xf5\xf7\xb3\xa8\x36\x33\
+\x1a\x91\xd4\x93\xe9\x9a\x4a\x4f\x1e\x7a\x6b\x6f\x4f\x16\x70\x87\
+\x93\x14\x0f\x17\x0b\x18\xce\xc8\xf7\x99\x03\xb2\x93\x23\xb6\x83\
+\xc5\xdf\xb7\x3d\xe4\x61\xe9\xb1\x95\xd2\x68\x52\xa9\x01\x28\x3d\
+\x8a\xc8\x00\xcf\x68\xe1\x75\x2a\x11\x89\x06\xa6\x02\x02\x93\x58\
+\x3b\x8e\xa7\xdb\x02\x48\xab\xf3\xf6\x9c\xa9\xd6\xd0\x9e\xa9\xf4\
+\xf0\xcd\x02\x4f\x2f\xec\xa4\x0b\xfc\x38\x6b\xad\xe1\x11\x97\xd5\
+\x16\x21\xa6\x28\x2a\x76\x66\xae\x84\x05\x72\xd3\x99\x50\x67\x5c\
+\x89\xe3\xdc\xc4\xb1\xfd\x66\xc3\xf1\x22\xee\x12\x66\x3e\xdb\x3d\
+\xa8\xe5\xbe\x55\x82\x6e\xca\x06\xab\x50\x42\x33\x88\xe5\xa6\x08\
+\xd8\xbc\xbb\x65\x79\x77\xcd\xdf\xbc\xc9\x1d\x38\x89\x1f\xb3\xca\
+\xbf\xe6\x8b\x81\xa2\x5b\xbc\x63\x1f\x3c\x6e\x01\x79\x16\x3d\x65\
+\x16\xa1\x1f\x7b\xfa\x53\xb6\xa6\xdf\xf7\x46\xbe\x81\xd7\x6f\xf8\
+\xfd\x6b\x9f\xaf\x2e\xbf\xe3\xf1\xd3\xdf\xe2\xcb\x9f\x8c\x08\x46\
+\xa5\x8e\x86\xae\x37\x8e\x4d\x5d\x51\x84\x7a\x0e\x73\x9a\xa5\x10\
+\xef\x48\x48\x4c\x6b\x93\x32\x91\xcd\x5e\xeb\x76\x42\xaf\x9e\x7b\
+\xd1\x92\x18\x5a\x4e\x94\x8b\x40\xa7\xe1\x0c\x4b\x87\x8d\xcc\xf3\
+\x49\x37\x89\x25\x9e\x13\x97\xc1\xa7\x14\x11\xdb\xc5\xc7\xd3\xcf\
+\x31\xda\xf8\x76\x82\xd3\xc4\xc7\xaf\xb7\x3a\x3b\x29\xbb\xa6\x65\
+\xdf\xf8\xba\xbe\x99\xe0\x6e\x17\x5c\x76\x3b\xd8\x56\x64\x81\x02\
+\x15\xa2\xa8\x78\x38\x6b\x03\xd1\x2d\xd4\x8e\xfc\x5f\xdf\xee\x08\
+\x8d\x12\x36\x47\xbd\x19\xc7\xd5\xbb\x56\xde\xd8\x31\xaf\x74\xa7\
+\x3a\x88\xec\x8e\x61\xc6\xf5\x1f\xbc\x7e\x63\x9a\x4e\xfb\x3c\x1e\
+\x9f\xb2\xd4\xf2\xa3\x56\xa5\x66\xc3\xa8\x75\x2b\x8e\x2b\x76\xeb\
+\xd8\xc7\xf7\x0b\x50\x92\x30\xbb\x38\xb1\xdc\x74\x9c\x32\xa5\xa8\
+\x12\x96\x4a\xb2\x58\x2c\xb9\xfb\xdb\x1f\x78\x69\xe6\x32\xdc\xef\
+\xeb\xe7\xcf\xa2\xa7\x20\x7f\x01\x3c\xe5\xe3\xc3\xe7\x3c\x0d\xcc\
+\x21\xfe\x16\xc2\x27\x2f\xe0\x5e\xdf\xde\x07\x8f\x99\x8f\x5e\x33\
+\x5d\x3d\x77\xe0\xee\x16\xba\x7f\xed\xdb\x1b\x8f\xf7\xea\xcf\xa8\
+\xe6\x13\x2e\xfe\xee\xd7\x8c\x45\x9f\xac\x0f\x76\xc4\xc4\xc4\x00\
+\x2b\xcf\x22\xbc\xfd\x12\x46\x38\x6d\x2b\x19\x99\xd6\x26\xad\x89\
+\xed\x10\x40\xdb\xea\x94\x92\xb7\xe4\x45\x13\xc0\x76\xa4\xc0\xc9\
+\xbf\x3d\x53\x10\xf7\x74\xff\xdf\xe4\x9e\xa6\xa5\xd3\x94\x0f\xee\
+\xfa\x27\x4e\xa1\xd0\x09\x3e\x63\x77\xf7\x81\xf1\x85\x4f\xba\x98\
+\xe8\xcc\xd0\x51\x83\x41\xf3\xfd\x5a\x4c\xec\x37\x42\xf1\x27\x8b\
+\xdc\xc0\x2e\xe5\x36\x08\x11\x35\x3a\x99\x55\x6d\x7c\x35\x1a\x33\
+\xa3\x33\xe0\x94\xb4\xa5\x84\x3c\x03\xe6\xd6\xb4\x9f\x93\xce\x46\
+\xe3\x25\xab\xfa\xb1\x43\x1a\xd0\x49\x0a\x0a\x0b\x76\x3b\x40\x45\
+\x54\x27\x65\x71\x61\x58\x53\xcf\x24\x6e\x3b\x17\x1a\xac\x09\x1b\
+\xbf\x6a\x8d\xb6\x02\x58\xc7\x3e\x9e\xaa\x88\x45\x0e\x22\x22\x38\
+\x94\xdc\xed\xef\xb9\x60\x76\x02\xe4\x55\xe5\x91\x2f\x17\xbc\x7e\
+\xbb\xe0\xf5\x9f\xfd\x6b\xae\xf7\x25\xe9\xdd\x86\xe4\x62\xd0\x06\
+\x30\xf0\xe2\xab\x7f\x00\xc0\x4f\x2e\x66\xfc\x5f\x87\x11\x7f\xbf\
+\xb3\x82\xce\xbd\xae\x52\x3d\x86\x37\xea\x9a\xd1\x7d\xce\x74\xf5\
+\xfc\x84\xa5\x01\xc6\x83\x1b\xb2\x65\xc1\x1f\x2e\xef\x78\x51\x24\
+\x3c\xfb\xf2\x09\x97\xcf\xd7\x04\xa3\xaf\x48\xb3\x1d\xfd\x2a\x6a\
+\x05\xfe\xf3\x5c\x92\x66\x11\xc4\x21\x65\x76\xcf\xf5\x62\x4f\x1c\
+\x14\x84\x59\xc4\x7a\xb7\xa7\x9f\x45\xa6\x62\xa7\xc1\x3a\x1a\x5e\
+\x1c\xfd\x00\xf7\x46\x72\xd4\xd2\xc3\x4e\x0f\xb2\x2d\x4b\x13\x11\
+\x51\x66\xf7\x67\x17\x89\x9f\xac\xd8\x0d\xda\x32\xe6\x50\x7c\xa0\
+\x77\xd1\x65\x79\x77\x4d\xef\xa2\x0b\xcc\x4c\x05\xf4\x47\xca\xce\
+\x0e\x58\x52\x1d\x85\x79\x2a\xa4\xe9\x4c\xde\x22\xf5\x4c\x09\x67\
+\x87\xe1\xba\x3b\xdc\x20\x6d\x75\xe4\x2a\x9c\x01\x63\xd0\x90\x26\
+\x67\x2b\x75\xe7\xcb\x5e\x8d\xec\x84\x6a\x06\x3c\x5a\xfa\x8c\x46\
+\x07\xc7\xb9\x2a\xa2\x6a\x1c\xfe\x43\x51\x11\x9a\x53\x1f\xb8\x8a\
+\x9d\xef\x52\xbf\x8e\x89\x0b\x91\xd2\x27\x66\x2b\xb4\x0f\xac\x94\
+\xa4\x1f\x0c\x10\x9d\x94\x2d\x29\xa2\x39\x1d\x49\x49\x3e\x2e\x56\
+\xfc\xe2\xdf\x7c\xcf\xcb\xd7\x6f\x48\xef\x74\x2e\x20\xb9\x18\x38\
+\x20\xcf\xa2\xa7\x0c\x1f\xc2\xd7\xbf\xf6\x05\x9f\x5d\x3d\xa5\x5c\
+\xf7\x99\x87\x1e\xff\x19\x70\xb3\xdc\x33\x9e\xe9\x21\x21\xcb\xbf\
+\x79\xcb\x53\x71\x05\x8f\x61\xfd\xae\xd6\xcf\x57\x5d\x9f\x3d\x70\
+\x2f\xdf\x00\x4f\xe9\xa2\x59\xf9\xe5\xab\xd7\x04\xea\x15\xd9\xe1\
+\xef\xf1\xc5\x57\xdf\xe2\x75\x9e\x52\x25\x29\xc5\xca\x07\xfa\x6c\
+\xf7\x8a\xe7\xbe\xaf\xa7\xc5\x65\x39\xf9\x62\x45\x8e\x07\x03\xed\
+\x3b\x8d\x7b\x57\x44\x13\x75\x04\xd6\xf3\xce\x73\x21\xba\x04\x6a\
+\x6f\x8a\x32\x5e\xab\x42\xb8\x57\xaa\x76\x30\x1a\x71\xcd\xba\xf1\
+\x34\x69\x6d\x8b\xde\x15\xe1\xe6\x07\x0e\xc5\x07\xc3\xc0\xba\x5c\
+\x5d\x2e\x26\x74\x02\x78\xb8\xf8\x1e\x86\x33\x42\x7f\xeb\x7e\xcd\
+\xe3\x1d\x22\xe9\x77\x08\x0f\x44\x7a\xa2\x62\x54\xb9\xe8\x65\xad\
+\x65\x95\x03\x30\x91\x3e\xac\x67\x87\x2e\x7e\x60\x60\x7a\x34\x57\
+\xa2\x06\xb0\x6c\xed\x00\x7d\xfb\x63\x2b\xb3\xc3\x44\xc7\x13\x7e\
+\x9a\x4c\xac\x1f\xf1\xb6\x15\xbd\x7e\xa4\xb3\xc2\xa2\x6a\xa5\xd6\
+\x38\x3e\xa5\x55\xe3\xf4\x60\x34\x4f\x0b\x66\xde\x51\x1c\x55\x1a\
+\x43\xe5\x9d\x48\x8a\xe6\xc2\x4e\x29\xdd\x67\x97\x31\x44\xa9\x0d\
+\x7d\x11\xbb\xbe\xba\x9c\xd2\x81\x77\x6b\x5e\x9b\x2f\x7d\x16\x8b\
+\x0d\xdf\xfd\xe5\x1f\xf3\xd2\x2c\xc6\x2c\xfb\x5a\x30\x03\x46\x0a\
+\x3c\x06\x15\xf0\xf9\x64\x4c\x32\xd1\xc5\x85\x70\x55\x71\xff\xc5\
+\x0b\xf2\xfb\x35\x9b\xfb\x3b\xe6\xbf\x35\x63\xf9\xdd\x5b\x6e\xee\
+\xee\x19\x3e\x7e\x0a\x87\x37\xac\x6f\x71\xda\xf9\xaa\xeb\x73\xdd\
+\x90\x17\xfb\xe0\x31\xdf\xde\xbc\xe3\x2b\xfe\x94\xb9\xf7\x35\xd3\
+\x2f\xa1\x58\xfd\xc4\xc8\x81\x85\x9e\xb8\xee\x5f\x81\xc9\xe3\x86\
+\x93\x11\xd3\x46\x77\x74\x84\x72\x5d\xd2\x1a\xc0\xe9\x19\x20\x9b\
+\xd0\x8e\xb2\xc3\x0c\xdb\xcf\x49\x33\x5c\x72\x2e\xcf\x25\x8c\xdb\
+\x3a\xb6\x14\x91\x2b\x70\xd8\xad\x67\xe6\xd8\x5d\x97\x57\x3c\x0b\
+\x4a\x7a\x17\x5d\x76\x77\x7b\xc7\xc6\x37\x8b\x2f\xe8\x15\x77\x84\
+\xe5\xdf\x39\x49\xc1\x95\xa6\x33\x3b\xdd\x1e\x08\x3b\x48\x94\xf4\
+\x10\x78\xad\xc6\xce\x52\x7a\xe6\xd4\x5e\x9e\x69\xee\xd4\x95\x39\
+\xa1\xb4\x1f\xdc\xca\x50\x28\xe9\x5c\x09\xfd\xe3\x5a\x45\xa4\x41\
+\x1b\xa4\x3e\x71\xb5\x25\x13\xa7\x5a\xda\xce\x21\xb6\x47\x02\x89\
+\x47\x5c\x94\xb0\x3e\xe8\x25\x42\x3f\x6e\x2f\x10\x8e\x00\x2c\xa8\
+\x58\xd8\x40\x90\xd2\x3e\xb7\x70\x61\x9c\xc8\x01\x59\x1d\xb1\xf2\
+\x49\x2a\xaa\x31\x3c\x51\x88\xc8\x01\xd4\xc7\xd3\x41\xa0\x32\x21\
+\xa7\x64\x4b\x46\x9f\xd8\x9d\x16\x01\xe0\xe3\xe2\x3d\x2f\x7f\x71\
+\x7d\x16\xc0\xcb\x71\xc4\x78\xa9\xbf\x99\xeb\x7d\xc9\x0b\xe0\x90\
+\xbd\xe3\xcf\xfe\x48\x31\x1e\x8f\x78\xfe\xec\x21\xa3\x2f\x86\x8c\
+\x83\x29\xab\xc9\x03\x1e\x3d\x19\x72\x2b\x61\x91\x57\xa8\x59\x84\
+\xb8\x97\xdc\xdc\xc1\xd0\xb0\xf2\xf7\x1b\xc1\x28\xd4\x32\x46\x33\
+\x32\x5c\x75\x35\x23\xa7\x1f\x0a\xbe\x15\x07\xbe\xe2\x9e\xe9\x97\
+\x7f\xcb\x65\xfc\x33\xe6\x0b\x7d\x3a\xad\xfd\x62\x0d\x93\xc4\x65\
+\x90\xdb\xe7\xc0\x4b\x1b\xdf\x48\xda\x62\xde\x20\x0b\x28\xe2\xa2\
+\x35\x1a\xa0\x5c\x28\xfc\x09\x24\x71\x0d\xe4\xa4\xe1\x82\x4d\xfc\
+\xe2\x6c\x89\xb9\x05\xe4\x26\xa3\x1e\xde\x40\xe7\xb1\x63\x62\xc0\
+\x5c\xff\xc0\x20\xb8\x3a\xab\x89\xf5\x18\x81\xa4\x0e\x00\x75\xa2\
+\xca\x00\x19\x57\x72\xb6\x00\x2d\x4c\x76\x42\x33\x99\x86\x42\x3e\
+\x3f\xd0\x79\x6c\xaa\x70\x91\x30\x2c\xae\x4b\xcd\xbe\xd7\x67\xeb\
+\x7b\xa6\x25\xc9\x27\x8a\xa4\xb9\xad\xa5\x88\x46\x79\xe6\xb4\xb6\
+\x34\xef\x19\x45\xc2\x74\x2d\xeb\x56\x26\x26\x3d\x77\x68\xaf\x27\
+\xbf\xab\x23\xde\xd6\x72\xa2\xc9\xd2\x75\x7b\xbe\x0d\xc4\x47\x2e\
+\x5d\x86\x19\x46\x2d\x84\x40\x2d\x7d\x42\x3b\xab\xd8\x9c\x98\xd1\
+\x2e\xf2\xb6\xa4\x84\xca\xa3\x14\x03\x60\xa3\x47\xbf\xa2\x25\x46\
+\x5f\xc4\x6c\xc9\x88\x22\xc1\x66\xe1\xf1\xf1\xfa\x9a\x6f\xfe\xcf\
+\x6b\xfa\xd7\xdf\x90\xe6\x9d\x16\xfb\xf6\xe3\x35\x49\x38\x68\xc1\
+\xc2\x97\x37\xec\xee\x9e\xc0\xc5\x3d\x72\x79\x4f\x59\x6d\xc9\x8a\
+\xc7\xbc\xb8\x0a\x18\xc7\x43\xf0\x21\x61\xc0\x8b\x9f\x7c\xc9\x57\
+\x8b\x19\x1f\x9e\x7b\xf0\xe7\xdf\x38\x56\xfe\xe2\x9d\x96\x12\x16\
+\xc0\x76\xe7\xd0\x54\x1f\xc2\xab\xd7\x04\x4a\xff\xdb\xfb\xbf\x91\
+\x52\x15\x1b\x92\xac\x42\x7d\xf6\xd0\x2d\xec\xdc\x62\xce\x6c\xb5\
+\x17\xbc\x6b\xf9\xc8\x3e\x82\x92\x94\xf5\x4e\xc2\xae\x4e\x9b\x85\
+\xb1\x84\x18\x86\xb4\x4f\xcf\x65\x99\x78\xb9\xbb\x26\xcf\x46\x8c\
+\x9b\x55\x6a\x53\x72\xf7\x4d\xb1\x4a\x6f\x7d\xf6\x96\x5a\x3a\x4f\
+\x39\x14\xd7\x9f\xd4\xbc\xd6\x62\xb3\x16\x5d\xb3\x62\xe7\xe6\x13\
+\x07\x44\x04\x0d\xae\x2a\x90\x46\xdc\x7a\x04\xd2\xd3\x16\x9a\x05\
+\xb8\xd2\xad\x45\xba\x65\xa9\x69\x9b\x29\x67\x79\xc5\x05\x64\x87\
+\x1d\x1c\xc0\x2b\x7a\x70\x50\xd0\xe9\x21\x03\x45\x54\x98\x25\xd6\
+\x61\x07\x41\xd4\x0a\xd2\x17\xcd\x6e\x65\xdb\xd1\xa1\x38\x93\x38\
+\x6e\x6b\x60\x94\x57\x57\xf7\x8e\xc0\x5b\x7f\x91\xb2\x5e\x8c\x58\
+\x50\x5b\xcf\x58\xc4\xad\xa1\x2a\xa1\xb2\xb2\x6a\x4d\x6c\x40\xdb\
+\xa7\x5e\xec\xf5\x89\xd9\xca\x8c\xc5\x62\xc5\xcb\x5f\x5c\xf3\xc3\
+\x9b\x9f\xb3\xd8\x45\x4c\x7a\xa7\x95\xaf\x77\x79\xce\xe3\xc6\xc2\
+\xee\xbb\xdb\x03\xf0\x96\xcf\xcc\x90\xbc\x1f\xee\xde\xf2\xc3\x77\
+\x6f\xf9\xf0\xe5\x13\xaa\xbe\xc7\x2c\x18\x31\x0a\xfa\x84\x93\x11\
+\xb3\x27\x0f\x39\xa4\x7d\x5e\xfc\xe6\x13\xf8\x33\xb8\xb9\xbb\x67\
+\x35\x0b\xc9\xdf\xbe\x3c\xf9\x9c\xab\xae\xcf\xf5\xbe\xe4\xaa\xeb\
+\xf3\xed\x8d\x07\xfc\x82\xdd\xf8\x92\x8b\xb0\xa0\x1a\x4c\x1d\xd0\
+\x5c\x07\x88\xa9\xc6\xd5\xee\x44\x7d\x6e\xbd\x3c\x53\xe4\xf1\x9e\
+\x4e\x4f\x30\x31\x7e\x72\x39\xb1\x33\x2f\xbc\x06\x7b\x9f\xd7\xce\
+\x3a\x59\xd7\x37\x5d\x21\x01\x9d\x66\x17\x58\x63\x36\x47\xb7\xc1\
+\xc4\x9d\xf8\x31\x87\xe2\x43\xcb\xa5\x38\x14\x1f\xd8\x14\x77\xc0\
+\x17\xad\x79\x1e\x2d\xbf\xd9\x16\x3b\x22\x24\xdb\x48\x77\x70\x54\
+\x64\x6e\xe1\x25\x51\x26\xf7\x50\x03\xa6\x14\x1d\xc8\x34\x7f\xb6\
+\x22\x21\x91\xd0\x0c\xbb\x3e\xc0\xb0\x43\x2c\x4d\x3a\x3f\x2b\x08\
+\xed\xa9\x36\x94\x47\x66\x7c\xc4\xb8\xd3\xa3\x3a\xd3\x09\x22\xcf\
+\x74\x88\xd4\x8b\xba\xe8\x14\xcc\x06\xb8\x91\xad\xd8\x99\x57\x58\
+\xfc\x0a\x4e\xf3\x1f\xe2\x68\xa9\x7b\x5c\xbd\x2b\x44\x4a\xa0\xb4\
+\x36\x54\x4a\x12\xe2\xe9\x69\xa0\xa2\xd6\xc2\x1b\xe5\xb1\xbe\x97\
+\xbc\x7c\xfd\x86\xc5\x4e\x1f\x8a\x6f\x97\xb7\x94\xf2\x23\x7e\xf4\
+\xc0\x6d\xbf\x78\xf4\x81\x2a\x7c\xec\x18\x3a\xb9\x18\xf0\xdd\xed\
+\x81\x6c\xf9\x9a\x78\x5c\xdb\x50\xd7\x3f\xcf\xf9\xfc\x71\xcc\x9b\
+\xbb\x37\x8c\x2f\xae\x18\xce\x03\xbe\x79\xf5\x57\xae\xcb\x66\xd0\
+\xdf\x73\x73\x47\xcb\xa9\x68\x5e\x2c\x1b\x37\x81\x5c\x7c\xf3\x06\
+\xef\xc1\x67\xf4\x1e\xed\x18\x35\x2c\xb3\x34\x83\x3c\xbf\xd3\x43\
+\x5c\x76\x4b\x13\x62\x12\x80\xae\xde\xd1\xeb\xba\x41\x29\x7a\x4c\
+\x86\x76\x1c\x44\x7c\xcf\x21\x0b\x28\x9c\x8c\x48\x5d\x37\x89\x1e\
+\x68\x98\xd6\xbe\xb1\x59\xd8\x75\x6c\xf3\xa4\xcd\x93\xd8\x3c\xb5\
+\x6a\x30\xf1\x99\x8b\x05\xf4\x3e\x9b\xd6\x7e\xbc\x8a\x8f\xa4\xc8\
+\xbd\x2e\x3b\x07\x52\xb3\x58\xd0\x58\x5a\x35\xe3\x92\x4d\xc6\x45\
+\xe9\x54\xdb\x7e\xda\x21\x57\xba\xdf\xcd\x49\x04\x57\xb1\x2b\xf5\
+\xe4\x16\x33\xf8\x62\xb8\x3e\x40\xa7\x47\xd5\x8f\x89\xb7\x86\x81\
+\x2d\x78\xb6\x19\x55\xdf\x33\x59\x63\xcf\x2d\x0e\xcf\xf9\xc7\x38\
+\xcd\x6b\xd8\x3f\xf5\xdb\xc5\x12\xd1\x38\xf5\x97\x09\x17\xc5\x8b\
+\x1d\xea\x51\xd7\xc5\x4a\xad\x25\x77\x3e\xfc\xab\x35\x7f\x61\xea\
+\xfc\x96\x91\x9b\x0b\x40\x3b\xe2\x2a\xc7\x63\x7b\x7d\xcd\x87\xf7\
+\xd7\xbc\x7d\x27\x99\xf4\x72\x07\x64\x3f\x7a\xc0\xf5\xf5\x47\x36\
+\xea\x8a\xe7\xd1\x8e\x6f\xe5\x1b\x1e\x4d\x15\xf1\x44\x90\x5c\x3c\
+\x76\x52\xe3\x26\x5e\x53\xed\x1f\xd7\x8b\xb3\x0d\xfc\xf5\xf5\x2f\
+\xf4\x0e\xbe\x7c\x4b\x19\x5d\x72\xd5\x0b\x29\x67\x0f\x88\xbc\x15\
+\xb2\x1a\x11\x5e\x48\x9e\x7f\xff\x96\x25\x97\xe7\xbd\x83\xbb\x0d\
+\x3f\x0d\x0f\xbc\x1e\x4f\xb9\xea\xfa\x7c\x58\xbe\x25\x50\xaf\x78\
+\x11\x7f\x8d\xba\x1c\x73\x55\x14\xbc\x3b\xe4\x2c\x97\x7b\x67\xbd\
+\x0d\x07\x3d\xc2\x49\xd4\xee\xd7\xcb\x72\xa7\x83\x13\xe7\x03\x07\
+\x1c\x8e\x9c\x8a\x66\x55\x70\x8d\x9e\xc8\x39\x5f\xac\xc9\x83\xc2\
+\x2d\xec\x4e\x98\xd8\xc4\x4c\x5b\x4c\xfc\x23\x72\xa2\x1b\xcf\xeb\
+\x1c\xb7\x28\xcd\xe0\x43\x9b\xc7\x30\x51\x4c\x94\xc4\x13\x15\x92\
+\x18\xdb\xbe\x7f\x30\x4c\x17\x34\x2c\x14\x1b\xc7\x3c\x18\x98\xf5\
+\x85\x0e\xe4\xb4\xea\x5e\x07\x74\xf4\xb2\xd3\x00\xb6\xd5\xb6\x96\
+\x43\x27\x13\x5d\x44\x31\xe0\x97\xd2\xa3\x1f\x09\x88\x6c\x20\x3c\
+\x6a\x49\x85\x48\x19\x77\xa2\xb5\xb0\x93\x14\x89\x66\xd9\xa2\xd1\
+\x0e\xef\x6d\xeb\x10\xfc\xa4\x1f\x71\x28\x63\xca\xed\x96\x83\xa7\
+\xc1\xbb\xf5\x33\xfa\x69\x4c\xc7\x10\x71\x2e\x2a\xba\x4a\x39\xb6\
+\x6b\x9e\x1e\xcc\x56\xe2\xb4\xb4\xd0\x05\x92\x91\x57\x91\x4a\x9f\
+\x74\xb1\xe3\xcd\x56\xb2\xbe\xc5\x49\x88\x49\x2f\x87\xde\x43\x16\
+\xbb\x90\xab\x2b\xa8\xf6\x1b\xe6\xf7\x5b\xa6\xab\x29\xef\xf9\x88\
+\x2f\x1f\xf0\x70\x5c\x3b\x15\x6f\x16\x53\x9e\xf2\x8e\xbf\xcc\x73\
+\x1e\x87\x21\x3a\x81\x6b\xa4\xc1\x12\xf6\x1b\xf0\x07\x6f\x29\x77\
+\x39\xbe\xbc\x71\x39\x8b\x57\xfe\x8e\xe9\x27\xd8\x2b\xb9\x18\xf0\
+\xf3\xbb\x0d\x09\x70\xb3\x7c\xc3\x25\x4f\x79\x3f\x0e\x79\x01\xc4\
+\xdb\x15\xeb\x87\x0f\x61\x1e\x33\x1e\x6b\x54\x0d\x7b\xdd\xd3\x00\
+\x90\xb9\x6e\xa5\xc7\xf5\x42\x03\xfe\xb0\xf9\x08\x9b\x0a\x6f\x3c\
+\x64\xca\xd0\x2c\xe4\x12\x88\x77\xad\xd7\x8f\x99\x50\xb2\x3d\x62\
+\xe2\x8c\x7a\x68\x46\xdc\x8a\x6f\xde\x2d\xbf\x39\x2b\x27\x5c\x46\
+\x32\xb8\x38\x91\x21\x7a\xca\xbd\x19\x8a\x68\x27\xc5\x57\x06\xc0\
+\x56\xdf\x76\x8c\xab\x60\x59\xb6\x38\x1a\xb4\x6d\x17\x73\xba\x63\
+\xb9\xa7\x81\x2b\x22\xa2\x89\x7e\x97\x4d\xdf\xa3\xea\xc7\x8d\x22\
+\x89\x65\xdd\xd8\x2d\xe2\xaa\x7e\xec\x1a\x46\x6d\x17\xf3\xf1\x28\
+\x69\xd9\x3c\x81\x62\xc3\x33\xa6\x51\xec\xa8\xdf\xbf\x7e\xde\xcc\
+\x9c\x07\xad\x93\x14\xf8\x9e\x1d\xac\xa2\x8f\x1a\x4d\x26\x0e\x95\
+\x47\x89\x71\x30\x84\xce\x22\xe7\xa2\x72\x6c\x0c\xf5\xf4\xcc\x50\
+\x79\xa4\xd2\xd7\x67\x7f\x52\x7b\xf2\xeb\x65\xeb\x90\xbe\x10\x6b\
+\xed\x4a\x8c\xe6\x3c\x1c\x3f\xe4\xf9\xe8\x4b\xae\xae\x1e\x70\x3f\
+\xdd\x73\x58\x4d\x9d\xdc\xb0\x8c\x3d\xe9\xe5\x6c\xb3\x21\xe3\xa5\
+\x24\xbd\xdb\xf0\x2e\xcf\xf1\xb2\x77\x4e\x12\x74\x8b\x77\x7c\xef\
+\xef\x50\xd7\xef\xf8\xee\xf6\xc0\x72\x73\xc9\xcb\xd7\x6f\xa8\x6e\
+\xfc\x13\x29\x61\x59\xd8\xca\x95\xf4\x6e\xc3\x36\x1b\x72\xbd\x2f\
+\xc9\xff\xf6\x03\xdf\xbe\x3e\xb0\x54\x5b\x86\x1b\x7d\x62\x9d\xe1\
+\x24\x76\x00\xb6\x13\x36\xc9\x72\xd6\x8b\x8c\xf5\x6e\xc9\x7a\xb7\
+\x67\xbd\xdb\xb3\xc0\x67\xd8\xeb\x52\xf4\x04\x9d\xc1\x03\x3a\x8f\
+\x1e\x32\x9d\x0c\x0d\x6b\x1b\x2b\x2e\xcb\x5b\x91\xd0\x6d\xac\x65\
+\x8b\x8e\x61\x6a\x26\x3e\x2e\xd1\x5b\x39\x71\xd8\xdd\xe0\x4d\xf3\
+\x96\x7c\xb8\xde\xb5\xd7\x15\x5a\x13\x5b\x77\xca\x9e\x8b\xa5\x30\
+\x80\x16\x5a\x13\x7b\xe6\x84\x2c\xf6\x47\xde\x34\xaa\x6a\x59\xe0\
+\x9b\xfb\xda\x05\x85\x8e\xed\xac\x88\x74\xf0\xbc\xe5\xf3\x46\xda\
+\x23\x26\xaa\xbd\xe7\x28\xaa\xb4\x53\x71\xb6\x25\xa9\x2e\x26\xe3\
+\x3a\x38\x4c\x00\x47\x79\xad\xb3\x82\xfe\xd8\xa5\xd7\x8f\x38\xa4\
+\x81\x3e\x59\x49\x30\x45\x71\x40\x50\x19\xd0\x6a\xbf\x59\xdb\x75\
+\x95\x63\x61\xbb\x80\x13\xce\x58\x0e\x40\xe4\x46\x0f\x9f\x9f\x9e\
+\x99\x2e\x76\xac\xd3\x2d\x2f\x5f\xbf\xe1\xed\x3b\xa9\x0d\x9e\xd1\
+\x9c\xd9\x4a\x91\xaa\x0d\x4f\x2e\x1e\x33\x7b\xf0\x94\xd1\x2c\x24\
+\x7f\x1b\xd1\x79\x27\x39\x74\xdf\xd7\x3b\x9e\x7c\xcf\x62\x24\x60\
+\x35\x6d\x2d\x04\xc7\x4b\xc9\x96\x21\x64\x1a\x88\xd7\xfb\x12\x6e\
+\x7c\xbe\xbd\x5b\x91\x5c\x0c\xf8\xe1\xcd\xcf\x1d\x40\xcf\x31\x70\
+\x13\xcc\xcd\xeb\x3f\xc4\x92\x70\xf9\x96\xcd\x5d\x87\x95\xe8\x13\
+\xf7\x2e\x59\x54\xfa\x2c\x2a\xc1\x22\x33\x1d\x29\x99\xcb\x3b\xc7\
+\x41\x8f\x4d\xa8\xc9\x68\xc6\x84\x32\x5e\x31\x01\x7c\xae\xf4\x18\
+\xab\xc3\x52\x0f\x67\xc9\x72\x73\xb6\xd3\x94\xb7\x59\xc2\x73\x3c\
+\x37\x11\x6e\xb8\xf4\x60\x3c\x82\x65\x49\xe7\x51\x55\x47\x52\xdd\
+\x11\xae\x66\xe3\xe1\xa2\x03\x9d\xa7\x80\x96\x13\x57\xbd\xb6\xf9\
+\x19\x6f\x1e\x34\x18\xbc\x31\xb0\x51\x94\x28\x15\xe8\xb2\xb3\x88\
+\x22\xbc\x6d\xd9\x0a\xe8\x34\xcb\xc3\x75\xa5\xad\x6a\xb4\x14\xe9\
+\xdb\xce\x0f\x36\x80\x2b\x90\x6c\x81\x81\x99\xf8\x33\x28\x2a\xb2\
+\xc0\x73\x85\x0f\x3b\x7f\x4d\x7a\x99\xfe\x0c\x13\x78\x2f\x0c\x80\
+\xb7\x48\xfa\xca\x7c\x8a\x01\xef\xa7\x7b\xdd\xda\xee\x84\x12\x11\
+\xba\xe6\x56\x72\x6f\xd4\xdb\x71\x35\x4f\x9f\x0e\x2c\x72\xcc\x5a\
+\x11\xb3\xb3\xc3\x01\x8d\x26\xd6\x3a\x58\x5b\x6c\x42\x44\x4e\x07\
+\x5b\xe0\xef\xd5\x9e\x0f\xef\xaf\xf9\xe3\xbf\x0a\x98\xde\xbf\x61\
+\x5e\xcd\x99\xfa\x8a\x1f\x4a\xc1\xd4\x7f\x03\x7f\x03\xcf\x3f\x7f\
+\xca\x17\xc5\xd7\xdc\x5c\x96\x78\x79\x07\x5e\xb5\xff\xe4\x89\x1a\
+\xb2\x30\xec\xdd\x04\xb3\xf5\x94\xdf\xe5\x39\x95\xfa\xc0\x44\x0d\
+\x5b\xc0\xb4\xdb\xc5\x2e\x74\xaf\x59\x88\x35\xdc\x81\xbf\xbb\xe5\
+\xde\xec\x1c\x33\xde\x53\xf6\xf4\x2c\xb5\x67\xfb\x88\x6c\x59\xb0\
+\x7b\xbb\x64\x79\xb1\xa5\xea\xcc\x49\x3f\xe8\xf7\x19\x8f\xc7\xe6\
+\x7b\x89\xdd\xf9\xa8\x75\x37\x5d\x69\xec\xb8\x7b\xb0\x45\x8c\xf8\
+\x9e\x74\x65\xf3\x17\xd6\x17\xd6\x79\x8b\x60\xa7\xa0\x17\x39\x97\
+\x63\x3d\xae\x18\x2e\x4b\xaa\xe1\x86\x43\x36\xa2\x13\x17\x0e\xc0\
+\x3a\xca\x99\x02\x31\x5d\x21\xf4\x74\xa2\xe6\x02\x75\x97\xb7\x80\
+\x9c\x0d\x3e\x12\x96\xbf\xd6\x98\x2e\xea\xb9\x4e\x99\xd5\xfa\x4e\
+\x0f\xd9\xde\x42\x9d\x0b\x3e\xec\x5a\xb3\x82\x2d\x1b\x47\xad\x13\
+\x82\x73\x02\x78\x54\xed\xd5\xf6\x8f\x78\xb6\x5f\xc6\xee\xf5\x11\
+\xb8\xe1\x80\x7d\xd3\x7a\x14\x89\x8a\x3e\x7a\x28\x76\xdf\x76\xd4\
+\x99\xb3\x7c\x5a\xcb\x2c\xfa\x31\x36\x6e\x9e\x3d\xf4\x4c\x1f\xb5\
+\x70\x27\xe5\x3e\x75\x42\x9a\xd5\x3a\x65\xd8\xa1\xc9\xd0\x4d\x00\
+\x2b\xe5\xb1\x59\x6a\x16\x5e\xdf\xc2\xb3\xe1\x96\xde\x65\x40\x35\
+\xeb\x43\xf5\x88\x72\x5b\x70\xb7\xee\x30\x5f\x49\xfe\x8f\x3f\xff\
+\x53\x7e\xef\x5f\xfc\x3e\xdf\xfe\x6f\x7f\x42\xa5\x4e\x75\xde\xed\
+\xf2\x96\x19\xef\x5b\x00\x5e\xec\x42\x57\x14\x99\x7e\x78\x0d\xab\
+\x5a\xf9\xfa\xbb\x5b\x16\x62\xcd\xed\xf2\x16\x7f\x77\x5b\xdf\xb7\
+\x0b\x99\xad\x14\xb7\xcb\x5b\x6e\x24\xb0\x9a\x72\x90\xef\xdd\xe3\
+\x00\x3f\xcf\x3b\x5c\xef\x4b\xde\xa7\x1f\xd9\xdc\x7d\x44\xca\x1d\
+\x62\xdc\x65\x3c\xee\xba\x93\xa9\x0f\x27\x71\x3b\x58\x7f\x54\x81\
+\xb3\xb7\xab\x24\x35\xce\x86\xe4\xcd\xbb\x35\x2b\x33\xde\x3e\x0e\
+\x0a\x37\x99\x33\x37\x33\xde\x18\xfb\x78\x8d\x3c\xf1\x69\x97\x78\
+\x8d\xb3\x66\x69\xfd\x3c\x51\x95\x4e\x4e\x08\x2a\xe7\x13\x87\x61\
+\x04\xc3\x0a\xdf\xe6\x26\xb4\x7e\xd5\xa3\xa8\x2c\x38\x5d\xde\xb7\
+\xd1\x91\x71\x0c\xe0\xbe\x95\x00\x46\xd3\x7a\xdb\x86\x5d\xd5\x8f\
+\x29\x92\xf4\x44\x40\x44\x46\xe3\x44\x06\x84\x5b\x03\x58\xe9\xca\
+\xd3\xf5\x4e\x11\x35\x18\x59\x8a\x7a\x28\x9f\x2e\x8c\xf4\x5c\xce\
+\x58\x77\x36\x47\x35\x3b\x37\xec\x35\x7d\x52\x6e\x79\xb6\xdf\xaf\
+\x9e\x12\xd4\x5c\xc8\xb5\xf5\x70\x6e\xce\x46\xaa\xa4\xe2\xc3\xc7\
+\x90\xbf\xdc\xd4\x3e\xed\xa3\x6e\xc4\x7c\xf6\xcb\x78\xcf\x47\x5c\
+\x0c\x1e\xc0\x60\x82\x2f\xfe\x3e\x9b\xad\xe0\xc3\x12\xb6\xff\x77\
+\xca\xfb\x7d\xdb\xdb\xee\x44\x8f\xda\x00\x6d\x58\x74\x8b\x5d\xa8\
+\x01\x69\x80\x7d\xbb\xbc\xe5\x9e\x47\x1c\x6e\x14\x9d\x4b\xc1\x8d\
+\xd4\x92\xa4\xb9\x75\x55\xae\xf9\x37\xda\xf9\x90\x70\x3f\x12\x0e\
+\xc8\x5e\xf6\x8e\xf7\x66\xfe\xc7\xa3\xd0\x23\x16\x25\xc3\xde\xb8\
+\x35\xe8\xdb\xe9\xda\xc6\x22\x2d\xcd\xf4\x54\xcd\xd5\x5a\xb2\xde\
+\xed\xa9\xde\x0e\x59\xef\xf6\xb0\xd9\x13\xc6\xc2\x9d\xfd\x29\x2b\
+\x02\x86\x04\x24\xb1\x9e\x32\xf4\xe9\x4b\xbd\xb8\x6b\x4e\xa8\x1f\
+\x3e\x3c\xcf\xc2\x1f\x96\x6f\x19\x04\x17\xe4\xfb\xf3\xdd\xe4\x93\
+\xe9\x4c\x4f\x00\xa2\x15\x93\xdc\x9c\xd8\x5b\xda\xf6\x92\xad\x06\
+\xd1\xe3\x92\x71\xe1\x16\x5c\x7a\x12\x4f\x16\xf8\x66\x52\xbc\x96\
+\x17\x52\xaa\x76\x89\xc2\x02\xce\x16\x0f\x84\xce\x58\x34\x83\xe8\
+\xf2\x18\xf6\x8d\x94\x5c\x6d\xb3\xed\x1c\x08\x95\x63\x62\xd9\x38\
+\x97\x88\x57\x6f\x8f\x00\x9c\x37\x66\xac\x7d\xea\x62\x99\x3a\x37\
+\x9f\xbb\xbe\x97\x70\x78\xc3\x78\xa9\x6d\x35\x0b\xc6\xab\xce\xdf\
+\xf2\xa8\x1b\x39\x66\xfe\xc9\x8b\x9c\xe7\x83\xc7\x9a\xa5\xcf\x79\
+\xa0\x0d\xf0\xdd\x48\x98\xf1\x9e\x83\x7c\x4f\x27\x7a\xe4\x98\xf4\
+\x20\xf5\x7d\x97\x11\xf5\x7d\x37\xaa\xf1\x3b\xe8\x1c\xee\xee\xa6\
+\x70\x5b\x3f\x7a\x50\x7f\x86\x79\xae\x05\xf2\x68\xb5\xe3\x4d\xea\
+\xb1\x54\x5b\x53\x23\x50\xba\x7d\xc9\x53\x0c\x2b\x41\xd6\xf1\xf4\
+\x18\xd8\x5c\x32\x5f\xac\xdd\xe2\x2e\x0e\x0a\xe7\x64\x6c\x63\xc9\
+\xb0\xd7\x25\x9c\x8c\x18\x4e\x62\x9e\xf4\xea\xef\x74\x4d\x41\x90\
+\x05\x84\xc3\x01\x43\x82\xda\x1f\x3e\x26\x8d\x46\xa1\x62\xd3\xd1\
+\xad\xfd\xeb\xdb\x1a\xc0\xea\xf5\x77\xad\xc5\x9d\x5b\xd8\x99\x69\
+\xf6\xd6\x27\x46\x94\xae\x62\xd7\x3a\x19\x42\xdc\xe9\x59\x5b\xa0\
+\x96\x0a\x26\x0b\x61\x2f\x76\x8c\x6b\x33\x3f\x1c\xb4\xc6\x4e\xe9\
+\x05\x62\x91\x94\xce\xff\x2d\xa2\xaa\xb5\x23\x1c\x27\x3e\xb7\x4a\
+\xd1\x17\xa2\xa5\x7f\x23\x23\x31\x4e\xcb\xcd\xb4\x2a\x7c\xee\xac\
+\x49\xcd\x8e\x0e\x57\xe9\x10\x66\xc4\x54\xd5\xaa\xda\xb5\x98\x56\
+\x14\xc0\x96\x24\xeb\xb6\xc1\x7d\xec\x94\xd8\xe2\xcd\xad\x66\xc8\
+\xc5\x4e\x2f\xe8\x2e\x23\xe8\x5c\x8a\x16\x33\x03\xdc\x4f\xf7\x0e\
+\xd8\xf6\xbe\x73\x60\xb6\x40\x6e\xde\x6e\x5e\x9a\x4c\x6b\x19\xbd\
+\x94\x1f\xb9\x09\xfa\xad\xfb\x7b\x97\xc1\x09\xe3\xdf\x48\x28\x7b\
+\x0f\xd9\x66\x43\xfe\x62\x71\x8d\xc8\x7f\x41\x55\x4d\x11\x87\xc8\
+\xb5\x28\x59\x40\xeb\xef\xcc\x1c\x8d\x62\x41\x1c\x14\x3a\xaa\x19\
+\x46\xae\x48\x72\x35\xe9\xd6\x7e\x72\x83\xb1\xe3\xa0\xd0\xc5\x8e\
+\xd8\x33\x1e\xb3\xe0\x90\x05\x7a\x56\xdb\x27\xba\x43\x40\x37\xa5\
+\xde\x2d\x17\x6e\x41\x77\xbd\xcb\x59\x5c\x3e\x6f\xb1\xb1\xb3\xd8\
+\xcc\x6f\x6a\x7d\x62\xd7\xd9\xe1\x98\xb8\x59\xac\x50\x52\x83\xb0\
+\xb1\xb8\xeb\x9b\xd6\x9b\xe2\xf8\x7c\x1e\xa2\x72\x9a\xb8\x99\x47\
+\xab\xfa\x5e\xad\x8f\x1b\x92\x44\x36\xb4\xae\x34\xe0\x75\x5a\xf8\
+\xa8\x25\xc8\xb9\x18\x6a\x61\x2a\x72\xf2\x13\xba\xf8\x4c\x19\xda\
+\x4a\x04\x25\x99\x05\x5d\xed\x3e\x28\x69\x16\x7f\x38\x76\xdd\x39\
+\x9d\xd6\x27\x8d\xf7\x27\x72\xa2\x09\xea\x7b\x29\xf9\xf0\xfe\xda\
+\x49\x89\x83\x7c\xcf\xeb\x1f\x16\xbc\x9f\x7f\x6c\x31\x64\x13\xcc\
+\x16\x54\x96\x2d\x8f\x41\x66\x6f\x37\xc1\xb9\xbb\x29\x78\xbf\x97\
+\x6e\x5b\xca\x8f\x6e\x3b\x9b\x77\xdd\x73\xed\xf5\xe6\x4e\x62\x3f\
+\xd3\xb2\xb4\x95\x28\x76\x81\xb7\xbd\xa9\x48\x8b\x1d\xf3\x62\xa7\
+\x4f\x24\x49\xe6\x66\x28\x5b\x67\x22\xeb\x78\x9a\x6d\x2d\x78\xe3\
+\xd0\x69\xe3\x34\xd3\xe0\xb5\xb7\x8b\x58\x83\xb7\x79\x5e\x11\x9d\
+\x5b\x6e\x58\x94\xe5\x4a\x77\xff\x64\x01\x90\x11\x64\xca\x1c\x21\
+\x33\x3a\xbd\xcb\xb3\x0b\xba\x0f\x4b\xdd\xb0\xf4\xd9\xf8\x09\x9b\
+\xe2\xae\xdd\x63\xd7\xc8\x61\x58\xb9\xe8\xdb\x1f\xdc\x95\x7a\x85\
+\x96\x04\xc1\xd1\x02\x6f\x6b\x40\xe9\xce\x9a\x74\xd4\x56\xa4\xdf\
+\xa7\x1d\x75\xdf\x1a\x95\xdb\x5c\x00\xda\xfb\x11\x95\x5b\xdc\x6d\
+\x1b\x8b\xb4\x02\xc9\x20\xfc\x8e\x87\xe1\x77\x5c\xc9\x3f\xe0\xaa\
+\xfa\x23\xbd\x95\x7f\xc0\x17\xf2\x0f\xce\x80\xb6\xbd\x60\xd3\x80\
+\xf5\x98\x65\x26\x8c\x53\xec\x48\xb2\xae\xfe\xe2\xcc\xde\x9c\x8b\
+\x8a\xb0\xb5\x43\xd4\x4c\x7c\x96\x8d\x8f\x80\x6d\x19\xd3\xbb\xdf\
+\x72\x58\x4d\xb9\xbe\xfe\x78\x02\x9e\x26\x2b\xf7\x2e\x83\xd6\x6d\
+\x0b\x44\x0b\xba\x47\xdd\x88\xdd\x4d\xc1\x61\x35\x75\x0c\x0e\x70\
+\x59\x6c\xf1\xa3\x07\xcc\xe6\x5d\x6e\x82\x3e\x9d\xd1\xdc\x5d\xff\
+\x14\xc3\x3f\xea\x46\x2d\x59\x71\x69\x9e\xf2\x43\x57\x7f\xe6\xc7\
+\x77\x5b\xd4\x72\x6e\x16\xad\x71\x6b\x01\x1c\x86\x91\x9b\x2c\xe4\
+\x16\x79\x59\xee\x0a\x1f\x55\x92\xb6\x16\x7b\x36\xe1\x36\x24\x30\
+\x27\x82\x84\xf5\xe6\x70\x32\x4a\x20\xc8\xb4\xbc\x50\x24\x0d\x99\
+\x11\xbb\x93\xd6\x58\x26\x6e\x82\xf7\x7a\x97\x13\xa8\x57\xec\xb3\
+\x69\x5b\x13\x1f\x9f\x17\x05\x08\x2d\x70\x20\x72\xbe\x6e\x3d\x0c\
+\xbb\x06\x68\xdf\x36\x6c\x46\xed\x2f\x4e\xdb\x64\xb5\x08\xd0\x0f\
+\x6b\xef\x37\x10\xc2\xcc\x1f\xae\x08\x54\xd4\x38\xac\xdb\x05\x9d\
+\xb6\xd9\xfa\x4a\x4b\x87\xad\x52\x7c\x5d\xfd\x11\xdf\x7f\xf7\x03\
+\xbf\xc6\x3f\x6f\x7d\xce\xe8\x57\x61\xf5\x6f\xe1\xea\x19\xcc\x57\
+\x5f\xb1\x0f\x3f\xd3\x96\x9a\xeb\xb9\x33\x21\x24\xa1\x13\x77\xf3\
+\xed\x1c\xdf\x4c\x90\xdf\x99\xf3\x8e\x1e\x33\x71\xcb\xff\x8d\xf7\
+\x66\xf4\x95\x70\xe5\x66\xcb\xca\x12\x49\x59\x64\xac\x6f\xe1\x71\
+\x18\xf2\xd6\x68\xd7\x6a\xd6\x67\x7e\x3f\x67\xea\x4d\x99\xdf\xcf\
+\x39\x78\x53\x3a\x68\x20\xdf\x04\xfd\x13\x90\x59\x0d\xfd\x88\xf7\
+\x0e\xcc\xb3\x79\x97\xf7\x53\xc9\xe5\x68\xcb\x4d\xd0\x77\xb7\x67\
+\x68\xb0\x5e\xca\x8f\xdc\x4f\xfb\x06\xf0\x30\x6b\xec\x0c\xcd\xf7\
+\x3d\x27\x45\xac\xa4\x78\x68\x54\xe2\x7b\x15\xf2\x2b\x71\xce\x78\
+\x3c\xd5\xa3\x18\x7a\x42\xcf\x76\x43\xb9\x59\x16\xf1\xa1\x22\x18\
+\x95\x78\x69\x52\x4b\x06\x03\xe6\x7e\x95\xd4\x21\xa2\x58\xe7\x62\
+\xc8\x20\xcf\xb7\x4c\xb3\xbe\xcb\x2b\xbb\x35\x85\x3f\x72\x92\x42\
+\x19\x3d\x6c\x2d\x36\x45\xd2\x38\x93\x93\x61\x62\x03\xde\x0f\xcb\
+\xb7\x5c\x8d\x9f\xf0\x76\xf7\x84\x17\xf1\xfc\x14\xc0\x26\x47\xe1\
+\x02\x41\x91\xd0\x91\xca\xed\x51\x91\xa3\xa5\x1f\x0d\xe0\xa4\x39\
+\x31\xe3\xb1\x47\xdb\x5c\x74\xe9\xbe\xbc\xa8\x15\xce\x29\x8c\x2e\
+\x2d\x94\x02\xe5\x11\x08\xd1\xf0\x89\x8d\x3b\x61\x98\x7e\xfe\xb1\
+\x38\x01\x30\x68\x00\x03\x24\x3f\xfc\x2e\xcb\xd5\xff\x4e\x37\xfb\
+\x43\xae\xaa\x3f\xa2\x77\xfb\xaf\xb8\x92\x7f\xa0\x65\x07\x92\x37\
+\xd7\xd7\x2c\xae\xaf\x5d\xa2\xae\xea\x7b\x2e\x5c\x6f\x83\xf1\x16\
+\xc0\xa1\x68\x9f\x69\x5e\x34\x0a\x21\xb9\xf2\x50\x4a\x91\x1b\xf6\
+\xbe\x5b\xea\x0a\xdd\xbb\x3c\x77\x8b\xba\x47\xdd\x88\xab\xab\x07\
+\x6e\x41\xd7\xbb\x0c\x9c\x56\xfd\x14\xd0\xec\x02\xce\x3e\xc7\x32\
+\xef\x61\xd5\x2e\x26\x77\x46\x73\x2e\x8b\x1a\xd8\x56\x4e\x58\x56\
+\xb7\x2c\xdb\x89\x1e\x69\xbb\xee\x13\x97\xcb\xa8\x5e\xdc\x7d\x36\
+\x7e\x42\x34\x11\xf8\xa2\x64\x1a\xf4\x18\xe4\xa9\x1b\x4e\x68\xe7\
+\x23\x03\x1a\xc0\x86\x79\x01\x2a\x4f\x03\x71\xeb\xa5\xee\xfe\xe6\
+\x49\xd6\xed\xc2\xae\x5e\x8d\xed\x9d\x94\x68\x6e\x15\x89\x91\x13\
+\x89\x73\x27\xe6\xe6\x24\xe7\x96\x89\x7d\x79\xe3\x98\x78\x72\xf3\
+\xba\xd6\xc4\x67\x2a\xb6\xd8\x28\xa6\x34\x4c\x1c\x34\x67\x12\x5b\
+\xa0\xba\xd3\xde\x4a\xe3\xe1\xd2\x6e\xf8\xb4\xaf\x55\xb5\x7b\x10\
+\x99\x96\x7f\xf7\x9e\x06\xb4\xf5\xb6\x7d\x98\x8e\x44\xc5\x42\xbe\
+\xe7\x4a\xea\x39\x0c\xf3\xee\xbf\xc7\xe8\xcb\x1a\xb4\x2d\xcd\xfe\
+\x52\x11\xbf\x10\x7c\xf9\xf2\x7f\x21\x7e\x21\xe0\x07\x13\x50\xf9\
+\x01\xbe\xe2\x77\x79\x13\xfd\xb7\x26\xe0\x08\x1f\xd7\x01\xdd\x87\
+\xbf\xc9\x58\x3c\xaa\xa7\x55\x9e\xe9\xf0\x68\xc6\x32\xed\x8e\x9b\
+\x2b\xcf\x65\x34\x6e\x17\x92\xb7\x77\x8a\x97\x6f\xdb\x83\xfb\x26\
+\xbd\xdc\x55\xde\x00\x9e\x9b\xaf\xef\x37\xa2\xf7\xdc\xf3\xa5\x73\
+\x16\xee\x47\x82\xd9\x4a\x71\x3f\x9a\xf3\xb0\xf7\x90\x85\x58\x73\
+\xb8\x79\xdf\x3a\xfc\xef\x6e\x0a\xee\xa7\x7b\xb7\x20\x9c\xcd\xbb\
+\xdc\x4c\xfb\x78\xf7\x5b\x2e\xc7\x5b\x6e\xa6\x7d\xa0\xcf\xcc\xb0\
+\xf7\x65\xa1\xff\x96\xf7\x12\x6e\x02\x3d\x69\xbd\x33\x14\x1c\x56\
+\x53\x7a\x97\x81\x4b\xd0\xe9\xfc\x59\x0d\xf2\x40\xbd\xc2\xdb\x3e\
+\x61\xb7\x93\x94\xbd\xb8\x35\x03\x19\x30\xed\x4c\x0d\x26\xad\x46\
+\x3a\xee\x64\x40\xdd\xdc\xda\xa2\x87\x1d\x45\x8b\xe9\x14\xc9\x73\
+\x09\x9b\x3d\x6b\x0a\x06\xe8\xb1\xb3\x76\x7e\xb2\x3d\x4f\x88\x6d\
+\x2a\x3d\x89\x70\x46\x97\x4e\x13\x5f\x8d\x9f\xf0\x61\xd4\xab\xa3\
+\x98\x67\x4a\xd7\xee\x77\x44\x08\x02\x75\x6c\x7f\x09\xe7\x32\x64\
+\x52\x21\xa9\x4f\xba\x58\x34\x7c\xe4\xbe\x10\xe6\x40\x6d\x2b\x6b\
+\x5a\x46\x38\x96\xc5\x04\x77\x94\x4e\x95\x79\x32\x23\x2a\x04\x15\
+\x86\x7d\x8d\x84\x78\xd6\x81\xe4\xbb\xdf\xd5\x9f\xf1\xec\x9f\x38\
+\x00\x5b\x09\x61\xc1\x6b\x81\x7c\x0c\x6a\xbb\x7d\x2a\xff\x7b\xf7\
+\xf8\xf2\xc5\x7f\xc5\x68\xf7\x15\x8a\x47\xda\xa5\x68\xe9\x66\xdd\
+\x8a\xe4\xe6\xa6\x19\x0f\xd9\xc9\x0d\xa5\xe8\x89\x29\xd1\xa3\x29\
+\xdd\xf9\x8a\x57\x7f\xfd\x3d\xa3\xfb\x25\xf7\xa6\x3c\xdc\xac\xbc\
+\xd1\xcb\x5d\xe5\xed\x20\xdf\xa3\x55\xde\x7b\xae\xaf\x3f\xf2\x6e\
+\x5b\xe0\xf7\x03\x0e\x57\x0f\xb8\x44\x11\x4f\x60\xd9\xfd\x8c\xce\
+\xe5\x07\x58\x4d\x79\xbd\xfa\xce\xb1\xb1\x5d\xac\x35\x81\xdc\x19\
+\xe3\x98\xb8\x33\x9a\x73\x33\xed\xb7\x00\x0e\x50\x6d\x57\xcc\xfb\
+\x02\x96\x50\xcd\xf6\xcc\x6e\xba\xf4\x2e\x1f\x38\x16\xbe\x91\xef\
+\xb9\xbf\x14\x4e\xfd\xce\xc6\x25\x1d\xff\x0e\x8f\x08\x3d\xc5\x2a\
+\x26\x0c\x23\x27\x25\xf4\x64\x7a\x13\x5e\x7f\xd7\x67\xc9\x9a\xe1\
+\xa0\x43\x18\x46\x0c\xca\x2d\x8b\x55\xc1\x6a\xb9\xe1\xbb\xa5\xc7\
+\x78\x5c\xb1\xac\x0a\xc6\x5e\xe0\xba\xf3\x96\x4b\x8f\x07\x55\xc5\
+\x43\x42\x16\x14\x84\xf3\x94\xce\x68\xe8\xf4\x73\x1d\x28\xcb\x5a\
+\x79\xe4\xeb\xa3\xa0\xd3\xb1\x3b\x51\xf7\x4c\xc6\x6d\x30\xaf\x3d\
+\xfc\x63\x8a\xce\xf0\x35\x90\x27\x3a\x3e\xe9\xca\xcd\x51\xbd\xea\
+\xb7\x20\x95\x8d\xa0\x4e\xd4\x00\x30\xc6\x3b\x8e\x1a\xa7\x24\x00\
+\x5c\x20\x9e\x46\xd8\xa7\x0f\x6c\xf2\x47\xfc\xe9\xb3\x7f\xca\xe8\
+\x57\xe1\xd1\xf0\x77\x4f\x24\x44\x13\xa8\xe7\xc0\xdc\xbc\x6d\x1f\
+\xff\x35\xfe\x39\xd3\xd1\xb7\x34\xcf\x34\xda\x3e\x12\x79\x47\xb7\
+\xdb\xef\xf7\xd3\xab\x47\xfc\xd2\xc3\x2f\xf8\x8d\x5f\xfa\x75\x7e\
+\xe7\x77\xfe\x4b\x56\xb3\x90\x77\x79\x4e\x3f\x5e\xb7\x42\x3f\x00\
+\x4f\x7d\x78\xf2\x38\xe2\xdf\xff\xb5\xdf\xe6\xeb\xdf\xfe\x4f\x98\
+\x7e\xfe\x9f\xf2\x1f\xfd\xce\xef\xf0\xdb\xff\xdd\x7f\xc3\xb3\x2f\
+\x7e\xc6\xdf\xbe\x0c\xf9\xc3\x9f\x87\x7c\xff\x5e\x31\x5e\x4a\x3c\
+\xf1\x59\x4b\x72\x58\x66\xb5\x60\x76\x7a\x36\xe8\x73\x59\x6c\x5d\
+\x88\xc8\x5e\x9f\xcd\xbb\x54\xb3\x3e\x53\x6f\x8a\xdf\xd7\x00\x9a\
+\x7a\xd3\x13\x0f\xf9\x9e\x47\x3c\x1c\x3f\x74\xe5\x6b\xfd\x47\x57\
+\xf4\x47\x5f\xe9\xe7\xa9\xbe\x9e\xef\xb6\x5b\x12\xcf\x77\xac\x37\
+\x07\x0e\x1f\xef\x79\xfd\xc3\x2d\xab\x37\xf7\xbc\x5c\x7c\xcf\x76\
+\x7f\x07\x1b\xed\x1f\x6f\xfc\x3e\x6b\x3c\x96\x4b\x8f\xd2\x68\x7f\
+\x7b\x26\xd0\x65\x55\xb0\x5c\x7a\x1c\xe6\x4b\x3e\x7a\xfa\xbb\x9d\
+\x8c\xf4\xdf\x76\x58\x79\x14\x71\x61\x1c\x8a\x76\xcf\x9e\x23\x84\
+\x9b\xd7\x94\xd1\x25\x65\x74\xc9\xe4\xe6\xb5\xf3\x8a\xad\x4f\x2c\
+\x5a\xf6\x5c\xe6\x16\x8c\x7a\x8c\x55\x53\xdb\x02\x3d\x95\x91\x89\
+\x18\x5f\x35\xa6\xfb\x98\x98\x64\x60\x9e\x13\x08\x71\x54\xf6\xad\
+\x90\xaa\x06\x70\x20\x84\x9b\xa1\x66\x27\xf8\xc4\x45\xd5\x2a\x61\
+\x7b\xdb\x0a\xb6\xd2\x55\xf6\x22\x35\xe1\x3d\xff\x84\x47\xc3\xdf\
+\x75\x0c\x7c\x8e\x71\xdd\xc2\xf9\x08\xcc\xf6\xf6\xf1\xf5\x41\xfe\
+\x3d\x9b\xfc\x57\x8d\x8f\x6c\x22\x97\x94\x27\x76\x9d\x95\x1b\x5b\
+\xb5\x60\xb0\x6d\x3f\xf6\x60\x1c\xf0\x54\x5c\xf1\xea\xc3\xcf\xd9\
+\xf6\x86\x75\xeb\x51\xfc\x18\xfa\x70\xd9\x1d\x21\xfe\x2e\x7c\xfd\
+\xac\x47\x67\xf6\x80\xc7\x0f\xea\x91\xa4\x6f\xff\xf3\xff\x9a\x5f\
+\x7c\xf3\xcf\xf8\x97\xbf\xf7\x27\xfc\x3f\x3f\xbf\xe5\x5d\xfe\x97\
+\x3c\xfe\xfa\x92\x87\xe3\x87\x2c\x46\x82\xc3\x8d\x72\x8b\x40\x2b\
+\x2b\x66\x8b\x3b\xee\xa7\x17\x8e\x75\x67\xf3\x2e\xf7\xd3\x3d\x97\
+\x05\xee\xba\x77\xbf\xe5\x7e\xa6\x65\x86\xd6\xce\x7b\xed\x66\x5c\
+\x3e\x00\x1e\x98\x00\xcf\x7b\x6e\x96\xf0\x70\xfc\x90\xcf\x86\x07\
+\xde\xab\x90\x17\xc5\x1d\xd5\xeb\x19\xde\xf2\x9e\xc5\x66\x06\xa3\
+\x1c\x56\x21\x25\x1f\xb9\x9e\xc3\xd5\x14\xa6\xe3\x0b\x18\x78\x3c\
+\x0f\xc6\x30\xe8\xba\x12\x6f\x9e\x4b\xa6\x93\x21\x17\x93\x17\x6e\
+\x42\xd0\x33\xcb\xf0\xe6\xc4\x8f\xeb\xdd\x03\xe2\x4c\xa2\x26\x5a\
+\x72\x0c\x67\x03\x9d\x68\xdb\x6e\x29\xfa\xfd\x86\xab\xd1\xee\x0c\
+\x59\x5c\x3e\x67\x7d\x0b\xcf\xcb\xd7\xce\x2b\x56\x37\xbb\xb6\x26\
+\x76\x85\x12\x9d\xc3\xe8\xc4\x45\x7d\xf6\x24\x0b\x60\xcb\xb0\xb1\
+\xd2\xfe\x6f\xd1\x00\x6c\xa0\xa2\xf3\xb6\x93\xd5\xc2\x8d\x60\x50\
+\x64\x16\x82\x36\x47\xe1\x6d\x2b\xb2\xc3\x0e\x2f\xa8\xf0\xb6\xc6\
+\x37\x6e\xb4\x2a\x79\xdb\x8c\xbc\x1f\xf1\x0b\xfe\x21\xac\x39\x01\
+\xb2\x05\x65\x13\x9c\x4d\xf0\x66\x2f\x55\x4b\x72\xb8\x7d\xfd\x87\
+\xdf\x65\xfb\xe5\x3f\x25\x1c\x97\xe4\x4b\x0f\xc4\xe9\x79\x3b\x74\
+\xdf\x5d\xec\x5c\x8e\x3e\x11\x1f\x56\xaf\xd8\x7a\xb7\x88\x43\x42\
+\xd5\x19\x51\x36\xce\x67\xb1\x10\x6b\x9e\xfa\x75\x4b\xd0\xcd\x34\
+\x87\xb9\x8f\xff\x2a\x60\xf9\x17\xff\x8a\xde\xd5\x13\x66\x2f\x4a\
+\x61\xbb\xb5\x57\x00\x00\x20\x00\x49\x44\x41\x54\xae\xa2\xa7\x8c\
+\x7e\xeb\xa7\x5c\x7c\xf9\x1d\xbf\xfe\xe2\x1f\xf1\xd5\x97\xff\x90\
+\x3f\xf9\x9f\xff\x57\xfe\xa7\x7f\xf6\x47\xbc\xfb\xc5\x5b\xf8\xfa\
+\xd4\x53\xbe\x1c\x6d\x99\xcd\xa7\x0e\xc0\x96\x99\xf5\x22\xcf\x30\
+\xf3\x68\xce\x6c\x3e\xa5\x33\x06\xcc\xc2\xaf\x66\xf5\x48\xeb\x70\
+\xf4\x22\xf2\x9e\x47\x5c\x46\xef\x29\x81\x9b\xfc\x73\x7e\x63\xb5\
+\xe3\xe3\xea\x5b\xf6\xd9\x94\x0f\xd5\x82\x08\xf8\xdc\x9b\xc2\xb8\
+\xc2\x1b\x7f\xc1\x97\x9f\x4f\xd8\xc6\x92\x7e\x16\xb5\x86\x77\x5b\
+\x00\xd7\xdb\xfb\x56\xe3\x28\xe8\x89\x43\xd5\x62\x0d\x4c\x58\xa3\
+\x98\x02\xfb\xed\x96\x43\xe5\xd1\x5d\x0f\x5c\x34\xd3\xfa\xcb\x82\
+\x98\x45\x26\x98\xfa\x35\x61\x0c\x1f\xc2\x4a\xf6\xb4\xac\xe8\x3d\
+\x61\x75\xa4\x89\x2d\x1b\x37\xab\x7e\x49\xbf\xa3\xe7\x4e\xf4\x1b\
+\x3e\x30\x4a\x9a\x74\x9a\x6e\x51\xda\x2a\xe9\xdc\x04\x17\x8a\x57\
+\xb2\x66\xe3\x46\x7a\x8d\x08\xe7\x74\x1c\x07\x81\xe2\x4e\x0f\x0a\
+\x5c\x27\x47\x9f\x08\x5b\xc7\x8b\x44\x45\xa0\x3c\x54\xf5\xdd\x59\
+\x5b\xed\xac\xd5\xf6\x5f\x88\x13\x90\x1f\x3f\x0f\x20\x5d\x7f\xcf\
+\x46\xfd\x8a\x61\x5a\x6b\xb5\x35\xcf\x2b\x12\x21\x54\x66\x66\xbb\
+\xd5\xc2\x63\xf1\xcd\x77\x4c\xff\xf1\x18\x8a\x05\xf3\x72\xc4\xcb\
+\x6f\xff\x98\xff\x97\xb1\x37\x0b\x92\xe5\xbe\xce\xfc\x7e\xb9\x55\
+\x65\x66\x65\xd6\xd6\xdd\xb7\xb7\xdb\xb7\xef\x0a\x10\x0b\x09\x82\
+\x94\x48\x88\x04\x29\x8a\xa3\x65\x28\x5b\x33\xf6\x84\x2d\xc6\x48\
+\xb2\x3c\x96\x46\xa1\xa7\x79\x72\xf8\xc1\x0f\x8e\x90\xdf\xec\x07\
+\xdb\x31\xe1\x07\x4d\x8c\x6c\x86\x56\xca\xb2\x3d\x5a\x47\xa4\x16\
+\x8b\x82\x28\x40\x24\x38\x20\x81\x0b\x5c\x2c\xbc\x6b\xef\xcb\xed\
+\xee\xda\x32\x2b\x33\xab\x72\xf3\xc3\x3f\xf3\x5f\x59\xdd\x17\xd2\
+\x54\x44\x47\xd6\xd2\x6b\xf5\xc9\x93\xdf\xf9\xce\x77\xbe\xe3\x3f\
+\xda\x65\xe3\x23\xab\x60\x8f\xc8\xed\x75\x8e\xba\x09\xf9\x91\xca\
+\x51\xb0\x4b\xf0\x28\x12\x8d\x8f\x91\x98\xce\x78\xf9\xda\x0a\xcf\
+\xbc\xb7\xcf\xb5\xa7\x6f\xd1\xf8\x44\x9d\x1f\x7b\xe1\xa3\x5c\xb9\
+\xfc\x4f\x68\xae\x6f\xf0\x6f\x7e\xf5\x77\x99\x1c\x4d\x2e\x74\xd9\
+\x54\x6b\x09\x86\xa9\xc8\xac\x5d\x47\x64\xe4\xce\xa2\xe4\x8f\x4b\
+\xb6\x62\xa5\xd5\x93\x70\x43\x7e\x5d\xb5\x4b\x17\xde\x46\xb5\x96\
+\x04\xed\x56\xfc\x1b\x94\x60\x1f\xea\xab\x2c\xb5\x6e\xf2\xfc\xad\
+\x9b\x1c\x6a\x53\x1a\x76\x1d\x2f\xd0\x64\x61\x97\xe1\x63\x43\x61\
+\xa2\xf2\x84\x2e\xa3\xad\xa3\x07\xc5\x4e\xbd\x71\x63\xee\xd8\x19\
+\x37\xd8\x56\x73\x94\xe8\xf0\x9c\xcd\x17\x4c\x73\x9f\x86\xe3\xc8\
+\xa6\x47\x6a\xa7\x44\x04\x58\xb6\x22\xd9\x89\xce\xd1\x36\xc3\x56\
+\x9d\x81\xb7\x42\xf3\x92\x28\xee\x5a\xc3\x59\x26\x8e\x0b\xae\xd9\
+\xac\x64\xe3\x88\x40\xe8\x89\xb5\x50\xc1\x2f\xf8\x61\xdf\x0a\x71\
+\xfd\x1c\x4d\x53\x29\x5d\x1b\x34\x14\x52\x22\xe2\x02\xf5\x36\x8b\
+\xc9\x8f\x38\x12\xba\xe2\x18\x4b\x2c\x65\xac\x32\x18\x73\x10\x25\
+\xac\x74\xf1\x66\xca\x63\xbf\x38\x6a\x58\xf4\xcb\xd5\x04\xe1\x3c\
+\x26\xae\x06\x63\x15\x23\x97\xcf\x3d\x29\xc8\xcf\x7f\xae\x7f\xe3\
+\x7a\xa5\x30\xb0\x3e\x24\x13\x2b\x17\x5c\x95\xde\x1b\x9d\x31\x79\
+\xf3\xeb\xd4\x59\xe6\xbb\x5b\x31\x7b\xfb\xe1\x1c\xbd\x05\xc0\xc3\
+\x43\xc2\x7e\x24\x33\x5f\x3c\xec\x62\xb4\x7a\xc4\xa3\x88\xdf\xfa\
+\xee\x5b\xb4\xde\x7a\xc4\x0f\x5c\x49\x78\xf9\xc5\x4f\x30\xfe\xcc\
+\xdb\x98\x9f\xfb\x29\x9e\xfb\xe2\x02\x3f\xb3\xff\x32\xaf\xfd\xe5\
+\x5f\x31\x39\x4a\x59\x5b\xb1\x24\x5f\x9c\xb5\x04\x27\xac\x9c\xc1\
+\x4a\xdb\x27\xce\xd7\x80\xe9\x5c\x26\x5e\xe8\xd5\xa0\x35\xc3\xcb\
+\x47\x9a\x23\xdb\xd0\x2b\xa9\x5f\xfc\x0e\x48\x86\xa2\xca\x13\xbf\
+\xd9\x3f\xa4\xf1\x7d\x0d\x77\x71\x49\x0e\x8f\xaa\x40\x69\x53\x6c\
+\xc6\x16\x91\x51\xe8\x4f\x8a\xd6\x74\xd9\x8d\xd3\x5a\x19\x8c\x93\
+\x0b\x2c\x45\x79\x1c\x4d\xa6\x24\x67\x03\x0c\x16\xe9\x2e\xa8\xb8\
+\xc5\x82\x1b\x9f\x84\x4e\x4b\x63\xea\xfb\xe0\x38\x73\xf0\xad\xdf\
+\x33\xa9\x0d\x4f\x24\x9c\x10\x93\x21\x47\xb4\x8e\x26\x98\x9b\x37\
+\x38\x66\x4f\x66\xe2\xb2\x59\x22\x5c\x87\x02\x4c\x02\x89\x89\xd5\
+\x52\x2f\x6c\x15\x81\x7c\x5e\x7a\x59\xbe\x1e\x9e\x2b\x8e\xc2\x22\
+\x80\x0d\x42\x01\x43\x42\x85\xf3\xdb\x23\x7c\x19\xac\x52\x0d\x21\
+\x77\x52\x68\xa6\x39\x73\xdb\xac\x60\xf2\x57\xef\x7c\xe9\x43\x39\
+\xcf\x6a\x40\x97\xb7\x77\xf8\xd2\x85\xe7\x5b\xcf\xc3\xf8\xca\x2f\
+\x33\xbe\xf2\xcb\xc4\xfa\x73\xe8\xd2\x15\xe8\x09\x05\x5e\xa1\xa8\
+\x22\x0a\xa5\xb7\x45\x58\xec\x50\xf6\x92\x35\x72\xb7\xcb\xc9\x83\
+\x37\xd9\x1e\x3e\xb8\xd0\x91\xdb\xcd\x90\x6a\xb2\xb9\x6c\x0a\xb4\
+\xda\x57\xe9\xb6\x2c\x1e\x0e\x5d\xde\xf9\x46\xca\x5f\xbc\xb6\xcd\
+\x5f\xfe\xc5\xd7\x98\xf6\xde\xa7\xfb\x42\x1b\xe7\xda\x06\xdb\x61\
+\x9d\x2c\x3c\x91\x05\x5b\xc9\x50\x2c\x17\xac\x44\x2f\xef\xcd\x15\
+\x79\x25\x4b\x51\x16\x79\xe5\x73\xc7\x83\x59\xf7\xf0\xac\x3b\xe5\
+\x78\x30\xfb\x3d\x56\x2c\x81\xdf\xfd\x60\x56\xdc\x79\xa7\x27\x74\
+\xe2\xc2\x6d\xa7\x68\x3b\x97\x41\x0b\xe0\xe4\x5d\x19\xbc\x25\x0f\
+\xac\x8c\x05\x7d\x56\xed\xc6\x95\x8f\x47\x93\x01\x83\xc1\x00\x86\
+\x3a\x6b\x9d\x84\x8e\x9a\x12\x0f\x15\xfa\xc3\x74\xae\xf1\x51\xe5\
+\x93\xcb\x42\x7a\xda\x5a\x92\x9a\x94\xce\xd1\x36\x03\x6f\x85\xfe\
+\xca\x26\x87\x93\x84\xd6\x70\x32\x47\xa7\x09\x8e\x79\xe6\xad\x37\
+\x8f\x89\x0b\x3c\x6b\x59\x39\xfd\x92\x22\x2b\xe9\xb4\xbe\xe8\x82\
+\x35\x11\x6b\xa6\x47\xe7\xa4\x38\x71\xa8\x88\xe5\xe6\x73\x19\x78\
+\x9e\x0f\x08\xe2\x09\x16\xb6\x80\x29\xc5\x66\xa4\xb9\x56\x6e\x81\
+\xa1\xaf\x18\xf0\xf5\xec\xaf\x78\x99\x7f\xf8\x36\xbc\x23\x82\xb5\
+\x6c\x8c\x54\xb3\xf2\x9d\x07\xff\x92\xda\xda\x75\x3c\xbd\xc0\x52\
+\x91\x52\x09\xe0\xb0\xe8\x4f\xce\xae\x0a\x22\x13\xe7\x33\x2f\x37\
+\x60\x6b\x3f\x00\x8e\xf1\x81\x81\xb7\x22\x03\xb4\x64\x27\xf6\xfc\
+\x7d\x16\x86\x11\x47\x15\x46\xc0\x68\xc1\xe4\x68\x86\x69\x8d\xa6\
+\x08\xc2\x3b\x1c\xb0\xb6\xbd\xc4\x35\x1e\x72\x7a\x3b\xe1\x7e\x07\
+\x94\x65\x03\xf7\xe1\x61\x51\xbd\x77\x61\x8e\x27\x16\x8f\x97\xdb\
+\x70\x7c\xe6\x73\xb4\xe0\x54\x20\x46\x54\x14\x76\xb0\xa0\x9e\xd2\
+\xcb\x4d\xd1\x31\xcc\x7b\xb2\xe0\x5b\x6e\xcf\x32\xf1\x59\xcb\x24\
+\x0b\x9a\xf2\xf7\xbe\x7f\xa4\x70\xed\x69\xe8\x3f\x36\x20\x0c\x51\
+\x34\x17\x02\x95\x49\x2a\x7e\x57\x45\x73\x19\xd9\x03\x6c\xad\x2e\
+\xdb\xc8\xfe\xd4\xa3\x11\x4c\xc1\x15\xef\xcd\xd8\x50\x69\xf4\xd2\
+\x42\x6f\xe2\xd0\xd0\x62\x1a\x41\xce\xb8\xd5\xc1\x01\xe2\x61\xb1\
+\x88\xb1\xdb\x90\x0c\xc5\x88\x94\x06\x62\x0f\x75\x56\x19\x44\x2b\
+\x33\x71\x89\x87\xdb\x1c\xc9\xe0\x19\xb6\xea\x4f\x16\x4e\x15\x90\
+\xc4\x84\x8b\x2a\x36\xc5\xcf\xe5\x3e\x66\x67\x2c\xf4\x13\xb6\x51\
+\x87\xa8\xb0\xb2\xc2\x91\x6b\x99\x9a\xb2\x13\x25\x96\x38\x96\x54\
+\xdc\x05\xb9\x64\x45\x83\xe1\x14\xd4\x5b\x58\x48\x2f\x4b\x41\x50\
+\x58\x60\xd4\x07\xe1\xd6\x1c\x14\xf8\x8f\x09\xe4\x5f\xcf\x6a\x73\
+\x30\xe3\x7b\xfc\x32\x93\x4b\x3f\x4c\x9c\x5c\x17\x2e\x99\xf2\xac\
+\xb7\x3e\x54\x0b\x21\x56\x25\x08\x58\x64\x12\x72\x96\x8b\x77\xf1\
+\x83\x37\xee\xf1\xdd\x3f\xf8\x4d\x6e\x9f\x7c\x5b\x34\x1e\x2c\xf0\
+\x83\x26\xbb\x19\xa2\x81\xc1\x9a\x0c\x60\xd5\x5a\x92\xfa\x86\x95\
+\xd4\x07\xe5\x60\x4e\x69\x76\x14\x42\xb2\x13\x71\x90\xee\x90\x1f\
+\xa9\xb4\x07\x21\xf9\x82\x73\x11\xef\x16\x59\xb9\x7c\x9c\x2f\x08\
+\x6c\x7c\x3c\x10\x54\x5c\x2f\xab\x00\x9f\x5c\xfc\xfc\x32\x63\x97\
+\xd4\x5b\xb5\xfb\x57\xd2\x6b\x65\x26\xb6\xdb\x1a\x93\xbd\x01\x4a\
+\xda\x03\x2f\xa7\xdf\xef\xd3\xef\xf7\x19\x8c\x12\x06\xbb\xd0\xef\
+\xf7\x89\x0f\x7c\x74\xdd\x22\x48\x35\xfc\x69\x44\x7c\x10\x33\xc8\
+\x53\xf0\x72\xc6\xa9\x41\xa3\x27\xb2\xa9\x53\x5b\xa4\x11\x4c\x69\
+\x69\x0e\xe3\xbc\x43\x43\xe9\xe3\x17\x06\xe4\xee\xb5\x26\x9d\x96\
+\x86\xa2\xb6\xc8\x2a\x30\xc2\x53\x1d\x49\xb5\x59\x76\x34\x97\x89\
+\xa9\x24\x8c\x92\x2b\x2e\x31\xb1\xea\xfb\x92\x67\xae\xca\x3c\xc7\
+\x7e\x8c\x9a\x5a\xb9\xd8\x5e\x64\x99\x72\xa6\x4e\xeb\x47\xf8\xd3\
+\x33\x88\x74\x31\xed\x61\x76\x65\xb6\x8d\x11\x03\x95\x71\xe1\x0a\
+\xa4\x95\xc7\x50\x91\x4a\xb7\x92\x27\x76\xe6\x66\xd4\xc2\xf9\x76\
+\x74\xa1\x66\x4b\x09\xb1\x22\xf1\xb5\xee\xc1\x16\xf6\xce\x0f\xf3\
+\xeb\x59\xed\x3f\x2a\x88\xcb\xcf\x7b\x07\x01\x41\x0e\x46\xbf\x5c\
+\xd1\x1f\x5b\xf2\xb2\x25\x3a\x72\x33\x71\x92\x98\xdf\x8b\x8a\x20\
+\xcf\x99\xf8\xe1\xac\x03\x54\x14\xac\xa3\xc7\x62\x60\xf3\x78\x64\
+\xcc\x4d\x59\x94\x19\x2d\xab\x5f\x92\x9d\xb0\xd2\x67\x62\xae\xd5\
+\x9c\xaf\x49\x01\x4f\x19\xe8\xdb\xb5\x75\x8e\x47\x86\x1c\x08\x2d\
+\x1b\x1d\x65\x93\x63\x2e\xdb\x14\x3f\x53\x64\x74\x73\xae\x90\x2b\
+\x3f\xbf\x97\xf7\x24\x5f\x5c\x3e\x5e\xe8\x9f\x62\x14\x85\xdf\x8a\
+\x35\xe3\xb2\xd5\xc9\x63\x82\xbe\x48\x50\x8f\x3b\x1d\xf2\x62\x51\
+\x62\x5b\xd1\xe8\x74\x3a\x74\x3a\x1d\x36\xaf\x3a\x6c\x76\xda\x74\
+\xda\x9b\x24\x89\xd0\x0e\x5f\xae\xad\x72\xe3\xc5\x75\xba\xd7\xaf\
+\xd1\x69\x6f\x72\xb9\xb6\x8a\xd2\xde\xa4\xd3\xde\x04\x3a\x28\xed\
+\x4d\x86\x03\x0f\xa7\x93\xa2\xb4\x9b\x05\x9b\x92\xa3\xa8\xad\x82\
+\x57\x2e\xf4\xc8\x85\x29\x84\x9b\xf9\x32\x8b\x7a\x86\xc5\xd1\xe9\
+\xd9\x9c\x30\x5e\xc2\xb2\xa2\xf1\x51\xf2\xc4\xb3\x13\xa1\x51\xd4\
+\x37\x36\x71\xa0\x89\x4c\xac\x99\x33\x0b\x14\xb9\xaa\xb6\xd3\x01\
+\xd3\xc2\x3f\x27\x92\xb7\xca\x9d\x64\x45\x86\x4b\xcb\x59\x8c\x42\
+\xbe\xa9\xf8\x02\x57\xeb\xa1\x28\x10\xc3\x7e\x84\xd5\xd7\x84\x25\
+\x40\x38\x2b\xf2\x6c\x3f\x28\xd8\x8b\x50\x66\x6a\x13\x13\x6f\xed\
+\x2a\x1f\x78\xdf\x62\xe7\xdd\xda\x3f\x98\x8d\x7f\x3d\xab\xb1\xf3\
+\xae\xf8\x90\x75\xd6\xce\x0e\xd1\x9a\x5a\x74\xe8\x66\xab\x74\x4b\
+\x56\x62\x5e\x64\x6f\x8a\x93\x71\xac\x51\x77\x8a\xe9\x90\x73\x3f\
+\x63\x6f\x3f\xe4\xe1\x41\x84\xff\x68\x97\xe5\xf6\x0c\x07\x5f\x76\
+\xd6\x65\x70\x9c\xc7\xc2\x17\x5a\xa9\x45\x96\x5e\x75\x14\xa9\x61\
+\x38\xaf\x3a\x2b\x71\xec\x4a\xea\xcb\x63\x99\x8d\x7b\x79\x8f\x23\
+\x4d\x04\x6a\xd9\xa5\xeb\xe5\x3d\x19\xb8\x0b\xbd\x9a\xcc\xc4\xcb\
+\x6d\x64\xa6\x2e\x8b\xba\x4e\xd4\xe4\xf1\xe0\x31\x07\xbd\x13\x8e\
+\x42\x21\x8e\xbf\xd4\xef\x33\xb6\xa7\x28\xed\x26\x69\x65\xcf\xc8\
+\xa8\xe8\xcc\x96\xf4\x5a\xd2\x1f\xb2\xab\xf6\xd8\x79\x38\xc6\x3b\
+\x3e\x62\x57\xed\xb1\x37\x3d\x04\xfa\x0c\xe8\xa3\xdb\x21\xba\x1d\
+\x62\xac\x5d\xa2\xe9\x1a\xb4\xe9\xa0\x77\x44\xf0\x96\x7a\x89\x86\
+\xcd\x9c\x9f\x5b\xe6\x38\x73\xf4\xdc\x95\xc2\xde\x61\xf4\x58\x64\
+\xe1\xb6\x3b\xeb\xda\x55\x31\x71\xc9\x2f\x6b\x41\xb9\x3b\x31\x10\
+\xdf\x53\xe8\x89\x43\xd1\x55\x3b\x27\x69\xb4\x2c\x53\x8c\xe0\x9b\
+\x16\xb9\x15\x48\xbf\x09\x2a\xd9\x56\x0b\x15\x69\xc4\xcd\x28\x16\
+\xc6\x28\x51\x28\x9c\x7e\xe2\x09\x49\xa0\x73\x9c\xf7\xc9\x23\xa1\
+\x8c\x3b\xe9\x47\xe8\x61\x48\xa0\xa9\x28\x7e\x40\xd8\x37\xb0\xd3\
+\x8c\xb0\x9f\x90\x0f\xb6\xd8\xe8\xc7\x8c\x57\x27\xbc\xf3\x76\xfd\
+\x43\xb3\xf1\xf0\x0e\xfc\xeb\xb7\x45\xf0\xde\xc9\xc6\x8c\x57\x67\
+\x7f\xe8\xf5\x2b\x57\xb0\x8d\xcf\xcc\x4f\x83\x48\x43\xc1\xf0\x82\
+\x88\x24\x8a\x14\x8c\x46\x4a\x3c\xd6\x64\xb3\xa3\xc4\xc4\x67\xe1\
+\x2e\x71\x78\x20\x29\xb0\x12\x5f\x6e\xa8\x82\xae\xea\x44\x4d\x09\
+\x27\x00\x96\xb5\x53\xb2\xf0\x44\x04\xab\xb5\x24\xb3\xe1\x6a\xa1\
+\xad\x56\x6a\x8b\x4f\xfc\x7b\x26\x47\xa9\xec\xd8\x1d\x0f\xb8\x70\
+\x5c\x6e\x8b\xa2\xad\x5a\xe4\x55\x03\xb9\xcc\xc6\x00\xf1\x28\x9a\
+\x3b\x56\x27\x3b\x0e\xf7\x52\xb2\xf0\x84\x61\xab\x4e\xb8\x7e\x95\
+\x89\x1f\x72\x3a\x0d\xd8\x3f\x1c\xd0\xef\xf7\x39\x9d\x06\xf4\xfb\
+\x7d\x0e\xa6\xa2\x73\x27\xd2\x66\x8d\x8e\x69\xd1\x5e\x37\x30\xdb\
+\x35\x3a\xed\x3a\xed\x95\x26\x7a\xb7\x56\x38\x06\x09\x65\x59\xa9\
+\x3f\x56\x3b\xe9\x1c\x6c\x68\xa2\x31\x0e\x98\x19\xb1\x14\x01\xdd\
+\xb0\x0b\x53\xc7\x61\xce\x4e\x2c\x10\x6d\xdb\x3d\xa2\xed\x1e\x49\
+\x38\x71\xfe\x56\x85\x13\x65\x46\x2e\x23\x56\xad\x96\x38\x98\xf9\
+\x6c\x73\x7d\xa9\x03\xb6\x72\x49\xaf\x11\x46\x62\xea\x23\x54\xf0\
+\xfb\x7d\xfc\x52\xe9\x66\x5a\xc2\x24\xa5\xea\x3f\x61\x5a\x34\x5b\
+\x1a\xcb\xad\x4b\xe2\x44\x70\x14\x1c\xd3\x22\x29\xa4\x9c\xbe\xd6\
+\x10\xcb\x6b\x34\x15\xf0\x38\x1d\x2f\xb2\xdb\x31\x78\x66\xe9\x65\
+\x94\xe7\x7b\xec\xbc\x5b\xe3\x5f\xbf\xfd\xe4\x8c\x5c\x06\x30\x80\
+\x77\xf7\xe7\xe4\xf3\xb7\x13\x95\x38\x3f\x38\x27\x96\xaf\xee\xfc\
+\x50\x66\x27\x6b\x41\xeb\xc5\xc5\xd6\xa6\xb2\x5a\x2e\xc7\x9d\x86\
+\xc9\x2d\x0c\x6b\x0d\xe5\xcc\x97\x01\x59\x36\x39\x72\x7b\x9d\x41\
+\x5b\x78\xaf\x95\x7a\xdd\x43\x3f\x67\xd5\x51\x38\x4e\x17\xc9\xc2\
+\x13\x9e\x1f\xac\xc9\x00\x5e\xd6\x4e\x9f\xf8\x8f\x31\xac\x35\xce\
+\xba\xd3\x39\xec\x5c\x66\x54\xe5\xcc\x27\x5f\x70\x64\x40\x57\xdb\
+\xca\x5d\xb5\x08\x52\x65\xa6\x6b\xee\xaa\x11\xbd\xcc\x64\xb9\x8d\
+\x84\x1f\xcb\xda\x29\x47\x61\x31\xba\x94\x8f\x58\xeb\x2e\xb1\xdc\
+\xbe\xcc\xc6\x92\x41\x77\xa3\xcd\x62\xcd\x66\x7d\xb5\x8d\xbe\xd0\
+\xa6\x6e\x5a\x74\x3a\x1d\xb1\xac\xd1\x36\x09\xd2\x59\x72\x68\xd6\
+\x6b\x98\xa6\x49\x33\x17\x1f\x25\xaf\x5c\x15\x0f\x25\x49\x38\xe7\
+\x22\x94\x24\x21\xa9\x9d\x4a\xaa\xad\x2a\x92\x97\x57\x29\x7b\x76\
+\x7f\xe0\xad\xcc\x65\xe2\x12\x4e\xc8\x02\xd0\x71\x64\x46\x8f\x8b\
+\x8c\x1c\x81\x98\x76\x9e\xf7\x98\x9c\x05\x74\x5a\x04\xad\x16\x2a\
+\x18\x84\x58\x15\x16\x42\xaa\x87\x8a\x06\x41\x69\xa6\x52\x7e\x84\
+\x08\xa3\xc0\xa0\x30\x48\x29\x9d\x35\x2d\x2b\x97\xd3\x1e\xaa\x95\
+\x0b\x45\x9c\x65\xe2\x03\xef\xef\xef\xc2\xe3\x1b\xd4\xf2\xa7\x04\
+\xce\x7d\xbb\x3e\x87\x7b\xab\x85\xdc\x9d\x6c\x4c\x7e\x47\xfc\x53\
+\xdd\xa7\x7e\x7b\x16\x14\xfa\x55\x3a\xd6\xf5\x4a\xf0\x7e\x88\x77\
+\xdb\xdc\x88\x53\x5d\x42\x9d\x30\x8a\x20\x8a\x48\x4e\x5d\x5a\xfa\
+\x3d\xe2\xf0\x80\xd5\xd5\x19\xa6\xdd\xcd\x40\x29\x6c\x54\x85\x6b\
+\x8f\xe8\x8e\x3d\x7b\x68\x08\xfb\x2a\x3f\x97\xd9\xf8\x4e\xfb\x80\
+\xc3\xa2\x7d\x7d\x9c\x8a\x2c\x6c\x77\x4c\x59\x18\xaa\x93\xc7\x42\
+\xe9\x96\xfa\x12\x26\xcc\x06\x24\x45\xa0\x56\x9f\xaf\x66\x62\x59\
+\xdc\xe5\x6b\x17\x9e\x2b\x83\x3e\x0b\x4f\xe4\x09\x75\xea\x9d\xd0\
+\x6d\x59\x3c\xff\xe2\x47\xa8\x2f\xd6\x08\xf4\x06\x69\xde\x40\xef\
+\xd6\x30\xb1\xe9\x98\x16\x1d\xd3\x42\xe9\xb4\xe5\x68\x12\xd8\x72\
+\xca\xa3\x9c\xc3\x4b\x92\x90\x91\x12\x09\xf1\x7c\xbd\x26\xc7\xfc\
+\x47\x93\xa9\x18\x1a\x2d\xf4\xc7\x49\x12\xd2\x6a\x5a\x8c\x03\x91\
+\x91\xcb\x2c\x5c\xc2\x09\xd5\xf7\x81\x06\x99\x21\x30\x5a\xb9\xc2\
+\xa1\x74\xbf\x1f\x78\x2b\x73\x22\xa0\xf3\x90\x22\xb5\x53\x89\xab\
+\xc7\xea\x14\x75\x6c\x65\x33\xea\xa9\xf8\x27\xa6\x15\xac\xca\x39\
+\x3a\xad\x54\x13\x39\xa6\x25\x82\xba\x90\x66\x6a\x17\x2c\x51\x28\
+\x3c\xdd\xaa\xcc\x72\xb9\x70\x3c\xaf\x28\xe6\x20\xd4\xeb\xe8\xab\
+\x6d\xe8\x36\x69\xad\xdc\xa2\x3d\xbc\x89\xf2\x7c\x8f\x3f\xfd\x5d\
+\x97\x7f\xa1\x4e\x2f\xe0\x60\x00\xe5\x79\xf1\x4f\xfd\x49\xe5\x27\
+\x79\xf9\xf9\xaf\x73\x37\xfc\x9f\x41\xb9\x01\x91\x52\xe8\x84\x0b\
+\xe1\x4f\x21\xa9\x94\x59\xb8\xa2\x81\x2e\x2d\x60\xc5\x54\x4b\x51\
+\x08\x86\x17\x47\x8d\x54\x6b\x09\xd5\x5a\xa2\x7b\xb2\x47\x3e\x5d\
+\xe7\xc6\x25\x03\x65\x25\x93\xa6\x25\xef\xad\xc6\x73\x83\x9a\x65\
+\xf0\x96\x99\xb9\xcc\xd6\xbb\x99\x28\x0c\x17\x86\x11\x47\x21\x1c\
+\x1e\x9e\xc8\xa0\x2b\x9b\xb7\x17\x02\xf5\xef\xb9\x9d\x87\x18\xcb\
+\x6d\x24\xb4\x50\xad\x25\x26\x47\x29\x87\x7b\x22\x0b\x3f\xf3\xe2\
+\x2d\x96\xdb\x97\x59\x6e\x5d\xa2\xdd\x6e\x63\x4b\x81\x79\x25\x40\
+\x26\xe2\x6f\x0f\x52\x8d\xb4\x2e\x32\x6e\x1f\x95\xa6\x25\xbe\xa7\
+\xa7\x37\xb0\xe3\x9c\xd1\x64\x4a\xaf\x3f\x62\xe7\xf8\x31\x23\x2f\
+\xc6\x09\x2c\x6c\x2d\x95\x1c\xb2\xae\x8b\x00\x2e\xb3\x70\x19\xc0\
+\xe5\x63\x4f\x75\x80\x31\x6a\x2c\xfe\xf8\xd2\x3c\x3c\x18\xa4\x4c\
+\xb5\x75\xda\xee\x11\x6a\x78\xc4\x61\x3e\xcb\xec\xd3\x02\x4e\x94\
+\x90\x42\x0b\x84\x8f\x6b\xc3\x31\x50\x1b\xa1\x2a\x2b\xf5\x52\xd4\
+\x5e\x06\xb0\x9d\x66\xd8\x69\x86\x1e\x9e\xb3\xb1\x2a\xb2\x6f\x19\
+\xb8\x17\xd6\xe6\x16\x81\x20\x97\x2f\x9a\x22\xdb\x96\x46\x85\x69\
+\x71\xa2\x94\x5f\xdb\x75\x15\xae\x2d\x76\xb1\x2d\x8b\x4e\xd6\xe4\
+\x0b\x9f\xff\xe2\x5c\xe0\x96\x90\xa2\x84\x11\x6f\xbf\x29\x84\x07\
+\x1f\xef\xfc\x02\xfb\x0b\x2b\x1c\x8c\x7e\x19\x4f\xbf\x2e\x5c\x3a\
+\x4d\x93\x64\x30\x28\xe8\xb2\x73\x53\xd2\xe7\x94\x6a\xf2\x14\x33\
+\x73\x4c\xd3\x14\xac\x85\x25\x0a\xdd\xf1\xa9\xc7\x61\xfc\xd4\xdc\
+\x3c\xdc\x5b\x7b\x39\xe3\xe3\x3d\x54\xee\xf1\x63\x2f\x3f\xc5\xad\
+\x97\x3e\x8a\xbb\xfc\x31\x39\x82\x54\x06\xf2\xf1\x40\x60\xd0\x9d\
+\xfd\x0e\x59\x78\xc2\x19\x6b\xd8\x1d\x81\xa7\xcb\x06\x49\xb5\x71\
+\xe2\xf9\x95\x69\x72\x3f\xbd\x10\xd4\xe5\x73\xe2\xd8\xff\xd0\xa0\
+\x3e\x1e\xcc\x98\x8b\xc9\x51\x2a\x83\xbc\xdb\xb2\x58\x6e\xc6\xd4\
+\x17\x6b\xac\x6c\x26\x42\x4f\x1c\xa9\xc2\xc2\xb5\xd0\xf8\x96\xbe\
+\x10\xe5\x73\x79\x7f\xc0\xfe\x78\xca\xc9\xf1\x01\xb7\x1f\xee\xf3\
+\xfa\x07\x77\xb9\xfb\xc1\x07\x7c\xf7\xfe\x2e\x0f\x0e\x0f\xd8\x9d\
+\x84\x44\x64\x82\x9e\xa3\x7f\xa1\x39\x32\x0b\xd6\x99\x87\x85\xa7\
+\x8a\x2c\x5c\xfa\xb8\x95\x16\x5a\x67\xe1\xae\x84\x11\x1f\x76\x53\
+\x9b\x22\x70\xcd\x39\x6a\x54\x50\x6c\x7a\x18\xcd\xfb\x12\x6b\x28\
+\x85\x07\xb1\x27\xc9\x31\x3f\x56\x70\x4a\xf1\x4c\x91\x79\x4b\x5d\
+\xb1\x71\xce\xab\xb8\x2c\x0a\xcb\xc5\xe3\x61\x18\x91\x72\xb1\x19\
+\xe2\x54\x2e\xed\x21\x16\x5a\xa7\x58\xb4\x68\xc1\xb5\xe6\x0f\xf0\
+\xf1\x4e\xc2\xd6\xc6\x37\xd9\x79\x77\x02\x1f\x9d\xf2\xea\x9d\x2f\
+\x71\x27\xfb\x33\x00\x3e\xf6\xe2\x3d\xda\xc3\x9b\x5c\x7d\x41\xe7\
+\xd9\xcd\x97\x85\x01\x92\x9c\x30\x89\xf8\xce\x77\x1e\xb1\x5a\xdf\
+\x25\x5b\x58\xc2\x6e\xc0\xae\x1f\xb2\xe1\x58\x2c\x75\x8a\x00\x0d\
+\x23\x82\x7e\x8f\xb8\x63\x16\x89\x7a\x42\x4c\x9f\x28\x99\x51\x71\
+\x83\xb6\x45\xfe\xf8\xb6\xcc\xd0\x0b\xbd\x1a\x3d\xe0\xad\xbd\x1e\
+\x8d\xe5\xcb\xfc\xd0\x0b\x2a\x57\x3e\xf5\x0c\x2b\x1b\x47\xfc\xed\
+\xff\x73\x83\xbf\x7b\x5f\x83\xfc\x35\xba\x47\x45\x3b\xd7\xd1\xa8\
+\xaf\x68\xac\x58\x4b\x64\x85\x41\x8a\x1f\x34\x89\x07\x8f\x99\x1c\
+\xef\xd2\xcb\x4c\x32\x3f\x65\xcc\x14\xd7\xb1\xe8\x67\x03\xf4\xc0\
+\xc4\x75\x34\xa0\x4f\xe6\x37\x51\x9d\x4e\x11\xb4\x85\x13\x10\x53\
+\x5c\x3a\x78\x7e\x88\xeb\x5c\xd4\x36\x2c\xb7\x41\xb5\x34\x0e\xa6\
+\x8e\x5c\xed\xad\xe6\x23\x36\xaf\x3e\x45\xa3\x2b\x4e\xfc\x47\x7b\
+\x09\x56\x3a\x00\x06\xc5\xea\x62\x70\x6a\xe2\xb8\xaf\x0e\x68\x16\
+\x5a\x06\xe1\xe9\x51\x9c\x58\x51\x48\xa7\xd3\xa4\x5e\xd0\x96\x1d\
+\xd3\x22\xad\x17\x54\xe4\xb0\x8f\x47\x4e\xb3\x08\xde\x20\xd5\xb0\
+\x99\xd9\xc8\xba\x99\x2f\x83\x17\xd5\x21\x73\x1c\x86\xa3\x90\xe5\
+\x26\x8c\x6d\x81\xbb\x17\xac\x0d\x06\x1e\xd4\xd8\x97\xc1\x3c\xf0\
+\x56\xe4\x4e\x12\x80\x24\x73\xd0\x64\xe7\xae\xd0\x26\x17\x7c\xb3\
+\xf4\x27\x0e\xb1\xa4\xbd\x2a\x51\x02\x08\x97\xf4\xf3\x2a\xfa\xf2\
+\x72\x6b\x22\x96\xc8\xb4\xc6\x0d\xfc\x62\x75\x58\xc9\x1d\xfb\x85\
+\x49\x77\x79\xa4\x32\x2c\x5a\xf5\xa8\x28\x67\xec\xac\x88\xd9\x65\
+\x1f\x70\x8d\x3a\xff\xd5\x47\x3f\xc2\xee\xf5\x67\x78\xe5\xe1\xfb\
+\xfc\xf4\xed\xaf\xf0\xbc\xfa\xb7\x02\x37\x0d\x6f\xf2\x85\xcf\x7f\
+\x91\xd6\xca\x2d\xd6\xeb\xcb\x72\xd4\xdf\x2a\x0b\x52\x33\xa4\x7e\
+\xf3\x19\x0e\xef\xbf\x0f\x27\x3a\x6b\xdd\x26\xd7\xcc\x70\x6e\xa8\
+\x54\xb5\x72\x74\x4b\x74\x97\xc4\x89\xd9\x21\xf2\x32\xfa\xb1\xc5\
+\x52\x57\xe7\x23\x2f\x75\x69\x3f\x7d\x99\x77\x6e\xff\x07\xb6\x5e\
+\x7f\x0f\xff\xd1\xee\xec\xd2\xed\xc1\xfb\x6f\xde\xe3\x6b\x03\x8f\
+\x1f\xfc\xcf\xee\xf3\xc9\x4f\x7c\x9a\xab\xbf\xf4\x73\xdc\x7a\xe7\
+\x36\x6f\xbc\x7a\x1d\x9f\xf7\x71\x8e\x37\x50\x96\x0d\x89\x9b\xc5\
+\x7f\x77\x24\xfd\x8b\x7b\x99\x89\xe7\x87\xc4\x4e\x0d\xc3\x17\x99\
+\xb8\xe3\xe4\x78\x45\x56\x6e\xd0\x44\x75\x46\x32\x90\xc7\x84\xb8\
+\x95\x2c\xd1\xa0\x46\x8f\x94\x2e\x33\x2d\x71\x95\x1b\x06\x0b\x56\
+\x80\xbb\x22\x6b\x5f\xbf\x76\x8b\x2b\x37\xaf\x73\xe9\xc6\x66\x31\
+\xc2\x50\x38\x3e\x15\xff\x4b\xbd\x48\x4c\x5d\x20\x9d\xb6\xd0\x6a\
+\x43\x3a\x99\x22\x18\x08\x33\x93\xc5\x5b\x75\x25\x18\x64\xf4\x51\
+\x51\xa2\x09\x4e\xcd\x94\x01\x0c\xa0\x7a\x0e\x74\x52\x19\xc0\x79\
+\x63\x8c\x37\x76\xc4\xe3\xc0\x41\xd7\x2d\x22\x1a\xa8\x81\x29\x33\
+\xf1\x8d\x4b\x06\x03\x6f\x1d\x06\xfb\xd8\x6d\xad\xc0\xc7\xf3\x58\
+\x58\x14\x85\xce\xdc\xf0\xa9\xdc\x63\x27\xc5\xec\x16\x28\xa1\x82\
+\x6a\x26\xb3\x82\xc8\x32\x71\xc2\x48\x76\xe4\xe2\x0a\x56\xd6\x42\
+\x05\x5f\x0d\xb0\xac\xfc\x82\x2d\xab\x66\x9a\xa4\x51\x24\x8f\x16\
+\x33\x75\x5c\x5a\xd1\x50\x94\x41\x1d\x86\x0a\x76\x9a\x0b\x89\x26\
+\x26\x53\x7d\x99\xe5\x16\x7c\xe1\x3a\x6c\x7d\xe3\x26\xbf\xf5\x78\
+\x99\x17\x6f\xbd\xc6\x8f\x7e\xe1\x5f\xb1\x79\x6b\x1d\x3b\x2a\xf6\
+\xdd\x45\x9c\x9b\xc1\x52\x58\x30\x15\xb2\x67\xae\x8a\xb3\xbc\x5b\
+\xc7\x2a\xf7\x89\x16\xda\x08\xcb\x34\xcf\x95\x7c\x39\xb0\x80\xdb\
+\x1f\x01\x36\x86\xe2\x89\xa5\x8f\x4f\xe2\x7d\x95\x26\xbd\xe1\x88\
+\x3f\x7e\x4b\x8c\xee\x7b\x67\x47\x18\xcb\x9f\xe3\xc7\xaf\x2d\xf2\
+\x89\x8d\x0e\xdb\x7b\x1d\x8e\x0f\x0e\x51\xc3\x23\x1e\xaa\x22\xd3\
+\xe4\x47\x2a\x0f\x0f\x22\x26\xc7\xbb\x9c\x8e\x0c\xc6\x14\x12\x4b\
+\x5f\x1c\x5d\x27\xc2\x2b\x24\xaa\xe2\x3e\xb8\x88\xe0\x6d\xf8\xb5\
+\x27\x66\xdd\x6e\x65\x4f\x5c\x2f\xef\xb1\x0c\xac\xac\x3e\x87\x6d\
+\x8f\xb8\xb6\xbe\xce\xa3\xfb\x0f\xe8\xf5\x15\xbe\xf8\x99\x0e\x37\
+\x57\x72\xdc\xee\x0a\x0b\x56\x9d\x34\xb7\x30\xea\x1d\xb4\x49\x84\
+\x55\x0c\xd5\x96\x59\x55\x9b\x44\x60\x4e\x49\x8b\xd7\xc5\x7b\xa6\
+\x0a\x0b\x40\x2d\x9d\x33\x53\xa1\x92\xe6\x3c\x35\xa7\x59\xb0\x18\
+\x49\x12\xe2\xdb\x21\x76\x92\xd2\x47\xa3\xab\x6a\xe4\x5e\x8e\xa7\
+\xce\xe0\xc5\xf9\x9b\xcc\xc4\x45\x81\x57\xb2\x14\xab\x4a\x32\x27\
+\xdf\xd4\x82\x96\x1c\x46\x4d\xed\x14\x83\x27\x6c\x14\xbd\x70\xb3\
+\x4c\x39\xae\x54\xbe\x65\x9a\x55\x32\x17\x8a\x1c\xeb\x11\x2e\x98\
+\x79\xa5\xbd\x6c\x49\x09\x67\xd9\x6e\x0e\x0b\xef\x8a\x92\x97\x4e\
+\x2b\x30\x26\x2c\x27\xac\xe3\x09\xf6\x48\x63\x94\xa7\xe8\x76\x82\
+\x6d\xd4\xd9\xcb\x6a\x74\x9e\xdd\x42\x7b\xa8\x70\x9c\xff\x2c\x97\
+\x17\x4d\x16\xc8\xc0\x9c\x59\xbf\x5a\x91\x22\x8a\xd2\xb2\x33\x17\
+\x28\xa8\x5a\x83\xfa\xa4\x47\xd4\x1f\x48\x08\x24\x3b\x75\x4f\x5a\
+\x8a\x16\xf6\x19\x8d\x43\x9a\x45\x76\x4e\xc7\x27\x6c\x6f\xdd\xe3\
+\xdd\xf7\x1e\xe3\x9a\xf3\x05\x54\xb7\x65\xf1\xa8\x77\xc4\x1f\xbf\
+\xf5\x88\x3f\x7e\xeb\x11\x1f\x7f\xe6\x11\xef\xdf\x5a\xe6\xe6\xa6\
+\x8d\xaa\x7d\x9a\xcb\xf9\x1e\xf7\x07\x0a\x0c\x0e\xd9\xcd\x60\xf2\
+\x68\x97\xe3\x01\x78\x7e\x8e\xeb\x8c\xc0\x37\x49\xec\x09\xf9\x28\
+\xc7\xd0\x4d\x19\xc0\x02\x1f\x8b\xfb\xfd\x6c\x40\xc7\x69\x8b\x23\
+\x6d\x09\x21\x24\x04\xa9\x24\x8c\xae\x1a\xf1\xe9\x85\x15\x8c\xb5\
+\x16\x76\xbb\xcb\x83\xc7\x31\x2b\x16\x1c\x76\x72\x1a\xcb\x97\x49\
+\xcd\xab\x74\xac\x19\x3c\x88\x27\x3d\xb4\xca\xb8\xbe\x36\x11\xc2\
+\x1a\x0d\x5b\x14\xee\x93\xf3\xdb\xa9\x32\xce\x39\x6c\x8b\x91\xa6\
+\x89\x38\x09\x95\x68\x02\x8d\x99\x78\x9e\x54\x58\x5d\xe1\xd6\x18\
+\x91\x92\xbb\x0a\xc5\x8c\xa9\xcc\xce\x42\xe0\x3e\x9f\x89\xcb\xcc\
+\x5b\xf2\xc5\x2d\xb6\x67\xed\xe5\x00\x1a\xc5\x74\x88\x9c\x12\x29\
+\x8a\x3c\xdd\x2a\x27\x94\xad\x52\xe7\x10\xce\x63\xe4\x48\xd0\x68\
+\x46\x45\x7d\xe6\x44\x96\x5c\x18\x63\xa7\x19\x9e\xa3\x14\x7b\x3f\
+\x66\x25\x93\x53\x1d\x5f\x2a\xe6\xed\xca\xad\x19\x56\x14\x51\x6e\
+\x75\x88\xc2\x10\x2b\x35\x45\x00\x17\x2e\x3b\x4d\x25\x23\x34\x73\
+\xea\x96\xc5\xb3\x5a\xc4\xfd\xad\x9f\x27\xdf\x3c\xe6\x27\xba\x75\
+\x0c\xb3\x0f\x74\xa4\x5b\x50\xd5\x2e\x36\x2c\x32\x31\x40\x43\x09\
+\xa1\xd3\x91\x85\x80\x45\x58\x08\x93\x8a\x1d\xd1\x61\xb9\xca\x61\
+\x16\x0c\x4a\xab\xce\x58\xab\x95\x12\x3c\xf2\xe3\x18\xd7\x3c\x94\
+\x4d\x85\xf2\x76\x3a\x32\x68\xb5\x5b\xe0\x41\x2f\x85\xbf\xb9\xf3\
+\x88\xb7\xf6\xca\xae\xd9\x43\xd9\x70\xe8\x65\xe1\x5c\x80\xba\xf9\
+\x2c\xe3\xea\x41\x5d\x2e\x2c\x8a\x93\x08\xa3\xb0\x53\x4d\xec\x09\
+\x7a\x50\xa7\xa3\xb6\x0b\x9c\x5c\x27\x23\x95\xb8\xb9\x85\x5b\x64\
+\x66\xf1\x3e\x74\xd5\x08\xa3\x69\xd2\xb0\x2f\x71\x65\x25\x07\x12\
+\x82\x9a\xca\xdf\x85\xd0\x6d\xde\xe0\xc5\xce\x2a\x37\x37\x0d\x1c\
+\x7d\x4c\x4e\x1d\x3d\x50\xd1\xed\x4c\x14\x74\x72\x99\xa4\x2d\xbb\
+\x60\xe7\xe7\xd8\x6c\xad\x4e\x50\xbc\xa7\xd5\x2c\x2c\xda\xd2\x16\
+\x03\x90\x70\xa2\xba\x85\xb4\x67\xe7\x98\x05\x3e\xee\x78\x39\xfd\
+\x4c\xbc\xe6\xa9\x0e\x49\x12\xa2\x05\xb3\xac\x3c\x3e\xf5\x18\x58\
+\xcf\x4a\x0c\x1c\x0c\x52\xda\xed\x23\x0e\x07\x3a\x3f\xa6\x05\x24\
+\x99\xf3\x44\x48\x21\xdb\xce\x8a\x1f\x40\xa4\xe3\xfa\x79\xe1\x9f\
+\x36\x7f\x4b\x09\x65\x03\x40\x2b\x98\x85\x12\x0a\xd8\x46\x5d\xfa\
+\x53\xa4\x17\xa4\x9a\x4f\x30\x9e\xaa\x70\xb4\xae\x9f\xa3\xf8\x39\
+\x56\x6a\x12\x6a\x11\x4a\x49\xbb\x35\x0d\x68\x1a\x58\xa9\xc9\xc4\
+\x0f\x09\xb1\xb9\x7a\x45\xe7\x85\xee\x9f\x8a\x4b\xb0\xb2\x36\xe7\
+\x16\x54\xde\x0f\x2b\x98\x37\x4b\xc7\x60\x89\x25\x07\x96\x69\xd2\
+\x31\x4d\x30\x3b\x73\x3c\x38\x96\x39\xa3\x11\x73\xf1\x77\xbb\xae\
+\x8d\x6a\x07\x9c\x45\x19\xbd\xdb\x03\x76\x46\xce\x05\x2a\x6b\xe0\
+\x88\xa2\xcd\xf3\x4d\x3c\xe3\x59\xba\xed\x0e\x69\x7b\x83\xde\x00\
+\x86\x83\x21\x77\xdf\x7a\xc8\xab\x6f\x3d\xe2\xf5\x87\x87\xf4\x06\
+\x02\x1e\xc8\x2c\xab\xcc\x02\x35\x4e\x22\xe2\x24\x2a\xf8\x6d\x13\
+\x37\x8f\x64\x70\x27\xf6\x44\x64\x60\x35\xc7\x75\x2c\xc6\x4c\xf1\
+\xfc\x90\x56\xe0\x56\x58\x8a\x59\x00\x7f\x7a\xa1\xcd\xf2\x52\x01\
+\xcf\xcc\xab\x92\x27\xde\xbc\xa6\x61\x6e\xde\x90\xfa\xe1\x34\x6f\
+\xa0\xdb\x99\x18\x0e\xb5\x33\xf4\x40\x9d\x9b\x59\x33\x2f\x4c\x14\
+\xdb\x04\xe9\x64\xae\xb9\x71\xfe\x96\x9b\x75\xfc\x69\x34\x37\x01\
+\x22\xdc\x2b\x6d\xec\x20\x2c\xae\x2a\xb3\xf4\xe6\x66\x42\x5c\x94\
+\xda\xb3\x9f\x56\x2e\x65\x2f\xa9\xb6\xea\xed\x30\xb5\xd1\x55\x1f\
+\x37\xf3\x19\x91\x4a\x0d\x45\x49\xb5\x8d\xfd\x18\x5d\xec\xd0\x98\
+\x10\xc4\x00\x13\xd1\x75\x2b\x60\x82\x53\x66\xd1\xca\xf8\x52\x89\
+\x85\xd3\xc2\x38\x5b\xc2\x85\x62\x1c\xdf\x2a\xee\x5b\x55\xc6\xa0\
+\xc2\x4c\xa4\x73\x6b\x09\x98\x1b\x22\x0d\xac\xc9\xec\x22\x37\x8a\
+\x09\x3b\x29\x9d\xa2\xc3\x77\xd4\xff\x4f\xa1\x53\x4a\x39\x43\xc2\
+\xc2\x26\x40\x40\x89\x19\x33\x21\xbc\x36\x8b\x8c\x62\xe6\xf4\xfb\
+\x03\xa9\xb6\xd3\x0a\xcd\x44\x29\x3e\xc2\x2a\x1d\x3d\x33\xc6\xa1\
+\x45\x03\x11\xf0\x47\xe3\x87\xc2\xae\xea\xf4\x8d\x0f\xc5\xa2\xb1\
+\x53\xa3\xcb\x7b\xe2\xf2\xe7\x37\x41\x2f\xd8\x84\x36\xb4\x80\x1e\
+\x29\x86\x3f\xc5\xf3\x9f\xf0\x8f\x2f\x60\x44\x35\x0b\x97\x01\x5e\
+\xc5\xc7\x5e\x91\x0e\x5c\x27\x2a\x8a\xbc\xb2\xd8\xd3\x8a\x4c\x6c\
+\xb1\xd6\x5d\xa2\x61\x77\xa8\xaf\x2e\xc8\xb1\x7c\x50\x58\xeb\x2e\
+\xcd\x35\x37\xce\x27\x94\xa4\x08\xe0\xf3\x9b\x57\xab\x33\x6c\x60\
+\x4b\x49\xe6\x93\x6e\x65\x61\x57\xcd\xce\xba\x6e\x61\xc7\x62\x0d\
+\x46\x99\x8d\xd7\x8d\xa9\xcc\xc0\x9e\xee\xc8\x79\xb9\xb3\x22\x9e\
+\xce\xef\xad\xb6\xdb\x1a\xc1\x20\x65\x55\x49\xa4\x8a\xad\x6c\x63\
+\xa7\xa4\xa8\xbe\x4f\xe6\x38\x32\x90\xd5\xb2\x55\x2c\x47\xd6\xcb\
+\x82\x26\x0a\x45\xa6\x2c\x2d\x58\x4b\x21\xbb\x29\xba\x73\x8e\xa4\
+\xd3\x84\xd9\xb6\x2c\xd0\x2a\x19\xb2\x0c\x5a\x2b\x52\xb0\xa2\x08\
+\xfb\x34\x94\x43\x98\xaa\xe2\x10\x68\x2a\xb9\x23\xcc\xae\xcb\x6c\
+\x1c\xc4\x93\xb9\xe5\x34\x61\x91\x2d\x57\x3a\xff\x9e\xb5\xcd\x87\
+\x52\xca\x59\x9e\x24\xe5\xb6\xd1\xb4\x82\x75\xad\x64\x22\x03\x35\
+\x26\x60\x74\x16\x72\xb6\x17\xe1\xf7\xfb\x78\xfd\x03\xa2\x28\x62\
+\x2f\x88\xe8\x13\x32\xee\x4f\x88\x22\x85\x2c\x1d\x33\x0e\x22\xa2\
+\xfe\x80\x47\x7b\x3e\xf9\x71\x7c\xa1\xdd\x5b\x75\xb9\xec\xa2\x91\
+\xf9\x4d\xf0\x40\x75\x46\xa8\xf9\x88\xcc\x4f\xf1\xfc\x50\x06\x70\
+\x99\x5d\x65\x51\x98\x1c\x3f\x59\x1f\x9b\x44\x17\x30\xb1\xeb\x44\
+\x73\x59\xbc\x2c\x06\xcb\xf0\xe9\xaa\x16\x57\xd6\x2c\x36\x94\x58\
+\x66\xe1\xd5\x8a\x66\xe2\xfa\x35\xd1\xdc\xb8\xb4\xbe\x8c\x65\xd5\
+\x45\x16\x0e\xc4\xba\x86\x24\x88\xd0\x6d\x93\xa4\x92\x8d\xa3\x39\
+\x18\x81\x84\x0f\x65\xfb\x39\x48\x27\x04\x86\x72\xa1\x39\x92\x9b\
+\x75\x9c\xda\xac\x4d\x5d\xe5\x89\xf5\x40\xc5\xd6\x52\x19\xc0\xe5\
+\xd8\x7f\xc9\xb1\x2c\xcc\xef\xdf\x9a\x5d\x07\x06\x22\x38\x0f\x73\
+\x7d\xe6\x8a\x59\xb4\xac\xcb\x2e\xa0\x9c\x76\x06\xd4\xb2\xf5\x8b\
+\x65\x8a\x0e\xdc\x39\x0b\xd4\x28\x0c\xa5\xc8\xa7\x0c\xd4\xb2\x79\
+\x51\xbe\x5e\x85\x1e\x56\xa4\x10\xa0\x16\xde\x6b\xa2\x71\xa2\xf8\
+\x81\xcc\xbe\x0b\xb9\xd8\xa3\x91\x36\xb2\x62\x0b\xa9\x60\x40\x72\
+\x6c\x49\xfd\xc8\x5f\xba\x02\x3f\x9e\x57\x1b\x1c\x6c\x5f\x97\xc1\
+\x29\x57\xe5\x56\x27\xb0\xab\xcd\x8c\x02\x22\xd8\x96\x45\x73\xbd\
+\xc7\x71\xfa\x06\xdf\xf7\xbe\x0a\xfa\x9b\x8c\x03\x85\x86\x2d\x4c\
+\x62\xfa\x39\x78\x9e\x90\x03\xb6\xfa\x23\x46\x67\x21\xc9\xde\x23\
+\xe2\xf0\x00\x2f\x5a\xc5\x68\xf5\x58\x5d\x5d\x92\xed\xe7\xd5\xd5\
+\xa5\x59\x57\xcc\xd1\xc0\xed\xe0\x45\xcf\x92\x29\x4d\x09\x15\x0c\
+\x7f\x2a\x03\x30\x4e\x22\x19\xbc\xaa\xbe\x4c\x9c\x44\x68\x0c\xe7\
+\x82\xb7\xcc\xca\x25\x6e\x4e\xec\x09\x78\x22\xa0\xdd\x3c\x9a\x73\
+\xdc\x15\xc1\xdc\xc1\x68\x9a\x28\xb5\x45\x1a\xf6\x25\xea\xab\x97\
+\x59\x1d\x45\x1c\x36\x4d\xc6\xc7\x29\x76\x5b\xc3\x5c\x5d\x67\xe9\
+\xa9\x45\xec\x92\x7a\x8c\x14\x92\xca\x25\x3c\x2a\x82\xcc\x53\xf3\
+\xb9\xbd\xd7\x65\x20\x27\x81\x3a\x17\xc0\xb6\x56\x97\xef\x6f\x55\
+\x57\x01\xe0\x4f\xa3\xbf\x37\x63\x97\x81\x5d\x16\x75\xe5\xe3\xb3\
+\xa2\x71\x33\x3e\xf5\x64\x16\xae\x76\xf0\xec\xb6\xc6\xaa\x16\xc8\
+\xef\xe1\xa9\x0e\x0d\x5b\x7c\x9f\xaa\x12\x4e\x8f\x8a\x0e\x9b\x9c\
+\xce\xb0\x2a\xc6\x29\x9a\x0a\x56\x77\xbe\x0d\x1d\x4e\x24\x37\x25\
+\x16\xd3\x98\x78\xc5\xc4\x47\xc7\x34\xf1\xa3\x90\x7a\xd1\xcc\xa8\
+\x0f\x8e\x50\x8a\x3d\x64\x81\x95\xa1\x98\x39\x5b\x96\x85\x43\x26\
+\xa8\xae\x28\x92\xd8\x59\x29\xb7\x29\x99\x39\xa3\xde\x08\xa5\xdb\
+\x04\x84\xcb\xbc\xae\x3e\xc7\x78\x75\xc2\x33\x4b\x0f\x81\x2f\x14\
+\xdb\x94\x94\x73\xeb\xc1\x22\x89\xc6\x75\xd3\x82\xa8\x47\xdf\xdc\
+\xe7\xdd\xdd\x3f\x83\xf4\x35\x00\xde\xef\x89\xbf\xf1\xb9\xa5\xcf\
+\x22\xfc\xf5\x2c\x3a\xb6\x49\x98\x5b\xdc\xed\x8f\x21\xab\x73\x7c\
+\xf8\x16\xc3\xe4\x16\xf0\x80\x9b\x2b\x87\xb2\x95\x6c\x58\x6b\xac\
+\x71\x20\x0d\x00\x0f\x8a\x6e\x82\x72\xe6\xd3\x48\xf6\x64\xa6\x2c\
+\x31\x6d\x6f\x00\xdd\x36\x68\x83\x21\x29\x2d\xd2\x4a\xf1\x56\x3e\
+\x2e\x03\xb8\x84\x14\x71\x12\x41\x1b\x0a\xef\x6b\x12\x7b\x82\x17\
+\x08\x26\xa3\x15\xd4\xc8\xfc\x1a\x6e\x3e\xa2\xab\x2a\xac\x3a\x16\
+\xd7\x36\x35\x16\xb4\x36\x93\xc3\x3d\x0e\x57\x2f\xcb\x69\x88\x35\
+\x33\xc1\x59\xde\xc7\xb4\xae\x91\xb2\xc0\x70\xd8\xc2\x69\x0e\xd0\
+\xbc\x13\x52\x77\xe6\xdd\x90\xd8\xe0\x06\x2a\x04\xc5\xff\xd6\x36\
+\x99\xd9\xbb\x22\x03\x53\xf0\xbf\xa9\x74\xcd\xbc\xe4\x19\xf8\xae\
+\xc8\xd4\x83\x82\x27\x16\x81\x6d\xcb\xe2\x2f\x09\x22\x9a\xe4\xc2\
+\x80\xbb\xd0\x58\xf4\x93\x10\x5d\x9d\xf1\xcd\x79\xbf\x28\xc2\x17\
+\x5d\xa6\xda\x3a\x67\xe1\x2e\xab\x35\x75\x2e\xa0\x0f\x53\x9b\x85\
+\x51\xb1\x6a\xb7\xe0\x99\x1b\x8e\x03\xc1\x0c\x17\xab\x06\xa1\x98\
+\xce\xc0\x22\x0e\x15\xfa\x05\x4e\x09\x34\x55\x72\xc3\xe5\xe4\x72\
+\x75\x49\xa2\x16\x2a\xf2\xd2\xaf\x87\x82\x9a\xb2\xa2\x08\xd7\xcf\
+\xd1\xc3\x10\xe5\x60\xca\xe9\x78\x91\xbc\xf7\x50\x16\x81\x66\xa7\
+\x23\x9c\x30\x9f\xd0\x02\x2e\x0b\x44\xd3\xb2\xb8\xb4\x7e\x95\xc4\
+\xb2\xa4\xa6\xe1\xda\xe5\x90\x56\xf0\xf3\x1c\x6c\x5f\x17\x2a\xb5\
+\x48\xe1\x71\xd8\xe3\x9d\xed\xbf\xe4\xfb\x93\x2d\xfc\xa8\x3f\xd7\
+\x8a\xf4\x92\x8c\x1d\xf5\x88\x77\xb7\xfe\x07\xde\x3f\x79\x55\x06\
+\xaf\xbc\x64\x27\x19\x53\x42\x82\xa8\x47\x18\xf6\xa1\xd0\x8f\x1c\
+\x9d\x9e\x31\x7a\x0c\xde\xf1\xdb\x73\x1a\x61\x63\xc5\x94\x73\x74\
+\x6b\x35\x4b\xb6\x8c\x95\x33\x5f\x52\x5e\x73\xf4\x53\x50\xa7\xab\
+\x41\x6f\x20\x02\xf6\x49\xb0\x41\x14\xca\xc3\x39\x66\x42\x69\x2a\
+\xf4\x33\x05\x75\x34\x00\xb7\x60\x30\x98\x1d\xc7\x4c\xe9\xb6\x2c\
+\x8c\xa6\xc9\x95\x7a\x8b\xfa\x69\x93\x83\x74\x47\x66\xe2\xea\x6d\
+\xa9\x75\x93\xd5\x85\x18\x27\xf6\x69\xeb\x23\xb9\xba\xa1\x84\x0f\
+\x26\xd0\x0d\xce\xd9\xd8\x06\x62\x61\xa2\x5d\x3e\xef\x09\x61\x8f\
+\x1d\x84\x22\x48\xbd\x29\x76\x6f\x82\x4f\x82\x3a\x39\x12\xc1\x3d\
+\x6e\x90\xa7\x9e\xc4\xd8\xd5\xa6\xc7\x79\x46\x63\x3e\x33\x8f\x59\
+\xec\xb4\x65\x26\x06\x61\x81\xf0\x24\x58\xa1\x36\x05\x84\x28\x33\
+\xf1\x38\x10\x22\x7b\xd5\xf7\x05\x3b\x11\x63\xc9\x81\x4f\x2c\x93\
+\xe6\x13\xd8\x89\xaa\x07\x9b\x55\xc2\x0f\xc1\x42\x91\x04\x3a\x56\
+\x2a\x2a\xfd\xb0\x1f\x31\x1a\xa6\x58\x7d\x8d\xe3\xbc\x4f\x53\xc9\
+\x88\x6e\x6c\xca\xc5\x8c\x73\xad\x67\x33\x2f\x4c\xb4\xc5\xd1\xb2\
+\x04\xcd\x56\x62\xe0\x52\x34\x5f\x42\x99\xa1\xfd\x9b\x22\x10\xa2\
+\x0e\x29\x21\x5b\x8f\xbf\xcb\x1f\xde\xfe\xb7\x7c\xf3\xce\x7f\xcf\
+\x7b\xdb\xaf\xe2\x85\x33\x06\x21\x1f\x4e\x38\x39\xfe\xd3\xb9\xe0\
+\xad\xde\x37\xf5\x08\xb3\xd3\xc6\xe9\x74\xb0\x3a\xe2\x32\xd9\x31\
+\x42\x76\xa3\x43\xb1\x5e\xab\xd5\x9b\x5b\x49\x50\xfa\x0f\x67\xe1\
+\x89\x14\xed\x94\x01\x3c\xb4\x3d\xdc\x7c\xc6\x34\x94\xc7\x5e\x3a\
+\x1f\xac\x4f\xba\x95\x01\x5e\x32\x15\xf9\x28\xa7\xa3\xe6\xa8\xfa\
+\xf2\x1c\x35\x57\xb6\x8f\xdd\x5c\xb0\x11\x6b\xdd\x25\xce\xda\x2e\
+\x93\xc5\x11\x6b\xda\x15\xc6\xc7\x29\x87\x85\xfc\x32\x18\xa4\xdc\
+\x3b\x78\xc4\x64\x6f\xc0\xe5\xf6\x0d\x6a\xed\x53\xc8\x66\x7c\x6b\
+\x9e\x7a\x12\x2e\x8c\x2a\x7b\x33\x66\xcf\x47\x8c\x50\x64\x20\x27\
+\x41\xc4\x70\xe0\x11\x1f\xf8\x0c\x07\x1e\xc3\x81\xc7\xe8\x6c\x9b\
+\xfe\x63\x83\x24\x88\x38\x53\x4f\x18\x8c\x12\xf2\xc1\xa8\x08\x76\
+\x4d\xb2\x12\x81\x9d\xcf\x69\x2a\x3a\x6a\x3a\x87\x99\x8f\xb3\xf9\
+\x93\x48\xee\xa8\xae\xdc\xaa\x70\xa2\x84\x11\x25\x53\xe1\xa9\x8e\
+\xb0\xb1\x32\x08\xe5\xe8\xbd\xc1\x6c\x4c\x47\x21\x90\x10\x22\xaa\
+\xd0\x66\xe5\x06\x24\x2c\x13\xc7\xb4\xd0\xed\x44\x70\xbc\xe9\xfc\
+\x2f\xe0\xda\x2d\xd4\x56\x87\xdc\x12\x70\x22\xd4\x22\x29\x34\xaa\
+\x1a\x4b\x95\x38\xdb\x27\xc4\x2a\xb4\x0d\x61\x18\x11\x86\x82\x4b\
+\xb6\x2c\x93\x38\x9a\x15\x00\x86\xd9\xe7\xbd\xed\x57\xb9\x7d\xfa\
+\x15\xa1\x05\xd8\x4f\xb8\x7d\xfa\x15\xee\x9e\xfc\x2e\x3b\x93\xad\
+\x42\xfa\xf8\x06\xef\x9f\xbc\xfa\xa1\x18\xcd\x30\xfb\x95\x6a\xdd\
+\x22\xc2\xe2\x74\x30\x60\xc3\x5c\x2d\x34\x9f\x5d\x28\xda\xb8\x07\
+\xd3\x90\x83\x69\xc8\xfe\xbd\x23\xee\xef\x85\x73\xc5\xd5\x98\x29\
+\x7a\x50\xc7\x53\xcc\x19\x1c\x28\x82\x52\x63\x38\x07\x1f\x3e\x2c\
+\x90\x65\xa1\xa8\x21\xb3\x77\x19\xd4\x55\x1a\xae\x6c\xb2\xac\x3a\
+\x0a\x1f\x69\x74\x58\x6e\xc6\xac\x69\x57\xd0\x33\x31\x6c\x3a\x39\
+\xdc\x93\x9f\xf7\x68\x3b\xe5\x7f\xfc\x3f\xfe\x6f\xfe\xe8\xab\xbf\
+\xc3\x5a\x57\x5c\xa5\x9c\xe4\x54\x0c\x85\x7a\x39\x79\xea\x89\x8f\
+\xc1\x48\x7c\xa4\x9e\x78\xbe\x7c\x3c\x18\x31\x4c\x7d\x46\x28\x34\
+\xc9\xe5\xd8\x51\xab\xed\x16\xc5\xee\xa2\xc4\xc2\x6a\x14\x63\xb0\
+\x28\x5f\x8b\xbd\x93\x4a\x16\xae\xcf\x4d\x48\x97\x54\x5b\x19\xd8\
+\xba\x3a\xdf\x44\x3a\x9f\x89\xed\xb6\xc6\x59\xc7\x44\x2f\x78\xe2\
+\xb2\xa0\x2b\x27\xa7\xdd\xcc\x17\x23\xfb\xf1\x39\xf2\x45\x0b\x15\
+\xcc\x62\x3a\xa3\x1c\x10\x35\x08\xe9\x17\xa3\xf9\x17\x6e\xc5\x42\
+\xc6\xc0\xb1\xc5\x0a\xad\xae\x41\xb0\xd6\x82\x4e\x07\xbf\x58\x38\
+\x5e\x2e\x61\xec\x17\xcd\x94\xf4\x1c\xe3\x21\x99\x0d\x98\xe3\xaa\
+\xa5\x9a\xce\xb2\x68\x05\x3f\xcf\xd0\xfe\x4d\x3c\x7f\x55\x06\x6f\
+\x79\x7b\x6f\x38\xe6\xfd\x93\x57\x19\x1e\xdd\x63\x67\xb2\xc5\xd6\
+\x4e\x32\xf7\xfa\x05\x36\x20\xea\xcc\xf1\xca\x7a\xa7\x49\x72\xea\
+\x32\xda\x9f\x59\xb7\x32\xec\x4a\xfb\x56\xe5\xcc\x67\xe0\x88\xe0\
+\xea\x0d\xfa\x92\xa7\x6d\x30\x6b\x09\x97\x4c\x44\x57\x9b\x65\xd9\
+\x38\x89\x18\x28\xf9\x85\x40\x2e\x9f\xab\x06\x70\x2f\x85\x61\x3a\
+\x9c\x2b\xf4\xca\xa3\x9b\x47\x74\x5b\x16\xd7\x5b\x1e\x57\xea\x2d\
+\x26\x8b\x23\x09\x25\x76\x72\xc1\xa2\xd4\x57\x2f\xcf\x7d\xcf\xfb\
+\x5b\x11\xaf\xff\xc6\x9f\xf1\x27\xbf\xfd\x7d\x8c\x56\x46\x9e\x77\
+\xc9\x07\x23\xc6\x76\x0d\xbc\x5c\x7c\x80\x98\x60\xf6\xf2\xd9\x24\
+\xb3\x5d\x34\x7b\x8a\xd7\xcb\x40\x6e\xb5\x5d\x70\x6b\xb4\x36\x16\
+\x38\x53\x33\x5a\x6d\x17\xa7\xb6\x8a\xd5\x71\x49\xdc\x06\x7a\x4f\
+\xb4\xe4\x5a\x9a\x43\x60\x5b\xb3\xc9\x8f\x0f\x29\xf4\xb4\x40\x23\
+\xc9\xba\x12\x13\x97\x38\xb8\x9a\x8d\x83\x41\x4a\xbd\x7f\x89\x44\
+\xf5\xe7\x98\x8d\x5e\x52\xe1\x2d\x47\x0a\xba\x59\x76\xa3\xc3\x88\
+\x18\x05\x2d\x0a\x49\x02\x5d\xb4\x7d\x43\x55\x58\x3f\x15\x7b\xe8\
+\x64\xfe\x54\x02\xc1\x2f\x16\x63\xfd\x3d\xec\x02\x8e\x88\xa0\xec\
+\x17\xcb\x5c\x3a\x45\x9f\x3b\x04\x52\xcb\x22\xe9\x0b\xa1\x91\x63\
+\xe5\x85\x6e\x19\xe9\x3e\x24\x79\x64\xb2\x42\x46\x54\x6a\x76\xcc\
+\xd9\x04\x09\xc2\x27\x78\x6b\x67\x3e\x40\x9f\x6d\x35\x78\x6f\x38\
+\x06\xbe\xc2\x0b\xfc\x02\x5b\x5b\xdf\x84\x96\x08\xf4\x6b\xeb\x17\
+\x3b\xeb\x7b\xa7\x11\x8b\x49\x0f\x55\x6b\xd0\x98\x4c\x79\xe4\x3f\
+\xe4\xd1\xfd\x77\x8a\xe5\x8a\xd0\x67\xb6\xf5\xb3\xf9\xa1\xce\xa2\
+\x00\x00\x20\x00\x49\x44\x41\x54\xcf\x1a\x9b\x3f\xb4\xc9\x95\xe3\
+\x98\x38\x3c\xe0\xee\x23\x9d\x31\xe0\x72\x28\xcd\xfc\x44\x37\x6d\
+\x02\xa3\x7c\x0e\x46\x9c\xc7\xbf\x29\x2d\x06\x4a\x4e\x3b\x9f\xbf\
+\x8c\xf6\xd2\xd9\xeb\x55\x48\x12\x27\x11\x5d\x8d\x82\xf9\x88\x49\
+\x1a\x62\x9a\xf2\x78\x64\xb0\x10\x3c\x46\xc7\xa4\x7e\xda\x84\x65\
+\x18\x1f\xa7\x34\x96\x35\x29\xd4\x87\x7b\xfc\xd1\xde\x19\xfe\xd7\
+\xfe\x98\x6b\x4f\xdf\xc2\x5d\x54\xa1\x09\x8d\x51\x07\x5c\x05\x45\
+\x73\xc9\x53\x4f\x64\xe7\x36\xa2\x08\x5b\xcb\x59\x0b\x14\x46\x45\
+\x07\xae\xcc\xd0\x07\x76\x8d\x86\x16\xe3\x8f\x1d\xdc\x4c\xa1\xd5\
+\x76\x19\xa6\x3e\x8a\xa6\x30\x0e\x23\x16\xac\xc7\x64\xdd\x0d\xa0\
+\xf7\xa1\x38\xb8\xda\xae\x2e\xa7\x3e\xf4\xa0\x27\x31\xf1\x74\xe3\
+\x59\x59\xd8\x55\x6f\x0e\x3b\xc0\x75\x92\x24\x44\xd1\x5b\x24\xc9\
+\x2c\xa0\x3d\xd5\x99\x37\x4f\x31\x81\xa4\xd8\xf3\xac\xdb\x89\x64\
+\x14\x88\xc2\x79\x5f\x89\x73\x78\x19\x20\x33\x67\xff\x94\x7e\x14\
+\x51\x37\x33\xea\xa5\x1d\x7d\x81\x7b\x35\x2c\xb9\x0f\x3a\xec\x47\
+\x72\xa8\xb4\xc4\xbf\x5a\xa8\x08\x0e\x38\x8c\x24\xa4\x98\x1b\xa8\
+\xdc\x7c\x88\x77\xf7\xe7\x48\xb2\x77\x49\x86\xbf\x07\x20\x03\xf4\
+\xd1\x7e\x22\x03\x79\x6b\x27\x61\xd0\xba\x3f\xbb\xb4\x3e\x21\x23\
+\x5f\x5e\x34\x51\xb5\x06\x1d\x05\x46\x63\xbf\x22\xfa\x3f\x60\x7b\
+\xf8\x00\xff\xd1\x2e\xdb\xc3\x07\xbc\xf5\x78\x9b\x38\x3c\x60\x5d\
+\xd7\xf9\xdc\x67\x9e\xe2\xd6\x17\x7e\x94\x9f\xf8\xb1\x4d\x9e\x7b\
+\xf6\xd2\x1c\xd5\x56\x16\x5f\x55\xaa\x4c\x63\xc8\x40\xc9\x59\xc8\
+\x47\x0c\x94\x5c\x06\xe8\xf9\x00\xae\x06\xf8\x93\x20\x47\xa6\x34\
+\x59\x6c\xc6\x5c\x59\x13\x19\x7f\x67\x32\xfb\x9c\xe3\x91\xc1\x64\
+\x71\x84\x9e\x1d\x62\x5f\x3e\x65\x7c\x3c\x0b\x9e\x9b\x9b\xd7\x71\
+\x17\x37\x79\x63\x47\xe7\x95\x3f\xfa\x6d\xe8\x17\xfc\x7d\x77\x8a\
+\xa2\xb9\x24\x76\x86\xa2\xb9\x45\x07\x4f\x64\xdc\x24\x50\x8b\x2c\
+\x9a\xa1\x17\xaf\x1b\x6b\x0e\x4e\xcd\x44\xd1\x5c\x94\x68\x82\x3f\
+\x15\x18\xb9\xa5\x39\x78\x6a\x8e\x1a\xc5\xe4\x66\x9d\x8c\x1e\x81\
+\x9d\x4b\x03\x42\x89\xe5\x3d\xe7\x89\x74\x1b\x34\xe6\xd8\x89\x5a\
+\xba\x7f\x21\x80\x57\x95\x04\xbf\xb3\x39\xd3\x6a\x90\x0a\x96\xa2\
+\x80\x16\x49\x12\x8a\x4c\x5c\x95\x81\x39\x66\xb1\xe3\xc8\x2c\x3a\
+\x5c\x85\xc8\x47\xc3\x22\x0e\x23\x34\xcb\x9a\x2b\xf6\xca\x72\x6d\
+\x12\x05\xa5\x4e\x4c\x14\x86\x51\x50\x74\xc7\x66\x66\x24\x32\x53\
+\x47\xb3\x8e\x1c\x56\x86\x92\xd6\x09\xe2\x44\xb6\x8d\xe4\xe2\x46\
+\x39\x6d\x91\xe3\x14\x13\xd9\x49\xf2\x2a\xf0\x45\xf4\xd6\x97\x09\
+\xe3\x5f\xe5\x51\xc1\xc4\x5c\x5b\xd7\x79\x6f\x38\xe6\xd9\x56\x83\
+\xb7\xf6\xbf\xc2\xdb\x6f\xde\xe2\x63\x2f\xde\x9b\x0b\x74\x39\xab\
+\x95\x3f\x85\xdb\xe9\x60\x91\x11\x46\x0a\x9b\x37\xdb\x6c\xd2\xe6\
+\xf2\xa2\xc9\x4b\x67\x9f\xe2\x2c\x0f\x49\x0e\x07\x72\xed\xed\xf6\
+\xf0\x01\x93\x57\xef\xf2\xe8\xfe\x03\xae\xdd\xbc\xc1\xb5\x4f\xa9\
+\x2c\xbc\xf3\x14\xb7\x4f\x7a\xb0\x53\x71\xc3\x29\x34\x0f\xe5\xed\
+\x4c\x69\xa2\xa4\x1e\x67\x5a\x93\x85\x7c\x34\xc7\x52\x68\x0c\xe9\
+\x65\x0a\x2d\xb5\xf9\xa1\x01\x5c\xc2\x92\x6e\x33\x96\x33\x73\x92\
+\x2b\x3e\xde\x23\xa8\x2d\x62\x03\xb5\xd1\x63\x76\x9a\x97\xb8\xb2\
+\x03\x8d\x55\x0d\x8e\xc4\xc9\x78\xea\x9d\xb0\xe8\x2e\xd1\x1b\x8d\
+\x38\x7a\xbd\xcf\xdb\x1f\xf9\x16\x9f\xfc\xc9\x97\x60\x0c\x89\x9d\
+\x11\x45\x21\x4e\x31\xfe\x1e\x16\xa6\x7e\x4a\x34\xc1\x2c\x82\xda\
+\x84\x4a\x8b\x5a\x50\x72\x6b\xd4\x19\xa1\x90\x07\x53\x86\xa9\x8f\
+\x65\x37\xe8\x99\x06\x6e\xa6\x10\x14\x63\x4d\xea\xe4\x88\xac\x58\
+\x28\xa3\xeb\x16\x49\x31\x39\x5d\x35\xe3\x2e\x19\x6f\xa5\xa3\x5e\
+\xc8\xc4\x55\x6c\x5c\x4e\x76\x64\x23\x31\x0d\x9a\x24\x21\xa5\x53\
+\x4a\x13\x4d\xe4\xfd\x66\x5e\xf0\xc4\x72\x70\x31\x87\x50\x21\xb4\
+\x72\x0c\x59\xd0\x39\x18\x84\x84\x16\x72\x71\xf9\x6c\x1a\x4f\x3c\
+\x6e\x9e\xc3\xca\xa5\xdc\x32\x2e\x9c\x34\x4d\x29\xd5\x01\x8a\xac\
+\x1d\x10\x02\x2e\x81\x96\x60\x39\x3a\x61\x98\x14\x5d\xc0\x59\x6b\
+\x58\x37\x33\x32\x9a\xd4\x8a\xe0\x1b\xb4\x5e\x01\xbe\x48\x32\xfc\
+\x3d\xac\xac\xce\xb5\x75\x9d\x47\xfb\x02\xff\x3e\xbb\x2e\x32\xb1\
+\x45\x5d\x06\xf0\xf9\xdb\x33\x5d\x85\xd6\xca\x2d\x08\x1b\xf4\x95\
+\x00\xc2\x08\x6f\xff\xa8\x70\xfb\x11\x96\xfb\xc9\x24\x81\xe5\x7d\
+\x7e\x64\xfd\x69\xec\x8f\x76\xc9\xc6\xbf\xc4\x07\xdf\x7e\xc8\xdf\
+\xfe\xcd\x5f\xb1\xb7\x1f\xf2\x77\xbf\xe1\xb0\x6a\xbc\x22\xe9\xb6\
+\x83\x05\xc1\x54\xe8\x41\x1d\x37\x8f\x28\x4b\x15\x25\xf5\xc8\x35\
+\xf7\x42\x00\x0b\x38\xd1\xa2\xa5\xc2\x30\x1b\xa1\x07\x36\x0d\xe7\
+\x43\x8a\x3f\xb7\x03\x44\xc4\xa3\x88\xc3\x0a\xc4\x5a\x75\x14\xf2\
+\xe9\x29\x41\x7f\x91\x40\x69\xa2\x37\xcb\xe0\x4e\x4b\x89\xb8\xa0\
+\xfd\xbc\x13\x16\x9b\x37\x78\x5b\x39\xa0\x7b\xf0\x88\x6b\x0f\x6e\
+\xe1\x5c\x5b\x64\x1c\x8a\x55\xc0\x5e\x34\x9b\x7a\x51\x08\xc8\x4d\
+\x9b\x28\x0a\x30\x4d\x8b\x24\x50\x49\xec\x0c\x93\xa0\xa0\xcf\x54\
+\x02\xdb\xa4\x1d\x58\xf4\x19\xd1\xd2\x1c\x46\x41\x97\x66\x31\xf8\
+\x59\x76\xf7\xec\x69\x97\x32\xa3\xc9\xac\xeb\x4d\xb1\xcf\x65\xe8\
+\x71\x00\x49\xd6\x65\xb4\xbf\x3b\x87\x89\xab\xd9\xb8\x2a\xc5\xac\
+\x4e\x8b\xb8\x99\x4f\x2f\xd3\x68\x35\xad\xc2\x64\xbb\x12\xc0\x31\
+\x16\xe1\x79\xdd\xb0\x99\x12\x87\x0a\x56\xa8\x30\x31\x85\x54\x4f\
+\xc3\xfa\x7b\x2b\xed\xf2\xc4\xc8\x4c\x45\x32\x1e\x73\xf2\x4e\x20\
+\xed\x98\x44\x1d\xbd\xe8\xda\x95\x8d\x13\xf1\x7d\xc7\x56\x46\xcd\
+\x74\x51\x69\x52\x37\x67\x99\xb4\x3d\xbc\xc9\xee\xc1\x26\x7a\xeb\
+\xcb\x73\x50\xa1\xcc\xb6\x96\x2f\xde\xbd\xb7\xdf\xbc\x45\xe8\x4c\
+\x2e\xfc\x5e\x35\xf5\xbf\xc1\x9a\x5e\xe2\xc4\x3f\x65\xb4\xd7\x67\
+\x74\x16\xb2\xb5\x1f\xf0\x68\x7b\x97\xec\xf6\x6d\x1e\x6d\x6d\x13\
+\xee\xff\x2d\xea\x96\xc6\xde\xfd\x3f\x67\xe1\x83\xbf\xe3\x73\x37\
+\x1e\xf3\x33\xff\xf2\x13\xfc\xea\x6f\xfd\x77\xfc\x4f\xff\xe6\x7f\
+\xe7\x67\x7f\xea\xd3\x18\xd6\x1a\x77\x1f\xe9\xdc\x7d\xa4\xe3\x6f\
+\x9f\x48\xa1\xba\xa7\x98\x73\x81\xd8\xce\x67\xae\x8f\xe7\xe1\x03\
+\x40\x4b\x6d\x5e\xa0\xdc\x4a\x96\x02\xb7\x33\x9b\x6a\xfe\x30\xf1\
+\xcd\xf4\x94\xb3\xb6\x2b\x70\xf1\x13\x6e\xca\x66\x4b\x4c\x44\xe7\
+\x6b\xd4\x4f\x9b\xec\xe5\x6d\xc2\xa2\x59\x55\xf2\xc6\x4a\x34\x41\
+\x21\xc0\xc9\x1a\x58\xa6\x58\x38\x5f\x72\xc9\x7a\xa0\x4a\xfe\xb7\
+\xec\xf6\x0d\xe8\xa3\xb4\x9b\x45\x21\xd7\xc7\x60\x71\xd6\xd5\x2b\
+\x68\xb9\xf3\x1d\xbd\xf3\x10\x23\x48\xc5\xd8\xbe\x36\xec\xd3\x5c\
+\xdf\x98\xe3\x89\xab\x85\x5d\x75\xc6\xae\x4a\xd1\x8d\x5c\x85\x8e\
+\x2a\x6c\x00\xc6\xea\x14\xed\x17\xff\xeb\x2f\xff\x8a\x0e\xa8\x89\
+\x82\x9e\x24\xd4\x0c\x71\x22\xd5\x12\x05\x3d\x0a\xd1\x93\x04\xc5\
+\xd5\xd1\x0c\xd0\x93\x18\x8d\x84\x29\x86\xa4\xe5\x94\x22\x1b\xab\
+\x18\xe4\x24\x92\xaa\x8b\xb1\xa8\x25\xb3\xcf\x51\x99\x71\xc5\x96\
+\xa1\x93\x62\x54\x8c\xe0\x22\x62\x55\xc1\x30\x74\x30\x4d\x6c\x1d\
+\x14\xea\xd4\x4d\x9d\x20\xb3\xc8\xb5\x3a\x5e\x36\xe2\x71\xfe\xef\
+\xb8\xba\x92\xe0\x0d\x3b\x1c\xbe\xb1\x8d\x72\xa9\x18\x25\xf2\x32\
+\x3a\x4d\x95\xc3\x3c\xc4\x98\xea\x2c\xaf\xf6\x30\xa6\xfa\x1c\x66\
+\xfe\xcc\x8d\xcf\xd3\x5d\x79\x89\xae\xbd\x44\xbd\x6e\x50\x37\x14\
+\xb2\x85\x36\x76\xb6\xc6\x7e\xf2\x01\x77\xb6\x15\x26\x83\x6d\xa6\
+\x6a\x9d\xfe\x60\x80\x91\x65\xec\xbd\x99\xf3\xc6\x5f\xff\x21\x6a\
+\xf8\x3a\x6b\xa9\x4f\x67\xc1\xe3\xb3\x3f\xb4\xc6\x17\xfe\xe9\x97\
+\x59\x79\xee\x29\x06\x93\x6d\x1e\xef\xe8\x4c\xa3\x13\xe2\x72\xb7\
+\x71\x26\x7e\x66\x3a\x56\x09\xf5\x31\x2d\xb5\xc9\xd8\x8f\xa9\xd5\
+\x04\x3e\x48\xfd\x84\x7a\x2d\xc6\xf7\x35\xac\x9a\x2f\x77\xb4\x69\
+\x0c\xd1\xf5\x36\x75\x37\xa1\x6b\x59\x84\xb9\x8e\x55\xc9\x44\xd9\
+\x24\x91\x1f\x43\x2f\xa1\x55\xac\x9f\x5d\x4d\x14\x8c\xc6\x21\x8e\
+\xd9\x64\xd8\xee\xa3\x9b\x8b\xf8\x9e\x4a\xcf\x88\x51\xce\x7c\x2c\
+\x25\xe1\x99\x4f\xac\xb0\x70\xe3\x32\x2d\xd7\x66\xd5\x5d\xa6\x96\
+\xe5\xc4\x9a\x82\x12\x65\xc5\x32\x4a\xa8\xe5\x35\xd4\x58\xa1\x5e\
+\xc1\xec\xbe\x3a\xa6\x96\x8b\x00\xcc\x8c\x29\x09\x31\x6a\xdc\x25\
+\x1f\x3c\xa6\xd6\x71\x38\xeb\xeb\x9c\xa9\x27\xb4\x8c\x04\xd7\x76\
+\x19\x4d\x5b\x44\xe9\x09\x79\x6a\x52\xaf\x6b\x04\xe9\x04\x63\x9c\
+\x41\x79\x5f\x15\xef\x8d\xa1\xe6\xa4\xa9\x81\x5f\x5f\xe0\xcd\x6f\
+\x7e\x93\xe1\xe8\x84\x49\xbd\xc6\xc2\xd9\x19\x43\xd3\xc2\xd5\x14\
+\xf2\xec\x21\x6b\xaa\xcb\xc6\x33\x9b\xb4\xad\x0e\x51\xae\x12\xe5\
+\x85\x47\x45\x9c\xc9\x8c\xfc\x6b\xff\xe7\x1f\xa1\x0b\x6b\x53\x87\
+\x04\x5f\x98\xc1\x61\x61\x11\xcc\x74\x0b\xa6\x45\x1c\xce\xb2\x68\
+\x35\xb3\x96\xc1\x1a\x57\x38\xd7\x27\x57\xe6\xd6\xdc\x72\x9b\xb0\
+\x92\xad\x6b\xa1\x32\x6f\x08\x57\xb9\x1d\x4c\x32\xd6\xcc\x33\x0e\
+\x22\x91\x05\x1a\x87\x75\x0e\x82\xeb\x5c\xbd\xa2\xf3\xe7\xcf\x7d\
+\x89\x65\x7e\x67\xae\x80\x7b\x76\xbd\xc1\x23\x3f\x99\x7b\xee\xda\
+\xba\xce\x4f\x7e\xfc\x0b\x2c\x2d\xff\x27\x5c\xaa\x5f\x2d\x76\x74\
+\x44\xf2\x0a\xd0\x6f\x4c\x66\x45\xdd\x51\x4a\xef\xf6\xdb\x2c\x6f\
+\x74\x08\xba\x4b\x40\x1f\xbb\xb6\xce\x07\xbf\xb7\xc7\xdf\xd5\xff\
+\x3f\xae\x6f\xbe\x0e\xc0\x47\x3e\xb3\xc6\x27\xd7\x6e\xb1\xf1\x8f\
+\x3f\xc3\x6b\xee\x21\xb7\x4f\x74\xde\x7a\x73\x0b\xc3\x9f\xce\xb1\
+\x0f\x25\xe6\x05\x9b\xb1\x1f\x93\xd8\x21\x2d\xa7\x49\x4a\x8b\xa6\
+\x33\x94\x99\x57\x64\xab\x56\xf1\xae\x74\x8a\x63\xff\x43\xdf\xcf\
+\x72\xa2\xba\xf4\xb5\x98\x36\x2f\x09\xaa\xad\x07\x70\x0f\x75\x22\
+\x0c\x59\x0e\xfd\x14\x9a\xb0\xdc\x8c\x59\x6e\x5f\xe6\xc6\x66\xca\
+\x38\x99\x5c\xd0\xc7\x34\xe2\x0c\xb4\xf3\x97\xed\x1c\x37\x6b\xe0\
+\xa9\xb9\x94\xbd\x8a\x0c\xdd\x07\x57\x11\x8d\x92\xc6\x18\xb5\x1f\
+\x33\xb6\x6c\x8c\x54\xa3\x49\x0f\x34\x87\x51\x01\x21\x12\x54\x90\
+\xf3\x95\x36\x78\xa1\xc8\xca\xde\x94\xc6\xba\x45\x6f\x5f\x70\xd8\
+\x49\xfb\x13\xac\xd6\x1e\xb0\xdd\xee\x4a\x38\xa1\xa8\xd7\x39\xcc\
+\x61\xc2\x31\x70\x4d\xb2\x1a\x1d\x35\x95\x7c\x71\x3f\x2b\xd6\x1d\
+\xa4\x1d\x13\xc2\x14\xbd\xf0\xee\x4d\xa2\x10\xaf\xd2\xc9\xd1\x41\
+\x42\x0c\x2b\x8c\x88\x2d\xeb\x42\x73\xc4\xac\x48\xfa\xce\x5f\x00\
+\x8d\x8a\xb2\x38\x0b\x15\x72\x2b\x90\x01\x3f\xb3\x69\x61\x7e\x2b\
+\x53\xc9\x48\x98\x11\x07\x91\xc9\x42\x9e\x31\x6d\x5d\x63\xaf\xbf\
+\xca\x20\xfb\x0a\xbb\xf7\xbf\xc4\xf2\xc2\xd7\xe7\x0a\xb8\xf2\x76\
+\x6d\x5d\xa7\x15\xfc\xfc\x5c\x97\xaf\x96\x3f\xc5\x7a\x7d\x79\x26\
+\x12\x2a\x30\x77\x33\xea\x73\x82\xc9\x60\xef\x69\xe0\x51\x65\x6a\
+\xb8\x4f\x3c\x8a\x88\x2e\xf5\x78\x6a\xba\xce\x71\xba\xc8\x71\x00\
+\x3b\x77\xf7\x50\x6a\x8b\xfc\x7e\xff\x80\x1f\x68\x6f\xd3\xe8\xde\
+\xa2\xd7\x9a\x70\x39\x5c\x27\x5e\x8d\x78\xf7\xf0\x08\x86\xa2\x62\
+\x6e\x34\x0d\x81\xd7\xba\xcb\x6c\x5c\xb6\x8a\x89\x66\x97\x2c\x39\
+\xa6\xa5\xb5\x80\xd6\x6c\xbe\xc7\x2d\x27\x34\x2c\x7a\x59\x9f\x5e\
+\x56\xdc\x1f\x86\xe0\x96\xcf\x9b\x52\xbd\x56\x8a\xee\x71\x2c\x76\
+\x26\x43\xae\xec\xc0\x6e\x6e\x90\x4f\x4f\x39\xf4\x73\x8e\x07\x42\
+\x73\xac\x3a\x1a\xbd\x6c\x84\xa2\x5e\xe7\xd9\x4f\x6a\xb8\x8b\x9f\
+\x20\x88\x54\xc2\x48\xc1\xcd\x14\xbc\x22\x38\x7d\x03\xdc\xac\x0c\
+\xdc\x2e\xd0\x17\x81\x1b\x08\xad\x76\x29\xa4\x8f\x0a\xd5\x9b\xa2\
+\xb9\x15\xe8\x98\x57\xc4\x43\x8a\xa4\xe6\x02\xb7\x81\x4e\x4e\x80\
+\x8d\x4d\x3a\x5f\xd4\xb9\x35\xe1\x0c\xd4\x12\x05\x7b\x4b\xbf\xc7\
+\xe1\x14\x36\x07\x3d\xb6\xdb\x5d\x09\x2d\x56\x95\x84\x3a\xcb\x73\
+\xf8\xba\xaa\x88\x93\x3c\xb1\xc4\xc3\x61\xb9\xdb\xcd\x22\x26\xc0\
+\x28\xd4\xfe\xfd\x0a\xbd\x16\x5a\x79\x91\x27\xac\x8b\x58\xf7\x5c\
+\xe6\x45\x1a\x70\xcf\xa8\x38\xd5\xca\x49\x8b\x6c\x3f\x1b\x37\x14\
+\x5b\x4a\xcb\x5d\xce\x16\x30\x54\x72\x3a\x39\x1c\x44\x26\x6d\xa3\
+\x41\x3f\xde\x23\xed\x9f\xd1\x79\x76\x8b\x6f\xfe\xfb\x5b\xc0\x7d\
+\xd8\xb9\xf5\xa1\x3f\xff\x6a\x7d\x13\x96\xf7\x99\x2a\x2f\x73\xb0\
+\x7d\x9d\xcb\x9b\x2f\x17\xeb\xc8\x84\x6b\x8c\x19\xaa\x58\x56\x46\
+\x88\x45\x3b\xe8\xd3\xd2\xef\xd1\x2b\xc4\xef\xdd\xd6\xec\x77\x0b\
+\x8e\x2c\x76\xd4\x90\x5e\x76\x57\x9c\x14\x2b\x21\xad\x74\x91\xe5\
+\xe9\x1e\xaf\xeb\x21\xda\xc0\xe0\x8a\xb9\xcf\x6e\xb4\x3e\x87\x83\
+\xc7\xea\x94\x06\x06\x5a\x73\x80\x9b\xb7\x00\x4b\x4e\x63\x64\xfe\
+\x06\xe4\x23\x32\xa5\x89\x8a\x06\x6e\x5f\x06\xf0\xe9\xc8\x60\xb1\
+\x09\xbd\x61\x48\xcf\x35\xc1\x0d\x81\x0e\xbd\x61\xbf\xb8\x2f\xfc\
+\x28\x4a\xac\xbc\x73\x10\x62\x34\x4d\x0e\xfd\x81\xb4\xae\x3a\x1d\
+\x19\xa8\xce\xa8\xe0\x89\xfa\xe0\xc1\x83\xef\x7f\x8b\xef\xbf\x96\
+\xb3\xfe\xdc\x2a\xa1\x16\xe1\x45\x0a\x0e\x2e\x69\x60\x11\xdb\x01\
+\x35\xb3\x26\x0b\xd2\x5e\x69\x09\x30\x84\x86\x65\x62\x4e\x8b\xeb\
+\xa4\x9a\x42\xa4\xc9\x29\x0e\x80\x78\x1c\xa2\x07\x11\x8d\xc5\x18\
+\xa8\x31\xa2\x4b\x93\x1e\x8a\xe6\x62\x07\x82\x6e\x0b\x52\xe4\x5e\
+\xbb\x32\x0b\xe3\xd6\x04\xbb\x30\xec\x33\x5c\xd0\x61\x4f\x04\x6d\
+\x99\x89\x6b\x8f\x4f\x99\x5e\x5a\x64\xd8\xaa\xcb\x4c\x0c\x42\x04\
+\xe4\x5d\x18\x58\x05\x3d\x2e\x38\x62\x2a\x05\x9d\x4b\xe1\xda\x13\
+\x2a\xd2\x97\xb8\xea\x00\x64\x86\x11\x69\x31\xce\x54\xce\xdc\x95\
+\xa3\x97\xd5\xcc\x6b\x5e\x10\xd2\x17\x99\xbb\x42\xbd\x95\x59\x58\
+\x2c\x83\x34\x2f\x64\xe2\x49\x98\xd1\xa1\xc5\x59\x32\xa0\x71\x78\
+\x51\xee\x57\x7a\x50\x7c\xec\xc5\x7b\xb3\xe6\xc6\xf2\x3e\xba\xfa\
+\x1c\x64\x70\xf5\x0a\xe8\xfb\xc7\xec\x2c\x42\x27\x6b\x62\x60\x13\
+\x11\x11\x45\x30\x3a\x13\xfb\x9a\xcb\xc2\x62\xb9\x0d\xc7\x03\x53\
+\x8e\xfe\xe0\x85\xf4\xdc\x70\x2e\xa8\x03\xee\x32\x5c\x09\x79\xf6\
+\xbe\xc1\x6e\xbe\x8b\xb8\x0e\xec\x72\xa4\x39\x28\x99\x37\x33\x27\
+\x18\x29\x33\xff\x5b\x99\x41\x2d\x7a\x4e\xa9\x81\x1d\x81\x27\x5a\
+\xc9\xbd\x61\x48\x8f\x10\xd5\x0d\x39\x1d\x35\x51\xdd\x10\xbc\x7e\
+\x91\xa9\xfb\x32\x53\x0b\xa8\xd1\xa7\x97\xcd\x8a\xbe\xe3\x81\x08\
+\xd4\x4c\x69\x16\xe3\xff\x5a\x45\x38\xdf\xa1\xdb\x8a\xd8\x39\x08\
+\xf9\xf3\xbf\xf9\x36\x3f\x6a\x5e\xe5\xfa\x3f\x5a\x27\x39\x55\x21\
+\x4c\x50\xcc\x84\x1a\x35\x99\x60\xb2\x50\x41\x35\x2d\xb2\x28\xa4\
+\x99\x29\xa4\xc0\x59\x18\xd0\xb0\x4c\xb4\xb3\x29\x69\x23\x23\xee\
+\x87\x0c\x06\x43\x74\xdb\x22\x09\x42\x74\x3b\x11\x41\xab\x19\x40\
+\x4f\x76\xf8\x02\x3b\xc7\xf6\xa6\x42\x5e\x6f\xe7\xd8\x81\x22\x8a\
+\x3f\xb7\x2e\xf6\xdc\xad\x2b\x0c\x4e\x12\x5a\x67\x09\x3b\xa7\x1e\
+\x87\x8b\xae\xcc\xc4\xab\x97\x16\x39\x9c\x66\x7c\x62\x28\x32\x71\
+\xd9\xae\xee\x67\x1a\x64\x33\x83\x96\x8e\x9a\x8a\x41\x51\xbd\x17\
+\x93\x48\x6d\xc4\x19\x16\x0b\xf8\x76\x42\xde\x13\x15\xb4\x62\xb7\
+\x30\x80\x04\xd0\x7b\x3a\xd8\x7d\x30\xad\x8a\x34\x33\x42\x43\x41\
+\xa1\x47\x8e\x2d\x7c\x2b\xe4\x88\x87\x78\x2d\xaa\x9c\x24\x5a\xa8\
+\x88\x0d\x9e\xf9\x03\x31\xbb\x67\xad\x41\xa8\x14\x1c\x74\x3e\x6f\
+\xce\x9d\x2e\xa0\xe1\x61\x53\xc3\xd4\x23\xf4\xd6\x97\xf9\xa8\xf1\
+\x87\xbc\xfb\x5e\x4c\x76\x6b\x85\x5b\x9f\xbb\x83\xe5\xd7\x65\x20\
+\x03\x12\x4a\x04\xf9\x1f\xf0\xb5\xdb\xaf\x70\x6d\x5d\xe7\x36\xd0\
+\x7a\xf8\xf3\x5c\xbd\xa2\x73\xeb\xca\x75\xe2\xa8\x83\x12\x29\x1c\
+\x1f\x1c\xb2\x35\xd9\xa6\x3f\xd1\x67\x01\x51\x09\x96\x7e\x43\x81\
+\x0c\xd4\xd1\x80\x56\xbb\x45\x3f\x53\xe8\xa8\x39\xc1\x3d\x8b\xbf\
+\x56\x4c\x5c\x67\xa6\x9e\xf3\xfd\x90\x3c\xc9\x19\xfb\x31\x8d\xac\
+\x86\xd6\x14\x13\x25\xc3\x74\x48\xcb\x6b\x51\xb2\x6c\xc2\x33\xad\
+\xf4\x93\x80\x5e\x16\x16\x41\xda\x11\x01\xab\xcc\x9a\x1c\xaa\x37\
+\x2a\x68\xb6\xd2\x87\xa2\x2f\x7f\xb7\xed\x91\xd0\x1a\x7b\x8a\x09\
+\x0a\xb8\x8e\x46\x5c\x06\xa4\x53\x99\x84\x2e\x9d\x84\x0e\x42\xee\
+\xbe\xf2\x75\x5e\xfc\xe4\x2f\xf2\xec\xb3\x26\x7b\x87\x42\x28\x5f\
+\x62\x5d\x5f\x1d\x93\x9b\xf6\x1c\xb4\xd3\x81\xba\x69\x15\xd0\xc3\
+\x42\x07\x14\x26\xb4\x25\xdd\x53\xa3\xd3\xe9\x08\x3e\xd9\x9b\xca\
+\x00\x1e\xa1\x08\x28\x61\xe7\x42\xce\x99\x4e\x44\x16\x4e\x27\x82\
+\xb9\xb0\x61\x95\x7a\x11\x55\xf3\x98\x18\xa0\xf6\xf8\x14\xda\x5d\
+\x69\xb2\xdd\x51\x53\x19\xc8\xe5\xfd\xea\x94\x88\xf6\x5f\xfc\xf4\
+\x8f\xfc\x4a\x42\x88\x81\x4d\x42\x48\x42\x08\xf1\x04\x8b\x05\x01\
+\x29\x8c\x0c\x35\xd0\x89\xe3\x3e\x06\x36\xaa\x91\xe1\x27\x09\xd3\
+\x24\xa1\x96\x24\x78\x7a\x4c\x8e\x41\x14\x25\x4c\xf4\x98\x29\x31\
+\x71\x94\x00\x06\x89\xfc\x35\x21\x4b\x14\xb2\x44\x41\xb1\x72\x32\
+\x0c\xe2\xe4\x4d\x3e\xd8\xff\x36\x0b\xcd\x65\x74\xe3\x92\x1c\x63\
+\xb2\x30\x88\x8d\x9c\x3a\x53\xb4\x54\xc1\xa6\x46\x6a\x66\x4c\x26\
+\x3e\x63\xe5\x1b\xdc\x7b\xfb\x98\x93\x93\x4c\xec\x55\xde\xb9\x44\
+\xf3\xd6\x21\x9f\xfb\xd8\x98\xab\xfa\xbf\xe0\xa5\xa7\x7f\x90\xcd\
+\xa7\x9f\x26\x0d\x56\x89\xf9\x80\x7b\x47\x5b\x0c\xbc\x8c\xc3\x3c\
+\x64\x2f\x7b\x83\x3b\xfd\xef\xb0\xa8\x83\x37\x9e\xd2\x4e\x1b\x0c\
+\xec\x2d\xfa\xdf\x07\x6d\x1a\x31\x6d\xa7\xc4\x6c\x31\xad\x5f\x47\
+\x09\x85\x88\x3d\x19\x9b\xb4\xea\x09\x66\x6c\xc2\x14\xa6\xd1\x90\
+\x49\x34\x21\x74\x2d\xd2\x30\x91\x8f\x83\xc8\x44\x53\x75\xb2\x2c\
+\x21\x9e\x66\xc4\x4a\x4a\xbd\x36\x2b\x77\x4d\xd5\x24\xac\x25\x58\
+\x8a\x81\xd1\x34\x71\x4c\xa8\x4f\x15\xc2\x5a\x42\x57\xb5\x08\x73\
+\xb7\xc8\xb8\x1d\x16\xcc\x29\xe1\x28\x41\x71\x6d\xb2\xb8\x86\x52\
+\x1b\x02\x1d\xfc\xe9\x84\xfa\x24\xa1\x6f\x4c\x48\xc6\x85\xb6\x42\
+\xb1\xa9\xa1\x11\xda\x01\xc9\x38\x27\xd7\x03\x42\xc5\xc0\x3a\x57\
+\x2a\x8b\xe9\x14\x97\xb7\xb6\x1f\x92\x3c\x7a\xc4\xf2\xd3\x4b\x58\
+\x96\x42\x10\x66\xc4\x7e\xc8\xd4\xc8\x69\xc4\x19\x5a\xc3\xc0\x0c\
+\xc7\xd4\x95\x3a\x53\x45\x4c\x87\x5b\x53\xc1\x17\x5b\x53\x15\xcd\
+\xca\x31\xb3\x4b\x58\x16\x58\x96\x85\x65\x59\x34\xc9\x31\x62\x85\
+\xc0\xce\x71\xe2\x99\xd6\xc2\x88\x15\x62\x03\x8c\x71\x46\x6c\x40\
+\x9c\xa7\xd8\x81\x78\x0e\x6c\x54\x4b\x25\x1f\x2b\xdc\x79\xff\xfb\
+\x78\x8f\xdf\x66\x52\xaf\xb1\x39\xe8\x31\x34\x2d\x86\xa6\xc5\x8a\
+\xbe\xc5\xd2\xd4\x61\xe3\x99\x4d\x14\x12\xf2\x22\x60\xa3\x5c\xa5\
+\xa3\xa6\x44\xb9\x4a\x96\x25\xfc\xd6\x57\xfe\x10\xd5\x62\x01\xd7\
+\x6e\x11\xd9\x09\xae\xdd\x62\x59\xe9\xe0\xda\x2d\x74\x3b\x41\xb7\
+\x13\xc1\x5c\x74\x0d\xc2\x5c\x7c\x0e\xa6\x45\x6e\xe6\x58\x1d\x13\
+\xc5\xcc\x31\x8a\x49\x00\xdd\xb4\x30\xb0\x31\xb0\xd1\xcd\x99\xfa\
+\x21\x89\x42\x4c\xc0\x8c\x42\xcc\x28\x44\x09\xed\x19\x9e\x4e\x5f\
+\xe3\xde\xce\xc3\x62\x0a\x44\x29\x67\x92\x69\x84\x2a\x2a\x4d\x6c\
+\x12\xd2\xa2\x7d\xed\x98\x1d\xf6\x5f\xbf\xc9\xfe\xc1\x4c\x20\x74\
+\xeb\x73\x77\x24\x0b\xf1\xc2\xa7\x9e\xe1\xd6\xe6\x3f\xe1\x52\xfd\
+\x2a\x97\xd5\x29\x07\xdb\xd7\xe7\xba\x75\x96\x5f\xc7\xf2\xeb\x7c\
+\xed\xad\x57\xf8\xc3\xdb\xff\x96\xbb\xe9\x9f\xb2\xb5\x93\x30\x3e\
+\xf5\x78\x3c\x78\xcc\xe9\xe1\xeb\xb4\x94\x17\x58\xab\x59\x2c\xb7\
+\x3b\xe4\x0b\x1b\x73\xe3\x45\xa5\x26\x42\xd5\x97\xe9\x8c\x73\x94\
+\xa6\x42\x4b\x6b\x15\x45\x1a\x9c\xa4\x21\x03\x25\x27\x76\x75\x9a\
+\xce\x6c\xec\xa0\x7c\xfd\x82\x92\xae\x69\xce\x15\x6c\x42\x1f\xd1\
+\xa7\x37\x0c\xe5\x7d\x31\xf2\xd4\x14\xe3\xfa\x45\xd6\xed\x8c\x73\
+\xc9\x4b\xcf\xae\x3e\xae\x3c\xb6\xfd\xf3\x56\x58\x45\x07\xb1\x3b\
+\xa5\xdb\xbc\xc1\xab\x8f\x8e\xf8\xcb\x5f\xfd\x0e\x4d\x7f\x97\x56\
+\xc3\x43\x35\x81\x48\xc3\x37\x1c\xa2\xc1\x94\xb1\xa1\x12\xa8\xa7\
+\xb8\x99\x82\xe6\x09\x51\x8f\xe6\x8d\x69\x92\x17\x8f\xfb\x52\xe9\
+\x56\xc2\x06\x79\xe5\xb4\x73\x9a\xe4\x0c\x0b\xab\x5a\x5b\xab\xcb\
+\x6c\x6c\x07\x8a\xe4\x8b\xed\x20\x84\x20\x61\x90\xcc\xff\x9e\xdb\
+\xed\x2e\x4a\x20\xda\xcf\x47\x89\x18\x78\x9d\x70\x4c\xab\xf4\x7e\
+\xf6\xa6\xe8\xba\x45\x3f\xd3\xe6\x70\xb1\xaa\xdb\x09\x3e\x60\x06\
+\xe2\x1f\xde\xb3\xc4\x6e\x0d\x1f\xc4\x0a\x00\x53\x00\x7a\xbb\x31\
+\x73\xc1\xb4\x2d\x21\xa0\x4f\x2c\x6b\x0e\xc5\x1a\x56\x8e\x61\xe5\
+\x98\xc5\xe5\xc8\xb4\x4c\x9c\x4e\x47\xf8\xfe\x9a\x16\xe0\xa2\x12\
+\x12\x84\x21\x77\xf3\xff\x55\xd0\x43\xca\x5d\xe2\xfc\xa0\x70\xf0\
+\x11\x05\x9e\x6e\xe6\x4c\xa3\x79\x83\xef\x99\xf1\x21\x64\xb7\x56\
+\xf8\xd8\x8b\xf7\x64\x60\x86\xce\x84\xdb\xdf\x79\x9f\xa4\x7f\x80\
+\xe7\x05\x6c\xed\x07\x24\xc3\xdf\xbb\x80\xa1\xab\x0d\x90\xaf\xbd\
+\xf5\x0a\xca\xde\x1b\x38\xcf\x37\xb8\xfe\xf2\x35\x3e\x7e\xeb\x9f\
+\x61\xac\xcc\x3b\xb2\x8b\x4b\x79\x87\x7e\x43\xa1\xad\x37\x51\xf5\
+\x65\x31\xc8\xa9\x98\x74\xd4\x1c\x4f\x99\x0d\x78\xb6\x73\x45\x52\
+\x6b\x23\xdf\x96\xcd\x8b\x52\x99\x86\x27\xa0\x83\xf4\x10\x2e\x9c\
+\xe0\x05\xb6\xed\xc8\x21\xd0\x4c\x69\xa2\xe6\x23\x7a\x03\x71\xe2\
+\xa8\xf9\x88\x38\x11\x3f\xb3\x2a\xcb\x1c\x33\x65\xcc\x14\x35\x1f\
+\x49\x51\x7e\xf5\xb9\x6a\x20\x1b\xad\xde\x9c\x1b\xfd\x9f\xbf\xfb\
+\x36\xbf\xf3\x17\xc7\x4c\xb3\x45\xda\xed\x36\x0d\x2d\x46\x89\x26\
+\xe4\x66\x9d\x1c\x1b\x3b\x5b\xc4\x57\xc7\x28\x9a\x2b\x8f\x23\x14\
+\x52\xb7\x41\x93\x99\xfa\x6d\x54\x42\xc5\x73\xc3\xa7\x33\x9e\x6e\
+\x3a\xd7\xfc\x28\x1b\x22\x81\x7d\x8e\xe2\x5b\x9c\xb1\x1d\x57\xa6\
+\x16\x87\xd3\x4c\x52\x6d\x25\x3b\x51\x16\x86\x25\x4b\x51\x1e\xc7\
+\xea\x14\xd5\x9f\xfb\x25\x74\x12\x7c\x72\x33\x27\xd4\x45\x00\xf8\
+\x51\x48\x82\x2f\x46\x7e\x0a\x86\x22\x0e\x15\x6a\x85\x68\xc7\x8f\
+\x42\x92\xa2\xfb\x53\x32\x1c\x51\x18\x11\x59\xa6\x38\x16\x18\xcb\
+\x04\x22\x33\x11\x8f\xf5\x37\x61\xbf\x25\xb3\x71\x9c\x6c\x31\xee\
+\x4f\xe4\x40\x7d\x52\x14\x7d\x7e\xb9\xfe\xd4\x6e\xa0\x16\x93\xd5\
+\xed\xa5\xcb\x7c\xfe\x7a\x3e\x17\x94\x65\xa7\xee\xfb\xde\x57\x85\
+\xca\x6d\xb2\xcd\x9d\x6c\xcc\x9d\x6c\x4c\xe8\x4c\xe4\xeb\xe5\xb1\
+\xfc\xba\x37\x1b\x62\x82\xe3\xea\x15\x9d\x5b\x2f\x7d\x94\xab\x1f\
+\x79\x99\xeb\x2f\x5f\x63\xf3\x4a\x87\xfe\xd9\x90\x87\xc3\x1e\xbb\
+\x7b\x8f\xd1\x83\x3a\x63\xa6\x85\x7d\x54\x73\x6e\xa0\xb3\x1a\x58\
+\x4f\x52\xa8\xa5\xb4\x64\xa0\xe3\x09\xe6\xe1\x78\xd0\xe7\xd4\x3b\
+\xe1\x74\x64\x14\xde\x14\x21\x78\x30\x48\x46\x0c\x92\x11\x0f\xb3\
+\xfc\xc2\x15\xa0\xbc\x2a\x9c\x0f\xe6\xf3\x8f\xdd\x3c\x92\xc1\x5f\
+\x1a\x15\x1e\x0f\x90\x8b\x69\xc8\xd7\x20\x5f\xe3\x4f\xff\xe0\x2f\
+\xf9\xf6\x6f\xfc\x11\xb6\x3f\xa4\xbe\x64\xe1\xe8\xc7\x4c\x10\xb3\
+\x86\x83\xa4\x89\x93\x35\xf0\xd5\x31\x4e\xd6\x98\x1b\xfc\x2c\xb3\
+\xac\xd0\x2f\xcc\xe4\x9a\xe5\xe3\x11\x0a\x0b\x43\x45\x66\x66\x91\
+\x79\x95\x0b\x5d\xbb\xb9\x04\x55\x14\xd6\xe3\x53\x4f\x66\xe3\xa3\
+\xc1\xae\x7c\x7d\x58\x9a\x2f\x16\x27\x85\xcc\xc2\xde\x54\x2c\x63\
+\x0c\xc6\x88\x2c\x6b\x27\x24\x81\x4e\x30\x86\xa6\x69\x63\x14\x57\
+\xe2\x50\xaf\xe3\xea\x2a\x5e\x92\x15\x60\xdf\x2d\xce\x79\x11\xbc\
+\x66\xa0\x13\xd9\x09\x49\x14\xe2\x98\x56\x31\x32\x1f\xcd\xfc\xa5\
+\x8a\x63\x64\x99\x85\xdc\x33\xb8\xf0\x47\x6c\x1d\x64\x3c\xbb\x19\
+\x10\x16\xd6\x54\x94\x36\x01\x66\x0e\x4a\x80\xe7\x5b\x50\x04\xf1\
+\xe6\x95\x0e\x3f\xf2\x85\x7f\x0e\xc0\x77\x1f\xff\xb7\xf4\xf7\xaf\
+\xd2\x79\x76\x0b\x02\x38\xd8\xbe\xce\xd5\xba\x28\xa8\xfc\x37\x5f\
+\xc2\x79\xf1\xdb\x32\x70\xcb\xe0\x2d\xb3\x77\xf9\x58\xd9\x7b\x03\
+\xae\xbc\xc4\xfd\xad\xdb\x5c\xcf\xea\xa8\xd7\x5f\xe0\xea\x15\x9d\
+\x1f\xf9\xd1\x7f\xcc\x2b\xaf\xbe\xc9\xd6\xdd\x0f\xe8\x9f\x0d\x45\
+\x23\x23\x19\x61\xf8\x17\xf9\xec\xb1\x1f\xd3\x70\x0c\x19\xc0\x0d\
+\xc7\x28\xda\xcd\x23\x5a\x6a\x53\xe8\x90\x2b\x6a\x35\x06\x14\x9c\
+\x0f\xc5\xfd\x99\xe6\xe2\xc3\x4e\x88\x32\x98\xcf\x4f\x90\x9c\x1f\
+\x7d\xea\x8d\x14\x68\x0a\x49\xa8\xa1\x97\xde\x6e\xa5\x21\xcc\x10\
+\x9a\x33\xac\xfe\xd5\x6f\x7c\x93\xb3\xe3\x01\x3f\xfc\x4f\x3b\x74\
+\x9f\xf9\x0c\xab\x78\x0c\xc7\xa0\xd5\xce\xf0\x58\x40\x89\x34\xa8\
+\x95\xfc\xb1\x22\x8e\xb8\xe4\xc5\xef\x2e\x82\x37\x9f\x0d\x96\xda\
+\x19\xcd\x00\xce\x5a\xb9\x54\x8b\x88\x39\xbd\x69\x25\x0b\xe7\xd8\
+\x41\x48\xa2\xa5\xe8\x5e\xc6\x43\xcf\x94\x9d\x5b\xc7\x1e\x41\x30\
+\x62\xa5\xbd\x51\xb4\x9f\x45\xcc\x65\xf5\x15\x49\xcd\x05\xa9\x26\
+\x1c\x86\x0a\x0f\xa3\xb1\x1f\xa3\xdb\x0d\x70\xcd\x9c\xb8\x67\x10\
+\x72\x46\x57\x59\x90\xdf\x34\x02\x5c\xbd\xe8\xa3\xbb\xe5\x1b\xea\
+\x4b\x52\x7b\xd6\x53\xf7\x67\x9a\x89\x32\x78\x2d\xb3\xb0\x29\x2c\
+\xec\x0a\x8b\xe7\x13\xcb\xe2\xe1\xce\x07\x73\x63\x43\xcf\x2c\xdd\
+\x25\x08\x3f\xc9\x25\x6b\x26\xfe\x91\xbb\xed\x2c\x18\x26\x6f\xb1\
+\x3f\xed\xb1\xe7\xef\x73\xd9\x59\xe7\xda\x62\x39\x46\xff\xbf\xc0\
+\x25\x48\xb2\x77\x79\xe5\x9b\xdf\xe0\x70\xfd\x5d\x86\x76\x03\x6f\
+\xef\xe7\xd8\xbc\xd2\xe1\xf4\x4e\x97\xe8\xa5\x43\x09\x39\x9e\x14\
+\xd0\xb1\xfb\x00\x78\x89\x9b\x57\x5f\x20\xc9\xde\x25\xcb\xde\x85\
+\xe3\x75\x92\xe5\x77\x79\xf9\xc6\x35\x2e\x5f\x56\xd9\xbd\x7f\x48\
+\x7c\x24\x9a\x19\x49\xe6\x49\xdf\x88\x93\x34\x04\x05\xda\xce\xfc\
+\xf8\xd5\x30\x1b\xc9\x8e\x9d\x10\xf9\x58\x45\x70\xb7\x24\x7b\x41\
+\xa1\xc0\x2a\x4f\x80\xea\x11\x57\xa7\x9d\x2b\x4f\xcc\xec\xd5\x00\
+\xd7\x18\x72\xa6\x34\xe7\x3f\xa7\x99\xc3\x48\x41\x6b\x0e\x88\x93\
+\x52\x70\x2f\xe6\xf8\x1a\xd4\x0a\x1e\x59\xa3\xab\x46\xdc\xdf\x8a\
+\xe8\x0d\x5f\xe7\xde\x5e\xc2\x33\x5f\xac\xf1\x23\xff\x68\x93\x56\
+\x0b\x86\x63\x17\x8d\x33\x2c\xad\x4e\x62\xd7\xc4\x30\x69\xa1\xb3\
+\xa0\x36\x7f\x12\x6b\xca\x18\xdd\x6e\x08\xc1\x50\xa0\x32\x2c\x34\
+\xc8\xb4\xcb\xc0\x16\x6c\x84\x1d\x08\xf8\xd1\x0c\x20\xb0\x2d\x6c\
+\x52\x12\xb7\xc1\x75\x37\x62\x67\x20\x78\xe2\xfb\xa7\x4d\x21\x06\
+\x7a\x7c\x8a\x52\x0b\x19\x5e\xba\x4a\xdb\x74\x60\x72\x44\xe6\xae\
+\xcc\x0d\xa3\x06\xe9\x84\xc0\xb6\x05\x13\xf4\x4b\x3f\xfb\xcf\x7e\
+\xc5\x1b\x8d\x04\x2b\x01\x18\xd8\x04\xca\x94\x2c\x31\x41\xcf\x25\
+\x84\xb0\x42\x85\x28\xca\x69\x64\x6a\x05\x50\x1b\x98\x7a\x4e\x4d\
+\x37\x98\x26\x09\x59\x92\xa0\xea\x86\x50\xc1\x85\x29\x86\x21\x9a\
+\x22\x13\x1c\x8c\x24\x2e\x06\x46\xa1\x37\x18\x93\xe6\x6f\x89\x81\
+\x46\x4b\x01\xf5\x0a\x0b\x8d\x8f\xa2\x1a\x16\x49\x92\x60\xe8\x3a\
+\x09\x70\x12\xbe\xcb\x69\xff\x5b\xbc\x7b\xff\x1b\x7c\xf0\xad\xaf\
+\xd2\x7f\xb8\x4c\xf7\xd9\x36\x37\x6e\x3c\x83\xe9\x3a\x2c\x2d\x98\
+\xb8\x8d\x26\x23\xcf\xe2\x7b\xfd\xaf\x62\x4c\x75\x06\x5e\x46\x50\
+\x7b\x0b\x3b\xbc\x45\xbd\x13\xe2\x7a\x97\x88\xcc\x99\x96\xa2\xd3\
+\x54\xe9\x34\x55\x96\xcc\x1a\x9d\xa6\xca\xdd\xd1\x84\xa3\xbb\x43\
+\xf2\xbd\x3b\x74\xd3\x4d\x9e\x6e\xe7\x9c\x3a\x1e\x5b\x3b\x09\xc3\
+\xed\xbf\x62\xab\x77\x9f\xcd\xeb\xcf\xd3\x55\x1f\x60\x2d\x5d\xa1\
+\x33\x99\x72\x96\x4d\x38\x8b\x62\xda\xb9\x82\x89\x08\xb6\xd4\x4f\
+\xa4\x3e\xc2\x54\xea\x4c\xf2\x09\x93\x7c\x82\x1e\x58\x24\x76\x88\
+\x1a\x1b\xc4\x85\xb8\x25\x6c\xf8\xa4\x89\x3a\x7b\xac\x8f\x51\x63\
+\x83\x5a\xa4\x13\x34\x0b\x48\xa6\x5c\xd4\x1e\x0f\xb3\x11\xa6\x52\
+\xc7\x44\x61\x98\x8d\xa8\x29\x2d\xf9\xf3\x4d\x14\xc1\x4d\xd7\x41\
+\xab\x0f\x49\x47\x6d\xa8\x43\x98\x8b\x40\x9e\x2a\x3a\x35\x34\xd4\
+\x7c\x04\x75\x8b\x4b\x2f\xbd\xc4\xca\xd2\x06\x7b\x3d\x9b\x93\x41\
+\xcc\x3b\x6f\xbd\xcd\x69\x3f\xc2\xe8\x8f\x68\x99\x1a\x8e\x69\xa0\
+\x28\x21\xea\x74\x04\xf9\x90\x3c\xd3\xa8\xa9\x19\xe4\x53\x5a\xb6\
+\xcb\x24\x9f\x42\x3e\x45\x49\x5c\xb2\x58\x21\x4f\x3d\x0c\xc7\xc0\
+\x4d\xeb\x4c\xa2\x29\x13\x23\x46\x51\xeb\xa8\x46\x2e\x33\xb0\x13\
+\x97\x9c\x71\x82\xde\x70\xe8\x07\xf0\x17\x6f\xec\xa2\x46\x87\x4c\
+\xea\x35\xe2\x60\x4a\x9d\x53\x06\xee\x32\x18\x4d\xae\x25\x09\x4b\
+\xb7\x56\xc9\xda\x4b\xe8\xc3\x9c\xd8\x00\x3b\x48\x08\xf4\x1a\xb6\
+\xa6\x62\xa8\x39\x5f\xf9\x77\xff\x2f\xba\x17\x0c\x99\x9c\x4e\xa5\
+\x97\x6f\x54\x92\x62\x66\x4a\x68\xe5\x24\x5e\x8e\x8e\x82\x97\x64\
+\xb8\xba\x2a\xf1\x6f\x5e\x30\x13\x11\x08\x88\x50\x39\x41\xad\x0a\
+\x87\x1c\xa3\x80\xe5\x63\x58\x14\x13\xd5\x17\x95\x59\xef\x9f\xbc\
+\xca\xd3\xee\xcf\x90\x5a\x42\x5f\x11\x02\x51\xf8\xee\xdc\xb8\xfd\
+\x9d\x2c\xc6\x9f\x86\xdc\xd2\x6f\x48\xfd\x43\x84\x82\x69\x9a\x34\
+\x2e\x4d\xf9\x78\xe7\x17\xf8\x56\xfc\xab\x32\xdb\xa6\xfa\x3d\xb4\
+\xe4\x16\xa9\x2e\xbc\x8c\x3b\xcf\x6e\xc9\x51\xa6\x6a\x46\x6e\x0f\
+\x6f\x72\xe9\x6c\x83\xef\x05\xb7\xf9\x93\xd7\xfe\x84\xf5\xb5\x80\
+\xc5\xd5\x4f\xf3\x03\xed\x98\x23\xfd\x53\x90\xbc\x22\x26\x45\x10\
+\xf2\x82\xfa\xb5\x0d\x9e\xbf\x15\xb1\xf7\x70\x91\xc1\xc9\x9e\xc8\
+\xca\x5e\x42\xec\xea\x0c\xd3\xd1\xb9\xa9\x67\x6b\xee\x98\xd8\x21\
+\x7a\x60\xc9\xc0\xae\xbe\x06\x30\x74\x86\x18\x9e\x55\x29\xde\x90\
+\x5f\xd7\x52\x9b\xe8\x81\xc5\xc0\x15\x42\xfb\x96\x2a\xb2\x3a\x88\
+\x2b\xc1\xd8\x8f\x69\x34\xcb\x8c\xde\x82\x66\x8e\x36\xe8\xd3\x5a\
+\xe8\xe0\x29\xa6\xf0\xc1\xf0\x22\x70\xe1\xb3\x9f\xdc\xe0\xa7\xff\
+\xf9\x17\x59\x59\xb9\xce\xeb\x6f\xbc\xc7\xb7\xbf\xf5\x1d\xd9\xe6\
+\x3d\x8a\x1e\xb1\xb6\xb7\x44\x6d\x51\x9c\x60\xf5\xfe\x25\xbc\xf4\
+\x14\xb7\xd8\x9b\x93\xe7\x5d\x89\x8b\xe7\xa6\x43\x4a\xec\x5b\x8e\
+\x3c\x15\x18\x39\x28\x47\x9c\x02\x24\x7f\xfc\x61\x37\xa7\xd8\x99\
+\xbd\x39\xe8\xb1\x53\x0b\x69\x5c\x11\x23\x57\xb6\x3f\xc4\xb7\x3b\
+\x12\x9a\x88\x4c\x2c\x06\x52\xc7\x7e\x8c\x6e\xb1\x00\x8b\x67\x34\
+\xbb\x39\x61\x41\x97\xc5\x04\x8c\x73\x0b\x95\x00\xdd\x55\xc8\x02\
+\x1b\x57\x9f\x15\x70\x12\x87\x15\xf8\xb6\xa4\xd9\xb0\x4c\xe2\xb0\
+\x87\x81\x2d\xb3\x77\x39\x64\x12\x87\x63\xa9\xac\xb8\xba\xa6\x72\
+\x77\x6f\x5e\xe7\xfb\x68\xf4\x06\xcf\x76\x5e\x16\xd6\x53\x51\x9f\
+\xbd\x9d\x87\x90\xbd\x26\xa7\x94\xf3\x3b\x5d\x1a\xc6\x5d\x36\xb4\
+\x44\x2e\x89\x29\x27\x4a\x26\xd6\x75\xae\x5e\xb9\xc7\x5b\xb7\x67\
+\xc1\x39\x68\xdd\xa7\x3d\x84\x6c\x6f\x83\x61\x7e\x1b\x10\x94\xcd\
+\x0f\x76\x0e\x41\x05\xbd\xf5\x65\x76\xef\x1f\xb2\xbd\xd3\x67\xff\
+\xec\x84\x7c\xe1\x29\xda\x4b\x00\x77\x39\x3d\x7c\x9d\xdf\x7f\xd3\
+\xc2\x5e\xf9\x1e\x4f\xdb\x2f\xf0\x78\x61\x97\x6b\xba\xcd\x23\x66\
+\x3a\x8d\x95\xd4\x47\x51\x73\xfa\x4d\x85\x58\xd1\x31\xbc\x84\xc4\
+\x9e\x0f\xe0\x32\x68\xcf\x07\x75\xf9\x7c\x62\x87\x44\xc9\x18\x33\
+\x98\x15\x4f\xcd\xc4\x67\x54\x70\xa2\x0d\xc7\x60\x98\x8d\xe8\xaa\
+\x39\xbd\x6c\x44\xcb\x69\x42\x2e\xd8\x8f\xc4\x1e\xd1\x75\x72\xc9\
+\x86\x94\x9f\xab\x63\x49\xec\xad\x2e\xae\x42\x51\x10\xf6\x06\x70\
+\xb3\x6b\xb1\x79\x75\x83\x9b\x57\x63\x56\xf3\x57\xb9\xd4\x35\xf9\
+\xe9\xff\xfc\x26\x2f\xbd\x20\xae\x20\x4d\x7f\x97\x83\xf4\x29\x9c\
+\xf8\x21\xf5\x7e\x8d\xc3\xd4\x66\x3a\x7d\x8d\xc9\xe3\x65\x98\x7e\
+\x1f\xd7\xfa\x2c\x63\x77\x42\x23\x10\x70\x28\x77\xbd\xb9\x40\x3e\
+\x98\x9e\xd2\xd0\xea\x2c\x0c\x15\xce\x5a\xa2\xc8\x23\x50\xd0\xed\
+\x8c\x51\xa0\x8a\xc2\x2f\x50\x19\x21\xbc\x90\x75\x6f\x3c\x6f\xc2\
+\x12\x34\x71\xd8\x67\xbb\xbd\x8e\x12\xec\x73\x10\xe9\x7c\xec\x43\
+\x02\xbe\xd4\x62\x34\x1c\x03\x35\xb2\x13\x8c\xee\x0a\x8f\x13\x93\
+\x98\x00\x2f\xc9\x48\x2c\x0b\xd5\x2e\x46\xa5\xbd\x9c\x2c\x1d\x13\
+\x13\x10\xea\x75\xf2\x8a\xb7\x5a\xc9\x0b\xcf\x04\xf5\x91\xdc\x8e\
+\x94\x05\x76\x25\x33\x8f\xe7\xf5\xc4\x8f\x6f\x80\xf6\xd9\x0b\xe3\
+\xf4\x23\x80\xfe\x84\xbd\xca\x34\x73\xa9\x5e\x7b\x27\x5e\x60\x1c\
+\x3f\xc5\xd6\x64\x1b\xf2\x07\x98\xa6\x89\x1a\x99\xc4\xb9\x4b\xbb\
+\xa3\xa3\xab\xcf\xf1\xf1\xce\x2f\xcc\xd1\x68\x83\xd6\x7d\x86\xf9\
+\x6d\xc6\xf1\x53\xf4\x77\x7b\xf4\x77\x7b\xec\xbc\xf3\x29\xf4\xb3\
+\xcf\x03\xf0\xb9\x2f\x6e\xf0\xc3\x3f\xfe\x53\xac\xff\x60\x84\x7f\
+\x75\x11\x7f\xfb\x84\xbd\xa3\x65\xf6\x8e\x96\xc9\x17\x36\x04\xe3\
+\x11\xdc\x26\xb9\x67\xf2\x60\x4b\xb8\xa5\x2c\x1d\x5a\x64\x7b\x1b\
+\xe8\xb7\x4a\xc5\xd9\xec\xb2\x9f\x6b\xae\xcc\xb4\xd5\xa0\x8d\x92\
+\xf1\xdc\xb1\xfa\xba\xa9\x37\xe4\x6b\x7a\x60\xd1\x6b\x6a\x73\x05\
+\x63\xae\xb9\xa4\xb4\xe4\xd7\x48\x35\x9c\xda\x94\x54\x5e\x62\x87\
+\x0c\x33\x51\x44\x36\x1c\x43\xaa\xe3\x4a\xe7\x21\xd7\x89\xf8\xe2\
+\xf3\x5d\xbe\xf0\xc3\x57\xf9\xf1\x1f\xba\xc9\x0f\x3d\xb3\x49\xef\
+\x24\x25\x7a\xf0\x1e\x83\xb7\xbf\x49\xd3\xdf\xa5\xe9\xef\x32\x8a\
+\x0e\x58\x2b\x46\x6f\xce\x3a\x26\xdd\xd6\x7d\xa8\x3d\x4d\xfd\xd2\
+\x31\xd4\x9e\xc6\x4b\x4f\x31\xf4\x87\x28\x69\x4f\x7c\x28\x3d\xf2\
+\xc1\x48\x4e\x4a\x37\x02\x31\x84\x7a\xd6\xca\x65\x26\x16\x0e\x9c\
+\x42\x40\x34\x42\x11\xd6\x59\xc5\xf4\x48\xe2\x36\x68\xe9\x22\x31\
+\x6c\x0e\x7a\x17\x02\xb5\x35\x9c\x08\x4c\x5c\x72\xce\x55\x9d\x72\
+\x51\xe8\x8d\xfd\x18\xbd\x0c\x4a\xc1\x40\x98\xa2\x90\xab\x24\x5c\
+\x8f\x1c\xdd\x55\x30\x42\x9b\x88\x8c\x28\x31\x71\x4d\x55\x36\x32\
+\xf4\x62\x01\x4d\x49\xaf\x59\xc5\x64\x48\x23\x0c\x67\xc5\xdd\xb9\
+\x25\x36\xc9\xfa\x32\xec\xcc\x67\xe2\xa9\x72\x17\x3d\xfc\x24\x5e\
+\x6f\xc4\x54\xb9\x3b\x17\xdc\x7b\xfd\x55\x3e\x6a\x9c\xb1\x7f\x10\
+\xa2\xec\x05\xa0\x7c\x89\x96\xe9\xd2\x32\x61\xdc\x6d\xc0\x3e\x1c\
+\x65\xef\x4a\x1a\xad\x9c\xf8\x00\xe8\x6c\x74\x19\x3f\x2c\xde\x14\
+\xe5\x05\xb2\xf0\x84\x37\xf7\x0f\x60\x1f\x94\x6b\x97\xd9\xfc\x0c\
+\x5c\xbb\xfc\xaf\xf8\x51\xe0\xfe\xf5\x4b\xec\xde\x3f\x64\xe7\xcd\
+\xb7\xe1\x6c\xc4\x78\xa1\xd8\xd9\x61\xde\xc5\x0d\x61\xb8\x2b\xe4\
+\x31\xe3\xb8\x41\x63\xb7\x07\x95\x3d\x76\x73\x7f\x9f\x1d\xd2\x55\
+\xf3\x22\x63\x86\x5c\x1a\xe5\xf4\xec\x10\x33\x68\xcc\x65\xda\xc4\
+\x0e\xe9\x8e\x52\x1e\xa3\xc8\x60\x3e\xff\x7d\x16\xf2\x9c\x5e\xa6\
+\xa0\x33\x9f\xd1\x35\x47\x48\x3c\x7b\x99\x42\xae\xb9\xf2\x44\xea\
+\x6a\x85\xfb\x66\x1e\xd1\x6a\xb7\x58\x6e\x77\xf8\xec\x8b\x2b\x34\
+\xba\xb7\x78\xea\x6a\xca\x92\x95\xb2\x6a\x6d\x30\x71\x84\x19\xcc\
+\x28\x3a\xa0\x69\x8a\xbf\xa3\x3c\xd6\xfd\x35\x70\x1e\x52\xf7\xd7\
+\x84\xef\x83\xb5\x21\x9d\x81\x0e\x0f\x76\x61\x4d\xc0\x0c\x3f\x69\
+\xd0\x70\x15\x5a\x9a\x23\xe6\xee\xda\xae\xec\xd8\x55\xa9\xb8\x79\
+\x88\xa5\x82\x2d\x5c\xe6\xf3\xbd\x5d\x86\xc9\x2d\x74\xbe\x27\x5a\
+\xce\x15\xaa\xcd\xb1\x91\x83\xaf\x92\x9d\xb0\x2b\x22\xa2\x0a\xc5\
+\xa6\x8a\x3d\x15\x02\x1a\xcc\x18\x08\xe1\x92\x13\x13\xa0\x6a\x0d\
+\x12\x2f\x97\xd0\xc1\xd5\x55\x99\xb1\xcb\x13\x20\x0e\x95\x39\xea\
+\xac\x8a\x89\xcf\x07\x30\x61\x84\x85\xc5\xd3\xee\xcf\xcc\x65\x63\
+\xd2\xd7\xe8\xab\x23\xb6\x92\x7b\x17\x3c\x23\x2e\x77\x0e\x19\xc7\
+\x4f\xd1\x51\x73\x6e\xbc\xfc\x8b\xfc\xc0\x0f\x76\x68\x2d\x6f\x62\
+\x77\x5b\x58\xbd\x43\xa2\xc1\xf7\xd9\x3d\xd8\x64\xf7\xfe\x21\xed\
+\xe1\xcd\x0b\x6f\x5c\xb9\xec\xf0\x60\x1a\xe2\x99\x07\xb8\xd1\x1a\
+\x2d\xe5\x05\xee\xbd\x9f\xf1\xf5\xff\xed\x1b\xfc\xd9\xaf\xfd\x1a\
+\xde\x1b\x7f\xc2\xd5\x2b\x3a\x9f\x7b\xee\x25\x3e\xfb\x5f\xfe\x04\
+\xf9\xc2\x06\xca\xd9\x2e\xca\xd9\x2e\xe3\xf8\x29\xa9\xab\x08\x8e\
+\xd6\x68\x18\x77\x09\x8e\xd6\xe8\x67\x83\xf9\x2e\x5c\x81\x8d\xf5\
+\xc0\x92\x59\x12\x90\x41\x0b\xf0\xb8\xca\xec\x8c\x32\x46\xba\x83\
+\xde\x54\x2f\x40\x8e\xf2\x7e\x2f\x53\xe6\xb2\x70\xa3\x60\x42\xce\
+\x14\x91\x75\x5b\x6a\xf3\x42\x01\x58\x8e\xf8\xbf\x78\xfd\x29\x3e\
+\xfb\xe2\x0a\xb7\xd6\xae\xf1\xd9\x67\xa6\x2c\x59\x29\xdd\x25\x4d\
+\x06\xb0\x0c\xd8\x22\x98\xcb\xdb\xc4\x99\x05\x76\xf9\xb9\x87\xe1\
+\x2e\x87\xe1\x2e\xab\xd6\x06\x0b\xfd\x08\x2f\x3d\xc5\xd1\xc7\x84\
+\xc6\x84\x7d\x75\xd6\xfc\x10\x7a\x11\x5f\x36\x48\x12\xe9\x87\x5c\
+\xb0\x5c\xc5\xfd\x0e\x19\xca\xe5\xf5\x0b\x5c\x71\xb5\xf9\x31\x3e\
+\x4e\x19\x44\x3e\xea\xe4\x68\x46\xd7\x79\x53\x02\x7b\xd6\x29\x1c\
+\xfb\xf1\x6c\xb8\xc2\xc0\xc6\x08\x91\x7c\xb0\xa0\x54\x14\x32\x5d\
+\x5c\x02\xa7\xf9\x02\xa6\x7e\x86\x97\x98\x72\x6a\x2e\x4a\x4c\xa6\
+\x9a\x25\x0c\xad\x8b\x13\xc1\xc0\xe6\x1f\xbc\x85\x11\x56\xc7\xa4\
+\x36\x7a\x8a\xa9\x86\x2c\xde\x3e\xd4\xec\xc4\xbb\xc1\xe6\x95\x0e\
+\x5c\xe9\x70\x79\xd1\x64\xf7\x9e\xce\xc3\x83\xef\x72\xf4\x1f\xfe\
+\x8a\x07\x8f\x63\xf6\xfc\x7d\x36\x54\xb1\xae\x76\x3b\xba\x47\xe3\
+\xb0\xce\xb5\xf5\xd9\xf8\x92\x6a\x2d\x41\x3e\xfb\x27\xa9\xd6\x12\
+\xc3\xfc\x36\x2e\x6b\x44\x97\x7a\x18\xd1\x1a\xbf\xff\xd7\xef\x63\
+\xbf\xff\x3d\x99\xbd\xd7\x6a\x1b\x1c\x54\x02\xb9\x0c\x60\xe8\x13\
+\x1c\x95\x26\xd7\x0a\xf9\x28\x97\xd8\x6c\xec\xc7\x18\x9e\xf8\x99\
+\x4d\x27\x98\x0b\x40\x3d\xb0\x04\xfe\xd5\x1b\x02\x3a\x34\x55\x49\
+\x15\x57\x03\xb7\x84\x16\xd5\xcc\xdc\x74\x82\xb9\x93\x22\x76\x05\
+\x06\xa7\x08\xe8\xaa\x3f\x45\xa9\x3f\x7e\xe6\xc5\x5b\xdc\xbc\x1a\
+\xb3\x62\x5e\x43\xff\x84\x06\xfd\x6c\x2e\x70\x27\xce\x81\xc8\xc2\
+\x8b\x6b\x73\xd9\xb8\x7a\xbf\xbe\x08\x9c\x8a\xcf\xbd\xba\xb8\x21\
+\x02\xdd\x87\xe1\x60\x93\xd5\xf6\x36\x67\x1c\x63\x27\xcb\x88\x66\
+\x6f\x5d\x62\xe3\xb2\xd0\x2b\x1f\x57\x03\xb9\x0c\xe6\x91\x12\x31\
+\xd8\x3d\x45\x1f\x7c\x4f\x06\xee\xf8\xd4\x13\x8b\xd4\x03\x91\x89\
+\xcb\xb6\xb3\xaf\x6f\x80\x2e\x54\x71\x12\x13\x17\x8c\x87\xa0\x7f\
+\x8b\x46\x46\x99\x61\xc1\xc4\x4a\x26\xb2\x63\x27\x05\x4b\xca\x19\
+\x06\x36\x53\x4d\xe0\xe5\xc4\xcb\x31\xf5\x08\x88\xf0\x12\x13\x53\
+\x17\x27\x42\x4c\x80\x11\xb9\xc4\xa6\xf7\xa1\x01\x6d\x58\x82\x2e\
+\xbf\xbc\xf9\x32\xde\xe4\x16\x27\x85\xe3\x69\x47\x7d\x30\x37\x2a\
+\xf9\x4c\x57\x61\xe7\xdd\x1a\x37\xd6\x2e\x91\x6f\xc1\xc3\x83\x88\
+\x0f\xfe\xe2\xbb\x7c\xe5\xbd\xff\x8b\xc3\xc3\x13\xb1\xbc\x25\x89\
+\xb8\xd9\xb9\xc1\xee\xc7\x1b\x6c\x04\xfb\x5c\xbd\xfe\x79\x39\xd2\
+\x2f\xab\xfe\x02\x17\x5f\xbe\x7e\xca\xde\xc3\xa7\x68\x15\x34\xed\
+\x91\xe6\x70\x79\xe3\xff\xe7\xec\x4d\x63\x24\x49\xef\x33\xbf\x5f\
+\x44\x46\x1e\x91\x77\x66\xdd\xdd\x55\xdd\x5d\xd5\xdd\xc3\x69\x0e\
+\x39\x33\xa4\x48\x91\xa2\xa4\x15\xe1\x7e\xba\x07\x00\x00\x20\x00\
+\x49\x44\x41\x54\xb5\xdc\x5d\xd0\xdc\xc5\x7a\xd7\xd2\xae\xbd\x6b\
+\x08\x82\x05\x08\x86\x77\x05\xfb\xc3\x2e\x20\xd8\x1f\x6c\xd9\x30\
+\x60\xaf\xe1\x05\x0c\xfb\x83\xf5\xc1\xb2\x56\xb0\x21\xcb\xd6\xb5\
+\xb2\x6e\xea\xe0\x50\x9a\xa1\x66\x28\x72\x86\x33\x54\x4f\xcf\x74\
+\x75\xd7\xdd\x75\x57\x9e\x11\x19\x79\xc4\xe1\x0f\x6f\xbc\x6f\xbe\
+\x11\x99\xd5\x43\x39\x1b\x8d\xc8\x23\x32\x2b\x33\xe2\x79\x9f\x78\
+\xfe\x77\x93\xa3\x9d\x32\xa5\xd5\x63\x06\xa7\x36\xc5\x55\x0f\x7f\
+\xbb\x00\x5c\x50\x2a\x1c\x53\x5b\x7b\x45\xbd\x5f\x82\xb9\x45\x15\
+\x23\xec\x63\xf6\x3a\xaa\xc0\x53\x1a\x57\x92\x1d\x74\x00\x2b\x2d\
+\x5c\x35\x19\xf6\x04\x80\xfd\x5e\x48\xc1\x2a\x31\xa9\x58\x04\xed\
+\x2e\x05\xab\xa4\x0c\xbe\x82\x25\x64\x47\xab\x9a\x11\x6c\x5c\xf4\
+\xb0\xe2\x85\x22\x19\xbf\x54\xce\xce\x74\xd3\x14\xe9\xa4\x0d\x7e\
+\xf4\xae\xc9\xb8\x3a\x61\xa5\x52\xa4\xbc\x60\xb0\xd4\x8e\xdb\xd4\
+\x2e\x65\x68\x5d\x04\x34\x97\x8e\x15\x98\x7b\x1c\x0b\x50\x3b\x24\
+\x18\x5a\x82\x39\xbf\x08\xce\xe5\xe7\xd9\xeb\x5e\x02\xf7\x58\xcb\
+\x0c\xa8\xd5\xf7\xb5\x90\x76\x48\x8d\x3e\x93\xae\x8b\x63\x2d\x02\
+\xd3\x28\x9f\x9e\x3c\xaf\x87\xa4\x1d\xd3\xe5\x56\x54\x25\x73\x23\
+\x8b\x5f\xff\x34\x56\xe7\x6d\xc5\xc4\x72\x00\xbc\x5a\x70\xac\x50\
+\xf6\xdb\x74\xc6\x0b\x74\x03\xd1\x2a\x40\x06\x56\x40\x4c\x14\xb5\
+\x26\x0c\xa8\x58\x45\xc5\xc6\x43\x62\x99\xe0\x8b\x68\x5d\xc1\x1a\
+\x32\xf4\x0b\x62\x3c\x96\x35\xc0\x2c\x46\x0a\xc0\xe3\x68\x81\x9c\
+\x71\xa5\x34\xb3\x64\x6f\x09\xe0\x34\x33\x67\xed\x88\x81\xe7\xb1\
+\xbd\xff\x6d\x95\x37\x91\x8b\x5e\x20\xc7\x0b\x31\xa3\xdc\x01\x76\
+\x78\xd0\x34\x78\xd4\x8a\x78\xd4\x8a\x28\x01\x2b\x95\x22\x4f\x98\
+\x30\x3a\x3b\xe4\x1b\xc0\xc3\xb7\xb6\xa1\x1a\x51\xb7\xaa\x74\x18\
+\xb2\xdf\x7f\x46\xf8\xb5\x33\x0e\xea\x35\xa2\xbd\x36\xeb\x5b\x6b\
+\xd0\x86\xcd\x8f\xef\xd1\xee\x0a\x66\xe5\xf0\x31\x47\x3b\x2f\x50\
+\xca\x3e\xa6\x1b\x09\x7d\x4c\xf6\x5d\xf5\x9c\x3b\x79\x81\xd5\xba\
+\xc3\xe9\x64\x43\x68\xe0\xe1\x0d\xb5\x00\x2a\xc3\x1b\x50\x78\x0c\
+\xab\x82\x8d\x9b\xb4\x69\xf5\xa6\xbd\xd4\x64\xb9\x91\xce\x96\xba\
+\x77\xc2\xaa\x9a\xe2\x31\x9e\x00\x6b\xbc\x95\x80\xcc\x5a\xa5\x19\
+\x46\xee\x59\x65\x2c\x2d\xb8\x29\xd9\xb8\x54\xce\x2a\x30\x27\x00\
+\x5c\x81\x57\xd7\x9b\x94\x56\xd6\xc9\xdf\x99\x70\xab\x52\xa4\xb9\
+\x30\xa6\x6e\x4f\x73\x28\x5a\x17\x81\x02\xef\x89\x77\x48\x73\xe9\
+\x58\xb1\xf2\x0c\x43\xc7\x6c\x5c\xb8\xfb\x71\x88\xee\xb3\xff\xf6\
+\xb7\x79\xfc\xf4\x9b\x9c\x76\x0e\x19\xb4\x87\x7c\xac\x71\xc5\x6a\
+\xed\x26\x0b\x9f\xda\xe0\xb3\x2f\xdc\x60\x52\xfb\x12\x74\x9f\x10\
+\x45\x4d\x9c\xac\x4b\x69\x12\x2a\xcf\x45\x2d\x53\x4e\xf4\x7d\x2b\
+\x87\x25\x7a\xa3\x31\xe1\xd0\x53\x4c\x3c\xe3\xa5\x28\xf6\x54\x2a\
+\xa6\x72\xd7\x55\x4a\xaa\x89\xfd\x90\xb8\x21\x62\x35\xc2\x32\x86\
+\x06\x7d\x2b\xc9\xc4\x12\xcc\xd2\xd8\x93\xcc\x3c\xf4\x45\x88\xd0\
+\xaa\x18\xe0\xc5\x63\x05\x2c\x12\xba\x57\x56\x86\x48\x00\x2b\x57\
+\x9b\x5d\x60\xe2\x0d\xd9\x3b\xff\x36\xe3\xf0\x17\xb5\x06\x7f\xaf\
+\xf3\xa0\x69\x40\xe6\x07\x79\x78\xf8\x98\x17\x6e\xbc\xc8\x6f\xbd\
+\x97\xf4\x25\x1a\x93\x15\x16\x3a\x8f\xc8\xaf\x6c\xc4\x8d\xfe\xb6\
+\xc9\x16\x3e\x8e\xeb\xef\x28\x36\x32\xad\x15\xba\x9d\x33\xc2\xd0\
+\xa0\x73\x01\x0d\x33\xa2\x7d\x58\xa5\x66\x08\x2f\xc3\x0b\x96\xcd\
+\x99\x61\x63\xae\x37\x09\x8f\x36\xe2\x16\xad\xaf\x50\x09\x2e\x98\
+\xb4\x9b\xb0\xfc\x98\x53\xa6\xc3\x17\xa5\x76\x3e\xcd\x94\xa1\xf0\
+\x98\xc1\xa9\x2d\x74\x32\x87\xb4\x43\x03\xa3\x2a\x3a\xbe\x4f\x23\
+\x72\xc5\x84\xac\xd0\xdd\x6b\x7e\x2f\xc4\x7a\xce\x88\x1f\x25\x0f\
+\x9e\x63\x24\xea\x75\x79\x69\xf6\xd5\x01\x7c\xef\x4e\x72\x42\x4c\
+\xc7\x7b\x46\xdd\x4e\x8e\x11\x10\x00\x16\xac\xbc\x66\x13\x6f\x37\
+\x12\x60\xa6\x20\x00\x5c\x28\x2d\x72\xef\xd3\x5b\x6c\x6d\xdd\xe1\
+\xbd\x6f\xdf\xe7\x7f\xfe\x7f\xdf\xe4\xcd\xf7\xff\x98\x3f\x63\x85\
+\xdb\xb6\xcb\xcb\x5f\xfd\x7d\xde\xff\xd4\x67\xf9\x7b\xff\xc9\x6d\
+\x6e\x37\x36\xd9\x6f\xef\x62\x52\x42\xd5\xed\x6b\xb9\x15\x51\xd0\
+\x27\x5b\x29\x31\xe9\xbb\x50\xc8\xa9\x5c\x62\x1d\xc8\x12\xc0\xd2\
+\x3b\x91\xf8\x8c\x81\x41\x2f\xd6\xd5\xd5\x38\x02\xa8\x34\xb1\x94\
+\x14\xb2\x3a\x5e\xea\x62\x09\x6a\x29\x2d\x0a\xd6\x90\xf1\x60\x21\
+\xd6\xc0\x02\xe8\x82\x79\xa7\x80\xb5\x3c\x4f\xb1\xb0\xa7\x97\x36\
+\x69\x33\xed\x66\x82\x1d\xad\x08\x78\x5d\x19\x78\x0f\x9a\x86\x7a\
+\x7e\xf3\xea\x2e\x23\xff\x28\xae\xd1\xbb\x10\x45\xa9\xd5\x08\xfc\
+\x1d\x35\x81\xc8\xa8\x1a\x58\x83\x3c\xa6\xb5\x42\xcd\x14\xe3\x02\
+\xfa\x40\xeb\x03\x78\x56\xdd\xa6\x61\x46\x84\xf5\x06\xf7\x1f\x5c\
+\x11\xad\xff\x0d\xb8\x03\xd9\xd8\x47\x4c\xa6\x4c\x69\x59\x48\x89\
+\xd2\xaa\xf0\x8a\x48\xe9\x50\xa9\x83\x71\x75\xc8\x20\xfe\xe2\xa5\
+\xec\x63\x06\xd8\x58\x83\xbc\xea\xb3\x56\x37\xab\x74\x2a\x11\x46\
+\xd0\x9f\x31\xca\x54\x40\x03\x21\x23\x0a\x83\x52\x02\xdc\xa5\x30\
+\x87\x6b\x8e\xe7\x02\x58\x0f\x8c\xb4\x8a\x1e\xd6\x60\x42\xb5\x3c\
+\x6d\xac\x22\x73\x29\x9a\x35\xd1\x31\xbe\xbc\x61\xb0\x5c\x10\x12\
+\x02\xa0\xb2\xb0\x4a\xeb\xea\x94\xca\xc2\x2a\x10\x70\xe1\x65\x58\
+\x9a\xc3\xca\x12\xd0\x27\x17\x87\xca\x2b\xd5\xf1\xde\xa4\xb5\x9d\
+\xe3\x07\x2f\xa1\xf0\x37\xff\x46\x9c\x45\x18\xf1\xf2\xf7\xbd\xcc\
+\xff\xd0\xa8\xf2\xcb\x2f\x2e\xf1\xf3\xff\xeb\xff\xc5\xbe\x97\xe7\
+\xd2\x2f\xb3\xf8\xf0\x3d\xdc\x7f\x7d\xce\x57\x7e\xf2\xef\x73\xeb\
+\xd3\x9f\x63\x70\x7c\x86\x1b\x64\x21\x18\x52\xce\x25\x03\x22\x7e\
+\x5c\xa3\x57\x8d\x0a\x5c\x5d\x66\xe7\x06\x3c\x9c\x41\x15\x73\x74\
+\x4e\xe9\xc5\x64\xf5\x6a\x14\xf4\x45\x7f\x65\x2d\x4f\xa3\x54\xce\
+\x92\xf9\x07\x3f\xf9\x4f\x7e\x6e\x1c\x46\xd8\xfe\x88\x61\x6c\xb0\
+\x15\xac\x21\x7e\x68\xe1\x87\x96\xba\x0f\x60\x99\x3e\x93\x20\xc2\
+\x34\x3d\x32\x64\x19\x87\x11\x56\xce\xc7\x18\x1a\x04\xd6\x04\xd3\
+\xf7\x15\x98\xf3\x7e\x0e\x3f\x0b\x96\xe7\x31\xb6\x2d\xe5\xb5\xa8\
+\xd6\x8e\xb8\xea\xbd\xc3\xe5\x35\x25\x7a\x97\x9e\x08\x45\x9f\xbc\
+\xf9\x80\xc2\xd5\x12\xd6\x55\x95\x76\x77\xcc\x5b\x57\x1d\x1e\xef\
+\xed\x91\x5d\xbc\x64\xbf\x56\x63\x6b\xa9\x45\xbf\x9f\x05\x31\x72\
+\x84\x30\xf4\xc9\x98\x16\xe3\xf1\x94\xf2\xc2\xd0\x87\x91\x48\x66\
+\x3f\xef\x44\x5c\x5c\x7a\x8c\x8f\x5b\x2c\xe4\x4f\xa8\xde\xf9\x18\
+\xb7\x22\x1f\x7f\x60\x30\xe2\x8c\x71\x7e\x8b\x5c\xe6\x4a\x80\xb9\
+\x26\x1e\x47\xf9\x3d\x26\xce\x32\xd1\xc2\x12\x86\xd7\x63\xe2\x64\
+\x69\x87\x06\x61\x36\x10\xe3\x4d\x62\x26\x68\xe4\x1c\x26\xee\x34\
+\xe0\x60\x8a\xcc\x6f\xc2\xac\x8f\x35\xb0\x19\x7b\x63\xac\xaa\xa9\
+\x1e\x97\xc2\x1c\x13\x23\x60\x62\xcc\xe6\xfd\x56\x7d\x07\xb7\x1c\
+\xf7\xe5\x9d\x64\xa9\x96\x07\x78\x91\x81\x39\xc9\xaa\xf2\x7e\xaf\
+\x6b\xd0\x2c\x4e\x01\xbc\x75\x7f\x85\x92\x55\xe2\xde\xed\xa9\x9c\
+\x19\x7b\x4e\x0c\x60\x38\x3b\x3b\x67\x7d\xc1\xe6\xc2\xcb\x50\xca\
+\x4e\x89\x65\xcd\xde\xc0\xf1\x7b\x78\x83\xe9\x73\x17\x5e\x86\xde\
+\x69\x95\x0f\xbe\x71\xc8\xd7\x7f\xe5\x6b\x5c\xee\x3f\xe1\x85\x4f\
+\xbe\x82\x5d\x76\x70\x4b\x36\x8d\xb5\x25\xb6\xee\x7f\x8c\xbf\xf3\
+\xf2\x8b\x7c\xf5\xe1\x11\x8e\x13\x50\xb7\x8a\xbc\x7d\x70\x89\xfb\
+\xf5\xd7\x29\xdc\xf4\x78\x61\xf5\x2e\x41\xc9\x20\x37\x09\x31\xcc\
+\x3c\xc8\x10\x75\x2c\x2f\x5c\xcb\xc7\xb0\xb3\xf4\x7a\x97\xbc\xf5\
+\xc6\xeb\xd8\xd6\xd4\xe8\x1c\x4f\xf2\x71\xf3\x19\x97\xd5\x5c\x8d\
+\xad\xcf\x6f\x60\x79\x6b\x8c\x30\xc8\x96\xb3\x54\x07\x06\x79\xc0\
+\x9b\x98\xe4\x81\xff\xe5\xdf\xfc\x3f\x64\x7e\xfc\x27\xfe\xf1\xcf\
+\x01\xf8\x71\x4f\x80\x8a\x9f\x25\xf2\x27\x64\xc3\x80\x6c\x18\x30\
+\xa4\x30\x03\xea\xa1\x5f\xc0\x34\x3d\xfc\xd0\x22\x34\x6a\x64\xb2\
+\x82\x89\x87\x51\x15\xc3\xe8\xe1\x4f\x6a\xe4\x0c\x1f\x7c\x8f\x71\
+\xb4\x40\xd6\xef\x91\xf7\x73\xb8\x91\xcd\x64\xb2\x42\x77\x74\xc5\
+\x52\xe1\x90\x25\xdb\x98\x01\xf3\x83\xa6\xc1\x37\x5e\xbf\x4d\xdd\
+\xbf\x03\x41\x95\xcb\xee\x05\xdf\xba\xff\x2d\x46\x2d\x9f\x83\xf3\
+\x90\x8b\x8b\x90\x4f\xfe\xad\x13\x38\xb7\xa9\x56\x26\xf4\x2e\x85\
+\x81\x13\x95\x03\xc2\x6c\x80\x39\x99\x82\xb8\x15\x4d\x28\x60\xe0\
+\x38\x19\x72\xb9\x0c\x97\x97\x13\xba\x83\x31\x4f\x9e\x9c\x72\xbe\
+\x73\x44\xb8\xde\xc3\xa8\xf6\xa8\x2c\xfc\x6d\xca\xb5\x0f\xb8\xba\
+\xda\x80\x62\x8d\x5c\xe6\x8a\x49\xb8\xc0\x24\x5c\xa0\x54\xdb\xc3\
+\xbf\x18\x08\x29\xe1\xf5\xb0\x0d\x18\x46\x06\x5c\x88\x3c\x85\x41\
+\xde\xa4\xc8\x08\xd7\xf2\x29\x18\x79\x02\xd7\xc4\x2f\x7a\x54\x46\
+\x25\x02\x5f\xdc\xcf\x05\x45\xcc\x49\x16\x73\x92\x55\xec\x7b\xdd\
+\x2d\x5f\xf5\x99\xb8\x62\x7f\xbf\xe8\xe1\xc5\xee\xb3\x4a\xbe\xa8\
+\x6a\xf7\x9a\x8d\x88\x95\x8d\x06\xeb\x0b\x59\xb6\xee\xaf\x50\x69\
+\x42\xde\x86\x72\x7e\xca\x6c\x95\x85\x55\x9c\xd3\x88\x5c\xd9\x20\
+\x5f\x2c\x33\xf0\xcd\x04\x13\x03\x38\x7e\x0f\x72\x1f\x83\xe0\x8a\
+\x0b\x2f\xc3\xf9\x91\x41\xfb\x69\xc0\x37\x8f\x8e\x79\xfb\xd1\x01\
+\x6f\x1c\xfa\xbc\xbb\x7f\xc6\xc1\xaf\x7f\x97\x85\xdb\x11\x77\x6e\
+\x3f\x80\x4c\x01\xdf\xce\x71\xab\xb1\xc8\xf7\xdf\x59\xe6\xd9\x38\
+\xc7\xc3\xed\x03\x26\x66\x95\x67\xe3\x21\xce\xce\x77\xa8\xad\x67\
+\x59\xb9\xd1\x24\x18\x16\x71\xfd\x88\xa5\x6c\x71\x9a\x6b\x91\xa9\
+\x90\xf5\x47\x50\x5c\x64\x6f\xcf\xe3\xfd\x47\x0f\x13\x20\x2e\x17\
+\x7b\x8c\x27\x79\x8c\xc0\xe5\xc1\x8b\x8b\x2c\x2d\xdf\xc2\xce\x07\
+\xe4\x02\x9b\xec\xc4\x50\xd2\x42\x26\xe4\xff\xca\x2f\xfe\xb6\x90\
+\x13\x51\x77\x84\x11\x8b\xe8\xbe\x35\x01\xf2\x6a\x78\x8b\x74\xa5\
+\x29\x39\x11\xbb\xda\x86\x7e\x41\x79\x27\x94\x7f\xcf\xf0\x70\x23\
+\x21\x37\xa4\x26\xce\x1a\x9e\xea\x4b\x11\x06\x2e\x05\x6b\x48\x2e\
+\x12\xae\xb5\x79\x3d\x84\xbf\xf1\xfa\x6d\xc2\xa3\x0d\x06\xf6\x90\
+\x62\xa3\xc0\xc5\x5a\x12\xe5\xe1\xfd\x55\xa0\xcf\x77\x27\x0b\x34\
+\x2f\x3c\x8c\xaa\xf2\xc3\x27\x7a\xa1\x4d\xfc\xa1\x9e\x6c\xa7\xf4\
+\xaa\x0c\xd3\xb6\xc2\x1e\xbb\x7f\xd8\xa3\x5e\xaf\xf1\x62\xf3\x5b\
+\x98\xf6\x06\xeb\x5b\x87\x71\x98\x3a\x96\x0e\xa7\x36\x03\x6c\xe5\
+\x33\x16\xc5\x8a\xb1\x5b\xad\x2a\x00\x95\x35\x27\xf4\x28\xd2\x2c\
+\x0f\x68\xc5\x61\x5f\x6b\x60\xcf\x00\x55\xc9\x88\x6a\xa4\xb5\x01\
+\x4d\xbe\x56\xf5\x45\x7b\x26\xb9\x0c\x65\x16\x5c\xcd\xac\xaa\xcc\
+\xb4\x5a\xa3\xc6\xab\x0f\x9a\xb1\x7c\x58\xa6\x12\x27\xf4\x49\x19\
+\x21\x6d\x08\x80\xc6\xea\x21\x76\xff\xd3\xf4\x2a\xd3\xe1\x2d\xa3\
+\xf3\x15\x11\x81\x53\xd4\xf7\x21\x17\x5e\x06\xe7\x34\x62\xfb\x78\
+\x97\x9d\xed\x33\x0e\x8e\x3d\x2e\x7b\x59\xee\xdd\xbe\x01\xc6\x31\
+\xbf\xb1\xf3\x3a\xc1\x7f\xf1\x88\x27\xff\xf1\x84\x1f\xfb\xf7\xff\
+\x19\xf5\xd2\x15\xbd\x46\x9e\x57\xbf\xf4\x2a\x3f\x7b\xe7\x36\xff\
+\x0a\x78\xf3\x6b\x7f\xcc\x62\x65\x89\x6f\x1e\xc2\x8d\x7f\xfb\x3e\
+\x4b\xb5\x7b\x34\xef\x82\xe7\x56\x38\x26\xa0\xcc\xd4\xed\xf6\xbc\
+\x9b\x33\x98\xed\x66\xd4\xce\xe6\x30\xc6\x86\x32\x12\x25\x80\xfd\
+\x81\x29\x3a\x00\xfd\xf8\x4f\xfc\xe3\x9f\x33\x62\x31\x1c\x75\x47\
+\xc8\xfb\xbe\x69\x29\x76\x96\x00\x1e\xfa\x05\xa2\x68\x02\xa5\x2c\
+\xe1\x18\xc5\xce\x7e\x68\x91\x37\xe3\x9e\x5e\x46\x8f\x0c\x59\x06\
+\x7e\x06\xd3\xf4\x18\xf8\x19\x6c\x33\x27\xf4\x75\x29\x4b\xde\xcf\
+\x51\x2d\x2d\xd1\x77\xc7\x34\x4b\x25\x96\x0a\x87\x5c\x7a\x22\x31\
+\xe7\x62\x34\x21\x30\x7b\xd8\x79\x8b\xe5\xaa\x8f\x91\xe9\x53\xae\
+\x1d\x70\x1e\x4d\x30\x96\x3d\xce\x1f\xe6\x31\x5a\x0e\xcb\x2f\x8d\
+\x59\xbe\x82\x9e\xdb\x24\xeb\x1a\x62\x1c\x97\x33\x62\x6c\x58\x62\
+\xd0\x4b\xe8\xc7\xd5\xd6\x86\x0a\x10\x74\x8c\x88\x8a\x65\x13\x86\
+\x22\xdb\xac\x64\x0c\xc9\x19\x35\x32\xa3\x2e\xdb\xad\x2e\xee\xd5\
+\x33\xce\x2e\x2d\x7c\xf7\x8a\x6c\xd9\xc7\x9d\xbc\x40\xa9\x76\xc6\
+\xc4\xc9\xaa\xad\x04\xb0\xcc\x26\x23\x0f\x93\x71\xa8\x3c\x07\x92\
+\x3d\xf5\x6d\x98\xf5\x15\x0b\x03\x2a\x73\x4d\xbf\xc9\xfd\x27\x41\
+\x49\xed\x27\xf7\xad\xe4\x8b\x8a\x7d\x0b\xb5\x02\xaf\xde\x9d\x05\
+\x30\x40\xc5\x5c\x87\x4c\x1c\xde\xcf\xb8\x8c\x3d\x07\xab\x78\x93\
+\x30\xff\x01\x21\x35\xaa\xfd\x45\xda\xe6\x90\x6a\xbd\x9f\x90\x0e\
+\x03\xdf\xe4\xc9\xde\x0e\xad\xf7\x43\x5e\x3f\x18\xd0\x3a\xbd\xa2\
+\xd5\xf5\x58\xa8\xae\xab\x16\x58\x3f\x52\x1e\xf1\xa7\xc3\x32\x7f\
+\xf0\xbb\xbf\x4d\xdd\x3b\xe6\xe3\x4b\x2f\x61\xaf\x2e\xc7\x95\x29\
+\x79\xbe\xf8\xea\x5d\x1e\x9e\x79\x3c\xdc\x3e\xe0\x46\x29\xcf\xdb\
+\x07\x97\x64\x4e\x0f\xd9\xfa\xf4\x3a\xd5\x8a\xc5\xb0\x6f\x32\xca\
+\xda\x4c\x46\x23\xf2\xd9\x12\xae\x1f\x51\xcc\x5a\x3c\x3b\x1f\xcc\
+\x30\xb1\x39\x3a\x27\xb2\x4a\x18\x81\x8b\xbd\xb4\xcc\xbd\xad\x9b\
+\x64\x73\x8b\x94\x27\x50\x30\x73\x74\x03\x87\xb1\x99\x27\x18\x3a\
+\xd4\xcc\x1c\x3f\xff\xcb\xbf\x4e\xe6\x27\xfe\xc9\xbf\xfb\x73\x12\
+\xac\x45\x2b\xc0\x37\x2d\xda\x13\x1b\x3b\x93\x34\x36\xa4\x2e\x2e\
+\x58\x43\xc2\xac\x00\x71\xc1\x1a\x62\x99\x3e\x7e\x68\x61\x9a\x1e\
+\xc3\xa8\x4a\xc1\x98\x66\xbc\x49\xdd\x6c\x9a\x53\x59\x91\x21\x4b\
+\x86\x2c\xc5\xc5\x5b\x58\x85\x1b\x94\x2a\x5f\xa2\x18\x8d\xd8\x3b\
+\x38\x22\x1b\xeb\xd9\xf6\xe2\x09\x95\x9b\x5d\x0a\x57\x4b\x84\xf9\
+\x36\xa5\x1b\x11\xed\xbf\xa8\x13\x3c\x9d\xe0\xe5\x4d\x4e\xc7\xb7\
+\x39\x0f\x8b\x94\x4f\x9e\x61\x98\x65\xaa\xe3\x0c\x8e\x61\x4c\x75\
+\xb0\x96\x77\x5b\x8d\xd3\x23\x87\x06\xe4\xc2\x80\x8e\x11\x31\x34\
+\xc0\x8b\x53\x1a\x23\x0a\x14\x8c\x3c\x8e\x93\x61\xdc\x17\xc3\x4d\
+\xba\x97\x65\x8a\x91\xd0\xc0\xd0\x60\xe2\xf8\xb4\xa8\xd2\x34\x46\
+\x78\x43\x18\x45\x23\x02\xd7\x24\x37\xb4\xf0\x4a\x42\x0f\x57\xcb\
+\x03\x5c\xcb\x57\x46\x9b\x04\xa3\xdc\x4a\x50\xa7\xf5\xef\xc8\xcc\
+\x4d\xf5\x6f\xac\x87\xa5\xec\x98\x18\x01\xb9\x5c\x46\xe9\xdf\x8f\
+\xdd\xac\xf2\xe2\x8a\x41\xa1\x94\x04\xf0\x4a\xa5\x38\x05\xb0\x26\
+\x27\x44\x5f\x0f\x01\x60\xaf\xf2\x36\x0b\x76\x59\x01\x77\xe0\x9b\
+\x38\xa7\x11\xfd\xed\x23\xbe\xf9\xc1\x84\x6f\x6f\x6f\x73\x76\xe2\
+\x31\x18\x65\x58\xa8\xae\xd3\x8a\x5a\x78\x91\x85\x87\x47\x2f\x73\
+\x83\x62\xbe\x44\x60\x65\xf9\xe3\xd7\xdf\xa0\x7f\xf2\x2e\x9f\xa8\
+\xaf\x53\xdc\x68\x60\xe6\xc6\x14\x16\x1a\x7c\xe1\x07\x3e\xc5\x07\
+\x7b\x1d\x25\x2d\xee\xf6\x73\x9c\x1d\x5c\xf0\xb9\x57\x6d\xfc\xea\
+\x3a\x13\xa7\x4f\x29\x63\xe0\xfa\x11\xa5\xcc\x84\x28\x58\xe4\xb8\
+\xf3\x98\xf7\xdf\xdf\x57\x20\x6e\x8f\x2c\x8a\xf4\x15\x88\xef\x17\
+\x2b\x6c\x7d\x7e\x83\x49\x2f\xcb\xd8\xcc\x33\x0c\x1c\x6a\x99\xb2\
+\xda\xf6\x30\xf8\xc5\x5f\xfe\x35\x61\xd8\x29\xa0\xc6\x60\x96\x00\
+\xd6\x99\x39\x01\xe6\xa0\x44\x3e\xd3\x17\x2e\xb7\x18\xc4\x96\xe9\
+\x13\x50\x24\x67\xf8\xca\xf0\x9b\x30\xc0\x36\x73\x84\x4c\x98\x04\
+\x11\x94\xb2\x0c\x87\x11\x79\x53\xe4\x26\x67\x83\x12\x76\x71\x15\
+\xb7\xd3\x66\x64\xbd\xcb\x49\xe4\xf1\xc2\x52\x01\xe7\x4a\xe4\xfc\
+\x0e\x17\x2e\xd8\x6c\xff\x30\xc1\x59\x91\x61\xc5\xa2\x91\x5b\x22\
+\x6b\x44\xac\xd7\x7a\xdc\x9b\x34\x58\xa8\xd7\x69\x56\xb3\x9c\xf5\
+\xc4\x84\x4e\x59\x71\xac\xae\x1e\x31\x13\x0f\xf2\x26\x0b\x51\x8f\
+\x88\x82\xca\xd3\xd5\xf3\x6f\xe9\x19\xe4\x2a\x22\xbf\xd7\xca\x89\
+\x96\x53\x41\x98\xc1\xf7\x0b\xe4\xd6\x1a\x18\x5e\x06\x9b\x2e\xed\
+\xd0\xa0\x33\x8e\xa8\x1b\x05\x26\xe3\x90\x5c\xc5\xa4\x60\xe4\xf1\
+\x2c\x97\x9c\x51\x23\x70\x67\x1b\x72\x55\xcb\x03\x46\xe3\xec\x5c\
+\x30\x4b\x00\xab\x4b\xbd\x99\x13\x00\x2e\x8b\x86\x78\xb9\x5c\x46\
+\x34\x18\xd4\x3c\x10\x3a\x80\x1b\xed\x2c\xb5\xe5\xd9\x4a\x13\x63\
+\xb2\x42\xa9\x7c\x48\x18\xbb\xe3\xc2\xfc\x07\xd4\xed\x9b\x5c\x78\
+\x62\x41\xf7\xaf\x4e\x19\x7b\x0e\x4f\x8e\x2e\xf8\x83\x0f\x26\x5c\
+\x3d\x3b\x54\xc9\xf2\x46\xce\xc4\x75\x1c\x0c\xad\x3b\xa5\x17\xff\
+\x5b\xc8\x2f\x12\x65\x3c\x3e\x3c\xed\x70\xfa\xfa\x1e\x2f\xdd\xbd\
+\xa4\x72\xe7\x53\x90\x29\x50\x2a\x98\xfc\xc8\x8b\x5b\x3c\x3c\xf3\
+\x38\xda\xdb\xe1\x70\x78\xc4\xc3\xc3\x1d\x16\x7d\x9f\x97\x3f\x96\
+\x21\x30\x8a\xb8\x81\x09\x85\x0c\xb9\x30\xc2\x30\x43\x4e\x5b\x59\
+\xde\x7f\xf4\x90\x61\x60\x62\x5b\x21\xc3\xc0\x64\xb1\x31\x51\x9a\
+\xb8\x76\x67\x95\xad\x1b\xeb\x80\x4d\xcd\xcc\x31\xea\x8d\x18\x65\
+\x27\x22\x57\x23\x70\xc8\x96\xb3\xfc\xc2\x2f\xfd\x7a\x72\x40\xb9\
+\x94\x0c\xea\x60\xd4\xe6\xcf\x26\x0b\x03\x57\x19\x7c\x52\x1b\x0f\
+\xfd\x02\x56\x65\x40\xbf\x2f\x06\x9a\xfb\x95\x08\xbf\x5f\x60\x48\
+\xa8\xc2\xd4\xd3\x28\x5f\xec\x53\x5d\x2a\xe1\x5e\xf4\x55\xc6\xda\
+\xc7\x6b\xa5\x44\x97\xcb\xfa\xe3\x8f\x93\x77\xaa\x2c\x2f\xc2\x32\
+\x90\xdf\xa8\x72\x70\xd7\xe3\xd6\xd8\xe6\x20\xe7\x69\x61\xe4\x21\
+\x27\x8f\x1f\xd3\xd2\x0b\x29\xe3\x5c\x5b\xbf\xe8\xb1\x94\x59\x66\
+\xe2\x0b\x40\xd7\xf5\x2a\x0a\x73\x2c\xf4\xa9\x09\xa5\x5e\x4e\xf4\
+\xbe\x95\x2d\xa8\xa4\x5b\x67\xbf\x8b\x51\x16\x85\x9b\xdd\xb0\x8b\
+\x21\x9a\xe3\xa8\x84\x1c\xd7\x99\x40\x11\xd5\x73\x4d\x0f\x4c\xf8\
+\x45\x2f\xf6\xeb\x4e\x34\x1f\x32\x73\xc3\xc9\x7a\x30\x43\xef\x9e\
+\xd9\xac\xad\x6a\x2e\xb4\x24\x03\xe7\xd7\xd6\x39\xed\xef\x26\xf4\
+\x30\x40\x79\xd5\x60\xc2\xad\xb8\xe8\x20\xa0\xe3\x91\x00\xf0\x59\
+\x7f\xc0\x93\xbd\x2c\x8f\xde\xd9\xe3\xb2\x97\x05\xb2\xaa\x57\x85\
+\x6c\x7f\x95\xbe\xb5\x08\x20\x6a\xd1\xac\xde\x05\xe0\x4f\x7a\x0f\
+\x09\x7e\xf6\x11\x3f\xf5\x9f\xdf\xe6\x85\x7f\xef\xd3\x98\x61\x83\
+\xfa\x66\x93\x7f\xf5\x5f\xff\x34\x3f\x1b\x6b\x64\x80\xff\xe9\xb7\
+\xde\xc3\x37\xd7\xf8\x77\xfe\xe9\x4b\x0c\xfc\x88\xc1\xb0\x4d\x29\
+\xae\x00\x3f\xbd\x14\x35\x7d\x8d\xbc\x20\x9e\x05\x8e\x19\xb4\x81\
+\xfc\xac\x2e\xee\x76\x66\xb5\xb4\x3f\x30\x29\x85\x39\xd1\xa0\xa0\
+\x10\x77\x29\xd6\x01\xac\x1b\x76\xe9\x9b\x7c\x4d\xdf\x5f\x82\x74\
+\x26\x6b\x29\x4e\x2a\xd2\xff\x46\xdf\x0f\xb1\x2a\x06\xa3\xa1\xc9\
+\xe9\xa3\xbd\xb9\x9d\x7d\x00\x96\x0b\xcb\xac\x2c\x79\xdc\xc8\xdc\
+\xe2\x96\x91\x65\x61\xa5\xce\xa7\x1a\x6b\x2c\xac\xd4\xd9\xba\x73\
+\x87\xd5\xfa\x06\xab\xf5\x0d\xbe\xf0\xf1\xfb\xdc\x7a\xe5\x8b\x82\
+\x59\x35\x00\xcb\x04\x99\xce\x9c\x03\x40\xcf\x10\xd1\x2f\xad\x54\
+\x48\x2f\xef\x71\x9d\x89\xf0\x05\xb7\xfa\xb4\x3a\x72\x86\xb0\xad\
+\x52\x2e\xf5\x84\x9c\x74\xee\x43\x2b\x34\xd4\xf3\xf2\xbb\xc8\xfd\
+\xf5\x72\x7e\x3d\xc2\x17\x50\x53\x00\xce\xd0\xa5\x99\x81\x17\xee\
+\xdc\xe1\xf6\x9d\x8d\xb9\x00\x06\x88\xb2\x67\x73\x25\x84\x88\xbe\
+\x8a\x34\xc1\x9d\xa3\x0b\x26\xdc\x22\xcb\x01\xce\x69\xc4\xd3\xc3\
+\x55\xde\x7b\x27\xe0\xd1\xdb\xae\x62\x5f\x09\xda\x16\x02\xc0\xb2\
+\x52\x5a\xaf\x98\x96\xe3\x80\xf7\xfb\xcf\x44\xbb\xaf\xea\x5d\x7e\
+\xe3\x38\xe2\x7f\xff\xef\xfe\x4b\xce\xfe\xf4\x37\x09\xcd\x76\x0c\
+\x44\x83\xff\xf4\xef\x7f\x9e\xca\xfa\x16\x93\xf3\x47\xb4\xda\x06\
+\x6f\x7e\xfb\x77\x79\xfb\xe1\x1f\x51\x2b\x89\xf3\x70\x15\x64\x54\
+\x3a\xa6\x32\xde\x46\x56\x3c\xa6\x41\xef\x00\x15\x5f\x55\x75\x5c\
+\xf5\xa7\x19\x72\x55\x22\xd1\x01\x48\x02\x4b\x67\x61\x19\xa1\x93\
+\xcf\xe9\x85\xa2\x05\x6b\x88\x17\xb3\x70\xdb\xec\x61\x8f\x97\x13\
+\xde\x0b\xc1\xc8\x86\xa8\x08\xa9\xcc\xd6\x87\xc9\x7d\xf2\x85\x22\
+\xfb\xdb\x87\xfc\x9f\xbf\xff\xfb\xac\x6f\xad\xd1\x58\xdb\x4b\xec\
+\xf7\x29\xe7\xa7\xb9\x71\xc3\x8f\xe3\xe7\x00\xeb\xe8\x50\x2f\xe1\
+\xc3\x2a\x1c\x0f\x05\x6b\x7f\x76\xb3\xc4\xc3\xf7\xf2\x74\x3a\xfd\
+\x44\x0e\x83\x1e\x45\x2b\x85\x39\x5c\x67\x9c\xa8\x6f\xc3\x8c\xbd\
+\x16\x3d\x43\x31\xb1\x6b\x8e\xd5\x73\x92\xad\xa5\x6b\x4c\xa6\x3d\
+\x76\xe3\x9c\x5e\x09\x4c\x09\x48\xc9\xb6\x2e\x93\x44\xf2\xbb\x04\
+\x7a\xd0\xab\x53\xad\x76\x14\x53\xcb\x1e\xc5\x72\x41\x64\xe8\x52\
+\xb1\x36\x58\x59\xcf\x70\xff\x81\xc9\x72\x21\x43\xa5\xb9\x3c\x73\
+\x1c\x25\xfb\xea\x2c\xdc\x8f\x83\x1b\x62\x2b\x98\xb8\xb9\x30\xa6\
+\x7d\x1a\x71\x3a\xf4\x79\xb2\x77\xc4\xa3\x77\x44\xfe\xee\x65\x3f\
+\xc9\xbe\x9d\x32\xd4\x1d\x68\x95\x83\x69\x87\x1f\x8d\x99\x25\xa0\
+\xc5\xa4\x54\x9b\x56\xd4\xe2\xde\x9d\x02\xaf\x75\x3d\xf8\xd9\x5f\
+\xe0\xbf\xfd\xd5\x2f\x62\xdd\x01\xb3\x7e\x87\x57\xbf\xf4\x2a\xff\
+\xa2\xd5\xe1\x5f\x03\xfd\xa3\x1d\xbe\xfa\xee\x23\xee\x7f\xf5\x92\
+\xad\xa6\xc1\xda\x9d\x09\xed\xab\x01\xbe\x96\x6f\xde\x1e\x59\x2c\
+\x70\xcc\xa9\x07\x61\x7d\x19\x73\x74\xae\xb2\xd8\x64\xa5\x48\xf6\
+\x20\x62\xd2\x98\x56\x8d\xc8\x6c\x39\x71\x25\x4e\xb1\x6a\xd4\x15\
+\x00\xd6\x99\x58\xa6\x69\x56\x2c\x53\x81\x74\x1c\x2d\x60\x8f\x97\
+\x15\x30\xa3\xee\x68\x86\x99\x93\x12\x62\xea\xae\x6b\x56\x0c\xf6\
+\xb7\x9f\xf1\xdb\xff\xe3\xaf\x13\xed\x8b\x94\x9f\xef\x73\xbe\x28\
+\xfc\xc4\x4b\x3f\xc4\x57\x8c\xaf\xb0\x56\x79\xc6\x8d\x92\x68\x9a\
+\x71\xa3\xb4\x44\x94\x3d\x53\x8f\xcb\xab\x86\xda\xae\xd4\xd7\xb9\
+\x51\xf0\x29\xd6\x33\xd3\xaa\xde\xde\xd4\x2b\x21\x80\x3b\x51\xc0\
+\x95\xcc\x3b\xf7\x75\x9d\x91\xe3\x9e\x06\xfa\xf3\x93\x8a\x85\x11\
+\xf4\x71\x9d\x89\x02\xf0\xa4\x62\xcd\x24\xff\xe8\xee\xbc\xaa\x9f\
+\xf4\xa7\xe9\x9f\x59\x33\xab\x6a\x92\x92\x5c\x34\xb5\x7a\x8d\xb5\
+\xf5\x0c\x37\x9a\x4b\x2c\x17\x96\xe7\x5e\xa1\x56\x2a\x45\xce\xfa\
+\x83\x84\x06\x6e\x2e\x8c\x13\x8c\xdc\xbf\x12\xe9\x8b\xad\xab\x1c\
+\xee\x59\xc0\x77\xde\x5f\xe0\xd1\x3b\xdb\x71\x9b\x80\x42\x42\x32\
+\xc8\xfb\x66\x39\x43\x5d\xfb\xba\x66\x39\x33\x33\x68\x32\x74\x92\
+\x97\xfa\x66\xf5\x2e\xbf\x75\x74\xc5\x6f\xff\x57\xff\x0d\x61\x4b\
+\xb0\x71\xd7\xb0\xf8\x3b\x9f\x79\x99\x97\xee\x8b\x31\xc6\xf5\x66\
+\x85\x3f\x7c\xf8\x1e\x7f\xf1\xb5\xd7\x71\xba\x17\x94\x1a\x79\xfc\
+\x14\x13\x5f\xd5\x0a\x2c\xc7\x00\xbe\xe2\x06\xd1\xf8\x52\xe5\x13\
+\x03\xf8\xd5\x56\x82\x8d\x75\xb7\xa9\x39\x88\x8d\xda\x28\x8e\x53\
+\x4b\x1d\x3c\x70\xd1\x7c\xc1\x02\x8c\x6e\x64\x53\xb0\x44\x8e\xb0\
+\xf4\xf9\xca\xa4\x1f\xa3\x26\x80\xef\xe5\xce\x95\xac\x90\x6c\xac\
+\x12\x88\x62\x1d\x7c\x75\x34\xe4\x6b\xbf\xfe\x4d\x9e\xb4\x9f\xd2\
+\x69\xf5\x59\xbe\xda\xa0\xdf\x12\x40\x2e\xec\x3e\xa0\xb2\xb0\xca\
+\xcd\xdc\x27\xe8\x55\x2e\x15\x70\xe5\xa5\xf2\x46\x69\x89\x6a\x7f\
+\x91\xcd\xcd\x90\x6a\x7f\x91\x8d\x8c\x4b\x79\xd5\x60\xd0\xd1\xb4\
+\x9c\x04\xa2\xce\xaa\x12\x60\xf1\x6b\x0a\xcc\xf1\xeb\x6a\xab\x57\
+\x1d\x6b\x60\xd4\x2b\x98\x75\xb0\xa6\x73\x79\x75\x4d\x2b\x2b\x35\
+\xa6\xd5\xce\xb3\x61\xd6\x7a\xd7\x4c\x04\x31\x5e\x5d\x6f\x72\xff\
+\x81\xc9\xe6\xed\x0c\x95\x26\xb3\x5e\x08\xe0\xa4\x7f\x73\x46\x07\
+\xb7\xae\x72\x54\x16\x56\xc9\x72\xa0\x18\xd9\x39\x8d\x78\xb2\x3f\
+\xe0\x57\xbf\xf5\x4d\xde\xfd\xe6\xeb\xb4\xba\xde\x73\xe5\x42\x2b\
+\x6e\x14\x6e\x96\xc5\xfd\xd0\x09\xa8\x94\x6d\xd5\xbf\xc2\x65\x9c\
+\x78\x7f\x2b\x2c\x80\x71\x4c\x60\x36\x79\xeb\xfd\x6d\xfe\xf2\xb7\
+\xbe\x4a\x14\xec\x51\x8b\x7c\x8c\xad\x65\xfe\xd9\x7f\xf8\x25\x2a\
+\xeb\x5b\xb8\xd6\x3a\x4f\xf6\x86\xfc\xd5\x1f\xfc\x11\x1f\xbe\xf1\
+\x94\xc6\x64\x4c\x33\x35\x0b\x7a\xa1\x3b\xe4\xbc\x73\x4e\x98\x9f\
+\x2e\x5c\x79\x95\x15\x12\xae\x89\x5b\x1c\x27\x6a\xf8\xe4\x79\x30\
+\x8b\x5a\x41\x81\x97\x3b\x57\x60\x96\xcf\xeb\x00\x34\x8b\xc9\xac\
+\xb4\xa1\x9f\x4c\xdb\xf4\xac\x7c\x82\x9d\x6d\x7f\x84\xdf\x8f\x30\
+\x33\xe2\xc3\x2a\x95\x22\x97\xdd\x5d\x7e\xed\xd7\xbe\xce\xc3\xf7\
+\xcf\xa9\x5b\x55\x32\xd5\x0e\xc5\x46\x41\x9d\x24\xa5\x83\x62\xa3\
+\x04\xa0\x57\xb9\xa4\xda\x5f\x54\x4e\xfb\xfc\x7a\x5d\x39\xed\xcf\
+\xe3\x01\x8e\x85\xb5\x9b\xac\xad\x2d\x25\x81\xa2\x81\x59\x3d\xdf\
+\x33\x66\x8c\x3f\xfd\x39\xf9\xfc\xa4\x62\x25\xc0\x6b\x0d\x6c\xb2\
+\x7d\x9f\x6e\xd8\x4b\xfc\x0d\xf9\x19\x72\x2b\xf7\x97\x8f\x9b\x66\
+\xa4\x72\x28\xa4\xa1\x29\x35\xb3\x6e\xc0\xdd\xbb\x53\x60\x65\xa3\
+\xa1\xf4\xef\x3c\xe9\x20\xc1\xbb\x56\x79\x36\xa3\x8d\x9b\x0b\x63\
+\x9c\xd3\x48\x19\x74\x4f\xf6\x76\xf8\xea\x5f\x3c\xe1\xb5\xd7\xc6\
+\x9c\x1d\xb6\x55\xa2\x50\xdf\xf1\x12\xcc\x2b\xb5\x70\xe8\x04\x4a\
+\xf7\xca\xfb\x2e\x63\xda\x61\x87\x12\x39\xd1\x71\x33\x1a\x2a\x40\
+\xeb\x40\xae\x37\x2b\xfc\xc6\x71\xc4\xff\xf1\xab\xbf\x40\xe7\xbd\
+\xdf\xc4\x98\x74\x31\x87\x23\x3e\xfd\xc2\xdd\x04\x1b\xbf\xe6\x85\
+\xfc\xe1\xd7\xdf\xe4\x6c\xf8\x94\x61\xd6\xa3\xf7\xec\x50\x8d\x1b\
+\x96\x7a\xd8\x1c\x9d\xb3\xc0\x31\x46\x6e\x91\x1b\x05\x5f\x94\x27\
+\xf5\x23\x8c\xa0\xa5\x6a\xfb\x66\xfc\xec\xad\x62\x97\xa8\x3b\xc2\
+\x5e\x88\xb0\xc7\xcb\x53\x46\xd5\xf2\x89\x65\xef\x89\x84\x11\x61\
+\x99\x4a\x72\xd8\xfe\x28\x21\x19\x6c\x7f\x84\x77\x65\x24\xbc\x19\
+\x56\xa5\x42\xbf\x3f\xe0\x77\x7f\xe3\x21\x6f\xfc\xd9\x1f\xa9\x95\
+\x5d\xab\x0b\x4b\xd5\x30\xb7\x38\xe9\x8b\x6c\x2b\xe7\x34\xa2\x57\
+\xb9\x64\x74\xbe\xa2\x00\x7c\xec\x5e\xe0\x9c\x46\x1c\xbb\x17\xec\
+\x7e\xb8\x4d\xaf\x72\xc9\xee\xae\xc9\x72\x5b\x9c\xa0\xcf\x7d\xfc\
+\x0e\x9b\xf7\xee\xd2\xac\x37\xa6\xa0\x95\xe0\x8c\x8d\xb5\x19\x03\
+\x4e\xb2\x63\x7c\x5f\x02\x50\xa6\x48\xa6\x8b\x3b\xa5\x51\x27\xb3\
+\xd4\xe6\x97\xdf\xd8\x09\xe3\xad\x15\x1a\x34\x7b\x41\x82\xdd\xa5\
+\x61\x28\xd9\x77\xb3\x29\x3c\x10\x42\x03\x2f\xcf\x30\xf0\x59\x7f\
+\x90\x00\xaf\x8c\xc8\x25\x0c\xa3\xd3\x0d\xa2\xec\x19\xce\x69\xc4\
+\x1b\xdf\x9d\xf0\xee\x5b\x67\xfc\xc9\xdb\x8f\x79\xb2\xbf\x23\x7a\
+\xbb\x55\x44\xd7\x22\xa1\x69\x05\x98\x25\x20\xa5\x84\x90\x4c\x2c\
+\x25\x84\x18\x8c\x5e\x51\xdd\x8f\x64\x27\x23\xd9\x3a\x4b\x02\xd9\
+\x2c\x67\xa8\x37\x2b\xfc\xc9\x3b\x7d\x3e\xf8\x9d\xa7\x30\x38\xa5\
+\x6a\x3a\x98\x75\x93\xff\xe0\x27\xff\x96\x62\xe3\x56\xdb\xa0\xbe\
+\xd7\xe1\xc3\x37\x9e\xd2\xe9\x74\xa8\xce\x57\x4b\x4a\x4e\x1c\x0f\
+\x2d\x3a\x43\xf1\xe5\xda\xe6\xfc\x9e\x76\xa5\x30\x87\xd9\x1c\xd4\
+\x12\xac\x0a\xd0\x2a\x26\xa7\xf8\xb8\x91\xad\x80\xac\x8a\x49\x87\
+\x1e\x52\x8a\x78\x56\x1e\x23\x6e\x3d\x65\xfb\x23\xa2\x41\x97\x62\
+\x49\x48\x12\x2f\x77\x2e\x02\x24\x83\x90\xc7\x5f\xdf\xe3\xaf\xbe\
+\xf6\x8c\x52\x39\x4b\xa5\x70\x42\xa5\x2c\x9a\xf7\xad\x54\x27\xdc\
+\x5b\x8d\x30\xb5\x6a\x62\x09\x58\xb9\x55\x49\x2b\x71\x2f\x33\xe7\
+\x34\x22\xca\x9e\xa9\x7d\x72\xfe\x19\x9b\xb7\x37\x58\x5b\x5b\xc2\
+\x35\xc7\xb8\xce\x44\x48\x84\x58\xf3\xea\xf7\x13\x97\x7e\x4d\x3f\
+\x5b\x03\x5b\x31\xb0\xd2\xb4\x31\x20\x25\x98\xf5\x8c\xb3\x52\x59\
+\x44\xda\xe4\x7f\xdd\xeb\x20\xdf\x57\x33\xab\xb4\xaa\x99\xc4\xdf\
+\x95\x8d\x4f\x64\x16\x5a\xb6\x5a\xa0\xbc\xa1\x95\x86\xb5\x66\x59\
+\x58\x6a\xe0\xb3\xfe\x60\xc6\x2b\x21\x2f\xbd\x4f\xf6\x07\x7c\xf5\
+\x2f\x9e\xf0\xe8\x9d\x6d\xfe\xf4\xaf\x5a\xd4\xad\x2a\xcd\x5b\xf5\
+\x18\xb4\x05\x35\xfd\xb4\xef\x78\x54\xca\xb6\x92\x0a\x92\x91\x75\
+\x3d\x1c\x3a\x81\x6a\xdf\x25\x81\xad\xb7\xd2\x2a\x91\xa3\xa3\x8d\
+\xa8\x5b\xac\x2c\x11\x98\x4d\xfe\xed\x6f\xbe\x46\x6b\xe7\xf7\x94\
+\xb7\xe2\x53\x5b\x9b\x8a\x8d\xb3\xcb\x0f\x78\xcd\x0b\xd9\x3e\xde\
+\x65\x10\x57\xac\x67\xed\x1b\xca\xc5\x96\xbe\xe9\x57\xe5\x46\xd8\
+\x15\x72\xa2\x1f\x89\x0c\x39\xcd\xc6\x30\x13\xec\x19\xb3\xaf\x3d\
+\x5e\x4e\x30\x6b\x18\xb8\xaa\x82\x59\x37\xde\x24\x50\x75\x46\xf6\
+\xac\x3c\x5e\x54\x13\x9a\x7a\xa9\x4b\x25\x7f\x17\xdf\xb6\x79\xeb\
+\xdd\x0f\xf9\xed\xaf\xfe\x2a\xf8\x3b\x82\x2d\xe5\x17\x6d\x2e\x61\
+\x98\x5b\x1c\x0f\x2d\x56\x0b\x9b\x73\xf5\x90\xfa\xc2\x67\x01\xdf\
+\xce\x95\x67\x72\x04\xa2\xec\x19\x3b\x3b\xaf\xf3\xe2\xca\x33\x3e\
+\xf3\xc9\x2f\x2a\x00\xea\x5a\x77\x86\x7d\xe3\x4b\x7e\xa7\x16\x26\
+\x58\x52\xa5\x48\xc6\xc0\xd6\xfd\xb8\xe9\x5c\x07\x99\x4b\x9c\x76\
+\xb1\xe9\xef\x93\x0b\x60\x5e\x32\x7b\xf3\x56\xc4\xad\x1b\x36\x9f\
+\x5b\xa8\xb3\x5c\x58\x9e\x61\xe1\x46\x3b\xab\xc0\xbb\x5a\xd8\xe4\
+\xac\x3f\x48\x1c\x23\x63\xb2\xc2\x49\xff\x26\x67\xfd\x01\x3b\x7b\
+\x7b\xec\x6c\x9f\xf1\xed\xf7\x4e\xb9\xec\x65\xb5\x63\xdc\x8e\xbd\
+\x0a\xb6\xca\xfd\x10\x3d\xe5\x82\x84\x34\x90\x60\x95\xc0\x34\xcb\
+\x19\xfc\xe2\x28\xf6\x04\xe5\x14\x78\xf5\x4e\xa1\x4d\x6d\xd0\x47\
+\x2b\x6a\x29\xc9\xf0\x07\xff\xf7\x5b\x0c\xdd\x0f\x31\x26\x5d\x72\
+\x8d\xbc\xd2\xc6\x20\xfa\x2e\x77\xbf\x66\x72\xfe\x6c\xba\x10\xcf\
+\x3b\x42\x42\xcc\xbb\x45\x91\xd0\xc2\x41\xc7\x10\x72\xa2\x62\x50\
+\xca\x4c\x12\xc6\x9d\x39\x70\x85\x31\x37\x70\x3f\xba\x34\x4e\xd6\
+\xd2\xcd\xfc\xa1\x41\x97\x81\x2b\x00\x5d\xe8\x9d\x2b\x03\x51\xea\
+\xe3\xc9\xd1\x90\xdf\xfd\xc5\xd7\x68\x1d\x74\xd4\xc1\x14\xa5\x34\
+\xb0\x79\x3b\x43\xb9\xbe\xc3\x8d\x82\xaf\x80\x7b\x3c\xb4\x58\x68\
+\xef\xf1\xe4\xd4\xe0\x78\x68\xe1\x9e\x05\x9c\x0e\x77\xe9\xd6\xf2\
+\x98\x6c\xe3\x9e\x05\xea\x79\x79\x32\x8d\xc9\x0a\xce\x69\xc4\xc7\
+\x36\x2c\x9a\xf5\x06\x43\xdf\xa5\x63\x44\x09\x46\xcd\xd0\x55\x79\
+\x14\x12\xa4\xd9\xbe\xaf\x3c\x04\x7e\xd1\x23\xdb\xf7\x67\x8c\x3c\
+\xdd\xa7\x2b\x1f\xcb\x82\xd0\x34\x0b\x57\xcb\x83\x19\xd7\x9e\x5c\
+\x00\x19\xba\x6a\x18\x8d\xac\x44\x2e\x6f\x18\xb4\x96\x7b\x09\x16\
+\x96\xff\xdb\x8d\xe9\xc2\x3a\x1d\x8a\xa0\x46\x94\x3d\x53\xc0\x3e\
+\x1e\x5a\x98\x6c\xc7\x81\x8b\x6d\xde\xfe\xc0\x4f\x30\xa9\x04\x6d\
+\xa7\x2c\x1e\xf7\x1d\x8f\x86\x59\xc7\x65\xac\x58\x57\x9e\x0f\x09\
+\x54\xf9\x7c\xdf\xf1\x54\x42\x95\x64\x61\xd9\x9d\x53\x7d\xd7\x94\
+\x3e\x5e\xac\x2c\xd1\x6a\x1b\xbc\xfe\xce\xdb\x0c\x9f\xbe\x4f\x68\
+\xb6\xa9\x45\x7e\x42\x1b\x77\x5a\x7d\xde\x31\x77\x78\xed\x8f\xff\
+\x94\xe1\xc9\xb3\xb9\x78\x6a\xe4\x7d\x4e\x9c\x78\x40\xa4\x21\xb4\
+\x70\xaf\x59\xc5\x08\x5a\x49\x16\x0e\x46\xc2\x3b\x21\x19\xb4\x58\
+\x42\x79\x17\xd2\x99\x6b\xba\xac\xb0\x2a\x15\xac\x8a\x81\x67\x09\
+\xe0\x17\x4b\x60\x23\x7a\x32\xd8\x46\x57\xf4\x31\x5e\xea\xaa\x40\
+\x47\x7f\xf4\x94\x5f\xfb\xb5\xaf\x33\x39\x7f\x44\x76\xf9\xc1\x74\
+\x15\x9b\x43\xc5\xc2\x21\xa2\xd3\xbb\x04\xa8\xdb\xda\xe6\x20\x9a\
+\x10\x85\x3b\xd4\xba\x23\xba\xb5\x7c\x82\x81\xba\xb5\xbc\x7a\x5e\
+\xf7\x27\xde\x28\x2d\x51\x7e\x39\xc3\xad\xad\x57\xf0\x82\x20\x61\
+\x60\x89\xcc\xb5\x38\x49\x29\xe8\xab\xdc\x5f\xf9\x58\x82\x52\x37\
+\xd8\x66\x18\x3a\x7e\x6c\x0d\x6c\x8c\xa0\x9f\xe8\xe2\x23\x75\xae\
+\xac\xbc\xd0\x17\x81\xde\xea\x35\x43\x97\x5a\x46\x00\xf8\xfe\x03\
+\x53\x05\x75\x94\xad\xd1\x64\x46\x13\x57\xba\xb7\x66\xdc\x6a\x67\
+\xfd\x01\x6e\x6b\x9b\xf7\xde\x09\x78\xe3\xdb\xef\xf1\x64\x6f\xa8\
+\x64\x41\xb7\xd8\x57\x8c\x1a\x99\x15\xb2\xce\x58\xe9\x5a\x09\x38\
+\xc9\xbc\xb2\x62\x5b\xea\x5c\xf9\xbc\xde\xff\x58\xb2\xb0\x5e\x4d\
+\xa2\x7f\x9e\x32\x10\xa3\xa7\x64\xaa\x1d\xbe\x75\x60\xf1\xc1\xef\
+\x3c\xc5\x74\x46\xc2\xc8\xd3\xb4\x71\x76\xf9\x01\x97\x3d\xb1\xe8\
+\x5e\xff\xf6\x37\x94\x61\x97\x0e\x7c\xac\x95\x0d\xdc\xb3\x80\xa8\
+\xd2\xc4\x08\x5a\xd0\x8d\x65\x5e\x26\x36\xa4\x8b\x39\x4a\x99\xbc\
+\xf0\x4e\xd8\x46\x97\x68\xd0\x55\x6e\xb5\xc2\x45\x2d\x61\xbc\xc9\
+\x66\x28\x6e\x24\xaa\x9a\xc3\x41\xa8\x5e\x93\x72\xa2\x15\xf9\x71\
+\xe2\xce\x94\x81\xbd\xdc\x39\xfd\xd1\x19\x5f\xff\x8d\x90\x87\xef\
+\x9f\x93\x5d\x7e\x40\xa5\x70\xa2\x19\x3c\xe2\xa0\xe4\xce\x2f\x71\
+\x5b\xdb\x6c\x1f\xef\xd2\x6f\x4d\x07\xf0\x19\xe6\xd6\xf4\x72\x11\
+\x6b\xe5\x5a\x77\x44\xc8\xfd\x84\x76\x06\xd1\x9f\xe0\x46\x69\x89\
+\x5e\xe5\x92\xd5\xae\xc9\x46\xa3\x45\x79\xb1\xa9\xdc\x57\xd2\xa3\
+\x20\x7d\xbb\x72\x4b\xaa\xf8\x72\x52\xb1\xa6\x9a\x38\x96\x14\x92\
+\x45\xab\xbe\x93\x78\x8f\x94\x11\x12\xf8\xf5\xc8\x98\x61\xef\xf4\
+\x63\x05\xe0\x8d\x86\x1a\xdf\x25\x01\x2c\x41\x2b\x59\xb8\xd1\x9e\
+\x32\x4e\x71\xfd\x32\xa1\x89\x85\xf7\x21\xab\xe4\x03\x7d\x61\xfd\
+\xcb\xa0\x85\x6c\xb6\xdd\x29\x43\xd6\x19\x33\x29\xe7\x14\xf0\x74\
+\x90\x96\xc8\x29\xb6\x95\x3a\x57\xbe\x26\x41\x9a\xbe\xf5\x8d\x02\
+\x7e\x71\xa4\x5e\x4b\xba\xec\xaa\x6c\x36\x57\xe9\x5e\xb5\x79\x6b\
+\xcf\x65\xec\xff\x99\xd2\xc6\x77\x63\x6d\x3c\x39\x7f\x84\x6b\xad\
+\x27\x5b\x2a\xd8\x70\x9a\xba\xc8\x1b\xb9\x45\x4a\x2b\x19\x8c\x7e\
+\x8b\x28\xd3\x24\xac\x76\x84\x9b\x2d\x66\xe2\xd2\x60\x3c\xf5\x13\
+\x7b\x51\x2d\xa1\x71\x8b\x25\x91\x18\x5f\xb1\x4c\xdc\xc8\x06\xca\
+\x98\x99\x92\xea\x02\x34\xf5\xaf\x65\x12\x39\x16\xc5\x12\x4a\x3e\
+\xb4\x27\x36\x95\xfc\x0a\xdd\x77\x07\x22\x86\xee\xef\x30\x29\x1c\
+\x29\x57\x4e\x8b\x80\xa6\x39\xe4\xd4\x83\x0f\xdc\x36\x67\xbd\x2c\
+\x67\x3d\xf1\xe5\xa2\x70\x87\xb3\x5e\x56\x0c\xe3\xcb\xdc\x4a\xb0\
+\x70\xb7\x96\xe7\x46\xc1\x27\xe4\x7e\xc2\x11\x0e\x28\xe3\xef\xd0\
+\x35\x58\xad\x6f\x24\x7c\xc0\xf3\xd8\x75\x5e\x70\xc2\x08\xfa\x09\
+\xc3\xad\xea\x3b\x8a\x59\x7b\x56\x99\x52\x39\xab\xc0\xac\x03\x35\
+\xad\x87\x75\x2f\x87\xee\xda\xab\x65\x6a\x34\x6b\x36\x6b\x65\x43\
+\xb9\xd2\xce\x87\xe7\x09\x63\x4e\xb2\xf0\x41\x34\x49\xb0\xae\x2e\
+\x37\x9e\xec\x65\x79\xf2\xf4\x30\x21\x1f\x24\x40\xa5\x1c\x70\x19\
+\x2b\x00\xeb\x06\x9b\x04\xb4\xce\xc6\xe9\xed\xdc\x3a\x40\x5f\x74\
+\xd6\x9c\xf8\x43\xd5\x99\x3e\xbd\x7f\xa7\x4c\x9c\x8b\x01\x27\xef\
+\xfc\x25\x7f\xf5\x97\x21\x70\x85\x31\xe9\x72\xb7\x9e\xe1\xcb\x3f\
+\xf4\x22\xcd\x4f\xff\xdd\xf8\x12\x71\x83\xb3\xb8\x6d\x47\x1a\xc0\
+\x13\xef\x38\xf1\x9c\x11\xb4\x30\x0d\x69\x0b\x39\xb8\x41\x16\xb7\
+\x38\x0d\x6c\x99\x00\x5e\x54\x53\x8d\xb5\x3d\x2b\x8f\x9b\xcf\x29\
+\xc0\xda\x9e\x8b\x59\x14\x4d\x54\xb2\x14\x09\x03\x57\x05\x33\xa4\
+\x9c\x90\x1e\x0a\x29\x45\x1a\x59\x8f\xd3\xc3\x36\x7f\xfe\x8d\xc7\
+\xe0\xef\x80\x15\x5b\xa7\xce\x98\x6e\xb1\x2f\x1c\xeb\x61\x81\x95\
+\xcc\x34\x59\x7b\x83\x67\x9c\xf5\xb2\xe4\x2f\xab\xac\xc4\x3d\x74\
+\x4b\x2b\x99\x84\x85\x7a\xa3\x20\x1a\xde\x01\x8c\x4e\x8e\x66\x13\
+\xaa\x4f\x23\x96\xdb\xed\xc4\x68\xd5\xeb\x8a\x2f\x55\xb2\x79\xec\
+\x41\x90\x2d\xa3\x74\xab\x37\x30\x9b\x33\xb9\x0f\x41\xbd\x81\x5f\
+\xf4\x12\x0b\x62\x52\xb1\x12\xbe\x66\xe9\x86\xd3\x17\x49\xa6\xda\
+\x49\x64\xa3\xe9\xf9\x21\x69\x26\xd6\x1f\xa7\x75\xf2\xee\x7e\xc0\
+\xa3\x77\xb6\x39\x39\x0a\x12\xec\x28\x99\x31\xcd\xb4\x52\x4a\x28\
+\xd7\xa1\x33\x9e\xd9\x6f\xc6\x80\x8e\x35\x70\x1a\xa4\x12\xc8\x66\
+\xd4\x4b\x68\x6f\xa9\xb9\xf5\xc5\xf2\x9a\x17\xf2\xc1\x6b\x5f\xe3\
+\xea\xd1\xd5\x54\xeb\xbe\xf2\xb2\x62\xe3\xcb\xfe\x85\xaa\x9b\xd4\
+\x6f\xa7\x9e\xf0\x58\xe8\xd8\x88\x32\xcd\x79\xe9\xf3\x74\x7a\x3e\
+\x54\x23\x21\x27\x8a\xa5\x64\x32\x4f\x18\xb8\x62\xc8\x4c\x51\x54\
+\x2d\xdb\x9e\x41\xce\xb8\x4a\xf8\x81\x7d\x1c\x8c\x5a\x1e\x8b\xa9\
+\xb7\x40\x32\xf1\x65\xa7\xc3\x77\x7e\xe7\x1b\x3c\x7c\xef\x4d\x4a\
+\xe4\x98\x14\x8e\x14\x2b\x58\x83\x7c\xac\xc3\xda\x53\xf1\x9e\x7b\
+\xc6\x21\xc2\x47\x3c\x5a\x14\xc3\x03\x6f\x64\x6e\xcd\xb8\x90\xdc\
+\xb3\x80\x4a\xf7\x16\x83\x4e\x40\xbb\x31\xa1\xd6\x1d\x71\x3a\xdc\
+\x4d\x78\x32\x0e\x83\x52\xa2\x9b\x4c\x3a\xa0\x21\xc1\xaa\x4b\x0a\
+\xf9\x5a\xda\x7d\xe6\x9a\x63\xaa\xe5\x41\xc2\x78\xd3\xc1\x2e\x19\
+\xb7\x1e\x89\xd2\xf1\x6e\xd8\x4b\x84\x91\x75\xc6\xae\xd5\x6b\x6c\
+\xd5\xfa\x8a\x81\xd3\x01\x0d\xdd\xad\x26\xef\x4b\xe0\x02\x9c\xf5\
+\xb2\xec\xee\x07\xca\xfb\xa0\x03\x71\xe2\xcf\x02\x2e\x0d\x52\xe9\
+\x69\x90\x7e\x62\x5d\x36\xcc\xc4\x00\xa2\xa4\x01\xa7\x37\xf4\x96\
+\xc6\x9d\x94\x1b\x69\xf6\x07\xa8\x2c\xde\xa6\x7b\xd5\xe6\xf5\x77\
+\xde\xc6\x3f\x79\x08\x03\x11\x02\xff\xfc\xed\x1a\xaf\xbe\xb8\x44\
+\x76\xf9\x01\xae\xb5\x4e\x7f\xb8\xc6\xa4\x37\x64\x74\x3a\x5d\x90\
+\x2b\x99\x4b\xa5\x93\xd3\x1e\x2a\x11\xb1\x2b\x53\x1a\x8c\x99\xb8\
+\x19\xea\x55\x2b\xd6\xc4\x2c\x10\x0d\xba\x2a\x60\x21\xdd\x65\x22\
+\xe1\xa7\xac\x65\x45\x15\x15\x3b\x5b\x94\x45\x07\x79\x3f\x1b\x97\
+\x33\x25\xb3\xd6\x76\x8f\x1c\x5e\x7f\xa7\x05\xd6\x56\x22\x46\xdf\
+\x8c\x5b\xde\x34\xcc\x88\x96\xd6\x01\xaa\x79\x3e\x8d\xc7\x4b\x29\
+\x71\x1c\x1c\x70\x3c\xb4\x14\x48\x4d\xb6\x39\x89\x2c\x8e\x83\x03\
+\xa2\x70\x87\x7e\x0b\x8e\x83\x03\x2a\xdd\x5b\xca\x7a\xd7\xeb\xb4\
+\xb2\x7d\x3f\xd9\xc0\x4f\x73\xaf\xc9\xfc\x07\xbd\xe2\xb8\x14\xe6\
+\xe6\x06\x30\xf4\x26\x28\x52\x2f\x4b\xc3\x50\x06\x36\xf4\x90\xb4\
+\x0c\x43\xeb\x4c\xdd\xac\xc3\x67\x1a\x3e\x85\x17\x85\x4b\x50\x4a\
+\x88\xe7\xdd\x74\x50\x9f\xf5\x84\x7c\xf8\xf6\x7b\xa7\x74\xfc\xa4\
+\x01\xe6\x32\x4e\x34\x51\xd1\x8d\x2e\xb9\x9f\xae\x7d\xe7\x01\x3d\
+\xdd\x02\x40\xba\xd2\x74\x96\x96\x7f\x23\x6b\x89\xd7\x24\x53\xeb\
+\xfe\x62\xfd\x6f\x06\x66\x93\x6f\x1d\x58\xec\xbe\xf9\x94\x8b\xc3\
+\x7d\x8c\x89\xb0\xbb\xbe\xf0\x7d\x2f\x2b\x77\x5b\xc9\x3f\x52\xa1\
+\xeb\xd0\xbb\x20\xf4\x2e\x30\x72\x8b\xb3\xdf\x33\x0e\x37\x8b\x88\
+\x9d\x43\x27\x0a\xc8\x96\xa6\xc0\x37\x3b\x97\x27\x4a\x1a\x78\x57\
+\x46\x22\xf9\xc7\xf2\x2e\x54\x98\x59\x6f\x6f\x35\x4d\x49\x9b\xad\
+\xd6\xbd\x68\x89\x1f\x5b\xbe\xd9\x67\x52\x38\xa2\xef\x78\xea\x12\
+\xd6\x8e\xbd\x03\x7d\x47\x4c\xa3\x97\xfd\xcd\x74\x17\x93\x3c\x69\
+\xf9\xcb\x2a\x6e\x6b\x9b\x7e\x4b\x18\x74\xfd\x96\xd0\xcb\x72\xa2\
+\xbc\xdc\x9e\x44\x02\xe0\x12\xcc\x1b\x19\x97\xa8\x78\x53\x01\x4e\
+\xca\x87\xeb\x72\x22\x54\x10\xc4\x1c\xcf\x78\x27\xd2\x59\x68\x3a\
+\x78\x3b\x46\xa4\xb2\xd7\xa6\x33\x9c\x67\x33\xe7\x36\x6a\x59\x56\
+\xea\x0d\xfc\xd2\xb2\x92\x0f\xd7\x25\xf6\x28\xbf\x69\x0c\xf2\xf3\
+\xe1\xb9\x02\xf0\xd9\x61\x5b\x8c\x5b\xb0\x92\xb3\x42\xd2\x63\x0f\
+\xd2\x0c\xab\xdf\xaf\x94\x87\x6a\xd6\xc8\x3c\xcd\xab\xfa\x18\xc7\
+\x21\x6a\x1d\xe4\xb2\x45\x01\x88\x76\x01\x62\xc2\xd3\x73\x16\x45\
+\x4c\x1a\x27\x1f\x3e\xc3\xcd\xf7\x08\xcd\x36\x95\x7c\x86\xc6\x0b\
+\x5b\xca\xdd\xe6\xb4\xe4\x57\x92\x00\x00\x20\x00\x49\x44\x41\x54\
+\x5a\xeb\xca\x28\x3c\xeb\x88\xf6\x62\x69\x7d\x3c\xe2\x4c\x85\x9b\
+\xaf\x8a\x13\x26\x6e\x66\x0a\xe0\x58\xd6\x9a\xe1\xc2\x92\x72\x8f\
+\xd9\x86\x08\x41\xcb\x00\x86\xcc\xfd\x95\x00\x96\x92\x43\xb2\x6f\
+\x1a\xd8\x51\x77\x44\xe0\x4e\x3d\x10\xd9\xe1\xba\xba\x94\x4d\xfc\
+\x61\x82\x0d\x4c\x6b\x05\xfa\x10\x8d\x2f\x71\xcf\x16\x18\xb4\x87\
+\x0c\xda\xe2\x00\x0e\xda\x43\x3e\x70\xdb\xf8\x07\x43\xce\x7a\x59\
+\x8e\x83\x69\x0b\xcd\x83\x9c\xc7\x59\x2f\xcb\x68\xb1\xa7\x0c\xc1\
+\x4a\xf7\x16\xfd\x9a\x60\xee\x5e\xe5\x92\xcd\xdb\x1b\x2c\x65\x92\
+\xbd\x80\x75\x60\xea\x9a\x55\x07\x72\x9a\x89\xd3\x41\x8c\x74\xe2\
+\x8f\x8c\xcc\xb9\xce\x44\x19\x80\xd5\xf2\x80\x6c\xdf\x27\x43\x97\
+\x6a\x79\x30\x63\xc8\xcd\xbb\x55\x9a\x49\xe0\x4a\x83\xcf\x3d\x5b\
+\x50\x00\x16\x33\x38\x0a\x33\xc0\x9b\x07\x64\x1d\x4c\xba\x97\xa1\
+\xef\x14\x94\xbf\xf7\x3a\xa3\x4d\xee\xa3\x0f\xd6\x91\x7f\xb7\x1e\
+\x19\xea\xb1\x7e\x25\xa8\x3b\xd3\xbf\x23\x3f\xbb\x6e\x55\xe9\x06\
+\x5d\x1e\x05\x63\xf2\x7b\x87\xca\xc0\x03\x78\xf5\xc5\xa5\x44\xa4\
+\x4f\xca\xa3\xe3\xb1\xa7\xb4\xf0\x89\x13\x71\xa3\xe0\x33\xf1\xb7\
+\xb8\x8a\x9b\xa9\x64\x5c\x93\x6c\x29\xa0\x34\xc8\x31\x71\x33\x8a\
+\xa1\x55\xc4\xce\x8b\x6a\x78\x51\x0d\xdb\xe8\xce\x00\x73\xc6\x8f\
+\x37\xb1\x67\xb6\x97\x9d\x0e\x57\x91\xc7\xee\x91\xc3\xde\x5b\xef\
+\x63\x5c\x39\x4c\x0a\x47\x31\x18\xf2\xea\x80\xe8\x07\xb0\x1b\x74\
+\x39\x71\xa2\x38\xed\xee\x4a\x01\x58\xe9\xdb\x28\x8b\x91\x7b\xa6\
+\xd8\xf9\xac\x97\xe5\xd6\xd8\xe6\xd6\xd8\x56\xde\x0c\xc3\xdc\xe2\
+\x38\x38\xc0\xe9\x6c\xb1\xd0\xde\xe3\x9d\xb7\x77\x18\x9e\x3c\x53\
+\x56\xb8\x0e\x44\x09\x60\xd1\x10\xdb\x4b\xe4\x44\x74\x6a\xa1\x8a\
+\xac\xcd\xcb\x87\x48\x34\x3d\x29\x67\xc9\x74\xda\xca\x07\xac\xbf\
+\xa7\x15\x1a\xca\x2d\x27\x73\x22\x9e\x07\xe0\xf3\xe1\x79\x42\x3a\
+\xc8\xe7\x9c\xc3\x88\xe3\xd6\x05\x8f\xf7\xf6\x12\x43\x67\xf4\x63\
+\x98\xb5\x0a\x33\xcc\x3c\x4f\xc7\xea\xa0\xee\x1b\x05\x05\x58\xf9\
+\x3f\x6b\x15\x08\xfd\xb3\x29\x90\x8d\xe7\xb3\xfd\x75\x8b\xa6\xe3\
+\xf7\x94\x7d\x61\x46\x3d\xe8\x84\x1c\xb7\xb6\xd9\xdb\x1f\x13\xb6\
+\x62\x9f\xb8\x0d\xab\x8b\x0b\x4a\x52\xe8\x89\x48\x0b\xed\x4b\xce\
+\x02\x21\x27\xa4\x0b\x72\xc8\x10\xc3\x89\x08\x4a\x71\x43\x1f\x37\
+\xa3\xe4\xc4\xc4\xcd\x4c\x2b\x3b\x8e\xc2\x9c\x02\xaf\x04\xb2\x8c\
+\xbe\x19\xb5\xfc\x0c\x90\x0b\xa5\x7d\xe5\x85\xf0\x72\xe7\x34\xb2\
+\x02\x08\x12\xc0\x0f\xdf\x7b\x93\x16\xc2\x5a\xd5\x5d\x3a\xfa\x41\
+\x50\x07\xa8\x37\xe4\xc4\x89\x70\x0e\x93\x55\x21\xd1\x58\xac\xc8\
+\xf5\xb1\x00\xb0\xf4\x58\xe8\x65\x49\x80\x1a\x15\x15\x85\x3b\x7c\
+\xcb\x13\x1e\x8e\xa7\x1f\xfe\x85\x00\x9f\xd6\x32\x55\xca\x00\x1d\
+\xc0\x7a\x80\x43\x1a\x75\xe9\xe0\xc6\x3c\x9d\x2c\xbd\x14\x7a\x25\
+\xb5\x9e\x23\x0c\x62\x08\xa3\x34\xe4\x74\xc6\xfd\x28\xf9\x20\x82\
+\x37\x0b\x7c\xe7\xa8\xc5\xd9\x61\x5b\x31\xbc\xce\xc2\xcf\x03\xae\
+\x0e\xcc\x79\x52\x43\x67\x57\xfd\x33\x03\x6a\xaa\x29\xb7\xfe\x19\
+\xe9\x5b\xa2\x03\xe7\x75\xee\xb8\xd6\x48\xc9\x8d\xc3\x68\x89\x63\
+\xf7\x82\xf6\xd9\xd4\x0b\x51\xbf\xbb\xce\xad\xaa\xa3\xc2\xd5\x7a\
+\xec\x40\xf7\x56\x1c\x0f\x2d\x2a\xd6\x31\xa6\x51\x26\xe3\x9a\x04\
+\xa5\x90\xba\x91\x21\x28\x85\xd3\x8c\xb6\x6a\x24\x40\xbc\x60\xd8\
+\xd0\xac\xce\x0f\x29\xc7\x3d\x29\xa4\xfb\xac\x3d\xb1\x95\x17\x22\
+\xea\x8e\x18\xba\xb7\xb9\xec\x08\x2b\xcd\x3f\xda\x65\xbf\xfb\x14\
+\xac\x2d\x31\x32\xab\x3c\xbb\x72\x3b\x86\x68\x3b\x25\x0f\x5c\xab\
+\x3b\x1d\x50\x28\x81\xab\xdf\x0e\xb9\xc9\x4a\x75\x32\x03\xe4\x85\
+\x4e\x9f\xdd\x7d\x41\x51\xbb\xfb\x01\xbb\xfb\x01\xcd\xf3\x2a\xee\
+\xd9\x11\x7f\xfe\xc1\x00\x3a\xbd\x19\x8d\xab\x1b\x67\x12\xd0\xcf\
+\x73\xc3\xc9\xe8\x9c\x0e\x64\x09\x6c\xf9\x79\x3a\x80\xd3\xfe\xe0\
+\xc2\x8b\x2b\x09\x0d\xac\x33\xee\xf9\xf0\x3c\x61\xe0\x45\xe3\x38\
+\x83\xef\x30\x62\x7f\xef\x50\x69\xcf\xeb\xd8\xef\xa3\x9e\xbf\x8e\
+\x34\xd2\x8b\x20\x0d\xe4\x34\x18\xaf\xfb\x7b\x92\xad\x13\x2e\x3a\
+\x2d\x53\x50\x1a\x77\x67\x87\x6d\xe5\x0e\x0d\xcd\x27\x54\xf2\x19\
+\x6e\xd7\x16\xa8\xac\x88\x41\x06\xd1\x82\x00\x49\x7f\xb8\xa6\x48\
+\x4d\x77\xa9\x4e\xfc\x2d\xea\x46\x3c\xd0\x87\x88\x4e\x14\x90\x71\
+\x4d\xc5\xc6\xae\x33\xc1\x1c\x2e\x75\xb9\x8a\x3c\x91\x37\xbc\x94\
+\x64\x63\x19\x42\x8e\xba\x23\x15\xc9\x2b\x94\xf6\x13\x09\xf4\x6b\
+\x76\x5b\xb1\xf0\xd1\x33\x0f\xe7\x59\x05\xfc\x1d\x2a\x65\x9b\xc6\
+\x42\x8d\x97\xd6\x56\x55\x7a\xa4\xd4\x55\xed\x7e\x98\x90\x14\xad\
+\xae\xa7\xdc\x6d\x3a\x90\xa3\xf1\x25\x46\xee\x19\xfe\xc1\x50\x49\
+\x0a\x29\x39\x0e\xa3\xd8\x30\x3b\x9b\xfa\x8b\x0f\x46\xe2\xfb\x77\
+\x3a\x7d\xae\x3a\x9d\xb9\x27\x54\x7a\x0f\xd2\x0c\xab\x3f\xd6\x19\
+\x3a\x1d\x8e\xd6\x47\x7a\xc9\x5c\x0b\x23\xe8\x8b\xdf\x17\x37\x38\
+\x59\xd9\x68\x70\xfb\xce\xc6\x47\x1a\x6e\xd3\xc4\xa6\x05\x8c\xdc\
+\x33\x9e\xee\x2d\x70\xe2\x44\xec\xb6\x4e\x13\xde\x9b\xff\x3f\xc0\
+\x9d\x07\xc4\xb4\x1c\x79\xee\xe7\xc5\xf3\xf0\x5c\x67\x22\x16\xaa\
+\xe6\x07\xd7\x59\x5e\x77\xf3\x51\x8d\x12\x95\x31\xcd\x46\x44\xf7\
+\xaa\xcd\x69\xf7\x19\xfe\xc9\x43\x25\x29\xac\x85\x29\x61\x3a\xcf\
+\x84\xbb\x52\x46\x73\x2f\x7b\x59\x46\xa7\x41\xc2\x4b\xd1\x89\x02\
+\x25\x25\x80\x84\xb4\x28\x95\xb3\x98\x7a\x98\x59\x32\xac\x04\xb0\
+\xfe\x9c\x64\x63\xf9\x58\x26\xd0\xb7\x4d\x21\xba\xf7\xf7\xb6\x71\
+\x76\x0f\x15\x80\xa3\x85\x32\xb7\x6f\x35\xd8\xbc\x77\x97\x5b\x5b\
+\xaf\xd0\xa9\x85\x73\xfd\xb1\x41\xaf\x1e\x5b\xa7\xc2\x6f\x7c\xe2\
+\x44\x09\x0b\xd5\x39\x8c\x38\x8c\xb2\x0c\xda\x43\xdc\xb3\x23\xdc\
+\xb3\x23\xa2\xf1\xa5\xfa\x2f\xc1\x2e\xef\x97\x56\xd6\xe7\xea\x5a\
+\xbf\xe8\x31\xa9\x58\x89\x82\xcf\x79\x60\xd6\xbf\x9f\x5f\xf4\x04\
+\x40\xb5\x1c\x60\x1d\xc0\x51\xa6\x92\xa8\x93\xcb\x54\x3b\xa2\xbc\
+\xa8\x6c\x50\x5a\xb9\x9a\x09\x64\xe8\x00\x96\xf2\x49\xdf\x9e\x9c\
+\x3c\xe6\xd1\x9e\x90\x10\x59\xab\x90\x60\xf9\xef\xe5\xfe\x5f\x07\
+\xe8\xcf\xf3\x6e\x48\x63\x57\x5e\x6d\x16\xa2\x5e\x02\x9c\xcf\xfb\
+\x6c\x5d\x8e\xf5\x8d\x02\xd4\x4d\x06\x9d\x2a\xef\xb5\x8e\xe3\x64\
+\xad\x2e\xb5\xb0\x97\x30\xee\xd2\x49\x4b\x18\xc7\x1c\xb7\xa6\xb2\
+\x22\x8c\x92\x25\x5e\x19\xad\x35\x82\xeb\x4c\x84\x9c\x58\x37\xc7\
+\x44\xdd\x91\x48\x8e\x37\xba\x1c\xc5\xa5\x3b\x92\x99\xa5\x2e\x96\
+\x00\x1e\x2e\x75\x29\x5c\xd4\x54\x9e\x84\x7f\xd2\x21\x3a\x9b\xb0\
+\xdf\x7f\x06\xd6\x16\x2b\x75\xb8\x91\x13\x27\xdb\x58\x0d\xb9\xf3\
+\xb9\x8f\xb3\x94\x7f\x89\xa3\xc9\xe5\xcc\x6a\xcf\x54\x3b\x62\xfe\
+\x71\x1f\xe5\x72\x5b\xc9\x08\x81\x2f\x45\xbe\x0e\x52\x79\x93\xcc\
+\x9d\xde\xee\x1c\x0f\xa1\x5e\x55\x1d\xd9\x75\x90\xea\x7a\x38\x3d\
+\x1c\x66\x1e\x2b\xeb\xaf\xe9\xc0\x4e\xcb\x11\xd7\x99\x90\x09\x5b\
+\x6c\x36\x57\x79\x75\xbd\xa9\x74\xb0\x1e\x85\x3b\xeb\x65\x95\xc1\
+\x26\x81\xbb\xeb\x0f\xd4\xef\xfb\xce\x51\x04\xfd\x24\xc8\xe4\x40\
+\x46\x79\x05\xd1\xef\xcf\x2b\x8f\x9a\x07\xe8\x4e\x2d\x7c\x2e\xd8\
+\xaf\x03\xa2\xaa\x02\x8f\x8d\xd5\xef\x65\x41\xe8\x59\x83\x7a\x6e\
+\xf5\x71\x4b\xe4\xba\x48\x5d\x1c\x99\xd5\x19\xe3\x4e\x37\xf0\x2e\
+\x7b\x59\x65\xd8\x95\xad\x64\x7a\xa5\x04\xb4\xdc\x2a\xc3\x4e\xca\
+\x07\xc9\xc0\x0b\x86\x9d\xd0\xc4\x51\x77\x34\x95\x1a\xb9\x73\x05\
+\x60\xc9\xc6\xbb\xfb\x87\x7c\x67\x47\xf4\x98\xbd\x6d\x8f\x30\xed\
+\x25\xb2\xab\x05\xd6\xcb\x37\xb9\x73\xcb\xe2\xde\xc7\xee\xf3\x89\
+\x1f\xbd\x49\x79\xb1\xa9\x26\xd1\xab\xd0\x6e\xac\xc3\xe4\x20\x6f\
+\xc9\xc8\xd2\xf9\x2d\xd9\x19\xe0\x2c\x58\x54\xf7\xd3\x80\x9e\xf4\
+\x86\x1c\x1c\x7b\x9c\x9c\x3c\xc6\x08\x45\x86\x59\x7a\x98\x8b\xee\
+\x61\x90\x1e\x04\xbf\xe8\xcd\x14\x73\x4a\xd6\x95\xfb\xcb\x13\xa3\
+\xfb\x8d\xf5\xc7\x55\xdf\xa1\xb6\xd0\x48\x78\x22\x96\x0b\xcb\xf4\
+\x5b\x53\xe6\x35\x72\xcf\x70\x0e\x23\x1e\xfb\xcf\xd4\x6f\xf0\xb7\
+\x0b\x9c\x38\x11\xdf\x39\x6a\xd1\x0e\x3b\x4a\x03\x77\x8c\x68\x2e\
+\xe8\x74\x20\xab\x63\x28\x2f\xf7\xa9\xd7\x75\xf9\xa6\x6f\xbf\x57\
+\x30\xa7\xf3\x4e\xbe\x17\xb6\xd7\x17\x94\x7c\x6d\xe8\xbb\xec\x74\
+\x2b\x38\xa7\x11\x9d\xa1\x43\x68\xb6\x29\xd8\x49\xe3\x4e\xea\x61\
+\x3d\xc3\x4e\x1e\xa3\xab\x8e\x99\x00\xad\x69\x94\x09\x23\x47\xe5\
+\x52\xa8\xa4\x78\xf3\xea\x82\xa3\x30\xc7\xe8\x72\xac\xbc\x14\x57\
+\x91\xa7\x74\xb0\x64\x5c\xc9\xc6\x92\x99\x0b\x17\x35\xae\x22\x8f\
+\xa3\x67\x22\xa0\x51\x29\xdb\x64\x6b\x49\x7f\xd1\xde\x81\x4f\xe0\
+\x9e\xb0\xbe\x6e\x26\x58\x2d\x1d\x7c\xe8\x39\x45\xba\x9d\xee\x8c\
+\xb8\xd7\x81\x2a\x2d\x57\xf9\x03\x0f\x8e\x85\x51\x38\xe9\x0d\x69\
+\x85\x9e\xf8\xdf\x81\x4e\xa7\xab\x66\x64\x5c\xc7\xb4\x3d\xa7\x48\
+\xd5\x77\xc4\x90\x18\x6d\x30\xcc\xdc\xf0\x73\xaa\xbf\x84\xee\x72\
+\xab\x96\x07\x50\x37\x55\x7d\x5c\x22\x68\xb3\x28\x02\x30\x6f\x39\
+\x7b\x42\x2e\x38\x11\x85\x73\x41\xcf\x8f\xfd\x67\x6a\xd1\x02\x6a\
+\xf6\x47\x1a\xb0\x3a\x30\x5d\x67\xa2\x80\x22\xbf\xe3\x44\x1b\xa1\
+\x9b\xb8\x55\x93\x8f\xd3\x2c\x9e\xce\xed\xb8\x8e\x91\xd3\x36\x41\
+\x22\xd3\xac\x6a\x24\x5d\x79\x73\x3e\x6b\x99\x88\x56\xd7\x53\xc6\
+\x9d\xe9\x8c\xa8\xe4\x33\x34\xfd\x48\x19\x77\xa5\xb8\xff\xb4\x64\
+\xe2\x79\x9e\x0f\x09\x5a\x09\x60\x5d\x62\x98\x57\x91\xc7\x45\xb3\
+\xcc\xba\x29\xa6\x8a\x1e\x85\x39\xae\x22\x8f\x75\x73\xcc\x55\xe4\
+\xa9\x5c\x08\xdb\x17\x6c\xdc\x9e\xd8\xca\xb0\x1b\x2e\x75\xf1\x2f\
+\x2b\xec\x77\x9f\x72\x11\x78\x44\x0b\x65\xf2\x9b\x1b\x64\x57\x85\
+\xe5\x6a\x0c\x9e\xc1\xce\x09\x4f\xf6\xde\xe5\xe8\x28\xa4\x5e\xab\
+\xcd\xd5\x4f\x32\xdf\xb6\x15\x1a\x74\x3b\x5d\x76\x5b\xa7\x2a\xc3\
+\x49\x02\xba\x5f\x38\x56\xf7\xd3\xc0\xdd\xef\x45\xf4\x9d\x42\xa2\
+\xc9\x89\x1c\xee\x22\x07\x1e\x02\x34\x7b\x41\x82\x8d\x75\xf0\xce\
+\xd3\xc9\x7a\x7e\xc5\xf3\xea\xea\x36\x9b\xab\x33\xa9\x95\xe7\xc3\
+\x73\x31\xfc\x1c\x31\x10\xf2\xc4\x89\x38\xeb\xb4\x69\x85\x62\xe1\
+\x15\xce\x9b\x9c\x75\xda\xb4\x43\x23\x61\xc4\xe9\x40\xd5\xb7\x7a\
+\xf1\xaa\x7e\x5f\x26\xf5\x1b\x41\x3f\x31\x0b\x5a\xff\xde\xf2\x33\
+\x25\x6b\xcf\x63\x58\xd7\x99\x90\xa1\x9b\xcc\xc0\x0b\x73\x2a\x45\
+\x75\x1e\x80\x75\x03\x7d\x26\x33\xb0\x27\x00\x1e\xd4\x1b\xca\xb8\
+\xeb\x5f\x5e\xe0\x8f\xe3\x29\x5c\x0b\x9a\xe1\xd6\xea\x27\x24\x45\
+\xdf\x28\xa8\x73\xed\xc5\x73\xf5\xc2\xc8\x49\x00\x58\x07\xb2\x59\
+\x5a\x1e\xb3\x58\xaf\x2b\x1d\xbc\x6e\x8e\x59\x30\x6c\x8e\xc2\x9c\
+\x02\xf2\x82\x61\x73\xe8\x08\x66\x96\x3e\x62\x10\xb9\xc7\xd6\x62\
+\x1f\xc3\x78\x85\x7a\x64\x28\x1d\xac\xdc\x63\xa1\xd0\xa8\x3b\xaf\
+\xef\x32\xde\x13\xef\x93\x39\xbe\xe9\x03\x23\x67\xba\x49\x40\x77\
+\x3b\x7b\x89\x93\x2e\x26\x16\x4d\x99\xab\x15\x7a\xf1\x7e\x5d\x11\
+\x12\xed\xf4\x13\x4c\x20\x87\xbb\xe8\x33\x33\xa8\x9b\x33\x2e\xb3\
+\xe7\x69\x61\xfd\xf3\xf4\xf2\x24\x7d\x9f\x5a\xa6\xa6\x1a\x5d\x8b\
+\x61\xe7\xd3\xdb\xae\x3f\xc0\x39\x8c\xe8\x46\xef\x72\xd6\x69\xd3\
+\x34\x6d\xf5\xdd\xe5\x55\xc3\xec\x25\xdd\x10\x93\x8a\x95\x60\x5e\
+\x1d\x20\x69\x2d\xac\x57\x5e\xeb\xad\x04\xe6\x85\xd8\xd3\x9f\x21\
+\x35\xaf\x9e\x52\xaa\xe7\x89\x7c\x94\xa4\x88\x7a\x11\x8d\x8a\x99\
+\x04\x70\x2c\x61\x4a\x61\x4e\x15\xe7\x36\xe3\xd4\x99\x41\xa7\xca\
+\xe8\xa8\xc3\x38\x3f\xf5\xcc\x2c\xdc\x11\x57\x93\xec\xf2\x03\x42\
+\x27\x50\xff\x2b\x91\x20\xa8\xed\xe3\x5d\x6a\xb1\xc7\xc9\x34\xca\
+\x0c\x26\xb9\x19\x4d\x0c\x60\x95\x82\x4d\x42\x5c\x16\xeb\xf5\x38\
+\x42\xb2\x0c\xdd\x11\x8b\xf5\x3a\x5e\x77\xc4\x82\x21\x18\x37\xe3\
+\xde\xc6\xc8\x7a\xb8\xe7\x39\xec\x7a\x9e\xcb\x4e\x87\x05\xc3\x66\
+\xf7\xc8\x81\xcb\x37\x68\xd6\x1b\x64\x57\x0b\x6c\x98\x02\xbc\x93\
+\xd3\x21\xc7\x63\x0f\xe3\x2a\x76\x6a\x13\x40\xa7\x07\x18\xb1\x6b\
+\xca\x9e\xd1\xaa\x3d\x0b\xd5\xa3\xb7\xe6\xd4\x68\x11\x89\xd6\xfe\
+\x15\x0f\xfa\xd0\x8a\xfb\xf1\xb7\xf0\xe8\x06\x5d\x4c\x6b\x85\xe0\
+\x9a\xcb\x98\x35\xb0\xd5\x9c\x0c\xc5\xbc\xf1\x02\xb9\xee\xf2\x38\
+\x0f\xd4\x7a\xe7\x1e\x2b\x6e\x7c\x22\x07\x2a\x6e\xd4\xb2\x09\x19\
+\x71\x73\xf2\x03\x89\x80\xc5\xd2\x38\xe2\xe0\xd8\x63\x10\xda\x89\
+\x85\xd7\x77\xa6\x2e\x2a\x11\xf1\x43\xb1\xa8\x94\x06\x7a\xc7\xa2\
+\x49\xc5\x82\x48\xb8\xf7\x6a\xe5\xaa\x72\xf5\xa9\x2b\x45\x0c\x7c\
+\xc9\x9a\x92\x9d\xb3\xf1\xa2\x70\xfb\xc9\xb4\xd1\x7a\x39\x0b\x44\
+\x33\x75\x85\x35\x6a\x22\x73\x2f\xfe\x7d\x32\x37\xba\x6e\x56\x67\
+\x02\x1e\x13\x7f\x48\xbb\x1f\xb2\x64\xd9\x94\xca\x4c\x7b\x7c\xf4\
+\x72\x64\xc2\x16\x41\x3c\x6d\x55\x04\x3d\xda\x1c\xb7\xb6\x39\x76\
+\x1f\x70\xef\xc0\xa0\xb8\x71\x48\x73\xe1\x06\x1b\x85\x35\x2a\xeb\
+\x5b\xf4\x8f\x76\xa6\x0b\xc7\x5a\x07\x7f\x87\x70\x6f\x9a\xbe\x30\
+\x98\x8c\x80\x1c\xe5\x5c\x0e\x34\xbf\xb4\x33\x8e\x87\x31\xca\x22\
+\xd0\xc4\xa5\x22\x2e\xfb\x31\x6a\x79\x8c\x5a\x9e\x52\xb0\xa9\xa2\
+\x72\xeb\x8b\x05\xa2\x18\xe4\x99\xa6\xd0\x77\x6b\x6b\x4b\xdc\xda\
+\x7a\x85\xf5\xf2\x4d\x8e\x72\x2b\xd0\x15\xcf\x1b\x57\x0e\x2d\x02\
+\x5a\x9d\x36\x74\x7a\xaa\x79\xc9\x3c\x36\x94\x9e\x04\x31\x35\xc8\
+\x26\x13\xb6\xa0\x67\x08\x3f\x72\x47\x38\xfe\xf5\xff\x00\xe1\xe5\
+\xc9\xb5\x9a\x4e\x4a\x88\x19\x63\x44\xbb\x02\xa4\x59\xa6\x66\x56\
+\x67\xa2\x79\x7e\xd1\x13\xf9\x11\x5a\xe7\x9e\x9e\x55\xa6\xea\x3b\
+\x34\x6b\xb6\x2a\x31\x4a\xdf\x8e\x5b\x17\x1c\x1c\x7b\x0a\xb8\xf2\
+\xaa\xd1\xea\x24\x93\x69\xea\xf5\x4a\xe2\x72\x4f\xcf\x50\x60\xec\
+\xd4\x42\xda\xa3\x5e\x3c\x61\xa9\xa0\xd8\x56\xce\x7b\x56\xa0\xbc\
+\xc6\xf7\x7d\x9d\x9f\x3c\x1d\x95\xd4\x0d\x6d\xf9\xfb\x24\x53\xeb\
+\x5d\x8a\xd2\x40\x96\xb9\x14\xfa\x42\x70\xcd\x31\x41\xbd\x41\xa6\
+\xd3\xa6\xd9\x10\x41\x8f\x8b\x74\x2b\xbc\xe1\xec\x31\x53\x7a\xb8\
+\x70\x42\x25\x1a\x52\x5b\x68\x88\x1c\x99\x23\x71\xa5\x2a\x66\xc7\
+\x38\xe3\xb1\x60\xe0\xb8\x54\xa9\x98\x15\x6e\x40\xeb\xf4\xd1\x1e\
+\xd6\x5a\xfd\xda\x1f\xbd\x51\xb6\x19\x65\x4a\x1a\x38\x0a\x88\x41\
+\x19\x60\x37\x61\x73\xbd\x8c\x7f\xef\xae\x72\xa7\xdd\x3c\xb5\xd8\
+\xf5\xf6\x39\x39\xb9\x50\xec\xab\x0e\x76\xcc\x2c\xe9\xc1\xdd\x69\
+\xf0\x15\xac\x52\xac\x57\xc7\xe0\x14\x81\x79\x40\x2d\xe2\x57\x3d\
+\xfc\x9e\xcb\x72\xdd\xe0\xbc\x13\x25\xe6\x24\xa7\x3f\x4f\x2d\xd0\
+\xa0\x0f\xd8\x73\x0d\x11\x31\x89\x47\x78\x23\xdc\xfe\x34\x8b\xed\
+\xaa\x62\x91\xc5\x9f\xeb\x8d\x90\x3a\x58\x67\xe0\xe3\xd6\x85\xd2\
+\xec\xf4\xa7\x9e\x17\x7d\xe6\x5d\x5d\x16\x9c\xfa\x43\xc5\x92\xa3\
+\xb6\xc3\xc6\x9d\x06\x5f\x7a\xe5\x25\x8a\xdf\x27\xaa\x59\x8e\x8e\
+\x42\xf6\xb7\xf3\x1c\x7e\xe7\x37\xa7\xa9\x9d\x65\x31\x2a\xb7\x16\
+\x7f\xcf\x6e\xd1\x83\x38\x47\xba\x1b\xf4\x00\x9b\x7a\xd7\xc4\x35\
+\xe7\x87\xd3\x67\xec\x92\x8a\x35\x3b\x82\xa1\x1a\x7d\xcf\x5e\x09\
+\xd7\x99\x88\x6c\x39\xf9\x19\x3d\x43\x68\xe1\xa0\x4b\x00\x2c\x55\
+\x60\xa7\x5b\xe1\x4b\xf2\x9c\x30\x20\xdb\xee\xb2\xba\xb8\xc0\xad\
+\xaa\xc3\x43\x92\xdd\x88\xfa\x86\xc8\xe5\x70\xcf\x8e\x38\x76\xd7\
+\x69\x70\x87\xc1\x24\x37\x35\xf0\x6a\x3e\x61\xe4\x30\x98\xe4\xc4\
+\x1c\x3b\x00\xff\xa4\x43\xef\x9c\xb9\xcd\x2c\x76\xe9\x70\x18\x5c\
+\xb0\x21\x9b\x6e\x67\x37\xb0\x16\x3d\xe8\x78\x5c\x76\x3a\xec\x1e\
+\x39\x18\xab\x21\xcd\xee\x6d\x5a\xec\xab\x6c\xa4\x76\x0c\x60\x79\
+\x59\xcb\xf6\x7d\xa8\x66\xc1\x99\x3f\x81\x3e\x7d\x19\x97\xc3\x0a\
+\xa5\x81\xa6\xef\x2b\x81\xe9\xf7\x42\xac\xaa\xc9\x79\x27\x54\xc3\
+\x0c\xf5\xf7\xa5\x01\x3c\x2f\x99\x67\x9e\x7c\x90\xd3\xea\x6b\x66\
+\x95\x6e\xb1\x47\xb6\x9f\x7c\x4f\x6d\xa1\x41\xf1\xbe\x37\x53\x62\
+\x24\x3c\x10\x17\x42\xb7\xc7\xe0\xad\xc5\x6d\x4c\x45\xc6\x5b\x72\
+\x68\xa3\x94\x00\x2a\x21\x7c\x73\x8d\x4f\xbd\x7c\x8b\xaf\xfc\xa3\
+\xaf\x50\xfa\xc4\x0b\x5c\x99\xd0\xde\x1e\xf1\x27\xfc\x1e\x3b\x4f\
+\x2d\xba\x81\x90\x13\xad\xd0\x88\x67\x47\xcb\xdc\x0d\x21\x21\xba\
+\x7a\xc6\x5e\x0c\x28\x29\x2f\x66\x7e\x73\xdc\xc2\xb6\x1b\x4e\x7f\
+\x9f\x3c\x76\x69\x43\x4d\x77\x9d\x49\x29\xa1\x8c\xc8\x9e\x41\xb5\
+\x3a\xa0\xe7\xa4\xdc\x73\x64\x45\x20\x4b\xef\x6d\x17\x8f\xb9\x5d\
+\x2a\x14\xe8\x67\x8d\x19\x26\x56\xa5\x6b\xe5\x21\xdd\x8e\xf0\x42\
+\x1d\x0f\x2d\x36\x8d\x0e\x9d\x48\xe4\x87\x86\x91\x83\xd9\xab\x63\
+\xd6\x62\x92\xab\x46\x58\x7f\xfe\xf0\x4d\x8c\xc2\x0a\x37\x2d\x8b\
+\xab\x7d\xc1\xa6\xd1\xa9\x89\xb5\xbe\x49\xe0\x3f\xa5\xd9\xbd\xcd\
+\xed\xca\x11\xa1\x1d\xb7\x0d\x9d\x1c\xb2\x7b\x64\xb1\x91\xf1\x39\
+\x0c\x2c\x02\x5f\x18\x33\xad\xda\x3e\xd1\xa9\xc9\x33\x3f\x3e\x29\
+\x12\xc0\x9a\x2b\xa8\x1b\xf4\xa0\x48\xa2\xc0\x52\x19\x53\xd2\x10\
+\xd3\xb6\x0c\x50\xc3\x0b\x67\x46\xca\x0e\x52\xef\x21\xf6\xe1\x22\
+\x64\x49\x61\x30\x7f\xe0\xb7\xc8\x62\x9b\x0f\xe0\x9a\x53\x4b\x9c\
+\x7c\xb7\x2f\x98\x59\xf7\x0f\x37\x7b\x01\xcd\xda\x0d\x3e\xbe\xb9\
+\x30\x13\x42\x96\xfe\x6a\x9d\x7d\xbb\x41\x37\x1e\x30\x8e\xda\xaa\
+\x4b\x7b\xd7\x84\x6a\x96\x97\x1e\xbc\xc0\xe6\xbd\xbb\xdc\x5d\xce\
+\x72\xeb\xde\x16\xc5\x9b\x2b\x74\xdb\x01\xa7\xef\x74\x78\xfd\x83\
+\x3f\x63\xef\xf1\x07\x64\xfb\x3e\xf5\xfa\x72\x9c\xd2\x6a\x43\x6c\
+\x68\x4a\x26\x15\xfa\xf5\xfa\xe8\xa3\xf4\x77\x2b\xad\x1d\x77\xfb\
+\x94\xbf\x6f\x26\x27\x79\x4e\xee\x35\xc0\x45\xe0\xb1\x64\xd9\xd4\
+\x25\x1b\x57\xa3\x69\x3b\x83\xf8\x73\xab\xe5\x81\xf0\xff\xc7\x00\
+\x0e\xea\x0d\x76\x5b\xa7\x1c\x07\x07\x94\xdb\xfb\x30\xfc\x24\x64\
+\xcb\x2c\xad\x5b\xc2\xcd\xf6\xfe\x1f\xd3\x1f\xae\x51\xe2\x48\x54\
+\x89\x94\x1b\x10\xe7\x9b\xd7\x52\xc9\x67\x83\x49\x8e\x62\xb5\xc3\
+\x60\x3c\x6d\x0c\x69\xad\x97\x6f\x2a\xe0\x3d\xf3\x7d\x38\x82\x68\
+\x78\x02\x1f\x3c\x8b\x13\x70\x4e\xe0\x02\x8c\x82\xf8\xa1\x37\x63\
+\x6b\x69\x37\x96\x0f\x00\xd1\xa9\xd0\x38\x47\xcf\x3c\x26\xde\x31\
+\xce\xb3\x8a\xd0\x4c\xfe\x90\x4e\xcc\x04\xf5\xc8\x48\x8c\xbc\xd5\
+\xe7\xb4\xc9\xc7\x12\xb0\x0a\x9c\x96\x60\xdd\x4c\xa6\x06\x74\xa7\
+\xcc\x1a\x3b\x0a\x74\xd0\x4b\x26\x2e\x0c\x4a\x0c\x7b\x2e\x3e\x42\
+\x52\xe8\x4c\x2c\x80\xd8\x67\xe8\x4f\xf7\x6f\xf6\x02\xa5\xc3\x25\
+\x80\xf5\x74\x4d\x6b\x20\x18\xd9\x65\x42\xd3\x8c\xa8\xdd\x91\x79\
+\x11\x57\x8a\x85\xa5\x0f\x58\x67\xe0\x80\x9a\xca\xb3\xf0\x7d\xf1\
+\x7d\xe4\x1c\x3b\xc8\xaa\xb6\xb2\x9f\xb9\xb3\xcc\xdf\xfc\xa7\xf7\
+\xb9\x63\xdd\xc7\x66\x81\xca\x4d\x8b\x63\xe0\xe8\x9b\xdf\xe5\xe7\
+\xff\xb7\xd7\x79\xba\x2d\x86\xf3\x98\xc5\x08\x3a\x02\x28\xa5\x6a\
+\x36\x31\x9c\xd1\xed\x4f\x70\x99\x02\x52\x1a\x7c\x89\x81\x90\x45\
+\x0f\xd7\x91\xe0\x1c\xcf\x18\xae\x3a\x0b\xeb\x4c\x3d\x4f\x53\x5f\
+\x04\x1e\x75\x8c\x44\x74\xcf\x35\xc7\x6a\xa8\x8e\x34\x56\xe9\x19\
+\x64\x9b\x79\x2a\xd1\x90\xee\x55\x88\x7f\x30\xe4\x24\x28\xb2\x64\
+\x3a\xc0\x22\x8d\xc1\xd4\xc5\x39\x29\x1c\x81\x13\xbb\xd8\x1c\x8f\
+\x5a\xa6\x46\xb7\xd3\xe5\x38\x38\xe0\x13\xbc\x48\x31\x9b\x67\x30\
+\x11\x3a\x58\x4a\x0b\x95\x9d\xa8\x03\x53\x6e\x29\xdf\x9c\x7b\x99\
+\x7f\xe6\xfb\x18\x83\x67\xc2\x78\x03\x38\x12\xef\x79\xe6\xfb\xd4\
+\x3b\x1e\xfb\xdd\xfd\xb8\x55\xeb\x98\x8b\xc0\x03\x63\x3a\x87\x58\
+\x9d\xd0\x39\xab\x3e\x5d\x41\xa1\xef\x53\xb0\x4a\xd0\xf7\x09\xe2\
+\xfb\xf3\xe4\x85\x3c\xf8\xe9\xc9\x9d\x72\x7f\xc9\xf4\x69\x5f\xb0\
+\xf4\x88\xe8\x60\x96\xba\xd9\x2f\x6a\x03\x15\x7b\x39\xaa\xa1\x43\
+\x2d\xd3\x88\x27\x77\x4e\x01\x7c\x30\xbc\xc9\xc8\x39\x54\x00\x6e\
+\xb5\x0d\x5c\x53\xe8\x78\x0b\x9b\xf1\xf8\x04\x62\x83\x4c\xaf\xd3\
+\x93\x03\xcc\xd7\xca\x06\x7b\x07\x3e\x66\xb8\xc3\xa0\xb3\xcd\xe9\
+\x1f\x1f\xf2\x03\xaf\xfe\x10\x00\x9f\xf8\xd1\x9b\xdc\xb6\x3f\x4b\
+\x6b\xe1\x81\xb2\xe0\xcf\xb6\xdf\xa0\x49\x53\x63\xc0\x89\x02\xae\
+\x3c\xc6\x6e\x6c\x43\xc8\xb6\x5c\xfa\xa0\x48\x1d\x74\x7a\xf0\x46\
+\x12\x86\x3c\x4e\x99\xb8\x87\xf2\xdc\x4e\x9e\xb1\x8c\x90\x19\xe9\
+\x72\xf1\xcf\xb8\xf4\xaa\x59\x91\x9f\x1c\x67\xca\x1d\x8c\xba\x30\
+\xfe\x10\xf8\x7e\x16\x32\x11\x7b\x95\x12\x5b\x95\x21\x0f\xd7\xb7\
+\xe8\xef\xed\x28\xcf\x83\xe8\xfb\x86\x60\xe3\x5e\x96\x43\xd7\xa0\
+\x52\x14\x03\x0b\x07\x13\x7d\x5e\x74\x9c\x69\x28\xe5\x43\x7a\x9b\
+\x06\xef\x4d\xcb\xe2\xa6\x65\x11\x59\x37\xb9\xa9\x3d\x0f\x10\x9d\
+\x4d\x78\x77\xe7\x21\x51\xdc\x0e\xe9\x22\xf0\x94\x1f\xd3\x2f\x82\
+\x3b\xe7\xb2\x95\x98\x7d\x9c\x9a\x44\x6f\x61\xce\x68\x59\x09\xc8\
+\xb4\xbc\x60\x30\xdf\xf8\x48\x03\x7e\xd8\x73\xa7\x2e\x37\x8d\xe9\
+\xe5\xdf\xed\x59\x82\xe5\xba\xe5\x6e\xa2\xb3\x8f\x72\xb1\x99\x4d\
+\x56\x36\xea\xca\x9d\x26\x2b\x2f\x46\xad\x29\x80\x0f\xbb\x13\x86\
+\xa1\x0b\xa1\xb6\x80\x62\x00\xcb\xef\x2a\xbd\x1d\x3d\x47\x8c\x0d\
+\x33\x72\x8b\xac\x5c\x1e\xf0\xd4\xbf\xc3\x07\xaf\x3f\x06\xe3\x98\
+\xa8\x78\x93\xfb\x9f\xff\x24\x3f\x76\xe3\x0b\x14\xbf\xfc\x05\x26\
+\x8d\x02\x17\xad\x2f\xf1\xd6\x1f\xee\xf2\x26\x30\x39\x7f\x04\x3d\
+\x03\xbf\xec\xc5\xda\xb8\x88\xcb\xac\xf4\x91\x25\x55\x69\x3b\x20\
+\x13\xb6\xf0\xcb\x99\xc4\x00\xf5\x82\x55\x12\x83\xd1\x7b\x0e\xe7\
+\xb8\xe0\x94\x66\xd2\x2b\xf5\xec\x36\xf5\x58\x6b\x40\x9e\x96\x23\
+\xea\xbd\x71\x0e\x89\xe5\x9e\xb3\xbb\x6b\xb2\xb1\x75\xc1\xc2\xc6\
+\x6d\x2a\x0b\x8b\x74\x17\xe4\x49\xd8\xc2\x2c\x9c\x28\x03\xaf\x44\
+\x8e\x7e\x27\x6e\xec\xee\x6f\x03\x9f\xc1\x1f\x58\x58\xc5\x3e\x50\
+\x49\x78\x44\x4c\x80\xae\x7f\x7f\xea\xc4\x8e\x01\x6c\xac\x86\x82\
+\x79\x57\x43\x6e\x5a\x96\x92\x0e\xfa\x56\x32\xf7\x7e\xf7\x29\xad\
+\x83\x4e\x02\xc0\x1d\x23\xa2\x66\x56\xe7\xb2\xaf\x1e\x54\x48\xaf\
+\x74\x69\xb0\xe9\x46\x9c\x6e\xa4\xe9\xa1\x64\xfd\x73\xd3\x9a\x59\
+\x37\xfe\x74\x50\xfb\xbd\x90\x28\x53\x51\x72\x42\x06\x32\xfc\xa2\
+\x97\x00\x70\xa2\x8a\x23\x14\x5d\xd1\xd7\xca\xd3\x0a\x8d\x83\xe1\
+\x4d\x8e\x5b\xc2\x88\x6b\x75\x62\x00\xfb\xee\xdc\x2b\x80\xba\x52\
+\xc4\x7f\xaf\x15\x0a\x5f\x79\xd0\xab\x73\xdc\xba\xc0\xfe\xf4\x16\
+\x3f\x7c\xcb\xe0\xc1\x8f\xdf\xe3\xc5\x1f\xfc\x22\x9b\xb7\x37\xf0\
+\x4f\x3a\x7c\xeb\xf0\x82\x77\xdf\x38\xe1\xfd\xdf\xd9\x65\xcd\xdb\
+\xe7\x1f\xfc\x0d\x93\x2f\xff\xc4\x06\xd9\xe5\x07\x1c\x4d\x2e\x89\
+\x32\x95\x44\xcf\x37\xfd\x7b\xcf\xdb\xca\xbf\x9f\x0e\xb3\xeb\x84\
+\x71\x8e\x91\x78\xec\x9a\x63\x5c\x73\x3c\x75\xb3\x69\x1d\x46\x13\
+\xb3\x4f\xb4\x9b\x1e\xf5\xd3\x0d\xbb\x9d\xae\x00\xdf\xd9\xf0\x29\
+\xe3\xe1\x15\x99\x6e\x9b\x8d\xc2\x9a\xc8\xa1\xf0\x77\x66\xab\x45\
+\xea\x26\x83\xf6\x90\x6a\x7f\x91\xfe\xa0\x8b\x55\xf4\xf1\x07\x96\
+\x62\x61\x95\x3b\x11\x9d\x9a\xd4\xd7\x3f\x4c\x80\x57\x82\xba\xcc\
+\x83\x19\x46\x4e\x3f\xb6\xd6\x37\xb9\x5d\xbb\x4b\xb6\x99\xe7\x22\
+\xf0\x44\xda\x5e\x2a\x14\x19\x65\x2a\x89\x18\xbc\x7e\x40\xf5\x01\
+\x31\xd7\x01\x53\x02\x21\x0d\x50\xc9\xdc\x12\x2c\x2a\xd4\xdc\x0b\
+\x67\x16\x8d\xee\xa9\xd0\xf5\xae\xcc\xa3\xb8\xce\x53\xe2\x3a\x13\
+\x6a\x77\xa6\xc9\x3d\x52\x03\x37\x2f\x8e\x14\x80\xaf\x3a\x9d\x04\
+\x9b\xe9\xdf\x5b\x7e\x17\x1d\x60\x7a\x7f\x8b\xb3\xc3\x36\x7b\xaf\
+\x1d\x52\x5e\x35\xf8\xe2\x67\x3e\xc7\x8f\xfe\xbd\xcf\xf2\xf2\x27\
+\x57\xb9\x73\xb3\xc8\x46\xc6\xe7\x5b\xdf\x7d\x8d\xdf\xfa\x8d\x5f\
+\xe1\xf7\x7e\xf5\xf7\x38\x0a\x73\xdc\xbb\xf3\x0a\xad\x07\x1b\x34\
+\xf2\xd5\x99\x06\xdf\xd7\x79\x5c\x12\x55\xdf\x73\x8e\xb1\x7e\x7f\
+\x99\x48\x91\x46\x22\x76\x10\xf4\xe7\xba\xe9\xd2\xcf\xa5\xcf\xab\
+\xee\x92\x6b\x75\x3d\xa2\xec\x19\x79\x56\x70\x49\x85\xb2\xad\x64\
+\xb9\x52\x89\x1c\x01\x35\xd1\xe2\xd5\xbd\x60\xa3\x34\xdf\xe5\x57\
+\x2a\x67\xb1\xee\x7f\xfe\x93\xf8\x97\x15\xac\xcf\xf7\x45\xf4\x0d\
+\x78\xf5\xee\x90\xc3\xe0\x2e\x0b\x77\x7c\x02\x1f\x16\xec\x0d\x5a\
+\xec\xc7\xa0\xfe\x50\x31\xf6\xfa\xba\xa8\xe6\x30\x56\xb2\xe2\x4b\
+\x04\x0f\x55\x56\x5a\x3d\x32\xe8\xc4\x91\x26\x79\x49\x13\xee\x9e\
+\xf9\x2e\xae\xb4\x3e\x53\x46\x9a\xef\x42\x0f\x7c\xdc\x84\x11\x37\
+\x57\x0f\xc7\xd2\x41\xee\x3b\xec\xb9\x09\xa3\x45\x07\xb2\x6e\xd0\
+\x28\x3d\x88\xa9\x5c\x4d\xcd\xfa\x40\x15\x82\x16\x57\x93\x25\x56\
+\x8f\xfd\x67\x14\xce\x9b\x74\x3b\x5d\xdc\x98\x09\x75\xf6\x95\x2c\
+\xaf\xff\x16\x7d\xe1\xd6\x23\x43\xc8\x8c\x6a\xc4\xf6\x55\x87\xee\
+\xaf\x7f\x9d\x47\xef\xdc\xa0\xfc\xca\x21\x0b\x5d\xd1\x19\xe9\x0b\
+\x1f\xbf\x4f\xb1\x9e\x61\xf3\xde\x5d\x8e\xc7\x1e\x61\x7e\x19\x3f\
+\x7c\x88\x65\xbe\xc4\x0f\x1b\x23\xde\x90\x2e\xba\x39\x2c\x7c\x5d\
+\xe4\x32\x7d\xac\xf5\xab\x97\xce\xc4\x46\x3f\x22\xdf\x28\xcf\x1c\
+\x2f\x5d\xeb\xea\xe4\x23\xc9\x44\x12\x4b\xda\xd5\x26\xd9\xbf\x06\
+\x8c\x0f\x26\xf0\xfd\x10\x19\x5d\x20\x98\x1b\xf4\x90\x92\xa2\xa9\
+\x35\x79\xba\x74\x45\xae\x85\x55\xf4\x29\x7a\x2e\x7d\x16\x89\x68\
+\x09\x4d\xbc\xba\xb1\x81\xb3\x50\xa6\x5c\x74\x58\xdd\x00\xbf\x2f\
+\xc2\x2b\x2b\xdd\x51\x9c\x00\xf4\x4a\x2c\x6b\xea\xf8\xf9\x0e\xd6\
+\xda\x2b\xec\x5a\x9a\x53\x70\x1d\xd6\xfd\xa7\xec\xaf\x6f\xb1\xfb\
+\xd6\x9f\x53\xcf\x2e\xaa\x4b\x88\x8c\x0e\xd5\xca\xc2\xdf\x0a\x95\
+\x19\x8b\x39\x7d\x5f\xd7\xc9\xc2\xa8\x22\x21\x23\xa4\x0b\x2d\xed\
+\x47\x96\x5e\x09\xaa\xe2\x3d\xfa\xeb\xe9\x13\xb6\x4c\xa4\x2e\x9b\
+\xcb\x44\xf4\x00\x33\xec\x01\x75\xc2\x4e\x87\xe5\x66\x4d\x65\xb9\
+\xd5\xea\x0d\x5e\xb0\xa6\x39\xc2\xdb\x8f\x42\x0a\xbd\x26\xbb\xad\
+\x53\x7a\x4e\x51\x7d\xae\x6e\xc0\x0d\xfd\xa9\x27\xc2\x1a\xd8\x6a\
+\xa1\xc8\xdf\xa4\x8f\xba\x2d\x58\x25\x7a\xc0\x5b\x3b\x27\x98\x4f\
+\x3e\x24\x72\x2b\x2c\x55\x44\x7f\xb2\xf5\x7b\x5f\x64\xf3\xde\x06\
+\x5f\x78\x61\x93\x93\x70\x0d\xcb\x14\x44\xf3\xf0\xfd\xf3\x99\x2b\
+\xca\x75\x41\xa3\x79\x72\x4b\x5e\xb9\xe8\xcd\x46\x36\x0b\x56\x89\
+\x11\xce\xcc\xfe\x05\xab\x94\x18\xb2\xa3\x37\x57\xd4\xf7\xd5\xff\
+\xa6\x0c\x9b\x97\xca\x62\xd0\x7a\x37\x80\x9d\xfd\x3e\x2f\x5e\x5e\
+\xd0\xb8\xb5\xc5\x62\x63\x13\xd8\x4b\xba\xd9\xfc\x23\x05\xe4\xbe\
+\x51\x50\x19\x8b\x1e\x57\x71\xe3\xca\x0a\xbd\xc8\xc3\x2a\x7a\xf8\
+\x72\x1c\xb2\x4d\x0e\x8a\x5a\x32\x45\x25\xbe\xd4\x55\x2a\xac\x02\
+\x36\x01\x1e\x19\xc2\x41\x48\x18\xe7\x57\xc8\x3c\x8b\x28\x06\xfa\
+\xf2\xc2\x57\xc8\x58\x1f\xb2\xf3\xb4\x09\x5d\xe1\x10\x97\xda\x78\
+\x52\xb1\xe8\x10\x51\x37\xab\x74\x88\x34\x46\xf6\x67\xee\xa7\xa5\
+\x86\xce\x64\xf2\x80\x4b\xb6\x4d\xb0\xb5\xe6\x52\x4b\xeb\x69\xdd\
+\x90\x93\x8f\x7b\x56\x19\x7c\x97\xaa\xef\x08\x30\x03\x8b\x66\x85\
+\x16\x90\xcb\xad\xd1\x73\x44\x7e\x44\xed\x4e\x43\x25\xb9\xef\xfa\
+\x03\xc2\xa3\x0d\xfa\x85\x77\x39\xd9\x1b\x27\xb4\xa8\x34\xe0\x74\
+\x06\x4e\xe8\xd3\xd8\xaf\x9d\xce\x8e\x2b\x55\xb3\x4c\x0c\x8b\x7a\
+\xd7\xa4\x64\xe6\xa0\x5e\xa7\xb9\x04\x9f\x7a\xe5\x05\x3e\xf1\xa9\
+\x17\x09\xef\x3c\xc3\xdc\x3b\xe5\x1b\xe7\x13\x16\x6c\x9f\xab\x27\
+\x87\xbc\xf1\xfe\x5f\x31\x39\x3f\x52\x75\xea\xfa\x15\x4e\xff\x3e\
+\xf2\x6f\xa6\x01\xac\xa2\x9a\xbd\x59\x90\x0e\x7d\x97\x51\xdb\x21\
+\xaa\x18\x62\xa1\xa7\x5e\x5b\x26\xa2\xe7\x94\x67\xe4\x42\x9a\xcd\
+\xe5\xdf\xc9\x84\x2d\x4a\xd5\xc6\x34\x5a\xd9\x11\x39\x14\xa3\xa3\
+\x0e\xd1\xfa\x39\xb9\x8d\x06\x37\x3e\x56\xe5\x3b\x1f\xc4\x55\x1c\
+\xbe\xf0\x50\xa8\x4e\x9b\x8e\xc8\x58\x3c\x1e\x5a\xdc\x02\xaa\x46\
+\xc8\x80\x3e\x90\x4c\x1d\xb0\x3c\xc6\xe4\x0b\x21\xa3\xa1\x39\xb3\
+\x55\x65\x4b\xe4\xe2\x39\x83\x7a\xf5\xab\x07\x95\x05\xb2\xb4\xa8\
+\x34\x96\xf9\xdb\x1b\x77\xf9\xb3\x3f\x3a\x10\xe1\x51\x3f\x62\xc9\
+\xb2\x55\x75\x82\x14\xfb\x75\xb3\x4a\x27\x8e\xf5\xcb\xe8\x92\x9e\
+\xb4\xa2\x07\x23\x54\x07\xf6\x5e\x88\x15\x9f\xb1\x82\x55\x52\x5e\
+\x06\xc9\x76\x09\x66\xd1\xa4\x83\x7c\x6f\xda\x9f\x2c\x13\x78\x86\
+\x18\x0a\xcc\xca\xa0\x89\x43\xca\x3d\xab\x4c\x50\x6f\xb0\x12\x37\
+\xaa\xde\xf5\x07\x2c\x9d\xd8\x7c\xe7\xe4\x31\x7d\xa7\x41\xcf\xe9\
+\xcf\x8d\x06\x8e\xc7\x27\xe4\x58\x9b\x0b\x64\xfd\x52\xde\x2d\x8a\
+\xc8\x9b\xeb\x4c\xc8\x02\xae\x29\x82\x2b\x5b\xa6\x41\xf1\xbe\x17\
+\x03\x58\x5c\x52\x9f\x9e\x4f\x78\xfd\xf7\xdf\x10\x9d\x7f\x34\xf7\
+\x98\xee\x49\xd1\x43\xe9\xba\x27\x64\x9e\x4e\x4f\x3f\x97\x5e\xf0\
+\x51\x3c\xd4\xe5\x42\x73\x02\x0c\xf5\x63\x74\x8d\x7c\x49\x2f\x08\
+\x19\xe4\xd0\x23\x7f\xd4\xc5\x39\xea\x55\x2e\x31\x96\x97\xb1\xa9\
+\xf0\xc9\xdb\x9f\xe1\x83\xca\x43\xe1\x75\xf1\x87\x98\x75\x5b\x25\
+\xc8\xcb\x71\x63\x2a\xd0\x61\x87\xf8\x03\x8b\xaa\x11\xd2\x1b\x78\
+\x58\x45\x5b\x34\x14\xb4\xc9\x61\x0e\x23\x6c\x02\xcc\x61\x3c\x93\
+\x21\xde\xe6\x0b\x61\xfc\x21\xde\x14\xb8\x6a\x2b\x9e\xb7\xb1\xf1\
+\xdb\x67\xd8\x35\x9f\x9f\xfa\x99\x2f\x51\x5f\x7c\x85\xa3\xab\x2b\
+\x2e\x02\x4f\x95\x85\x4b\x4f\x85\x9e\xef\x2a\x19\x44\x4f\xc8\x49\
+\x07\x19\x74\x9d\xab\x07\x44\xae\xab\x8f\xd3\x25\x84\xae\x9d\x75\
+\x00\x5b\x55\x53\x49\x89\x79\x9a\xb0\x67\x95\xa9\x96\x07\xdc\x6b\
+\x8a\xa6\x27\x17\x6b\x1e\x4b\x27\x36\x8f\xfd\x67\xa2\x61\x75\x47\
+\x00\xd8\x0c\x7b\x33\x97\xe1\x5c\x6e\x6d\xae\xaf\x3b\xed\x03\xd7\
+\x7f\x8f\xdc\x2f\xdb\xf7\x69\x05\x70\xf6\xa4\xc1\xd7\x77\xf6\xf8\
+\xf3\x3f\x3d\xe4\x4f\x7f\x79\x9b\x3f\xfc\xfd\xaf\xb1\xb3\xbb\xaf\
+\x0a\x5f\xe7\x75\x2c\x92\xbf\x4d\x97\x4e\xba\x36\x9f\xe7\xb9\x19\
+\xfa\xae\xea\xe1\x5c\xb0\x4a\x18\xfd\x88\x65\xa6\xc6\x53\x54\x31\
+\xbe\xa7\xec\x3e\xdd\x08\xd4\x8f\xa5\xde\x6d\xbf\x63\x88\x3e\x75\
+\x74\x42\x0e\x23\x31\xfd\xaa\x7d\xb0\xc3\x78\x78\x45\x34\x39\xa6\
+\x7a\x73\x43\x94\x2a\xf5\x0c\xfa\xc3\x35\xd5\xa4\xb0\xef\x14\x68\
+\x85\x1e\x6e\x5c\xde\x24\x3d\x13\x03\x3b\xc4\x88\xfd\x76\x71\x65\
+\x87\x97\x64\x57\x5d\x64\x0f\x0b\x78\xaa\xf1\xc6\x75\x40\x06\x8f\
+\x0c\xfe\xf1\x29\x9b\xf7\xef\xf3\x77\xff\xa3\x2f\xb2\x79\xf3\x87\
+\x45\x3a\x60\xa7\x4f\xa7\xd3\xa7\x51\x31\x67\xaa\x14\xd2\xae\x35\
+\xc9\xc6\x3a\xa8\x25\xf8\xfc\xa2\x37\xd7\xeb\x20\x73\x85\x75\xb6\
+\x9d\x77\x40\x75\x40\xeb\xde\x82\x74\xd8\xbb\xea\x3b\x54\xcb\x03\
+\x6a\xf5\x1a\xc3\xe5\x16\x17\x6b\x9e\x0a\x27\x9f\x3d\x69\x24\x72\
+\x7f\x43\xb3\x3a\xa3\x27\xa5\x6e\xd7\x7f\x83\xee\x19\xf0\x8b\xc2\
+\xaf\x2b\xaf\x4c\x52\xfb\x27\x4a\x8d\x3a\x7d\xfe\xe4\x37\xff\x8c\
+\xd7\x5e\x7b\x97\x6f\xfe\xe5\x43\x26\xad\x11\xcd\x5a\x93\x4c\xa3\
+\x96\x30\x98\x66\x02\x42\x73\xb4\x70\x9a\x69\xd3\xc7\xd0\xce\x64\
+\xd4\x6b\x51\xc5\x48\x64\x9b\x49\x80\x7b\x41\xa0\xfe\xeb\xbf\x51\
+\xff\xdb\xf3\x58\x58\x5d\x2d\xc2\x1e\xf5\xc8\x20\xca\x54\xb8\x0c\
+\xfb\x42\x1e\xc4\x6d\x78\x33\x83\x0c\x4e\x2f\x69\x34\xcb\x86\x3b\
+\x6a\x94\xc2\x9c\x61\xb0\xfe\xc0\x22\xa2\x05\xf4\xa7\x7e\x62\xfd\
+\x66\x93\xc3\x63\xac\x6d\x03\xf5\x8a\xbe\xd7\x8c\x21\xd1\xee\xe0\
+\x84\x7d\x7e\xe0\x2b\x3f\xcc\x7f\xf6\xdf\xff\x34\x5f\xfe\x47\xff\
+\x82\x8d\x57\xff\x21\xed\x51\x0f\x6b\x90\x57\x6d\xa5\x9e\x5b\xb3\
+\x15\x03\x59\x4f\x85\xd4\x99\x38\x11\x42\xd6\xc0\x9b\x8e\xc8\xa5\
+\xc1\xec\x05\xc1\x5c\xd9\x31\xb3\x30\xea\x26\xb5\x7a\x8d\xe2\xaa\
+\xc7\x0b\xd6\x4d\xda\x87\x2d\xfc\xed\x02\x1f\xb4\x3a\x84\xfe\x19\
+\xe7\x9d\x48\x81\xc4\x0c\x7b\xea\x04\xea\x27\x54\x46\xc8\xa2\x4c\
+\x25\xb9\xc8\xa4\x8f\x36\x9e\x24\xaa\x03\x41\x56\x54\xeb\x9f\xa3\
+\xb2\xcf\xcc\x31\x9d\x5a\x98\x58\xe0\xba\x54\x4a\xbf\x4f\x6f\x18\
+\x93\xf0\xfa\xa4\xae\x46\x33\xe9\xb7\xfd\x28\xc1\xbe\x12\xe0\xe9\
+\xed\xf3\x5c\x74\xf2\xb1\x5e\x64\xaa\x8f\x06\xce\xe5\xd6\xa6\x87\
+\xba\x50\x26\x73\xcb\xa4\xb1\x24\xbe\xcb\xad\xaa\x43\x76\xf9\x81\
+\xea\xdb\xa7\x7c\xce\x41\x57\xb5\x6a\x98\xbd\x55\x24\x13\xdb\x0a\
+\x98\x1e\x19\x60\xda\x0d\x5e\x00\xd8\x4e\x30\xee\x3c\x36\xb6\xc9\
+\xe1\xd9\x25\xec\xf6\x19\xe5\x41\xc8\xe6\xfd\xfb\x7c\xf9\x67\x5e\
+\xe4\x9f\xff\xcb\x1f\xe3\xe5\xcf\xfd\x24\x9d\x4e\x5f\xc9\x0b\x29\
+\x27\xae\x3a\x1d\xd5\xb3\x21\x68\x77\x71\x2e\x5b\x04\xed\x6e\xe2\
+\xc4\xea\x27\xbb\x69\x46\x89\xcb\xa5\x7e\x72\xd2\x60\xd4\x41\xdf\
+\x1e\xf5\x68\x68\x03\xaf\xf5\x13\x19\x76\x3a\x0a\x84\x4d\x33\x4a\
+\x00\xf8\xb1\xff\x8c\xca\xf0\x06\x67\x9d\x36\x51\x6f\x9a\xe4\x22\
+\x59\x47\x67\x62\x9d\x89\xa4\x91\xaa\x03\x53\xff\xbe\xf3\x6a\xd6\
+\x9e\x97\xa4\xaf\x2f\x6c\x3d\x99\x67\x1e\xdb\xa6\x0d\xdb\xb4\x4f\
+\x5d\x2e\x3a\xf9\xf7\x24\xbb\xea\xf2\xc1\x48\xcd\xe7\xf6\x82\x20\
+\x01\x60\x3d\xb2\x9a\x06\xb2\xdc\x66\xc2\x56\x02\xc8\xba\xcd\xd0\
+\x0a\x45\xbd\x5d\x67\xe8\x60\x3a\x19\x36\x1b\x9b\xd4\x3f\xb6\x7e\
+\xed\xef\xaf\x65\x6a\x2c\x74\xfa\x8c\x2e\xc7\xca\xc5\x66\x15\x7d\
+\x15\xf0\x50\x33\x3b\x04\x1c\x05\xeb\xba\x03\x83\x52\x31\x96\x11\
+\xde\x50\x03\xab\x27\x0c\x3c\x6f\xa8\xc0\xec\x69\xd3\x73\x04\x73\
+\x67\x70\x46\x2d\x9c\xab\xef\xb2\x10\xc2\xda\xcd\x02\x3f\xf5\x33\
+\x5f\x62\xe3\xd5\x7f\x48\xb6\xef\xb3\x7b\xf6\x8c\xa3\xab\x2b\x8e\
+\xae\xae\xf0\x82\x80\xd2\xfa\x02\x77\xee\xbf\xc4\xbd\xef\xfb\x24\
+\xeb\x77\x37\x71\xfb\x22\x09\xbc\xdf\x9e\xa8\xd2\x22\x79\x70\x64\
+\xbe\xb0\xae\x8b\xd3\x72\x61\x1e\x2b\xd8\x99\x4c\xe2\x79\x9d\x89\
+\xc3\x38\x09\x5e\x3e\x27\xcb\x87\x54\x75\x75\xa7\x1d\xfb\x82\x27\
+\x73\x3d\x1e\x73\xfd\xd5\x73\xca\xfd\xf5\xe8\xa0\x7e\xa5\xf9\x5e\
+\x92\xf8\xf5\x54\xcd\x79\x85\x04\x69\x37\xe2\x75\x36\x42\x3a\xfa\
+\x79\xdd\x4d\x67\x63\xa3\x1f\xcd\x00\xf8\xba\x9b\xfc\xfd\x32\x17\
+\x5c\x8f\xe2\x49\xe9\x98\xcb\xad\xd1\xed\x74\x39\x88\x26\x71\xbd\
+\xdd\x25\xad\xb0\xcb\x6a\x7d\xda\x11\x68\x5e\x4f\x8b\xc3\x28\xcb\
+\xbd\xdb\x59\x0d\xbc\xe2\xd8\x55\x8d\x30\xce\x01\xf7\xda\x60\x17\
+\x94\x7c\x28\x15\x03\xdc\xc1\x90\x52\xb1\x00\xb6\x94\x14\x36\xee\
+\x60\x88\x59\x1c\x63\xdb\x0d\x6c\xaf\x0d\x76\x43\xe4\x73\xe2\x29\
+\x30\xdb\x71\x02\x87\x07\x74\xdb\x5d\x6c\xc6\xbc\xd0\x28\xf1\xcf\
+\xff\xe5\x8f\xf1\xdd\x77\x6f\x71\xb5\x67\xe1\xf0\x88\x9b\x96\x85\
+\xb5\xbe\xc9\x67\x3f\xb1\x8e\x99\x29\x31\xa0\x8a\x37\xec\xf0\xe4\
+\xc3\x6d\xf6\xf7\xb6\xd9\x7b\xfc\x01\xbb\x3b\x07\xb4\x2f\x5b\x84\
+\x03\x71\x50\x6f\x7d\xf2\x8e\xb8\xbc\x1e\x5d\x25\x4f\x60\x2f\x19\
+\xd8\x90\xec\x5b\x69\x64\x67\x2e\xb9\x72\xff\x74\x35\x87\x9c\x66\
+\x34\x5c\x6e\x51\x19\xde\xa0\x5f\x38\x56\x35\x7d\x22\x78\x33\x99\
+\x3d\x61\xd7\xe4\x6c\xe8\x41\x81\x04\xd8\x52\xa9\xa1\xba\x57\x26\
+\xed\x39\x98\xe7\xf9\x98\x97\x0b\x3d\xcf\x38\xd5\x17\xb8\xf4\x5f\
+\x17\x72\x6b\x33\x57\x8d\x79\x0c\x9b\x96\x14\xcf\x33\xee\xae\x5b\
+\x78\xfa\x77\xd7\x93\xe4\xeb\x55\xa0\x9c\x85\x4e\xc8\xce\xf6\x19\
+\xfc\x28\x84\x3d\xb0\xcc\x88\xe5\xf6\xd4\xc5\x9b\x2d\x7c\x1c\xfc\
+\xa3\x69\x92\x7c\xec\x21\x79\xb2\x3f\x41\x14\x8f\x57\xa8\x1a\x2e\
+\x66\xad\xa1\x65\xb1\xd9\x0d\x3c\xc6\x84\x83\x21\xa5\x62\x14\x33\
+\x71\x14\x3f\x17\x0a\x30\x7b\x6d\x4a\xc5\x06\x78\x6d\x3c\x1b\xc2\
+\xc8\xa6\xa4\x71\xb0\x8d\x87\x3b\x30\xa0\x88\x02\xbd\x40\xf3\x90\
+\xb6\x9d\x61\xed\x66\x85\xd5\xfa\x97\xe1\x8b\x7d\x9a\x93\x2f\xd1\
+\x0f\xce\xc0\x8e\x2d\xea\xa1\x41\x35\x9f\x63\x62\x98\x6c\xae\x7e\
+\x19\x7e\xe4\xcb\x9c\x76\xae\x28\x5c\x79\x9c\x5e\x5e\x71\x38\x14\
+\xb5\x56\x9b\xeb\x65\x7e\xe9\x17\xdf\xe7\xe8\xe9\x2f\x51\x5e\x6c\
+\x52\xe8\x97\x12\x8c\xa3\x4b\x0a\x3b\x93\xc1\xef\x85\xea\x44\xa5\
+\xfd\xc4\x89\xbc\x64\x50\x32\xa2\x70\xde\xa4\xbf\x3c\x05\xf0\xe1\
+\xd1\x64\xd6\xf7\x0a\xd3\x54\xd0\x54\xb4\x4a\x82\x37\x51\xb0\x3a\
+\x27\x62\x26\xdf\x2b\x7d\xbb\xe9\xab\xc8\x3c\x00\x4f\xa5\x85\x3d\
+\x03\xd8\xeb\x8c\xbb\xa1\xef\xce\x05\xf0\xf3\x58\x38\x0d\x64\xf9\
+\xf8\xa3\xde\x3b\x6f\x11\x59\x55\x93\x9a\x53\x9b\xe6\x5b\x68\x79\
+\x14\x17\xdd\x27\x74\xbd\x4d\x8a\x1b\x4d\xce\xdb\x65\x95\xcd\x76\
+\xf8\x9d\xdf\x84\x7a\x45\x25\x01\xb5\x3a\x43\xa2\xf1\x25\x3b\x3b\
+\x5f\xe3\xac\x73\x9f\xd0\x5e\x65\x3d\x3a\x22\xb8\xb8\x43\x36\xb3\
+\x22\x98\x38\xe7\x0d\x71\x23\x62\xe0\x66\x00\xe1\x56\x93\xa0\x06\
+\x31\x39\xc9\x64\x0c\x76\x89\x9a\x17\x32\x2e\x16\x14\x5b\x0b\xd0\
+\xa2\xee\xd7\xbc\x90\x76\x24\x24\x89\x1b\x89\xa1\x20\xfd\xf6\x1e\
+\x50\xc6\x26\x47\xbf\xd0\x87\xe1\x90\xf6\x50\x04\x50\xcc\xa2\x09\
+\x23\xd1\x7f\x78\xc4\x3e\xe5\x7c\x93\xb5\x9b\x05\xa2\x46\x8e\xca\
+\x46\x86\xef\x2f\x2c\xd1\x8b\x2a\x74\xfc\x08\x78\x7f\x06\x54\x32\
+\x32\x96\x0e\x47\x5b\x55\x13\xbb\x97\xd4\x89\xfa\x89\x58\x26\x02\
+\x33\xa2\xa6\x55\x66\x65\xab\x05\x5a\xa7\x36\xa1\x53\xa5\xef\x1f\
+\xe2\x17\x0d\xf5\xb9\x7a\x16\x5a\x9a\x19\x25\xcb\xce\x1b\x1b\x76\
+\x2d\x60\x32\x15\xfc\x62\x7f\xc6\x68\xbd\x8e\x85\x75\x69\x31\x6f\
+\xdf\xeb\xd8\x3c\x0d\x60\xb9\xbd\x4e\x26\xa4\xd9\x57\x02\x7b\x58\
+\x71\x3f\x52\xfa\xa4\x33\xe2\x7c\x3c\x55\x3c\xaa\x1b\xcf\x27\x4e\
+\x84\x73\x1a\xc1\x4b\x50\x2a\xd6\xb9\x5d\x0b\xf9\xa3\x85\xe9\x24\
+\x57\xd5\x7d\xde\x11\x81\xb3\x13\x27\x62\x0b\x18\x74\x02\xe8\x3c\
+\xe3\xcf\xc7\x11\x6b\xb9\x7d\x8a\xf5\xb8\x5f\x45\x5b\x03\xb0\x60\
+\xde\x08\xbc\x36\x66\xd1\x14\xec\x8a\x18\xc2\x68\x93\xc3\xf6\x5c\
+\xc6\x76\x21\x96\x1d\x05\xc5\xd6\x60\x83\xd7\x26\x1c\x84\x8c\xed\
+\x82\x00\xf0\x60\x48\xc3\x40\x19\x89\xe0\xe0\xd1\xa2\xdf\x3e\xe6\
+\x6a\x60\x88\xbf\xa5\x0d\x77\xb4\x3c\x0f\xbf\xdf\xa7\x73\xb9\x4f\
+\xfb\x60\x97\x5e\xfb\x12\x77\x30\xe4\xe0\xa2\x45\xd6\xe8\xd3\xbe\
+\x10\x6e\x99\x46\xbe\x4a\xb6\xef\x27\x12\x80\xfc\x5e\x48\xa6\x51\
+\x4b\xe8\xbd\xb4\x81\x93\x28\x1f\xf3\x1d\xe1\x89\x88\x4b\x87\xa4\
+\x16\x96\xed\x00\x3a\x7e\x8f\x80\x5a\xc2\x80\x92\x4c\x28\x8b\x35\
+\x96\x90\x1f\x66\x00\x00\x19\x9b\x49\x44\x41\x54\xe7\xb9\x08\xe7\
+\x25\xc4\x3c\x4f\xeb\x5e\x67\x20\x3d\xef\x52\x7d\x1d\xeb\x5d\x07\
+\xfc\x8f\x62\xe0\xb4\x21\xa7\x3f\x27\xb7\x12\xd8\xba\xee\x7d\xde\
+\xad\xea\x3b\x33\xae\x38\x55\x84\xea\x14\x55\x4f\x89\xce\xd0\x81\
+\x81\x60\x1a\x99\xcd\xe6\x3a\x13\x5c\x6b\x3d\x31\x7b\x6f\xd2\x1b\
+\xb2\xbb\x1f\xcc\x0c\x14\x1a\x74\x82\x69\x8d\x1d\xde\x90\x30\xb2\
+\x63\xe0\xc6\xa0\x8c\x41\xe6\x61\x12\x46\x36\x0c\x86\x94\x8a\x0d\
+\xdc\x81\xec\x86\x28\xb6\x42\x82\x88\xd7\x4a\x5e\x1b\x77\x20\x58\
+\x19\x40\x2e\x10\x77\x50\xc4\x2c\x9a\x84\x83\x90\x6c\xd1\x66\x3c\
+\x20\x66\xf9\x82\x08\x67\x07\x11\x54\x6c\xcc\x81\x18\x76\x03\x65\
+\x6c\xcf\x8d\x47\x90\x4d\x6f\xfb\x95\x09\x81\x66\xad\xeb\xae\x23\
+\xe9\xd9\x98\x77\xc2\x66\x0c\xbf\x38\x72\xd4\xac\xd9\x0c\x97\x5b\
+\xb4\x4e\x81\xd3\xe9\xd8\x58\x59\xf9\xa0\x97\xb9\x8b\xf1\x60\x36\
+\xa8\xd6\xae\x3c\xb7\x4e\xf0\x3a\x69\x90\x0e\x76\xcc\x2b\xa3\x9a\
+\xc7\xa6\x32\xd7\xa1\xea\x3b\x60\x25\x93\x73\x9e\xc7\xb8\xd7\x45\
+\xe6\xa4\x67\xc2\xae\x64\x66\xa4\x83\x64\xdf\x8f\x5a\x44\xd7\xdd\
+\xf4\x48\x68\x42\x1b\xc7\x00\x6f\x75\xb3\x6c\x1f\xef\xb2\x79\x79\
+\x9f\x71\xe3\x52\xb5\x42\x00\xa8\x2f\xbe\x42\xc9\x3f\xc2\x25\x1e\
+\x96\x33\xc8\x89\xb9\x1e\xbb\x01\xd9\xd6\x9b\xec\xda\xa2\x11\xe1\
+\x51\x3c\x13\xda\x35\xc7\x98\x25\xc3\xc3\xb3\x93\x07\x52\x32\xa4\
+\x1b\xd9\x53\x76\x8e\x3d\x18\xf2\x35\x09\x54\x8f\x0c\x0d\x03\xdc\
+\xc1\x50\x0d\x6c\x74\x07\x43\x4a\x86\x17\x33\xb2\x91\x60\x64\xc9\
+\xee\xf2\x7e\xc3\x40\xcc\xc9\x1b\x08\x17\x56\x38\x28\xe2\xf7\xfb\
+\x49\x00\x7b\x31\xe8\x1e\x1d\x26\x00\x3c\x4f\x1b\xea\x27\x49\xfa\
+\x88\xf5\xe7\x97\xeb\xa2\x7f\xb0\x64\xe1\xc1\xa9\xad\x98\xb8\x1d\
+\x1a\x89\x80\x86\x3e\x3a\x37\xca\x54\x54\x85\x8a\x2c\xed\x7f\x5e\
+\x33\xc2\xeb\x4e\xb6\xfe\x9e\x66\x2f\x98\x49\x50\xba\xee\xf3\xf4\
+\xae\x45\x32\x8f\x61\xde\x71\x78\x1e\x80\x13\xf1\x80\x4c\x86\xe2\
+\xc0\x9c\x6b\xd4\x49\x00\xe7\x1b\xe5\x6b\x3d\x10\xcf\x5b\xb4\x55\
+\xdf\x99\xd9\x47\x36\x9f\x39\xc7\x80\x0a\xdc\xc8\xdc\xe2\xa2\xfb\
+\x84\xbd\xfd\x0e\xbd\x6e\x3c\x7f\x7a\xe5\x65\x2e\x46\x0f\xd5\xb0\
+\xc6\x86\x99\x5c\x48\xa6\x3d\xed\xa4\xe9\xec\x1e\x72\x7a\xf2\x50\
+\x04\x3b\xdc\xc8\xc6\xf6\xc4\x0f\x95\xdb\x34\x03\xba\x03\x43\x4d\
+\x13\x75\x23\x7b\xca\xbe\x31\xa0\xc7\x78\x94\x8a\x51\xac\x83\x05\
+\xa3\x7b\x76\x09\x3c\xf1\xe5\xc6\x76\x21\x01\x7c\x01\x74\x61\x40\
+\xb6\x23\x68\x18\xc9\xc5\x63\x66\x4a\x94\x46\xf1\xb0\x14\x3f\xcb\
+\x85\x35\x4d\xb6\xb9\x6a\xf7\xa7\x8d\xb2\xb5\x88\x5e\xfa\xe0\xea\
+\x4e\xfa\x99\x83\x5f\x11\xff\x5b\xa1\x47\x71\x75\xda\x1b\xc2\xec\
+\x75\x12\x1d\x20\x65\xc8\x54\xef\x9c\x23\x9d\xf7\x69\x00\xeb\x3e\
+\xdc\xeb\xf2\x79\xd3\xcf\x5d\x35\xea\xcf\xcd\x6b\xd0\xfd\xbb\xe9\
+\x08\x9d\x04\xf3\x3c\x59\x91\xce\xd8\xfb\x28\xe0\x49\x00\x4b\xf0\
+\x0e\x8a\x21\x51\xc5\x60\xd4\x76\xe6\x12\xc4\xbc\x85\xa1\x7f\x87\
+\x73\x66\xbd\x1a\x7a\xc2\x14\x7d\x31\xf9\xaa\xda\x5f\xa4\x13\x05\
+\xf8\x57\x1d\x98\x1c\xe2\xf0\x88\xa5\xfc\x4b\x94\xfc\xa3\x78\xe4\
+\x6e\x35\x96\x7b\x43\xd5\xe3\x2f\x6b\xdf\x10\xf2\xe3\xc5\x35\xf2\
+\xcd\x57\x66\x99\x58\x6e\x15\xdb\x1a\x1e\x66\xd1\x14\xa0\x8b\xc1\
+\x39\x05\x60\x41\x81\xdd\x8d\x6c\xc1\xb0\xb1\x96\x0e\x07\x21\x36\
+\x39\xf5\x1e\x25\x41\xe4\x56\xbe\x2f\x66\xe5\x31\xde\xdc\xc5\x03\
+\xe0\xe6\x73\x54\x02\x97\xd1\xbe\x33\x17\x30\xb2\x7a\xe3\x3a\x37\
+\x93\xbc\x2d\x13\xcd\xb4\xa2\x6a\x9a\xb6\xf2\x44\xb4\x3a\x71\xc5\
+\x45\x2f\xbc\x36\x39\x7e\x12\x57\x15\xfb\x45\xef\xb9\x1d\x23\x75\
+\xc0\xe9\x06\x67\xda\xaf\x7d\x9d\x7b\x6d\x1e\xe8\x54\x37\xcf\x54\
+\x07\xcf\xe7\xb1\xb8\xd1\x8f\x54\x15\x87\x7e\x2c\xe6\x49\x85\x74\
+\xb8\x59\x6a\xe1\x51\xdb\xf9\x6b\xc9\xa5\xe7\x2d\x98\x8e\x21\xf2\
+\x33\x64\x14\xee\xbc\xd1\x20\xec\xb6\xe9\x76\x32\xaa\xcc\x2d\x51\
+\xd9\x11\xdf\x5a\x61\x41\xb1\xf0\x02\xc7\x0a\xc8\xf2\x78\x98\xe2\
+\x12\x2e\xf4\x6f\x9a\x89\xa5\x9c\xf0\xec\x52\x82\x89\xcd\xa2\xa9\
+\x58\x56\x86\xa5\x25\xa8\xed\xd4\x84\x4a\x7b\xce\xc4\x4a\x7d\x91\
+\xc8\xbf\xa3\xd8\x38\x66\x60\x37\x9f\x53\xf7\x3d\xc6\xec\xd6\x44\
+\xe6\xff\x42\xa3\x32\xc3\x70\x69\x97\xd9\xbc\xa0\x87\x3c\x99\xb5\
+\x7a\x4d\x3b\x38\x9e\x92\x11\x19\xba\x09\x43\x4e\xea\xe1\x79\x7d\
+\x81\xf5\x46\x83\xf3\x2a\x52\x94\xd7\x42\x0b\x80\xa4\x81\x36\xa9\
+\x58\xcf\xf5\x0f\xa7\x75\x6c\xba\xb4\xe8\xa3\x64\x83\xcc\x87\x98\
+\xb7\x28\x74\x57\x5a\x7a\x2b\xaf\x5e\x12\xcc\xd7\xf9\x8a\xd3\xdf\
+\xf3\xa3\x8c\xd2\xb9\x8d\xcf\x8f\x1e\xd3\x8b\xe2\xcc\x36\xd9\xf9\
+\xc0\xdf\xa1\x53\x4e\x8e\x2e\x6b\x9a\xc3\x04\x0b\x37\xf2\x3e\xed\
+\x91\xc5\x02\xc7\x04\xf5\x86\x90\x13\x20\xc6\x79\xa5\xb5\x31\xa0\
+\x98\x55\xc8\x88\x82\x02\xae\x7c\x2c\xa5\x86\x64\x59\xe1\x53\x2e\
+\xcc\xb0\xaf\xee\x89\x50\xab\x2d\xd6\xd0\xd2\x08\xd4\x6f\xe9\xf6\
+\x5a\xd6\xd9\x1b\x62\xbf\x51\x4f\x85\x6e\xf5\x26\x29\xcf\x0b\xdf\
+\xce\x63\xe1\x04\x43\x74\xba\x2a\xa7\x61\xe8\xbb\xc9\x71\xb7\x1a\
+\xf3\xcb\x06\x7e\xb2\x86\xec\xa3\x52\x2e\xe7\x45\x14\x25\xb8\xf5\
+\xa6\xdd\xd7\xe5\xe3\xea\xb5\x85\xf3\xa2\x92\x69\x00\xeb\x3a\xf9\
+\xa3\x02\x13\x12\x9c\x69\x20\xeb\x00\x46\x15\x0b\x7c\xf4\xe7\xc9\
+\x4c\xb8\xf4\x3e\x7e\xd1\x53\x19\x6d\xd9\xbe\xaf\x16\xa1\x7b\x76\
+\xc4\xf1\xd0\xc2\xe3\x0a\xa7\x7d\x39\x53\xa6\x24\x01\x6c\x96\x7b\
+\x6a\x98\xfd\x02\xc7\x84\xf9\x65\xda\x23\x8b\x46\xde\x27\xcc\x2f\
+\x4f\x3b\xc5\x9b\x45\x13\x33\x33\xdf\xb8\xd3\x5d\x61\x52\x07\xeb\
+\xc0\x35\x8b\xa6\x02\xa3\xbc\xaf\x22\x7e\x29\xb6\xd5\xc1\x3b\x0f\
+\xc8\x92\x81\xa5\x2e\x96\xf7\xfd\x8c\x88\xce\x5c\x8c\x1e\x62\x67\
+\x32\x89\xde\x63\x7a\xd2\xcb\x75\x01\x83\x56\x35\x33\xc3\xc2\xea\
+\xb5\xce\x34\x2f\x43\x26\xec\xa4\xdb\x94\xca\x7e\x65\x52\x0f\xeb\
+\x35\x72\xe9\x44\xfe\x79\x57\x89\x79\x85\xab\xf3\xea\x04\xe7\xb1\
+\x9d\x9e\x4e\xfa\xbc\x80\x48\xc1\x2a\x71\x8e\xf1\x91\x9e\x83\x79\
+\x6e\xb4\xa8\x62\x60\x86\x3d\x06\xc5\x10\x33\xec\x29\x7b\xc2\x0b\
+\x02\x42\xb3\xfa\x91\x52\xc2\xe8\x47\x8a\xf9\xd3\x0b\x2c\x3d\xcd\
+\x55\xbf\xdd\x28\xf8\x6a\xac\x86\xaa\x7a\xf6\x77\xd4\xd4\x2d\x39\
+\x57\x0f\x44\xa5\x4b\x98\x5f\xa6\x5c\xec\x61\xac\x64\x69\x8f\x2c\
+\x95\xf2\x99\x70\xa0\x4a\x0f\x82\xd4\xc0\xf3\x40\xa7\xd8\x3a\x36\
+\xd6\xa4\x04\xf1\xec\xd2\xf4\xfd\xb1\xe1\x97\xd8\xff\x1a\x49\x91\
+\xfe\x7c\x9d\x81\xe5\x7d\xb3\x7f\xc5\xd5\x9e\xa5\x0e\x9c\xbc\xbc\
+\xcf\x6b\xa4\x9d\xbe\xcc\x59\x55\x53\xa5\x3f\xa6\x6f\x7d\xa7\x80\
+\xeb\x4c\x12\x46\x87\x04\x64\xba\x87\x82\x64\x4e\xe9\xad\x78\x9e\
+\xd7\x21\xed\x5f\x4e\x97\x52\xcd\x73\x8b\xa5\xa3\x6f\x33\x69\x94\
+\xa9\x36\x5e\x69\x40\xcb\x1c\xe7\xef\xc5\x90\x9b\xc7\xc8\xa1\x59\
+\xc5\xce\x64\x12\xa0\x95\x60\xfe\x28\x36\x5e\xaa\x3c\x5f\x13\xcf\
+\x1b\x95\x06\x60\xad\xbf\xc0\xa7\x6f\xaf\x50\xb9\x5b\xa7\x76\xe5\
+\x2b\x26\x96\x03\x1e\xd5\x64\xa7\xbe\x90\xae\xe5\x4f\x94\x60\x6b\
+\x8d\xdb\x77\xee\xf3\xd9\xcd\x12\xa5\xc5\xca\xb4\x53\xfc\x34\x20\
+\xc1\xb5\x06\x56\x1a\xe8\xd2\x28\x93\xfb\xea\x9f\xa1\xbb\xd1\xd2\
+\x9f\xad\x33\xf3\x3c\x89\x61\x66\x4a\x53\xf0\x66\x4a\x94\x8a\x05\
+\x5a\x65\xe3\xda\xa4\x98\x8f\xd2\x63\x12\xc0\xf3\x58\x78\xe2\x0f\
+\x67\xda\x01\xe8\x80\xd4\x2b\x7c\xd3\x63\x76\xe7\x31\x70\x5a\x23\
+\x26\x7a\x65\x68\xef\xb9\xce\x00\x4d\x4b\x88\x99\x56\x05\xda\x02\
+\x48\xef\x2f\x13\x6c\xce\x31\x54\xc5\xf2\xf3\x58\x78\x50\x0c\x31\
+\xfa\x11\x46\x3f\xc2\x0b\x82\x84\x14\xf8\xeb\x24\xfe\x48\x9d\x2e\
+\x17\xe2\x75\x6e\x3d\x69\x5f\xe8\xb2\xce\x3f\x7a\x8c\x1b\x8c\x58\
+\x08\x97\xa8\xde\x14\xd3\xa6\x26\xc3\xf7\x13\xb3\x0f\x27\xfe\x90\
+\xee\x55\x9b\x17\x4b\x0d\xbe\xb8\xf5\x80\x2f\x6e\x3d\x60\x73\xbd\
+\x4c\xf9\xd3\x2f\xf1\x23\x0f\x3e\x2f\x70\x62\x16\xcd\x84\xfe\xd5\
+\x19\x30\x6d\x80\x5d\xf7\xdc\x75\x9a\xf7\x3a\xf0\xce\x63\xfb\x34\
+\x90\x81\xff\xaf\xb3\xab\xeb\x71\x1c\x4b\xcb\x8f\x3f\x52\x89\xed\
+\x38\x76\x52\x55\xdd\xd5\xbd\xdd\x3d\x3d\xd5\x3b\x2b\xcd\xdc\xec\
+\x0a\x84\x84\xd0\x08\x81\x10\xdc\x00\x17\x08\xc1\x25\xab\x15\x3f\
+\x8a\x0b\x7e\x01\x3f\x61\xaf\xd1\x0a\xd0\x22\x56\xa3\xd5\xd0\x30\
+\x3d\xd3\xd3\x1f\xc5\x54\x77\x57\x25\x71\xe2\xd8\x49\x2a\x8e\xcd\
+\x85\xfd\x9e\xbc\xe7\xe4\x1c\x27\xbd\x96\x4a\x49\x1c\x97\x93\xd8\
+\x8f\x1f\x3f\xef\x37\xc6\xab\xa6\x4d\xd6\xed\x16\x0b\x3c\x97\xc0\
+\xcb\x0d\x23\xe9\xea\x66\xd1\x39\x77\x60\xd7\x43\x06\x07\xfb\x5d\
+\x3f\x67\x49\xdd\x15\x5d\xe7\x9e\x6a\x9b\xa8\xa4\xba\xd7\xa2\x96\
+\xdb\xad\x64\x74\x2a\xd5\x29\x3a\x26\xd5\xbd\x56\x93\xfb\xdb\x3e\
+\xe7\xee\xee\x1a\xf7\x50\xe1\x26\x05\x4e\xed\x61\xab\x3b\xcd\xcf\
+\x6d\xe1\x4a\xf3\x73\x5b\xf2\x11\xab\xc1\x0e\x93\xa4\x20\x1d\x4c\
+\x1e\x0c\xd3\x9d\x45\x92\x6f\xa5\x05\x34\x4d\x51\xfa\x17\x16\xa6\
+\xd3\x04\x63\xfb\x46\xe4\xc8\x74\x7a\x5f\x88\x9c\xe2\x00\x27\x82\
+\x8d\xdf\x9c\x2c\xf1\x38\xa8\x30\x18\x0d\xf0\x69\xff\x1c\xbf\xef\
+\x04\x88\x7e\x14\x34\x77\x0a\xca\x5f\x60\xac\x49\x20\xca\x2a\x0f\
+\xe5\x36\xd3\x4a\x0b\x0e\x46\x13\x7b\x9b\x24\x03\xdf\x77\xdb\x32\
+\xec\x2c\xd1\xeb\x55\xb0\xe3\x33\xbc\x7e\xd1\x95\xd8\xb0\x93\x16\
+\x72\xbe\xac\x26\x49\x9e\x32\xd4\x86\x1a\x39\xc1\x07\x0f\x9a\xdc\
+\x59\x6d\xc1\x0c\x5d\x7f\x85\xb6\x5c\x02\xae\x89\x75\x40\x36\x25\
+\xd3\xa8\x91\xb9\x36\x6f\x46\x69\x0f\x30\x77\xfb\xe8\x0e\xfb\x18\
+\x97\xd3\x83\x49\x3e\x7e\x6e\x4b\x46\x9c\xc9\xf5\x66\xb3\x8b\x9d\
+\x3f\xae\xa7\x0b\x8c\xa2\x91\xf0\x82\x1c\x23\x61\x22\x7b\x20\x6c\
+\x94\xc5\xbb\x0a\xb1\x95\xe0\xb4\x3c\xc7\xe3\x5e\x9d\x30\x9f\xdc\
+\x7e\xa5\x77\x71\xbe\xbf\xc2\xcd\xec\x5b\x54\x2b\x0b\x3d\x58\xc8\
+\xbd\xa0\x69\xba\x0d\xbd\x9c\x90\x4e\x68\x18\x1e\x05\x4e\x1d\x5b\
+\xb7\xc9\x12\x21\x17\x0c\x0c\x4e\xeb\x57\x2b\x0b\xdd\x55\x61\x4c\
+\x7b\x54\xcb\x8e\xf8\x42\x29\x96\x3a\x16\xe6\xe5\xe6\x87\xa2\x5b\
+\x5c\x4e\xb4\x01\xfc\x90\x05\xaf\xf6\x66\x30\xb5\xa0\x6d\x03\x83\
+\x29\xe0\xc0\xc1\x7c\x48\x4a\x70\x20\x7b\x8e\x23\x5e\xe7\x7e\xa9\
+\xdd\x9e\x17\x00\xf0\x7d\xd3\xc5\x62\xa5\x15\x4e\xed\xa1\xd6\x87\
+\x2d\xce\x67\x79\x02\xcc\x6b\x77\xe5\x68\xbe\xbb\x70\xd6\xf1\x05\
+\x56\x41\x0a\x6c\xde\x8a\xb0\xb3\xd4\xb8\x1b\x27\x98\x0c\x9c\x5d\
+\xd2\x10\x80\xfe\xd2\x97\x71\x74\xe8\x44\x50\x1f\x0a\x2e\x33\x38\
+\x38\xdb\xbc\x0f\x6d\x12\x43\x27\x2f\x74\xeb\x9d\x6e\xff\xa3\x4f\
+\x28\x19\x73\xe5\x20\xde\xab\xd1\x22\x6b\x57\xa7\xa5\xdb\xc0\xc3\
+\x5d\x62\xba\xd0\xb2\x09\x54\x26\x69\xa0\x93\x1c\x3a\x3d\x7d\x28\
+\xc0\x70\xcc\x05\xa8\x33\xe4\x48\x13\xab\x12\x43\xf5\x19\x5b\x41\
+\x6a\xbc\xc0\x28\xa2\x57\x85\x16\xc6\xe5\x54\x44\xea\xb4\x9a\xb8\
+\xe9\x9a\x19\x57\x16\x6e\xcb\x54\x14\x1e\x58\x8b\x0a\xae\x7d\x01\
+\x74\x1e\x0b\x26\x56\x67\x4a\x47\xf6\x00\xef\x93\x29\x7e\x58\xd5\
+\x44\xb2\xf0\x72\xf4\x4f\x4e\x76\xe3\x0e\x4c\x7e\x59\x93\xa1\xc5\
+\xb7\xe5\x52\xc3\xe4\x07\x36\x01\xd8\x24\x47\xf8\x7a\xfa\xbc\xe5\
+\x2a\x41\x55\x7d\x85\xc5\xed\x44\x5b\x11\xa1\xde\xea\x46\x76\x85\
+\x2d\x22\x0c\xed\x4a\xf4\x09\x16\xbf\xb3\x78\x2f\x9a\x9e\x1c\xcb\
+\xa0\x1c\xb8\xbc\x01\xe2\x31\xc1\x0a\x9d\x34\x30\x19\x83\xba\x10\
+\xef\xa1\x7c\x08\xca\x55\x38\xd6\xad\x46\x86\x1c\x01\x3a\x4b\x4b\
+\x01\xdc\x05\xaa\x3d\x4d\xac\x2b\xc3\x22\x29\x41\x5d\x82\xb8\x0c\
+\xe1\x79\x13\xf4\x3b\x85\x6b\x6d\x6e\x69\x35\x76\x95\xbe\x16\x9a\
+\x38\x3e\xfb\xe9\x3e\x81\xb8\x3d\xcc\x5e\x4d\x61\xe3\x05\xfc\xa5\
+\x5d\x8f\x3e\xb0\x73\xb1\x4f\x5b\x07\x56\x93\xa1\xa5\xbe\xe6\x72\
+\xc0\xe4\x6d\x38\xa4\x8f\x4d\x40\x27\xcd\xbc\x5d\xdf\xe0\x7f\x92\
+\x7b\x62\x06\xb0\xc9\x88\x53\xd7\x39\x4d\x37\x64\x92\x13\xb3\x64\
+\x86\x69\x69\xed\x0d\xe1\x3e\x74\xfb\xe7\xc0\x55\xf5\xb0\x4e\x27\
+\x9a\x7c\xb9\x52\x89\x94\xc6\x43\xa1\x0b\x39\x1f\xca\x0f\xa6\x85\
+\x3c\x12\x26\x39\xa2\xa6\x54\xf2\x10\x73\x1f\x96\xa4\x8b\x89\xa1\
+\x4d\x99\x6c\x5c\x4a\x10\x80\xb9\x51\xc8\x7d\xd5\x54\xc9\x2d\xec\
+\x86\x66\x56\x34\xff\xae\xf5\x50\x19\x08\x4d\x4c\x8d\x05\x33\xdc\
+\x21\x73\x1f\x89\x74\xcc\xe8\x74\x88\x45\x72\x89\x13\x7f\x52\xf7\
+\x27\x5e\xb9\x40\xaf\xd8\x97\x13\x2a\x58\x0f\x81\x51\x35\xd0\xd2\
+\xc2\xac\xad\x0f\x19\x7e\xba\x0b\x20\x74\x6d\x2c\xe1\x88\x68\xdd\
+\xa1\x88\x11\xdd\x7a\xa2\x38\x92\xc0\x4b\x60\xb6\xe7\x89\xdc\xb1\
+\x11\xfa\xea\x08\xde\x9c\xf0\x90\xc1\x67\xca\xf1\x35\x05\x2e\x78\
+\xd4\x4e\xa7\xc7\x8f\xc9\x44\xe3\xeb\x88\xf9\x78\xd2\x8d\x29\x3a\
+\xc7\x75\x30\xf9\x81\xe9\xf5\x02\x15\x82\xd0\x86\x9f\xdb\x22\x7b\
+\x4d\x05\x3d\x81\x76\x3d\x5d\xec\x35\x5b\xa1\xe7\x04\x50\x5e\x38\
+\x1b\xf4\x3b\x52\xab\xd7\xb9\xdb\x17\x9d\x7d\xd2\x7c\x86\xc5\xdd\
+\x9d\xd0\xc4\x70\x2f\x77\x43\xd5\x8b\x97\x08\x58\xda\x42\x55\xbe\
+\x44\x52\xc5\x20\x8d\xd8\x2f\xfd\xda\x4f\xcc\xa5\x81\xca\xc4\x3a\
+\x66\xe6\xa0\xa5\xff\x21\x16\xe7\x6c\xae\xfb\x5f\x75\x5d\x1b\x23\
+\x93\xe4\x28\x9c\x21\xc6\xaf\x5c\xdc\xac\xbf\x16\x09\xf1\x04\x34\
+\x35\xb9\x66\xd0\xcf\x05\x03\x73\xf0\x4e\x4b\x0b\xd3\xd2\x92\x58\
+\xd0\x94\xa3\xa0\x1a\x89\x26\xd9\xa1\x36\x25\x31\xe5\x2f\xe8\xa4\
+\x0f\xaf\x34\x69\xd3\xf9\xc7\x48\x14\x62\xbe\x7b\xa8\x8e\xce\x54\
+\xb3\xd2\x4a\xd4\x2e\x02\x40\xd6\x0c\x55\xcc\xd2\x12\xb9\x5f\x4a\
+\x12\x41\x65\xe3\x2a\xb4\xf6\x52\x34\xf9\x42\x17\x13\x97\x4d\x62\
+\x74\xef\xa0\x42\x1c\x87\x75\xdf\x3a\x40\x8c\x32\xd8\xe6\x1e\xe6\
+\x1f\x80\x37\xf3\x7a\xbf\x34\x8f\x5a\x32\xc6\xc7\x53\x56\xba\x5f\
+\xdf\x95\xcb\x6a\xb1\x1f\xb1\xe3\x4c\x5c\x6e\x33\xac\x9c\x07\xe2\
+\x39\x25\xe3\x98\x34\xb3\xee\x71\x2f\xf2\xe6\x1c\x17\x45\x22\x56\
+\x0f\xfc\x1e\xec\x74\xbc\xe7\x21\x20\xa0\xf1\x6e\x36\xc4\x00\x94\
+\x27\xcc\xbd\x12\xd5\xbc\x12\x65\xf7\xc7\x30\x27\x67\x60\xb5\x5a\
+\x58\xcd\xef\xd5\xb9\xcb\xa6\xeb\xb9\x36\x02\xa7\x7e\xd6\xa1\xd4\
+\x46\x1d\x90\x4d\xf2\xa3\x2d\xe4\xcc\x75\x2f\x31\x67\x1f\xb5\x1e\
+\x26\x90\xda\x7e\x65\xcc\xad\x38\x74\x17\x54\x2f\x16\x0a\xb6\xf0\
+\x1e\xcf\xd4\x5d\x7e\x53\xac\x44\xff\x89\x34\x7a\x03\x0f\xa7\x70\
+\x46\x29\x06\xf7\xea\xde\x13\x9b\x0f\xcf\x45\x90\x83\xe7\x50\x44\
+\xa7\x43\x3c\xb9\xf3\x90\xe6\x33\xf8\x4d\x94\x38\xdf\xd4\x43\x1f\
+\x6d\x1d\x5b\x12\x08\x7b\xdb\xeb\xbd\x9c\x86\x43\x40\x56\xf5\xb5\
+\x0a\xe8\x63\x16\xce\xd8\x39\x06\x58\xe0\xf9\x5e\xa4\x8e\x17\x86\
+\xf6\xdc\x40\x54\x6b\x88\x26\xe2\xe9\x8e\x8d\x3f\xc6\x0d\x26\xf9\
+\x9a\x59\x36\x9a\xc8\xd3\x50\xf4\x2c\x15\xa0\xf2\xfc\x8d\x61\x77\
+\xd0\x9a\xa8\xa3\x03\xe4\xb1\x9e\x97\x63\xa2\x94\x7b\xb2\x2d\xb4\
+\xb5\xd9\x6a\x41\x68\x0b\x19\xc1\x81\x6c\x62\x61\xdd\xf7\xe5\x7a\
+\x1a\x00\x46\xd1\x68\x3f\x9f\x98\x9a\x72\x37\x15\x1c\xd4\x7f\x22\
+\x9c\x3d\xc1\x12\xe3\x5a\xdf\x36\xde\x89\xce\xbd\xcf\xb5\x61\xfd\
+\xd9\x76\x86\xbb\x7b\x75\x7b\x57\xca\x7c\x13\x86\x9d\x0a\x3c\xdb\
+\x09\x5a\x59\x15\xa8\x13\xd5\xf9\x63\x9b\xf1\xf7\x31\x80\xe5\xa0\
+\xa7\x7d\x2f\x57\x09\x5e\xbf\xe8\x4a\x4c\xcc\x7b\xad\xf1\xdb\x96\
+\xea\x13\x8e\xe2\x08\xe9\xa2\xb7\x37\xb3\x58\x3d\x31\x6a\x6e\x00\
+\x35\x64\x59\x15\x19\x2a\x27\x6c\xad\x6d\xa3\xfe\x13\x62\xe2\x53\
+\xc3\xc4\xea\xc9\xd5\xb5\x5a\x35\x19\x74\x2a\x60\x8e\xc9\x37\x6e\
+\xf3\x31\x9b\xd2\x2e\xad\xb4\x12\x00\x0f\xac\x4c\xfc\x71\xe3\x8e\
+\xf6\x69\x0a\x65\xf3\xf0\xb4\x95\x56\x7b\x41\x96\x41\xb1\xa8\xbb\
+\xcd\xb3\xa0\x50\x69\x0f\x44\x62\x7c\xe8\x47\xf0\x86\xf5\x7b\xd6\
+\xfd\x8e\xf0\x29\xd3\xa8\x31\x00\xb0\xab\x39\x22\x27\xc2\x03\xab\
+\x80\x87\xd3\xba\x91\x20\x73\xdd\xd9\x6d\x40\xe2\x8f\x92\x5b\xad\
+\x61\xe5\x36\x76\x3e\x96\x85\x4d\xe0\x4f\xdd\xfa\x87\x79\xbd\x58\
+\x62\x61\x5d\x57\x47\xea\xde\x23\x5f\x69\x35\x1b\x17\xfe\x5a\x78\
+\x24\x4c\xc5\x97\xaa\xcb\x27\x9d\xee\x32\xd5\xac\x6d\x6a\x94\x01\
+\xc4\xda\xab\x22\x83\x33\x8c\x04\x83\xf7\xcf\x46\xe2\xe4\xea\x12\
+\x7e\xd4\x0b\xc1\xf4\x5c\x17\xbc\x38\x54\x1c\xba\xd7\xe1\xbd\x69\
+\x98\xcd\x41\x29\xb4\x71\x90\x0a\xb6\xcd\xaa\x00\x0b\x00\x55\x16\
+\x0a\x83\x8f\xef\x53\xf5\x80\x50\x24\xaf\xcd\xfb\xc1\xf3\xb8\xd5\
+\x0c\xb6\x51\x54\x03\x31\xb6\x12\x5c\xc4\x0f\x1b\x89\x53\x4f\x26\
+\xe8\x8c\xba\x3b\xe3\xae\xd1\xc3\x3f\xfb\x7c\x84\xde\x27\xcf\xe4\
+\xa8\x6b\xd3\xe3\xc3\x2e\xb7\x19\xa6\x9b\xa6\xc6\x6c\xe3\xed\x19\
+\x66\x5c\xcf\x92\x4e\x56\x0d\x3b\xf5\xaf\x8d\x6d\xdb\x0c\x3f\x75\
+\x7d\xea\x04\x48\xfe\xf7\x4a\xb0\x9b\xe9\x24\xaa\x00\x9e\x25\x33\
+\x31\x8a\xcb\x9e\x27\xda\x72\xa2\xb6\x25\x1c\x76\x44\xe1\x69\xe5\
+\x84\x98\xae\xe7\xa8\x9c\x50\xea\xe9\xa6\xea\x67\x5e\xa8\xba\xb8\
+\x9d\xec\x49\x13\xf5\xf6\x7f\x6c\x95\xb3\xca\xde\x26\xa3\xd4\xc4\
+\xcc\x54\x9d\x41\xc0\xa5\x3b\xc4\x02\x75\x24\x6e\x01\x26\x2f\xb2\
+\x50\x44\xed\x74\xee\x35\x1e\xcc\xa0\x48\x9e\x49\x37\xab\x44\x43\
+\x4c\xdc\x71\x7b\xe8\xb9\x01\xbe\x7f\xf9\xc3\xee\x77\x01\xf8\x9c\
+\x0d\x02\x4d\x92\x54\xcc\x09\x21\x36\x0e\xee\x3f\x42\xf7\xec\x44\
+\x74\x01\x02\x00\xa7\xc9\x36\xb4\x6d\x27\xc0\x13\xab\x40\xb9\xcd\
+\x30\xec\xd4\x01\x06\x02\x35\x67\x47\x4a\xc6\xf1\x31\x17\x60\xa7\
+\x6d\x49\x82\x70\x29\x62\x02\xb0\xca\xbc\x6d\xbe\xe9\x55\xba\xc1\
+\xdb\xd5\x35\xd2\xab\x97\xc2\x33\xc1\xbd\x02\x34\x89\x48\xa6\xd1\
+\x06\xd4\xe1\x2e\x47\x42\x57\xe7\xd6\x6a\x54\x4e\x37\x12\x38\x3d\
+\xc7\xc1\x76\x3a\x43\xff\x6c\x64\xd4\xcf\x1c\x58\xbc\xf7\x9b\x8e\
+\x41\x75\xfe\xed\x36\xcd\xae\x6e\xdf\x16\x1c\x31\x7d\x2e\x67\xe2\
+\xe5\x76\x0b\xdb\xaf\xa4\x47\x8a\xd6\x95\xb9\xa5\xf5\x13\x93\x57\
+\xc3\xc4\xba\x26\xf0\xaa\x9d\xe3\x37\x93\xb5\x08\xce\x90\xb7\xe1\
+\x7c\xd4\x81\xfb\xf0\x3e\x2e\x43\x16\x6e\xe6\x29\xaf\xb1\x8d\xcb\
+\xa7\x4f\x11\xfa\x35\x59\xd1\xd0\x19\xda\xa7\x5d\x6e\x33\xbc\xa9\
+\x5c\x09\x54\x34\x8c\xdc\xe4\x5d\xa0\xf7\xc7\xab\x12\xa7\x3d\x5b\
+\xcb\xae\xe3\x55\x89\xb0\xe8\x68\xe5\x84\x6e\x7b\x95\xf1\x29\x29\
+\xe9\xd5\x7f\xfc\x37\x92\xdb\xaf\x76\x1d\x21\x99\xf6\x34\xc9\x08\
+\x62\x62\x0a\x7a\xb4\xb1\x30\x6f\x61\x4a\x07\xdc\x73\x1c\x09\xc8\
+\xa2\x69\x34\x63\x5b\x1d\x38\x4d\xef\xa9\xcc\xad\x26\xc6\xb7\xe9\
+\x5a\x3e\x35\x95\xeb\xec\x63\x42\xcd\x94\xac\xce\x41\xe7\x39\x8e\
+\xa4\x63\xcb\x7c\xe7\x27\x26\xaf\x05\x07\x28\xff\xcc\xee\xb0\x2f\
+\x12\xe7\x4d\xe0\x35\x1d\x17\xd2\xaf\x99\x7d\x87\xb9\xdb\xc7\x74\
+\x36\x13\x49\x3d\x6f\x5f\xbe\x07\x92\x7a\x9f\xe1\xa3\xcb\xfa\x5c\
+\xcf\x2d\xc9\x1b\x95\x4d\x5e\x20\xcd\xeb\xe3\xef\xfa\x1e\xb6\x6c\
+\xfc\xaf\x7c\x89\x27\xbb\x94\x45\xce\xc6\xd3\x8d\x27\x01\x97\xc0\
+\x36\xec\x2c\xf7\xf4\xf3\x78\x55\x8a\xf7\x52\x77\x63\xf4\x1f\x9b\
+\xc0\x4d\xfb\x2f\x9c\x21\x7e\xfb\xd5\xaf\xa5\xf9\x14\x1c\xc8\xa6\
+\x89\xf2\xb3\xa4\x4e\xfa\x99\x34\xc7\x7e\x52\xb6\x57\x3b\x70\xc7\
+\x3f\xf5\x28\xa3\x5e\xc0\xe9\x74\x23\xf5\x2e\xd3\x55\x90\xe8\xc0\
+\xcb\x53\x13\xb9\xe1\xa8\x1a\x80\x87\x5c\x6f\x9c\xe9\x8b\x79\xa9\
+\xcd\xf1\x6d\xbb\x68\x54\x23\x8e\x83\x92\xfc\xc4\xc4\xc4\x7d\xec\
+\xb6\x25\xd7\x1b\xe5\x53\xa8\xbf\xab\xca\x42\x2d\x78\x75\xe7\xc4\
+\x24\x73\x86\x51\x84\x37\x3f\x2c\xf1\xcd\x2b\x07\xd3\x69\x82\x22\
+\x5f\x8a\xea\x8e\x7a\x0e\x78\x25\x6a\x1a\x89\xb5\xd7\xb7\x77\x28\
+\x72\x17\x45\xbe\x84\x43\x21\x6d\xf2\x13\x13\x40\xa7\xc1\x4e\x4c\
+\x8b\x75\x0a\x80\x9f\x58\xc5\x4e\x3b\x37\xa0\x27\xe0\x11\x8b\x1b\
+\x83\x26\x49\xbc\x97\x2b\xac\x3e\x17\x92\xe6\xe6\x46\x04\x39\xc8\
+\x33\xc1\xdb\x38\x71\x16\x1e\xd9\x9e\x08\x66\x94\x83\x18\xb3\x64\
+\x06\x07\xcd\x4c\xe5\x23\xb4\x30\xf7\x04\x78\x8e\x83\xc5\xed\x04\
+\x9e\xe3\x48\xae\x32\xea\xef\xa6\x7a\x1b\x54\xef\x01\xe5\x14\xd0\
+\xfe\xee\xee\xae\x85\x5f\xd4\x54\x2f\xf7\x31\x52\x47\xc7\xc2\x6a\
+\x6f\x0d\x2e\x21\xd4\xe8\x1b\x4f\xbf\x24\x16\xa6\x8b\x83\x00\x4c\
+\x2e\xb7\xe5\x76\x2b\x19\x81\x3c\xeb\x4d\x07\x50\xb5\x7b\x3c\xfd\
+\x51\x47\x20\x7e\xec\x6e\xcb\x14\x9d\x41\x0f\x0f\x7b\x05\xfc\x4e\
+\x17\xae\xef\x89\xea\x8e\x4d\xe8\x8a\x2a\x90\x4d\xe8\x8a\xfc\xe3\
+\x9a\x85\x8b\x66\x9e\xdd\x52\x61\xe2\x44\x49\x1a\x67\xaf\x87\x9d\
+\xa5\xc4\xca\xa9\xbb\xc1\x30\xeb\x4a\xa0\xa7\x6d\xc2\xa2\x23\x19\
+\x89\x7c\x5f\xd3\x8d\x07\xc4\x89\x00\x2c\xdf\xaf\x90\x2f\xcd\xb6\
+\x54\x9f\xf7\xf5\x8b\x97\xcd\x60\xee\x70\x2f\x5a\xc6\x17\x5e\xb5\
+\x6c\xcf\x13\x91\x04\xcf\x7b\x1a\xb7\x2d\x9c\x39\x97\xdb\x2d\x86\
+\xdd\x81\x30\xe2\x74\x8d\xab\xd5\xb4\x47\xee\xfe\xe2\x21\x5e\xd5\
+\xc3\xa0\xba\xca\x78\x9e\x6e\x9b\xdc\xd1\x31\x35\xff\x0e\x04\x42\
+\xd5\xe8\x35\x95\xdc\x7b\x8e\x03\xdb\xaf\xa4\x80\x07\xb9\xd5\x82\
+\xd0\x16\xc1\x11\x62\xe1\x2a\xb4\xe0\xa4\xb2\x8c\x30\x75\x16\xd2\
+\x1d\x6f\x6e\x10\xf2\xf7\x29\xf4\x3c\x9f\x6d\xb1\xcd\x3d\x89\x89\
+\xa9\x8e\x52\xf5\x19\xd7\x4c\xec\xa2\xf0\x7b\x58\xa1\xaa\x99\x98\
+\xc0\x35\xdd\x78\x78\x68\x25\xe0\xaf\x09\x58\xc3\xce\x52\x7a\x44\
+\x5c\x77\xc9\x89\xf3\x44\xda\x86\xdc\x62\x61\xd1\xc1\xb0\xb3\xac\
+\x7d\xbd\xcd\xb6\xc4\xb0\x62\x7d\x12\xe3\xb4\x67\xcb\xc0\x0f\xd6\
+\xe2\xf9\xfa\xf5\x02\xe9\xd5\x4b\x6c\x42\xb7\x9e\x13\xcd\x0e\x1e\
+\x6f\x88\x0d\xd4\x15\x0c\x43\xbb\xc2\x30\x6b\xa2\x4f\x4d\x17\x9f\
+\x0f\x49\x75\xf0\xd6\x46\x27\x9b\x9f\x60\x95\xd1\x78\x78\x5b\x6d\
+\x72\xa2\x73\xfc\x4f\xd7\x73\xb1\x4f\x62\x61\x9d\xaf\xf7\xa4\xe9\
+\x58\xa9\xfa\x94\x55\xc0\x91\x67\x86\x03\xfa\x90\x71\xa7\xcb\x6d\
+\xa0\xd7\x64\xc8\x91\x06\xe6\x79\x14\xdc\x77\x4c\xdb\x02\xc0\x26\
+\x8a\x85\x37\x42\x0d\x7a\x98\xc2\xee\xf7\xb0\x33\x04\x79\x5e\x8a\
+\x64\xc0\xe3\x05\x96\x18\xa3\xc2\x04\xd1\xb8\xc0\x93\xc1\x02\x71\
+\x1c\xd6\x4c\x3c\xdf\x7d\xf7\x7c\xba\x82\xb3\x7a\x25\xd8\xb8\xd3\
+\x74\x8c\x92\x34\xf1\xb0\xb3\xc4\x0f\x55\x2c\x58\x31\xce\x77\x80\
+\xae\x57\xb0\xc7\x86\x31\x13\x3f\x16\xeb\x38\xab\xbe\xa9\x5c\x20\
+\x89\x05\xa8\xa7\x1b\x0f\x48\x62\x90\x3b\x2f\xeb\x9e\x88\xfd\xa5\
+\x8b\x40\x7c\xe6\xb0\xb3\xac\x2f\x06\x27\xd8\x95\xab\xa4\x85\xf9\
+\xb6\xfa\x61\x04\x60\x2a\x45\x75\x48\x62\xf0\x4e\x3e\xba\xe2\x51\
+\xf5\x64\xab\xc6\x0a\x9f\x67\xa1\x03\xa0\x3a\x70\x85\x77\xa4\xe7\
+\xda\xd5\x94\x3e\xc9\x3f\xbb\xad\x9e\x8d\xbe\xab\x3b\xb0\xb5\x17\
+\x98\x2e\x24\xdd\xa6\x45\xa9\x7e\x8e\x7a\xae\x99\x32\xdd\x4c\x59\
+\x6c\xc7\x32\x30\x65\xb4\xd1\xfe\x74\xc3\x1a\x01\x20\x9d\x00\xeb\
+\xdb\x3b\x3c\xff\xb0\x5b\x77\xb3\x5d\xd6\xe3\x31\x06\x95\xe8\x38\
+\x5f\xdd\xdd\x4a\x6c\x4c\xe7\x37\x28\x4f\x60\x13\x58\xab\xd9\x5a\
+\x32\xe4\xac\xea\x3e\x86\x9d\x65\xbd\x3e\x89\xa5\x6d\xb8\x8c\xa8\
+\x66\x6b\xa1\x9b\xf9\x73\xa1\xaf\x1b\x96\xe6\xff\x43\x7a\xba\xdc\
+\x66\x98\x06\xeb\x5a\x27\x33\xd9\xb1\x4a\x37\x42\x0f\xab\xbd\x1f\
+\x82\x7e\x47\x00\x75\x75\x6f\xe7\x8f\xa5\x64\x77\x0a\x35\xeb\xe6\
+\x7c\xa8\xc6\x12\x3f\xe0\x6a\xc0\xc3\x04\x5c\x93\x1b\x8c\x33\xa6\
+\xee\x7d\xce\xda\xc7\x74\xb1\xe4\xdf\x55\xd5\xe3\x6d\x81\x91\x43\
+\x2e\xb7\xdc\x2f\xf7\x0a\x43\xb9\xeb\x4d\x8d\xf2\x05\x96\x5c\x37\
+\xa7\x76\xea\xa7\x7e\x77\x6a\xdf\x09\x7e\x81\xa8\x13\xaf\x7a\x6e\
+\x80\xb3\x51\x84\xce\xa0\x07\xcb\xbe\xc4\xf5\xba\x10\x59\x6c\x6f\
+\xe6\x7d\x9c\x3b\x1e\x36\x93\xb5\x48\x8e\x9f\xbb\x7d\x5c\x2f\x2a\
+\x91\x14\x0f\x00\x61\x3f\x93\x99\x78\xd8\x59\x0a\x56\x15\x60\x66\
+\x8c\x8b\x38\x91\xb6\x91\xc0\x1e\x75\x85\xac\x48\xfc\x58\x68\x5d\
+\xa1\x79\xe3\x64\xef\x7f\x54\x23\xb2\xdc\x66\x62\xbb\xd3\x9e\x8d\
+\xe5\x2a\x11\x7a\x58\x5d\x28\x4b\x0d\x80\x68\x41\x35\x2d\x2d\x94\
+\xc5\x7b\x6d\x29\xd2\xa1\x72\x1d\xdd\x49\xe4\x27\xf3\x10\xe0\x38\
+\x33\xf2\x7e\x0d\xa6\x6d\x0f\x75\x83\xd7\x7d\x66\xdb\x76\x1f\xb3\
+\x88\x64\xf8\x06\x98\xdc\x73\x91\xfb\x25\xfc\xdc\xde\x63\xe4\xa1\
+\xfb\xc9\x9e\xf1\xa6\x16\x26\x70\x03\xd8\x14\x45\xa4\xa1\x3c\x6e\
+\xee\xe1\xee\xee\x1a\x5b\x44\x78\x38\xaa\x5b\x53\x3d\xe8\xd6\xb9\
+\x13\xe3\xe5\x5b\x3c\xe8\x7c\x03\xb8\x97\x75\xd4\xae\x09\x74\x6c\
+\xc7\xff\xb7\xb7\x4f\x92\x13\x41\x79\x02\xdb\x8a\xba\x98\x6e\x3c\
+\xc4\x79\xb2\x0f\xe6\x38\x01\xbd\x2f\x69\x60\x0e\x76\x26\x2b\x88\
+\xd5\x25\x0d\xdd\x6c\xab\xfa\x9e\xd5\x85\x1b\x8f\xdb\xec\x7a\xcf\
+\x23\x41\x57\x31\x01\x95\x06\x25\x72\x0d\x4c\x2c\xbc\x45\xf4\xd1\
+\x27\x98\x37\x0d\x51\x83\x15\x6d\xfd\x21\xda\xc0\xac\xbb\x05\x9b\
+\x52\x37\x75\xb9\x16\x6d\x6e\xbc\x63\xbd\x18\x5a\x49\x51\x05\x70\
+\xcb\x99\x30\xe6\x72\x7f\xe7\xbe\xb3\x82\x54\x7c\x9f\x2c\x2d\x31\
+\x99\x4d\x8c\x95\xd3\x04\x4c\x7a\xce\xbd\x32\xfc\x58\xf1\xc1\xf0\
+\x94\x3b\x31\x72\x00\x7f\xd8\x83\x1f\x37\xc7\xaa\x61\xe2\xeb\xcd\
+\x4f\x10\x14\x57\x52\xd8\x79\xd3\x74\x42\x27\xfd\x4c\x72\xd1\xcd\
+\x57\x75\x16\x1b\x81\x31\xf1\x63\x09\x98\x56\xd4\x05\x92\x58\x0b\
+\x56\xf1\x3e\x03\x28\x67\x65\x6e\x1c\x56\xb3\xb5\xb4\x6f\xba\x10\
+\x54\xc6\xa6\xf5\x81\xdf\xc3\x8b\xcd\x4f\x91\x5e\xbd\x14\x09\xd5\
+\xf4\xe3\x79\x13\x14\x6a\x88\x4d\xae\x35\xce\xc2\x6a\x05\xf2\x31\
+\x27\x5f\x95\x13\x3a\xad\xa9\xb2\x3a\x4f\xb9\x34\x4d\x33\x32\x25\
+\xfb\xa8\x6c\x7b\xc8\x07\x7c\x28\xa0\xa2\x3e\xaa\x1d\x83\xd4\x8b\
+\x64\x13\xc5\x52\xa9\x3e\x00\xb8\xe5\x0c\xcf\xce\x9f\xe0\xcf\xfe\
+\xe6\x8f\xf1\x57\x7f\xfe\xb7\x78\xf6\xd9\x97\x58\xa0\xc2\x64\x36\
+\x91\x59\xb0\x39\x2f\x9b\x66\x3a\xec\x26\x74\xb5\xd3\x92\xd4\x7e\
+\x74\x52\x0e\x45\x08\x5c\x3e\x7d\x8a\xfb\x71\x1d\x4e\x06\x80\x59\
+\xf1\x19\x46\xe3\xe7\xc8\x70\x87\xce\xa8\xdb\x64\x10\xb1\xd6\x01\
+\xf8\x0c\x1e\x4e\x51\xf8\x3d\x0c\xed\xb1\x38\xd7\x76\xe2\xc7\x12\
+\xc3\x72\x46\xad\xac\xf7\x42\x22\x70\x30\x73\xff\xb1\xca\xc2\x56\
+\xd4\x15\x4c\xfc\xc4\x2a\x60\x45\x5d\xf1\xa8\x03\x3f\xbf\x28\xaa\
+\xd9\x1a\xa9\x13\xe0\xd3\xd9\x4b\xc1\xc4\xbc\x13\x4f\x14\x47\xa2\
+\x97\x30\x67\x61\xf2\x0d\xeb\x0e\xde\xa1\x5b\xab\x89\x05\x8f\xd1\
+\xc2\xdc\xd0\x3a\xc4\xfc\x87\x7a\x4d\xa8\xdf\xe1\x50\x51\xa9\xe9\
+\xbb\xea\xa6\x37\xa9\xfb\x26\xd9\xc0\x8d\x37\x4a\x8c\xbf\xff\x78\
+\x88\xbf\xff\xbd\x2f\xf1\x77\xff\xf8\x17\xf8\xcb\x5f\xfc\x09\x7e\
+\xf6\xa7\xff\x00\xfb\x49\x2c\x7d\x26\x75\xf3\x21\x37\x58\x5c\xd5\
+\xf3\x38\xa8\x6b\xa8\xea\x37\xe6\xcf\xe9\x7c\xde\x8f\x87\xb0\x51\
+\x4f\x0a\x0d\x47\x17\xf5\x36\xc9\x7f\xe1\xf5\xb2\xbb\xbb\x58\x9a\
+\x69\xb4\x3c\xf1\x68\x89\x31\xdc\x7c\x85\x69\xb9\xcb\x66\xb3\xe3\
+\x3c\x41\xe2\xc7\xd8\x66\xd7\x20\x40\xab\x8f\xfc\x56\xcf\x19\x95\
+\x18\x94\xc0\x4b\x86\xdc\x6d\x92\xe0\xdd\xed\x18\xf3\x6c\x81\xb0\
+\xe8\xe0\xa4\x77\x82\x6a\xb6\xc6\xbb\xe7\xaf\x50\xcd\xd6\x38\xef\
+\x9f\xc1\x19\x8d\xa4\x30\x36\xff\x0c\xee\x99\xa0\x36\xaa\xd6\xc0\
+\x92\x7c\xc2\x94\x27\x51\x0e\x62\xa9\x31\xb6\xea\x4b\xd6\x25\xed\
+\x10\x00\x45\xb7\x74\xc7\x39\xe8\xb3\x35\xe9\x5c\x75\x3d\x1f\x35\
+\xdb\xa6\x5f\x0f\x31\xf1\x31\x3d\x29\xd4\x46\x31\x3c\x22\x48\x39\
+\x17\x6d\xee\x3b\x49\x62\x04\xb5\x3f\xf9\xe1\xe8\x1c\xdd\x2f\xde\
+\x62\xf4\x49\x81\x3f\xf8\xf2\x8f\xf0\xf3\x5f\x7c\x81\xcb\x67\x7f\
+\x2d\xa2\x98\xab\x22\xdb\xeb\x16\x9a\x58\x95\x54\xa1\x4c\x2c\xad\
+\x66\xaf\xd1\x7a\xf2\x04\x95\xf8\xac\x66\xe0\xef\xd6\x78\xbb\x75\
+\x45\x7f\x35\xee\x52\xe5\x7e\x66\x11\x17\xa8\x0a\x8c\xec\x4a\xcc\
+\xb1\x73\x09\xa8\x63\xc3\x8f\x13\xc6\x9a\x06\xe0\xdb\xec\x1a\x56\
+\x1c\x23\x9e\x25\xb8\xad\x96\x38\x8b\x81\x69\x00\xfc\xe7\x2f\x57\
+\xf8\xfa\xdf\xfe\x19\x0f\x1e\xd4\xc2\xbd\x73\xd1\xc3\xe6\xdd\xae\
+\x3d\xe7\xa3\x1f\x79\xf8\xf4\x93\x3a\x09\xda\x7d\x10\xe3\xd3\xfe\
+\x39\x42\xab\x40\x1a\x75\x11\xbb\x8a\x5f\xd3\x09\x81\x0a\xda\x06\
+\x28\xa9\xd5\x83\x3d\x7f\x2f\xaa\x39\x26\xdb\x9d\xe1\xc7\xa7\x27\
+\x1d\x0a\x39\x93\x9c\xd0\x59\xfc\xe4\x3e\x53\xf7\x43\xfb\x56\xd7\
+\x07\x56\x86\x12\x83\xdf\xc9\xe8\x52\x0d\xa4\x43\xcf\x79\xe4\x8f\
+\x86\xb5\x8b\x01\x39\xa0\xca\x8a\x8d\xf4\x7b\xd5\x32\x25\x71\x9c\
+\xb3\x3e\x86\x91\x05\x7f\xd8\x03\x3e\x3c\x83\x5b\x14\xf0\x56\x2f\
+\xf0\xfd\xd5\x02\xb8\xfd\x55\x3d\x30\xb3\xf9\xcd\xab\x22\x03\x16\
+\x01\x3a\x00\xd0\x54\x6d\x6c\x8a\x15\x62\x58\x02\xcc\x71\xb1\xaa\
+\x47\x7e\x35\xc6\x17\xc9\x82\x78\x66\xc3\x19\x45\x78\xd0\xb4\x26\
+\xeb\x3d\x39\x87\x0b\x1f\xd1\xaf\x6a\xc9\x78\xb3\xfe\x5a\x9a\x3e\
+\x1b\x57\x96\x16\x9b\x1b\x3f\x87\x9b\x03\x98\x5b\x70\xd7\xaf\x17\
+\x18\x9f\x2d\x85\x41\x35\x06\x80\x6c\x29\x1e\x01\xe0\xdd\x6d\x08\
+\xf7\xcc\xf0\xde\xb7\x5b\xb8\xcd\xff\xdf\x26\x09\xbe\xbf\xba\xc2\
+\xbf\xfe\xcb\x3f\xc9\x9f\x78\x0d\x54\xa7\x7d\x5c\x6c\x17\x58\x2f\
+\x6f\xf0\xdd\x04\xf8\xee\xb7\xff\x2e\xde\xfe\xf1\xb3\xc7\x78\xfa\
+\xf9\x1f\xe2\xfe\xc3\x07\x58\x84\x13\x49\x73\xf6\xc3\x11\x46\x0d\
+\x4e\x46\xb6\x27\x98\x38\x5d\xf4\x10\x56\x2b\xc0\x89\x30\x99\x5a\
+\x70\x06\x89\x18\x0d\xe9\xe6\x1e\x0a\xec\x2a\x2c\x3e\x66\x0c\x80\
+\xae\x2f\x9a\xee\x42\xe0\x51\x32\xbe\xaf\xf2\x40\x5b\x2b\xb3\xc6\
+\xcd\x8c\xc6\x5c\x5b\x11\x29\x00\x9c\xc6\x31\x12\xab\xc2\x69\x15\
+\x8b\xdb\xfc\xc6\x8a\x80\xb4\x10\xc0\xad\x13\x78\x02\xac\xb1\xd8\
+\xab\x50\xf6\x1c\xa7\xc9\xfa\xab\xf0\xfc\x37\x2f\x90\x4f\x57\x78\
+\xb7\x04\xae\xaf\x6f\x90\x2e\x96\x78\xff\xfd\x35\x2c\x00\xc3\xa1\
+\xdc\x44\xe5\x34\x8e\xa5\xe4\xf5\xd8\x1d\xd4\x53\x8f\x00\xc4\x8b\
+\x7a\x02\x52\xbc\x00\xb2\xd1\x9d\x28\xf8\xcc\x46\x77\x08\xfb\x11\
+\x82\xfb\x8f\x50\x7a\x17\xb8\xd7\xe9\x22\x0f\xa2\xba\x17\xdb\xb7\
+\xdf\xd4\xd2\xc4\xbd\xc4\xa6\x77\x85\x78\x01\xc0\x3d\x81\x13\xcf\
+\xf0\x70\x74\x8e\xd2\xbb\x80\x87\x53\x78\x16\x50\x34\x8c\x8c\x41\
+\x85\xff\x07\x5b\x53\xe4\xea\xf5\xd8\xe3\x94\x00\x00\x00\x00\x49\
+\x45\x4e\x44\xae\x42\x60\x82\
+"""
+
+qt_resource_name = b"""\
+\x00\x09\
+\x06\xa8\xaa\x74\
+\x00\x71\
+\x00\x75\x00\x6f\x00\x74\x00\x65\x00\x2e\x00\x74\x00\x78\x00\x74\
+\x00\x0a\
+\x07\x2b\x67\xc7\
+\x00\x73\
+\x00\x61\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
+"""
+
+qt_resource_struct = b"""\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x00\x18\x00\x00\x00\x00\x00\x01\x00\x00\x00\x39\
+"""
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/sources/pyside2/tests/QtCore/sample.png b/sources/pyside6/tests/QtCore/sample.png
index 60450f0dc..60450f0dc 100644
--- a/sources/pyside2/tests/QtCore/sample.png
+++ b/sources/pyside6/tests/QtCore/sample.png
Binary files differ
diff --git a/sources/pyside6/tests/QtCore/setprop_on_ctor_test.py b/sources/pyside6/tests/QtCore/setprop_on_ctor_test.py
new file mode 100644
index 000000000..a619a29ec
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/setprop_on_ctor_test.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer
+
+
+class SetPropOnCtorTest(unittest.TestCase):
+ def testIt(self):
+ timer = QTimer(interval = 42)
+ self.assertEqual(timer.interval(), 42);
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/snake_prop_feature_test.py b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py
new file mode 100644
index 000000000..5f9328329
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/snake_prop_feature_test.py
@@ -0,0 +1,123 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+from PySide6.support import __feature__
+
+"""
+snake_prop_feature_test.py
+--------------------------
+
+Test the snake_case and true_property feature.
+
+This works now, including class properties.
+"""
+
+class Window(QtWidgets.QWidget):
+ def __init__(self):
+ super(Window, self).__init__()
+
+
+class FeatureTest(unittest.TestCase):
+ def setUp(self):
+ qApp or QtWidgets.QApplication()
+ __feature__.set_selection(0)
+
+ def tearDown(self):
+ __feature__.set_selection(0)
+ qApp.shutdown()
+
+ def testRenamedFunctions(self):
+ window = Window()
+ window.setWindowTitle('camelCase')
+
+ # and now the same with snake_case enabled
+ from __feature__ import snake_case
+
+ # Works with the same window! window = Window()
+ window.set_window_title('snake_case')
+
+ def testPropertyAppearVanish(self):
+ window = Window()
+
+ self.assertTrue(callable(window.isModal))
+ with self.assertRaises(AttributeError):
+ window.modal
+
+ from __feature__ import snake_case, true_property
+
+ self.assertTrue(isinstance(QtWidgets.QWidget.modal, property))
+ self.assertTrue(isinstance(window.modal, bool))
+ with self.assertRaises(AttributeError):
+ window.isModal
+
+ # switching back
+ __feature__.set_selection(0)
+
+ self.assertTrue(callable(window.isModal))
+ with self.assertRaises(AttributeError):
+ window.modal
+
+ def testClassProperty(self):
+ from __feature__ import snake_case, true_property
+ # We check the class...
+ self.assertEqual(type(QtWidgets.QApplication.quit_on_last_window_closed), bool)
+ x = QtWidgets.QApplication.quit_on_last_window_closed
+ QtWidgets.QApplication.quit_on_last_window_closed = not x
+ self.assertEqual(QtWidgets.QApplication.quit_on_last_window_closed, not x)
+ # ... and now the instance.
+ self.assertEqual(type(qApp.quit_on_last_window_closed), bool)
+ x = qApp.quit_on_last_window_closed
+ qApp.quit_on_last_window_closed = not x
+ self.assertEqual(qApp.quit_on_last_window_closed, not x)
+ # make sure values are equal
+ self.assertEqual(qApp.quit_on_last_window_closed,
+ QtWidgets.QApplication.quit_on_last_window_closed)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/staticMetaObject_test.py b/sources/pyside6/tests/QtCore/staticMetaObject_test.py
new file mode 100644
index 000000000..617fb639b
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/staticMetaObject_test.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Slot, QMetaObject
+
+class MyObject(QObject):
+ @Slot(int, str)
+ def slot1(self, a, b):
+ pass
+
+class testAttribute(unittest.TestCase):
+ def testBug896(self):
+ mo = MyObject.staticMetaObject
+ self.assertTrue(isinstance(mo, QMetaObject))
+ self.assertEqual(mo.className(), 'MyObject')
+ self.assertTrue(mo.indexOfSlot('slot1(int,QString)') > -1)
+
+ def testDuplicateSlot(self):
+ mo = MyObject.staticMetaObject
+ self.assertEqual(mo.indexOfSignal('destroyed(void)'), -1)
+ self.assertTrue(mo.indexOfSignal('destroyed()') > -1)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/static_method_test.py b/sources/pyside6/tests/QtCore/static_method_test.py
new file mode 100644
index 000000000..6233f1cc3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/static_method_test.py
@@ -0,0 +1,89 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for overloads involving static and non-static versions of a method.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QFile
+
+class StaticNonStaticMethodsTest(unittest.TestCase):
+ '''Test cases for overloads involving static and non-static versions of a method.'''
+
+ def setUp(self):
+ filename = 'somefile%d.txt' % os.getpid()
+ self.existing_filename = os.path.join(os.path.curdir, filename)
+ self.delete_file = False
+ if not os.path.exists(self.existing_filename):
+ f = open(self.existing_filename, 'w')
+ for line in range(10):
+ f.write('sbrubbles\n')
+ f.close()
+ self.delete_file = True
+
+ self.non_existing_filename = os.path.join(os.path.curdir, 'inexistingfile.txt')
+ i = 0
+ while os.path.exists(self.non_existing_filename):
+ i += 1
+ filename = 'inexistingfile-%d.txt' % i
+ self.non_existing_filename = os.path.join(os.path.curdir, filename)
+
+ def tearDown(self):
+ if self.delete_file:
+ os.remove(self.existing_filename)
+
+ def testCallingStaticMethodWithClass(self):
+ '''Call static method using class.'''
+ self.assertTrue(QFile.exists(self.existing_filename))
+ self.assertFalse(QFile.exists(self.non_existing_filename))
+
+ def testCallingStaticMethodWithInstance(self):
+ '''Call static method using instance of class.'''
+ f = QFile(self.non_existing_filename)
+ self.assertTrue(f.exists(self.existing_filename))
+ self.assertFalse(f.exists(self.non_existing_filename))
+
+ def testCallingInstanceMethod(self):
+ '''Call instance method.'''
+ f1 = QFile(self.non_existing_filename)
+ self.assertFalse(f1.exists())
+ f2 = QFile(self.existing_filename)
+ self.assertTrue(f2.exists())
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/thread_signals_test.py b/sources/pyside6/tests/QtCore/thread_signals_test.py
new file mode 100644
index 000000000..76ebc09da
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/thread_signals_test.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for QObject.signalsBlocked() and blockSignal()'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, QFile, QThread, QTimer, Qt
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class MyThread(QThread):
+
+ def run(self):
+ self.emit(SIGNAL("test(const QString&)"), "INdT - PySide");
+
+class TestThreadSignal(UsesQCoreApplication):
+
+ __called__ = True
+ def _callback(self, msg):
+ self.assertEqual(msg, "INdT - PySide")
+ self.__called__ = True
+ self.app.quit()
+
+ def testThread(self):
+ t = MyThread()
+ QObject.connect(t, SIGNAL("test(const QString&)"), self._callback);
+ t.start()
+
+ self.app.exec_()
+ t.wait()
+ self.assertTrue(self.__called__);
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtCore/tr_noop_test.py b/sources/pyside6/tests/QtCore/tr_noop_test.py
new file mode 100644
index 000000000..7a3cd8dc3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/tr_noop_test.py
@@ -0,0 +1,81 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QT_TR_NOOP, QT_TR_NOOP_UTF8
+from PySide6.QtCore import QT_TRANSLATE_NOOP, QT_TRANSLATE_NOOP3, QT_TRANSLATE_NOOP_UTF8
+
+class QtTrNoopTest(unittest.TestCase):
+
+ def setUp(self):
+ self.txt = 'Cthulhu fhtag!'
+
+ def tearDown(self):
+ del self.txt
+
+ def testQtTrNoop(self):
+ refcnt = sys.getrefcount(self.txt)
+ result = QT_TR_NOOP(self.txt)
+ self.assertEqual(result, self.txt)
+ self.assertEqual(sys.getrefcount(result), refcnt + 1)
+
+ def testQtTrNoopUtf8(self):
+ refcnt = sys.getrefcount(self.txt)
+ result = QT_TR_NOOP_UTF8(self.txt)
+ self.assertEqual(result, self.txt)
+ self.assertEqual(sys.getrefcount(result), refcnt + 1)
+
+ def testQtTranslateNoop(self):
+ refcnt = sys.getrefcount(self.txt)
+ result = QT_TRANSLATE_NOOP(None, self.txt)
+ self.assertEqual(result, self.txt)
+ self.assertEqual(sys.getrefcount(result), refcnt + 1)
+
+ def testQtTranslateNoopUtf8(self):
+ refcnt = sys.getrefcount(self.txt)
+ result = QT_TRANSLATE_NOOP_UTF8(self.txt)
+ self.assertEqual(result, self.txt)
+ self.assertEqual(sys.getrefcount(result), refcnt + 1)
+
+ def testQtTranslateNoop3(self):
+ refcnt = sys.getrefcount(self.txt)
+ result = QT_TRANSLATE_NOOP3(None, self.txt, None)
+ self.assertEqual(result, self.txt)
+ self.assertEqual(sys.getrefcount(result), refcnt + 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/translation_test.py b/sources/pyside6/tests/QtCore/translation_test.py
new file mode 100644
index 000000000..b5473694e
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/translation_test.py
@@ -0,0 +1,90 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests to test QTranslator and translation in general.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTranslator, QCoreApplication
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class TranslationTest(UsesQCoreApplication):
+ '''Test case for Qt translation facilities.'''
+
+ def setUp(self):
+ super(TranslationTest, self).setUp()
+ self.trdir = os.path.join(os.path.dirname(__file__), 'translations')
+
+ def testLatin(self):
+ #Set string value to Latin
+ translator = QTranslator()
+ translator.load(os.path.join(self.trdir, 'trans_latin.qm'))
+ self.app.installTranslator(translator)
+
+ obj = QObject()
+ obj.setObjectName(obj.tr('Hello World!'))
+ self.assertEqual(obj.objectName(), 'Orbis, te saluto!')
+
+ def testRussian(self):
+ #Set string value to Russian
+ translator = QTranslator()
+ translator.load(os.path.join(self.trdir, 'trans_russian.qm'))
+ self.app.installTranslator(translator)
+
+ obj = QObject()
+ obj.setObjectName(obj.tr('Hello World!'))
+ self.assertEqual(obj.objectName(), 'привет мир!')
+
+ def testUtf8(self):
+ translator = QTranslator()
+ translator.load(os.path.join(self.trdir, 'trans_russian.qm'))
+ self.app.installTranslator(translator)
+
+ obj = QObject()
+ obj.setObjectName(obj.tr('Hello World!'))
+ self.assertEqual(obj.objectName(), 'привет мир!')
+
+ def testTranslateWithNoneDisambiguation(self):
+ value = 'String here'
+ obj = QCoreApplication.translate('context', value, None)
+ self.assertTrue(isinstance(obj, str))
+ self.assertEqual(obj, value)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtCore/translations/trans_latin.qm b/sources/pyside6/tests/QtCore/translations/trans_latin.qm
index efdbee8c7..efdbee8c7 100644
--- a/sources/pyside2/tests/QtCore/translations/trans_latin.qm
+++ b/sources/pyside6/tests/QtCore/translations/trans_latin.qm
Binary files differ
diff --git a/sources/pyside2/tests/QtCore/translations/trans_latin.ts b/sources/pyside6/tests/QtCore/translations/trans_latin.ts
index b9fcf41be..b9fcf41be 100644
--- a/sources/pyside2/tests/QtCore/translations/trans_latin.ts
+++ b/sources/pyside6/tests/QtCore/translations/trans_latin.ts
diff --git a/sources/pyside2/tests/QtCore/translations/trans_russian.qm b/sources/pyside6/tests/QtCore/translations/trans_russian.qm
index 5f16552a7..5f16552a7 100644
--- a/sources/pyside2/tests/QtCore/translations/trans_russian.qm
+++ b/sources/pyside6/tests/QtCore/translations/trans_russian.qm
Binary files differ
diff --git a/sources/pyside2/tests/QtCore/translations/trans_russian.ts b/sources/pyside6/tests/QtCore/translations/trans_russian.ts
index d1ba49bd2..d1ba49bd2 100644
--- a/sources/pyside2/tests/QtCore/translations/trans_russian.ts
+++ b/sources/pyside6/tests/QtCore/translations/trans_russian.ts
diff --git a/sources/pyside6/tests/QtCore/unaryoperator_test.py b/sources/pyside6/tests/QtCore/unaryoperator_test.py
new file mode 100644
index 000000000..ad0e4a94e
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/unaryoperator_test.py
@@ -0,0 +1,73 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests the presence of unary operator __neg__ on the QPoint class'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPoint
+
+class NegUnaryOperatorTest(unittest.TestCase):
+ '''Tests the presence of unary operator __neg__ on the QPoint class'''
+
+ def setUp(self):
+ #Acquire resources
+ self.x, self.y = 10, 20
+ self.neg_x, self.neg_y = -self.x, -self.y
+ self.qpoint = QPoint(self.x, self.y)
+
+ def tearDown(self):
+ #Release resources
+ del self.qpoint
+ del self.x
+ del self.y
+ del self.neg_x
+ del self.neg_y
+
+ def testNegUnaryOperator(self):
+ #Test __neg__ unary operator on QPoint class
+ __neg__method_exists = True
+ try:
+ neg_qpoint = -self.qpoint
+ except:
+ __neg__method_exists = False
+
+ self.assertTrue(__neg__method_exists)
+ self.assertEqual(self.qpoint, -neg_qpoint)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/unicode_test.py b/sources/pyside6/tests/QtCore/unicode_test.py
new file mode 100644
index 000000000..ba59d0dd3
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/unicode_test.py
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QString conversion to/from Python Unicode'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from PySide6.QtCore import QByteArray
+
+class UnicodeConversion(unittest.TestCase):
+ '''Test case for QString to/from Python Unicode conversion'''
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testSetRegularStringRetrieveUnicode(self):
+ #Set regular Python string retrieve unicode
+ obj = QObject()
+ obj.setObjectName('test')
+ self.assertEqual(obj.objectName(), 'test')
+
+ def testSetUnicodeRetrieveUnicode(self):
+ #Set Python unicode string and retrieve unicode
+ obj = QObject()
+ obj.setObjectName('ümlaut')
+ self.assertEqual(obj.objectName(), 'ümlaut')
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtCore/versioninfo_test.py b/sources/pyside6/tests/QtCore/versioninfo_test.py
new file mode 100644
index 000000000..89020953e
--- /dev/null
+++ b/sources/pyside6/tests/QtCore/versioninfo_test.py
@@ -0,0 +1,55 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+
+class TestVersionInfo(unittest.TestCase):
+ def testIt(self):
+
+ v = PySide6.__version_info__
+ self.assertEqual(type(v), tuple)
+ self.assertEqual(len(v), 5)
+ self.assertEqual(type(v[0]), int)
+ self.assertEqual(type(v[1]), int)
+ self.assertEqual(type(v[2]), int)
+ self.assertEqual(type(v[3]), str)
+ self.assertEqual(type(v[4]), str)
+
+ self.assertEqual(type(PySide6.__version__), str)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt b/sources/pyside6/tests/QtDataVisualization/CMakeLists.txt
index 61b347263..61b347263 100644
--- a/sources/pyside2/tests/QtDataVisualization/CMakeLists.txt
+++ b/sources/pyside6/tests/QtDataVisualization/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtDataVisualization/datavisualization_test.py b/sources/pyside6/tests/QtDataVisualization/datavisualization_test.py
new file mode 100644
index 000000000..c368f6cff
--- /dev/null
+++ b/sources/pyside6/tests/QtDataVisualization/datavisualization_test.py
@@ -0,0 +1,92 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QtDataVisualization'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqguiapplication import UsesQGuiApplication
+from PySide6.QtCore import QTimer
+from PySide6.QtDataVisualization import QtDataVisualization
+
+def dataToBarDataRow(data):
+ result = []
+ for d in data:
+ result.append(QtDataVisualization.QBarDataItem(d))
+ return result
+
+def dataToBarDataArray(data):
+ result = []
+ for row in data:
+ result.append(dataToBarDataRow(row))
+ return result
+
+class QtDataVisualizationTestCase(UsesQGuiApplication):
+ '''Tests related to QtDataVisualization'''
+
+ def testBars(self):
+ self.bars = QtDataVisualization.Q3DBars()
+ self.columnAxis = QtDataVisualization.QCategory3DAxis()
+ self.columnAxis.setTitle('Columns')
+ self.columnAxis.setTitleVisible(True)
+ self.columnAxis.setLabels(['Column1', 'Column2'])
+
+ self.rowAxis = QtDataVisualization.QCategory3DAxis()
+ self.rowAxis.setTitle('Rows')
+ self.rowAxis.setTitleVisible(True)
+ self.rowAxis.setLabels(['Row1', 'Row2'])
+
+ self.valueAxis = QtDataVisualization.QValue3DAxis()
+ self.valueAxis.setTitle('Values')
+ self.valueAxis.setTitleVisible(True)
+ self.valueAxis.setRange(0, 5);
+
+ self.bars.setRowAxis(self.rowAxis)
+ self.bars.setColumnAxis(self.columnAxis)
+ self.bars.setValueAxis(self.valueAxis)
+
+ self.series = QtDataVisualization.QBar3DSeries()
+ self.arrayData = [[1, 2], [3, 4]]
+ self.series.dataProxy().addRows(dataToBarDataArray(self.arrayData))
+
+ self.bars.setPrimarySeries(self.series)
+
+ self.bars.show()
+ QTimer.singleShot(500, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtDesigner/CMakeLists.txt b/sources/pyside6/tests/QtDesigner/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtDesigner/CMakeLists.txt
+++ b/sources/pyside6/tests/QtDesigner/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtGui/CMakeLists.txt b/sources/pyside6/tests/QtGui/CMakeLists.txt
index 179e88fd6..179e88fd6 100644
--- a/sources/pyside2/tests/QtGui/CMakeLists.txt
+++ b/sources/pyside6/tests/QtGui/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtGui/bug_1091.py b/sources/pyside6/tests/QtGui/bug_1091.py
new file mode 100644
index 000000000..78645589b
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_1091.py
@@ -0,0 +1,47 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1091 '''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtGui
+
+class QPainterTestCase(unittest.TestCase):
+ def testIt(self):
+ self.assertTrue("PixmapFragment" in dir(QtGui.QPainter))
+ self.assertTrue("drawPixmapFragments" in dir(QtGui.QPainter))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_300_test.py b/sources/pyside6/tests/QtGui/bug_300_test.py
new file mode 100644
index 000000000..8f734780f
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_300_test.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QModelIndex, QStringListModel
+
+
+class TestQAbstractItemModelSignals(unittest.TestCase):
+ def sigCallback(self, index, r, c):
+ self._called = True
+
+ def testSignals(self):
+ self._called = False
+ m = QStringListModel()
+ m.rowsAboutToBeInserted[QModelIndex,int,int].connect(self.sigCallback)
+ m.insertRows(0, 3)
+ self.assertTrue(self._called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_367.py b/sources/pyside6/tests/QtGui/bug_367.py
new file mode 100644
index 000000000..07b229d51
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_367.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 367: http://bugs.openbossa.org/show_bug.cgi?id=367'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6 import QtCore,QtGui
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ model = QtGui.QStandardItemModel()
+ parentItem = model.invisibleRootItem()
+ for i in range(10):
+ item = QtGui.QStandardItem()
+ rcount = sys.getrefcount(item)
+ parentItem.appendRow(item)
+ self.assertEqual(rcount+1, sys.getrefcount(item))
+ parentItem = item
+
+ self.assertTrue(True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_480.py b/sources/pyside6/tests/QtGui/bug_480.py
new file mode 100644
index 000000000..bedf1ae07
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_480.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+
+class BuggyWidget(QtWidgets.QWidget):
+ def setup(self):
+ self.verticalLayout = QtWidgets.QVBoxLayout(self)
+ self.gridLayout = QtWidgets.QGridLayout()
+ self.lbl = QtWidgets.QLabel(self)
+ self.gridLayout.addWidget(self.lbl, 0, 1, 1, 1)
+
+ # this cause a segfault during the ownership transfer
+ self.verticalLayout.addLayout(self.gridLayout)
+
+class LayoutTransferOwnerShip(unittest.TestCase):
+ def testBug(self):
+ app = QtWidgets.QApplication([])
+ w = BuggyWidget()
+ w.setup()
+ w.show()
+ self.assertTrue(True)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/bug_606.py b/sources/pyside6/tests/QtGui/bug_606.py
new file mode 100644
index 000000000..332798a14
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_606.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6.QtGui import QVector2D, QVector3D, QVector4D
+from PySide6.QtGui import QColor
+
+class testCases(unittest.TestCase):
+ def testQVector2DToTuple(self):
+ vec = QVector2D(1, 2)
+ self.assertEqual((1, 2), vec.toTuple())
+
+ def testQVector3DToTuple(self):
+ vec = QVector3D(1, 2, 3)
+ self.assertEqual((1, 2, 3), vec.toTuple())
+
+ def testQVector4DToTuple(self):
+ vec = QVector4D(1, 2, 3, 4)
+ self.assertEqual((1, 2, 3, 4), vec.toTuple())
+
+ def testQColorToTuple(self):
+ c = QColor(0, 0, 255)
+ c.setRgb(1, 2, 3)
+ self.assertEqual((1, 2, 3, 255), c.toTuple())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_617.py b/sources/pyside6/tests/QtGui/bug_617.py
new file mode 100644
index 000000000..3c8786cea
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_617.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QEvent
+from PySide6.QtGui import QColor
+
+
+class MyEvent(QEvent):
+ def __init__(self):
+ QEvent.__init__(self, QEvent.Type(999))
+
+
+class Bug617(unittest.TestCase):
+ def testRepr(self):
+ c = QColor.fromRgb(1, 2, 3, 4)
+ s = c.spec()
+ self.assertEqual(repr(s), repr(QColor.Rgb))
+
+ def testOutOfBounds(self):
+ e = MyEvent()
+ self.assertEqual(repr(e.type()), 'PySide6.QtCore.QEvent.Type(999)')
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_652.py b/sources/pyside6/tests/QtGui/bug_652.py
new file mode 100644
index 000000000..c70055b3b
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_652.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import *
+
+class MyData(QTextBlockUserData):
+ def __init__(self, data):
+ QTextBlockUserData.__init__(self)
+ self.data = data
+
+ def getMyNiceData(self):
+ return self.data
+
+class TestBug652(unittest.TestCase):
+ """Segfault when using QTextBlock::setUserData due to missing ownership transfer"""
+ def testIt(self):
+ td = QTextDocument()
+ tc = QTextCursor(td)
+ tc.insertText("Hello world")
+ heyHo = "hey ho!"
+ tc.block().setUserData(MyData(heyHo))
+ self.assertEqual(type(tc.block().userData()), MyData)
+ self.assertEqual(tc.block().userData().getMyNiceData(), heyHo)
+
+ del tc
+ tc = QTextCursor(td)
+ blk = tc.block()
+ self.assertEqual(type(blk.userData()), MyData)
+ self.assertEqual(blk.userData().getMyNiceData(), heyHo)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_660.py b/sources/pyside6/tests/QtGui/bug_660.py
new file mode 100644
index 000000000..e625f2981
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_660.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QStandardItemModel, QStandardItem
+
+class MyItemModel(QStandardItemModel):
+ def __init__(self,parent=None):
+ super(MyItemModel,self).__init__(parent)
+ self.appendRow([QStandardItem('Item 1'),])
+
+ def mimeTypes(self):
+ mtypes = super(MyItemModel,self).mimeTypes()
+ mtypes.append('application/my-form')
+ return mtypes
+
+ def mimeData(self,indexes):
+ self.__mimedata = super(MyItemModel,self).mimeData(indexes)
+ self.__mimedata.setData('application/my-form',bytes('hi', "UTF-8"))
+ return self.__mimedata
+
+class TestBug660(unittest.TestCase):
+ '''QMimeData type deleted prematurely when overriding mime-type in QStandardItemModel drag and drop'''
+ def testIt(self):
+ model = MyItemModel()
+ model.mimeData([model.index(0, 0)]) # if it doesn't raise an exception it's all right!
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_716.py b/sources/pyside6/tests/QtGui/bug_716.py
new file mode 100644
index 000000000..f49b909fa
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_716.py
@@ -0,0 +1,44 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import Qt, QPersistentModelIndex, QStringListModel
+
+if __name__ == '__main__':
+ stringListModel = QStringListModel(['one', 'two'])
+ idx = stringListModel.index(1, 0)
+ persistentModelIndex = QPersistentModelIndex(idx)
+ stringListModel.data(persistentModelIndex, Qt.DisplayRole)
+
diff --git a/sources/pyside6/tests/QtGui/bug_740.py b/sources/pyside6/tests/QtGui/bug_740.py
new file mode 100644
index 000000000..1d32fe5bd
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_740.py
@@ -0,0 +1,47 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QSize
+from PySide6.QtGui import QBitmap, QImage
+
+class TestQBitmap(UsesQApplication):
+ def testFromDataMethod(self):
+ dataBits = bytes('\x38\x28\x38\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\xfe\xfe\x7c\x7c\x38\x38\x10\x10', "UTF-8")
+ bim = QBitmap.fromData(QSize(8, 48), dataBits, QImage.Format_Mono) # missing function
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_743.py b/sources/pyside6/tests/QtGui/bug_743.py
new file mode 100644
index 000000000..ce2664a6e
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_743.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QMatrix4x4
+
+class TestQMatrix(unittest.TestCase):
+ def testOperator(self):
+ m = QMatrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
+ v = 1
+ for x in range(4):
+ for y in range(4):
+ self.assertEqual(m[x,y], v)
+ v += 1
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_991.py b/sources/pyside6/tests/QtGui/bug_991.py
new file mode 100644
index 000000000..63a4a5760
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_991.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from PySide6.QtGui import QPen, QBrush
+
+class TestBug991 (unittest.TestCase):
+ def testReprFunction(self):
+ reprPen = repr(QPen())
+ self.assertTrue(reprPen.startswith("<PySide6.QtGui.QPen"))
+ reprBrush = repr(QBrush())
+ self.assertTrue(reprBrush.startswith("<PySide6.QtGui.QBrush"))
+ reprObject = repr(QObject())
+ self.assertTrue(reprObject.startswith("<PySide6.QtCore.QObject"))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py b/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py
new file mode 100644
index 000000000..7b571cfe2
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for PYSIDE-344, imul/idiv are used instead of mul/div, modifying the argument passed in'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+
+def testList():
+ return [QPoint(10, 10), QPointF(1, 1), QSize(10, 10), QSizeF(1, 1),
+ QMargins(10, 10, 10, 10),
+ QTransform(), QMatrix4x4(),
+ QVector2D(1, 1), QVector3D(1, 1, 1), QVector4D(1, 1, 1, 1),
+ QQuaternion(1, 1, 1, 1)]
+
+class TestMulDiv(unittest.TestCase):
+
+ def testMultiplication(self):
+ fails = ''
+ for a in testList():
+ mul = (a * 2)
+ if a == mul:
+ fails += ' ' + type(a).__name__
+ self.assertEqual(fails, '')
+
+ def testDivision(self):
+ fails = ''
+ for a in testList():
+ div = (a * 2)
+ if a == div:
+ fails += ' ' + type(a).__name__
+ self.assertEqual(fails, '')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py b/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py
new file mode 100644
index 000000000..46173b171
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# TODO:
+# move this to QtCore -- QStringListModel is part of QtGui and there is no
+# simple model class appropriate for this test in QtCore.
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+
+
+class TestBugPYSIDE41(unittest.TestCase):
+
+ def testIt(self):
+
+ # list of single-character strings
+ strings = list('abcdefghijklmnopqrstuvwxyz')
+
+ model = QStringListModel(strings)
+
+ # Test hashing of both QModelIndex and QPersistentModelIndex
+ indexFunctions = []
+ indexFunctions.append(model.index)
+ indexFunctions.append(lambda i: QPersistentModelIndex(model.index(i)))
+
+ for indexFunction in indexFunctions:
+
+ # If two objects compare equal, their hashes MUST also be equal. (The
+ # reverse is not a requirement.)
+ for i, _ in enumerate(strings):
+ index1 = indexFunction(i)
+ index2 = indexFunction(i)
+ self.assertEqual(index1, index2)
+ self.assertEqual(hash(index1), hash(index2))
+
+ # Adding the full set of indexes to itself is a no-op.
+ allIndexes1 = set(indexFunction(i) for i, _ in enumerate(strings))
+ allIndexes2 = set(indexFunction(i) for i, _ in enumerate(strings))
+ allIndexesCombined = allIndexes1 & allIndexes2
+ self.assertEqual(allIndexes1, allIndexesCombined)
+ self.assertEqual(allIndexes2, allIndexesCombined)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/deepcopy_test.py b/sources/pyside6/tests/QtGui/deepcopy_test.py
new file mode 100644
index 000000000..8cffe2b3f
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/deepcopy_test.py
@@ -0,0 +1,151 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from copy import deepcopy
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPoint
+from PySide6.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
+from PySide6.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
+from PySide6.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
+from PySide6.QtGui import QVector2D, QVector3D, QVector4D
+from PySide6.QtGui import QColor, QTransform, QKeySequence, QQuaternion
+from PySide6.QtGui import QPolygon
+
+class DeepCopyHelper:
+ def testCopy(self):
+ copy = deepcopy([self.original])[0]
+ self.assertTrue(copy is not self.original)
+ self.assertEqual(copy, self.original)
+
+class DeepCopyColorHelperF:
+ def testCopy(self):
+ copy = deepcopy([self.original])[0]
+ self.assertTrue(copy is not self.original)
+ self.assertEqual(copy.spec(), self.original.spec())
+ # impossible to compare float point
+ # self.assertEqual(copy, self.original)
+
+
+class QColorDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QColor("red")
+
+class QColorRGBDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
+ def setUp(self):
+ self.original = QColor.fromRgbF(0.2, 0.3, 0.4, 0.5)
+
+class QColorHSLDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
+ def setUp(self):
+ self.original = QColor.fromHslF(0.2, 0.3, 0.4, 0.5)
+
+class QColorHSVDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
+ def setUp(self):
+ self.original = QColor.fromHsvF(0.2, 0.3, 0.4, 0.5)
+
+class QColorCMYKDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
+ def setUp(self):
+ self.original = QColor.fromCmykF(0.2, 0.3, 0.4, 0.5, 0.6)
+
+class QTransformDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
+
+class QKeySequenceDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QKeySequence("Ctrl+P")
+
+class QQuaternionDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QQuaternion(1, 2, 3, 4)
+
+class QVector2DDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector2D(1, 2)
+
+class QVector3DDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector3D(1, 2, 3)
+
+class QVector4DDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector4D(1, 2, 3, 4)
+
+class QPolygonDeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QPolygon([QPoint(1, 2), QPoint(3, 4), QPoint(5, 6)])
+
+
+# Avoid these tests until get gcc fixed
+# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
+"""
+class QMatrix2x2DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x2([1, 2, 3, 4])
+
+class QMatrix2x3DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x3([1, 2, 3, 4, 5, 6])
+
+class QMatrix2x4DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x4([1, 2, 3, 4, 5, 6, 7, 8])
+
+class QMatrix3x2DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x2([1, 2, 3, 4, 5, 6])
+
+class QMatrix3x3DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x3([1, 2, 3, 4, 5, 6, 7, 8, 9])
+
+class QMatrix3x4DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
+
+class QMatrix4x2DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x2([1, 2, 3, 4, 5, 6, 7, 8])
+
+class QMatrix4x3DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x3([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
+
+class QMatrix4x4DeepCopy(DeepCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
+"""
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/float_to_int_implicit_conversion_test.py b/sources/pyside6/tests/QtGui/float_to_int_implicit_conversion_test.py
new file mode 100644
index 000000000..cc381c20a
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/float_to_int_implicit_conversion_test.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QImage'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QImage, qRgb
+
+from helper.usesqapplication import UsesQApplication
+
+class SetPixelFloat(UsesQApplication):
+ '''Test case for calling setPixel with float as argument'''
+
+ def setUp(self):
+ #Acquire resources
+ super(SetPixelFloat, self).setUp()
+ self.color = qRgb(255, 0, 0)
+ self.image = QImage(200, 200, QImage.Format_RGB32)
+
+ def tearDown(self):
+ #Release resources
+ del self.color
+ del self.image
+ super(SetPixelFloat, self).tearDown()
+
+ def testFloat(self):
+ #QImage.setPixel(float, float, color) - Implicit conversion
+ self.image.setPixel(3.14, 4.2, self.color)
+ self.assertEqual(self.image.pixel(3.14, 4.2), self.color)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtGui/pyside_reload_test.py b/sources/pyside6/tests/QtGui/pyside_reload_test.py
index 75994f4e4..75994f4e4 100644
--- a/sources/pyside2/tests/QtGui/pyside_reload_test.py
+++ b/sources/pyside6/tests/QtGui/pyside_reload_test.py
diff --git a/sources/pyside6/tests/QtGui/qcolor_reduce_test.py b/sources/pyside6/tests/QtGui/qcolor_reduce_test.py
new file mode 100644
index 000000000..a508dad50
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qcolor_reduce_test.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import pickle
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QColor
+
+class TestQColor (unittest.TestCase):
+ def reduceColor(self, c):
+ p = pickle.dumps(c)
+ c2 = pickle.loads(p)
+ self.assertEqual(c.spec(), c2.spec())
+ self.assertEqual(c, c2)
+
+ def testReduceEmpty(self):
+ self.reduceColor(QColor())
+
+ def testReduceString(self):
+ self.reduceColor(QColor('gray'))
+
+ def testReduceRGB(self):
+ self.reduceColor(QColor.fromRgbF(0.1, 0.2, 0.3, 0.4))
+
+ def testReduceCMYK(self):
+ self.reduceColor(QColor.fromCmykF(0.1, 0.2, 0.3, 0.4, 0.5))
+
+ def testReduceHsl(self):
+ self.reduceColor(QColor.fromHslF(0.1, 0.2, 0.3, 0.4))
+
+ def testReduceHsv(self):
+ self.reduceColor(QColor.fromHsvF(0.1, 0.2, 0.3, 0.4))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qcolor_test.py b/sources/pyside6/tests/QtGui/qcolor_test.py
new file mode 100644
index 000000000..aef9c24e0
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qcolor_test.py
@@ -0,0 +1,129 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import colorsys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QColor, QColorConstants
+
+
+class QColorGetTest(unittest.TestCase):
+
+ def setUp(self):
+ self.color = QColor(20, 40, 60, 80)
+
+ def testGetRgb(self):
+ self.assertEqual(self.color.getRgb(), (20, 40, 60, 80))
+
+ def testGetHslF(self):
+ hls = colorsys.rgb_to_hls(20.0/255, 40.0/255, 60.0/255)
+ hsla = hls[0], hls[2], hls[1], self.color.alphaF()
+ for x, y in zip(self.color.getHslF(), hsla): # Due to rounding problems
+ self.assertTrue(x - y < 1/100000.0)
+
+ def testGetHsv(self):
+ hsv = colorsys.rgb_to_hsv(20.0/255, 40.0/255, 60.0/255)
+ hsva = int(hsv[0]*360.0), int(hsv[1]*255), int(hsv[2]*256), self.color.alpha()
+ self.assertEqual(self.color.getHsv(), hsva)
+
+ def testGetCmyk(self): # not supported by colorsys
+ self.assertEqual(self.color.getCmyk(), (170, 85, 0, 195, 80))
+
+ def testGetCmykF(self): # not supported by colorsys
+ for x, y in zip(self.color.getCmykF(), (170/255.0, 85/255.0, 0, 195/255.0, 80/255.0)):
+ self.assertTrue(x - y < 1/10000.0)
+
+
+class QColorQRgbConstructor(unittest.TestCase):
+ '''QColor(QRgb) constructor'''
+ # Affected by bug #170 - QColor(QVariant) coming before QColor(uint)
+ # in overload sorting
+
+ def testBasic(self):
+ '''QColor(QRgb)'''
+ color = QColor(255, 0, 0)
+ #QRgb format #AARRGGBB
+ rgb = 0x00FF0000
+ self.assertEqual(QColor(rgb), color)
+
+
+class QColorEqualGlobalColor(unittest.TestCase):
+
+ def testEqualGlobalColor(self):
+ '''QColor == Qt::GlobalColor'''
+ self.assertEqual(QColor(255, 0, 0), Qt.red)
+
+
+class QColorCopy(unittest.TestCase):
+
+ def testDeepCopy(self):
+ '''QColor deepcopy'''
+
+ from copy import deepcopy
+
+ original = QColor(0, 0, 255)
+ copy = deepcopy([original])[0]
+
+ self.assertTrue(original is not copy)
+ self.assertEqual(original, copy)
+ del original
+ self.assertEqual(copy, QColor(0, 0, 255))
+
+ def testEmptyCopy(self):
+ from copy import deepcopy
+
+ original = QColor()
+ copy = deepcopy([original])[0]
+ self.assertTrue(original is not copy)
+ self.assertEqual(original, copy)
+ del original
+ self.assertEqual(copy, QColor())
+
+
+class QColorRepr(unittest.TestCase):
+ def testReprFunction(self):
+ # QColorConstants are disabled for MSVC/5.15, fixme: Check Qt 6
+ c = QColorConstants.Yellow if sys.platform != 'win32' else QColor(100, 120, 200)
+ c2 = eval(c.__repr__())
+ self.assertEqual(c, c2)
+
+ def testStrFunction(self):
+ c = QColor('red')
+ c2 = eval(c.__str__())
+ self.assertEqual(c, c2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qcursor_test.py b/sources/pyside6/tests/QtGui/qcursor_test.py
new file mode 100644
index 000000000..aede84498
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qcursor_test.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test for Bug 630 - Fails to resolve overload for QCursor(QBitmap, QBitmap, int, int)
+http://bugs.openbossa.org/show_bug.cgi?id=630
+'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QBitmap, QCursor, QPixmap
+from helper.usesqapplication import UsesQApplication
+
+class TestQCursor(UsesQApplication):
+ def testQCursorConstructor(self):
+ bmp = QBitmap(16, 16)
+ cursor = QCursor(bmp, bmp, 16, 16)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qdatastream_gui_operators_test.py b/sources/pyside6/tests/QtGui/qdatastream_gui_operators_test.py
new file mode 100644
index 000000000..9bcb03753
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qdatastream_gui_operators_test.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QDataStream, QByteArray, QIODevice, Qt
+from PySide6.QtGui import QPixmap, QColor
+
+from helper.usesqapplication import UsesQApplication
+
+class QPixmapQDatastream(UsesQApplication):
+ '''QDataStream <<>> QPixmap'''
+
+ def setUp(self):
+ super(QPixmapQDatastream, self).setUp()
+ self.source_pixmap = QPixmap(100, 100)
+ self.source_pixmap.fill(Qt.red)
+ self.output_pixmap = QPixmap()
+ self.buffer = QByteArray()
+ self.read_stream = QDataStream(self.buffer, QIODevice.ReadOnly)
+ self.write_stream = QDataStream(self.buffer, QIODevice.WriteOnly)
+
+ def testStream(self):
+ self.write_stream << self.source_pixmap
+
+ self.read_stream >> self.output_pixmap
+
+ image = self.output_pixmap.toImage()
+ pixel = image.pixel(10,10)
+ self.assertEqual(pixel, QColor(Qt.red).rgba())
+ self.assertEqual(self.source_pixmap.toImage(), self.output_pixmap.toImage())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qdesktopservices_test.py b/sources/pyside6/tests/QtGui/qdesktopservices_test.py
new file mode 100644
index 000000000..089465c6c
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qdesktopservices_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QDesktopServices'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QDesktopServices
+from PySide6.QtCore import QUrl
+
+class QDesktopServicesTest(unittest.TestCase):
+ def testOpenUrl(self):
+ # At the bare minimum check that they return false for invalid url's
+ url = QUrl()
+ self.assertEqual(QDesktopServices.openUrl(url), False)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qfontmetrics_test.py b/sources/pyside6/tests/QtGui/qfontmetrics_test.py
new file mode 100644
index 000000000..3a3520003
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qfontmetrics_test.py
@@ -0,0 +1,233 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests for inject codes and modifications on QFontMetrics
+ and QFontMetricsF'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QFont, QFontMetrics, QFontMetricsF
+from PySide6.QtCore import QRect, QRectF, Qt, QSize, QSizeF
+from helper.usesqapplication import UsesQApplication
+
+
+class QFontMetricsTest(UsesQApplication):
+ '''Base class for QFontMetrics tests'''
+
+ def setUp(self):
+ super(QFontMetricsTest, self).setUp()
+ self.font = QFont()
+ self.metrics = QFontMetrics(self.font)
+
+ def tearDown(self):
+ del self.metrics
+ del self.font
+ super(QFontMetricsTest, self).tearDown()
+
+
+class BoundingRectTest(QFontMetricsTest):
+ '''Tests for QFontMetrics.boundingRect inject code'''
+
+ def testIntDefault(self):
+ '''QFontMetrics.boundingRect(int, int, int, int, ...) - default args'''
+ rect = self.metrics.boundingRect(0, 0, 0, 0,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT')
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testIntWithArg(self):
+ '''QFontMetrics.boundingRect(int, int, int, int, ...) - single arg'''
+ rect = self.metrics.boundingRect(0, 0, 0, 0,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 2)
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testIntWithFull(self):
+ '''QFontMetrics.boundingRect(int, int, int, int, ...) - all argss'''
+ rect = self.metrics.boundingRect(0, 0, 0, 0,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, [1, 2, 3, 4, 5])
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testIntTypeError(self):
+ '''QFontMetrics.boundingRect(int, int, int, int, ...) - type error'''
+ self.assertRaises(TypeError, self.metrics.boundingRect, 0, 0, 0, 0,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, ['aaaa', 'ase'])
+
+ def testQRectDefault(self):
+ '''QFontMetrics.boundingRect(QRect, ...) - default args'''
+ arg = QRect(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT')
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testQRectWithArg(self):
+ '''QFontMetrics.boundingRect(QRect, ...) - only tabstops'''
+ arg = QRect(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 2)
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testQRectWithFull(self):
+ '''QFontMetrics.boundingRect(QRect, ...) - all arguments'''
+ arg = QRect(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20,
+ [1, 2, 3, 4, 5])
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testQRectTypeError(self):
+ '''QFontMetrics.boundingRect(QRect, ...) - type error'''
+ arg = QRect(0, 0, 100, 200)
+ self.assertRaises(TypeError, self.metrics.boundingRect, arg,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, ['aaaa', 'ase'])
+
+
+class SizeTest(QFontMetricsTest):
+ '''Tests for QFontMetrics.size inject code'''
+
+ def testDefault(self):
+ '''QFontMetrics.size - default arguments'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT')
+ self.assertTrue(isinstance(size, QSize))
+
+ def testWithTabStops(self):
+ '''QFontMetrics.size - only tabstops'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT', 2)
+ self.assertTrue(isinstance(size, QSize))
+
+ def testFull(self):
+ '''QFontMetrics.size - all arguments'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT', 2, [1, 2, 3, 4])
+ self.assertTrue(isinstance(size, QSize))
+
+ def testTypeError(self):
+ '''QFontMetrics.size - type error'''
+ self.assertRaises(TypeError, self.metrics.size,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, ['aaaa', 'ase'])
+
+
+class QFontMetricsFTest(UsesQApplication):
+ '''Base class for QFontMetrics tests'''
+
+ def setUp(self):
+ super(QFontMetricsFTest, self).setUp()
+ self.font = QFont()
+ self.metrics = QFontMetricsF(self.font)
+
+ def tearDown(self):
+ del self.metrics
+ del self.font
+ super(QFontMetricsFTest, self).tearDown()
+
+
+class FBoundingRectTest(QFontMetricsFTest):
+ '''Tests for QFontMetricsF.boundingRect inject code'''
+
+ def testQRectDefault(self):
+ '''QFontMetricsF.boundingRect(QRectF, ...) - default args'''
+ arg = QRectF(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT')
+ self.assertTrue(isinstance(rect, QRectF))
+
+ def testQRectWithArg(self):
+ '''QFontMetricsF.boundingRect(QRectF, ...) - only tabstops'''
+ arg = QRectF(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 2)
+ self.assertTrue(isinstance(rect, QRectF))
+
+ def testQRectWithFull(self):
+ '''QFontMetricsF.boundingRect(QRectF, ...) - all arguments'''
+ arg = QRectF(0, 0, 100, 200)
+ rect = self.metrics.boundingRect(arg, Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20,
+ [1, 2, 3, 4, 5])
+ self.assertTrue(isinstance(rect, QRectF))
+
+ def testQRectTypeError(self):
+ '''QFontMetricsF.boundingRect(QRectF, ...) - type error'''
+ arg = QRectF(0, 0, 100, 200)
+ self.assertRaises(TypeError, self.metrics.boundingRect, arg,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, ['aaaa', 'ase'])
+
+
+class FSizeTest(QFontMetricsFTest):
+ '''Tests for QFontMetricsF.size inject code'''
+
+ def testDefault(self):
+ '''QFontMetricsF.size - default arguments'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT')
+ self.assertTrue(isinstance(size, QSizeF))
+
+ def testWithTabStops(self):
+ '''QFontMetricsF.size - only tabstops'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT', 2)
+ self.assertTrue(isinstance(size, QSizeF))
+
+ def testFull(self):
+ '''QFontMetricsF.size - all arguments'''
+ size = self.metrics.size(Qt.TextExpandTabs | Qt.TextSingleLine,
+ 'PySide by INdT', 2, [1, 2, 3, 4])
+ self.assertTrue(isinstance(size, QSizeF))
+
+ def testTypeError(self):
+ '''QFontMetricsF.size - type error'''
+ self.assertRaises(TypeError, self.metrics.size,
+ Qt.TextExpandTabs | Qt.AlignLeft,
+ 'PySide by INdT', 20, ['aaaa', 'ase'])
+
+
+class QCharTest(QFontMetricsFTest):
+
+ def testBoundingRect(self):
+ retCh = self.metrics.boundingRectChar('a')
+ self.assertEqual(type(retCh), QRectF)
+
+ def testWith(self):
+ retCh = self.metrics.horizontalAdvance('a')
+ self.assertTrue(retCh > 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qguiapplication_test.py b/sources/pyside6/tests/QtGui/qguiapplication_test.py
new file mode 100644
index 000000000..68f7b8591
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qguiapplication_test.py
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QGuiApplication
+
+class TestQGuiApplication(unittest.TestCase):
+ def testNoArguments(self):
+ app = QGuiApplication()
+ self.assertIsInstance(app, QGuiApplication)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qicon_test.py b/sources/pyside6/tests/QtGui/qicon_test.py
new file mode 100644
index 000000000..cb95d02db
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qicon_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.timedqapplication import TimedQApplication
+from PySide6.QtGui import QIcon
+
+
+class QIconCtorWithNoneTest(TimedQApplication):
+ '''Test made by seblin, see Bug #944: http://bugs.pyside.org/show_bug.cgi?id=944'''
+
+ def testQIconCtorWithNone(self):
+ icon = QIcon(None)
+ pixmap = icon.pixmap(48, 48)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qitemselection_test.py b/sources/pyside6/tests/QtGui/qitemselection_test.py
new file mode 100644
index 000000000..5c913fa08
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qitemselection_test.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QItemSelection
+from PySide6.QtGui import QStandardItemModel
+
+class QItemSelectionTest(UsesQApplication):
+ def testLen(self):
+ model = QStandardItemModel(2, 2)
+ model.insertRow(0)
+ model.insertRow(1)
+ model.insertColumn(0)
+ model.insertColumn(1)
+ selection = QItemSelection(model.index(0,0), model.index(1,1))
+ self.assertEqual(len(selection), 1)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qkeysequence_test.py b/sources/pyside6/tests/QtGui/qkeysequence_test.py
new file mode 100644
index 000000000..9c8097415
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qkeysequence_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QKeySequence
+
+from helper.usesqapplication import UsesQApplication
+
+class QKeySequenceTest(UsesQApplication):
+
+ def testGetItemOperator(self):
+ # bug #774
+ ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
+ self.assertEqual(ks[0], Qt.SHIFT)
+ self.assertEqual(ks[1], Qt.CTRL)
+ self.assertEqual(ks[2], Qt.Key_P)
+ self.assertEqual(ks[3], Qt.Key_R)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qpainter_test.py b/sources/pyside6/tests/QtGui/qpainter_test.py
new file mode 100644
index 000000000..05af83d4f
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpainter_test.py
@@ -0,0 +1,117 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QPainter, QLinearGradient
+from PySide6.QtCore import QLine, QLineF, QPoint, QPointF, QRect, QRectF, Qt
+
+class QPainterDrawText(unittest.TestCase):
+
+ def setUp(self):
+ self.painter = QPainter()
+ self.text = 'teste!'
+
+ def tearDown(self):
+ del self.text
+ del self.painter
+
+ def testDrawText(self):
+ # bug #254
+ rect = self.painter.drawText(100, 100, 100, 100,
+ Qt.AlignCenter | Qt.TextWordWrap,
+ self.text)
+ self.assertTrue(isinstance(rect, QRect))
+
+ def testDrawTextWithRect(self):
+ # bug #225
+ rect = QRect(100, 100, 100, 100)
+ newRect = self.painter.drawText(rect, Qt.AlignCenter | Qt.TextWordWrap,
+ self.text)
+
+ self.assertTrue(isinstance(newRect, QRect))
+
+ def testDrawTextWithRectF(self):
+ '''QPainter.drawText(QRectF, ... ,QRectF*) inject code'''
+ rect = QRectF(100, 52.3, 100, 100)
+ newRect = self.painter.drawText(rect, Qt.AlignCenter | Qt.TextWordWrap,
+ self.text)
+
+ self.assertTrue(isinstance(newRect, QRectF))
+
+ def testDrawOverloads(self):
+ '''Calls QPainter.drawLines overloads, if something is
+ wrong Exception and chaos ensues. Bug #395'''
+ self.painter.drawLines([QLine(QPoint(0,0), QPoint(1,1))])
+ self.painter.drawLines([QPoint(0,0), QPoint(1,1)])
+ self.painter.drawLines([QPointF(0,0), QPointF(1,1)])
+ self.painter.drawLines([QLineF(QPointF(0,0), QPointF(1,1))])
+ self.painter.drawPoints([QPoint(0,0), QPoint(1,1)])
+ self.painter.drawPoints([QPointF(0,0), QPointF(1,1)])
+ self.painter.drawConvexPolygon([QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+ QPointF(90.0, 70.0)])
+ self.painter.drawConvexPolygon([QPoint(10.0, 80.0),
+ QPoint(20.0, 10.0),
+ QPoint(80.0, 30.0),
+ QPoint(90.0, 70.0)])
+ self.painter.drawPolygon([QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+ QPointF(90.0, 70.0)])
+ self.painter.drawPolygon([QPoint(10.0, 80.0),
+ QPoint(20.0, 10.0),
+ QPoint(80.0, 30.0),
+ QPoint(90.0, 70.0)])
+ self.painter.drawPolyline([QPointF(10.0, 80.0),
+ QPointF(20.0, 10.0),
+ QPointF(80.0, 30.0),
+ QPointF(90.0, 70.0)])
+ self.painter.drawPolyline([QPoint(10.0, 80.0),
+ QPoint(20.0, 10.0),
+ QPoint(80.0, 30.0),
+ QPoint(90.0, 70.0)])
+
+class SetBrushWithOtherArgs(unittest.TestCase):
+ '''Using qpainter.setBrush with args other than QBrush'''
+
+ def testSetBrushGradient(self):
+ painter = QPainter()
+ gradient = QLinearGradient(0, 0, 0, 0)
+ painter.setBrush(gradient)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qpdfwriter_test.py b/sources/pyside6/tests/QtGui/qpdfwriter_test.py
new file mode 100644
index 000000000..6e567a48e
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpdfwriter_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QPageLayout, QPageSize, QPdfWriter, QTextDocument
+from PySide6.QtCore import QDir, QMarginsF, QTemporaryFile
+
+class QPdfWriterTest(UsesQApplication):
+
+ def testWrite(self):
+ temporaryFile = QTemporaryFile(QDir.tempPath() + "/pdfwriter_test_XXXXXX.pdf")
+ self.assertTrue(temporaryFile.open())
+ pdfWriter = QPdfWriter(temporaryFile)
+ pdfWriter.setPageLayout(QPageLayout(QPageSize(QPageSize.A4), QPageLayout.Portrait, QMarginsF(10, 10, 10, 10)))
+ doc = QTextDocument("Some text")
+ doc.print_(pdfWriter)
+ temporaryFile.close()
+ self.assertTrue(temporaryFile.size() > 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qpixelformat_test.py b/sources/pyside6/tests/QtGui/qpixelformat_test.py
new file mode 100644
index 000000000..d9d98ade3
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpixelformat_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for QPixelFormat'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QSize, Qt
+from PySide6.QtGui import QColor, QImage, QPixelFormat
+
+class QPixelFormatTest(UsesQApplication):
+ def test(self):
+ image = QImage(QSize(200, 200), QImage.Format_ARGB32)
+ image.fill(QColor(Qt.red))
+ pixelFormat = image.pixelFormat()
+ print(pixelFormat.greenSize())
+ self.assertEqual(pixelFormat.alphaSize(), 8)
+ self.assertEqual(pixelFormat.redSize(), 8)
+ self.assertEqual(pixelFormat.greenSize(), 8)
+ self.assertEqual(pixelFormat.blueSize(), 8)
+ self.assertEqual(pixelFormat.bitsPerPixel(), 32)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qpixmap_test.py b/sources/pyside6/tests/QtGui/qpixmap_test.py
new file mode 100644
index 000000000..aa8ade833
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpixmap_test.py
@@ -0,0 +1,90 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import *
+from PySide6.QtCore import *
+
+class QPixmapTest(UsesQApplication):
+ def testQVariantConstructor(self):
+ obj = QObject()
+ pixmap = QPixmap()
+ obj.setProperty('foo', pixmap)
+ self.assertEqual(type(obj.property('foo')), QPixmap)
+
+ def testQSizeConstructor(self):
+ pixmap = QPixmap(QSize(10,20))
+ self.assertTrue(pixmap.size().height(), 20)
+
+ def testQStringConstructor(self):
+ pixmap = QPixmap("Testing!")
+
+ def testQPixmapLoadFromDataWithQFile(self):
+ f = QFile(os.path.join(os.path.dirname(__file__), 'sample.png'))
+ self.assertTrue(f.open(QIODevice.ReadOnly))
+ data = f.read(f.size())
+ f.close()
+ pixmap = QPixmap()
+ self.assertTrue(pixmap.loadFromData(data))
+
+ def testQPixmapLoadFromDataWithPython(self):
+ data = open(os.path.join(os.path.dirname(__file__),'sample.png'),'rb').read()
+ pixmap = QPixmap()
+ self.assertTrue(pixmap.loadFromData(data))
+
+
+class QPixmapToImage(UsesQApplication):
+
+ def testFilledImage(self):
+ '''QPixmap.fill + toImage + image.pixel'''
+ pixmap = QPixmap(100, 200)
+ pixmap.fill(Qt.red) # Default Qt.white
+
+ self.assertEqual(pixmap.height(), 200)
+ self.assertEqual(pixmap.width(), 100)
+
+ image = pixmap.toImage()
+
+ self.assertEqual(image.height(), 200)
+ self.assertEqual(image.width(), 100)
+
+ pixel = image.pixel(10,10)
+ self.assertEqual(pixel, QColor(Qt.red).rgba())
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qpixmapcache_test.py b/sources/pyside6/tests/QtGui/qpixmapcache_test.py
new file mode 100644
index 000000000..19b5c99ee
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpixmapcache_test.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QPixmapCache, QPixmap
+
+
+class QPixmapCacheTest(UsesQApplication):
+
+ def testWithString(self):
+ pm1 = QPixmap()
+ ok = QPixmapCache.find('img', pm1)
+ self.assertFalse(ok)
+
+ self.assertEqual(QPixmapCache.find('img'), None)
+
+ pm2 = QPixmap()
+ ok = QPixmapCache.insert('img', pm2)
+ self.assertTrue(ok)
+
+ pm3 = QPixmap()
+ ok = QPixmapCache.find('img', pm3)
+ self.assertTrue(ok)
+ b1 = QPixmapCache.find('img').toImage().bits()
+ b2 = pm3.toImage().bits()
+ self.assertEqual(QPixmapCache.find('img').toImage().bits(), pm3.toImage().bits())
+
+ def testWithKey(self):
+ pm1 = QPixmap()
+ ok = QPixmapCache.find(QPixmapCache.Key(), pm1)
+ self.assertFalse(ok)
+
+ self.assertEqual(QPixmapCache.find(QPixmapCache.Key()), None)
+
+ pm2 = QPixmap()
+ key = QPixmapCache.insert(pm2)
+
+ pm3 = QPixmap()
+ ok = QPixmapCache.find(key, pm3)
+ self.assertTrue(ok)
+
+ self.assertEqual(QPixmapCache.find(key).toImage().bits(), pm3.toImage().bits())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qpolygonf_test.py b/sources/pyside6/tests/QtGui/qpolygonf_test.py
new file mode 100644
index 000000000..df2586b75
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qpolygonf_test.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPoint, QPointF
+from PySide6.QtGui import QPolygon, QPolygonF
+
+
+class QPolygonFNotIterableTest(unittest.TestCase):
+ """Test if a QPolygonF is iterable"""
+
+ def testIt(self):
+ points = []
+ for i in range(0, 4):
+ points.append(QPointF(float(i), float(i)))
+
+ p = QPolygonF(points)
+ self.assertEqual(len(p), 4)
+
+ i = 0
+ for point in p:
+ self.assertEqual(int(point.x()), i)
+ self.assertEqual(int(point.y()), i)
+ i += 1
+
+ def testPolygonShiftOperators(self):
+ p = QPolygon()
+ self.assertEqual(len(p), 0)
+ p << QPoint(10, 20) << QPoint(20, 30) << [QPoint(20, 30), QPoint(40, 50)]
+ self.assertEqual(len(p), 4)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qradialgradient_test.py b/sources/pyside6/tests/QtGui/qradialgradient_test.py
new file mode 100644
index 000000000..92ed0e91c
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qradialgradient_test.py
@@ -0,0 +1,63 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QRadialGradient
+from PySide6.QtCore import QPointF
+
+class QRadialGradientConstructor(unittest.TestCase):
+ def _compare(self, qptf, tpl):
+ self.assertEqual((qptf.x(), qptf.y()), tpl)
+
+ def _assertValues(self, grad):
+ self._compare(grad.center(), (1.0, 2.0))
+ self._compare(grad.focalPoint(), (3.0, 4.0))
+ self.assertEqual(grad.radius(), 5.0)
+
+ def testAllInt(self):
+ grad = QRadialGradient(1, 2, 5, 3, 4)
+ self._assertValues(grad)
+
+ def testQPointF(self):
+ grad = QRadialGradient(QPointF(1, 2), 5, QPointF(3, 4))
+ self._assertValues(grad)
+
+ def testSetQPointF(self):
+ grad = QRadialGradient()
+ grad.setCenter(QPointF(1, 2))
+ self._compare(grad.center(), (1.0, 2.0))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qrasterwindow_test.py b/sources/pyside6/tests/QtGui/qrasterwindow_test.py
new file mode 100644
index 000000000..5e3357151
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qrasterwindow_test.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for QBackingStore, QRasterWindow and QStaticText'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QEvent, QPoint, QRect, QSize, QTimer, Qt
+from PySide6.QtGui import QColor, QBackingStore, QPaintDevice, QPainter, QWindow, QPaintDeviceWindow, QRasterWindow, QRegion, QStaticText
+
+# QWindow rendering via QBackingStore
+class TestBackingStoreWindow(QWindow):
+ def __init__(self):
+ super(TestBackingStoreWindow, self).__init__()
+ self.backingStore = QBackingStore(self)
+ self.text = QStaticText("BackingStoreWindow")
+
+ def event(self, event):
+ if event.type() == QEvent.Resize:
+ self.backingStore.resize(self.size())
+ self.render()
+ elif event.type() == QEvent.UpdateRequest or event.type() == QEvent.Expose:
+ self.backingStore.flush(QRegion(QRect(QPoint(0, 0), self.size())))
+
+ return QWindow.event(self, event)
+
+ def render(self):
+ clientRect = QRect(QPoint(0, 0), self.size())
+ painter = QPainter(self.backingStore.paintDevice())
+ painter.fillRect(clientRect, QColor(Qt.green))
+ painter.drawStaticText(QPoint(10, 10), self.text)
+
+# Window using convenience class QRasterWindow
+class TestRasterWindow(QRasterWindow):
+ def __init__(self):
+ super(TestRasterWindow, self).__init__()
+ self.text = QStaticText("QRasterWindow")
+
+ def paintEvent(self, event):
+ clientRect = QRect(QPoint(0, 0), self.size())
+ painter = QPainter(self)
+ painter.fillRect(clientRect, QColor(Qt.red))
+ painter.drawStaticText(QPoint(10, 10), self.text)
+
+class QRasterWindowTest(UsesQApplication):
+ def test(self):
+ rasterWindow = TestRasterWindow()
+ rasterWindow.setFramePosition(QPoint(100, 100))
+ rasterWindow.resize(QSize(400, 400))
+ rasterWindow.show()
+ backingStoreWindow = TestBackingStoreWindow()
+ backingStoreWindow.setFramePosition(QPoint(600, 100))
+ backingStoreWindow.resize(QSize(400, 400))
+ backingStoreWindow.show()
+
+ QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qregion_test.py b/sources/pyside6/tests/QtGui/qregion_test.py
new file mode 100644
index 000000000..b6614c9c1
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qregion_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QRegion
+from PySide6.QtCore import QPoint
+from helper.usesqapplication import UsesQApplication
+
+class QRegionTest(UsesQApplication):
+
+ def testFunctionUnit(self):
+ r = QRegion(0, 0, 10, 10)
+ r2 = QRegion(5, 5, 10, 10)
+
+ ru = r.united(r2)
+ self.assertTrue(ru.contains(QPoint(0,0)))
+ self.assertTrue(ru.contains(QPoint(5,5)))
+ self.assertTrue(ru.contains(QPoint(10,10)))
+ self.assertTrue(ru.contains(QPoint(14,14)))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qstylehints_test.py b/sources/pyside6/tests/QtGui/qstylehints_test.py
new file mode 100644
index 000000000..f1afc8f3f
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qstylehints_test.py
@@ -0,0 +1,48 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for QStyleHints'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QStyleHints
+
+class QStyleHintsTest(UsesQApplication):
+ def test(self):
+ styleHints = self.app.styleHints()
+ self.assertTrue(styleHints.startDragDistance() > 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qtextdocument_functions.py b/sources/pyside6/tests/QtGui/qtextdocument_functions.py
new file mode 100644
index 000000000..45e74c3ec
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qtextdocument_functions.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import Qt
+
+
+class QTextDocumentFunctions(unittest.TestCase):
+
+ def testFunctions(self):
+ self.assertFalse(Qt.mightBeRichText('bla'))
+ self.assertTrue(Qt.mightBeRichText('<html><head/><body><p>bla</p></body></html>'))
+ html = Qt.convertFromPlainText("A & B", Qt.WhiteSpaceNormal)
+ self.assertEqual(html, '<p>A &amp; B</p>')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qtextdocument_undoredo_test.py b/sources/pyside6/tests/QtGui/qtextdocument_undoredo_test.py
new file mode 100644
index 000000000..03e0aa3b7
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qtextdocument_undoredo_test.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QTextDocument, QTextCursor
+
+class QTextDocumentTest(unittest.TestCase):
+
+ def testUndoRedo(self):
+ text = 'foobar'
+ doc = QTextDocument(text)
+
+ self.assertFalse(doc.isRedoAvailable())
+ self.assertTrue(doc.isUndoAvailable())
+ self.assertEqual(doc.toPlainText(), text)
+
+ cursor = QTextCursor(doc)
+ doc.undo(cursor)
+
+ self.assertTrue(doc.isRedoAvailable())
+ self.assertFalse(doc.isUndoAvailable())
+ self.assertEqual(doc.toPlainText(), '')
+
+ doc.redo(cursor)
+
+ self.assertFalse(doc.isRedoAvailable())
+ self.assertTrue(doc.isUndoAvailable())
+ self.assertEqual(doc.toPlainText(), text)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qtextdocumentwriter_test.py b/sources/pyside6/tests/QtGui/qtextdocumentwriter_test.py
new file mode 100644
index 000000000..fdf2385aa
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qtextdocumentwriter_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QTextDocumentWriter, QTextDocument
+from PySide6.QtCore import QBuffer
+
+
+class QTextDocumentWriterTest(unittest.TestCase):
+
+ def testWrite(self):
+ text = 'foobar'
+ doc = QTextDocument(text)
+ b = QBuffer()
+ b.open(QBuffer.ReadWrite)
+ writer = QTextDocumentWriter(b, bytes("plaintext", "UTF-8"));
+ writer.write(doc);
+ b.close()
+ self.assertEqual(b.buffer(), text)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtGui/qtextline_test.py b/sources/pyside6/tests/QtGui/qtextline_test.py
new file mode 100644
index 000000000..16e3794ce
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qtextline_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QTextLayout
+from helper.usesqapplication import UsesQApplication
+
+class QTextLineTest(UsesQApplication):
+
+ def testCursorToX(self):
+ textLayout = QTextLayout()
+ textLayout.beginLayout()
+ line = textLayout.createLine()
+ self.assertTrue(line.isValid())
+ x, cursorPos = line.cursorToX(0)
+ self.assertEqual(type(x), float)
+ self.assertEqual(type(cursorPos), int)
+ x, cursorPos = line.cursorToX(1)
+ self.assertEqual(type(x), float)
+ self.assertEqual(type(cursorPos), int)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/qtransform_test.py b/sources/pyside6/tests/QtGui/qtransform_test.py
new file mode 100644
index 000000000..c2d3b9b6c
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/qtransform_test.py
@@ -0,0 +1,108 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPointF
+from PySide6.QtGui import QTransform, QPolygonF, QPolygonF
+
+class QTransformTest(unittest.TestCase):
+
+ def testMap(self):
+ transform = QTransform()
+ values = (10.0, 20.0)
+ tx, ty = transform.map(*values)
+ self.assertTrue(isinstance(tx, float))
+ self.assertTrue(isinstance(ty, float))
+ self.assertEqual((tx, ty), values)
+
+ def testquadToQuad(self):
+ q1 = QPolygonF()
+ q1.append(QPointF(10.0, 10.0))
+ q1.append(QPointF(20.0, 10.0))
+ q1.append(QPointF(10.0, -10.0))
+ q1.append(QPointF(20.0, -10.0))
+
+ q2 = QPolygonF()
+ q2.append(QPointF(20.0, 20.0))
+ q2.append(QPointF(30.0, 20.0))
+ q2.append(QPointF(20.0, -20.0))
+ q2.append(QPointF(30.0, -20.0))
+
+ t1 = QTransform()
+ r1 = QTransform.quadToQuad(q1, q2, t1)
+ r2 = QTransform.quadToQuad(q1, q2)
+
+ self.assertTrue(r1)
+ self.assertTrue(r2)
+
+ self.assertEqual(t1, r2)
+
+ def testquadToSquare(self):
+ q1 = QPolygonF()
+ q1.append(QPointF(10.0, 10.0))
+ q1.append(QPointF(20.0, 10.0))
+ q1.append(QPointF(10.0, -10.0))
+ q1.append(QPointF(20.0, -10.0))
+
+ t1 = QTransform()
+ r1 = QTransform.quadToSquare(q1, t1)
+ r2 = QTransform.quadToSquare(q1)
+
+ self.assertTrue(r1)
+ self.assertTrue(r2)
+
+ self.assertEqual(t1, r2)
+
+
+ def testsquareToQuad(self):
+ q1 = QPolygonF()
+ q1.append(QPointF(10.0, 10.0))
+ q1.append(QPointF(20.0, 10.0))
+ q1.append(QPointF(10.0, -10.0))
+ q1.append(QPointF(20.0, -10.0))
+
+ t1 = QTransform()
+ r1 = QTransform.squareToQuad(q1, t1)
+ r2 = QTransform.squareToQuad(q1)
+
+ self.assertTrue(r1)
+ self.assertTrue(r2)
+
+ self.assertEqual(t1, r2)
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtGui/repr_test.py b/sources/pyside6/tests/QtGui/repr_test.py
new file mode 100644
index 000000000..d7c4693e5
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/repr_test.py
@@ -0,0 +1,114 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6.QtCore import QPoint
+from PySide6.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
+from PySide6.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
+from PySide6.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
+from PySide6.QtGui import QVector2D, QVector3D, QVector4D
+from PySide6.QtGui import QColor, QTransform, QKeySequence, QQuaternion
+from PySide6.QtGui import QPolygon
+
+class ReprCopyHelper:
+ def testCopy(self):
+ copy = eval(self.original.__repr__())
+ self.assertTrue(copy is not self.original)
+ self.assertEqual(copy, self.original)
+
+class QTransformReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
+
+class QQuaternionReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QQuaternion(1, 2, 3, 4)
+
+class QVector2DReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector2D(1, 2)
+
+class QVector3DReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector3D(1, 2, 3)
+
+class QVector4DReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QVector4D(1, 2, 3, 4)
+
+
+# Avoid these tests until get gcc fixed
+# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
+"""
+class QMatrix2x2ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x2([1, 2, 3, 4])
+
+class QMatrix2x3ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x3([1, 2, 3, 4, 5, 6])
+
+class QMatrix2x4ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix2x4([1, 2, 3, 4, 5, 6, 7, 8])
+
+class QMatrix3x2ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x2([1, 2, 3, 4, 5, 6])
+
+class QMatrix3x3ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x3([1, 2, 3, 4, 5, 6, 7, 8, 9])
+
+class QMatrix3x4ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix3x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
+
+class QMatrix4x2ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x2([1, 2, 3, 4, 5, 6, 7, 8])
+
+class QMatrix4x3ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x3([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
+
+class QMatrix4x4ReprCopy(ReprCopyHelper, unittest.TestCase):
+ def setUp(self):
+ self.original = QMatrix4x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
+"""
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtGui/sample.png b/sources/pyside6/tests/QtGui/sample.png
index 60450f0dc..60450f0dc 100644
--- a/sources/pyside2/tests/QtGui/sample.png
+++ b/sources/pyside6/tests/QtGui/sample.png
Binary files differ
diff --git a/sources/pyside6/tests/QtGui/timed_app_and_patching_test.py b/sources/pyside6/tests/QtGui/timed_app_and_patching_test.py
new file mode 100644
index 000000000..8646151b1
--- /dev/null
+++ b/sources/pyside6/tests/QtGui/timed_app_and_patching_test.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.timedqapplication import TimedQApplication
+from PySide6.support import deprecated
+from PySide6.support.signature import importhandler
+from PySide6 import QtGui
+
+
+class TestTimedApp(TimedQApplication):
+ '''Simple test case for TimedQApplication'''
+
+ def testFoo(self):
+ #Simple test of TimedQApplication
+ self.app.exec_()
+
+
+def fix_for_QtGui(QtGui):
+ QtGui.something = 42
+
+class TestPatchingFramework(unittest.TestCase):
+ """Simple test that verifies that deprecated.py works"""
+
+ deprecated.fix_for_QtGui = fix_for_QtGui
+
+ def test_patch_works(self):
+ something = "something"
+ self.assertFalse(hasattr(QtGui, something))
+ importhandler.finish_import(QtGui)
+ self.assertTrue(hasattr(QtGui, something))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtHelp/CMakeLists.txt b/sources/pyside6/tests/QtHelp/CMakeLists.txt
index 422dc51c7..422dc51c7 100644
--- a/sources/pyside2/tests/QtHelp/CMakeLists.txt
+++ b/sources/pyside6/tests/QtHelp/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtHelp/help_test.py b/sources/pyside6/tests/QtHelp/help_test.py
new file mode 100644
index 000000000..809a77c2d
--- /dev/null
+++ b/sources/pyside6/tests/QtHelp/help_test.py
@@ -0,0 +1,47 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtHelp import QHelpEngine
+
+from helper.usesqapplication import UsesQApplication
+
+class QHelpEngineCreation(UsesQApplication):
+
+ def testConstructor(self):
+ helpEngine = QHelpEngine('mycollection.qch')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtHelp/helpsearchengine_test.py b/sources/pyside6/tests/QtHelp/helpsearchengine_test.py
new file mode 100644
index 000000000..0067f8f8c
--- /dev/null
+++ b/sources/pyside6/tests/QtHelp/helpsearchengine_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtHelp import QHelpEngineCore, QHelpSearchEngine, QHelpSearchResult
+
+from helper.usesqapplication import UsesQApplication
+
+class QHelpSearchEngineTest(UsesQApplication):
+
+ def testQHelpSearchEngine(self):
+ helpEngineCore = QHelpEngineCore('')
+ helpSearchEngine = QHelpSearchEngine(helpEngineCore)
+ helpSearchResult = helpSearchEngine.searchResults(0, 0)
+ self.assertEqual(len(helpSearchResult), 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtLocation/CMakeLists.txt b/sources/pyside6/tests/QtLocation/CMakeLists.txt
index b97ac1098..b97ac1098 100644
--- a/sources/pyside2/tests/QtLocation/CMakeLists.txt
+++ b/sources/pyside6/tests/QtLocation/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtLocation/location.py b/sources/pyside6/tests/QtLocation/location.py
new file mode 100644
index 000000000..94d0ac552
--- /dev/null
+++ b/sources/pyside6/tests/QtLocation/location.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for Location'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtLocation import QGeoServiceProvider
+
+
+class QLocationTestCase(unittest.TestCase):
+ def test(self):
+ geoServiceProvider = QGeoServiceProvider("none")
+ self.assertEqual(geoServiceProvider.errorString(),
+ 'The geoservices provider none is not supported.')
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/QtMacExtras/CMakeLists.txt b/sources/pyside6/tests/QtMacExtras/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtMacExtras/CMakeLists.txt
+++ b/sources/pyside6/tests/QtMacExtras/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtMultimedia/CMakeLists.txt b/sources/pyside6/tests/QtMultimedia/CMakeLists.txt
index 62150eb79..62150eb79 100644
--- a/sources/pyside2/tests/QtMultimedia/CMakeLists.txt
+++ b/sources/pyside6/tests/QtMultimedia/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtMultimedia/audio_test.py b/sources/pyside6/tests/QtMultimedia/audio_test.py
new file mode 100644
index 000000000..0389c252c
--- /dev/null
+++ b/sources/pyside6/tests/QtMultimedia/audio_test.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QHttp'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqguiapplication import UsesQGuiApplication
+from PySide6.QtCore import *
+from PySide6.QtMultimedia import *
+
+class testAudioDevices(UsesQGuiApplication):
+
+ def testListDevices(self):
+ valid = False
+ devices = QAudioDeviceInfo.availableDevices(QAudio.AudioOutput)
+ if not len(devices):
+ return
+
+ valid = True
+ for devInfo in devices:
+ if devInfo.deviceName() == 'null':
+ # skip the test if the only device found is a invalid device
+ if len(devices) == 1:
+ return
+ else:
+ continue
+ fmt = QAudioFormat()
+ for codec in devInfo.supportedCodecs():
+ fmt.setCodec(codec)
+ for frequency in devInfo.supportedSampleRates():
+ fmt.setSampleRate(frequency)
+ for channels in devInfo.supportedChannelCounts():
+ fmt.setChannelCount(channels)
+ for sampleType in devInfo.supportedSampleTypes():
+ fmt.setSampleType(sampleType)
+ for sampleSize in devInfo.supportedSampleSizes():
+ fmt.setSampleSize(sampleSize)
+ for endian in devInfo.supportedByteOrders():
+ fmt.setByteOrder(endian)
+ if devInfo.isFormatSupported(fmt):
+ return
+ self.assertTrue(False)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtMultimediaWidgets/CMakeLists.txt b/sources/pyside6/tests/QtMultimediaWidgets/CMakeLists.txt
index 2fc655f89..2fc655f89 100644
--- a/sources/pyside2/tests/QtMultimediaWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtMultimediaWidgets/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py b/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py
new file mode 100644
index 000000000..26350fa8d
--- /dev/null
+++ b/sources/pyside6/tests/QtMultimediaWidgets/qmultimediawidgets.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QtMultimediaWidgets'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtMultimediaWidgets import QGraphicsVideoItem, QVideoWidget
+from PySide6.QtWidgets import QGraphicsScene, QGraphicsView, QVBoxLayout, QWidget
+from PySide6.QtCore import QTimer
+
+class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ layout = QVBoxLayout(self)
+ layout.addWidget(QVideoWidget())
+
+ graphicsScene = QGraphicsScene()
+ graphicsView = QGraphicsView(graphicsScene)
+ graphicsScene.addItem(QGraphicsVideoItem())
+ layout.addWidget(graphicsView)
+
+class QMultimediaWidgetsTest(UsesQApplication):
+ def testMultimediaWidgets(self):
+ w = MyWidget()
+ w.show()
+
+ timer = QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtNetwork/CMakeLists.txt b/sources/pyside6/tests/QtNetwork/CMakeLists.txt
index 754f8e5af..754f8e5af 100644
--- a/sources/pyside2/tests/QtNetwork/CMakeLists.txt
+++ b/sources/pyside6/tests/QtNetwork/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtNetwork/accessManager_test.py b/sources/pyside6/tests/QtNetwork/accessManager_test.py
new file mode 100644
index 000000000..ebc7a2ed8
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/accessManager_test.py
@@ -0,0 +1,77 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QHttp'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtNetwork import *
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+from httpd import TestServer
+
+class AccessManagerCase(UsesQCoreApplication):
+
+ def setUp(self):
+ super(AccessManagerCase, self).setUp()
+ self.httpd = TestServer()
+ self.httpd.start()
+ self.called = False
+
+ def tearDown(self):
+ super(AccessManagerCase, self).tearDown()
+ if self.httpd:
+ self.httpd.shutdown()
+ self.httpd = None
+
+ def goAway(self):
+ self.httpd.shutdown()
+ self.app.quit()
+ self.httpd = None
+
+ def slot_replyFinished(self, reply):
+ self.assertEqual(type(reply), QNetworkReply)
+ self.called = True
+ self.goAway()
+
+ def testNetworkRequest(self):
+ manager = QNetworkAccessManager()
+ manager.finished.connect(self.slot_replyFinished)
+ manager.get(QNetworkRequest(QUrl("http://127.0.0.1:%s" % self.httpd.port())))
+ self.app.exec_()
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/bug_1084.py b/sources/pyside6/tests/QtNetwork/bug_1084.py
new file mode 100644
index 000000000..924c5a4f9
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/bug_1084.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1084 '''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtNetwork
+
+
+class QTcpSocketTestCase(unittest.TestCase):
+ def setUp(self):
+ self.sock = QtNetwork.QTcpSocket()
+ self.sock.connectToHost('127.0.0.1', 25)
+
+ def testIt(self):
+ self.sock.write(bytes('quit', "UTF-8"))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/bug_446.py b/sources/pyside6/tests/QtNetwork/bug_446.py
new file mode 100644
index 000000000..0ad620c8c
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/bug_446.py
@@ -0,0 +1,83 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtNetwork import *
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class HttpSignalsCase(UsesQCoreApplication):
+ '''Test case for launching QHttp signals'''
+ DATA = bytes("PySide rocks", "UTF-8")
+
+ def onError(self):
+ self.assertTrue(False)
+
+ def onNewConnection(self):
+ self.serverConnection = self.server.nextPendingConnection()
+ self.serverConnection.errorOccurred.connect(self.onError)
+ self.serverConnection.write(HttpSignalsCase.DATA)
+ self.server.close()
+
+ def onReadReady(self):
+ data = self.client.read(100)
+ self.assertEqual(len(data), len(HttpSignalsCase.DATA))
+ self.assertEqual(data, HttpSignalsCase.DATA)
+ self.done()
+
+ def onClientConnect(self):
+ self.client.readyRead.connect(self.onReadReady)
+
+ def initServer(self):
+ self.server = QTcpServer()
+ self.server.newConnection.connect(self.onNewConnection)
+ self.assertTrue(self.server.listen())
+ self.client = QTcpSocket()
+ self.client.connected.connect(self.onClientConnect)
+ self.client.connectToHost(QHostAddress(QHostAddress.LocalHost), self.server.serverPort())
+
+ def done(self):
+ self.serverConnection.close()
+ self.client.close()
+ self.app.quit()
+
+ def testRun(self):
+ self.initServer()
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/dnslookup_test.py b/sources/pyside6/tests/QtNetwork/dnslookup_test.py
new file mode 100644
index 000000000..f5bcbe252
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/dnslookup_test.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QDnsLookup'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication
+from PySide6.QtNetwork import QDnsLookup
+
+class DnsLookupTestCase(unittest.TestCase):
+ '''Test case for QDnsLookup'''
+
+ def setUp(self):
+ self._app = QCoreApplication([])
+ self._lookup = QDnsLookup(QDnsLookup.ANY, 'www.qt.io')
+ self._lookup.finished.connect(self._finished)
+
+ def tearDown(self):
+ del self._lookup
+
+ def _finished(self):
+ if self._lookup.error() == QDnsLookup.NoError:
+ nameRecords = self._lookup.canonicalNameRecords()
+ if nameRecords:
+ print(nameRecords[0].name())
+ self._app.quit()
+
+ def testLookup(self):
+ self._lookup.lookup()
+ self._app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/qipv6address_test.py b/sources/pyside6/tests/QtNetwork/qipv6address_test.py
new file mode 100644
index 000000000..9d2fa2244
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/qipv6address_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QIPv6Address'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtNetwork import *
+
+class QIPv6AddressGetItemTest(unittest.TestCase):
+ def testLength(self):
+ ip = QIPv6Address()
+ self.assertEqual(len(ip), 16)
+
+ def testSetItemNegativeIndex(self):
+ ip = QIPv6Address()
+ ip[-1] = 8
+ self.assertEqual(ip[-1], 8)
+
+ def testSetItemLargeIndex(self):
+ ip = QIPv6Address()
+ self.assertRaises(IndexError, ip.__setitem__, 32, 16)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/qpassworddigestor_test.py b/sources/pyside6/tests/QtNetwork/qpassworddigestor_test.py
new file mode 100644
index 000000000..d7d543c03
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/qpassworddigestor_test.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QPasswordDigestor'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray, QCryptographicHash
+from PySide6.QtNetwork import QPasswordDigestor
+
+class TestPasswordDigestor(unittest.TestCase):
+ def test(self):
+ b = QPasswordDigestor.deriveKeyPbkdf1(QCryptographicHash.Sha1,
+ b'test', b'saltnpep', 10, 20)
+ self.assertEqual(b.size(), 20)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/tcpserver_test.py b/sources/pyside6/tests/QtNetwork/tcpserver_test.py
new file mode 100644
index 000000000..4f9f43143
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/tcpserver_test.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QTCPServer'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtNetwork import QTcpServer
+
+class ListenDefaultArgsCase(unittest.TestCase):
+ '''Test case for TcpServer.listen with default args'''
+
+ def setUp(self):
+ #Acquire resources
+ self.server = QTcpServer()
+
+ def tearDown(self):
+ #Release resources
+ del self.server
+
+ def testDefaultArgs(self):
+ # @bug 108
+ #Default arguments for QTcpServer.listen
+ self.server.listen()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtNetwork/udpsocket_test.py b/sources/pyside6/tests/QtNetwork/udpsocket_test.py
new file mode 100644
index 000000000..843aef5e6
--- /dev/null
+++ b/sources/pyside6/tests/QtNetwork/udpsocket_test.py
@@ -0,0 +1,85 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QUdpSocket'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUrl, QObject, SIGNAL, QCoreApplication, QTimer
+from PySide6.QtNetwork import QUdpSocket, QHostAddress
+
+
+class HttpSignalsCase(unittest.TestCase):
+ '''Test case for bug #124 - readDatagram signature
+
+ QUdpSocket.readDatagram must return a tuple with the datagram, host and
+ port, while receiving only the max payload size.'''
+
+ def setUp(self):
+ #Acquire resources
+ self.called = False
+ self.app = QCoreApplication([])
+
+ self.socket = QUdpSocket()
+
+ self.server = QUdpSocket()
+ self.server.bind(QHostAddress(QHostAddress.LocalHost), 45454)
+
+ def tearDown(self):
+ #Release resources
+ del self.socket
+ del self.server
+ del self.app
+
+ def sendPackage(self):
+ addr = QHostAddress(QHostAddress.LocalHost)
+ self.socket.writeDatagram(bytes('datagram', "UTF-8"), addr, 45454)
+
+ def callback(self):
+ while self.server.hasPendingDatagrams():
+ datagram, host, port = self.server.readDatagram(self.server.pendingDatagramSize())
+ self.called = True
+ self.app.quit()
+
+ def testDefaultArgs(self):
+ #QUdpSocket.readDatagram pythonic return
+ # @bug 124
+ QObject.connect(self.server, SIGNAL('readyRead()'), self.callback)
+ self.sendPackage()
+ self.app.exec_()
+
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtOpenGL/CMakeLists.txt b/sources/pyside6/tests/QtOpenGL/CMakeLists.txt
index 92b4afbac..92b4afbac 100644
--- a/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
+++ b/sources/pyside6/tests/QtOpenGL/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py b/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
new file mode 100644
index 000000000..27df4d8dc
--- /dev/null
+++ b/sources/pyside6/tests/QtOpenGL/qopenglbuffer_test.py
@@ -0,0 +1,98 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit tests for QOpenGLBuffer'''
+
+import ctypes
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QOffscreenSurface, QOpenGLContext, QSurface, QWindow
+from PySide6.QtOpenGL import QOpenGLBuffer
+
+def createSurface(surfaceClass):
+ if surfaceClass == QSurface.Window:
+ window = QWindow()
+ window.setSurfaceType(QWindow.OpenGLSurface)
+ window.setGeometry(0, 0, 10, 10)
+ window.create()
+ return window
+ elif surfaceClass == QSurface.Offscreen:
+ # Create a window and get the format from that. For example, if an EGL
+ # implementation provides 565 and 888 configs for PBUFFER_BIT but only
+ # 888 for WINDOW_BIT, we may end up with a pbuffer surface that is
+ # incompatible with the context since it could choose the 565 while the
+ # window and the context uses a config with 888.
+ format = QSurfaceFormat
+ if format.redBufferSize() == -1:
+ window = QWindow()
+ window.setSurfaceType(QWindow.OpenGLSurface)
+ window.setGeometry(0, 0, 10, 10)
+ window.create()
+ format = window.format()
+ offscreenSurface = QOffscreenSurface()
+ offscreenSurface.setFormat(format)
+ offscreenSurface.create()
+ return offscreenSurface
+ return 0
+
+class QOpenGLBufferTest(UsesQApplication):
+ def testBufferCreate(self):
+ surface = createSurface(QSurface.Window)
+ ctx = QOpenGLContext()
+ ctx.create()
+ ctx.makeCurrent(surface)
+
+ buf = QOpenGLBuffer()
+
+ self.assertTrue(not buf.isCreated())
+
+ self.assertTrue(buf.create())
+ self.assertTrue(buf.isCreated())
+
+ self.assertEqual(buf.type(), QOpenGLBuffer.VertexBuffer)
+
+ buf.bind()
+ buf.allocate(128)
+ self.assertEqual(buf.size(), 128)
+
+ buf.release()
+
+ buf.destroy()
+ self.assertTrue(not buf.isCreated())
+
+ ctx.doneCurrent()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
new file mode 100644
index 000000000..5f76d9f60
--- /dev/null
+++ b/sources/pyside6/tests/QtOpenGL/qopenglwindow_test.py
@@ -0,0 +1,111 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for QOpenGLContext, QOpenGLTexture, QOpenGLWindow and related classes'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import QSize, QTimer, Qt
+from PySide6.QtGui import (QColor, QGuiApplication, QImage, QOpenGLContext,
+ QSurfaceFormat)
+from PySide6.QtOpenGL import (QOpenGLTexture, QOpenGLWindow)
+
+
+try:
+ from OpenGL import GL
+except ImportError:
+ print("Skipping test due to missing OpenGL module")
+ sys.exit(0)
+
+class OpenGLWindow(QOpenGLWindow):
+ def __init__(self):
+ super(OpenGLWindow, self).__init__()
+
+ self.m_functions = None
+ self.m_texture = None
+ self.visibleChanged.connect(self.slotVisibleChanged)
+
+ def slotVisibleChanged(self, visible):
+ if not visible and self.m_texture is not None and self.context().makeCurrent(self):
+ self.m_texture = None
+ self.context().doneCurrent()
+
+ def initializeGL(self):
+ self.m_functions = self.context().functions()
+ self.m_functions.initializeOpenGLFunctions()
+ image = QImage(QSize(200, 200), QImage.Format_RGBA8888)
+ image.fill(QColor(Qt.red))
+ self.m_texture = QOpenGLTexture(image)
+
+ def paintGL(self):
+ GL.glMatrixMode(GL.GL_MODELVIEW);
+ GL.glLoadIdentity();
+
+ GL.glMatrixMode(GL.GL_PROJECTION);
+ GL.glLoadIdentity();
+ GL.glOrtho(0, 1, 1, 0, -1, 1);
+
+ self.m_functions.glClear(GL.GL_COLOR_BUFFER_BIT)
+ self.m_functions.glEnable(GL.GL_TEXTURE_2D);
+ self.m_texture.bind()
+
+ d = 0.5
+ GL.glBegin(GL.GL_QUADS)
+ GL.glTexCoord2f(0, 0)
+ GL.glVertex2f(0, 0)
+ GL.glTexCoord2f(d, 0)
+ GL.glVertex2f(d, 0)
+ GL.glTexCoord2f(d, d)
+ GL.glVertex2f(d, d)
+ GL.glTexCoord2f(0, d)
+ GL.glVertex2f(0, d)
+ GL.glEnd()
+ self.m_texture.release()
+
+ def resizeGL(self, w, h):
+ self.m_functions.glViewport(0, 0, self.width(), self.height())
+
+class QOpenGLWindowTest(UsesQApplication):
+ # On macOS, glClear(), glViewport() are rejected due to GLbitfield/GLint not being resolved properly
+ def test(self):
+ openGlWindow = OpenGLWindow()
+ openGlWindow.resize(640, 480)
+ openGlWindow.show()
+ QTimer.singleShot(100, openGlWindow.close)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside6/tests/QtOpenGLFunctions/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt
+++ b/sources/pyside6/tests/QtOpenGLFunctions/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtOpenGLWidgets/CMakeLists.txt b/sources/pyside6/tests/QtOpenGLWidgets/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtOpenGLWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtOpenGLWidgets/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtPositioning/CMakeLists.txt b/sources/pyside6/tests/QtPositioning/CMakeLists.txt
index b9f7631b1..b9f7631b1 100644
--- a/sources/pyside2/tests/QtPositioning/CMakeLists.txt
+++ b/sources/pyside6/tests/QtPositioning/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtPositioning/positioning.py b/sources/pyside6/tests/QtPositioning/positioning.py
new file mode 100644
index 000000000..7edcefcd8
--- /dev/null
+++ b/sources/pyside6/tests/QtPositioning/positioning.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Unit test for Positioning'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtPositioning import QGeoPositionInfoSource
+
+
+class QPositioningTestCase(unittest.TestCase):
+ def test(self):
+ source = QGeoPositionInfoSource.createDefaultSource(None)
+ self.assertTrue(source is not None)
+ name = source.sourceName()
+ print('QtPositioning source: {}'.format(name))
+ self.assertTrue(name)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt b/sources/pyside6/tests/QtPrintSupport/CMakeLists.txt
index 510c5fe0b..510c5fe0b 100644
--- a/sources/pyside2/tests/QtPrintSupport/CMakeLists.txt
+++ b/sources/pyside6/tests/QtPrintSupport/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtPrintSupport/bug_500.py b/sources/pyside6/tests/QtPrintSupport/bug_500.py
new file mode 100644
index 000000000..5ddaaa848
--- /dev/null
+++ b/sources/pyside6/tests/QtPrintSupport/bug_500.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtPrintSupport import *
+from helper.usesqapplication import UsesQApplication
+
+class NeverDiesTest(UsesQApplication):
+
+ def testIt(self):
+ QPrintDialog()
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
new file mode 100644
index 000000000..5435bbb61
--- /dev/null
+++ b/sources/pyside6/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
@@ -0,0 +1,87 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QTextCursor
+from PySide6.QtPrintSupport import QPrinter, QPrinterInfo
+from PySide6.QtWidgets import QLayout, QWidget, QGraphicsLayout, QGraphicsLayoutItem
+
+from helper.usesqapplication import UsesQApplication
+
+class Layout(QLayout):
+ def __init__(self):
+ QLayout.__init__(self)
+
+class GraphicsLayout(QGraphicsLayout):
+ def __init__(self):
+ QGraphicsLayout.__init__(self)
+
+class GraphicsLayoutItem(QGraphicsLayoutItem):
+ def __init__(self):
+ QGraphicsLayoutItem.__init__(self)
+
+class ReturnsQuadruplesOfNumbers(UsesQApplication):
+ def compareTuples(self, ta, tb):
+ for va,vb in zip(ta, tb):
+ if round(va) != round(vb):
+ return False
+ return True
+
+ def testQGraphicsLayoutGetContentsMargins(self):
+ obj = GraphicsLayout()
+ values = (10.0, 20.0, 30.0, 40.0)
+ obj.setContentsMargins(*values)
+ self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
+
+ def testQGraphicsLayoutItemGetContentsMargins(self):
+ obj = GraphicsLayoutItem()
+ self.assertTrue(self.compareTuples(obj.getContentsMargins(), (0.0, 0.0, 0.0, 0.0)))
+
+ def testQLayoutGetContentsMargins(self):
+ obj = Layout()
+ values = (10, 20, 30, 40)
+ obj.setContentsMargins(*values)
+ self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
+
+ def testQTextCursorSelectedTableCells(self):
+ obj = QTextCursor()
+ self.assertEqual(obj.selectedTableCells(), (-1, -1, -1, -1))
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtQml/CMakeLists.txt b/sources/pyside6/tests/QtQml/CMakeLists.txt
index e35831f25..e35831f25 100644
--- a/sources/pyside2/tests/QtQml/CMakeLists.txt
+++ b/sources/pyside6/tests/QtQml/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtQml/bug_1029.py b/sources/pyside6/tests/QtQml/bug_1029.py
new file mode 100644
index 000000000..a64614390
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_1029.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import gc
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickView, QQuickItem
+
+def register_qml_types():
+ class TestClass(QQuickItem):
+ def __init__(self, parent = None):
+ QQuickItem.__init__(self, parent)
+
+ qmlRegisterType(TestClass, "UserTypes", 1, 0, "TestClass")
+
+def main():
+ app = QGuiApplication([])
+
+ # reg qml types here
+ register_qml_types()
+
+ # force gc to run
+ gc.collect()
+
+ view = QQuickView()
+ url = QUrl(__file__.replace(".py", ".qml"))
+ view.setSource(url)
+
+if __name__ == "__main__":
+ main()
diff --git a/sources/pyside2/tests/QtQml/bug_1029.qml b/sources/pyside6/tests/QtQml/bug_1029.qml
index 000a7568b..000a7568b 100644
--- a/sources/pyside2/tests/QtQml/bug_1029.qml
+++ b/sources/pyside6/tests/QtQml/bug_1029.qml
diff --git a/sources/pyside6/tests/QtQml/bug_451.py b/sources/pyside6/tests/QtQml/bug_451.py
new file mode 100644
index 000000000..f328b7bb8
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_451.py
@@ -0,0 +1,105 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''
+Test bug 451: http://bugs.openbossa.org/show_bug.cgi?id=451
+
+An archive of said bug:
+https://srinikom.github.io/pyside-bz-archive/451.html
+'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6 import QtCore, QtGui, QtQuick
+
+class PythonObject(QtCore.QObject):
+ def __init__(self):
+ QtCore.QObject.__init__(self, None)
+ self._called = ""
+ self._arg1 = None
+ self._arg2 = None
+
+ def setCalled(self, v):
+ self._called = v
+
+ def setArg1(self, v):
+ self._arg1 = v
+
+ def setArg2(self, v):
+ self._arg2 = v
+
+ def getCalled(self):
+ return self._called
+
+ def getArg1(self):
+ return self._arg1
+
+ def getArg2(self):
+ return self._arg2
+
+ called = QtCore.Property(str, getCalled, setCalled)
+ arg1 = QtCore.Property(int, getArg1, setArg1)
+ arg2 = QtCore.Property('QVariant', getArg2, setArg2)
+
+class TestBug(unittest.TestCase):
+ def testQMLFunctionCall(self):
+ app = QtGui.QGuiApplication(sys.argv)
+ view = QtQuick.QQuickView()
+
+ obj = PythonObject()
+ context = view.rootContext()
+ context.setContextProperty("python", obj)
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_451.qml', __file__)))
+ root = view.rootObject()
+ root.simpleFunction()
+ self.assertEqual(obj.called, "simpleFunction")
+
+ root.oneArgFunction(42)
+ self.assertEqual(obj.called, "oneArgFunction")
+ self.assertEqual(obj.arg1, 42)
+
+ root.twoArgFunction(10, app)
+ self.assertEqual(obj.called, "twoArgFunction")
+ self.assertEqual(obj.arg1, 10)
+ self.assertEqual(obj.arg2, app)
+
+ rvalue = root.returnFunction()
+ self.assertEqual(obj.called, "returnFunction")
+ self.assertEqual(rvalue, 42)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_451.qml b/sources/pyside6/tests/QtQml/bug_451.qml
index 71bf691b4..71bf691b4 100644
--- a/sources/pyside2/tests/QtQml/bug_451.qml
+++ b/sources/pyside6/tests/QtQml/bug_451.qml
diff --git a/sources/pyside6/tests/QtQml/bug_456.py b/sources/pyside6/tests/QtQml/bug_456.py
new file mode 100644
index 000000000..4c7019806
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_456.py
@@ -0,0 +1,77 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6 import QtCore, QtGui, QtQuick
+
+class RotateValue(QtCore.QObject):
+ def __init__(self):
+ super(RotateValue,self).__init__()
+
+ @QtCore.Slot(result=int)
+ def val(self):
+ return 100
+
+ def setRotation(self, v):
+ self._rotation = v
+
+ def getRotation(self):
+ return self._rotation
+
+ rotation = QtCore.Property(int, getRotation, setRotation)
+
+class TestConnectionWithInvalidSignature(TimedQApplication):
+
+ def testSlotRetur(self):
+ view = QtQuick.QQuickView()
+ rotatevalue = RotateValue()
+
+ timer = QtCore.QTimer()
+ timer.start(2000)
+
+ context = view.rootContext()
+ context.setContextProperty("rotatevalue", rotatevalue)
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_456.qml', __file__)))
+ root = view.rootObject()
+ button = root.findChild(QtCore.QObject, "buttonMouseArea")
+ view.show()
+ button.entered.emit()
+ self.assertEqual(rotatevalue.rotation, 100)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_456.qml b/sources/pyside6/tests/QtQml/bug_456.qml
index 9b1b8c03c..9b1b8c03c 100644
--- a/sources/pyside2/tests/QtQml/bug_456.qml
+++ b/sources/pyside6/tests/QtQml/bug_456.qml
diff --git a/sources/pyside6/tests/QtQml/bug_557.py b/sources/pyside6/tests/QtQml/bug_557.py
new file mode 100644
index 000000000..21a445b72
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_557.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlEngine, QQmlComponent
+
+app = QGuiApplication(sys.argv)
+
+engine = QQmlEngine()
+component = QQmlComponent(engine)
+
+# This should segfault if the QDeclarativeComponent has not QQmlEngine
+component.loadUrl(QUrl.fromLocalFile(adjust_filename('foo.qml', __file__)))
+
diff --git a/sources/pyside6/tests/QtQml/bug_726.py b/sources/pyside6/tests/QtQml/bug_726.py
new file mode 100644
index 000000000..6c6a78a3b
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_726.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6 import QtCore, QtGui, QtQuick
+
+class ProxyObject(QtCore.QObject):
+ def __init__(self):
+ super(ProxyObject,self).__init__()
+ self._o = None
+ self._receivedName = ""
+
+ @QtCore.Slot(result='QObject*')
+ def getObject(self):
+ if self._o:
+ return self._o
+
+ self._o = QtCore.QObject()
+ self._o.setObjectName("PySideObject")
+ return self._o
+
+ @QtCore.Slot(str)
+ def receivedObject(self, name):
+ self._receivedName = name
+
+
+class TestConnectionWithInvalidSignature(TimedQApplication):
+
+ def testSlotRetur(self):
+ view = QtQuick.QQuickView()
+ proxy = ProxyObject()
+
+ context = view.rootContext()
+ context.setContextProperty("proxy", proxy)
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_726.qml', __file__)))
+ root = view.rootObject()
+ button = root.findChild(QtCore.QObject, "buttonMouseArea")
+ view.show()
+ button.entered.emit()
+ self.assertEqual(proxy._receivedName, "PySideObject")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_726.qml b/sources/pyside6/tests/QtQml/bug_726.qml
index 79f960243..79f960243 100644
--- a/sources/pyside2/tests/QtQml/bug_726.qml
+++ b/sources/pyside6/tests/QtQml/bug_726.qml
diff --git a/sources/pyside6/tests/QtQml/bug_814.py b/sources/pyside6/tests/QtQml/bug_814.py
new file mode 100644
index 000000000..13c97154f
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_814.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2011 Thomas Perl <m@thp.io>
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Test case for PySide bug 814
+# http://bugs.pyside.org/show_bug.cgi?id=814
+# archive:
+# https://srinikom.github.io/pyside-bz-archive/814.html
+# 2011-04-08 Thomas Perl <m@thp.io>
+# Released under the same terms as PySide itself
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6.QtCore import QUrl, QAbstractListModel, QModelIndex, Qt
+from PySide6.QtQuick import QQuickView
+
+class ListModel(QAbstractListModel):
+ def __init__(self):
+ QAbstractListModel.__init__(self)
+
+ def roleNames(self):
+ return { Qt.DisplayRole: b'pysideModelData' }
+
+ def rowCount(self, parent = QModelIndex()):
+ return 3
+
+ def data(self, index, role):
+ if index.isValid() and role == Qt.DisplayRole:
+ return 'blubb'
+ return None
+
+class TestBug814(TimedQApplication):
+ def testAbstractItemModelTransferToQML(self):
+ view = QQuickView()
+ model = ListModel()
+ view.rootContext().setContextProperty("pythonModel", model)
+ view.setSource(QUrl.fromLocalFile(adjust_filename('bug_814.qml', __file__)))
+ root = view.rootObject()
+ view.show()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtQml/bug_814.qml b/sources/pyside6/tests/QtQml/bug_814.qml
index 411896770..411896770 100644
--- a/sources/pyside2/tests/QtQml/bug_814.qml
+++ b/sources/pyside6/tests/QtQml/bug_814.qml
diff --git a/sources/pyside6/tests/QtQml/bug_825.py b/sources/pyside6/tests/QtQml/bug_825.py
new file mode 100644
index 000000000..6ebdaf6d4
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_825.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import Qt, QUrl, QTimer
+from PySide6.QtGui import QGuiApplication, QPen
+from PySide6.QtWidgets import QGraphicsItem
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickView, QQuickItem, QQuickPaintedItem
+
+paintCalled = False
+
+class MetaA(type):
+ pass
+
+class A(object):
+ __metaclass__ = MetaA
+
+MetaB = type(QQuickPaintedItem)
+B = QQuickPaintedItem
+
+class MetaC(MetaA, MetaB):
+ pass
+
+class C(A, B):
+ __metaclass__ = MetaC
+
+class Bug825 (C):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+
+ def paint(self, painter):
+ global paintCalled
+ pen = QPen(Qt.black, 2)
+ painter.setPen(pen);
+ painter.drawPie(self.boundingRect(), 0, 128);
+ paintCalled = True
+
+class TestBug825 (unittest.TestCase):
+ def testIt(self):
+ global paintCalled
+ app = QGuiApplication([])
+ qmlRegisterType(Bug825, 'bugs', 1, 0, 'Bug825')
+ self.assertRaises(TypeError, qmlRegisterType, A, 'bugs', 1, 0, 'A')
+
+ view = QQuickView()
+ view.setSource(QUrl.fromLocalFile(adjust_filename('bug_825.qml', __file__)))
+ view.show()
+ QTimer.singleShot(250, view.close)
+ app.exec_()
+ self.assertTrue(paintCalled)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_825.qml b/sources/pyside6/tests/QtQml/bug_825.qml
index 6ae06d5b8..6ae06d5b8 100644
--- a/sources/pyside2/tests/QtQml/bug_825.qml
+++ b/sources/pyside6/tests/QtQml/bug_825.qml
diff --git a/sources/pyside6/tests/QtQml/bug_847.py b/sources/pyside6/tests/QtQml/bug_847.py
new file mode 100644
index 000000000..7f42f7769
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_847.py
@@ -0,0 +1,93 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2011 Thomas Perl <m@thp.io>
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Testcase for PySide bug 847
+# Released under the same terms as PySide itself
+# 2011-05-04 Thomas Perl <m@thp.io>
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import Slot, Signal, QUrl, QTimer, QCoreApplication
+from PySide6.QtQuick import QQuickView
+
+class View(QQuickView):
+ def __init__(self):
+ QQuickView.__init__(self)
+
+ called = Signal(int, int)
+
+ @Slot(int, int)
+ def blubb(self, x, y):
+ self.called.emit(x, y)
+
+class TestQML(UsesQApplication):
+ def done(self, x, y):
+ self._sucess = True
+ self.app.quit()
+ print("done called")
+
+ def testPythonSlot(self):
+ self._sucess = False
+ view = View()
+
+ # Connect first, then set the property.
+ view.called.connect(self.done)
+ view.setSource(QUrl.fromLocalFile(adjust_filename('bug_847.qml', __file__)))
+ while view.status() == QQuickView.Loading:
+ self.app.processEvents()
+ self.assertEqual(view.status(), QQuickView.Ready)
+ self.assertTrue(view.rootObject())
+ view.rootObject().setProperty('pythonObject', view)
+
+ view.show()
+ while not view.isExposed():
+ self.app.processEvents()
+
+ # Essentially a timeout in case method invocation fails.
+ QTimer.singleShot(30000, QCoreApplication.instance().quit)
+ self.app.exec_()
+ self.assertTrue(self._sucess)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtQml/bug_847.qml b/sources/pyside6/tests/QtQml/bug_847.qml
index 3833b1637..3833b1637 100644
--- a/sources/pyside2/tests/QtQml/bug_847.qml
+++ b/sources/pyside6/tests/QtQml/bug_847.qml
diff --git a/sources/pyside6/tests/QtQml/bug_915.py b/sources/pyside6/tests/QtQml/bug_915.py
new file mode 100644
index 000000000..d8707582e
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_915.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.timedqapplication import TimedQApplication
+
+from PySide6.QtQuick import QQuickView, QQuickItem
+
+class TestBug915(TimedQApplication):
+ def testReturnPolicy(self):
+ view = QQuickView()
+
+ item1 = QQuickItem()
+ item1.setObjectName("Item1")
+ item1.setParentItem(view.contentItem())
+ self.assertEqual(item1.objectName(), "Item1") # check if the item still valid
+
+ item2 = QQuickItem()
+ item2.setObjectName("Item2")
+ item2.setParentItem(view.contentItem())
+ item1 = None
+ self.assertEqual(item2.objectName(), "Item2") # check if the item still valid
+
+ view = None
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/QtQml/bug_926.py b/sources/pyside6/tests/QtQml/bug_926.py
new file mode 100644
index 000000000..837406b7a
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_926.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import QUrl, QTimer, QObject, Signal, Property
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickView
+
+class MyClass (QObject):
+
+ def __init__(self):
+ super(MyClass,self).__init__()
+ self.__url = QUrl()
+
+ def getUrl(self):
+ return self.__url
+
+ def setUrl(self,value):
+ newUrl = QUrl(value)
+ if (newUrl != self.__url):
+ self.__url = newUrl
+ self.urlChanged.emit()
+
+ urlChanged = Signal()
+ urla = Property(QUrl, getUrl, setUrl, notify = urlChanged)
+
+class TestBug926 (unittest.TestCase):
+ def testIt(self):
+ app = QGuiApplication([])
+ qmlRegisterType(MyClass,'Example',1,0,'MyClass')
+ view = QQuickView()
+ view.setSource(QUrl.fromLocalFile(adjust_filename('bug_926.qml', __file__)))
+ self.assertEqual(len(view.errors()), 0)
+ view.show()
+ QTimer.singleShot(0, app.quit)
+ app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_926.qml b/sources/pyside6/tests/QtQml/bug_926.qml
index 9217403a4..9217403a4 100644
--- a/sources/pyside2/tests/QtQml/bug_926.qml
+++ b/sources/pyside6/tests/QtQml/bug_926.qml
diff --git a/sources/pyside6/tests/QtQml/bug_951.py b/sources/pyside6/tests/QtQml/bug_951.py
new file mode 100644
index 000000000..700c23ae9
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_951.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6.QtCore import QUrl
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickItem, QQuickView
+
+class MyItem(QQuickItem):
+ COMPONENT_COMPLETE_CALLED = False
+ def __init__(self,parent=None):
+ super(MyItem, self).__init__(parent)
+ self.setObjectName("myitem")
+
+ def componentComplete(self):
+ MyItem.COMPONENT_COMPLETE_CALLED = True
+ super(MyItem, self).componentComplete()
+
+class TestRegisterQMLType(TimedQApplication):
+ def setup(self):
+ TimedQApplication.setup(self, 100 * 3) # 3s
+
+ def testSignalEmission(self):
+ qmlRegisterType(MyItem, "my.item", 1, 0, "MyItem")
+
+ view = QQuickView()
+ view.setSource(QUrl.fromLocalFile(adjust_filename('bug_951.qml', __file__)))
+
+ self.app.exec_()
+ self.assertTrue(MyItem.COMPONENT_COMPLETE_CALLED)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_951.qml b/sources/pyside6/tests/QtQml/bug_951.qml
index 8242223f9..8242223f9 100644
--- a/sources/pyside2/tests/QtQml/bug_951.qml
+++ b/sources/pyside6/tests/QtQml/bug_951.qml
diff --git a/sources/pyside6/tests/QtQml/bug_995.py b/sources/pyside6/tests/QtQml/bug_995.py
new file mode 100644
index 000000000..8cb9306ef
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_995.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
+
+app = QGuiApplication([])
+view = QQuickView(adjust_filename('bug_995.qml', __file__))
+view.show()
+view.resize(200, 200)
+contentItem = view.contentItem()
+item = contentItem.childAt(100, 100)
+
+# it CAN NOT crash here
+print(item)
+
diff --git a/sources/pyside2/tests/QtQml/bug_995.qml b/sources/pyside6/tests/QtQml/bug_995.qml
index 1369dcca6..1369dcca6 100644
--- a/sources/pyside2/tests/QtQml/bug_995.qml
+++ b/sources/pyside6/tests/QtQml/bug_995.qml
diff --git a/sources/pyside6/tests/QtQml/bug_997.py b/sources/pyside6/tests/QtQml/bug_997.py
new file mode 100644
index 000000000..b5532ea90
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_997.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.usesqapplication import UsesQApplication
+
+from PySide6 import QtCore, QtQml, QtQuick
+
+class TestBug(UsesQApplication):
+ def testQMLFunctionCall(self):
+ ownerData = QtQml.QQmlPropertyMap()
+ ownerData.insert('name', 'John Smith')
+ ownerData.insert('phone', '555-5555')
+ ownerData.insert('newValue', '')
+
+ view = QtQuick.QQuickView()
+ ctxt = view.rootContext()
+ ctxt.setContextProperty('owner', ownerData)
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_997.qml', __file__)))
+ view.show()
+ QtCore.QTimer.singleShot(1000, self.app.quit)
+ self.app.exec_()
+ self.assertEqual(ownerData.value('newName'), ownerData.value('name'))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/bug_997.qml b/sources/pyside6/tests/QtQml/bug_997.qml
index f36a7e8f8..f36a7e8f8 100644
--- a/sources/pyside2/tests/QtQml/bug_997.qml
+++ b/sources/pyside6/tests/QtQml/bug_997.qml
diff --git a/sources/pyside6/tests/QtQml/connect_python_qml.py b/sources/pyside6/tests/QtQml/connect_python_qml.py
new file mode 100644
index 000000000..305077ee7
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/connect_python_qml.py
@@ -0,0 +1,72 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''
+Test case for bug #442
+
+archive:
+https://srinikom.github.io/pyside-bz-archive/442.html
+'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6 import QtCore, QtGui, QtQuick
+
+class TestConnectionWithInvalidSignature(TimedQApplication):
+ def onButtonClicked(self):
+ self.buttonClicked = True
+ self.app.quit()
+
+ def onButtonFailClicked(self):
+ pass
+
+ def testFailConnection(self):
+ self.buttonClicked = False
+ self.buttonFailClicked = False
+ view = QtQuick.QQuickView()
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('connect_python_qml.qml', __file__)))
+ root = view.rootObject()
+ button = root.findChild(QtCore.QObject, "buttonMouseArea")
+ self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('entered()'), self.onButtonFailClicked])
+ button.entered.connect(self.onButtonClicked)
+ button.entered.emit()
+ view.show()
+ self.app.exec_()
+ self.assertTrue(self.buttonClicked)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/connect_python_qml.qml b/sources/pyside6/tests/QtQml/connect_python_qml.qml
index 249debf91..249debf91 100644
--- a/sources/pyside2/tests/QtQml/connect_python_qml.qml
+++ b/sources/pyside6/tests/QtQml/connect_python_qml.qml
diff --git a/sources/pyside2/tests/QtQml/hw.qml b/sources/pyside6/tests/QtQml/hw.qml
index 8b086f31f..8b086f31f 100644
--- a/sources/pyside2/tests/QtQml/hw.qml
+++ b/sources/pyside6/tests/QtQml/hw.qml
diff --git a/sources/pyside6/tests/QtQml/javascript_exceptions.py b/sources/pyside6/tests/QtQml/javascript_exceptions.py
new file mode 100644
index 000000000..49b15320c
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/javascript_exceptions.py
@@ -0,0 +1,110 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import Slot, Property, Signal, QObject, QUrl
+from PySide6.QtQml import QJSEngine, qmlRegisterType
+from PySide6.QtQuick import QQuickView
+
+test_error_message = "This is an error."
+
+method_test_string = """
+(function (obj) {
+ obj.methodThrows();
+})
+"""
+
+property_test_string = """
+(function (obj) {
+ obj.propertyThrows;
+})
+"""
+
+test_1 = False
+test_2 = False
+
+class TestClass(QObject):
+ @Slot()
+ def methodThrows(self):
+ raise TypeError(test_error_message)
+
+ @Property(str)
+ def propertyThrows(self):
+ raise TypeError(test_error_message)
+
+ @Slot(int)
+ def passTest(self, test):
+ global test_1, test_2
+
+ if test == 1:
+ test_1 = True
+ else:
+ test_2 = True
+
+class JavaScriptExceptionsTest(UsesQApplication):
+ def test_jsengine(self):
+ engine = QJSEngine()
+ test_object = TestClass()
+ test_value = engine.newQObject(test_object)
+
+ result_1 = engine.evaluate(method_test_string).call([test_value])
+
+ self.assertTrue(result_1.isError())
+ self.assertEqual(result_1.property('message').toString(), test_error_message)
+ self.assertEqual(result_1.property('name').toString(), 'TypeError')
+
+ result_2 = engine.evaluate(property_test_string).call([test_value])
+
+ self.assertTrue(result_2.isError())
+ self.assertEqual(result_2.property('message').toString(), test_error_message)
+ self.assertEqual(result_2.property('name').toString(), 'TypeError')
+
+ def test_qml_type(self):
+ qmlRegisterType(TestClass, 'JavaScriptExceptions', 1, 0, 'JavaScriptExceptions');
+
+ view = QQuickView()
+ qml_url = QUrl.fromLocalFile(adjust_filename('javascript_exceptions.qml', __file__))
+
+ view.setSource(qml_url)
+
+ self.assertTrue(test_1)
+ self.assertTrue(test_2)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/javascript_exceptions.qml b/sources/pyside6/tests/QtQml/javascript_exceptions.qml
index 91cc83ee4..91cc83ee4 100644
--- a/sources/pyside2/tests/QtQml/javascript_exceptions.qml
+++ b/sources/pyside6/tests/QtQml/javascript_exceptions.qml
diff --git a/sources/pyside6/tests/QtQml/listproperty.py b/sources/pyside6/tests/QtQml/listproperty.py
new file mode 100644
index 000000000..d250b8b3e
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/listproperty.py
@@ -0,0 +1,81 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import unittest
+
+from PySide6.QtCore import QObject
+from PySide6.QtQml import ListProperty
+
+class InheritsQObject(QObject):
+ pass
+
+def dummyFunc():
+ pass
+
+class TestListProperty(unittest.TestCase):
+ def testIt(self):
+
+ # Verify that type checking works properly
+ type_check_error = False
+
+ try:
+ ListProperty(QObject)
+ ListProperty(InheritsQObject)
+ except:
+ type_check_error = True
+
+ self.assertFalse(type_check_error)
+
+ try:
+ ListProperty(int)
+ except TypeError:
+ type_check_error = True
+
+ self.assertTrue(type_check_error)
+
+ # Verify that method validation works properly
+ method_check_error = False
+
+ try:
+ ListProperty(QObject, append=None, at=None, count=None, replace=None, clear=None, removeLast=None) # Explicitly setting None
+ ListProperty(QObject, append=dummyFunc)
+ ListProperty(QObject, count=dummyFunc, at=dummyFunc)
+ except:
+ method_check_error = True
+
+ self.assertFalse(method_check_error)
+
+ try:
+ ListPropery(QObject, append=QObject())
+ except:
+ method_check_error = True
+
+ self.assertTrue(method_check_error)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.py b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.py
new file mode 100644
index 000000000..d76af81b2
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import QObject, QUrl, Slot, QTimer
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlIncubationController, VolatileBool
+from PySide6.QtQuick import QQuickView
+
+class CustomIncubationController(QObject, QQmlIncubationController):
+ def __init__(self, test):
+ QObject.__init__(self)
+ QQmlIncubationController.__init__(self)
+ self.test = test
+ self.interrupted = False
+
+ # Incubate every 50 milliseconds
+ self.startTimer(50)
+ self.incubationShouldContinue = VolatileBool(True)
+ self.test.assertEqual(self.incubationShouldContinue.get(), True)
+
+ @Slot()
+ def interrupter(self):
+ if not self.interrupted:
+ self.interrupted = True
+ self.incubationShouldContinue.set(False)
+ self.test.assertEqual(self.incubationShouldContinue.get(), False)
+ QTimer.singleShot(0, QGuiApplication.instance().quit)
+
+ def timerEvent(self, ev):
+ # Incubate items for 2000 milliseconds, or until the volatile bool is set to false.
+ self.incubateWhile(self.incubationShouldContinue, 2000)
+
+class TestBug(unittest.TestCase):
+ def testIncubateWhileCall(self):
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+ controller = CustomIncubationController(self)
+ view.engine().setIncubationController(controller)
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setSource(QUrl.fromLocalFile(adjust_filename('qqmlincubator_incubateWhile.qml',
+ __file__)))
+ view.show()
+
+ root = view.rootObject()
+ # The QML code will issue an interrupt signal after half of its items are loaded.
+ root.shouldInterrupt.connect(controller.interrupter)
+ res = app.exec_()
+
+ itemsToCreate = root.property("itemsToCreate")
+ loadedItems = root.property("loadedItems")
+ self.assertEqual(loadedItems, itemsToCreate / 2)
+
+ # Finish incubating the remaining items.
+ controller.incubateFor(1000)
+ loadedItems = root.property("loadedItems")
+ self.assertEqual(loadedItems, itemsToCreate)
+
+ # Deleting the view before it goes out of scope is required to make sure all child QML
+ # instances are destroyed in the correct order.
+ del view
+ del app
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.qml b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.qml
index 212166a93..212166a93 100644
--- a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.qml
+++ b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile.qml
diff --git a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile_component.qml b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile_component.qml
index 55dbe144a..55dbe144a 100644
--- a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile_component.qml
+++ b/sources/pyside6/tests/QtQml/qqmlincubator_incubateWhile_component.qml
diff --git a/sources/pyside6/tests/QtQml/qqmlnetwork_test.py b/sources/pyside6/tests/QtQml/qqmlnetwork_test.py
new file mode 100644
index 000000000..3d3c442c0
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/qqmlnetwork_test.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QQmlNetwork'''
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QUrl
+from PySide6.QtQuick import QQuickView
+from PySide6.QtQml import QQmlNetworkAccessManagerFactory
+from PySide6.QtNetwork import QNetworkAccessManager
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+
+class CustomManager(QNetworkAccessManager):
+ def createRequest(self, op, req, data = None):
+ print(">> createRequest ", self, op, req.url(), data)
+ return QNetworkAccessManager.createRequest(self, op, req, data)
+
+class CustomFactory(QQmlNetworkAccessManagerFactory):
+ def create(self, parent = None):
+ return CustomManager()
+
+class TestQQmlNetworkFactory(TimedQApplication):
+ def setUp(self):
+ TimedQApplication.setUp(self, timeout=1000)
+
+ def testQQuickNetworkFactory(self):
+ view = QQuickView()
+ self.factory = CustomFactory()
+ view.engine().setNetworkAccessManagerFactory(self.factory)
+
+ url = QUrl.fromLocalFile(adjust_filename('hw.qml', __file__))
+
+ view.setSource(url)
+ view.show()
+
+ self.assertEqual(view.status(), QQuickView.Ready)
+
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtQml/qquickitem_grabToImage.py b/sources/pyside6/tests/QtQml/qquickitem_grabToImage.py
new file mode 100644
index 000000000..e3a5a0699
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/qquickitem_grabToImage.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6 import QtCore, QtGui, QtQuick
+
+class TestGrabToSharedPointerImage(TimedQApplication):
+ def setUp(self):
+ TimedQApplication.setUp(self, 1000)
+
+ def testQQuickItemGrabToImageSharedPointer(self):
+ view = QtQuick.QQuickView()
+ view.setSource(QtCore.QUrl.fromLocalFile(
+ adjust_filename('qquickitem_grabToImage.qml', __file__)))
+ view.show()
+
+ # Get the QQuickItem objects for the blue Rectangle and the Image item.
+ root = view.rootObject()
+ blueRectangle = root.findChild(QtQuick.QQuickItem, "blueRectangle")
+ imageContainer = root.findChild(QtQuick.QQuickItem, "imageContainer")
+
+ # Start the image grabbing.
+ grabResultSharedPtr = blueRectangle.grabToImage()
+
+ # Implicit call of operator bool() of the smart pointer, to check that it holds
+ # a valid pointer.
+ self.assertTrue(grabResultSharedPtr)
+
+ self.grabbedColor = None
+ def onGrabReady():
+ # Signal early exit.
+ QtCore.QTimer.singleShot(0, self.app.quit)
+
+ # Show the grabbed image in the QML Image item.
+ imageContainer.setProperty("source", grabResultSharedPtr.url())
+
+ # Wait for signal when grabbing is complete.
+ grabResultSharedPtr.ready.connect(onGrabReady)
+ self.app.exec_()
+
+ # Get the first pixel color of the grabbed image.
+ self.image = grabResultSharedPtr.image()
+ self.assertTrue(self.image)
+ self.grabbedColor = self.image.pixelColor(0,0)
+ self.assertTrue(self.grabbedColor.isValid())
+
+ # Compare the grabbed color with the one we set in the rectangle.
+ blueColor = QtGui.QColor("blue")
+ self.assertEqual(self.grabbedColor, blueColor)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.qml b/sources/pyside6/tests/QtQml/qquickitem_grabToImage.qml
index 17d0cbdfe..17d0cbdfe 100644
--- a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.qml
+++ b/sources/pyside6/tests/QtQml/qquickitem_grabToImage.qml
diff --git a/sources/pyside6/tests/QtQml/qquickview_test.py b/sources/pyside6/tests/QtQml/qquickview_test.py
new file mode 100644
index 000000000..d1a8fcf05
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/qquickview_test.py
@@ -0,0 +1,98 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QQuickView'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6.QtCore import QUrl, QObject, Property, Slot
+from PySide6.QtQml import QtQml, QQmlEngine
+from PySide6.QtQuick import QQuickView
+
+class MyObject(QObject):
+ def __init__(self, text, parent=None):
+ QObject.__init__(self, parent)
+ self._text = text
+
+ def getText(self):
+ return self._text
+
+
+ @Slot(str)
+ def qmlText(self, text):
+ self._qmlText = text
+
+ title = Property(str, getText)
+
+
+class TestQQuickView(TimedQApplication):
+
+ def testQQuickViewList(self):
+ view = QQuickView()
+
+ dataList = ["Item 1", "Item 2", "Item 3", "Item 4"]
+
+ ctxt = view.rootContext()
+ ctxt.setContextProperty("myModel", dataList)
+
+ url = QUrl.fromLocalFile(adjust_filename('view.qml', __file__))
+ view.setSource(url)
+ view.show()
+
+ self.assertEqual(view.status(), QQuickView.Ready)
+ rootObject = view.rootObject()
+ self.assertTrue(rootObject)
+ context = QQmlEngine.contextForObject(rootObject)
+ self.assertTrue(context)
+ self.assertTrue(context.engine())
+
+ def testModelExport(self):
+ view = QQuickView()
+ dataList = [MyObject("Item 1"), MyObject("Item 2"), MyObject("Item 3"), MyObject("Item 4")]
+
+ ctxt = view.rootContext()
+ ctxt.setContextProperty("myModel", dataList)
+
+ url = QUrl.fromLocalFile(adjust_filename('viewmodel.qml', __file__))
+ view.setSource(url)
+ view.show()
+
+ self.assertEqual(view.status(), QQuickView.Ready)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtQml/registersingletontype.py b/sources/pyside6/tests/QtQml/registersingletontype.py
new file mode 100644
index 000000000..0ac2162aa
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/registersingletontype.py
@@ -0,0 +1,86 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import Property, Signal, QTimer, QUrl, QObject
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import qmlRegisterSingletonType
+from PySide6.QtQuick import QQuickView
+
+finalResult = 0
+
+class SingletonQObject(QObject):
+ def __init__(self, parent = None):
+ QObject.__init__(self, parent)
+ self._data = 100
+
+ def getData(self):
+ return self._data
+
+ def setData(self, data):
+ global finalResult
+ finalResult = self._data = data
+
+ data = Property(int, getData, setData)
+
+def singletonQObjectCallback(engine):
+ obj = SingletonQObject()
+ obj.setData(50)
+ return obj
+
+def singletonQJSValueCallback(engine):
+ return engine.evaluate("new Object({data: 50})")
+
+class TestQmlSupport(unittest.TestCase):
+ def testIt(self):
+ app = QGuiApplication([])
+
+ qmlRegisterSingletonType(SingletonQObject, 'Singletons', 1, 0, 'SingletonQObjectNoCallback')
+ qmlRegisterSingletonType(SingletonQObject, 'Singletons', 1, 0, 'SingletonQObjectCallback',
+ singletonQObjectCallback)
+
+ qmlRegisterSingletonType('Singletons', 1, 0, 'SingletonQJSValue', singletonQJSValueCallback)
+
+ view = QQuickView()
+ view.setSource(QUrl.fromLocalFile(adjust_filename('registersingletontype.qml', __file__)))
+ view.show()
+ QTimer.singleShot(250, view.close)
+ app.exec_()
+ self.assertEqual(finalResult, 200)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/registersingletontype.qml b/sources/pyside6/tests/QtQml/registersingletontype.qml
index c8b34e69a..c8b34e69a 100644
--- a/sources/pyside2/tests/QtQml/registersingletontype.qml
+++ b/sources/pyside6/tests/QtQml/registersingletontype.qml
diff --git a/sources/pyside6/tests/QtQml/registertype.py b/sources/pyside6/tests/QtQml/registertype.py
new file mode 100644
index 000000000..76657b749
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/registertype.py
@@ -0,0 +1,125 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import Property, QObject, QTimer, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QColor, QPainter
+from PySide6.QtQml import qmlRegisterType, ListProperty, QmlElement
+from PySide6.QtQuick import QQuickView, QQuickItem, QQuickPaintedItem
+
+QML_IMPORT_NAME = "Charts"
+QML_IMPORT_MAJOR_VERSION = 1
+
+@QmlElement
+class PieSlice (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._color = QColor()
+ self._fromAngle = 0
+ self._angleSpan = 0
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ self._color = value
+
+ def getFromAngle(self):
+ return self._angle
+
+ def setFromAngle(self, value):
+ self._fromAngle = value
+
+ def getAngleSpan(self):
+ return self._angleSpan
+
+ def setAngleSpan(self, value):
+ self._angleSpan = value
+
+ color = Property(QColor, getColor, setColor)
+ fromAngle = Property(int, getFromAngle, setFromAngle)
+ angleSpan = Property(int, getAngleSpan, setAngleSpan)
+
+ def paint(self, painter):
+ global paintCalled
+ pen = QPen(self._color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), self._fromAngle * 16, self._angleSpan * 16);
+ paintCalled = True
+
+@QmlElement
+class PieChart (QQuickItem):
+ def __init__(self, parent = None):
+ QQuickItem.__init__(self, parent)
+ self._name = ''
+ self._slices = []
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ name = Property(str, getName, setName)
+
+ def appendSlice(self, _slice):
+ global appendCalled
+ _slice.setParentItem(self)
+ self._slices.append(_slice)
+ appendCalled = True
+
+ slices = ListProperty(PieSlice, append=appendSlice)
+
+appendCalled = False
+paintCalled = False
+
+class TestQmlSupport(unittest.TestCase):
+
+ def testIt(self):
+ app = QGuiApplication([])
+
+ view = QQuickView()
+ view.setSource(QUrl.fromLocalFile(adjust_filename('registertype.qml', __file__)))
+ view.show()
+ QTimer.singleShot(250, view.close)
+ app.exec_()
+ self.assertTrue(appendCalled)
+ self.assertTrue(paintCalled)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/registertype.qml b/sources/pyside6/tests/QtQml/registertype.qml
index c41226016..c41226016 100644
--- a/sources/pyside2/tests/QtQml/registertype.qml
+++ b/sources/pyside6/tests/QtQml/registertype.qml
diff --git a/sources/pyside2/tests/QtQml/registeruncreatable.qml b/sources/pyside6/tests/QtQml/registeruncreatable.qml
index bebf68d82..bebf68d82 100644
--- a/sources/pyside2/tests/QtQml/registeruncreatable.qml
+++ b/sources/pyside6/tests/QtQml/registeruncreatable.qml
diff --git a/sources/pyside6/tests/QtQml/registeruncreatabletype.py b/sources/pyside6/tests/QtQml/registeruncreatabletype.py
new file mode 100644
index 000000000..3c2435f52
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/registeruncreatabletype.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import Property, QObject, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import qmlRegisterUncreatableType, QQmlEngine, QQmlComponent
+
+noCreationReason = 'Cannot create an item of type: Uncreatable (expected)';
+
+class Uncreatable(QObject):
+ def __init__(self, parent = None):
+ QObject.__init__(self, parent)
+ self._name = 'uncreatable'
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ name = Property(str, getName, setName)
+
+class TestQmlSupport(unittest.TestCase):
+
+ def testIt(self):
+ app = QGuiApplication([])
+
+ self.assertTrue(qmlRegisterUncreatableType(Uncreatable, 'Charts', 1, 0,
+ 'Uncreatable', noCreationReason) != -1);
+
+ engine = QQmlEngine()
+ component = QQmlComponent(engine, QUrl.fromLocalFile(adjust_filename('registeruncreatable.qml', __file__)))
+
+ # Check that the uncreatable item produces the correct error
+ self.assertEqual(component.status(), QQmlComponent.Error)
+ errorFound = False
+ for e in component.errors():
+ if noCreationReason in e.toString():
+ errorFound = True
+ break
+ self.assertTrue(errorFound)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtQml/signal_arguments.py b/sources/pyside6/tests/QtQml/signal_arguments.py
new file mode 100644
index 000000000..41f0acc7e
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/signal_arguments.py
@@ -0,0 +1,77 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+from PySide6.QtQuick import QQuickView
+from PySide6.QtCore import QObject, Signal, Slot, QUrl, QTimer, Property
+
+class Obj(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.value = 0
+
+ sumResult = Signal(int, name="sumResult", arguments=['sum'])
+
+ @Slot(int, int)
+ def sum(self, arg1, arg2):
+ self.sumResult.emit(arg1 + arg2)
+
+ @Slot(str)
+ def sendValue(self, s):
+ self.value = int(s)
+
+
+class TestConnectionWithQml(TimedQApplication):
+
+ def testSignalArguments(self):
+ view = QQuickView()
+ obj = Obj()
+
+ context = view.rootContext()
+ context.setContextProperty("o", obj)
+ view.setSource(QUrl.fromLocalFile(adjust_filename('signal_arguments.qml', __file__)))
+ root = view.rootObject()
+ self.assertTrue(root)
+ button = root.findChild(QObject, "button")
+ self.assertTrue(button)
+ view.show()
+ button.clicked.emit()
+ self.assertEqual(obj.value, 42)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtQml/signal_arguments.qml b/sources/pyside6/tests/QtQml/signal_arguments.qml
index 73a1715fa..73a1715fa 100644
--- a/sources/pyside2/tests/QtQml/signal_arguments.qml
+++ b/sources/pyside6/tests/QtQml/signal_arguments.qml
diff --git a/sources/pyside2/tests/QtQml/view.qml b/sources/pyside6/tests/QtQml/view.qml
index dcc0076a0..dcc0076a0 100644
--- a/sources/pyside2/tests/QtQml/view.qml
+++ b/sources/pyside6/tests/QtQml/view.qml
diff --git a/sources/pyside2/tests/QtQml/viewmodel.qml b/sources/pyside6/tests/QtQml/viewmodel.qml
index 61366a73e..61366a73e 100644
--- a/sources/pyside2/tests/QtQml/viewmodel.qml
+++ b/sources/pyside6/tests/QtQml/viewmodel.qml
diff --git a/sources/pyside2/tests/QtQuick/CMakeLists.txt b/sources/pyside6/tests/QtQuick/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtQuick/CMakeLists.txt
+++ b/sources/pyside6/tests/QtQuick/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtQuickControls2/CMakeLists.txt b/sources/pyside6/tests/QtQuickControls2/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtQuickControls2/CMakeLists.txt
+++ b/sources/pyside6/tests/QtQuickControls2/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtQuickWidgets/CMakeLists.txt b/sources/pyside6/tests/QtQuickWidgets/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtQuickWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtQuickWidgets/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt b/sources/pyside6/tests/QtRemoteObjects/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtRemoteObjects/CMakeLists.txt
+++ b/sources/pyside6/tests/QtRemoteObjects/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtScxml/CMakeLists.txt b/sources/pyside6/tests/QtScxml/CMakeLists.txt
index dde186697..dde186697 100644
--- a/sources/pyside2/tests/QtScxml/CMakeLists.txt
+++ b/sources/pyside6/tests/QtScxml/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtScxml/test_dynamic.py b/sources/pyside6/tests/QtScxml/test_dynamic.py
new file mode 100644
index 000000000..bf8739087
--- /dev/null
+++ b/sources/pyside6/tests/QtScxml/test_dynamic.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.timedqapplication import TimedQApplication
+from PySide6.QtCore import QObject, SIGNAL
+from PySide6.QtScxml import QScxmlStateMachine
+
+class testDynamicStateMachine(TimedQApplication):
+ def setUp(self):
+ super(testDynamicStateMachine, self).setUp()
+ filePath = os.path.join(os.path.dirname(__file__), 'trafficlight.scxml')
+ self.assertTrue(os.path.exists(filePath))
+ self._machine = QScxmlStateMachine.fromFile(filePath)
+ self._machine.reachedStableState.connect(self._reachedStable())
+ self.assertTrue(not self._machine.parseErrors())
+ self.assertTrue(self._machine)
+
+ def _reachedStable(self):
+ self.app.quit()
+
+ def test(self):
+ self._machine.start()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtScxml/trafficlight.scxml b/sources/pyside6/tests/QtScxml/trafficlight.scxml
index 1b0fb6e9a..1b0fb6e9a 100644
--- a/sources/pyside2/tests/QtScxml/trafficlight.scxml
+++ b/sources/pyside6/tests/QtScxml/trafficlight.scxml
diff --git a/sources/pyside2/tests/QtSensors/CMakeLists.txt b/sources/pyside6/tests/QtSensors/CMakeLists.txt
index 87e548f87..87e548f87 100644
--- a/sources/pyside2/tests/QtSensors/CMakeLists.txt
+++ b/sources/pyside6/tests/QtSensors/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtSensors/sensors.py b/sources/pyside6/tests/QtSensors/sensors.py
new file mode 100644
index 000000000..e9d6df8b7
--- /dev/null
+++ b/sources/pyside6/tests/QtSensors/sensors.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QSensor'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtSensors import QSensor, QSensorReading
+
+
+class QSensorTest(unittest.TestCase):
+ def test(self):
+ for sensorType in QSensor.sensorTypes():
+ identifiers = QSensor.sensorsForType(sensorType)
+ values = []
+ usedIdentifier = None
+ for identifier in identifiers:
+ sensor = QSensor(sensorType, None);
+ sensor.setIdentifier(identifier)
+ if sensor.connectToBackend():
+ usedIdentifier = identifier
+ reading = sensor.reading()
+ for i in range(0, reading.valueCount()):
+ values.append(reading.value(i))
+ break
+ if usedIdentifier:
+ print('Sensor ', sensorType, usedIdentifier, values)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtSerialPort/CMakeLists.txt b/sources/pyside6/tests/QtSerialPort/CMakeLists.txt
index 554373445..554373445 100644
--- a/sources/pyside2/tests/QtSerialPort/CMakeLists.txt
+++ b/sources/pyside6/tests/QtSerialPort/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtSerialPort/serial.py b/sources/pyside6/tests/QtSerialPort/serial.py
new file mode 100644
index 000000000..84ad98af5
--- /dev/null
+++ b/sources/pyside6/tests/QtSerialPort/serial.py
@@ -0,0 +1,95 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QSerialPort'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtSerialPort import QSerialPort, QSerialPortInfo
+from PySide6.QtCore import QIODevice
+
+class QSerialPortTest(unittest.TestCase):
+ def testDefaultConstructedPort(self):
+ serialPort = QSerialPort()
+
+ self.assertEqual(serialPort.error(), QSerialPort.NoError)
+ self.assertTrue(not serialPort.errorString() == "")
+
+ # properties
+ defaultBaudRate = QSerialPort.Baud9600
+ self.assertEqual(serialPort.baudRate(), defaultBaudRate)
+ self.assertEqual(serialPort.baudRate(QSerialPort.Input), defaultBaudRate)
+ self.assertEqual(serialPort.baudRate(QSerialPort.Output), defaultBaudRate)
+ self.assertEqual(serialPort.dataBits(), QSerialPort.Data8)
+ self.assertEqual(serialPort.parity(), QSerialPort.NoParity)
+ self.assertEqual(serialPort.stopBits(), QSerialPort.OneStop)
+ self.assertEqual(serialPort.flowControl(), QSerialPort.NoFlowControl)
+
+ self.assertEqual(serialPort.pinoutSignals(), QSerialPort.NoSignal)
+ self.assertEqual(serialPort.isRequestToSend(), False)
+ self.assertEqual(serialPort.isDataTerminalReady(), False)
+
+ # QIODevice
+ self.assertEqual(serialPort.openMode(), QIODevice.NotOpen)
+ self.assertTrue(not serialPort.isOpen())
+ self.assertTrue(not serialPort.isReadable())
+ self.assertTrue(not serialPort.isWritable())
+ self.assertTrue(serialPort.isSequential())
+ self.assertEqual(serialPort.canReadLine(), False)
+ self.assertEqual(serialPort.pos(), 0)
+ self.assertEqual(serialPort.size(), 0)
+ self.assertTrue(serialPort.atEnd())
+ self.assertEqual(serialPort.bytesAvailable(), 0)
+ self.assertEqual(serialPort.bytesToWrite(), 0)
+
+ def testOpenExisting(self):
+ allportinfos = QSerialPortInfo.availablePorts()
+ for portinfo in allportinfos:
+ serialPort = QSerialPort(portinfo)
+ self.assertEqual(serialPort.portName(), portinfo.portName())
+
+
+class QSerialPortInfoTest(unittest.TestCase):
+ def test_available_ports(self):
+ allportinfos = QSerialPortInfo.availablePorts()
+ for portinfo in allportinfos:
+ portinfo.description()
+ portinfo.hasProductIdentifier()
+ portinfo.hasVendorIdentifier()
+ portinfo.isNull()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtSql/CMakeLists.txt b/sources/pyside6/tests/QtSql/CMakeLists.txt
index 8db3a9813..8db3a9813 100644
--- a/sources/pyside2/tests/QtSql/CMakeLists.txt
+++ b/sources/pyside6/tests/QtSql/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtSql/bug_1013.py b/sources/pyside6/tests/QtSql/bug_1013.py
new file mode 100644
index 000000000..5d0767938
--- /dev/null
+++ b/sources/pyside6/tests/QtSql/bug_1013.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtSql import *
+
+
+class TestBug1013 (unittest.TestCase):
+
+ def someSlot(self, row, record):
+ record.setValue(0, 2)
+ self._wasCalled = True
+
+ def testIt(self):
+ app = QCoreApplication([])
+ db = QSqlDatabase.addDatabase('QSQLITE')
+ db.setDatabaseName(':memory:')
+ db.open()
+ query = QSqlQuery()
+ query.exec_('CREATE TABLE "foo" (id INT);')
+ model = QSqlTableModel()
+ model.setTable('foo')
+
+ self._wasCalled = False
+ model.primeInsert.connect(self.someSlot)
+ model.select()
+ QTimer.singleShot(0,lambda: model.insertRow(0) and app.quit())
+ app.exec_()
+ self.assertTrue(self._wasCalled)
+ self.assertEqual(model.data(model.index(0, 0)), 2)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py
new file mode 100644
index 000000000..c5a736e07
--- /dev/null
+++ b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QtSql database creation, destruction and queries'''
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtSql
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class Foo(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.model = QtSql.QSqlTableModel()
+
+class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase):
+ '''Test cases for QtSql database creation, destruction and queries'''
+
+ def setUp(self):
+ #Acquire resources
+ self.assertFalse(not QtSql.QSqlDatabase.drivers(), "installed Qt has no DB drivers")
+ self.assertTrue("QSQLITE" in QtSql.QSqlDatabase.drivers(), "\"QSQLITE\" driver not available in this Qt version")
+ self.db = QtSql.QSqlDatabase.addDatabase("QSQLITE")
+ self.db.setDatabaseName(":memory:")
+ self.assertTrue(self.db.open())
+
+ def tearDown(self):
+ #Release resources
+ self.db.close()
+ QtSql.QSqlDatabase.removeDatabase(":memory:")
+ del self.db
+
+ def testTableCreationAndDestruction(self):
+ #Test table creation and destruction
+ query = QtSql.QSqlQuery()
+ query.exec_("CREATE TABLE dummy(id int primary key, dummyfield varchar(20))")
+ query.exec_("DROP TABLE dummy")
+ query.clear()
+
+ def testTableInsertionAndRetrieval(self):
+ #Test table creation, insertion and retrieval
+ query = QtSql.QSqlQuery()
+ query.exec_("CREATE TABLE person(id int primary key, "
+ "firstname varchar(20), lastname varchar(20))")
+ query.exec_("INSERT INTO person VALUES(101, 'George', 'Harrison')")
+ query.prepare("INSERT INTO person (id, firstname, lastname) "
+ "VALUES (:id, :firstname, :lastname)")
+ query.bindValue(":id", 102)
+ query.bindValue(":firstname", "John")
+ query.bindValue(":lastname", "Lennon")
+ query.exec_()
+
+ lastname = ''
+ query.exec_("SELECT lastname FROM person where id=101")
+ self.assertTrue(query.isActive())
+ query.next()
+ lastname = query.value(0)
+ self.assertEqual(lastname, 'Harrison')
+
+ def testTableModelDeletion(self):
+ app = QApplication([])
+
+ bar = Foo()
+ model = bar.model
+ del bar
+ del app
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtSql/qvarianttype_test.py b/sources/pyside6/tests/QtSql/qvarianttype_test.py
new file mode 100644
index 000000000..f2a3cb538
--- /dev/null
+++ b/sources/pyside6/tests/QtSql/qvarianttype_test.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QVariant::Type converter'''
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtSql import QSqlField
+
+class QVariantTypeTest(unittest.TestCase):
+ def testQVariantType(self):
+ f = QSqlField("name", str)
+ self.assertEqual(f.type(), str)
+
+ f = QSqlField("name", "QString")
+ self.assertEqual(f.type(), str)
+
+ f = QSqlField("name", "double")
+ self.assertEqual(f.type(), float)
+
+ f = QSqlField("name", float)
+ self.assertEqual(f.type(), float)
+
+ f = QSqlField("name", int)
+ self.assertEqual(f.type(), int)
+
+ f = QSqlField("name", None)
+ self.assertEqual(f.type(), None)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtSvg/CMakeLists.txt b/sources/pyside6/tests/QtSvg/CMakeLists.txt
index 53d15e857..53d15e857 100644
--- a/sources/pyside2/tests/QtSvg/CMakeLists.txt
+++ b/sources/pyside6/tests/QtSvg/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtSvg/qsvggenerator_test.py b/sources/pyside6/tests/QtSvg/qsvggenerator_test.py
new file mode 100644
index 000000000..a5eeaf403
--- /dev/null
+++ b/sources/pyside6/tests/QtSvg/qsvggenerator_test.py
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QBuffer
+from PySide6.QtSvg import QSvgGenerator
+
+class QSvgGeneratorTest(unittest.TestCase):
+
+ def testRefCountOfTOutputDevice(self):
+ generator = QSvgGenerator()
+ iodevice1 = QBuffer()
+ refcount1 = getrefcount(iodevice1)
+
+ generator.setOutputDevice(iodevice1)
+
+ self.assertEqual(generator.outputDevice(), iodevice1)
+ self.assertEqual(getrefcount(generator.outputDevice()), refcount1 + 1)
+
+ iodevice2 = QBuffer()
+ refcount2 = getrefcount(iodevice2)
+
+ generator.setOutputDevice(iodevice2)
+
+ self.assertEqual(generator.outputDevice(), iodevice2)
+ self.assertEqual(getrefcount(generator.outputDevice()), refcount2 + 1)
+ self.assertEqual(getrefcount(iodevice1), refcount1)
+
+ del generator
+
+ self.assertEqual(getrefcount(iodevice2), refcount2)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtSvg/qsvgrenderer_test.py b/sources/pyside6/tests/QtSvg/qsvgrenderer_test.py
new file mode 100644
index 000000000..985db23fa
--- /dev/null
+++ b/sources/pyside6/tests/QtSvg/qsvgrenderer_test.py
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QFile
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtSvg import QSvgRenderer
+
+class QSvgRendererTest(unittest.TestCase):
+
+ def testLoad(self):
+ tigerPath = os.path.join(os.path.dirname(__file__), 'tiger.svg')
+ app = QGuiApplication([])
+
+ fromFile = QSvgRenderer(tigerPath)
+ self.assertTrue(fromFile.isValid())
+
+ tigerFile = QFile(tigerPath)
+ tigerFile.open(QFile.ReadOnly)
+ tigerData = tigerFile.readAll()
+ fromContents = QSvgRenderer(tigerData)
+ self.assertTrue(fromContents.isValid())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtSvg/tiger.svg b/sources/pyside6/tests/QtSvg/tiger.svg
index 681fbd209..681fbd209 100644
--- a/sources/pyside2/tests/QtSvg/tiger.svg
+++ b/sources/pyside6/tests/QtSvg/tiger.svg
diff --git a/sources/pyside2/tests/QtSvgWidgets/CMakeLists.txt b/sources/pyside6/tests/QtSvgWidgets/CMakeLists.txt
index 61952169a..61952169a 100644
--- a/sources/pyside2/tests/QtSvgWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtSvgWidgets/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtSvgWidgets/qsvgwidget_test.py b/sources/pyside6/tests/QtSvgWidgets/qsvgwidget_test.py
new file mode 100644
index 000000000..b4b5267e9
--- /dev/null
+++ b/sources/pyside6/tests/QtSvgWidgets/qsvgwidget_test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QFile, QFileInfo, QDir
+from PySide6.QtWidgets import QApplication
+from PySide6.QtSvgWidgets import QSvgWidget
+
+class QSvgWidgetTest(unittest.TestCase):
+
+ def testLoad(self):
+ dir = os.path.dirname(__file__)
+ tigerPath = QDir.cleanPath("{}/../QtSvg/tiger.svg".format(dir))
+ self.assertTrue(QFileInfo.exists(tigerPath))
+
+ app = QApplication([])
+ fromFile = QSvgWidget()
+ fromFile.load(tigerPath)
+ self.assertTrue(fromFile.renderer().isValid())
+
+ tigerFile = QFile(tigerPath)
+ tigerFile.open(QFile.ReadOnly)
+ tigerData = tigerFile.readAll()
+ fromContents = QSvgWidget()
+ fromContents.load(tigerData)
+ self.assertTrue(fromContents.renderer().isValid())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtTest/CMakeLists.txt b/sources/pyside6/tests/QtTest/CMakeLists.txt
index cf72dfa5c..cf72dfa5c 100644
--- a/sources/pyside2/tests/QtTest/CMakeLists.txt
+++ b/sources/pyside6/tests/QtTest/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtTest/click_test.py b/sources/pyside6/tests/QtTest/click_test.py
new file mode 100644
index 000000000..2ee43156a
--- /dev/null
+++ b/sources/pyside6/tests/QtTest/click_test.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''QtTest mouse click functionalities'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QObject
+from PySide6.QtWidgets import QPushButton, QLineEdit
+from PySide6.QtTest import QTest
+
+from helper.usesqapplication import UsesQApplication
+
+class MouseClickTest(UsesQApplication):
+
+ def testBasic(self):
+ '''QTest.mouseClick with QCheckBox'''
+ button = QPushButton()
+ button.setCheckable(True)
+ button.setChecked(False)
+
+ QTest.mouseClick(button, Qt.LeftButton)
+ self.assertTrue(button.isChecked())
+
+ QTest.mouseClick(button, Qt.LeftButton)
+ self.assertFalse(button.isChecked())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtTest/eventfilter_test.py b/sources/pyside6/tests/QtTest/eventfilter_test.py
new file mode 100644
index 000000000..4a5fc4cab
--- /dev/null
+++ b/sources/pyside6/tests/QtTest/eventfilter_test.py
@@ -0,0 +1,81 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests for QKeyEvent'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QObject, QEvent
+from PySide6.QtGui import QKeyEvent
+from PySide6.QtWidgets import QLineEdit
+from PySide6.QtTest import QTest
+
+from helper.usesqapplication import UsesQApplication
+
+
+class KeyEventFilter(QObject):
+
+ def __init__(self, widget, eventType, key):
+ QObject.__init__(self)
+
+ self.widget = widget
+ self.eventType = eventType
+ self.key = key
+
+ self.processed = False
+
+ def eventFilter(self, obj, event):
+ if self.widget == obj and event.type() == self.eventType and \
+ isinstance(event, QKeyEvent) and event.key() == self.key:
+ self.processed = True
+ return True
+
+ return False
+
+class EventFilterTest(UsesQApplication):
+
+ def testKeyEvent(self):
+ widget = QLineEdit()
+ key = Qt.Key_A
+ eventFilter = KeyEventFilter(widget, QEvent.KeyPress, key)
+ widget.installEventFilter(eventFilter)
+
+ QTest.keyClick(widget, key)
+
+ self.assertTrue(eventFilter.processed)
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtTest/qvalidator_test.py b/sources/pyside6/tests/QtTest/qvalidator_test.py
new file mode 100644
index 000000000..5cdebcfe9
--- /dev/null
+++ b/sources/pyside6/tests/QtTest/qvalidator_test.py
@@ -0,0 +1,140 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+from PySide6.QtTest import *
+
+from helper.usesqapplication import UsesQApplication
+
+class MyValidator1(QValidator):
+ def fixup(self, input):
+ return "fixed"
+
+ def validate(self, input, pos):
+ return (QValidator.Acceptable, "fixed", 1)
+
+class MyValidator2(QValidator):
+ def fixup(self, input):
+ return "fixed"
+
+ def validate(self, input, pos):
+ return (QValidator.Acceptable, "fixed")
+
+class MyValidator3(QValidator):
+ def fixup(self, input):
+ return "fixed"
+
+ def validate(self, input, pos):
+ return (QValidator.Acceptable,)
+
+class MyValidator4(QValidator):
+ def fixup(self, input):
+ return "fixed"
+
+ def validate(self, input, pos):
+ return QValidator.Acceptable
+
+class MyValidator5(QValidator):
+ def validate(self, input, pos):
+ if input.islower():
+ return (QValidator.Intermediate, input, pos)
+ else:
+ return (QValidator.Acceptable, input, pos)
+
+ def fixup(self, input):
+ return "22"
+
+class QValidatorTest(UsesQApplication):
+ def testValidator1(self):
+ line = QLineEdit()
+ line.setValidator(MyValidator1())
+ line.show()
+ line.setText("foo")
+
+ QTimer.singleShot(0, line.close)
+ self.app.exec_()
+
+ self.assertEqual(line.text(), "fixed")
+ self.assertEqual(line.cursorPosition(), 1)
+
+ def testValidator2(self):
+ line = QLineEdit()
+ line.setValidator(MyValidator2())
+ line.show()
+ line.setText("foo")
+
+ QTimer.singleShot(0, line.close)
+ self.app.exec_()
+
+ self.assertEqual(line.text(), "fixed")
+ self.assertEqual(line.cursorPosition(), 3)
+
+ def testValidator3(self):
+ line = QLineEdit()
+ line.setValidator(MyValidator3())
+ line.show()
+ line.setText("foo")
+
+ QTimer.singleShot(0, line.close)
+ self.app.exec_()
+
+ self.assertEqual(line.text(), "foo")
+ self.assertEqual(line.cursorPosition(), 3)
+
+ def testValidator4(self):
+ line = QLineEdit()
+ line.setValidator(MyValidator4())
+ line.show()
+ line.setText("foo")
+
+ QTimer.singleShot(0, line.close)
+ self.app.exec_()
+
+ self.assertEqual(line.text(), "foo")
+ self.assertEqual(line.cursorPosition(), 3)
+
+ def testValidator5(self):
+ line = QLineEdit()
+ line.show()
+ line.setValidator(MyValidator5())
+ line.setText("foo")
+ QTest.keyClick(line, Qt.Key_Return)
+ self.assertEqual(line.text(), "22")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtTest/touchevent_test.py b/sources/pyside6/tests/QtTest/touchevent_test.py
new file mode 100644
index 000000000..cb4a11181
--- /dev/null
+++ b/sources/pyside6/tests/QtTest/touchevent_test.py
@@ -0,0 +1,83 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtWidgets import QWidget
+from PySide6.QtCore import QPoint, QTimer, Qt, QEvent
+from PySide6.QtGui import QTouchDevice
+from PySide6.QtTest import QTest
+
+class MyWidget(QWidget):
+ def __init__(self, parent = None):
+ QWidget.__init__(self, parent)
+ self._sequence = []
+ # Fixme (Qt 5): The device needs to be registered (using
+ # QWindowSystemInterface::registerTouchDevice()) for the test to work
+ self._device = QTouchDevice()
+ self.setAttribute(Qt.WA_AcceptTouchEvents)
+ QTimer.singleShot(200, self.generateEvent)
+
+ def event(self, e):
+ self._sequence.append(e.type())
+ return QWidget.event(self, e)
+
+ def generateEvent(self):
+ o = QTest.touchEvent(self, self._device)
+ o.press(0, QPoint(10, 10))
+ o.commit()
+ del o
+
+ QTest.touchEvent(self, self._device).press(0, QPoint(10, 10))
+ QTest.touchEvent(self, self._device).stationary(0).press(1, QPoint(40, 10))
+ QTest.touchEvent(self, self._device).move(0, QPoint(12, 12)).move(1, QPoint(45, 5))
+ QTest.touchEvent(self, self._device).release(0, QPoint(12, 12)).release(1, QPoint(45, 5))
+ QTimer.singleShot(200, self.deleteLater)
+
+
+class TouchEventTest(UsesQApplication):
+ def testCreateEvent(self):
+ w = MyWidget()
+ w.show()
+ self.app.exec_()
+ # same values as C++
+ self.assertEqual(w._sequence.count(QEvent.Type.TouchBegin), 2)
+ self.assertEqual(w._sequence.count(QEvent.Type.TouchUpdate), 2)
+ self.assertEqual(w._sequence.count(QEvent.Type.TouchEnd), 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt b/sources/pyside6/tests/QtTextToSpeech/CMakeLists.txt
index 6f5851587..6f5851587 100644
--- a/sources/pyside2/tests/QtTextToSpeech/CMakeLists.txt
+++ b/sources/pyside6/tests/QtTextToSpeech/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtTextToSpeech/qtexttospeech_test.py b/sources/pyside6/tests/QtTextToSpeech/qtexttospeech_test.py
new file mode 100644
index 000000000..d9502d7cd
--- /dev/null
+++ b/sources/pyside6/tests/QtTextToSpeech/qtexttospeech_test.py
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QTextToSpeech methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import QTimer
+
+try:
+ from PySide6.QtTextToSpeech import QTextToSpeech, QVoice
+except ImportError:
+ print("Skipping test due to missing QtTextToSpeech module")
+ sys.exit(0)
+
+class QTextToSpeechTestCase(UsesQApplication):
+ '''Tests related to QTextToSpeech'''
+ def testSay(self):
+ engines = QTextToSpeech.availableEngines()
+ if not engines:
+ print('No QTextToSpeech engines available')
+ else:
+ speech = QTextToSpeech(engines[0])
+ speech.stateChanged.connect(self._slotStateChanged)
+ speech.say("Hello, PySide6")
+ QTimer.singleShot(5000, self.app.quit)
+ self.app.exec_()
+
+ def _slotStateChanged(self, state):
+ if (state == QTextToSpeech.State.Ready):
+ self.app.quit()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/CMakeLists.txt b/sources/pyside6/tests/QtUiTools/CMakeLists.txt
index 68ed7f134..68ed7f134 100644
--- a/sources/pyside2/tests/QtUiTools/CMakeLists.txt
+++ b/sources/pyside6/tests/QtUiTools/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtUiTools/action.ui b/sources/pyside6/tests/QtUiTools/action.ui
index 9eda559de..9eda559de 100644
--- a/sources/pyside2/tests/QtUiTools/action.ui
+++ b/sources/pyside6/tests/QtUiTools/action.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_1060.py b/sources/pyside6/tests/QtUiTools/bug_1060.py
new file mode 100644
index 000000000..2fe0163c9
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_1060.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1060 '''
+
+import os
+import sys
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from PySide6.QtWidgets import QApplication
+from PySide6.QtUiTools import QUiLoader
+
+
+class MyQUiLoader(QUiLoader):
+ def __init__(self):
+ super(MyQUiLoader, self).__init__()
+
+ def createWidget(self, *args):
+ return super(MyQUiLoader, self).createWidget(*args)
+
+if __name__ == "__main__":
+ app = QApplication([])
+
+ ui = MyQUiLoader().load(adjust_filename("bug_1060.ui", __file__))
+ ui.show()
diff --git a/sources/pyside2/tests/QtUiTools/bug_1060.ui b/sources/pyside6/tests/QtUiTools/bug_1060.ui
index f4044a8c2..f4044a8c2 100644
--- a/sources/pyside2/tests/QtUiTools/bug_1060.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_1060.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_360.py b/sources/pyside6/tests/QtUiTools/bug_360.py
new file mode 100644
index 000000000..ce33b4c6d
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_360.py
@@ -0,0 +1,70 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6 import QtCore, QtWidgets
+from PySide6.QtUiTools import QUiLoader
+
+class MyQUiLoader(QUiLoader):
+ def __init__(self, baseinstance):
+ QUiLoader.__init__(self)
+ self.baseinstance = baseinstance
+ self._widgets = []
+
+ def createWidget(self, className, parent=None, name=""):
+ widget = QUiLoader.createWidget(self, className, parent, name)
+ self._widgets.append(widget)
+ if parent is None:
+ return self.baseinstance
+ else:
+ setattr(self.baseinstance, name, widget)
+ return widget
+
+class ButTest(UsesQApplication):
+ def testCase(self):
+ w = QtWidgets.QWidget()
+ loader = MyQUiLoader(w)
+
+ filePath = os.path.join(os.path.dirname(__file__), 'minimal.ui')
+ ui = loader.load(filePath)
+
+ self.assertEqual(len(loader._widgets), 1)
+ self.assertEqual(type(loader._widgets[0]), QtWidgets.QFrame)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtUiTools/bug_376.py b/sources/pyside6/tests/QtUiTools/bug_376.py
new file mode 100644
index 000000000..db74b927a
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_376.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6 import QtCore, QtWidgets
+from PySide6.QtUiTools import QUiLoader
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ w = QtWidgets.QWidget()
+ loader = QUiLoader()
+
+ filePath = os.path.join(os.path.dirname(__file__), 'test.ui')
+ result = loader.load(filePath, w)
+ self.assertTrue(isinstance(result.child_object, QtWidgets.QFrame))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtUiTools/bug_392.py b/sources/pyside6/tests/QtUiTools/bug_392.py
new file mode 100644
index 000000000..da6750d92
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_392.py
@@ -0,0 +1,84 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QComboBox, QWidget
+from PySide6.QtUiTools import QUiLoader
+
+class MyWidget(QComboBox):
+ def __init__(self, parent=None):
+ QComboBox.__init__(self, parent)
+
+ def isPython(self):
+ return True
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ w = QWidget()
+ loader = QUiLoader()
+
+ filePath = os.path.join(os.path.dirname(__file__), 'action.ui')
+ result = loader.load(filePath, w)
+ self.assertTrue(isinstance(result.actionFoo, QAction))
+
+ def testPythonCustomWidgets(self):
+ w = QWidget()
+ loader = QUiLoader()
+ loader.registerCustomWidget(MyWidget)
+ self.assertTrue('MyWidget' in loader.availableWidgets())
+
+ filePath = os.path.join(os.path.dirname(__file__), 'pycustomwidget.ui')
+ result = loader.load(filePath, w)
+ self.assertTrue(isinstance(result.custom, MyWidget))
+ self.assertTrue(result.custom.isPython())
+
+ def testPythonCustomWidgetsTwice(self):
+ w = QWidget()
+ loader = QUiLoader()
+ loader.registerCustomWidget(MyWidget)
+ self.assertTrue('MyWidget' in loader.availableWidgets())
+
+ filePath = os.path.join(os.path.dirname(__file__), 'pycustomwidget2.ui')
+ result = loader.load(filePath, w)
+ self.assertTrue(isinstance(result.custom, MyWidget))
+ self.assertTrue(isinstance(result.custom2, MyWidget))
+ self.assertTrue(result.custom.isPython())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtUiTools/bug_426.py b/sources/pyside6/tests/QtUiTools/bug_426.py
new file mode 100644
index 000000000..07a490389
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_426.py
@@ -0,0 +1,55 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer
+from PySide6.QtGui import QAction, QActionGroup
+from PySide6.QtWidgets import QApplication, QWidget
+from PySide6.QtUiTools import QUiLoader
+
+
+class Window(object):
+ def __init__(self):
+ loader = QUiLoader()
+ filePath = os.path.join(os.path.dirname(__file__), 'bug_426.ui')
+ self.widget = loader.load(filePath)
+ self.group = QActionGroup(self.widget)
+ self.widget.show()
+ QTimer.singleShot(0, self.widget.close)
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+ win = Window()
+ sys.exit(app.exec_())
diff --git a/sources/pyside2/tests/QtUiTools/bug_426.ui b/sources/pyside6/tests/QtUiTools/bug_426.ui
index 99353cd2b..99353cd2b 100644
--- a/sources/pyside2/tests/QtUiTools/bug_426.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_426.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_552.py b/sources/pyside6/tests/QtUiTools/bug_552.py
new file mode 100644
index 000000000..bd6ec57c7
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_552.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+from PySide6 import QtWidgets, QtCore
+from PySide6.QtUiTools import QUiLoader
+
+class View_1(QtWidgets.QWidget):
+
+ def __init__(self):
+ QtWidgets.QWidget.__init__(self)
+ loader = QUiLoader()
+ widget = loader.load(adjust_filename('bug_552.ui', __file__), self)
+ self.children = []
+ for child in widget.findChildren(QtCore.QObject, None):
+ self.children.append(child)
+ self.t = widget.tabWidget
+ self.t.removeTab(0)
+
+app = QtWidgets.QApplication([])
+window = View_1()
+window.show()
+
+# If it doesn't crash it works :-)
diff --git a/sources/pyside2/tests/QtUiTools/bug_552.ui b/sources/pyside6/tests/QtUiTools/bug_552.ui
index f98da4421..f98da4421 100644
--- a/sources/pyside2/tests/QtUiTools/bug_552.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_552.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_797.py b/sources/pyside6/tests/QtUiTools/bug_797.py
new file mode 100644
index 000000000..bc46af65f
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_797.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6 import QtUiTools
+from PySide6 import QtCore
+from PySide6 import QtWidgets
+
+
+app = QtWidgets.QApplication([])
+loader = QtUiTools.QUiLoader()
+file = QtCore.QFile(adjust_filename('bug_552.ui', __file__))
+w = QtWidgets.QWidget()
+# An exception can't be thrown
+mainWindow = loader.load(file, w)
diff --git a/sources/pyside6/tests/QtUiTools/bug_909.py b/sources/pyside6/tests/QtUiTools/bug_909.py
new file mode 100644
index 000000000..79ad5d095
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_909.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QFile
+from PySide6.QtWidgets import QTabWidget
+from PySide6.QtUiTools import QUiLoader
+
+from helper.usesqapplication import UsesQApplication
+from helper.helper import adjust_filename
+
+class TestDestruction(UsesQApplication):
+ def testBug909(self):
+ fileName = QFile(adjust_filename('bug_909.ui', __file__))
+ loader = QUiLoader()
+ main_win = loader.load(fileName)
+ self.assertEqual(sys.getrefcount(main_win), 2)
+ fileName.close()
+
+ tw = QTabWidget(main_win)
+ main_win.setCentralWidget(tw)
+ main_win.show()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_909.ui b/sources/pyside6/tests/QtUiTools/bug_909.ui
index b07f62d05..b07f62d05 100644
--- a/sources/pyside2/tests/QtUiTools/bug_909.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_909.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_913.py b/sources/pyside6/tests/QtUiTools/bug_913.py
new file mode 100644
index 000000000..0352764ca
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_913.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.helper import adjust_filename
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+from PySide6.QtUiTools import *
+
+class TestBug913 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+
+ loader = QUiLoader()
+ widget = loader.load(adjust_filename('bug_913.ui', __file__))
+ widget.tabWidget.currentIndex() # direct child is available as member
+ widget.le_first.setText('foo') # child of QTabWidget must also be available!
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_913.ui b/sources/pyside6/tests/QtUiTools/bug_913.ui
index 0fc95fd53..0fc95fd53 100644
--- a/sources/pyside2/tests/QtUiTools/bug_913.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_913.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_958.py b/sources/pyside6/tests/QtUiTools/bug_958.py
new file mode 100644
index 000000000..cfef1f5f4
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_958.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets, QtUiTools
+from helper.helper import adjust_filename
+from helper.timedqapplication import TimedQApplication
+
+class Gui_Qt(QtWidgets.QMainWindow):
+ def __init__(self, parent=None):
+ super(Gui_Qt, self).__init__(parent)
+
+ lLoader = QtUiTools.QUiLoader()
+
+ # this used to cause a segfault because the old inject code used to destroy the parent layout
+ self._cw = lLoader.load(adjust_filename('bug_958.ui', __file__), self)
+
+ self.setCentralWidget(self._cw)
+
+class BugTest(TimedQApplication):
+ def testCase(self):
+ lMain = Gui_Qt()
+ lMain.show()
+ self.app.exec_()
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_958.ui b/sources/pyside6/tests/QtUiTools/bug_958.ui
index 57cdbddba..57cdbddba 100644
--- a/sources/pyside2/tests/QtUiTools/bug_958.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_958.ui
diff --git a/sources/pyside6/tests/QtUiTools/bug_965.py b/sources/pyside6/tests/QtUiTools/bug_965.py
new file mode 100644
index 000000000..97668a36b
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/bug_965.py
@@ -0,0 +1,55 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtUiTools import QUiLoader
+
+from helper.usesqapplication import UsesQApplication
+from helper.helper import adjust_filename
+
+class MyQUiLoader(QUiLoader):
+ def __init__(self):
+ super(MyQUiLoader, self).__init__()
+
+ def createWidget(self, className, parent=None, name=""):
+ return None
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ loader = MyQUiLoader()
+ self.assertRaises(RuntimeError, loader.load, adjust_filename('bug_965.ui', __file__))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtUiTools/bug_965.ui b/sources/pyside6/tests/QtUiTools/bug_965.ui
index e324db829..e324db829 100644
--- a/sources/pyside2/tests/QtUiTools/bug_965.ui
+++ b/sources/pyside6/tests/QtUiTools/bug_965.ui
diff --git a/sources/pyside6/tests/QtUiTools/loadUiType_test.py b/sources/pyside6/tests/QtUiTools/loadUiType_test.py
new file mode 100644
index 000000000..8cbbe4cb9
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/loadUiType_test.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtWidgets import QWidget, QFrame, QPushButton
+from PySide6.QtUiTools import loadUiType
+
+class loadUiTypeTester(UsesQApplication):
+ def testFunction(self):
+ filePath = os.path.join(os.path.dirname(__file__), "minimal.ui")
+ loaded = loadUiType(filePath)
+ self.assertNotEqual(loaded, None)
+
+ # (<class '__main__.Ui_Form'>, <class 'PySide6.QtWidgets.QFrame'>)
+ generated, base = loaded
+
+ # Generated class contains retranslateUi method
+ self.assertTrue("retranslateUi" in dir(generated))
+
+ # Base class instance will be QFrame for this example
+ self.assertTrue(isinstance(base(), QFrame))
+
+ anotherFileName = os.path.join(os.path.dirname(__file__), "test.ui")
+ another = loadUiType(anotherFileName)
+ self.assertNotEqual(another, None)
+
+ generated, base = another
+ # Base class instance will be QWidget for this example
+ self.assertTrue(isinstance(base(), QWidget))
+
+ w = base()
+ ui = generated()
+ ui.setupUi(w)
+
+ self.assertTrue(isinstance(ui.child_object, QFrame))
+ self.assertTrue(isinstance(ui.grandson_object, QPushButton))
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtUiTools/minimal.ui b/sources/pyside6/tests/QtUiTools/minimal.ui
index c6bb70cda..c6bb70cda 100644
--- a/sources/pyside2/tests/QtUiTools/minimal.ui
+++ b/sources/pyside6/tests/QtUiTools/minimal.ui
diff --git a/sources/pyside2/tests/QtUiTools/pycustomwidget.ui b/sources/pyside6/tests/QtUiTools/pycustomwidget.ui
index c066153a0..c066153a0 100644
--- a/sources/pyside2/tests/QtUiTools/pycustomwidget.ui
+++ b/sources/pyside6/tests/QtUiTools/pycustomwidget.ui
diff --git a/sources/pyside2/tests/QtUiTools/pycustomwidget2.ui b/sources/pyside6/tests/QtUiTools/pycustomwidget2.ui
index 8826ac1fb..8826ac1fb 100644
--- a/sources/pyside2/tests/QtUiTools/pycustomwidget2.ui
+++ b/sources/pyside6/tests/QtUiTools/pycustomwidget2.ui
diff --git a/sources/pyside2/tests/QtUiTools/test.ui b/sources/pyside6/tests/QtUiTools/test.ui
index 60afe22b3..60afe22b3 100644
--- a/sources/pyside2/tests/QtUiTools/test.ui
+++ b/sources/pyside6/tests/QtUiTools/test.ui
diff --git a/sources/pyside6/tests/QtUiTools/ui_test.py b/sources/pyside6/tests/QtUiTools/ui_test.py
new file mode 100644
index 000000000..6f35637ad
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/ui_test.py
@@ -0,0 +1,47 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtUiTools import QUiLoader
+
+from helper.usesqapplication import UsesQApplication
+
+class QUiLoaderCreation(UsesQApplication):
+
+ def testConstructor(self):
+ loader = QUiLoader()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtUiTools/uiloader_test.py b/sources/pyside6/tests/QtUiTools/uiloader_test.py
new file mode 100644
index 000000000..9addb3f69
--- /dev/null
+++ b/sources/pyside6/tests/QtUiTools/uiloader_test.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtWidgets import QWidget
+from PySide6.QtUiTools import QUiLoader
+
+
+class OverridingLoader(QUiLoader):
+ def createWidget(self, class_name, parent=None, name=''):
+ if class_name == 'QWidget':
+ w = QWidget(parent)
+ w.setObjectName(name)
+ return w
+ return QUiLoader.createWidget(self, class_name, parent, name)
+
+
+class QUiLoaderTester(UsesQApplication):
+ def setUp(self):
+ UsesQApplication.setUp(self)
+ self._filePath = os.path.join(os.path.dirname(__file__), 'test.ui')
+
+ def testLoadFile(self):
+ loader = QUiLoader()
+ parent = QWidget()
+ w = loader.load(self._filePath, parent)
+ self.assertNotEqual(w, None)
+
+ self.assertEqual(len(parent.children()), 1)
+
+ child = w.findChild(QWidget, "child_object")
+ self.assertNotEqual(child, None)
+ self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
+
+
+ def testLoadFileOverride(self):
+ # PYSIDE-1070, override QUiLoader::createWidget() with parent=None crashes
+ loader = OverridingLoader()
+ w = loader.load(self._filePath)
+ self.assertNotEqual(w, None)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtWebChannel/CMakeLists.txt b/sources/pyside6/tests/QtWebChannel/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtWebChannel/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWebChannel/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtWebEngine/CMakeLists.txt b/sources/pyside6/tests/QtWebEngine/CMakeLists.txt
index 0e85a698e..0e85a698e 100644
--- a/sources/pyside2/tests/QtWebEngine/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWebEngine/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py b/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py
new file mode 100644
index 000000000..3f7f8de7e
--- /dev/null
+++ b/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer
+from PySide6.QtWebEngine import QtWebEngine
+from PySide6.QtWidgets import QApplication
+
+
+class MainTest(unittest.TestCase):
+ def test_initializePresent(self):
+ app = QApplication([])
+ QtWebEngine.initialize()
+ QTimer.singleShot(2000, app.quit)
+ app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt b/sources/pyside6/tests/QtWebEngineCore/CMakeLists.txt
index 06a9e9cdf..06a9e9cdf 100644
--- a/sources/pyside2/tests/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWebEngineCore/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py b/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py
new file mode 100644
index 000000000..e439364d0
--- /dev/null
+++ b/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py
@@ -0,0 +1,97 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QBuffer, Qt, QTimer
+from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout
+from PySide6.QtWebEngine import QtWebEngine
+from PySide6.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile
+from PySide6.QtWebEngineCore import (QWebEngineUrlScheme,
+ QWebEngineUrlSchemeHandler)
+
+class TestSchemeHandler(QWebEngineUrlSchemeHandler):
+ def requestStarted(self, request):
+ if request.requestUrl() == "testpy:hello":
+ request.redirect("testpy:goodbye")
+ return
+
+ self.buffer = QBuffer()
+ self.buffer.setData(bytes("Really nice goodbye text.", "UTF-8"))
+ self.buffer.aboutToClose.connect(self.buffer.deleteLater)
+ request.reply(bytes("text/plain;charset=utf-8", "UTF-8"), self.buffer)
+
+
+class MainTest(unittest.TestCase):
+ def test_SchemeHandlerRedirect(self):
+ self._loaded = False
+ QApplication.setAttribute(Qt.AA_ShareOpenGLContexts);
+ QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
+ QtWebEngine.initialize()
+ app = QApplication([])
+
+ scheme_name = bytes("testpy", "UTF-8")
+ scheme = QWebEngineUrlScheme(scheme_name)
+ scheme.setSyntax(QWebEngineUrlScheme.Syntax.Path)
+ QWebEngineUrlScheme.registerScheme(scheme)
+ handler = TestSchemeHandler()
+ profile = QWebEngineProfile.defaultProfile()
+ profile.installUrlSchemeHandler(scheme_name, handler)
+
+ top_level_widget = QWidget()
+ top_level_widget.setWindowTitle('web_engine_custom_scheme.py')
+ top_level_widget.resize(400, 400)
+ layout = QVBoxLayout(top_level_widget)
+ view = QWebEngineView()
+ layout.addWidget(view)
+
+ view.loadFinished.connect(self._slot_loaded)
+ QTimer.singleShot(5000, app.quit)
+
+ top_level_widget.show()
+ view.load("testpy:hello")
+ app.exec_()
+
+ self.assertTrue(self._loaded)
+ self.assertEqual(view.url(), "testpy:goodbye")
+
+ def _slot_loaded(self):
+ self._loaded = True
+ QApplication.quit()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside6/tests/QtWebEngineWidgets/CMakeLists.txt
index b4afb06d2..b4afb06d2 100644
--- a/sources/pyside2/tests/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWebEngineWidgets/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtWebEngineWidgets/fox.html b/sources/pyside6/tests/QtWebEngineWidgets/fox.html
index da873b1cc..da873b1cc 100644
--- a/sources/pyside2/tests/QtWebEngineWidgets/fox.html
+++ b/sources/pyside6/tests/QtWebEngineWidgets/fox.html
diff --git a/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py b/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
new file mode 100644
index 000000000..0d314c20b
--- /dev/null
+++ b/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
@@ -0,0 +1,86 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+from functools import partial
+import os
+import sys
+import unittest
+
+TEST_DIR = os.path.dirname(os.path.abspath(__file__))
+
+sys.path.append(os.path.dirname(TEST_DIR))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication, QSize, QUrl, Qt
+from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
+from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+
+
+class MainTest(unittest.TestCase):
+
+ def test_WebEngineView_findText_exists(self):
+ QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
+ app = QApplication.instance() or QApplication()
+ top_level = QWidget()
+ layout = QVBoxLayout(top_level)
+ self._view = QWebEngineView()
+ self._view.loadFinished.connect(self.loaded)
+ self._view.load(QUrl.fromLocalFile(os.path.join(TEST_DIR, "fox.html")))
+ self._view.setMinimumSize(QSize(400, 300))
+ self._callback_count = 0
+ layout.addWidget(self._view)
+ top_level.show()
+ app.exec_()
+
+ def found_callback(self, found):
+ self.assertTrue(found)
+ self._callback_count += 1
+ if self._callback_count == 2:
+ QCoreApplication.quit()
+
+ def javascript_callback(self, result):
+ self.assertEqual(result, "Title")
+ self._callback_count += 1
+ if self._callback_count == 2:
+ QCoreApplication.quit()
+
+ def loaded(self, ok):
+ self.assertTrue(ok)
+ if not ok:
+ QCoreApplication.quit()
+ self._view.page().runJavaScript("document.title", 1,
+ partial(self.javascript_callback))
+ self._view.findText("fox", QWebEnginePage.FindFlags(),
+ partial(self.found_callback))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWebSockets/CMakeLists.txt b/sources/pyside6/tests/QtWebSockets/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtWebSockets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWebSockets/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtWidgets/CMakeLists.txt b/sources/pyside6/tests/QtWidgets/CMakeLists.txt
index afa5eae0a..afa5eae0a 100644
--- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWidgets/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtWidgets/action_clear.py b/sources/pyside6/tests/QtWidgets/action_clear.py
new file mode 100644
index 000000000..b476b068a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/action_clear.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QMenu, QWidget, QMenuBar, QToolBar
+from helper.usesqapplication import UsesQApplication
+
+
+class TestQActionLifeCycle(UsesQApplication):
+ def actionDestroyed(self, act):
+ self._actionDestroyed = True
+
+ def testMenu(self):
+ self._actionDestroyed = False
+ w = QWidget()
+ menu = QMenu(w)
+ act = menu.addAction("MENU")
+ _ref = weakref.ref(act, self.actionDestroyed)
+ act = None
+ self.assertFalse(self._actionDestroyed)
+ menu.clear()
+ self.assertTrue(self._actionDestroyed)
+
+ def testMenuBar(self):
+ self._actionDestroyed = False
+ w = QWidget()
+ menuBar = QMenuBar(w)
+ act = menuBar.addAction("MENU")
+ _ref = weakref.ref(act, self.actionDestroyed)
+ act = None
+ self.assertFalse(self._actionDestroyed)
+ menuBar.clear()
+ self.assertTrue(self._actionDestroyed)
+
+ def testToolBar(self):
+ self._actionDestroyed = False
+ w = QWidget()
+ toolBar = QToolBar(w)
+ act = toolBar.addAction("MENU")
+ _ref = weakref.ref(act, self.actionDestroyed)
+ act = None
+ self.assertFalse(self._actionDestroyed)
+ toolBar.clear()
+ self.assertTrue(self._actionDestroyed)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/add_action_test.py b/sources/pyside6/tests/QtWidgets/add_action_test.py
new file mode 100644
index 000000000..a719b960a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/add_action_test.py
@@ -0,0 +1,78 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests for QMenuBar.addAction(identifier, callback) calls'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import SLOT
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QMenuBar, QPushButton
+
+from helper.usesqapplication import UsesQApplication
+
+
+class AddActionTest(UsesQApplication):
+ '''QMenuBar addAction'''
+
+ def tearDown(self):
+ try:
+ del self.called
+ except AttributeError:
+ pass
+ super(AddActionTest, self).tearDown()
+
+ def _callback(self):
+ self.called = True
+
+ def testBasic(self):
+ '''QMenuBar.addAction(id, callback)'''
+ menubar = QMenuBar()
+ action = menubar.addAction("Accounts", self._callback)
+ action.activate(QAction.Trigger)
+ self.assertTrue(self.called)
+
+ def testWithCppSlot(self):
+ '''QMenuBar.addAction(id, object, slot)'''
+ menubar = QMenuBar()
+ widget = QPushButton()
+ widget.setCheckable(True)
+ widget.setChecked(False)
+ action = menubar.addAction("Accounts", widget, SLOT("toggle()"))
+ action.activate(QAction.Trigger)
+ self.assertTrue(widget.isChecked())
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/api2_test.py b/sources/pyside6/tests/QtWidgets/api2_test.py
new file mode 100644
index 000000000..90450dca4
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/api2_test.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for PySide API2 support'''
+
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QIntValidator, QValidator
+from PySide6.QtWidgets import QWidget, QSpinBox, QApplication
+
+from helper.usesqapplication import UsesQApplication
+
+class WidgetValidatorQInt(QWidget, QIntValidator):
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+ QIntValidator.__init__(self, parent)
+
+class WidgetValidatorQSpinBox(QSpinBox):
+ def __init__(self, parent=None):
+ QSpinBox.__init__(self, parent)
+
+ def fixup(self, text):
+ print("It was called!")
+
+class DoubleQObjectInheritanceTest(UsesQApplication):
+
+ def testDouble(self):
+ '''Double inheritance from QObject classes'''
+
+ obj = WidgetValidatorQInt()
+
+ #QIntValidator methods
+ state, string, number = obj.validate('Test', 0)
+ self.assertEqual(state, QValidator.Invalid)
+ state, string, number = obj.validate('33', 0)
+ self.assertEqual(state, QValidator.Acceptable)
+
+ def testQSpinBox(self):
+ obj = WidgetValidatorQSpinBox()
+
+ obj.setRange(1, 10)
+ obj.setValue(0)
+ self.assertEqual(obj.value(), 1)
+
+class QClipboardTest(UsesQApplication):
+
+ def testQClipboard(self):
+ #skip this test on MacOS because the clipboard is not available during the ssh session
+ #this cause problems in the buildbot
+ if sys.platform == 'darwin':
+ return
+ clip = QApplication.clipboard()
+ clip.setText("Testing this thing!")
+
+ text, subtype = clip.text("")
+ self.assertEqual(subtype, "plain")
+ self.assertEqual(text, "Testing this thing!")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/application_test.py b/sources/pyside6/tests/QtWidgets/application_test.py
new file mode 100644
index 000000000..a76cbb9ae
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/application_test.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestObject
+from PySide6.QtWidgets import QApplication
+from PySide6 import __all__ as all
+
+class QApplicationInstance(unittest.TestCase):
+
+ def appDestroyed(self):
+ self.assertTrue(False)
+
+ def testInstanceObject(self):
+ self.assertEqual(type(qApp), type(None))
+ TestObject.createApp()
+ app1 = QApplication.instance()
+ app2 = QApplication.instance()
+ app1.setObjectName("MyApp")
+ self.assertEqual(app1, app2)
+ self.assertEqual(app2.objectName(), app1.objectName())
+ # We no longer support qApp when embedding
+ # if len(all) > 3:
+ # # an import triggers qApp initialization
+ # __import__("PySide6." + all[-1])
+ # self.assertEqual(app1, qApp)
+ app1.destroyed.connect(self.appDestroyed)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_1002.py b/sources/pyside6/tests/QtWidgets/bug_1002.py
new file mode 100644
index 000000000..b7549c7f7
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_1002.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QWidget, QPushButton
+
+from helper.usesqapplication import UsesQApplication
+
+class TestBug1002 (UsesQApplication):
+ def testReturnWindow(self):
+ widget = QWidget()
+ button = QPushButton(widget)
+ self.assertEqual(sys.getrefcount(widget), 2)
+ window = button.window()
+ self.assertEqual(sys.getrefcount(widget), 3)
+ self.assertEqual(sys.getrefcount(window), 3)
+
+ del widget
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_1006.py b/sources/pyside6/tests/QtWidgets/bug_1006.py
new file mode 100644
index 000000000..ac84c4a36
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_1006.py
@@ -0,0 +1,116 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import QDialog, QLabel, QGridLayout, QHBoxLayout, QWidget
+
+from helper.timedqapplication import TimedQApplication
+
+class LabelWindow(QDialog):
+ def __init__(self, parent):
+ super(LabelWindow, self).__init__(parent)
+
+ self.test_layout = QGridLayout()
+ label = QLabel("Label")
+ self.test_layout.addWidget(label, 0, 0)
+ self.setLayout(self.test_layout)
+ self._destroyCalled = False
+
+
+ def replace(self, unit):
+ old_item = self.test_layout.itemAtPosition(0, 0)
+ old_label = old_item.widget()
+ ref = weakref.ref(old_item, self._destroyed)
+
+ self.test_layout.removeWidget(old_label)
+ unit.assertRaises(RuntimeError, old_item.widget)
+ del old_item
+
+ label = QLabel("Label New")
+ old_label.deleteLater()
+ label.setAlignment(Qt.AlignCenter)
+ self.test_layout.addWidget(label, 0, 0)
+
+ def _destroyed(self, obj):
+ self._destroyCalled = True
+
+class TestBug1006 (TimedQApplication):
+
+ def testLayoutItemLifeTime(self):
+ window = LabelWindow(None)
+ window.replace(self)
+ self.assertTrue(window._destroyCalled)
+ self.app.exec_()
+
+ def testParentLayout(self):
+ def createLayout():
+ label = QLabel()
+ layout = QHBoxLayout()
+ layout.addWidget(label)
+
+ widget = QWidget()
+ widget.setLayout(layout)
+ return (layout, widget)
+ (layout, widget) = createLayout()
+ item = layout.itemAt(0)
+ self.assertTrue(isinstance(item.widget(), QWidget))
+
+ def testRemoveOrphanWidget(self):
+ widget = QLabel()
+ layout = QHBoxLayout()
+ layout.addWidget(widget)
+ self.assertEqual(sys.getrefcount(widget), 3)
+
+ layout.removeWidget(widget)
+ widget.setObjectName("MyWidget")
+ self.assertEqual(sys.getrefcount(widget), 2)
+
+ def testRemoveChildWidget(self):
+ parent = QLabel()
+ widget = QLabel(parent)
+ self.assertEqual(sys.getrefcount(widget), 3)
+
+ layout = QHBoxLayout()
+ layout.addWidget(widget)
+ self.assertEqual(sys.getrefcount(widget), 3)
+
+ layout.removeWidget(widget)
+ widget.setObjectName("MyWidget")
+ self.assertEqual(sys.getrefcount(widget), 3)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_1048.py b/sources/pyside6/tests/QtWidgets/bug_1048.py
new file mode 100644
index 000000000..05d956a1d
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_1048.py
@@ -0,0 +1,44 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtWidgets
+
+a = QtWidgets.QApplication([])
+
+w = QtWidgets.QWidget()
+l = QtWidgets.QGridLayout(w)
+
+l.itemAtPosition(0, 0)
diff --git a/sources/pyside6/tests/QtWidgets/bug_1077.py b/sources/pyside6/tests/QtWidgets/bug_1077.py
new file mode 100644
index 000000000..4dc9628a3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_1077.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' unit test for BUG #1077 '''
+
+import os
+import sys
+import time
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtCore, QtGui, QtWidgets
+
+
+class Highlighter(QtGui.QSyntaxHighlighter):
+ def __init__(self, parent, mode):
+ QtGui.QSyntaxHighlighter.__init__(self, parent)
+ self.tstamp = time.time()
+
+if __name__ == "__main__":
+ app = QtWidgets.QApplication([])
+ python = QtWidgets.QTextEdit()
+ python.setWindowTitle("python")
+ hl = Highlighter(python.document(), "python")
+ python.show()
+ text = hl.document()
diff --git a/sources/pyside6/tests/QtWidgets/bug_172.py b/sources/pyside6/tests/QtWidgets/bug_172.py
new file mode 100644
index 000000000..6b943061f
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_172.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtWidgets import *
+
+if __name__ == '__main__':
+ app = QApplication([])
+
+ wdg = QWidget()
+
+ hbox = QHBoxLayout()
+
+ vbox = QVBoxLayout()
+ vbox.addLayout(hbox)
+
+ wdg.setLayout(vbox)
diff --git a/sources/pyside6/tests/QtWidgets/bug_243.py b/sources/pyside6/tests/QtWidgets/bug_243.py
new file mode 100644
index 000000000..4f4526691
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_243.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 243: http://bugs.openbossa.org/show_bug.cgi?id=243'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication, QMainWindow, QLayout
+
+class QAppPresence(unittest.TestCase):
+
+ def testBug(self):
+ app = QApplication(sys.argv)
+ window = QMainWindow()
+ l = window.layout()
+ self.assertTrue(isinstance(l, QLayout))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_307.py b/sources/pyside6/tests/QtWidgets/bug_307.py
new file mode 100644
index 000000000..914227de5
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_307.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import colorsys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import SIGNAL
+from PySide6.QtWidgets import QPushButton, QApplication
+
+
+class Test (QApplication) :
+ def __init__(self, argv) :
+ super(Test, self).__init__(argv)
+ self._called = False
+
+ def called(self):
+ self._called = True
+
+
+class QApplicationSignalsTest(unittest.TestCase):
+ def testQuit(self):
+ app = Test([])
+ button = QPushButton("BUTTON")
+ app.connect(button, SIGNAL("clicked()"), app.called)
+ button.click()
+ self.assertTrue(app._called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_324.py b/sources/pyside6/tests/QtWidgets/bug_324.py
new file mode 100644
index 000000000..16130f895
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_324.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 324: http://bugs.openbossa.org/show_bug.cgi?id=324'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class QBug( QObject ):
+ def __init__(self, parent = None):
+ QObject.__init__(self, parent)
+
+ def check(self):
+ self.done.emit("abc")
+
+ done = Signal(str)
+
+class Bug324(unittest.TestCase):
+
+ def on_done(self, val):
+ self.value = val
+
+ def testBug(self):
+ app = QApplication([])
+ bug = QBug()
+ self.value = ''
+ bug.done.connect(self.on_done)
+ bug.check()
+ self.assertEqual(self.value, 'abc')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_338.py b/sources/pyside6/tests/QtWidgets/bug_338.py
new file mode 100644
index 000000000..f46508cbe
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_338.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 338: http://bugs.openbossa.org/show_bug.cgi?id=338'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+class DiagramItem(QtWidgets.QGraphicsPolygonItem):
+ def __init__(self, parent=None, scene=None):
+ super(DiagramItem, self).__init__(parent, scene)
+
+ def itemChange(self, change, value):
+ return value
+
+
+class BugTest(unittest.TestCase):
+ def test(self):
+ app = QtWidgets.QApplication(sys.argv)
+ scene = QtWidgets.QGraphicsScene()
+ item = DiagramItem()
+ item2 = DiagramItem()
+ #this cause segfault
+ scene.addItem(item)
+ scene.addItem(item2)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_389.py b/sources/pyside6/tests/QtWidgets/bug_389.py
new file mode 100644
index 000000000..87758ee4e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_389.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 389: http://bugs.openbossa.org/show_bug.cgi?id=389'''
+
+import sys
+import os
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6 import QtCore, QtGui, QtWidgets
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ s = QtWidgets.QWidget().style()
+ i = s.standardIcon(QtWidgets.QStyle.SP_TitleBarMinButton)
+ self.assertEqual(type(i), QtGui.QIcon)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_400.py b/sources/pyside6/tests/QtWidgets/bug_400.py
new file mode 100644
index 000000000..96beaec5b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_400.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 400: http://bugs.openbossa.org/show_bug.cgi?id=400'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtWidgets import QTreeWidgetItemIterator, QTreeWidgetItem, QTreeWidget
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ treeWidget = QTreeWidget()
+ treeWidget.setColumnCount(1)
+ items = []
+ for i in range(10):
+ items.append(QTreeWidgetItem(None, ["item: %i" % i]))
+
+ treeWidget.insertTopLevelItems(0, items);
+ _iter = QTreeWidgetItemIterator(treeWidget)
+ index = 0
+ while(_iter.value()):
+ item = _iter.value()
+ self.assertTrue(item is items[index])
+ index += 1
+ _iter += 1
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_429.py b/sources/pyside6/tests/QtWidgets/bug_429.py
new file mode 100644
index 000000000..fe81266a1
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_429.py
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+
+app = QApplication(sys.argv)
+scene = QGraphicsScene()
+label = QLabel("hello world")
+label.show()
+QTimer.singleShot(0, label.close)
+exit(app.exec_())
diff --git a/sources/pyside6/tests/QtWidgets/bug_430.py b/sources/pyside6/tests/QtWidgets/bug_430.py
new file mode 100644
index 000000000..fc96d6ab3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_430.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class ListModel(QAbstractListModel):
+ def rowCount(self, parent = QModelIndex()):
+ return 0
+
+app = QApplication([])
+model = ListModel()
+v = QListView()
+v.setModel(model)
+QTimer.singleShot(0, v.close)
+app.exec_()
diff --git a/sources/pyside6/tests/QtWidgets/bug_433.py b/sources/pyside6/tests/QtWidgets/bug_433.py
new file mode 100644
index 000000000..53ec18582
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_433.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtCore, QtWidgets
+
+class Test(QtWidgets.QGraphicsView):
+ def __init__(self, parent=None):
+ super(Test, self).__init__(parent)
+ self.s = QtWidgets.QGraphicsScene()
+ self.setScene(self.s)
+
+a = QtWidgets.QApplication(sys.argv)
+t = Test()
+t.show()
+QtCore.QTimer.singleShot(0, t.close)
+sys.exit(a.exec_())
diff --git a/sources/pyside6/tests/QtWidgets/bug_467.py b/sources/pyside6/tests/QtWidgets/bug_467.py
new file mode 100644
index 000000000..ce178bfef
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_467.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 367: http://bugs.openbossa.org/show_bug.cgi?id=467'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtWidgets import QMainWindow, QApplication
+
+class MyWidget(QMainWindow):
+ def __init__(self, parent = None):
+ QMainWindow.__init__(self, parent)
+
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ w = MyWidget()
+ widgets = QApplication.allWidgets()
+ self.assertTrue(w in widgets)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_493.py b/sources/pyside6/tests/QtWidgets/bug_493.py
new file mode 100644
index 000000000..559d71f60
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_493.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QEvent
+from PySide6.QtGui import QKeyEvent, QKeySequence
+from PySide6.QtWidgets import QApplication
+
+
+class TestBug493(unittest.TestCase):
+
+ def testIt(self):
+ # We need a qapp otherwise Qt will crash when trying to detect the
+ # current platform
+ app = QApplication([])
+ ev1 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Delete, Qt.NoModifier)
+ ev2 = QKeyEvent(QEvent.KeyRelease, Qt.Key_Copy, Qt.NoModifier)
+ ks = QKeySequence.Delete
+
+ self.assertTrue(ev1.matches(ks))
+ self.assertFalse(ev2.matches(ks))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_512.py b/sources/pyside6/tests/QtWidgets/bug_512.py
new file mode 100644
index 000000000..3474aa32b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_512.py
@@ -0,0 +1,57 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 512: http://bugs.openbossa.org/show_bug.cgi?id=512'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ w = QWidget(None)
+ lbl = QLabel("Hello", w);
+ g = QGridLayout()
+ g.addWidget(lbl, 0, 0)
+ w.setLayout(g)
+ w.show()
+
+ t = g.getItemPosition(0)
+ self.assertEqual(type(t), tuple)
+ self.assertEqual(t, (0,0,1,1))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_525.py b/sources/pyside6/tests/QtWidgets/bug_525.py
new file mode 100644
index 000000000..c3863207c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_525.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication
+from PySide6.QtWidgets import QMenu
+
+class M2(QMenu):
+ def __init__(self,parent=None):
+ super(M2,self).__init__(parent)
+ self.setTitle(self.tr("M2"))
+
+class TestMenuDerivedClass(unittest.TestCase):
+ def aboutToShowHandler(self):
+ pass
+
+ def testConnectSignal(self):
+ app = QApplication([])
+ m2 = M2()
+ # Test if the aboutToShow signal was translated to correct type
+ m2.aboutToShow.connect(self.aboutToShowHandler)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_546.py b/sources/pyside6/tests/QtWidgets/bug_546.py
new file mode 100644
index 000000000..91c8d4637
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_546.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+class TestBug546(unittest.TestCase):
+
+ """Test to check a crash at exit"""
+ def testIt(self):
+ app = QApplication([])
+ textEdit = QPlainTextEdit()
+ completer = QCompleter(("foo", "bar"), textEdit)
+ completer.setWidget(textEdit)
+
+if __name__=='__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_547.py b/sources/pyside6/tests/QtWidgets/bug_547.py
new file mode 100644
index 000000000..d232aba8e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_547.py
@@ -0,0 +1,91 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+""" Unittest for bug #547 """
+""" http://bugs.openbossa.org/show_bug.cgi?id=547 """
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+
+class MyMainWindow(unittest.TestCase):
+ app = QtWidgets.QApplication(sys.argv)
+ def testCase1(self):
+ self._tree = QtWidgets.QTreeWidget()
+ self._tree.setColumnCount(2)
+ self._i1 = None
+ self._i11 = None
+
+ self._updateTree()
+ self.assertEqual(sys.getrefcount(self._i1), 3)
+ self.assertEqual(sys.getrefcount(self._i11), 3)
+
+ self._i11.parent().setExpanded(True)
+ self._i11.setExpanded(True)
+
+ self._updateTree()
+ self.assertEqual(sys.getrefcount(self._i1), 3)
+ self.assertEqual(sys.getrefcount(self._i11), 3)
+
+ def testCase2(self):
+ self._tree = QtWidgets.QTreeWidget()
+ self._tree.setColumnCount(2)
+ self._i1 = None
+ self._i11 = None
+
+ self._updateTree()
+ self.assertEqual(sys.getrefcount(self._i1), 3)
+ self.assertEqual(sys.getrefcount(self._i11), 3)
+
+ self._i11.parent().setExpanded(True)
+ self._i11.setExpanded(True)
+
+ self.assertEqual(sys.getrefcount(self._i1), 3)
+ self.assertEqual(sys.getrefcount(self._i11), 3)
+
+ def _updateTree(self):
+ self._tree.clear()
+ if self._i1 and self._i11:
+ self.assertEqual(sys.getrefcount(self._i1), 2)
+ self.assertEqual(sys.getrefcount(self._i11), 2)
+
+ self._i1 = QtWidgets.QTreeWidgetItem(self._tree, ['1', ])
+ self.assertEqual(sys.getrefcount(self._i1), 3)
+ self._i11 = QtWidgets.QTreeWidgetItem(self._i1, ['11', ])
+ self.assertEqual(sys.getrefcount(self._i11), 3)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_549.py b/sources/pyside6/tests/QtWidgets/bug_549.py
new file mode 100644
index 000000000..a000c8df4
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_549.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+class TestBug549(unittest.TestCase):
+ def testBug(self):
+ app = QApplication([])
+ w = QGraphicsWidget()
+ w.setContentsMargins(1, 2, 3, 4)
+ self.assertEqual(w.getContentsMargins(), (1, 2, 3, 4))
+ w.setWindowFrameMargins(5, 6, 7, 8)
+ self.assertEqual(w.getWindowFrameMargins(), (5, 6, 7, 8))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_569.py b/sources/pyside6/tests/QtWidgets/bug_569.py
new file mode 100644
index 000000000..3e53ccca3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_569.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+
+class TestBug569(unittest.TestCase):
+
+ def testIt(self):
+ types = (QTableWidgetItem, QListWidgetItem, QTreeWidgetItem)
+ for t in types:
+ a = t()
+ a.__lt__ = lambda other : True
+ b = t()
+ b.__lt__ = lambda other : False
+ self.assertTrue(a < b)
+ self.assertFalse(b < a)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_575.py b/sources/pyside6/tests/QtWidgets/bug_575.py
new file mode 100644
index 000000000..a6f0c006a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_575.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+""" Unittest for bug #575 """
+""" http://bugs.openbossa.org/show_bug.cgi?id=575 """
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication, QPlainTextEdit, QTextEdit
+
+
+class Bug575(unittest.TestCase):
+ def testPropertyValues(self):
+ app = QApplication(sys.argv)
+ textEdit = QPlainTextEdit()
+ textEdit.insertPlainText("PySide INdT")
+ selection = QTextEdit.ExtraSelection()
+ selection.cursor = textEdit.textCursor()
+ selection.cursor.setPosition(2)
+ self.assertEqual(selection.cursor.position(), 2)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_576.py b/sources/pyside6/tests/QtWidgets/bug_576.py
new file mode 100644
index 000000000..9bd36e5f8
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_576.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+""" Unittest for bug #576 """
+""" http://bugs.openbossa.org/show_bug.cgi?id=576 """
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+class Bug576(unittest.TestCase):
+ def onButtonDestroyed(self, button):
+ self._destroyed = True
+ self.assertTrue(isinstance(button, QtWidgets.QPushButton))
+
+ def testWidgetParent(self):
+ self._destroyed = False
+ app = QtWidgets.QApplication(sys.argv)
+ w = QtWidgets.QWidget()
+
+ b = QtWidgets.QPushButton("test")
+ b.destroyed[QtCore.QObject].connect(self.onButtonDestroyed)
+ self.assertEqual(sys.getrefcount(b), 2)
+ b.setParent(w)
+ self.assertEqual(sys.getrefcount(b), 3)
+ b.parent()
+ self.assertEqual(sys.getrefcount(b), 3)
+ b.setParent(None)
+ self.assertEqual(sys.getrefcount(b), 2)
+ del b
+ self.assertTrue(self._destroyed)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_585.py b/sources/pyside6/tests/QtWidgets/bug_585.py
new file mode 100644
index 000000000..9b489fd29
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_585.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test bug 585: http://bugs.openbossa.org/show_bug.cgi?id=585'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+class Bug585(unittest.TestCase):
+ def testCase(self):
+ app = QtWidgets.QApplication([])
+ self._tree = QtWidgets.QTreeWidget()
+ self._tree.setColumnCount(2)
+ i1 = QtWidgets.QTreeWidgetItem(self._tree, ['1', ])
+ i2 = QtWidgets.QTreeWidgetItem(self._tree, ['2', ])
+ refCount = sys.getrefcount(i1)
+
+ # this function return None
+ # because the topLevelItem does not has a parent item
+ # but still have a TreeWidget as a parent
+ self._tree.topLevelItem(0).parent()
+
+ self.assertEqual(refCount, sys.getrefcount(i1))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_589.py b/sources/pyside6/tests/QtWidgets/bug_589.py
new file mode 100644
index 000000000..4a535d388
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_589.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# trimmed down diagramscene.py to demonstrate crash in sizeHint()
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+
+class CustomWidget(QtWidgets.QGraphicsProxyWidget):
+ def itemChange(self, eventType, value):
+ QtWidgets.QGraphicsProxyWidget.itemChange(self, eventType, value)
+
+class Bug589(unittest.TestCase):
+ def testCase(self):
+ widget = QtWidgets.QGraphicsProxyWidget()
+ custom = CustomWidget()
+ custom.setParentItem(widget)
+
+if __name__ == "__main__":
+ app = QtWidgets.QApplication(sys.argv)
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_635.py b/sources/pyside6/tests/QtWidgets/bug_635.py
new file mode 100644
index 000000000..d410d4e28
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_635.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 635: http://bugs.openbossa.org/show_bug.cgi?id=635'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import QApplication, QToolBar
+
+
+class testQToolBar(unittest.TestCase):
+ def callback(self):
+ self._called = True
+
+ def testAddAction(self):
+ bar = QToolBar()
+ self._called = False
+ a = bar.addAction("act1", self.callback)
+ a.trigger()
+ self.assertTrue(self._called)
+
+ def testAddActionWithIcon(self):
+ bar = QToolBar()
+ self._called = False
+ icon = QIcon()
+ a = bar.addAction(icon, "act1", self.callback)
+ a.trigger()
+ self.assertTrue(self._called)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_640.py b/sources/pyside6/tests/QtWidgets/bug_640.py
new file mode 100644
index 000000000..00ba7fc69
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_640.py
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+
+class Bug640(unittest.TestCase):
+ def testIt(self):
+ option = QStyleOptionGraphicsItem()
+ a = option.state # crash!?
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_653.py b/sources/pyside6/tests/QtWidgets/bug_653.py
new file mode 100644
index 000000000..4f7dcf85c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_653.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class TestBug653(unittest.TestCase):
+ """Crash after calling QWizardPage.wizard()"""
+ def testIt(self):
+ app = QApplication([])
+
+ wizard = QWizard()
+ page = QWizardPage()
+ wizard.addPage(page)
+ page.wizard() # crash here if the bug still exists due to a circular dependency
+ wizard.show()
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_662.py b/sources/pyside6/tests/QtWidgets/bug_662.py
new file mode 100644
index 000000000..19070f584
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_662.py
@@ -0,0 +1,63 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 662: http://bugs.openbossa.org/show_bug.cgi?id=662'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+from PySide6.QtGui import QTextCharFormat
+from PySide6.QtWidgets import QTextEdit, QApplication
+import sys
+
+class testQTextBlock(unittest.TestCase):
+ def tesIterator(self):
+ edit = QTextEdit()
+ cursor = edit.textCursor()
+ fmt = QTextCharFormat()
+ frags = []
+ for i in range(10):
+ fmt.setFontPointSize(i+10)
+ frags.append("block%d"%i)
+ cursor.insertText(frags[i], fmt)
+
+ doc = edit.document()
+ block = doc.begin()
+
+ index = 0
+ for i in block:
+ self.assertEqual(i.fragment().text(), frags[index])
+ index += 1
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_667.py b/sources/pyside6/tests/QtWidgets/bug_667.py
new file mode 100644
index 000000000..8a94fd173
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_667.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import QTimer, QPointF
+from PySide6.QtWidgets import QApplication, QGraphicsView, QGraphicsScene, QGraphicsEllipseItem
+
+class Ball(QGraphicsEllipseItem):
+ def __init__(self, d, parent=None):
+ super(Ball, self).__init__(0, 0, d, d, parent)
+ self.vel = QPointF(0,0) #commenting this out prevents the crash
+
+class Foo(QGraphicsView):
+ def __init__(self):
+ super(Foo, self).__init__(None)
+ self.scene = QGraphicsScene(self.rect())
+ self.setScene(self.scene)
+ self.scene.addItem(Ball(10))
+
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+ w = Foo()
+ w.show()
+ w.raise_()
+ QTimer.singleShot(0, w.close)
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/tests/QtWidgets/bug_668.py b/sources/pyside6/tests/QtWidgets/bug_668.py
new file mode 100644
index 000000000..cd5b95e0a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_668.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+
+class A(QMainWindow):
+ def __init__(self, parent=None):
+ super(A, self).__init__(parent)
+ a = QFileSystemModel(self)
+ a.setRootPath(QDir.homePath())
+
+ v = QTreeView(self)
+ v.setModel(a)
+ self.setCentralWidget(v)
+ # Test index() method (see PYSIDE-570, PYSIDE-331)
+ index = a.index(0, 0, QModelIndex())
+
+app = QApplication([])
+m = A()
+m.show()
+QTimer.singleShot(0, m.close)
+app.exec_()
diff --git a/sources/pyside6/tests/QtWidgets/bug_674.py b/sources/pyside6/tests/QtWidgets/bug_674.py
new file mode 100644
index 000000000..d9aed3b6c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_674.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+
+class TestBug679(unittest.TestCase):
+ '''QGraphicsScene::clear() is missing'''
+ def testIt(self):
+ app = QApplication([])
+
+ scene = QGraphicsScene()
+ hello = scene.addText("Hello")
+ scene.addText("World")
+
+ self.assertEqual(sys.getrefcount(hello), 3)
+ scene.clear()
+ self.assertEqual(sys.getrefcount(hello), 2)
+ self.assertEqual(len(scene.items()), 0)
+ self.assertRaises(RuntimeError, hello.isVisible) # the C++ object was deleted
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_675.py b/sources/pyside6/tests/QtWidgets/bug_675.py
new file mode 100644
index 000000000..b5b3af617
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_675.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+app = QApplication([])
+
+scene = QGraphicsScene()
+
+# don't segfault due to lack of keepReferenceCall
+textEdit = scene.addWidget(QTextEdit())
+
+layout = QGraphicsLinearLayout()
+layout.addItem(textEdit)
+
+view = QGraphicsView(scene)
+view.show()
diff --git a/sources/pyside6/tests/QtWidgets/bug_688.py b/sources/pyside6/tests/QtWidgets/bug_688.py
new file mode 100644
index 000000000..21dbcabb2
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_688.py
@@ -0,0 +1,123 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test bug 688: http://bugs.openbossa.org/show_bug.cgi?id=688'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QTextFrame, QTextCursor, QTextCharFormat, QFont, QTextFrameFormat
+from PySide6.QtWidgets import QTextEdit
+
+class BugTest(UsesQApplication):
+ def testCase(self):
+ editor = QTextEdit()
+ cursor = QTextCursor(editor.textCursor())
+ cursor.movePosition(QTextCursor.Start)
+
+ mainFrame = cursor.currentFrame()
+
+ plainCharFormat = QTextCharFormat()
+ boldCharFormat = QTextCharFormat()
+ boldCharFormat.setFontWeight(QFont.Bold);
+ cursor.insertText("""
+ Text documents are represented by the
+ QTextDocument class, rather than by QString objects.
+ Each QTextDocument object contains information about
+ the document's internal representation, its structure,
+ and keeps track of modifications to provide undo/redo
+ facilities. This approach allows features such as the
+ layout management to be delegated to specialized
+ classes, but also provides a focus for the framework.""",
+ plainCharFormat)
+
+ frameFormat = QTextFrameFormat()
+ frameFormat.setMargin(32)
+ frameFormat.setPadding(8)
+ frameFormat.setBorder(4)
+ cursor.insertFrame(frameFormat)
+
+ cursor.insertText("""
+ Documents are either converted from external sources
+ or created from scratch using Qt. The creation process
+ can done by an editor widget, such as QTextEdit, or by
+ explicit calls to the Scribe API.""",
+ boldCharFormat)
+
+ cursor = mainFrame.lastCursorPosition()
+ cursor.insertText("""
+ There are two complementary ways to visualize the
+ contents of a document: as a linear buffer that is
+ used by editors to modify the contents, and as an
+ object hierarchy containing structural information
+ that is useful to layout engines. In the hierarchical
+ model, the objects generally correspond to visual
+ elements such as frames, tables, and lists. At a lower
+ level, these elements describe properties such as the
+ style of text used and its alignment. The linear
+ representation of the document is used for editing and
+ manipulation of the document's contents.""",
+ plainCharFormat)
+
+
+ frame = cursor.currentFrame()
+
+ items = []
+
+ #test iterator
+ for i in frame:
+ items.append(i)
+
+ #test __iadd__
+ b = frame.begin()
+ i = 0
+ while not b.atEnd():
+ self.assertEqual(b, items[i])
+ self.assertTrue(b.parentFrame(), items[i].parentFrame())
+ b.__iadd__(1)
+ i += 1
+
+ #test __isub__
+ b = frame.end()
+ i = 0
+ while i > 0:
+ self.assertEqual(b, items[i])
+ self.assertTrue(b.parentFrame(), items[i].parentFrame())
+ b.__isub__(1)
+ i -= 1
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_693.py b/sources/pyside6/tests/QtWidgets/bug_693.py
new file mode 100644
index 000000000..6d2b89be3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_693.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+
+class MyModel (QAbstractListModel):
+
+ stupidLine = QLine(0, 0, 10, 10)
+
+ def rowCount(self, parent):
+ return 1
+
+ def data(self, index, role):
+ return self.stupidLine
+
+class TestBug693(unittest.TestCase):
+ def testIt(self):
+ app = QApplication([])
+ model = MyModel()
+ view = QListView()
+ view.setModel(model)
+ view.show()
+
+ # This must NOT throw the exception:
+ # RuntimeError: Internal C++ object (PySide6.QtCore.QLine) already deleted.
+ MyModel.stupidLine.isNull()
+
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_696.py b/sources/pyside6/tests/QtWidgets/bug_696.py
new file mode 100644
index 000000000..11bab1e3c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_696.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtWidgets import QMainWindow, QMenu, QApplication
+
+class MainWindow(QMainWindow):
+ def __init__(self, *args):
+ self._menu = QMenu(self.dontexist) # attribute called with invalid C++ object
+
+class MainWindow2(QMainWindow):
+ def __init__(self):
+ self.show()
+
+class Bug696(UsesQApplication):
+ def testContructorInitialization(self):
+ self.assertRaises(AttributeError, MainWindow)
+
+ def testContructorInitializationAndCPPFunction(self):
+ self.assertRaises(RuntimeError, MainWindow2)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_711.py b/sources/pyside6/tests/QtWidgets/bug_711.py
new file mode 100644
index 000000000..bf6516a0a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_711.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QToolBar, QApplication, QToolButton
+
+try:
+ xrange
+except NameError:
+ xrange = range # py3k
+
+class TestLabelPixmap(unittest.TestCase):
+ def testReference(self):
+ toolbar = QToolBar()
+
+ for i in xrange(20):
+ toolbar.addAction(QAction("Action %d" % i, None))
+
+ buttons = toolbar.findChildren(QToolButton, "")
+ toolbar.clear()
+
+ for b in buttons:
+ self.assertRaises(RuntimeError, b.objectName)
+
+if __name__ == '__main__':
+ app = QApplication([])
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_722.py b/sources/pyside6/tests/QtWidgets/bug_722.py
new file mode 100644
index 000000000..c833533ff
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_722.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtWidgets import QDoubleSpinBox, QGraphicsBlurEffect
+
+class TestSignalConnection(UsesQApplication):
+ def testFloatSignal(self):
+ foo1 = QDoubleSpinBox()
+ foo2 = QDoubleSpinBox()
+ foo1.valueChanged[float].connect(foo2.setValue)
+ foo2.valueChanged[float].connect(foo1.setValue)
+ foo1.setValue(0.42)
+ self.assertEqual(foo1.value(), foo2.value())
+
+ def testQRealSignal(self):
+ foo1 = QDoubleSpinBox()
+ effect = QGraphicsBlurEffect()
+ effect.blurRadiusChanged['qreal'].connect(foo1.setValue) # check if qreal is a valid type
+ effect.setBlurRadius(0.42)
+ self.assertAlmostEqual(foo1.value(), effect.blurRadius())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_728.py b/sources/pyside6/tests/QtWidgets/bug_728.py
new file mode 100644
index 000000000..694e21ded
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_728.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
+
+# Periodically check for the file dialog to appear and close it
+dialog = None
+def timerHandler():
+ global dialog
+ if dialog is not None:
+ dialog.reject()
+ else:
+ for widget in QApplication.topLevelWidgets():
+ if isinstance(widget, QDialog) and widget.isVisible():
+ dialog = widget
+
+app = QApplication([])
+QTimer.singleShot(30000, app.quit) # emergency
+timer = QTimer()
+timer.setInterval(50)
+timer.timeout.connect(timerHandler)
+timer.start()
+
+# This test for a dead lock in QFileDialog.getOpenFileNames, the test fail with a timeout if the dead lock exists.
+QFileDialog.getOpenFileNames(None, "caption", QDir.homePath(), None, "", QFileDialog.DontUseNativeDialog)
diff --git a/sources/pyside6/tests/QtWidgets/bug_736.py b/sources/pyside6/tests/QtWidgets/bug_736.py
new file mode 100644
index 000000000..439dd69f4
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_736.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class TestBug736 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+ slider = QSlider(Qt.Horizontal)
+ slider2 = QSlider(Qt.Horizontal)
+
+ slider2.setMaximum(10)
+ slider.valueChanged[int].connect(slider2.setMaximum)
+ slider.valueChanged[int].emit(100)
+ self.assertEqual(slider2.maximum(), 100)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_750.py b/sources/pyside6/tests/QtWidgets/bug_750.py
new file mode 100644
index 000000000..4c63d77f1
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_750.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import QTimer
+from PySide6.QtGui import QPainter, QFont, QFontInfo
+from PySide6.QtWidgets import QWidget
+
+class MyWidget(QWidget):
+ def paintEvent(self, e):
+ p = QPainter(self)
+ self._info = p.fontInfo()
+ self._app.quit()
+
+
+class TestQPainter(UsesQApplication):
+ def testFontInfo(self):
+ w = MyWidget()
+ w._app = self.app
+ w._info = None
+ QTimer.singleShot(300, w.show)
+ self.app.exec_()
+ self.assertTrue(w._info)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_778.py b/sources/pyside6/tests/QtWidgets/bug_778.py
new file mode 100644
index 000000000..9816c4c35
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_778.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtWidgets import QTreeWidget, QTreeWidgetItem, QTreeWidgetItemIterator
+
+class QTreeWidgetItemIteratorTest(UsesQApplication):
+ def testWidgetIterator(self):
+ treeWidget = QTreeWidget()
+ treeWidget.setColumnCount(1)
+ items = []
+ for i in range(10):
+ items.append(QTreeWidgetItem(None, ['item: %d' % i]))
+ treeWidget.insertTopLevelItems(0, items)
+
+ index = 0
+ for it in QTreeWidgetItemIterator(treeWidget):
+ self.assertEqual(it.value().text(0), 'item: %d' % index)
+ index += 1
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_785.py b/sources/pyside6/tests/QtWidgets/bug_785.py
new file mode 100644
index 000000000..36cac24cd
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_785.py
@@ -0,0 +1,63 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QItemSelection
+from PySide6.QtGui import QStandardItemModel, QStandardItem
+from PySide6.QtWidgets import QApplication
+class Bug324(unittest.TestCase):
+ def testOperators(self):
+ model = QStandardItemModel()
+ for i in range(100):
+ model.appendRow(QStandardItem("Item: %d"%i))
+
+ first = model.index(0, 0)
+ second = model.index(10, 0)
+ third = model.index(20, 0)
+ fourth = model.index(30, 0)
+
+ sel = QItemSelection(first, second)
+ sel2 = QItemSelection()
+ sel2.select(third, fourth)
+
+ sel3 = sel + sel2 #check operator +
+ self.assertEqual(len(sel3), 2)
+ sel4 = sel
+ sel4 += sel2 #check operator +=
+ self.assertEqual(len(sel4), 2)
+ self.assertEqual(sel4, sel3)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_793.py b/sources/pyside6/tests/QtWidgets/bug_793.py
new file mode 100644
index 000000000..d1080d93f
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_793.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer
+from PySide6.QtWidgets import QWidget, QApplication
+
+class TestW1(QWidget):
+ def __init__(self, parent = None):
+ super(TestW1, self).__init__(parent)
+ TestW2(parent, self)
+
+class TestW2(QWidget):
+ def __init__(self, ancestor, parent = None):
+ super(TestW2, self).__init__(parent)
+ self.ancestor_ref = ancestor
+
+class Test(QWidget):
+ def __init__(self):
+ super(Test, self).__init__()
+ TestW1(self)
+
+class TestQApplicationDestrcutor(unittest.TestCase):
+ def testDestructor(self):
+ w = Test()
+ w.show()
+ QTimer.singleShot(0, w.close)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ unittest.main()
+ sys.exit(app.exec_())
diff --git a/sources/pyside6/tests/QtWidgets/bug_811.py b/sources/pyside6/tests/QtWidgets/bug_811.py
new file mode 100644
index 000000000..671c3bcbb
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_811.py
@@ -0,0 +1,66 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtGui import QTextBlockUserData, QTextCursor
+from PySide6.QtWidgets import QTextEdit
+
+class TestUserData(QTextBlockUserData):
+ def __init__(self, data):
+ super(TestUserData, self).__init__()
+ self.data = data
+
+class TestUserDataRefCount(UsesQApplication):
+ def testRefcount(self):
+ textedit = QTextEdit()
+ textedit.setReadOnly(True)
+ doc = textedit.document()
+ cursor = QTextCursor(doc)
+ cursor.insertText("PySide Rocks")
+ ud = TestUserData({"Life": 42})
+ self.assertEqual(sys.getrefcount(ud), 2)
+ cursor.block().setUserData(ud)
+ self.assertEqual(sys.getrefcount(ud), 3)
+ ud2 = cursor.block().userData()
+ self.assertEqual(sys.getrefcount(ud), 4)
+ self.udata = weakref.ref(ud, None)
+ del ud, ud2
+ self.assertEqual(sys.getrefcount(self.udata()), 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_834.py b/sources/pyside6/tests/QtWidgets/bug_834.py
new file mode 100644
index 000000000..2cac4b496
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_834.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6 import QtCore, QtWidgets
+
+class Window(QtWidgets.QMainWindow):
+ def childEvent(self, event):
+ super(Window, self).childEvent(event)
+
+app = QtWidgets.QApplication([])
+window = Window()
+
+dock1 = QtWidgets.QDockWidget()
+dock2 = QtWidgets.QDockWidget()
+window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock1)
+window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, dock2)
+window.tabifyDockWidget(dock1, dock2)
+
+window.show()
+QtCore.QTimer.singleShot(0, window.close)
+app.exec_()
diff --git a/sources/pyside6/tests/QtWidgets/bug_836.py b/sources/pyside6/tests/QtWidgets/bug_836.py
new file mode 100644
index 000000000..6106cd838
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_836.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class Mixin1(object):
+ pass
+
+class Mixin2(object):
+ pass
+
+class Mixin3(object):
+ pass
+
+class MainWindow(Mixin1, Mixin2, Mixin3, QFrame):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+def main():
+ app = QApplication([])
+ # if it doesn't crash it should pass
+ w = MainWindow()
+ w.show()
+ QTimer.singleShot(0, w.close)
+ app.exec_()
+
+if __name__ == "__main__":
+ main()
+
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_844.py b/sources/pyside6/tests/QtWidgets/bug_844.py
new file mode 100644
index 000000000..b17a6df14
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_844.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import os
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtWidgets import *
+from PySide6.QtCore import *
+
+class QtKeyPressListener(QObject):
+ def __init__(self, obj):
+ QObject.__init__(self)
+ obj.installEventFilter(self)
+
+ def eventFilter(self, obj, event):
+ # This used to crash here due to a misbehaviour of type discovery!
+ return QObject.eventFilter(self, obj, event)
+
+app = QApplication([])
+key_listener = QtKeyPressListener(app)
+w = QLabel('Hello')
+w.show()
+QTimer.singleShot(0, w.close)
+app.exec_()
diff --git a/sources/pyside6/tests/QtWidgets/bug_854.py b/sources/pyside6/tests/QtWidgets/bug_854.py
new file mode 100644
index 000000000..218691312
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_854.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QTableView, QVBoxLayout, QApplication
+from PySide6.QtCore import QAbstractItemModel
+
+from helper.usesqapplication import UsesQApplication
+
+
+class VirtualList(QAbstractItemModel):
+ def __getitem__(self, index):
+ self._getItemCalled = True
+ pass
+
+ def rowCount(self, parent):
+ return 5000
+
+ def columnCount(self, parent):
+ return 3
+
+ def index(self, row, column, parent):
+ return self.createIndex(row, column)
+
+ def parent(self, index):
+ return QModelIndex()
+
+ def data(self, index, role):
+ return "(%i, %i)" % (index.row(), index.column())
+
+
+class TestQAbstractItemModel(UsesQApplication):
+ def testSetModel(self):
+ model = VirtualList()
+ model._getItemCalled = False
+ table = QTableView()
+ table.setModel(model)
+ table.show()
+ self.assertFalse(model._getItemCalled)
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_860.py b/sources/pyside6/tests/QtWidgets/bug_860.py
new file mode 100644
index 000000000..6fb511762
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_860.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QSignalMapper
+from PySide6.QtWidgets import QCheckBox
+
+from helper.usesqapplication import UsesQApplication
+
+class MultipleSlotTest(UsesQApplication):
+ def cb_changed(self, i):
+ self._changed = True
+
+ def cb_changedVoid(self):
+ self._changed = True
+
+ def testSignalMapper(self):
+ checkboxMapper = QSignalMapper()
+ box = QCheckBox('check me')
+ box.stateChanged.connect(checkboxMapper.map)
+
+ checkboxMapper.setMapping(box, box.text())
+ checkboxMapper.mappedString[str].connect(self.cb_changed)
+ self._changed = False
+ box.setChecked(True)
+ self.assertTrue(self._changed)
+
+ def testSimpleSignal(self):
+ box = QCheckBox('check me')
+ box.stateChanged[int].connect(self.cb_changedVoid)
+ self._changed = False
+ box.setChecked(True)
+ self.assertTrue(self._changed)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_862.py b/sources/pyside6/tests/QtWidgets/bug_862.py
new file mode 100644
index 000000000..9bbc84844
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_862.py
@@ -0,0 +1,97 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+
+#
+# Test for bug 862, original description was:
+#
+# print seems to be broken at least for QGraphicsItems-derived objects. The
+# attached code shows:
+#
+# <__main__.MyQObject object at 0xf99f38>
+# <__main__.MyQWidget object at 0xf99f38>
+# <PySide.QtGui.MyQGraphicsObject (this = 0x11c0d60 , parent = 0x0 , pos =
+# QPointF(0, 0) , z = 0 , flags = ( ) ) at 0xf99f38>
+# <PySide.QtGui.QGraphicsItem (this = 0x11c2e60 , parent = 0x0 , pos = QPointF(0,
+# 0) , z = 0 , flags = ( ) ) at 0xf99f38>
+#
+# Where it should be showing something like:
+#
+# <__main__.MyQObject object at 0x7f55cf226c20>
+# <__main__.MyQWidget object at 0x7f55cf226c20>
+# <__main__.MyQGraphicsObject object at 0x7f55cf226c20>
+# <__main__.MyQGraphicsItem object at 0x7f55cf226c20>
+#
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from PySide6.QtWidgets import *
+import PySide6.QtCore
+
+
+class MyQObject(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+class MyQWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+class MyQGraphicsObject(QGraphicsObject):
+ def __init__(self):
+ QGraphicsObject.__init__(self)
+
+class MyQGraphicsItem(QGraphicsItem):
+ def __init__(self):
+ QGraphicsItem.__init__(self)
+
+class TestRepr (unittest.TestCase):
+
+ def testIt(self):
+
+ app = QApplication([])
+
+ self.assertEqual("<__main__.MyQObject(0x", repr(MyQObject())[:22])
+ self.assertEqual("<__main__.MyQWidget(0x", repr(MyQWidget())[:22])
+ self.assertEqual("<__main__.MyQGraphicsObject(0x", repr(MyQGraphicsObject())[:30])
+ self.assertEqual("<__main__.MyQGraphicsItem(0x", repr(MyQGraphicsItem())[:28])
+
+ self.assertEqual("<PySide6.QtCore.QObject(0x", repr(QObject())[:26])
+ self.assertEqual("<PySide6.QtCore.QObject(0x", repr(PySide6.QtCore.QObject())[:26])
+ self.assertEqual("<PySide6.QtWidgets.QWidget(0x", repr(QWidget())[:29])
+ self.assertEqual("<PySide6.QtWidgets.QGraphicsWidget(0x", repr(QGraphicsWidget())[:37])
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_871.py b/sources/pyside6/tests/QtWidgets/bug_871.py
new file mode 100644
index 000000000..9f2481d8e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_871.py
@@ -0,0 +1,77 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtGui import QValidator, QIntValidator
+from PySide6.QtWidgets import QLineEdit
+
+'''Bug #871 - http://bugs.pyside.org/show_bug.cgi?id=871'''
+
+
+class BlankIntValidator(QIntValidator):
+ def validate(self,input,pos):
+ if input == '':
+ return QValidator.Acceptable, input, pos
+ else:
+ return QIntValidator.validate(self,input,pos)
+
+
+class Bug871Test(UsesQApplication):
+ def testWithoutValidator(self):
+ edit = QLineEdit()
+ self.assertEqual(edit.text(), '')
+ edit.insert('1')
+ self.assertEqual(edit.text(), '1')
+ edit.insert('a')
+ self.assertEqual(edit.text(), '1a')
+ edit.insert('2')
+ self.assertEqual(edit.text(), '1a2')
+
+ def testWithIntValidator(self):
+ edit = QLineEdit()
+ edit.setValidator(BlankIntValidator(edit))
+ self.assertEqual(edit.text(), '')
+ edit.insert('1')
+ self.assertEqual(edit.text(), '1')
+ edit.insert('a')
+ self.assertEqual(edit.text(), '1')
+ edit.insert('2')
+ self.assertEqual(edit.text(), '12')
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_879.py b/sources/pyside6/tests/QtWidgets/bug_879.py
new file mode 100644
index 000000000..17c6013af
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_879.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication, QTimer, QEvent, Qt
+from PySide6.QtWidgets import QApplication, QSpinBox
+from PySide6.QtGui import QKeyEvent
+
+class MySpinBox(QSpinBox):
+
+ def validate(self,text,pos):
+ return QSpinBox.validate(self,text,pos)
+
+class TestBug879 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+ self.box = MySpinBox()
+ self.box.show()
+
+ QTimer.singleShot(0, self.sendKbdEvent)
+ QTimer.singleShot(100, app.quit)
+ app.exec_()
+
+ self.assertEqual(self.box.text(), '0')
+
+ def sendKbdEvent(self):
+ ev = QKeyEvent(QEvent.KeyPress, Qt.Key_A, Qt.NoModifier, 'a')
+ QCoreApplication.sendEvent(self.box, ev)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_919.py b/sources/pyside6/tests/QtWidgets/bug_919.py
new file mode 100644
index 000000000..10767e778
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_919.py
@@ -0,0 +1,72 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.timedqapplication import TimedQApplication
+from PySide6.QtCore import Signal, QTimer
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QPushButton, QStyleOptionButton, QApplication, QStyle
+
+class MyWidget(QPushButton):
+ def __init__(self, parent = None):
+ QPushButton.__init__(self, parent)
+ self._painted = False
+
+ def _emitPainted(self):
+ self.paintReceived.emit()
+
+ def paintEvent(self, e):
+ p = QPainter(self)
+ style = QApplication.style()
+ option = QStyleOptionButton()
+ style.drawControl(QStyle.CE_PushButton, option, p)
+ self._painted = True
+ QTimer.singleShot(0, self._emitPainted)
+
+ paintReceived = Signal()
+
+class TestBug919(TimedQApplication):
+ def setUp(self):
+ TimedQApplication.setUp(self, 2000)
+
+ def testFontInfo(self):
+ w = MyWidget()
+ w.paintReceived.connect(self.app.quit)
+ w.show()
+ self.app.exec_()
+ self.assertTrue(w._painted)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_921.py b/sources/pyside6/tests/QtWidgets/bug_921.py
new file mode 100644
index 000000000..fd095cd2b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_921.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+from helper.timedqapplication import TimedQApplication
+
+class Signaller(QtCore.QObject):
+ s1 = QtCore.Signal()
+ s2 = QtCore.Signal()
+ s3 = QtCore.Signal()
+
+class Window(object):
+
+ def __init__(self, s):
+ self._window = QtWidgets.QMainWindow()
+ self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ self._window.setWindowTitle("Demo!")
+
+ self._s = s
+ self._s.s1.connect(self._on_signal)
+ self._s.s2.connect(self._on_signal)
+
+ def show(self):
+ self._window.show()
+
+ def _on_signal(self):
+ self._window.setWindowTitle("Signaled!")
+
+class TestTimedApp(TimedQApplication):
+ def testSignals(self):
+ s = Signaller()
+ w = Window(s)
+ w.show()
+
+ def midleFunction():
+ def internalFunction():
+ pass
+ s.s3.connect(internalFunction)
+
+ midleFunction()
+ self.app.exec_()
+ del w
+
+ s.s1.emit()
+ s.s2.emit()
+ s.s3.emit()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_941.py b/sources/pyside6/tests/QtWidgets/bug_941.py
new file mode 100644
index 000000000..0b540e8ec
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_941.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+def foo(a, b):
+ pass
+
+class TestBug941 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+ view = QHeaderView(Qt.Horizontal)
+ self.assertTrue(view.sortIndicatorChanged.connect(foo))
+ view.sortIndicatorChanged.emit(0, Qt.Vertical) # this can't raise an exception!
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_964.py b/sources/pyside6/tests/QtWidgets/bug_964.py
new file mode 100644
index 000000000..32bc584ef
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_964.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+
+class TestBug964 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+ model = QStringListModel(["1", "2"])
+ view = QListView()
+ view.setModel(model)
+ view.setCurrentIndex(model.index(0,0))
+ newCursor = view.moveCursor(QAbstractItemView.MoveDown, Qt.NoModifier)
+ self.assertEqual(newCursor.row(), 1)
+ self.assertEqual(newCursor.column(), 0)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_967.py b/sources/pyside6/tests/QtWidgets/bug_967.py
new file mode 100644
index 000000000..6ee4fed99
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_967.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+class TestBug967 (unittest.TestCase):
+
+ def callback(self, arg):
+ self.arg = arg
+
+ def testIt(self):
+ self.arg = None
+ app = QApplication([])
+ obj = QComboBox()
+ obj.currentIndexChanged.connect(self.callback)
+ obj.currentIndexChanged.emit(5)
+ self.assertEqual(self.arg, 5)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_972.py b/sources/pyside6/tests/QtWidgets/bug_972.py
new file mode 100644
index 000000000..686bd2ecc
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_972.py
@@ -0,0 +1,74 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QSizeF
+from PySide6.QtWidgets import QGraphicsProxyWidget, QSizePolicy, QPushButton, QGraphicsScene, QGraphicsView
+
+from helper.timedqapplication import TimedQApplication
+
+def createItem(minimum, preferred, maximum, name):
+ w = QGraphicsProxyWidget()
+
+ w.setWidget(QPushButton(name))
+ w.setMinimumSize(minimum)
+ w.setPreferredSize(preferred)
+ w.setMaximumSize(maximum)
+ w.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
+
+ return w
+
+class TestBug972 (TimedQApplication):
+
+ # Test if the function QGraphicsProxyWidget.setWidget have the correct behavior
+ def testIt(self):
+ scene = QGraphicsScene()
+
+ minSize = QSizeF(30, 100)
+ prefSize = QSizeF(210, 100)
+ maxSize = QSizeF(300, 100)
+
+ a = createItem(minSize, prefSize, maxSize, "A")
+ b = createItem(minSize, prefSize, maxSize, "B")
+ c = createItem(minSize, prefSize, maxSize, "C")
+ d = createItem(minSize, prefSize, maxSize, "D")
+
+ view = QGraphicsView(scene)
+ view.show()
+ self.app.exec_()
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_979.py b/sources/pyside6/tests/QtWidgets/bug_979.py
new file mode 100644
index 000000000..b98ce6918
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_979.py
@@ -0,0 +1,45 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtWidgets import QDialog
+from import_test import PysideImportTest2
+
+class PysideImportTest1(QDialog, PysideImportTest2):
+ pass
+
+if __name__ == '__main__':
+ quit()
+
diff --git a/sources/pyside6/tests/QtWidgets/bug_988.py b/sources/pyside6/tests/QtWidgets/bug_988.py
new file mode 100644
index 000000000..e362f1fb3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_988.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+class TestBug988 (unittest.TestCase):
+
+ def callback(self, arg):
+ self.arg = arg
+
+ def testIt(self):
+ self.arg = None
+ app = QApplication([])
+ obj = QTabWidget()
+ obj.currentChanged.connect(self.callback)
+ obj.currentChanged.emit(5)
+ self.assertEqual(self.arg, 5)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/bug_998.py b/sources/pyside6/tests/QtWidgets/bug_998.py
new file mode 100644
index 000000000..f72092945
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/bug_998.py
@@ -0,0 +1,45 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication
+
+class TestBug998 (unittest.TestCase):
+ def testNoFocusWindow(self):
+ widget = QApplication.focusWidget()
+ self.assertTrue(widget == None)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/customproxywidget_test.py b/sources/pyside6/tests/QtWidgets/customproxywidget_test.py
new file mode 100644
index 000000000..c605dd91f
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/customproxywidget_test.py
@@ -0,0 +1,68 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QLabel
+from PySide6.QtWidgets import QGraphicsScene, QGraphicsView, QGraphicsItem, QGraphicsProxyWidget
+
+class CustomProxy(QGraphicsProxyWidget):
+ def __init__(self, parent=None, wFlags=0):
+ QGraphicsProxyWidget.__init__(self, parent, wFlags)
+
+class CustomProxyWidgetTest(UsesQApplication):
+ def testCustomProxyWidget(self):
+ scene = QGraphicsScene()
+
+ proxy = CustomProxy(None, Qt.Window)
+ widget = QLabel('Widget')
+ proxy.setWidget(widget)
+ proxy.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
+ scene.addItem(proxy)
+ scene.setSceneRect(scene.itemsBoundingRect())
+
+ view = QGraphicsView(scene)
+ view.setRenderHints(QPainter.Antialiasing|QPainter.SmoothPixmapTransform)
+ view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
+ view.show()
+
+ timer = QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/event_filter_test.py b/sources/pyside6/tests/QtWidgets/event_filter_test.py
new file mode 100644
index 000000000..8e9932cc0
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/event_filter_test.py
@@ -0,0 +1,72 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QObject, QEvent
+from PySide6.QtWidgets import QWidget
+
+class MyFilter(QObject):
+ def eventFilter(self, obj, event):
+ if event.type() == QEvent.KeyPress:
+ pass
+ return QObject.eventFilter(self, obj, event)
+
+
+class EventFilter(UsesQApplication):
+ def testRefCount(self):
+ o = QObject()
+ filt = MyFilter()
+ o.installEventFilter(filt)
+ self.assertEqual(sys.getrefcount(o), 2)
+
+ o.installEventFilter(filt)
+ self.assertEqual(sys.getrefcount(o), 2)
+
+ o.removeEventFilter(filt)
+ self.assertEqual(sys.getrefcount(o), 2)
+
+ def testObjectDestructorOrder(self):
+ w = QWidget()
+ filt = MyFilter()
+ filt.app = self.app
+ w.installEventFilter(filt)
+ w.show()
+ w.close()
+ w = None
+ self.assertTrue(True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/grandparent_method_test.py b/sources/pyside6/tests/QtWidgets/grandparent_method_test.py
new file mode 100644
index 000000000..a3c5a1e07
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/grandparent_method_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests for calling methods further than the direct parent'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QPushButton, QWidget
+
+from helper.usesqapplication import UsesQApplication
+
+class Dummy(QPushButton):
+
+ def show(self):
+ QWidget.show(self)
+ self.called = True
+
+class GrandParentMethod(UsesQApplication):
+ def testMethod(self):
+ obj = Dummy()
+ obj.show()
+ self.assertTrue(obj.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/hashabletype_test.py b/sources/pyside6/tests/QtWidgets/hashabletype_test.py
new file mode 100644
index 000000000..c443d0505
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/hashabletype_test.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for __hash__'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QTreeWidgetItem
+from helper.usesqapplication import UsesQApplication
+
+class HashableTest(UsesQApplication):
+
+ def testQTreeWidgetItemHash(self):
+ h = {}
+ obj = QTreeWidgetItem()
+ h[obj] = 2
+ self.assertTrue(h.get(obj), 2)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/QtWidgets/import_test.py b/sources/pyside6/tests/QtWidgets/import_test.py
index 0b60241f0..0b60241f0 100644
--- a/sources/pyside2/tests/QtWidgets/import_test.py
+++ b/sources/pyside6/tests/QtWidgets/import_test.py
diff --git a/sources/pyside6/tests/QtWidgets/keep_reference_test.py b/sources/pyside6/tests/QtWidgets/keep_reference_test.py
new file mode 100644
index 000000000..1c634c396
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/keep_reference_test.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from sys import getrefcount
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import *
+from PySide6.QtWidgets import QTableView
+
+class TestModel(QAbstractTableModel):
+ def __init__(self, parent=None):
+ QAbstractTableModel.__init__(self, parent)
+ def rowCount(self, parent):
+ return 0
+ def columnCount(self, parent):
+ return 0
+ def data(self, index, role):
+ return None
+
+class KeepReferenceTest(UsesQApplication):
+
+ def testModelWithoutParent(self):
+ view = QTableView()
+ model = TestModel()
+ view.setModel(model)
+ samemodel = view.model()
+ self.assertEqual(model, samemodel)
+
+ def testModelWithParent(self):
+ view = QTableView()
+ model = TestModel(None)
+ view.setModel(model)
+ samemodel = view.model()
+ self.assertEqual(model, samemodel)
+
+ def testReferenceCounting(self):
+ '''Tests reference count of model object referred by view objects.'''
+ model1 = TestModel()
+ refcount1 = getrefcount(model1)
+ view1 = QTableView()
+ view1.setModel(model1)
+ self.assertEqual(getrefcount(view1.model()), refcount1 + 1)
+
+ view2 = QTableView()
+ view2.setModel(model1)
+ self.assertEqual(getrefcount(view2.model()), refcount1 + 2)
+
+ model2 = TestModel()
+ view2.setModel(model2)
+ self.assertEqual(getrefcount(view1.model()), refcount1 + 1)
+
+ def testReferenceCountingWhenDeletingReferrer(self):
+ '''Tests reference count of model object referred by deceased view object.'''
+ model = TestModel()
+ refcount1 = getrefcount(model)
+ view = QTableView()
+ view.setModel(model)
+ self.assertEqual(getrefcount(view.model()), refcount1 + 1)
+
+ del view
+ self.assertEqual(getrefcount(model), refcount1)
+
+ def testReferreedObjectSurvivalAfterContextEnd(self):
+ '''Model object assigned to a view object must survive after getting out of context.'''
+ def createModelAndSetToView(view):
+ model = TestModel()
+ model.setObjectName('created model')
+ view.setModel(model)
+ view = QTableView()
+ createModelAndSetToView(view)
+ model = view.model()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/missing_symbols_test.py b/sources/pyside6/tests/QtWidgets/missing_symbols_test.py
new file mode 100644
index 000000000..a51fbfa27
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/missing_symbols_test.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''(Very) Simple test case for missing names from QtGui and QtWidgets'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtGui
+from PySide6 import QtWidgets
+
+class MissingClasses(unittest.TestCase):
+ def testQDrag(self): # Bug 222
+ getattr(QtGui, 'QDrag')
+
+ def testQDropEvent(self): # Bug 255
+ getattr(QtGui, 'QDropEvent')
+
+class MissingMembers(unittest.TestCase):
+
+ def testQFontMetricsSize(self): # Bug 223
+ QtGui.QFontMetrics.size
+
+ def testQLayoutSetSpacing(self): # Bug 231
+ QtWidgets.QLayout.setSpacing
+
+ def testQImageLoad(self): # Bug 257
+ QtGui.QImage.load
+
+ def testQStandardItemModelinsertRow(self): # Bug 227
+ QtGui.QStandardItemModel.insertRow
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/paint_event_test.py b/sources/pyside6/tests/QtWidgets/paint_event_test.py
new file mode 100644
index 000000000..115f14b4a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/paint_event_test.py
@@ -0,0 +1,104 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test paint event override in python'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimerEvent
+from PySide6.QtWidgets import QApplication, QWidget
+
+from helper.usesqapplication import UsesQApplication
+
+class MyWidget(QWidget):
+ '''Sample widget'''
+
+ def __init__(self, app=None):
+ #Creates a new widget
+ if app is None:
+ app = QApplication([])
+
+ super(MyWidget, self).__init__()
+ self.app = app
+ self.runs = 0
+ self.max_runs = 5
+ self.paint_event_called = False
+
+ def timerEvent(self, event):
+ #Timer event method
+ self.runs += 1
+
+ if self.runs == self.max_runs:
+ self.app.quit()
+
+ if not isinstance(event, QTimerEvent):
+ raise TypeError('Invalid event type. Must be QTimerEvent')
+
+ def paintEvent(self, event):
+ #Empty paint event method
+ # XXX: should be using super here, but somehow PyQt4
+ # complains about paintEvent not present in super
+ QWidget.paintEvent(self, event)
+ self.paint_event_called = True
+
+
+class PaintEventOverride(UsesQApplication):
+ '''Test case for overriding QWidget.paintEvent'''
+
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(PaintEventOverride, self).setUp()
+ self.widget = MyWidget(self.app)
+
+ def tearDown(self):
+ #Release resources
+ del self.widget
+ super(PaintEventOverride, self).tearDown()
+
+ def testPaintEvent(self):
+ #Test QWidget.paintEvent override
+ timer_id = self.widget.startTimer(100)
+ self.widget.show()
+ self.app.exec_()
+
+ self.widget.killTimer(timer_id)
+
+ self.assertTrue(self.widget.paint_event_called)
+ self.assertEqual(self.widget.runs, 5)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/parent_method_test.py b/sources/pyside6/tests/QtWidgets/parent_method_test.py
new file mode 100644
index 000000000..455ec46ee
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/parent_method_test.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QTimer, QThread
+from PySide6.QtWidgets import *
+
+class Foo(QTableView):
+ def __init__(self, parent=None):
+ QTableView.__init__(self, parent)
+
+from helper.usesqapplication import UsesQApplication
+
+class TestParentType(UsesQApplication):
+
+ def testParentType(self):
+ # Test the problem with calling QObject.parent from a QWidget
+ # when the parent is a python class derived from a QWidget-derived
+ # class. The method was returning the last C++ class in the hierarchy
+ parent = Foo()
+ w2 = QWidget(parent)
+ self.assertTrue(isinstance(w2.parentWidget(), Foo))
+ self.assertTrue(isinstance(w2.parent(), Foo))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/private_mangle_test.py b/sources/pyside6/tests/QtWidgets/private_mangle_test.py
new file mode 100644
index 000000000..d1520a44f
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/private_mangle_test.py
@@ -0,0 +1,128 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+This is the example from https://bugreports.qt.io/browse/PYSIDE-772
+with no interaction as a unittest.
+"""
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Signal
+from PySide6.QtWidgets import QApplication, QWidget
+from PySide6 import QtWidgets
+
+class Harness(QWidget):
+ clicked = Signal()
+
+ def __init__(self):
+ QWidget.__init__(self)
+ self.clicked.connect(self.method)
+ self.clicked.connect(self._method)
+ self.clicked.connect(self.__method)
+
+ def method(self): # Public method
+ self.method_result = self.sender()
+
+ def _method(self): # Private method
+ self.method__result = self.sender()
+
+ def __method(self): # Name mangled method
+ self.method___result = self.sender()
+
+
+class _Under(QWidget):
+ clicked = Signal()
+
+ def __init__(self):
+ QWidget.__init__(self)
+ self.clicked.connect(self.method)
+ self.clicked.connect(self._method)
+ self.clicked.connect(self.__method)
+
+ def method(self): # Public method
+ self.method_result = self.sender()
+
+ def _method(self): # Private method
+ self.method__result = self.sender()
+
+ def __method(self): # Name mangled method
+ self.method___result = self.sender()
+
+
+class TestMangle(unittest.TestCase):
+
+ def setUp(self):
+ QApplication()
+
+ def tearDown(self):
+ qApp.shutdown()
+
+ def testPrivateMangle(self):
+ harness = Harness()
+ harness.clicked.emit()
+ self.assertEqual(harness.method_result, harness)
+ self.assertEqual(harness.method__result, harness)
+ self.assertEqual(harness.method___result, harness)
+ self.assertTrue("method" in type(harness).__dict__)
+ self.assertTrue("_method" in type(harness).__dict__)
+ self.assertFalse("__method" in type(harness).__dict__)
+ self.assertTrue("_Harness__method" in type(harness).__dict__)
+
+ def testPrivateMangleUnder(self):
+ harness = _Under()
+ harness.clicked.emit()
+ self.assertEqual(harness.method_result, harness)
+ self.assertEqual(harness.method__result, harness)
+ self.assertEqual(harness.method___result, harness)
+ # make sure that we skipped over the underscore in "_Under"
+ self.assertTrue("method" in type(harness).__dict__)
+ self.assertTrue("_method" in type(harness).__dict__)
+ self.assertFalse("__method" in type(harness).__dict__)
+ self.assertTrue("_Under__method" in type(harness).__dict__)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/python_properties_test.py b/sources/pyside6/tests/QtWidgets/python_properties_test.py
new file mode 100644
index 000000000..f37881c2a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/python_properties_test.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+class Properties(unittest.TestCase):
+
+ def testStaticProperty(self):
+ self.assertEqual(QtWidgets.QGraphicsItem.UserType, 65536)
+
+ def testInstanceProperty(self):
+ p = QtWidgets.QStyleOptionViewItem()
+ self.assertTrue(isinstance(p.locale, QtCore.QLocale))
+
+ # PSYIDE-304, can assign to a "const QWidget *" field
+ p.widget = None
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qabstracttextdocumentlayout_test.py b/sources/pyside6/tests/QtWidgets/qabstracttextdocumentlayout_test.py
new file mode 100644
index 000000000..212cff0ff
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qabstracttextdocumentlayout_test.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QSizeF, QTimer
+from PySide6.QtGui import QTextFormat, QTextCharFormat, QPyTextObject
+from PySide6.QtWidgets import QTextEdit
+from helper.usesqapplication import UsesQApplication
+
+class Foo(QPyTextObject):
+ called = False
+
+ def intrinsicSize(self, doc, posInDocument, format):
+ Foo.called = True
+ return QSizeF(10, 10)
+
+ def drawObject(self, painter, rect, doc, posInDocument, format):
+ pass
+
+class QAbstractTextDocumentLayoutTest(UsesQApplication):
+
+ objectType = QTextFormat.UserObject + 1
+
+ def foo(self):
+ fmt = QTextCharFormat()
+ fmt.setObjectType(QAbstractTextDocumentLayoutTest.objectType)
+
+ cursor = self.textEdit.textCursor()
+ cursor.insertText(chr(0xfffc), fmt)
+ self.textEdit.setTextCursor(cursor)
+ self.textEdit.close()
+
+ def testIt(self):
+
+ self.textEdit = QTextEdit()
+ self.textEdit.show()
+
+ interface = Foo()
+ self.textEdit.document().documentLayout().registerHandler(QAbstractTextDocumentLayoutTest.objectType, interface)
+
+ QTimer.singleShot(0, self.foo)
+ self.app.exec_()
+
+ self.assertTrue(Foo.called)
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qaction_test.py b/sources/pyside6/tests/QtWidgets/qaction_test.py
new file mode 100644
index 000000000..558295adc
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qaction_test.py
@@ -0,0 +1,76 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QWidget
+from helper.usesqapplication import UsesQApplication
+
+class QPainterDrawText(UsesQApplication):
+
+ def _cb(self):
+ self._called = True
+
+ def testSignal(self):
+ o = QWidget()
+ act = QAction(o)
+ self._called = False
+ act.triggered.connect(self._cb)
+ act.trigger()
+ self.assertTrue(self._called)
+
+ def testNewCtor(self):
+ o = QWidget()
+ self._called = False
+ myAction = QAction("&Quit", o, triggered=self._cb)
+ myAction.trigger()
+ self.assertTrue(self._called)
+
+
+class SetShortcutTest(UsesQApplication):
+
+ def testSetShortcut(self):
+ # Somehow an exception was leaking from the constructor
+ # and appearing in setShortcut.
+ o = QWidget()
+ action = QAction('aaaa', o)
+ shortcut = 'Ctrl+N'
+ action.setShortcut(shortcut)
+ s2 = action.shortcut()
+ self.assertEqual(s2, shortcut)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qapp_issue_585.py b/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
new file mode 100644
index 000000000..1c86a1cc3
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
@@ -0,0 +1,76 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+The bug was caused by this commit:
+"Support the qApp macro correctly, final version incl. debug"
+e30e0c161b2b4d50484314bf006e9e5e8ff6b380
+2017-10-27
+
+The bug was first solved by this commit:
+"Fix qApp macro refcount"
+b811c874dedd14fd8b072bc73761d39255216073
+2018-03-21
+
+This test triggers the refcounting bug of qApp, issue PYSIDE-585.
+Finally, the real patch included more changes, because another error
+was in the ordering of shutdown calls. It was found using the following
+Python configuration:
+
+ In Python 3.6 create a directory 'debug' and cd into it.
+
+ ../configure --with-pydebug --prefix=$HOME/pydebug/ --enable-shared
+
+Then a lot more refcounting errors show up, which are due to a bug in
+the code position of the shutdown procedure.
+The reason for the initial refcount bug was that the shutdown code is once
+more often called than the creation of the qApp wrapper.
+Finally, it was easiest and more intuitive to simply make the refcount of
+qApp_content equal to that of Py_None, which is also not supposed to be
+garbage-collected.
+
+For some reason, the test does not work as a unittest because it creates
+no crash. We leave it this way.
+"""
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtCore import QTimer
+from PySide6 import QtWidgets
+
+app_instance = QtWidgets.QApplication([])
+# If the following line is commented, application doesn't crash on exit anymore.
+app_instance2 = app_instance
+QTimer.singleShot(0, qApp.quit)
+app_instance.exec_()
diff --git a/sources/pyside6/tests/QtWidgets/qapp_test.py b/sources/pyside6/tests/QtWidgets/qapp_test.py
new file mode 100644
index 000000000..edff491e1
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qapp_test.py
@@ -0,0 +1,52 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test the presence of qApp Macro'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+
+class QAppPresence(unittest.TestCase):
+
+ def testQApp(self):
+ #QtGui.qApp variable is instance of QApplication
+ self.assertTrue(isinstance(qApp, QApplication))
+
+def main():
+ app = QApplication([])
+ unittest.main()
+
+if __name__ == '__main__':
+ main()
diff --git a/sources/pyside6/tests/QtWidgets/qapplication_exit_segfault_test.py b/sources/pyside6/tests/QtWidgets/qapplication_exit_segfault_test.py
new file mode 100644
index 000000000..951fc3193
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qapplication_exit_segfault_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication, QPushButton, QWidget, QSpinBox
+
+class QApplicationDelete(unittest.TestCase):
+ '''Test for segfault when deleting a QApplication before a QWidget'''
+
+ def testQPushButton(self):
+ #QApplication deleted before QPushButton
+ a = QApplication([])
+ b = QPushButton('aaaa')
+ del a
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qapplication_test.py b/sources/pyside6/tests/QtWidgets/qapplication_test.py
new file mode 100644
index 000000000..49b216043
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qapplication_test.py
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication
+
+class TestQApplication(unittest.TestCase):
+ def testNoArguments(self):
+ app = QApplication()
+ self.assertIsInstance(app, QApplication)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qbrush_test.py b/sources/pyside6/tests/QtWidgets/qbrush_test.py
new file mode 100644
index 000000000..6d568da42
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qbrush_test.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QBrush'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QColor, QBrush
+from PySide6.QtWidgets import QApplication
+
+from helper.usesqapplication import UsesQApplication
+
+class Constructor(UsesQApplication):
+ '''Test case for constructor of QBrush'''
+
+ def testQColor(self):
+ #QBrush(QColor) constructor
+ color = QColor('black')
+ obj = QBrush(color)
+ self.assertEqual(obj.color(), color)
+
+ obj = QBrush(Qt.blue)
+ self.assertEqual(obj.color(), Qt.blue)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qcolormap_test.py b/sources/pyside6/tests/QtWidgets/qcolormap_test.py
new file mode 100644
index 000000000..bbde8357e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qcolormap_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QColormap
+from helper.usesqapplication import UsesQApplication
+
+
+class QColormapTest(UsesQApplication):
+
+ def testQColormap(self):
+ qc = QColormap.instance()
+ self.assertEqual(qc.size(), -1)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qdynamic_signal.py b/sources/pyside6/tests/QtWidgets/qdynamic_signal.py
new file mode 100644
index 000000000..5fec6836a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qdynamic_signal.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from PySide6.QtWidgets import QInputDialog
+
+from helper.usesqapplication import UsesQApplication
+
+class DynamicSignalTest(UsesQApplication):
+
+ def cb(self, obj):
+ self._called = True
+
+ def testQDialog(self):
+ dlg = QInputDialog()
+ dlg.setInputMode(QInputDialog.TextInput)
+ lst = dlg.children()
+ self.assertTrue(len(lst))
+ obj = lst[0]
+ self._called = False
+ obj.destroyed[QObject].connect(self.cb)
+ obj = None
+ del dlg
+ self.assertTrue(self._called)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qfontdialog_test.py b/sources/pyside6/tests/QtWidgets/qfontdialog_test.py
new file mode 100644
index 000000000..8473854ec
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qfontdialog_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+from PySide6 import QtGui
+from PySide6 import QtWidgets
+
+from helper.timedqapplication import TimedQApplication
+
+class TestFontDialog(TimedQApplication):
+
+ def testGetFont(self):
+ QtWidgets.QFontDialog.getFont()
+
+ def testGetFontQDialog(self):
+ QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10))
+
+ def testGetFontQDialogQString(self):
+ QtWidgets.QFontDialog.getFont(QtGui.QFont("FreeSans",10), None, "Select font")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qformlayout_test.py b/sources/pyside6/tests/QtWidgets/qformlayout_test.py
new file mode 100644
index 000000000..87bff138e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qformlayout_test.py
@@ -0,0 +1,91 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QFormLayout, QWidget
+
+from helper.usesqapplication import UsesQApplication
+
+class QFormLayoutTest(UsesQApplication):
+
+ def testGetItemPosition(self):
+ formlayout = QFormLayout()
+ row, role = formlayout.getItemPosition(0)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, -1)
+
+ widget = QWidget()
+ formlayout.addRow(widget)
+ row, role = formlayout.getItemPosition(0)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, 0)
+ self.assertEqual(role, QFormLayout.SpanningRole)
+
+ def testGetWidgetPosition(self):
+ formlayout = QFormLayout()
+ widget = QWidget()
+ row, role = formlayout.getWidgetPosition(widget)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, -1)
+
+ formlayout.addRow(widget)
+ row, role = formlayout.getWidgetPosition(widget)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, 0)
+ self.assertEqual(role, QFormLayout.SpanningRole)
+
+ def testGetLayoutPosition(self):
+ formlayout = QFormLayout()
+ layout = QFormLayout()
+ row, role = formlayout.getLayoutPosition(layout)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, -1)
+
+ formlayout.addRow(layout)
+ row, role = formlayout.getLayoutPosition(layout)
+ self.assertTrue(isinstance(row, int))
+ self.assertTrue(isinstance(role, QFormLayout.ItemRole))
+ self.assertEqual(row, 0)
+ self.assertEqual(role, QFormLayout.SpanningRole)
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsitem_isblocked_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsitem_isblocked_test.py
new file mode 100644
index 000000000..642fab27b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qgraphicsitem_isblocked_test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+from PySide6 import QtGui
+from PySide6 import QtWidgets
+from helper.usesqapplication import UsesQApplication
+
+class Item(QtWidgets.QGraphicsItem):
+
+ def __init__(self):
+ QtWidgets.QGraphicsItem.__init__(self)
+
+ def boundingRect(self):
+ return QtCore.QRectF(0, 0, 100, 100)
+
+ def paint(self, painter, option, widget):
+ painter.setBrush(QtGui.QColor(255, 255, 255))
+ painter.drawRect(0, 0, 100, 100)
+
+
+class QGraphicsViewIsBlockedTest(UsesQApplication):
+
+ def testIsBlockedByModalPanel(self):
+ (first, second) = Item().isBlockedByModalPanel()
+ self.assertFalse(first)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsitem_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsitem_test.py
new file mode 100644
index 000000000..961d016c0
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qgraphicsitem_test.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test cases related to QGraphicsItem and subclasses'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QPolygonF, QColor, QBrush
+from PySide6.QtWidgets import QGraphicsScene
+
+from helper.usesqapplication import UsesQApplication
+
+class QColorOnSetBrush(UsesQApplication):
+ '''Test case for passing a QColor directly to setBrush'''
+
+ def setUp(self):
+ #Acquire resources
+ super(QColorOnSetBrush, self).setUp()
+
+ self.scene = QGraphicsScene()
+ poly = QPolygonF()
+ self.item = self.scene.addPolygon(poly)
+ self.color = QColor('black')
+
+ def tearDown(self):
+ #Release resources
+ del self.color
+ del self.item
+ del self.scene
+ super(QColorOnSetBrush, self).tearDown()
+
+ def testQColor(self):
+ #QGraphicsAbstractShapeItem.setBrush(QColor)
+ self.item.setBrush(self.color)
+ self.assertEqual(QBrush(self.color), self.item.brush())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py
new file mode 100644
index 000000000..e9b509a65
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qgraphicsobjectreimpl_test.py
@@ -0,0 +1,82 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test cases related to QGraphicsItem and subclasses'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QGraphicsObject, QGraphicsWidget
+from PySide6.QtCore import QRectF
+
+from helper.usesqapplication import UsesQApplication
+
+class GObjA(QGraphicsObject):
+ def paint(self, *args):
+ pass
+
+ def boundingRect(self):
+ return QRectF()
+
+ def itemChange(self, *args):
+ return QGraphicsObject.itemChange(self, *args)
+
+class GObjB(QGraphicsObject):
+ def paint(self, *args):
+ pass
+
+ def boundingRect(self):
+ return QRectF()
+
+class QGraphicsObjectReimpl(UsesQApplication):
+ '''Test case for reimplementing QGraphicsObject'''
+
+ def testReimplementationTypes(self):
+ w = QGraphicsWidget()
+
+ # PYSIDE-86:
+ # This case failed because GObjA was reimplementing
+ # the method itemChange() from QGraphicsItem,
+ # and then the QVariant was not associated with
+ # a QGraphicsItem but a QObjectItem because the base
+ # class was a QObject.
+ gobjA = GObjA()
+ gobjA.setParentItem(w)
+ self.assertIs(type(w), type(gobjA.parentItem()))
+
+ gobjB = GObjB()
+ gobjB.setParentItem(w)
+ self.assertIs(type(w), type(gobjB.parentItem()))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py
new file mode 100644
index 000000000..ac9124f6c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qgraphicsproxywidget_test.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QLabel
+from PySide6.QtWidgets import QGraphicsScene, QGraphicsView, QGraphicsItem, QGraphicsProxyWidget
+
+class QGraphicsProxyWidgetTest(UsesQApplication):
+ def testQGraphicsProxyWidget(self):
+ scene = QGraphicsScene()
+
+ proxy = QGraphicsProxyWidget(None, Qt.Window)
+ widget = QLabel('Widget')
+ proxy.setWidget(widget)
+ proxy.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
+ scene.addItem(proxy)
+ scene.setSceneRect(scene.itemsBoundingRect())
+
+ view = QGraphicsView(scene)
+ view.setRenderHints(QPainter.Antialiasing|QPainter.SmoothPixmapTransform)
+ view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
+ view.show()
+
+ timer = QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py b/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py
new file mode 100644
index 000000000..6a563e590
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qgraphicsscene_test.py
@@ -0,0 +1,224 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Basic test cases for QGraphicsScene'''
+
+import gc
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QPointF
+from PySide6.QtGui import QPolygonF, QPixmap, QPainterPath, QTransform, QWindow
+from PySide6.QtWidgets import QApplication, QPushButton
+from PySide6.QtWidgets import QGraphicsScene
+from PySide6.QtWidgets import QGraphicsEllipseItem, QGraphicsLineItem
+from PySide6.QtWidgets import QGraphicsPathItem, QGraphicsPixmapItem
+from PySide6.QtWidgets import QGraphicsPolygonItem, QGraphicsRectItem
+from PySide6.QtWidgets import QGraphicsSimpleTextItem, QGraphicsTextItem
+from PySide6.QtWidgets import QGraphicsProxyWidget, QGraphicsView
+
+from helper.usesqapplication import UsesQApplication
+
+class Constructor(unittest.TestCase):
+ '''QGraphicsScene constructor'''
+
+ def testConstructor(self):
+ #QGraphicsScene constructor
+ obj = QGraphicsScene()
+ self.assertTrue(isinstance(obj, QGraphicsScene))
+
+# Test for PYSIDE-868: Test whether painter.device() can be accessed
+# correctly. This was crashing when the underlying QPaintDevice was a
+# QWidget due to handling multiple inheritance incorrectly.
+class CustomScene(QGraphicsScene):
+ def __init__(self, parent = None):
+ super(CustomScene, self).__init__(parent)
+ self.dpi = 0
+
+ def drawBackground(self, painter, rect):
+ self.dpi = painter.device().physicalDpiX()
+
+ def drawForeground(self, painter, rect):
+ self.dpi = painter.device().physicalDpiX()
+
+class ConstructorWithRect(unittest.TestCase):
+ '''QGraphicsScene qrect constructor and related sizes'''
+
+ def setUp(self):
+ #Acquire resources
+ # PyQt4 doesn't accept a QRect as argument to constructor
+ self.scene = QGraphicsScene(0, 200, 150, 175)
+
+ def tearDown(self):
+ #Release resources
+ del self.scene
+
+ def testHeight(self):
+ #QGraphicsScene.height()
+ self.assertEqual(self.scene.height(), 175)
+
+ def testWidth(self):
+ #QGraphicsScene.width()
+ self.assertEqual(self.scene.width(), 150)
+
+
+class AddItem(UsesQApplication):
+ '''Tests for QGraphicsScene.add*'''
+
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(AddItem, self).setUp()
+ self.scene = QGraphicsScene()
+ # While the scene does not inherits from QWidget, requires
+ # an application to make the internals work.
+
+ def tearDown(self):
+ #Release resources
+ del self.scene
+ super(AddItem, self).tearDown()
+
+ def testEllipse(self):
+ #QGraphicsScene.addEllipse
+ item = self.scene.addEllipse(100, 100, 100, 100)
+ self.assertTrue(isinstance(item, QGraphicsEllipseItem))
+
+ def testLine(self):
+ #QGraphicsScene.addLine
+ item = self.scene.addLine(100, 100, 200, 200)
+ self.assertTrue(isinstance(item, QGraphicsLineItem))
+
+ def testPath(self):
+ #QGraphicsScene.addPath
+ item = self.scene.addPath(QPainterPath())
+ self.assertTrue(isinstance(item, QGraphicsPathItem))
+
+ def testPixmap(self):
+ #QGraphicsScene.addPixmap
+ item = self.scene.addPixmap(QPixmap())
+ self.assertTrue(isinstance(item, QGraphicsPixmapItem))
+
+ def testPolygon(self):
+ #QGraphicsScene.addPolygon
+ points = [QPointF(0, 0), QPointF(100, 100), QPointF(0, 100)]
+ item = self.scene.addPolygon(QPolygonF(points))
+ self.assertTrue(isinstance(item, QGraphicsPolygonItem))
+
+ def testRect(self):
+ #QGraphicsScene.addRect
+ item = self.scene.addRect(100, 100, 100, 100)
+ self.assertTrue(isinstance(item, QGraphicsRectItem))
+
+ def testSimpleText(self):
+ #QGraphicsScene.addSimpleText
+ item = self.scene.addSimpleText('Monty Python 42')
+ self.assertTrue(isinstance(item, QGraphicsSimpleTextItem))
+
+ def testText(self):
+ #QGraphicsScene.addText
+ item = self.scene.addText('Monty Python 42')
+ self.assertTrue(isinstance(item, QGraphicsTextItem))
+
+ def testWidget(self):
+ #QGraphicsScene.addWidget
+ # XXX: printing some X11 error when using under PyQt4
+ item = self.scene.addWidget(QPushButton())
+ self.assertTrue(isinstance(item, QGraphicsProxyWidget))
+
+
+class ItemRetrieve(UsesQApplication):
+ '''Tests for QGraphicsScene item retrieval methods'''
+
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(ItemRetrieve, self).setUp()
+ self.scene = QGraphicsScene()
+
+ self.topleft = QGraphicsRectItem(0, 0, 100, 100)
+ self.topright = QGraphicsRectItem(100, 0, 100, 100)
+ self.bottomleft = QGraphicsRectItem(0, 100, 100, 100)
+ self.bottomright = QGraphicsRectItem(100, 100, 100, 100)
+
+ self.items = [self.topleft, self.topright, self.bottomleft,
+ self.bottomright]
+
+ for item in self.items:
+ self.scene.addItem(item)
+
+ def tearDown(self):
+ #Release resources
+ del self.scene
+ super(ItemRetrieve, self).tearDown()
+
+ def testItems(self):
+ #QGraphicsScene.items()
+ items = self.scene.items()
+ for i in items:
+ self.assertTrue(i in self.items)
+
+ def testItemAt(self):
+ #QGraphicsScene.itemAt()
+ self.assertEqual(self.scene.itemAt(50, 50, QTransform()), self.topleft)
+ self.assertEqual(self.scene.itemAt(150, 50, QTransform()), self.topright)
+ self.assertEqual(self.scene.itemAt(50, 150, QTransform()), self.bottomleft)
+ self.assertEqual(self.scene.itemAt(150, 150, QTransform()), self.bottomright)
+
+class TestGraphicsGroup(UsesQApplication):
+ def testIt(self):
+ scene = QGraphicsScene()
+ i1 = QGraphicsRectItem()
+ scene.addItem(i1)
+ i2 = QGraphicsRectItem(i1)
+ i3 = QGraphicsRectItem()
+ i4 = QGraphicsRectItem()
+ group = scene.createItemGroup((i2, i3, i4))
+ scene.removeItem(i1)
+ del i1 # this shouldn't delete i2
+ self.assertEqual(i2.scene(), scene)
+ scene.destroyItemGroup(group)
+ self.assertRaises(RuntimeError, group.type)
+
+ def testCustomScene(self): # For PYSIDE-868, see above
+ scene = CustomScene()
+ view = QGraphicsView(scene)
+ view.show()
+ while scene.dpi == 0:
+ QApplication.instance().processEvents()
+ view.hide()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qimage_test.py b/sources/pyside6/tests/QtWidgets/qimage_test.py
new file mode 100644
index 000000000..778b339d6
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qimage_test.py
@@ -0,0 +1,309 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QImage'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+from helper.helper import adjust_filename
+from helper.usesqapplication import UsesQApplication
+
+xpm = [
+ "27 22 206 2",
+ " c None",
+ ". c #FEFEFE",
+ "+ c #FFFFFF",
+ "@ c #F9F9F9",
+ "# c #ECECEC",
+ "$ c #D5D5D5",
+ "% c #A0A0A0",
+ "& c #767676",
+ "* c #525252",
+ "= c #484848",
+ "- c #4E4E4E",
+ "; c #555555",
+ "> c #545454",
+ ", c #5A5A5A",
+ "' c #4B4B4B",
+ ") c #4A4A4A",
+ "! c #4F4F4F",
+ "~ c #585858",
+ "{ c #515151",
+ "] c #4C4C4C",
+ "^ c #B1B1B1",
+ "/ c #FCFCFC",
+ "( c #FDFDFD",
+ "_ c #C1C1C1",
+ ": c #848484",
+ "< c #616161",
+ "[ c #5E5E5E",
+ "} c #CECECE",
+ "| c #E2E2E2",
+ "1 c #E4E4E4",
+ "2 c #DFDFDF",
+ "3 c #D2D2D2",
+ "4 c #D8D8D8",
+ "5 c #D4D4D4",
+ "6 c #E6E6E6",
+ "7 c #F1F1F1",
+ "8 c #838383",
+ "9 c #8E8E8E",
+ "0 c #8F8F8F",
+ "a c #CBCBCB",
+ "b c #CCCCCC",
+ "c c #E9E9E9",
+ "d c #F2F2F2",
+ "e c #EDEDED",
+ "f c #B5B5B5",
+ "g c #A6A6A6",
+ "h c #ABABAB",
+ "i c #BBBBBB",
+ "j c #B0B0B0",
+ "k c #EAEAEA",
+ "l c #6C6C6C",
+ "m c #BCBCBC",
+ "n c #F5F5F5",
+ "o c #FAFAFA",
+ "p c #B6B6B6",
+ "q c #F3F3F3",
+ "r c #CFCFCF",
+ "s c #FBFBFB",
+ "t c #CDCDCD",
+ "u c #DDDDDD",
+ "v c #999999",
+ "w c #F0F0F0",
+ "x c #2B2B2B",
+ "y c #C3C3C3",
+ "z c #A4A4A4",
+ "A c #D7D7D7",
+ "B c #E7E7E7",
+ "C c #6E6E6E",
+ "D c #9D9D9D",
+ "E c #BABABA",
+ "F c #AEAEAE",
+ "G c #898989",
+ "H c #646464",
+ "I c #BDBDBD",
+ "J c #CACACA",
+ "K c #2A2A2A",
+ "L c #212121",
+ "M c #B7B7B7",
+ "N c #F4F4F4",
+ "O c #737373",
+ "P c #828282",
+ "Q c #4D4D4D",
+ "R c #000000",
+ "S c #151515",
+ "T c #B2B2B2",
+ "U c #D6D6D6",
+ "V c #D3D3D3",
+ "W c #2F2F2F",
+ "X c #636363",
+ "Y c #A1A1A1",
+ "Z c #BFBFBF",
+ "` c #E0E0E0",
+ " . c #6A6A6A",
+ ".. c #050505",
+ "+. c #A3A3A3",
+ "@. c #202020",
+ "#. c #5F5F5F",
+ "$. c #B9B9B9",
+ "%. c #C7C7C7",
+ "&. c #D0D0D0",
+ "*. c #3E3E3E",
+ "=. c #666666",
+ "-. c #DBDBDB",
+ ";. c #424242",
+ ">. c #C2C2C2",
+ ",. c #1A1A1A",
+ "'. c #2C2C2C",
+ "). c #F6F6F6",
+ "!. c #AAAAAA",
+ "~. c #DCDCDC",
+ "{. c #2D2D2D",
+ "]. c #2E2E2E",
+ "^. c #A7A7A7",
+ "/. c #656565",
+ "(. c #333333",
+ "_. c #464646",
+ ":. c #C4C4C4",
+ "<. c #B8B8B8",
+ "[. c #292929",
+ "}. c #979797",
+ "|. c #EFEFEF",
+ "1. c #909090",
+ "2. c #8A8A8A",
+ "3. c #575757",
+ "4. c #676767",
+ "5. c #C5C5C5",
+ "6. c #7A7A7A",
+ "7. c #797979",
+ "8. c #989898",
+ "9. c #EEEEEE",
+ "0. c #707070",
+ "a. c #C8C8C8",
+ "b. c #111111",
+ "c. c #AFAFAF",
+ "d. c #474747",
+ "e. c #565656",
+ "f. c #E3E3E3",
+ "g. c #494949",
+ "h. c #5B5B5B",
+ "i. c #222222",
+ "j. c #353535",
+ "k. c #D9D9D9",
+ "l. c #0A0A0A",
+ "m. c #858585",
+ "n. c #E5E5E5",
+ "o. c #0E0E0E",
+ "p. c #9A9A9A",
+ "q. c #6F6F6F",
+ "r. c #868686",
+ "s. c #060606",
+ "t. c #1E1E1E",
+ "u. c #E8E8E8",
+ "v. c #A5A5A5",
+ "w. c #0D0D0D",
+ "x. c #030303",
+ "y. c #272727",
+ "z. c #131313",
+ "A. c #1F1F1F",
+ "B. c #757575",
+ "C. c #F7F7F7",
+ "D. c #414141",
+ "E. c #080808",
+ "F. c #6B6B6B",
+ "G. c #313131",
+ "H. c #C0C0C0",
+ "I. c #C9C9C9",
+ "J. c #0B0B0B",
+ "K. c #232323",
+ "L. c #434343",
+ "M. c #3D3D3D",
+ "N. c #282828",
+ "O. c #7C7C7C",
+ "P. c #252525",
+ "Q. c #3A3A3A",
+ "R. c #F8F8F8",
+ "S. c #1B1B1B",
+ "T. c #949494",
+ "U. c #3B3B3B",
+ "V. c #242424",
+ "W. c #383838",
+ "X. c #6D6D6D",
+ "Y. c #818181",
+ "Z. c #939393",
+ "`. c #9E9E9E",
+ " + c #929292",
+ ".+ c #7D7D7D",
+ "++ c #ADADAD",
+ "@+ c #DADADA",
+ "#+ c #919191",
+ "$+ c #E1E1E1",
+ "%+ c #BEBEBE",
+ "&+ c #ACACAC",
+ "*+ c #9C9C9C",
+ "=+ c #B3B3B3",
+ "-+ c #808080",
+ ";+ c #A8A8A8",
+ ">+ c #393939",
+ ",+ c #747474",
+ "'+ c #7F7F7F",
+ ")+ c #D1D1D1",
+ "!+ c #606060",
+ "~+ c #5C5C5C",
+ "{+ c #686868",
+ "]+ c #7E7E7E",
+ "^+ c #787878",
+ "/+ c #595959",
+ ". . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / . . + + ",
+ ". ( + _ : < [ & } | 1 2 $ 3 4 5 3 6 7 + + 8 9 + . + . ",
+ ". + 0 9 a ( 3 a b c d e c f g h i g j $ k + l m + . + ",
+ "+ 2 8 n o p | ( q r s . # t + + + u ^ v e w + x + + + ",
+ "+ y z . @ A k B 7 n + ( s | p 8 C D 2 E 4 + + F G + . ",
+ "# H I $ J G K L - M N . 2 O P Q R R S T U s s V W j + ",
+ "X Y Z @ o ` _ g ...+.( 4 @.#.m G $.%.7 &.X *.=.-.;.&.",
+ "Q >.C ,.'.} e + ).!.k + . + + . ~.{.> ].x f 7 ^./.k (.",
+ "_.:.4 @ <.[.}.|.1.2.+ + + >.} 4 B + ( @ _ 3.4.5.6.r 7.",
+ "3.8.9.~ 0.+ a.Q b.+ + c.d.#.=.$ |.b #.e.z ^ ; ^. .f.g.",
+ "-.h.+ i.S M + # p j.% n 9.5.k.H l.m.V ^.n.o.M + M p.q.",
+ "7 r.N s.1.R t.<.|.| u.v.~ w.x.E + s y.z.A.B.C.+ 5 D.q ",
+ ").p.2 E.0.9 F.%.O {._ @.+ + i { [ i.G.H.P I.+ s q.} + ",
+ ").p.6 J.R b.K.L.M.A.! b.g.K [.R M k + N.I + + >.O.+ . ",
+ ").8.9.N.P...R R R R E.t.W n.+ Q.R.6 @.| + . + S.+ + . ",
+ "n }.w T.U.B.<.i.@ Y + + U.+ c u V.= B B 7 u.W.c + . + ",
+ "N T.# + }.X.Y.,.8.F.8 Z.[.`. +.+}.4 ++@+O.< ~.+ ( . + ",
+ "d #+1 + _ ~.u.$+b $.y @+| $+%+I.&+k.h W +.9.+ ( . + . ",
+ "w 0 |.*+. >.<.=+++++p a.p -+;+5.k.>+,+@ + . . + . + + ",
+ "q '+9.R.^ I.t b %.I.)+4 $+n.I.,+ .|.+ . . . + . + + + ",
+ ". p !+( + + + + + + E 0. .-+8.f.+ + . . + + . + + + + ",
+ ". ( A ~+{+]+^+l > /+D f.c q . + . . + + . + + + + + + "
+]
+
+class QImageTest(UsesQApplication):
+ '''Test case for calling setPixel with float as argument'''
+
+ def testQImageStringBuffer(self):
+ '''Test if the QImage signatures receiving string buffers exist.'''
+ img0 = QImage(adjust_filename('sample.png', __file__))
+
+ # btw let's test the bits() method
+ img1 = QImage(img0.bits(), img0.width(), img0.height(), img0.format())
+ self.assertEqual(img0, img1)
+ img2 = QImage(img0.bits(), img0.width(), img0.height(), img0.bytesPerLine(), img0.format())
+ self.assertEqual(img0, img2)
+
+ ## test scanLine method
+ data1 = img0.scanLine(0)
+ data2 = img1.scanLine(0)
+ self.assertEqual(data1, data2)
+
+ def testEmptyBuffer(self):
+ img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32)
+
+ def testEmptyStringAsBuffer(self):
+ img = QImage(bytes('', "UTF-8"), 100, 100, QImage.Format_ARGB32)
+
+ def testXpmConstructor(self):
+ label = QLabel()
+ img = QImage(xpm)
+ self.assertFalse(img.isNull())
+ self.assertEqual(img.width(), 27)
+ self.assertEqual(img.height(), 22)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qinputdialog_get_test.py b/sources/pyside6/tests/QtWidgets/qinputdialog_get_test.py
new file mode 100644
index 000000000..a2df8e863
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qinputdialog_get_test.py
@@ -0,0 +1,58 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+from helper.timedqapplication import TimedQApplication
+
+class TestInputDialog(TimedQApplication):
+
+ def testGetDouble(self):
+ self.assertEqual(QtWidgets.QInputDialog.getDouble(None, "title", "label"), (0.0, False))
+
+ def testGetInt(self):
+ self.assertEqual(QtWidgets.QInputDialog.getInt(None, "title", "label"), (0, False))
+
+ def testGetItem(self):
+ (item, bool) = QtWidgets.QInputDialog.getItem(None, "title", "label", ["1", "2", "3"])
+ self.assertEqual(str(item), "1")
+
+ def testGetText(self):
+ (text, bool) = QtWidgets.QInputDialog.getText(None, "title", "label")
+ self.assertEqual(str(text),"")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qkeysequenceedit_test.py b/sources/pyside6/tests/QtWidgets/qkeysequenceedit_test.py
new file mode 100644
index 000000000..8591b4979
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qkeysequenceedit_test.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QKeySequenceEdit.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer
+from PySide6.QtWidgets import QKeySequenceEdit
+
+from helper.usesqapplication import UsesQApplication
+
+class QKeySequenceEditTest(UsesQApplication):
+ def testKeySequence(self):
+ keySequenceEdit = QKeySequenceEdit()
+ keySequenceEdit.show()
+ QTimer.singleShot(0, keySequenceEdit.close)
+ self.app.exec_()
+ print(keySequenceEdit.keySequence())
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlabel_test.py b/sources/pyside6/tests/QtWidgets/qlabel_test.py
new file mode 100644
index 000000000..bb8d39bcf
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlabel_test.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QLabel'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from PySide6.QtGui import QPixmap
+from PySide6.QtWidgets import QLabel
+import shiboken6 as shiboken
+
+from helper.usesqapplication import UsesQApplication
+
+class QLabelTest(UsesQApplication):
+ '''Test case for calling QLabel.setPixmap'''
+
+ def setUp(self):
+ super(QLabelTest, self).setUp()
+ self.label = QLabel()
+
+ def tearDown(self):
+ del self.label
+ super(QLabelTest, self).tearDown()
+
+ def testSetPixmap(self):
+
+ p1 = QPixmap(5, 5)
+ p2 = QPixmap(10, 10)
+
+ self.label.setPixmap(p1)
+ self.assertIsNotNone(self.label.pixmap())
+
+
+ # PYSIDE-150:
+ # When a new QPixmap is assigned to a QLabel,
+ # the previous one needs to be cleared.
+ # This means we should not keep a copy of the QPixmap
+ # on Python-side.
+
+ # Getting pointer to the QPixmap
+ ret_p = self.label.pixmap()
+ self.assertIsNot(p1, ret_p)
+ # Save the address of the pointer
+ ret_p_addr = shiboken.getCppPointer(ret_p)
+ # Remove the QPixmap
+ del ret_p
+ # Set new QPixmap
+ self.label.setPixmap(p2)
+
+ # There should be no pointers remaining with the same
+ # address that our QPixmap p1 because it was deleted
+ # using `del ret_p`
+ self.assertTrue(all(shiboken.getCppPointer(o) != ret_p_addr
+ for o in shiboken.getAllValidWrappers()))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlayout_ref_test.py b/sources/pyside6/tests/QtWidgets/qlayout_ref_test.py
new file mode 100644
index 000000000..717cd67b8
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlayout_ref_test.py
@@ -0,0 +1,185 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QLayout handling of child widgets references'''
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget
+from PySide6.QtWidgets import QStackedLayout, QFormLayout
+from PySide6.QtWidgets import QApplication, QPushButton, QLabel
+
+from helper.usesqapplication import UsesQApplication
+
+class SaveReference(UsesQApplication):
+ '''Test case to check if QLayout-derived classes increment the refcount
+ of widgets passed to addWidget()'''
+
+ # Adding here as nose can't see the qapplication attrib we inherit
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(SaveReference, self).setUp()
+ self.widget1 = QPushButton('click me')
+ self.widget2 = QLabel('aaa')
+
+ def tearDown(self):
+ #Release resources
+ del self.widget2
+ del self.widget1
+ super(SaveReference, self).tearDown()
+
+ def checkLayoutReference(self, layout):
+ #Checks the reference cound handling of layout.addWidget
+ self.assertEqual(getrefcount(self.widget1), 2)
+ layout.addWidget(self.widget1)
+ self.assertEqual(getrefcount(self.widget1), 3)
+
+ self.assertEqual(getrefcount(self.widget2), 2)
+ layout.addWidget(self.widget2)
+ self.assertEqual(getrefcount(self.widget2), 3)
+
+ # Check if doesn't mess around with previous widget refcount
+ self.assertEqual(getrefcount(self.widget1), 3)
+
+ def testMoveLayout(self):
+ l = QHBoxLayout()
+ self.assertEqual(getrefcount(self.widget1), 2)
+ l.addWidget(self.widget1)
+ self.assertEqual(getrefcount(self.widget1), 3)
+
+ w = QWidget()
+ w.setLayout(l)
+ self.assertEqual(getrefcount(self.widget1), 3)
+
+
+ def testHBoxReference(self):
+ #QHBoxLayout.addWidget reference count
+ w = QWidget()
+ self.checkLayoutReference(QHBoxLayout(w))
+
+ def testVBoxReference(self):
+ #QVBoxLayout.addWidget reference count
+ w = QWidget()
+ self.checkLayoutReference(QVBoxLayout(w))
+
+ def testGridReference(self):
+ #QGridLayout.addWidget reference count
+ w = QWidget()
+ self.checkLayoutReference(QGridLayout(w))
+
+ def testFormReference(self):
+ #QFormLayout.addWidget reference count
+ w = QWidget()
+ self.checkLayoutReference(QFormLayout(w))
+
+ def testStackedReference(self):
+ #QStackedLayout.addWidget reference count
+ w = QWidget()
+ self.checkLayoutReference(QStackedLayout(w))
+
+class MultipleAdd(UsesQApplication):
+ '''Test case to check if refcount is incremented only once when multiple
+ calls to addWidget are made with the same widget'''
+
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(MultipleAdd, self).setUp()
+ self.widget = QPushButton('click me')
+ self.win = QWidget()
+ self.layout = QHBoxLayout(self.win)
+
+ def tearDown(self):
+ #Release resources
+ del self.widget
+ del self.layout
+ del self.win
+ super(MultipleAdd, self).tearDown()
+
+ def testRefCount(self):
+ #Multiple QLayout.addWidget calls on the same widget
+ self.assertEqual(getrefcount(self.widget), 2)
+ self.layout.addWidget(self.widget)
+ self.assertEqual(getrefcount(self.widget), 3)
+ self.layout.addWidget(self.widget)
+ self.assertEqual(getrefcount(self.widget), 3)
+ self.layout.addWidget(self.widget)
+ self.assertEqual(getrefcount(self.widget), 3)
+
+class InternalAdd(UsesQApplication):
+ def testInternalRef(self):
+ mw = QWidget()
+ w = QWidget()
+ ow = QWidget()
+
+ topLayout = QGridLayout()
+
+ # unique reference
+ self.assertEqual(getrefcount(w), 2)
+ self.assertEqual(getrefcount(ow), 2)
+
+ topLayout.addWidget(w, 0, 0)
+ topLayout.addWidget(ow, 1, 0)
+
+ # layout keep the referemce
+ self.assertEqual(getrefcount(w), 3)
+ self.assertEqual(getrefcount(ow), 3)
+
+ mainLayout = QGridLayout()
+
+ mainLayout.addLayout(topLayout, 1, 0, 1, 4)
+
+ # the same reference
+ self.assertEqual(getrefcount(w), 3)
+ self.assertEqual(getrefcount(ow), 3)
+
+ mw.setLayout(mainLayout)
+
+ # now trasfer the ownership to mw
+ self.assertEqual(getrefcount(w), 3)
+ self.assertEqual(getrefcount(ow), 3)
+
+ del mw
+
+ # remove the ref and invalidate the widget
+ self.assertEqual(getrefcount(w), 2)
+ self.assertEqual(getrefcount(ow), 2)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlayout_test.py b/sources/pyside6/tests/QtWidgets/qlayout_test.py
new file mode 100644
index 000000000..f90627d0b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlayout_test.py
@@ -0,0 +1,145 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class MyLayout(QLayout):
+ def __init__(self, parent=None):
+ QLayout.__init__(self, parent)
+ self._list = []
+
+ def addItem(self, item):
+ self.add(item)
+
+ def addWidget(self, widget):
+ self.add(QWidgetItem(widget))
+
+ def itemAt(self, index):
+ if index < len(self._list):
+ return self._list[index]
+
+ return None
+
+ def count(self):
+ return len(self._list)
+
+ def add(self, item):
+ self._list.append(item)
+
+class MissingItemAtLayout(QLayout):
+ def __init__(self, parent=None):
+ QLayout.__init__(self, parent)
+ self._list = []
+
+ def addItem(self, item):
+ self.add(item)
+
+ def addWidget(self, widget):
+ self.add(QWidgetItem(widget))
+
+ def count(self):
+ return len(self._list)
+
+ def add(self, item):
+ self._list.append(item)
+
+#Test if a layout implemented in python, the QWidget.setLayout works
+#fine because this implement som layout functions used in glue code of
+#QWidget, then in c++ when call a virtual function this need call the QLayout
+#function implemented in python
+
+class QLayoutTest(UsesQApplication):
+ def testOwnershipTransfer(self):
+ b = QPushButton("teste")
+ l = MyLayout()
+
+ l.addWidget(b)
+
+ self.assertEqual(sys.getrefcount(b), 2)
+
+ w = QWidget()
+
+ #transfer ref
+ w.setLayout(l)
+
+ self.assertEqual(sys.getrefcount(b), 3)
+
+
+ def testReferenceTransfer(self):
+ b = QPushButton("teste")
+ l = QHBoxLayout()
+
+ # keep ref
+ l.addWidget(b)
+ self.assertEqual(sys.getrefcount(b), 3)
+
+ w = QWidget()
+
+ # transfer ref
+ w.setLayout(l)
+
+ self.assertEqual(sys.getrefcount(b), 3)
+
+ # release ref
+ del w
+
+ self.assertEqual(sys.getrefcount(b), 2)
+
+ def testMissingFunctions(self):
+ w = QWidget()
+ b = QPushButton("test")
+ l = MissingItemAtLayout()
+
+ l.addWidget(b)
+
+ self.assertRaises(RuntimeError, w.setLayout, l)
+
+ def testQFormLayout(self):
+ w = QWidget()
+ formLayout = QFormLayout()
+ spacer = QSpacerItem(100, 30)
+ formLayout.setItem(0, QFormLayout.SpanningRole, spacer)
+ w.setLayout(formLayout)
+ w.show()
+ QTimer.singleShot(10, w.close)
+ self.app.exec_()
+ del w
+ self.assertRaises(RuntimeError, spacer.isEmpty)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlcdnumber_test.py b/sources/pyside6/tests/QtWidgets/qlcdnumber_test.py
new file mode 100644
index 000000000..d4ed8e5dd
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlcdnumber_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication, QLCDNumber
+
+class QLCDNumberOverflow(unittest.TestCase):
+ '''Test case for unhandled overflow on QLCDNumber() numDigits argument (see bug #215).'''
+
+ def setUp(self):
+ self.app = QApplication([])
+
+ def testnumDigitsOverflow(self):
+ # NOTE: PyQt4 raises TypeError, but boost.python raises OverflowError
+ self.assertRaises(OverflowError, QLCDNumber, 840835495615213080)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlistwidget_test.py b/sources/pyside6/tests/QtWidgets/qlistwidget_test.py
new file mode 100644
index 000000000..912b2e74b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlistwidget_test.py
@@ -0,0 +1,94 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets, QtCore
+from helper.usesqapplication import UsesQApplication
+
+class QListWidgetTest(UsesQApplication):
+
+ def populateList(self, lst):
+ o = QtCore.QObject()
+ o.setObjectName("obj")
+
+ item = QtWidgets.QListWidgetItem("item0")
+ item.setData(QtCore.Qt.UserRole, o)
+ #item._data = o
+ self.assertTrue(sys.getrefcount(o), 3)
+ self.assertTrue(sys.getrefcount(item), 2)
+ lst.addItem(item)
+ self.assertTrue(sys.getrefcount(item), 3)
+
+ def checkCurrentItem(self, lst):
+ item = lst.currentItem()
+ self.assertTrue(sys.getrefcount(item), 3)
+
+ def checkItemData(self, lst):
+ item = lst.currentItem()
+ o = item.data(QtCore.Qt.UserRole)
+ self.assertTrue(sys.getrefcount(o), 4)
+ self.assertEqual(o, item._data)
+ self.assertTrue(sys.getrefcount(o), 2)
+
+ def testConstructorWithParent(self):
+ lst = QtWidgets.QListWidget()
+ self.populateList(lst)
+ self.checkCurrentItem(lst)
+ i = lst.item(0)
+ self.assertTrue(sys.getrefcount(i), 3)
+
+ del lst
+ self.assertTrue(sys.getrefcount(i), 2)
+ del i
+
+ def testIt(self):
+ lst = QtWidgets.QListWidget()
+ lst.show()
+ slot = lambda : lst.removeItemWidget(lst.currentItem())
+ lst.addItem(QtWidgets.QListWidgetItem("foo"))
+ QtCore.QTimer.singleShot(0, slot)
+ QtCore.QTimer.singleShot(0, lst.close)
+ self.app.exec_()
+ self.assertEqual(lst.count(), 1)
+
+ def testClear(self):
+ lst = QtWidgets.QListWidget()
+ lst.addItem("foo")
+ item = lst.item(0)
+ self.assertIsNone(lst.clear())
+ self.assertRaises(RuntimeError, lambda: item.text())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qlistwidgetitem_test.py b/sources/pyside6/tests/QtWidgets/qlistwidgetitem_test.py
new file mode 100644
index 000000000..550d77b41
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qlistwidgetitem_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+
+from helper.usesqapplication import UsesQApplication
+
+class QListWidgetItemConstructor(UsesQApplication):
+
+ def setUp(self):
+ super(QListWidgetItemConstructor, self).setUp()
+ self.widgetList = QtWidgets.QListWidget()
+
+ def tearDown(self):
+ del self.widgetList
+ super(QListWidgetItemConstructor, self).tearDown()
+
+ def testConstructorWithParent(self):
+ # Bug 235 - QListWidgetItem constructor not saving ownership
+ QtWidgets.QListWidgetItem(self.widgetList)
+ item = self.widgetList.item(0)
+ self.assertEqual(item.listWidget(), self.widgetList)
+
+ def testConstructorWithNone(self):
+ # Bug 452 - QListWidgetItem() not casting NoneType to null correctly.
+ item = QtWidgets.QListWidgetItem(None, 123)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qmainwindow_test.py b/sources/pyside6/tests/QtWidgets/qmainwindow_test.py
new file mode 100644
index 000000000..a25e4504b
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qmainwindow_test.py
@@ -0,0 +1,118 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+from PySide6 import QtCore
+
+from helper.usesqapplication import UsesQApplication
+
+class MainWindow(QtWidgets.QMainWindow):
+ def __init__(self):
+ QtWidgets.QMainWindow.__init__(self)
+
+ self.createToolbar()
+
+ def createToolbar(self):
+ pointerButton = QtWidgets.QToolButton()
+ pointerToolbar = self.addToolBar("Pointer type")
+ pointerToolbar.addWidget(pointerButton)
+
+class MyButton(QtWidgets.QPushButton):
+ def __init__(self, parent=None):
+ QtWidgets.QPushButton.__init__(self)
+ self._called = False
+
+ def myCallback(self):
+ self._called = True
+
+
+class TestMainWindow(UsesQApplication):
+
+ def testCreateToolbar(self):
+ w = MainWindow()
+ w.show()
+ QtCore.QTimer.singleShot(1000, self.app.quit)
+ self.app.exec_()
+
+ def objDel(self, obj):
+ self.app.quit()
+
+ def testRefCountToNull(self):
+ w = QtWidgets.QMainWindow()
+ c = QtWidgets.QWidget()
+ self.assertEqual(sys.getrefcount(c), 2)
+ w.setCentralWidget(c)
+ self.assertEqual(sys.getrefcount(c), 3)
+ wr = weakref.ref(c, self.objDel)
+ w.setCentralWidget(None)
+ c = None
+ self.app.exec_()
+
+ def testRefCountToAnother(self):
+ w = QtWidgets.QMainWindow()
+ c = QtWidgets.QWidget()
+ self.assertEqual(sys.getrefcount(c), 2)
+ w.setCentralWidget(c)
+ self.assertEqual(sys.getrefcount(c), 3)
+
+ c2 = QtWidgets.QWidget()
+ w.setCentralWidget(c2)
+ self.assertEqual(sys.getrefcount(c2), 3)
+
+ wr = weakref.ref(c, self.objDel)
+ w.setCentralWidget(None)
+ c = None
+
+ self.app.exec_()
+
+ def testSignalDisconect(self):
+ w = QtWidgets.QMainWindow()
+ b = MyButton("button")
+ b.clicked.connect(b.myCallback)
+ w.setCentralWidget(b)
+
+ b = MyButton("button")
+ b.clicked.connect(b.myCallback)
+ w.setCentralWidget(b)
+
+ b.click()
+ self.assertEqual(b._called, True)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qmenu_test.py b/sources/pyside6/tests/QtWidgets/qmenu_test.py
new file mode 100644
index 000000000..40cae96b1
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qmenu_test.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QMenu
+from PySide6.QtGui import QKeySequence, QIcon
+from PySide6.QtCore import SLOT
+
+from helper.usesqapplication import UsesQApplication
+
+class QMenuAddAction(UsesQApplication):
+
+ def setUp(self):
+ super(QMenuAddAction, self).setUp()
+ self.menu = QMenu()
+
+ def tearDown(self):
+ del self.menu
+ super(QMenuAddAction, self).tearDown()
+
+ def testAddActionWithoutKeySequenceCallable(self):
+ # bug #280
+ action = self.menu.addAction(self.app.tr('aaa'), lambda : 1)
+
+ def testAddActionKeySequenceCallable(self):
+ # bug #228
+ action = self.menu.addAction(self.app.tr('aaa'), lambda : 1,
+ QKeySequence(self.app.tr('Ctrl+O')))
+
+ def testAddActionKeySequenceSlot(self):
+ action = self.menu.addAction('Quit', self.app, SLOT('quit()'),
+ QKeySequence('Ctrl+O'))
+
+class QMenuAddActionWithIcon(UsesQApplication):
+
+ def setUp(self):
+ super(QMenuAddActionWithIcon, self).setUp()
+ self.menu = QMenu()
+ self.icon = QIcon()
+
+ def tearDown(self):
+ del self.menu
+ del self.icon
+ super(QMenuAddActionWithIcon, self).tearDown()
+
+ def testAddActionWithoutKeySequenceCallable(self):
+ # bug #280
+ action = self.menu.addAction(self.icon, self.app.tr('aaa'), lambda : 1)
+
+ def testAddActionKeySequenceCallable(self):
+ # bug #228
+ action = self.menu.addAction(self.icon, self.app.tr('aaa'), lambda : 1,
+ QKeySequence(self.app.tr('Ctrl+O')))
+
+ def testAddActionKeySequenceSlot(self):
+ action = self.menu.addAction(self.icon, 'Quit', self.app, SLOT('quit()'),
+ QKeySequence('Ctrl+O'))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qmenuadd_test.py b/sources/pyside6/tests/QtWidgets/qmenuadd_test.py
new file mode 100644
index 000000000..c74ba8adf
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qmenuadd_test.py
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test the QMenu.addAction() method'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+
+from helper.usesqapplication import UsesQApplication
+
+class QMenuAddAction(UsesQApplication):
+
+ def openFile(self, *args):
+ self.arg = args
+
+ def testQMenuAddAction(self):
+ fileMenu = QtWidgets.QMenu("&File")
+
+ addNewAction = fileMenu.addAction("&Open...", self.openFile)
+ addNewAction.trigger()
+ self.assertEqual(self.arg, ())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qobject_mi_test.py b/sources/pyside6/tests/QtWidgets/qobject_mi_test.py
new file mode 100644
index 000000000..2bd6947af
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qobject_mi_test.py
@@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for multiple inheritance from 2 QObjects'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+
+from helper.usesqapplication import UsesQApplication
+
+class WidgetValidator(QWidget, QIntValidator):
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+ QIntValidator.__init__(self, parent)
+
+
+class DoubleQObjectInheritanceTest(UsesQApplication):
+
+ def testDouble(self):
+ '''Double inheritance from QObject classes'''
+
+ obj = WidgetValidator()
+
+ #QObject methods
+ obj.setObjectName('aaaa')
+ self.assertEqual(obj.objectName(), 'aaaa')
+
+ #QWidget methods
+ obj.setVisible(False)
+ self.assertFalse(obj.isVisible())
+
+ #QIntValidator methods
+ state, string, number = obj.validate('aaaa', 0)
+ self.assertEqual(state, QValidator.Invalid)
+ state, string, number = obj.validate('33', 0)
+ self.assertEqual(state, QValidator.Acceptable)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qpen_test.py b/sources/pyside6/tests/QtWidgets/qpen_test.py
new file mode 100644
index 000000000..6bff44740
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qpen_test.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QPen, QPainter
+from PySide6.QtWidgets import QWidget
+
+class Painting(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.penFromEnum = None
+ self.penFromInteger = None
+
+ def paintEvent(self, event):
+ painter = QPainter(self)
+ painter.setPen(Qt.NoPen)
+ self.penFromEnum = painter.pen()
+ painter.setPen(int(Qt.NoPen))
+ self.penFromInteger = painter.pen()
+
+
+class QPenTest(UsesQApplication):
+
+ def testCtorWithCreatedEnums(self):
+ '''A simple case of QPen creation using created enums.'''
+ width = 0
+ style = Qt.PenStyle(0)
+ cap = Qt.PenCapStyle(0)
+ join = Qt.PenJoinStyle(0)
+ pen = QPen(Qt.blue, width, style, cap, join)
+
+ def testSetPenWithPenStyleEnum(self):
+ '''Calls QPainter.setPen with both enum and integer. Bug #511.'''
+ w = Painting()
+ w.show()
+ QTimer.singleShot(1000, self.app.quit)
+ self.app.exec_()
+ self.assertEqual(w.penFromEnum.style(), Qt.NoPen)
+ self.assertEqual(w.penFromInteger.style(), Qt.SolidLine)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qpicture_test.py b/sources/pyside6/tests/QtWidgets/qpicture_test.py
new file mode 100644
index 000000000..704a22d75
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qpicture_test.py
@@ -0,0 +1,71 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import QTimer
+from PySide6.QtGui import QPicture, QPainter
+from PySide6.QtWidgets import QWidget
+
+class MyWidget(QWidget):
+ def paintEvent(self, e):
+ p = QPainter(self)
+ p.drawPicture(0, 0, self._picture)
+ self._app.quit()
+
+class QPictureTest(UsesQApplication):
+ def testFromData(self):
+ picture = QPicture()
+ painter = QPainter()
+ painter.begin(picture)
+ painter.drawEllipse(10,20, 80,70)
+ painter.end()
+
+ data = picture.data()
+ picture2 = QPicture()
+ picture2.setData(data)
+
+ self.assertEqual(picture2.data(), picture.data())
+
+ w = MyWidget()
+ w._picture = picture2
+ w._app = self.app
+
+ QTimer.singleShot(300, w.show)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qpixmap_constructor.py b/sources/pyside6/tests/QtWidgets/qpixmap_constructor.py
new file mode 100644
index 000000000..4502885b7
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qpixmap_constructor.py
@@ -0,0 +1,285 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QPixmap
+from PySide6.QtWidgets import QLabel
+
+from helper.usesqapplication import UsesQApplication
+
+xpm = [
+ "27 22 206 2",
+ " c None",
+ ". c #FEFEFE",
+ "+ c #FFFFFF",
+ "@ c #F9F9F9",
+ "# c #ECECEC",
+ "$ c #D5D5D5",
+ "% c #A0A0A0",
+ "& c #767676",
+ "* c #525252",
+ "= c #484848",
+ "- c #4E4E4E",
+ "; c #555555",
+ "> c #545454",
+ ", c #5A5A5A",
+ "' c #4B4B4B",
+ ") c #4A4A4A",
+ "! c #4F4F4F",
+ "~ c #585858",
+ "{ c #515151",
+ "] c #4C4C4C",
+ "^ c #B1B1B1",
+ "/ c #FCFCFC",
+ "( c #FDFDFD",
+ "_ c #C1C1C1",
+ ": c #848484",
+ "< c #616161",
+ "[ c #5E5E5E",
+ "} c #CECECE",
+ "| c #E2E2E2",
+ "1 c #E4E4E4",
+ "2 c #DFDFDF",
+ "3 c #D2D2D2",
+ "4 c #D8D8D8",
+ "5 c #D4D4D4",
+ "6 c #E6E6E6",
+ "7 c #F1F1F1",
+ "8 c #838383",
+ "9 c #8E8E8E",
+ "0 c #8F8F8F",
+ "a c #CBCBCB",
+ "b c #CCCCCC",
+ "c c #E9E9E9",
+ "d c #F2F2F2",
+ "e c #EDEDED",
+ "f c #B5B5B5",
+ "g c #A6A6A6",
+ "h c #ABABAB",
+ "i c #BBBBBB",
+ "j c #B0B0B0",
+ "k c #EAEAEA",
+ "l c #6C6C6C",
+ "m c #BCBCBC",
+ "n c #F5F5F5",
+ "o c #FAFAFA",
+ "p c #B6B6B6",
+ "q c #F3F3F3",
+ "r c #CFCFCF",
+ "s c #FBFBFB",
+ "t c #CDCDCD",
+ "u c #DDDDDD",
+ "v c #999999",
+ "w c #F0F0F0",
+ "x c #2B2B2B",
+ "y c #C3C3C3",
+ "z c #A4A4A4",
+ "A c #D7D7D7",
+ "B c #E7E7E7",
+ "C c #6E6E6E",
+ "D c #9D9D9D",
+ "E c #BABABA",
+ "F c #AEAEAE",
+ "G c #898989",
+ "H c #646464",
+ "I c #BDBDBD",
+ "J c #CACACA",
+ "K c #2A2A2A",
+ "L c #212121",
+ "M c #B7B7B7",
+ "N c #F4F4F4",
+ "O c #737373",
+ "P c #828282",
+ "Q c #4D4D4D",
+ "R c #000000",
+ "S c #151515",
+ "T c #B2B2B2",
+ "U c #D6D6D6",
+ "V c #D3D3D3",
+ "W c #2F2F2F",
+ "X c #636363",
+ "Y c #A1A1A1",
+ "Z c #BFBFBF",
+ "` c #E0E0E0",
+ " . c #6A6A6A",
+ ".. c #050505",
+ "+. c #A3A3A3",
+ "@. c #202020",
+ "#. c #5F5F5F",
+ "$. c #B9B9B9",
+ "%. c #C7C7C7",
+ "&. c #D0D0D0",
+ "*. c #3E3E3E",
+ "=. c #666666",
+ "-. c #DBDBDB",
+ ";. c #424242",
+ ">. c #C2C2C2",
+ ",. c #1A1A1A",
+ "'. c #2C2C2C",
+ "). c #F6F6F6",
+ "!. c #AAAAAA",
+ "~. c #DCDCDC",
+ "{. c #2D2D2D",
+ "]. c #2E2E2E",
+ "^. c #A7A7A7",
+ "/. c #656565",
+ "(. c #333333",
+ "_. c #464646",
+ ":. c #C4C4C4",
+ "<. c #B8B8B8",
+ "[. c #292929",
+ "}. c #979797",
+ "|. c #EFEFEF",
+ "1. c #909090",
+ "2. c #8A8A8A",
+ "3. c #575757",
+ "4. c #676767",
+ "5. c #C5C5C5",
+ "6. c #7A7A7A",
+ "7. c #797979",
+ "8. c #989898",
+ "9. c #EEEEEE",
+ "0. c #707070",
+ "a. c #C8C8C8",
+ "b. c #111111",
+ "c. c #AFAFAF",
+ "d. c #474747",
+ "e. c #565656",
+ "f. c #E3E3E3",
+ "g. c #494949",
+ "h. c #5B5B5B",
+ "i. c #222222",
+ "j. c #353535",
+ "k. c #D9D9D9",
+ "l. c #0A0A0A",
+ "m. c #858585",
+ "n. c #E5E5E5",
+ "o. c #0E0E0E",
+ "p. c #9A9A9A",
+ "q. c #6F6F6F",
+ "r. c #868686",
+ "s. c #060606",
+ "t. c #1E1E1E",
+ "u. c #E8E8E8",
+ "v. c #A5A5A5",
+ "w. c #0D0D0D",
+ "x. c #030303",
+ "y. c #272727",
+ "z. c #131313",
+ "A. c #1F1F1F",
+ "B. c #757575",
+ "C. c #F7F7F7",
+ "D. c #414141",
+ "E. c #080808",
+ "F. c #6B6B6B",
+ "G. c #313131",
+ "H. c #C0C0C0",
+ "I. c #C9C9C9",
+ "J. c #0B0B0B",
+ "K. c #232323",
+ "L. c #434343",
+ "M. c #3D3D3D",
+ "N. c #282828",
+ "O. c #7C7C7C",
+ "P. c #252525",
+ "Q. c #3A3A3A",
+ "R. c #F8F8F8",
+ "S. c #1B1B1B",
+ "T. c #949494",
+ "U. c #3B3B3B",
+ "V. c #242424",
+ "W. c #383838",
+ "X. c #6D6D6D",
+ "Y. c #818181",
+ "Z. c #939393",
+ "`. c #9E9E9E",
+ " + c #929292",
+ ".+ c #7D7D7D",
+ "++ c #ADADAD",
+ "@+ c #DADADA",
+ "#+ c #919191",
+ "$+ c #E1E1E1",
+ "%+ c #BEBEBE",
+ "&+ c #ACACAC",
+ "*+ c #9C9C9C",
+ "=+ c #B3B3B3",
+ "-+ c #808080",
+ ";+ c #A8A8A8",
+ ">+ c #393939",
+ ",+ c #747474",
+ "'+ c #7F7F7F",
+ ")+ c #D1D1D1",
+ "!+ c #606060",
+ "~+ c #5C5C5C",
+ "{+ c #686868",
+ "]+ c #7E7E7E",
+ "^+ c #787878",
+ "/+ c #595959",
+ ". . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / . . + + ",
+ ". ( + _ : < [ & } | 1 2 $ 3 4 5 3 6 7 + + 8 9 + . + . ",
+ ". + 0 9 a ( 3 a b c d e c f g h i g j $ k + l m + . + ",
+ "+ 2 8 n o p | ( q r s . # t + + + u ^ v e w + x + + + ",
+ "+ y z . @ A k B 7 n + ( s | p 8 C D 2 E 4 + + F G + . ",
+ "# H I $ J G K L - M N . 2 O P Q R R S T U s s V W j + ",
+ "X Y Z @ o ` _ g ...+.( 4 @.#.m G $.%.7 &.X *.=.-.;.&.",
+ "Q >.C ,.'.} e + ).!.k + . + + . ~.{.> ].x f 7 ^./.k (.",
+ "_.:.4 @ <.[.}.|.1.2.+ + + >.} 4 B + ( @ _ 3.4.5.6.r 7.",
+ "3.8.9.~ 0.+ a.Q b.+ + c.d.#.=.$ |.b #.e.z ^ ; ^. .f.g.",
+ "-.h.+ i.S M + # p j.% n 9.5.k.H l.m.V ^.n.o.M + M p.q.",
+ "7 r.N s.1.R t.<.|.| u.v.~ w.x.E + s y.z.A.B.C.+ 5 D.q ",
+ ").p.2 E.0.9 F.%.O {._ @.+ + i { [ i.G.H.P I.+ s q.} + ",
+ ").p.6 J.R b.K.L.M.A.! b.g.K [.R M k + N.I + + >.O.+ . ",
+ ").8.9.N.P...R R R R E.t.W n.+ Q.R.6 @.| + . + S.+ + . ",
+ "n }.w T.U.B.<.i.@ Y + + U.+ c u V.= B B 7 u.W.c + . + ",
+ "N T.# + }.X.Y.,.8.F.8 Z.[.`. +.+}.4 ++@+O.< ~.+ ( . + ",
+ "d #+1 + _ ~.u.$+b $.y @+| $+%+I.&+k.h W +.9.+ ( . + . ",
+ "w 0 |.*+. >.<.=+++++p a.p -+;+5.k.>+,+@ + . . + . + + ",
+ "q '+9.R.^ I.t b %.I.)+4 $+n.I.,+ .|.+ . . . + . + + + ",
+ ". p !+( + + + + + + E 0. .-+8.f.+ + . . + + . + + + + ",
+ ". ( A ~+{+]+^+l > /+D f.c q . + . . + + . + + + + + + "
+]
+
+class QStringSequenceTest(UsesQApplication):
+ def testQPixmapConstructor(self):
+ label = QLabel()
+ pixmap1 = QPixmap(xpm)
+ self.assertFalse(pixmap1.isNull())
+ self.assertEqual(pixmap1.width(), 27)
+ self.assertEqual(pixmap1.height(), 22)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qpushbutton_test.py b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py
new file mode 100644
index 000000000..0c73670a5
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qpushbutton_test.py
@@ -0,0 +1,75 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtWidgets import QPushButton, QMenu, QWidget
+from PySide6.QtCore import QTimer
+
+class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ m = QMenu(self)
+ b = QPushButton("Hello", self)
+ b.setMenu(m)
+
+
+class QPushButtonTest(UsesQApplication):
+ def createMenu(self, button):
+ m = QMenu()
+ button.setMenu(m)
+
+ def testSetMenu(self):
+ w = MyWidget()
+ w.show()
+
+ timer = QTimer.singleShot(100, self.app.quit)
+ self.app.exec_()
+
+ def buttonCb(self, checked):
+ self._clicked = True
+
+ def testBoolinSignal(self):
+ b = QPushButton()
+ b.setCheckable(True)
+ self._clicked = False
+ b.toggled[bool].connect(self.buttonCb)
+ b.toggle()
+ self.assertTrue(self._clicked)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qshortcut_test.py b/sources/pyside6/tests/QtWidgets/qshortcut_test.py
new file mode 100644
index 000000000..8f9c8a465
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qshortcut_test.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test the QShortcut constructor'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QKeySequence, QShortcut
+from PySide6.QtWidgets import QApplication, QWidget
+
+class Foo(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+ self.ok = False
+ self.copy = False
+
+ def slot_of_foo(self):
+ self.ok = True
+
+ def slot_of_copy(self):
+ self.copy = True
+
+class MyShortcut(QShortcut):
+ def __init__(self, keys, wdg, slot):
+ QShortcut.__init__(self, keys, wdg, slot)
+
+ def emit_signal(self):
+ self.activated.emit()
+
+class QAppPresence(unittest.TestCase):
+
+ def testQShortcut(self):
+ self.qapp = QApplication([])
+ f = Foo()
+
+ self.sc = MyShortcut(QKeySequence(Qt.Key_Return), f, f.slot_of_foo)
+ self.scstd = MyShortcut(QKeySequence.Copy, f, f.slot_of_copy)
+ QTimer.singleShot(0, self.init);
+ self.qapp.exec_()
+ self.assertEqual(f.ok, True)
+ self.assertEqual(f.copy, True)
+
+ def init(self):
+ self.sc.emit_signal();
+ self.scstd.emit_signal();
+ self.qapp.quit()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qsplitter_test.py b/sources/pyside6/tests/QtWidgets/qsplitter_test.py
new file mode 100644
index 000000000..413bd7a30
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qsplitter_test.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QSplitter
+
+from helper.usesqapplication import UsesQApplication
+
+class QSplitterTest(UsesQApplication):
+
+ def testGetRange(self):
+ splitter = QSplitter()
+ _min, _max = splitter.getRange(0)
+ self.assertTrue(isinstance(_min, int))
+ self.assertTrue(isinstance(_max, int))
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qstandarditemmodel_test.py b/sources/pyside6/tests/QtWidgets/qstandarditemmodel_test.py
new file mode 100644
index 000000000..b252982e0
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qstandarditemmodel_test.py
@@ -0,0 +1,106 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QStandardItemModel, QStandardItem
+from PySide6.QtWidgets import QWidget
+import shiboken6 as shiboken
+
+from helper.usesqapplication import UsesQApplication
+
+
+class QStandardItemModelTest(UsesQApplication):
+
+ def setUp(self):
+ super(QStandardItemModelTest, self).setUp()
+ self.window = QWidget()
+ self.model = QStandardItemModel(0, 3, self.window)
+
+ def tearDown(self):
+ del self.window
+ del self.model
+ super(QStandardItemModelTest, self).tearDown()
+
+ def testInsertRow(self):
+ # bug #227
+ self.model.insertRow(0)
+
+ def testClear(self):
+
+ model = QStandardItemModel()
+ root = model.invisibleRootItem()
+ model.clear()
+ self.assertFalse(shiboken.isValid(root))
+
+
+class QStandardItemModelRef(UsesQApplication):
+ def testRefCount(self):
+ model = QStandardItemModel(5, 5)
+ items = []
+ for r in range(5):
+ row = []
+ for c in range(5):
+ row.append(QStandardItem("%d,%d" % (r,c)) )
+ self.assertEqual(sys.getrefcount(row[c]), 2)
+
+ model.insertRow(r, row)
+
+ for c in range(5):
+ ref_after = sys.getrefcount(row[c])
+ # check if the ref count was incremented after insertRow
+ self.assertEqual(ref_after, 3)
+
+ items.append(row)
+ row = None
+
+ for r in range(3):
+ my_row = model.takeRow(0)
+ my_row = None
+ for c in range(5):
+ # only rest 1 reference
+ self.assertEqual(sys.getrefcount(items[r][c]), 2)
+
+ my_i = model.item(0,0)
+ # ref(my_i) + parent_ref + items list ref
+ self.assertEqual(sys.getrefcount(my_i), 4)
+
+ model.clear()
+ # ref(my_i)
+ self.assertEqual(sys.getrefcount(my_i), 3)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qstring_qkeysequence_test.py b/sources/pyside6/tests/QtWidgets/qstring_qkeysequence_test.py
new file mode 100644
index 000000000..3445db447
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qstring_qkeysequence_test.py
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Tests conversions of QString to and from QKeySequence.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtGui import QAction, QKeySequence
+
+
+class QStringQKeySequenceTest(UsesQApplication):
+ '''Tests conversions of QString to and from QKeySequence.'''
+
+ def testQStringFromQKeySequence(self):
+ '''Creates a QString from a QKeySequence.'''
+ keyseq = 'Ctrl+A'
+ a = QKeySequence(keyseq)
+ self.assertEqual(a, keyseq)
+
+ def testPythonStringAsQKeySequence(self):
+ '''Passes a Python string to an argument expecting a QKeySequence.'''
+ keyseq = 'Ctrl+A'
+ action = QAction(None)
+ action.setShortcut(keyseq)
+ shortcut = action.shortcut()
+ self.assertTrue(isinstance(shortcut, QKeySequence))
+ self.assertEqual(shortcut.toString(), keyseq)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qstyle_test.py b/sources/pyside6/tests/QtWidgets/qstyle_test.py
new file mode 100644
index 000000000..5d86e3d71
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qstyle_test.py
@@ -0,0 +1,98 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+
+from PySide6.QtGui import QWindow
+from PySide6.QtWidgets import (QApplication, QFontComboBox, QLabel, QProxyStyle,
+ QStyleFactory, QWidget)
+
+class ProxyStyle(QProxyStyle):
+
+ def __init__(self, style):
+ QProxyStyle.__init__(self, style)
+ self.polished = 0
+
+ def polish(self, widget):
+ self.polished = self.polished + 1
+ super(ProxyStyle, self).polish(widget)
+
+
+class SetStyleTest(UsesQApplication):
+ '''Tests setting the same QStyle for all objects in a UI hierarchy.'''
+
+ def testSetStyle(self):
+ '''All this test have to do is not break with some invalid Python wrapper.'''
+
+ def setStyleHelper(widget, style):
+ widget.setStyle(style)
+ widget.setPalette(style.standardPalette())
+ for child in widget.children():
+ if isinstance(child, QWidget):
+ setStyleHelper(child, style)
+
+ container = QWidget()
+ # QFontComboBox is used because it has an QLineEdit created in C++ inside it,
+ # and if the QWidget.setStyle(style) steals the ownership of the style
+ # for the C++ originated widget everything will break.
+ fontComboBox = QFontComboBox(container)
+ label = QLabel(container)
+ label.setText('Label')
+ style = QStyleFactory.create(QStyleFactory.keys()[0])
+ setStyleHelper(container, style)
+
+ def testSetProxyStyle(self):
+ label = QLabel("QtWidgets/ProxyStyle test")
+ baseStyle = QStyleFactory.create(QApplication.instance().style().objectName())
+ self.assertTrue(baseStyle)
+ proxyStyle = ProxyStyle(baseStyle)
+ label.setStyle(proxyStyle)
+ label.show()
+ while not label.windowHandle().isExposed():
+ QApplication.instance().processEvents()
+ self.assertTrue(proxyStyle.polished > 0)
+
+ def testSetStyleOwnership(self):
+ style = QStyleFactory.create(QStyleFactory.keys()[0])
+ self.assertEqual(sys.getrefcount(style), 2)
+ QApplication.instance().setStyle(style)
+ self.assertEqual(sys.getrefcount(style), 3)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qtableview_test.py b/sources/pyside6/tests/QtWidgets/qtableview_test.py
new file mode 100644
index 000000000..a6117f180
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtableview_test.py
@@ -0,0 +1,50 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QAbstractTableModel
+from PySide6.QtWidgets import QTableWidget
+from helper.usesqapplication import UsesQApplication
+
+class QPenTest(UsesQApplication):
+
+ def testItemModel(self):
+ tv = QTableWidget()
+
+ self.assertEqual(type(tv.model()), QAbstractTableModel)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qtabwidget_test.py b/sources/pyside6/tests/QtWidgets/qtabwidget_test.py
new file mode 100644
index 000000000..b5f5bb463
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtabwidget_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import *
+from helper.timedqapplication import TimedQApplication
+
+def makeBug643(tab):
+ button = QPushButton('Foo')
+ tab.insertTab(0, button, 'Foo')
+
+class RemoveTabMethod(TimedQApplication):
+ def setUp(self):
+ TimedQApplication.setUp(self)
+ self.tab = QTabWidget()
+
+ def tearDown(self):
+ del self.tab
+ TimedQApplication.tearDown(self)
+
+
+ def testRemoveTabPresence(self):
+ self.assertTrue(getattr(self.tab, 'removeTab'))
+
+ def testInsertTab(self):
+ makeBug643(self.tab)
+ self.assertEqual(self.tab.count(), 1)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py b/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py
new file mode 100644
index 000000000..6177c2452
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtabwidgetclear_test.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QMainWindow, QTabWidget, QTextEdit, QSplitter
+from helper.usesqapplication import UsesQApplication
+
+class TabWidgetClear(QMainWindow):
+ def __init__(self):
+ QMainWindow.__init__(self)
+ self.tabWidget = QTabWidget(self)
+ self.setCentralWidget(self.tabWidget)
+ self.editBox = QTextEdit(self)
+ self.tabWidget.addTab(self.getSplitter(), 'Test')
+
+ def getSplitter(self):
+ splitter = QSplitter()
+ splitter.addWidget(self.editBox)
+ return splitter
+
+ def toggle(self):
+ self.tabWidget.clear()
+ self.getSplitter()
+
+class TestTabWidgetClear(UsesQApplication):
+
+ def testClear(self):
+ self.window = TabWidgetClear()
+ self.window.show()
+ try:
+ self.window.toggle()
+ except RuntimeError as e:
+ # This should never happened, PYSIDE-213
+ raise e
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py b/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py
new file mode 100644
index 000000000..78507a61a
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtextedit_signal_test.py
@@ -0,0 +1,72 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+from helper.usesqapplication import UsesQApplication
+
+
+class MyWindow(QtWidgets.QMainWindow):
+ appendText = QtCore.Signal(str)
+
+ @QtCore.Slot()
+ def onButtonPressed(self):
+ self.appendText.emit("PySide")
+
+ def __init__(self, parent=None):
+ super(MyWindow, self).__init__(parent)
+
+ self.textEdit = QtWidgets.QTextEdit()
+ self.btn = QtWidgets.QPushButton("ClickMe")
+ self.btn.clicked.connect(self.onButtonPressed)
+ self.appendText.connect(self.textEdit.append)
+
+ def start(self):
+ self.btn.click()
+
+ def text(self):
+ return self.textEdit.toPlainText()
+
+
+class testSignalWithCPPSlot(UsesQApplication):
+
+ def testEmission(self):
+ w = MyWindow()
+ w.start()
+ self.assertEqual(w.text(), "PySide")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qtextedit_test.py b/sources/pyside6/tests/QtWidgets/qtextedit_test.py
new file mode 100644
index 000000000..80ca9bb82
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtextedit_test.py
@@ -0,0 +1,67 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QTextEdit and ownership problems.'''
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QTextEdit
+
+from helper.usesqapplication import UsesQApplication
+
+class DontTouchReference(UsesQApplication):
+ '''Check if the QTextTable returned by QTextCursor.insertTable() is not
+ referenced by the QTextCursor that returns it.'''
+
+ def setUp(self):
+ super(DontTouchReference, self).setUp()
+ self.editor = QTextEdit()
+ self.cursor = self.editor.textCursor()
+ self.table = self.cursor.insertTable(1, 1)
+
+ def testQTextTable(self):
+ # methods which return QTextTable should not increment its reference
+ self.assertEqual(getrefcount(self.table), 2)
+ f = self.cursor.currentFrame()
+ del f
+ self.assertEqual(getrefcount(self.table), 2)
+ # destroying the cursor should not raise any "RuntimeError: internal
+ # C++ object already deleted." when accessing the QTextTable
+ del self.cursor
+ self.assertEqual(getrefcount(self.table), 2)
+ cell = self.table.cellAt(0, 0)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtoolbar_test.py b/sources/pyside6/tests/QtWidgets/qtoolbar_test.py
new file mode 100644
index 000000000..95ef3dc83
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtoolbar_test.py
@@ -0,0 +1,69 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QToolbar'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import QToolBar, QMainWindow
+
+from helper.usesqapplication import UsesQApplication
+
+class AddActionText(UsesQApplication):
+ '''Test case for calling QToolbar.addAction passing a text'''
+
+ def setUp(self):
+ #Acquire resources
+ super(AddActionText, self).setUp()
+ self.window = QMainWindow()
+ self.toolbar = QToolBar()
+ self.window.addToolBar(self.toolbar)
+
+ def tearDown(self):
+ #Release resources
+ super(AddActionText, self).tearDown()
+ del self.toolbar
+ del self.window
+
+ def testText(self):
+ #QToolBar.addAction(text) - add a QToolButton
+ self.toolbar.addAction('aaaa')
+ self.assertEqual(len(self.toolbar.actions()), 1)
+ action = self.toolbar.actions()[0]
+ self.assertTrue(isinstance(action, QAction))
+ self.assertEqual(action.text(), 'aaaa')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtoolbox_test.py b/sources/pyside6/tests/QtWidgets/qtoolbox_test.py
new file mode 100644
index 000000000..1ad8fdc6d
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtoolbox_test.py
@@ -0,0 +1,65 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import QToolBox, QWidget
+
+from helper.usesqapplication import UsesQApplication
+
+class OwnershipControl(UsesQApplication):
+
+ def setUp(self):
+ super(OwnershipControl, self).setUp()
+ self.toolbox = QToolBox()
+
+ def tearDown(self):
+ del self.toolbox
+ super(OwnershipControl, self).tearDown()
+
+ def testAddItem(self):
+ # Was losing ownership of the widget.
+ index = self.toolbox.addItem(QWidget(), 'item')
+ item = self.toolbox.widget(index)
+ self.assertTrue(isinstance(item, QWidget))
+
+ def testAddItemWithIcon(self):
+ index = self.toolbox.addItem(QWidget(), QIcon(), 'item')
+ item = self.toolbox.widget(index)
+ self.assertTrue(isinstance(item, QWidget))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtreeview_test.py b/sources/pyside6/tests/QtWidgets/qtreeview_test.py
new file mode 100644
index 000000000..d9ad48227
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtreeview_test.py
@@ -0,0 +1,102 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QStandardItemModel
+from PySide6.QtWidgets import (QWidget, QTreeView, QVBoxLayout,
+ QStyledItemDelegate, QHeaderView)
+from PySide6.QtCore import Qt
+from helper.usesqapplication import UsesQApplication
+
+class Widget(QWidget):
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+ self.treeView = QTreeView(self)
+ layout = QVBoxLayout()
+ layout.addWidget(self.treeView)
+ self.setLayout(layout)
+ self.treeView.setModel(QStandardItemModel())
+
+ self.treeView.model().setHorizontalHeaderLabels(('3', '1', '5'))
+
+class QWidgetTest(UsesQApplication):
+
+ def testDelegates(self):
+ widget = Widget()
+ t = widget.treeView
+
+ # When calling setItemDelegateForColumn using a separate variable
+ # for the second argument (QAbstractItemDelegate), there was no problem
+ # on keeping the reference to this object, since the variable was kept
+ # alive (case A)
+ # Contrary, when instantiating this argument on the function call
+ # Using QStyledItemDelegate inside the call the reference of the
+ # object was lost, causing a segfault. (case B)
+
+ # Case A
+ d = QStyledItemDelegate()
+ # Using QStyledItemDelegate from a variable so we keep the reference alive
+ # and we encounter no segfault.
+ t.setItemDelegateForColumn(0, d)
+ # This raised the Segmentation Fault too, because manually destroying
+ # the object caused a missing refrence.
+ del d
+
+ # Getting the delegates
+ a = t.itemDelegateForColumn(0)
+ self.assertIsInstance(a, QStyledItemDelegate)
+
+ # Case B
+ t.setItemDelegateForColumn(1, QStyledItemDelegate())
+
+ # Getting the delegates
+ b = t.itemDelegateForColumn(1)
+ self.assertIsInstance(b, QStyledItemDelegate)
+
+ # Test for Rows
+ t.setItemDelegateForRow(0, QStyledItemDelegate())
+ self.assertIsInstance(t.itemDelegateForRow(0), QStyledItemDelegate)
+
+ # Test for general delegate
+ t.setItemDelegate(QStyledItemDelegate())
+ self.assertIsInstance(t.itemDelegate(), QStyledItemDelegate)
+
+ def testHeader(self):
+ tree = QTreeView()
+ tree.setHeader(QHeaderView(Qt.Horizontal))
+ self.assertIsNotNone(tree.header())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtreewidget_test.py b/sources/pyside6/tests/QtWidgets/qtreewidget_test.py
new file mode 100644
index 000000000..23ee01919
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtreewidget_test.py
@@ -0,0 +1,70 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QTreeWidget, QTreeWidgetItem, QPushButton
+from helper.usesqapplication import UsesQApplication
+
+class QTreeWidgetTest(UsesQApplication):
+
+ # PYSIDE-73:
+ # There was a problem when adding items to a QTreeWidget
+ # when the Widget was being build on the method call instead
+ # of as a separate variable.
+ # The problem was there was not ownership transfer, so the
+ # QTreeWidget did not own the QWidget element
+ def testSetItemWidget(self):
+
+ treeWidget = QTreeWidget()
+ treeWidget.setColumnCount(2)
+
+ item = QTreeWidgetItem(['text of column 0', ''])
+ treeWidget.insertTopLevelItem(0, item)
+ # Adding QPushButton inside the method
+ treeWidget.setItemWidget(item, 1,
+ QPushButton('Push button on column 1'))
+
+ # Getting the widget back
+ w = treeWidget.itemWidget(treeWidget.itemAt(0,1), 1)
+ self.assertIsInstance(w, QPushButton)
+
+ p = QPushButton('New independent button')
+ # Adding QPushButton object from variable
+ treeWidget.setItemWidget(item, 0, p)
+ w = treeWidget.itemWidget(treeWidget.itemAt(0,0), 0)
+ self.assertIsInstance(w, QPushButton)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qtreewidgetitem_test.py b/sources/pyside6/tests/QtWidgets/qtreewidgetitem_test.py
new file mode 100644
index 000000000..9edd6bee6
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qtreewidgetitem_test.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of PySide6.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+Unit tests for QTreeWidgetItem
+------------------------------
+
+This test is actually meant for all types which provide `tp_richcompare`
+but actually define something without providing `==` or `!=` operators.
+QTreeWidgetItem for instance defines `<` only.
+
+PYSIDE-74: We redirect to type `object`s handling which is anyway the default
+ when `tp_richcompare` is undefined.
+"""
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+
+
+class QTreeWidgetItemTest(unittest.TestCase):
+ def testClass(self):
+ app = QtWidgets.QApplication([])
+ treewidget = QtWidgets.QTreeWidget()
+ item = QtWidgets.QTreeWidgetItem(["Words and stuff"])
+ item2 = QtWidgets.QTreeWidgetItem(["More words!"])
+ treewidget.insertTopLevelItem(0, item)
+
+ dummy_list = ["Numbers", "Symbols", "Spam"]
+ self.assertFalse(item in dummy_list)
+ self.assertTrue(item not in dummy_list)
+ self.assertFalse(item == item2)
+ self.assertTrue(item != item2)
+ treewidget.show()
+ QtCore.QTimer.singleShot(500, app.quit)
+ app.exec_()
+
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qvariant_test.py b/sources/pyside6/tests/QtWidgets/qvariant_test.py
new file mode 100644
index 000000000..51ee27ec0
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qvariant_test.py
@@ -0,0 +1,83 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import (QApplication, QComboBox, QGraphicsScene,
+ QGraphicsRectItem)
+
+from helper.usesqapplication import UsesQApplication
+
+class MyDiagram(QGraphicsScene):
+ pass
+
+class MyItem(QGraphicsRectItem):
+ def itemChange(self, change, value):
+ return value;
+
+class Sequence(object):
+ # Having the __getitem__ method on a class transform the Python
+ # type to a PySequence.
+ # Before the patch: aa75437f9119d997dd290471ac3e2cc88ca88bf1
+ # "Fix QVariant conversions when using PySequences"
+ # one could not use an object from this class, because internally
+ # we were requiring that the PySequence was finite.
+ def __getitem__(self, key):
+ raise IndexError()
+
+class QGraphicsSceneOnQVariantTest(UsesQApplication):
+ """Test storage ot QGraphicsScene into QVariants"""
+ def setUp(self):
+ super(QGraphicsSceneOnQVariantTest, self).setUp()
+ self.s = MyDiagram()
+ self.i = MyItem()
+ self.combo = QComboBox()
+
+ def tearDown(self):
+ del self.s
+ del self.i
+ del self.combo
+ super(QGraphicsSceneOnQVariantTest, self).tearDown()
+
+ def testIt(self):
+ self.s.addItem(self.i)
+ self.assertEqual(len(self.s.items()), 1)
+
+ def testSequence(self):
+ # PYSIDE-641
+ self.combo.addItem("test", userData=Sequence())
+ self.assertTrue(isinstance(self.combo.itemData(0), Sequence))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/qwidget_setlayout_test.py b/sources/pyside6/tests/QtWidgets/qwidget_setlayout_test.py
new file mode 100644
index 000000000..6bb292f26
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qwidget_setlayout_test.py
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QWidget, QVBoxLayout, QPushButton, QApplication, QHBoxLayout
+from helper.usesqapplication import UsesQApplication
+
+class QWidgetTest(UsesQApplication):
+
+ def test_setLayout(self):
+ layout = QVBoxLayout()
+ btn1 = QPushButton("button_v1")
+ layout.addWidget(btn1)
+
+ btn2 = QPushButton("button_v2")
+ layout.addWidget(btn2)
+
+ layout2 = QHBoxLayout()
+
+ btn1 = QPushButton("button_h1")
+ layout2.addWidget(btn1)
+
+ btn2 = QPushButton("button_h2")
+ layout2.addWidget(btn2)
+
+ layout.addLayout(layout2)
+
+ widget = QWidget()
+ widget.setLayout(layout)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/qwidget_test.py b/sources/pyside6/tests/QtWidgets/qwidget_test.py
new file mode 100644
index 000000000..a2b8e8b94
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/qwidget_test.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QWidget, QMainWindow
+from helper.usesqapplication import UsesQApplication
+
+class QWidgetInherit(QMainWindow):
+ def __init__(self):
+ QWidget.__init__(self)
+
+class NativeEventTestWidget(QWidget):
+
+ nativeEventCount = 0
+
+ def __init__(self):
+ QWidget.__init__(self)
+
+ def nativeEvent(self, eventType, message):
+ self.nativeEventCount = self.nativeEventCount + 1
+ return [False, 0]
+
+class QWidgetTest(UsesQApplication):
+
+ def testInheritance(self):
+ self.assertRaises(TypeError, QWidgetInherit)
+
+class QWidgetVisible(UsesQApplication):
+
+ def testBasic(self):
+ # Also related to bug #244, on existence of setVisible'''
+ widget = NativeEventTestWidget()
+ self.assertTrue(not widget.isVisible())
+ widget.setVisible(True)
+ self.assertTrue(widget.isVisible())
+ self.assertTrue(widget.winId() is not 0)
+ # skip this test on macOS since no native events are received
+ if sys.platform == 'darwin':
+ return
+ for i in range(10):
+ if widget.nativeEventCount > 0:
+ break
+ self.app.processEvents()
+ self.assertTrue(widget.nativeEventCount > 0)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/reference_count_test.py b/sources/pyside6/tests/QtWidgets/reference_count_test.py
new file mode 100644
index 000000000..113d5b5b6
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/reference_count_test.py
@@ -0,0 +1,102 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for Reference count when the object is created in c++ side'''
+
+import gc
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Qt, QPointF
+from PySide6.QtGui import QPolygonF
+from PySide6.QtWidgets import QApplication, QGraphicsScene, QGraphicsRectItem, QGraphicsPolygonItem, QGraphicsRectItem
+
+from helper.usesqapplication import UsesQApplication
+
+destroyedRect = False
+destroyedPol = False
+
+def rect_del(o):
+ global destroyedRect
+ destroyedRect = True
+
+def pol_del(o):
+ global destroyedPol
+ destroyedPol = True
+
+class ReferenceCount(UsesQApplication):
+
+ def setUp(self):
+ super(ReferenceCount, self).setUp()
+ self.scene = QGraphicsScene()
+
+ def tearDown(self):
+ super(ReferenceCount, self).tearDown()
+
+ def beforeTest(self):
+ points = [QPointF(0, 0), QPointF(100, 100), QPointF(0, 100)]
+ pol = self.scene.addPolygon(QPolygonF(points))
+ self.assertTrue(isinstance(pol, QGraphicsPolygonItem))
+ self.wrp = weakref.ref(pol, pol_del)
+
+ #refcount need be 3 because one ref for QGraphicsScene, and one to rect obj
+ self.assertEqual(sys.getrefcount(pol), 3)
+
+ def testReferenceCount(self):
+ global destroyedRect
+ global destroyedPol
+
+ self.beforeTest()
+
+ rect = self.scene.addRect(10.0, 10.0, 10.0, 10.0)
+ self.assertTrue(isinstance(rect, QGraphicsRectItem))
+
+ self.wrr = weakref.ref(rect, rect_del)
+
+ #refcount need be 3 because one ref for QGraphicsScene, and one to rect obj
+ self.assertEqual(sys.getrefcount(rect), 3)
+
+ del rect
+ #not destroyed because one ref continue in QGraphicsScene
+ self.assertEqual(destroyedRect, False)
+ self.assertEqual(destroyedPol, False)
+
+ del self.scene
+
+ #QGraphicsScene was destroyed and this destroy internal ref to rect
+ self.assertEqual(destroyedRect, True)
+ self.assertEqual(destroyedPol, True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/sample.png b/sources/pyside6/tests/QtWidgets/sample.png
index 60450f0dc..60450f0dc 100644
--- a/sources/pyside2/tests/QtWidgets/sample.png
+++ b/sources/pyside6/tests/QtWidgets/sample.png
Binary files differ
diff --git a/sources/pyside6/tests/QtWidgets/signature_test.py b/sources/pyside6/tests/QtWidgets/signature_test.py
new file mode 100644
index 000000000..58d2ff9a5
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/signature_test.py
@@ -0,0 +1,94 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6.QtCore
+import PySide6.QtWidgets
+from shibokensupport.signature import inspect
+
+
+class PySideSignatureTest(unittest.TestCase):
+ def testSignatureExist(self):
+ t1 = type(PySide6.QtCore.QObject.children.__signature__)
+ self.assertEqual(t1, inspect.Signature)
+ t2 = type(PySide6.QtCore.QObject.__dict__["children"].__signature__)
+ self.assertEqual(t2, t1)
+ obj = PySide6.QtWidgets.QApplication.palette
+ t3 = type(obj.__signature__)
+ self.assertEqual(t3, list)
+ self.assertEqual(len(obj.__signature__), 3)
+ for thing in obj.__signature__:
+ self.assertEqual(type(thing), inspect.Signature)
+ sm = PySide6.QtWidgets.QApplication.__dict__["palette"]
+ self.assertFalse(callable(sm))
+ self.assertEqual(sm.__func__, obj)
+ self.assertTrue(hasattr(sm, "__signature__") and
+ sm.__signature__ is not None)
+
+ def testSignatureIsCached(self):
+ # see if we get the same object
+ ob1 = PySide6.QtCore.QObject.children.__signature__
+ ob2 = PySide6.QtCore.QObject.children.__signature__
+ self.assertTrue(ob1 is ob2)
+ # same with multi signature
+ ob1 = PySide6.QtWidgets.QApplication.palette.__signature__
+ ob2 = PySide6.QtWidgets.QApplication.palette.__signature__
+ self.assertTrue(ob1 is ob2)
+
+ def testModuleIsInitialized(self):
+ self.assertTrue(PySide6.QtWidgets.QApplication.__signature__ is not None)
+
+ def test_NotCalled_is_callable_and_correct(self):
+ # A signature that has a default value with some "Default(...)"
+ # wrapper is callable and creates an object of the right type.
+ sig = PySide6.QtCore.QByteArray().toPercentEncoding.__signature__
+ called_default = sig.parameters["exclude"].default()
+ self.assertEqual(type(called_default), PySide6.QtCore.QByteArray)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/QtWidgets/standardpixmap_test.py b/sources/pyside6/tests/QtWidgets/standardpixmap_test.py
new file mode 100644
index 000000000..d3e2ee7ce
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/standardpixmap_test.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtGui import QPixmap
+from PySide6.QtWidgets import QStyle
+
+from helper.usesqapplication import UsesQApplication
+
+class StandardPixmapTest(UsesQApplication):
+ def testDefaultOptions(self): # Bug 253
+ pixmap = self.app.style().standardPixmap(QStyle.SP_DirClosedIcon)
+ self.assertTrue(isinstance(pixmap, QPixmap))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/test_module_template.py b/sources/pyside6/tests/QtWidgets/test_module_template.py
new file mode 100644
index 000000000..74defe7ea
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/test_module_template.py
@@ -0,0 +1,48 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util"))
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths()
+
+from PySide6.QtWidgets import QWidget
+from PySide6.QtCore import QObject
+
+class MyQObject(QObject):
+ pass
+
+class MyQWidget(QWidget):
+ pass
+
+class Sentinel():
+ value = 10
+
diff --git a/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py b/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py
new file mode 100644
index 000000000..24d0ec01c
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/virtual_protected_inheritance_test.py
@@ -0,0 +1,103 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for overriding inherited protected virtual methods'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimerEvent
+from PySide6.QtWidgets import QApplication, QSpinBox
+
+from helper.usesqapplication import UsesQApplication
+
+class MySpinButton(QSpinBox):
+ '''Simple example class of overriding QObject.timerEvent'''
+
+ def __init__(self, max_runs=5, app=None):
+ #Creates a new spinbox that will run <max_runs> and quit <app>
+ super(MySpinButton, self).__init__()
+
+ if app is None:
+ app = QApplication([])
+
+ self.app = app
+ self.max_runs = max_runs
+ self.runs = 0
+
+ def timerEvent(self, event):
+ #Timer event method
+ self.runs += 1
+
+ self.setValue(self.runs)
+
+ if self.runs == self.max_runs:
+ self.app.quit()
+
+ if not isinstance(event, QTimerEvent):
+ raise TypeError('Invalid event type. Must be TimerEvent')
+
+class TimerEventTest(UsesQApplication):
+ '''Test case for running QObject.timerEvent from inherited class'''
+
+ qapplication = True
+
+ def setUp(self):
+ #Acquire resources
+ super(TimerEventTest, self).setUp()
+ self.widget = MySpinButton(app=self.app)
+
+ def tearDown(self):
+ #Release resources
+ del self.widget
+ super(TimerEventTest, self).tearDown()
+
+ def testMethod(self):
+ #QWidget.timerEvent overrinding (protected inherited)
+ timer_id = self.widget.startTimer(0)
+
+ self.app.exec_()
+
+ self.widget.killTimer(timer_id)
+
+ self.assertTrue(self.widget.runs >= self.widget.max_runs)
+
+
+if __name__ == '__main__':
+ unittest.main()
+ #app = QApplication([])
+ #widget = MySpinButton(app=app)
+ #widget.startTimer(500)
+ #widget.show()
+ #app.exec_()
+
diff --git a/sources/pyside6/tests/QtWidgets/virtual_pure_override_test.py b/sources/pyside6/tests/QtWidgets/virtual_pure_override_test.py
new file mode 100644
index 000000000..8acc2128f
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/virtual_pure_override_test.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QGraphicsScene, QGraphicsRectItem, QGraphicsView, QApplication
+from PySide6.QtGui import QBrush, QColor
+from PySide6.QtCore import QTimer
+from helper.usesqapplication import UsesQApplication
+
+qgraphics_item_painted = False
+
+class RoundRectItem(QGraphicsRectItem):
+
+ def __init__(self, x, y, w, h):
+ QGraphicsRectItem.__init__(self, x, y, w, h)
+
+ def paint(self, painter, qstyleoptiongraphicsitem, qwidget):
+ global qgraphics_item_painted
+ qgraphics_item_painted = True
+
+
+class QGraphicsItemTest(UsesQApplication):
+
+ def createRoundRect(self, scene):
+ item = RoundRectItem(10, 10, 100, 100)
+ item.setBrush(QBrush(QColor(255, 0, 0)))
+ scene.addItem(item)
+ return item
+
+ def quit_app(self):
+ self.app.quit()
+
+ def test_setParentItem(self):
+ global qgraphics_item_painted
+
+ scene = QGraphicsScene()
+ scene.addText("test")
+ view = QGraphicsView(scene)
+
+ rect = self.createRoundRect(scene)
+ view.show()
+ QTimer.singleShot(1000, self.quit_app)
+ self.app.exec_()
+ self.assertTrue(qgraphics_item_painted)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/QtWidgets/wrong_return_test.py b/sources/pyside6/tests/QtWidgets/wrong_return_test.py
new file mode 100644
index 000000000..5761c3f5e
--- /dev/null
+++ b/sources/pyside6/tests/QtWidgets/wrong_return_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for Virtual functions with wrong return type'''
+
+import os
+import sys
+import unittest
+import warnings
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtWidgets
+from helper.usesqapplication import UsesQApplication
+
+
+warnings.simplefilter('error')
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ super(MyWidget, self).__init__(parent)
+
+ def sizeHint(self):
+ pass
+
+class testCase(UsesQApplication):
+
+ def testVirtualReturn(self):
+ w = MyWidget()
+ self.assertWarns(RuntimeWarning, w.show)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtWinExtras/CMakeLists.txt b/sources/pyside6/tests/QtWinExtras/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtWinExtras/CMakeLists.txt
+++ b/sources/pyside6/tests/QtWinExtras/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtX11Extras/CMakeLists.txt b/sources/pyside6/tests/QtX11Extras/CMakeLists.txt
index 2f7cb08b9..2f7cb08b9 100644
--- a/sources/pyside2/tests/QtX11Extras/CMakeLists.txt
+++ b/sources/pyside6/tests/QtX11Extras/CMakeLists.txt
diff --git a/sources/pyside2/tests/QtXml/CMakeLists.txt b/sources/pyside6/tests/QtXml/CMakeLists.txt
index feb230af3..feb230af3 100644
--- a/sources/pyside2/tests/QtXml/CMakeLists.txt
+++ b/sources/pyside6/tests/QtXml/CMakeLists.txt
diff --git a/sources/pyside6/tests/QtXml/qdomdocument_test.py b/sources/pyside6/tests/QtXml/qdomdocument_test.py
new file mode 100644
index 000000000..7fb0de69d
--- /dev/null
+++ b/sources/pyside6/tests/QtXml/qdomdocument_test.py
@@ -0,0 +1,104 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QByteArray
+from PySide6.QtXml import QDomDocument, QDomElement
+
+
+class QDomDocumentTest(unittest.TestCase):
+
+ def setUp(self):
+ self.dom = QDomDocument()
+
+ self.goodXmlData = QByteArray(bytes('''
+ <typesystem package="PySide6.QtXml">
+ <value-type name="QDomDocument"/>
+ <value-type name="QDomElement"/>
+ </typesystem>
+ ''', "UTF-8"))
+
+ self.badXmlData = QByteArray(bytes('''
+ <typesystem package="PySide6.QtXml">
+ <value-type name="QDomDocument">
+ </typesystem>
+ ''', "UTF-8"))
+
+ def tearDown(self):
+ del self.dom
+ del self.goodXmlData
+ del self.badXmlData
+
+ def testQDomDocumentSetContentWithBadXmlData(self):
+ '''Sets invalid xml as the QDomDocument contents.'''
+ ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.badXmlData, True)
+ self.assertFalse(ok)
+ self.assertEqual(errorStr, 'Opening and ending tag mismatch.')
+ self.assertEqual(errorLine, 4)
+ self.assertEqual(errorColumn, 21)
+
+ def testQDomDocumentSetContentWithGoodXmlData(self):
+ '''Sets valid xml as the QDomDocument contents.'''
+ ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.goodXmlData, True)
+ self.assertTrue(ok)
+ self.assertEqual(errorStr, '')
+ self.assertEqual(errorLine, 0)
+ self.assertEqual(errorColumn, 0)
+
+ def testQDomDocumentData(self):
+ '''Checks the QDomDocument elements for the valid xml contents.'''
+
+ def checkAttribute(element, attribute, value):
+ self.assertTrue(isinstance(root, QDomElement))
+ self.assertFalse(element.isNull())
+ self.assertTrue(element.hasAttribute(attribute))
+ self.assertEqual(element.attribute(attribute), value)
+
+ ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.goodXmlData, True)
+ root = self.dom.documentElement()
+ self.assertEqual(root.tagName(), 'typesystem')
+ checkAttribute(root, 'package', 'PySide6.QtXml')
+
+ child = root.firstChildElement('value-type')
+ checkAttribute(child, 'name', 'QDomDocument')
+
+ child = child.nextSiblingElement('value-type')
+ checkAttribute(child, 'name', 'QDomElement')
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/init_paths.py b/sources/pyside6/tests/init_paths.py
new file mode 100644
index 000000000..68ff6a5d5
--- /dev/null
+++ b/sources/pyside6/tests/init_paths.py
@@ -0,0 +1,104 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+
+SRC_DIR = os.path.dirname(os.path.abspath(__file__))
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(SRC_DIR)),
+ 'shiboken6', 'tests'))
+from shiboken_paths import (get_dir_env_var, get_build_dir, add_python_dirs,
+ add_lib_dirs, shiboken_paths)
+
+
+def _get_qt_dir():
+ """Retrieve the location of Qt."""
+ result = None
+ try:
+ result = get_dir_env_var('QT_DIR')
+ except Exception:
+ # This is just a convenience for command line invocation independent
+ # of ctest. Normally, QT_DIR should be set to avoid repetitive patch
+ # searches.
+ print('The environment variable QT_DIR is not set; falling back to path search',
+ file=sys.stderr)
+ qmake = 'qmake.exe' if sys.platform == 'win32' else 'qmake'
+ for path in os.environ.get('PATH').split(os.pathsep):
+ if path and os.path.isfile(os.path.join(path, qmake)):
+ result = os.path.dirname(path)
+ break
+ if not result:
+ raise ValueError('Unable to locate Qt. Please set the environment variable QT_DIR')
+ print('Qt as determined by path search: {}'.format(result), file=sys.stderr)
+ return result
+
+
+def _get_qt_lib_dir():
+ """Retrieve the location of the Qt library directory."""
+ sub_dir = 'bin' if sys.platform == 'win32' else 'lib'
+ return os.path.join(_get_qt_dir(), sub_dir) # For testbinding
+
+
+def _init_test_paths(shiboken_tests=False, testbindings_module=False):
+ """Sets the correct import paths (Python modules and C++ library paths)
+ for PySide tests and shiboken6 tests using depending on the environment
+ variables BUILD_DIR and QT_DIR pointing to the build directory and
+ Qt directory, respectively."""
+ src_dir = os.path.dirname(os.path.abspath(__file__))
+
+ python_dirs = [os.path.join(src_dir, 'util')] # Helper module
+
+ pyside_build_dir = os.path.join(get_build_dir(), 'pyside6')
+ python_dirs.append(pyside_build_dir) # for PySide6
+ lib_dirs = [os.path.join(pyside_build_dir, 'libpyside')]
+
+ if testbindings_module:
+ python_dirs.append(os.path.join(pyside_build_dir,
+ 'tests', 'pysidetest'))
+ lib_dirs.append(_get_qt_lib_dir())
+
+ shiboken_path_tuple = shiboken_paths(shiboken_tests)
+ python_dirs.extend(shiboken_path_tuple[0])
+ lib_dirs.extend(shiboken_path_tuple[1])
+
+ add_python_dirs(python_dirs)
+ add_lib_dirs(lib_dirs)
+
+
+def init_test_paths(testbindings_module=False):
+ """Sets the correct import paths for PySide6 tests, optionally including
+ testbindings."""
+ _init_test_paths(False, testbindings_module)
+
+
+def init_all_test_paths():
+ """Sets the correct import paths for PySide6 and shiboken6 tests
+ (for registry checking only)."""
+ _init_test_paths(True, True)
diff --git a/sources/pyside2/tests/mac/CMakeLists.txt b/sources/pyside6/tests/mac/CMakeLists.txt
index e1eb1a2fd..e1eb1a2fd 100644
--- a/sources/pyside2/tests/mac/CMakeLists.txt
+++ b/sources/pyside6/tests/mac/CMakeLists.txt
diff --git a/sources/pyside6/tests/mac/qmacstyle_test.py b/sources/pyside6/tests/mac/qmacstyle_test.py
new file mode 100644
index 000000000..f3508423a
--- /dev/null
+++ b/sources/pyside6/tests/mac/qmacstyle_test.py
@@ -0,0 +1,54 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Qt5: this is gone: from PySide6.QtGui import QMacStyle
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtWidgets import QApplication, QLabel, QStyleFactory
+from PySide6.QtCore import QObject
+
+from helper.usesqapplication import UsesQApplication
+
+class QMacStyleTest(UsesQApplication):
+ def setUp(self):
+ UsesQApplication.setUp(self)
+ self.QMacStyle = type(QStyleFactory.create('Macintosh'))
+
+ def testWidgetStyle(self):
+ w = QLabel('Hello')
+ self.assertTrue(isinstance(w.style(), self.QMacStyle))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/manually/README.txt b/sources/pyside6/tests/manually/README.txt
index da20e3824..da20e3824 100644
--- a/sources/pyside2/tests/manually/README.txt
+++ b/sources/pyside6/tests/manually/README.txt
diff --git a/sources/pyside6/tests/manually/bug_841.py b/sources/pyside6/tests/manually/bug_841.py
new file mode 100644
index 000000000..4958d2d9b
--- /dev/null
+++ b/sources/pyside6/tests/manually/bug_841.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import sys
+
+from PySide6.QtGui import QStandardItem, QStandardItemModel
+from PySide6.QtWidgets import QMainWindow, QTreeView, QAbstractItemView, QApplication, QMessageBox
+
+class Item(QStandardItem):
+ def __init__(self, text):
+ super(Item, self).__init__()
+ self.setText(text)
+ self.setDragEnabled(True)
+ self.setDropEnabled(True)
+
+ def clone(self):
+ ret = Item(self.text())
+ return ret
+
+class Project(QStandardItemModel):
+ def __init__(self):
+ super(Project, self).__init__()
+ self.setItemPrototype(Item("Prototype"))
+ # add some items so we have stuff to move around
+ self.appendRow(Item("ABC"))
+ self.appendRow(Item("DEF"))
+ self.appendRow(Item("GHI"))
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.model = Project()
+ self.view = QTreeView(self)
+ self.view.setModel(self.model)
+ self.view.setDragEnabled(True)
+ self.view.setDragDropMode(QAbstractItemView.InternalMove)
+ self.setCentralWidget(self.view)
+
+ def mousePressEvent(self, e):
+ print(e.x(), e.y())
+ return QMainWindow.mousePressEvent(self, e)
+
+def main():
+ app = QApplication(sys.argv)
+ w = MainWindow()
+ w.show()
+ QMessageBox.information(None, "Info", "Just drag and drop the items.")
+ sys.exit(app.exec_())
+
+if __name__ == "__main__":
+ main()
diff --git a/sources/pyside6/tests/pysidetest/CMakeLists.txt b/sources/pyside6/tests/pysidetest/CMakeLists.txt
new file mode 100644
index 000000000..f80eff134
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/CMakeLists.txt
@@ -0,0 +1,173 @@
+project(pysidetest)
+project(testbinding)
+
+cmake_minimum_required(VERSION 3.16)
+
+set(QT_USE_QTCORE 1)
+# no more supported: include(${QT_USE_FILE})
+
+# removed after qtbase/054b66a65748c9ebfafeca88bf31669a24994237, is this required?
+# add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
+
+add_definitions(-DQT_SHARED)
+add_definitions(-DRXX_ALLOCATOR_INIT_0)
+
+find_package(Qt${QT_MAJOR_VERSION}Widgets)
+
+set(pysidetest_SRC
+flagstest.cpp
+testobject.cpp
+testview.cpp
+hiddenobject.cpp
+)
+
+set(pysidetest_MOC_HEADERS
+flagstest.h
+testobject.h
+testview.h
+hiddenobject.h
+)
+
+qt_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
+
+set(testbinding_SRC
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/flagsnamespace_classforenum_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/testobject_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/intvalue_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobjectwithnamespace_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp_testobject2withnamespace_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/pysidecpp2_testobjectwithoutnamespace_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/testview_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp
+)
+
+# Get per module include dirs.
+# There are usually 3 paths there:
+# ./qt/include/; ./qt/include/QtCore ; ./qt/mkspecs/linux-g++
+# on framework build they are:
+# ./qt/lib/QtCore.framework; ./qt/lib/QtCore.framework/Headers ; ./qt/mkspecs/macx-clang
+# Thus we use the second direct path, which contains the actual header files.
+
+if(${QT_MAJOR_VERSION} GREATER_EQUAL 6)
+ set(Qt6Core_DIRECT_INCLUDE_DIR ${Qt6Core_INCLUDE_DIRS})
+ set(Qt6Gui_DIRECT_INCLUDE_DIR ${Qt6Gui_INCLUDE_DIRS})
+ set(Qt6Widgets_DIRECT_INCLUDE_DIR ${Qt6Widgets_INCLUDE_DIRS})
+else()
+ list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_DIRECT_INCLUDE_DIR)
+ list(GET Qt5Gui_INCLUDE_DIRS 1 Qt5Gui_DIRECT_INCLUDE_DIR)
+ list(GET Qt5Widgets_INCLUDE_DIRS 1 Qt5Widgets_DIRECT_INCLUDE_DIR)
+endif()
+
+# Adjust include headers paths for frameworks.
+set(shiboken_framework_include_dirs_option "")
+if(CMAKE_HOST_APPLE AND QtCore_is_framework)
+ set(shiboken_framework_include_dirs "${QT_FRAMEWORK_INCLUDE_DIR}")
+ set(shiboken_framework_include_dirs_option "--framework-include-paths=${shiboken_framework_include_dirs}")
+endif()
+
+make_path(testbinding_include_dirs ${pyside6_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../shiboken6/libshiboken
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../PySide6
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../libpyside
+ ${QT_INCLUDE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_DIRECT_INCLUDE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Gui_DIRECT_INCLUDE_DIR}
+ ${Qt${QT_MAJOR_VERSION}Widgets_DIRECT_INCLUDE_DIR}
+ )
+
+make_path(testbinding_typesystem_path ${pyside6_SOURCE_DIR}
+ ${pyside6_BINARY_DIR})
+
+add_custom_command(
+OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/mjb_rejected_classes.log"
+ BYPRODUCTS ${testbinding_SRC}
+ COMMAND Shiboken6::shiboken6 ${GENERATOR_EXTRA_FLAGS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h
+ --include-paths=${testbinding_include_dirs}
+ ${shiboken_framework_include_dirs_option}
+ --typesystem-paths=${testbinding_typesystem_path}
+ --output-directory=${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml
+ --api-version=${SUPPORTED_QT_VERSION}
+WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+COMMENT "Running generator for test binding..."
+)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
+ ${pyside6_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
+ ${libpyside_SOURCE_DIR})
+
+add_library(pysidetest SHARED ${pysidetest_SRC} ${pysidetest_MOC_SRC})
+set_target_properties(pysidetest PROPERTIES
+ DEFINE_SYMBOL BUILD_PYSIDETEST)
+
+target_link_libraries(pysidetest
+ Shiboken6::libshiboken
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
+ )
+
+add_library(testbinding MODULE ${testbinding_SRC})
+set_property(TARGET testbinding PROPERTY PREFIX "")
+set_property(TARGET testbinding PROPERTY OUTPUT_NAME "testbinding${SHIBOKEN_PYTHON_EXTENSION_SUFFIX}")
+if(WIN32)
+ set_property(TARGET testbinding PROPERTY SUFFIX ".pyd")
+endif()
+
+if(PYTHON_LIMITED_API)
+ set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIMITED_LIBRARIES})
+else()
+ set(TESTBINDING_PYTHON_LIBS ${PYTHON_LIBRARIES})
+endif()
+
+target_link_libraries(testbinding
+ pysidetest
+ pyside6
+ ${TESTBINDING_PYTHON_LIBS}
+ Shiboken6::libshiboken
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES})
+
+add_dependencies(testbinding pyside6 QtCore QtGui QtWidgets pysidetest)
+create_generator_target(testbinding)
+
+PYSIDE_TEST(constructor_properties_test.py)
+PYSIDE_TEST(decoratedslot_test.py)
+# Will always crash when built against Qt 5.6, no point in running it.
+if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.7.0)
+ PYSIDE_TEST(delegatecreateseditor_test.py)
+endif()
+PYSIDE_TEST(all_modules_load_test.py)
+PYSIDE_TEST(bug_1016.py)
+PYSIDE_TEST(embedding_test.py)
+PYSIDE_TEST(enum_test.py)
+PYSIDE_TEST(homonymoussignalandmethod_test.py)
+PYSIDE_TEST(iterable_test.py)
+PYSIDE_TEST(list_signal_test.py)
+PYSIDE_TEST(mixin_signal_slots_test.py)
+PYSIDE_TEST(modelview_test.py)
+PYSIDE_TEST(new_inherited_functions_test.py)
+PYSIDE_TEST(notify_id.py)
+PYSIDE_TEST(properties_test.py)
+PYSIDE_TEST(property_python_test.py)
+PYSIDE_TEST(qapp_like_a_macro_test.py)
+PYSIDE_TEST(qvariant_test.py)
+PYSIDE_TEST(repr_test.py)
+PYSIDE_TEST(signal_tp_descr_get_test.py)
+PYSIDE_TEST(signal_slot_warning.py)
+PYSIDE_TEST(signalandnamespace_test.py)
+PYSIDE_TEST(signalemissionfrompython_test.py)
+PYSIDE_TEST(signalwithdefaultvalue_test.py)
+PYSIDE_TEST(typedef_signal_test.py)
+PYSIDE_TEST(version_test.py)
diff --git a/sources/pyside6/tests/pysidetest/all_modules_load_test.py b/sources/pyside6/tests/pysidetest/all_modules_load_test.py
new file mode 100644
index 000000000..85807b825
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/all_modules_load_test.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+
+# Note:
+# "from PySide6 import *" can only be used at module level.
+# It is also really not recommended to use. But for testing,
+# the "__all__" variable is a great feature!
+
+class AllModulesImportTest(unittest.TestCase):
+ def testAllModulesCanImport(self):
+ # would also work: exec("from PySide6 import *")
+ for name in PySide6.__all__:
+ exec("import PySide6.{}".format(name))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/bug_1016.py b/sources/pyside6/tests/pysidetest/bug_1016.py
index 234bfe0e5..234bfe0e5 100644
--- a/sources/pyside2/tests/pysidetest/bug_1016.py
+++ b/sources/pyside6/tests/pysidetest/bug_1016.py
diff --git a/sources/pyside6/tests/pysidetest/constructor_properties_test.py b/sources/pyside6/tests/pysidetest/constructor_properties_test.py
new file mode 100644
index 000000000..1a2e50edd
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/constructor_properties_test.py
@@ -0,0 +1,70 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from helper.usesqapplication import UsesQApplication
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import QApplication, QLabel, QFrame
+
+
+class ConstructorPropertiesTest(UsesQApplication):
+
+ def testCallConstructor(self):
+ label = QLabel(
+ frameStyle=QFrame.Panel | QFrame.Sunken,
+ text="first line\nsecond line",
+ alignment=Qt.AlignBottom | Qt.AlignRight
+ )
+ self.assertRaises(AttributeError, lambda: QLabel(
+ somethingelse=42,
+ text="first line\nsecond line",
+ alignment=Qt.AlignBottom | Qt.AlignRight
+ ))
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/pysidetest/curr_errors.txt b/sources/pyside6/tests/pysidetest/curr_errors.txt
index a02da203d..a02da203d 100644
--- a/sources/pyside2/tests/pysidetest/curr_errors.txt
+++ b/sources/pyside6/tests/pysidetest/curr_errors.txt
diff --git a/sources/pyside6/tests/pysidetest/decoratedslot_test.py b/sources/pyside6/tests/pysidetest/decoratedslot_test.py
new file mode 100644
index 000000000..439d8acbc
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/decoratedslot_test.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from PySide6.QtCore import QObject
+from testbinding import TestObject
+
+class Receiver(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.called = False
+
+ def ReceiverDecorator(func):
+ def decoratedFunction(self, *args, **kw):
+ func(self, *args, **kw)
+ return decoratedFunction
+
+ # This method with the same name of the internal decorated function
+ # is here to test the binding capabilities.
+ def decoratedFunction(self):
+ pass
+
+ @ReceiverDecorator
+ def slot(self):
+ self.called = True
+
+
+class DecoratedSlotTest(unittest.TestCase):
+
+ def testCallingOfDecoratedSlot(self):
+ obj = TestObject(0)
+ receiver = Receiver()
+ obj.staticMethodDouble.connect(receiver.slot)
+ obj.emitStaticMethodDoubleSignal()
+ self.assertTrue(receiver.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/delegatecreateseditor_test.py b/sources/pyside6/tests/pysidetest/delegatecreateseditor_test.py
new file mode 100644
index 000000000..6f6b98305
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/delegatecreateseditor_test.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from helper.usesqapplication import UsesQApplication
+from testbinding import TestView
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QStandardItem, QStandardItemModel
+from PySide6.QtWidgets import (QAbstractItemDelegate, QComboBox,
+ QSpinBox, QStyledItemDelegate,
+ QStyleOptionViewItem, QWidget)
+
+id_text = 'This is me'
+
+class DelegateDoesntKeepReferenceToEditor(QAbstractItemDelegate):
+ def createEditor(self, parent, option, index):
+ comboBox = QComboBox(parent)
+ comboBox.addItem(id_text)
+ return comboBox
+
+
+class DelegateKeepsReferenceToEditor(QAbstractItemDelegate):
+ def __init__(self, parent=None):
+ QAbstractItemDelegate.__init__(self, parent)
+ self.comboBox = QComboBox()
+ self.comboBox.addItem(id_text)
+
+ def createEditor(self, parent, option, index):
+ self.comboBox.setParent(parent)
+ return self.comboBox
+
+
+class EditorCreatedByDelegateTest(UsesQApplication):
+
+ def testDelegateDoesntKeepReferenceToEditor(self):
+ view = TestView(None)
+ delegate = DelegateDoesntKeepReferenceToEditor()
+ view.setItemDelegate(delegate)
+ editor = view.getEditorWidgetFromItemDelegate()
+ self.assertEqual(type(editor), QComboBox)
+ self.assertEqual(editor.count(), 1)
+ self.assertEqual(editor.itemData(0, Qt.DisplayRole), id_text)
+ editor.metaObject()
+
+ def testDelegateKeepsReferenceToEditor(self):
+ view = TestView(None)
+ delegate = DelegateKeepsReferenceToEditor()
+ view.setItemDelegate(delegate)
+ editor = view.getEditorWidgetFromItemDelegate()
+ self.assertEqual(type(editor), QComboBox)
+ self.assertEqual(editor.count(), 1)
+ self.assertEqual(editor.itemData(0, Qt.DisplayRole), id_text)
+ editor.metaObject()
+
+ def testIntDelegate(self):
+ """PYSIDE-1250: When creating a QVariant, use int instead of long long
+ for anything that fits into a int. Verify by checking that a spin
+ box is created as item view editor for int."""
+ item = QStandardItem()
+ item.setData(123123, Qt.EditRole) # <-- QVariant conversion here
+ model = QStandardItemModel()
+ model.appendRow(item)
+ style_option = QStyleOptionViewItem()
+ delegate = QStyledItemDelegate()
+ editor = delegate.createEditor(None, style_option, model.index(0, 0))
+ self.assertEqual(type(editor), QSpinBox)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/embedding_test.py b/sources/pyside6/tests/pysidetest/embedding_test.py
new file mode 100644
index 000000000..14cc1b4b5
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/embedding_test.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of PySide6.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+# This test tests the embedding feature of PySide.
+# Normally, embedding is only used when necessary.
+# By setting the variable "pyside_uses_embedding",
+# we enforce usage of embedding.
+
+
+class EmbeddingTest(unittest.TestCase):
+
+ # def test_pyside_normal(self):
+ # import sys
+ # self.assertFalse(hasattr(sys, "pyside_uses_embedding"))
+ # import PySide6
+ # # everything has to be imported
+ # self.assertTrue("PySide6.support.signature" in sys.modules)
+ # # there should be a variale in sys, now (no idea if set)
+ # self.assertTrue(hasattr(sys, "pyside_uses_embedding"))
+
+ # Unfortunately, I see no way how to shut things enough down
+ # to trigger a second initiatization. Therefore, only one test :-/
+ def test_pyside_embedding(self):
+ import sys, os
+ self.assertFalse(hasattr(sys, "pyside_uses_embedding"))
+ sys.pyside_uses_embedding = "anything true"
+ import PySide6
+ # everything has to be imported
+ self.assertTrue("PySide6.support.signature" in sys.modules)
+ self.assertEqual(sys.pyside_uses_embedding, True)
+ dn = os.path.dirname
+ name = os.path.basename(dn(dn(dn(PySide6.support.signature.__file__))))
+ self.assertTrue(name.startswith("embedded.") and name.endswith(".zip"))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/enum_test.py b/sources/pyside6/tests/pysidetest/enum_test.py
index d179d6248..d179d6248 100644
--- a/sources/pyside2/tests/pysidetest/enum_test.py
+++ b/sources/pyside6/tests/pysidetest/enum_test.py
diff --git a/sources/pyside2/tests/pysidetest/flagstest.cpp b/sources/pyside6/tests/pysidetest/flagstest.cpp
index 2bd0c454e..2bd0c454e 100644
--- a/sources/pyside2/tests/pysidetest/flagstest.cpp
+++ b/sources/pyside6/tests/pysidetest/flagstest.cpp
diff --git a/sources/pyside2/tests/pysidetest/flagstest.h b/sources/pyside6/tests/pysidetest/flagstest.h
index 7f070361c..7f070361c 100644
--- a/sources/pyside2/tests/pysidetest/flagstest.h
+++ b/sources/pyside6/tests/pysidetest/flagstest.h
diff --git a/sources/pyside2/tests/pysidetest/hiddenobject.cpp b/sources/pyside6/tests/pysidetest/hiddenobject.cpp
index 70692a8ec..70692a8ec 100644
--- a/sources/pyside2/tests/pysidetest/hiddenobject.cpp
+++ b/sources/pyside6/tests/pysidetest/hiddenobject.cpp
diff --git a/sources/pyside2/tests/pysidetest/hiddenobject.h b/sources/pyside6/tests/pysidetest/hiddenobject.h
index 97a2864c5..97a2864c5 100644
--- a/sources/pyside2/tests/pysidetest/hiddenobject.h
+++ b/sources/pyside6/tests/pysidetest/hiddenobject.h
diff --git a/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py b/sources/pyside6/tests/pysidetest/homonymoussignalandmethod_test.py
index 1566b4a82..1566b4a82 100644
--- a/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py
+++ b/sources/pyside6/tests/pysidetest/homonymoussignalandmethod_test.py
diff --git a/sources/pyside6/tests/pysidetest/iterable_test.py b/sources/pyside6/tests/pysidetest/iterable_test.py
new file mode 100644
index 000000000..91c12de8c
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/iterable_test.py
@@ -0,0 +1,91 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+iterable_test.py
+
+This test checks that the Iterable protocol is implemented correctly.
+"""
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+from PySide6 import QtCore, QtGui
+
+try:
+ import numpy as np
+ have_numpy = True
+except ImportError:
+ have_numpy = False
+
+class PySequenceTest(unittest.TestCase):
+
+ def test_iterable(self):
+ def gen(lis):
+ for item in lis:
+ if item == "crash":
+ raise IndexError
+ yield item
+ # testing "pyseq_to_cpplist_conversion"
+ testfunc = QtCore.QUrl.fromStringList
+ # use a generator (iterable)
+ self.assertEqual(testfunc(gen(["asd", "ghj"])),
+ [PySide6.QtCore.QUrl('asd'), PySide6.QtCore.QUrl('ghj')])
+ # use an iterator
+ self.assertEqual(testfunc(iter(["asd", "ghj"])),
+ [PySide6.QtCore.QUrl('asd'), PySide6.QtCore.QUrl('ghj')])
+ self.assertRaises(IndexError, testfunc, gen(["asd", "crash", "ghj"]))
+ # testing QMatrix4x4
+ testfunc = QtGui.QMatrix4x4
+ self.assertEqual(testfunc(gen(range(16))), testfunc(range(16)))
+ # Note: The errormessage needs to be improved!
+ # We should better get a ValueError
+ self.assertRaises((TypeError, ValueError), testfunc, gen(range(15)))
+ # All other matrix sizes:
+ testfunc = QtGui.QMatrix2x2
+ self.assertEqual(testfunc(gen(range(4))), testfunc(range(4)))
+ testfunc = QtGui.QMatrix2x3
+ self.assertEqual(testfunc(gen(range(6))), testfunc(range(6)))
+
+ @unittest.skipUnless(have_numpy, "requires numpy")
+ def test_iterable_numpy(self):
+ # Demo for numpy: We create a unit matrix.
+ num_mat = np.eye(4)
+ num_mat.shape = 16
+ unit = QtGui.QMatrix4x4(num_mat)
+ self.assertEqual(unit, QtGui.QMatrix4x4())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/list_signal_test.py b/sources/pyside6/tests/pysidetest/list_signal_test.py
new file mode 100644
index 000000000..ee68227a2
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/list_signal_test.py
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestObject
+from PySide6.QtCore import QObject
+
+class ListConnectionTest(unittest.TestCase):
+
+ def childrenChanged(self, children):
+ self._child = children[0]
+
+ def testConnection(self):
+ o = TestObject(0)
+ c = QObject()
+ c.setObjectName("child")
+ self._child = None
+ o.childrenChanged.connect(self.childrenChanged)
+ o.addChild(c)
+ self.assertEqual(self._child.objectName(), "child")
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
new file mode 100644
index 000000000..7a01a00fa
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/mixin_signal_slots_test.py
@@ -0,0 +1,223 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' PYSIDE-315: https://bugreports.qt.io/browse/PYSIDE-315
+ Test that all signals and slots of a class (including any mixin classes)
+ are registered at type parsing time. Also test that the signal and slot
+ indices do not change after signal connection or emission. '''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+class Mixin(object):
+ mixinSignal = QtCore.Signal()
+ def __init__(self, *args, **kwargs):
+ super(Mixin,self).__init__(*args, **kwargs)
+
+class MixinTwo(Mixin):
+ mixinTwoSignal = QtCore.Signal()
+
+ def __init__(self, *args, **kwargs):
+ super(MixinTwo,self).__init__(*args, **kwargs)
+ self.mixinTwoSlotCalled = False
+
+ @QtCore.Slot()
+ def mixinTwoSlot(self):
+ self.mixinTwoSlotCalled = True
+
+class MixinThree(object):
+ mixinThreeSignal = QtCore.Signal()
+
+ def __init__(self, *args, **kwargs):
+ super(MixinThree,self).__init__(*args, **kwargs)
+ self.mixinThreeSlotCalled = False
+
+ @QtCore.Slot()
+ def mixinThreeSlot(self):
+ self.mixinThreeSlotCalled = True
+
+class Derived(Mixin, QtCore.QObject):
+ derivedSignal = QtCore.Signal(str)
+
+ def __init__(self):
+ super(Derived,self).__init__()
+ self.derivedSlotCalled = False
+ self.derivedSlotString = ''
+
+ @QtCore.Slot(str)
+ def derivedSlot(self, theString):
+ self.derivedSlotCalled = True
+ self.derivedSlotString = theString
+
+class MultipleDerived(MixinTwo, MixinThree, Mixin, QtCore.QObject):
+ derivedSignal = QtCore.Signal(str)
+
+ def __init__(self):
+ super(MultipleDerived,self).__init__()
+ self.derivedSlotCalled = False
+ self.derivedSlotString = ''
+
+ @QtCore.Slot(str)
+ def derivedSlot(self, theString):
+ self.derivedSlotCalled = True
+ self.derivedSlotString = theString
+
+
+class MixinTest(unittest.TestCase):
+ def testMixinSignalSlotRegistration(self):
+ obj = Derived()
+ m = obj.metaObject()
+
+ # Should contain 2 signals and 1 slot immediately after type parsing
+ self.assertEqual(m.methodCount() - m.methodOffset(), 3)
+
+ # Save method indices to check that they do not change
+ methodIndices = {}
+ for i in range(m.methodOffset(), m.methodCount()):
+ signature = m.method(i).methodSignature()
+ methodIndices[signature] = i
+
+ # Check derivedSignal emission
+ obj.derivedSignal.connect(obj.derivedSlot)
+ obj.derivedSignal.emit('emit1')
+ self.assertTrue(obj.derivedSlotCalled)
+ obj.derivedSlotCalled = False
+
+ # Check derivedSignal emission after mixingSignal connection
+ self.outsideSlotCalled = False
+ @QtCore.Slot()
+ def outsideSlot():
+ self.outsideSlotCalled = True
+
+ obj.mixinSignal.connect(outsideSlot)
+ obj.derivedSignal.emit('emit2')
+ self.assertTrue(obj.derivedSlotCalled)
+ self.assertFalse(self.outsideSlotCalled)
+ obj.derivedSlotCalled = False
+
+ # Check mixinSignal emission
+ obj.mixinSignal.emit()
+ self.assertTrue(self.outsideSlotCalled)
+ self.assertFalse(obj.derivedSlotCalled)
+ self.outsideSlotCalled = False
+
+ # Check that method indices haven't changed.
+ # Make sure to requery for the meta object, to check that a new one was not
+ # created as a child of the old one.
+ m = obj.metaObject()
+ self.assertEqual(m.methodCount() - m.methodOffset(), 3)
+ for i in range(m.methodOffset(), m.methodCount()):
+ signature = m.method(i).methodSignature()
+ self.assertEqual(methodIndices[signature], i)
+
+
+ def testMixinSignalSlotRegistrationWithMultipleInheritance(self):
+ obj = MultipleDerived()
+ m = obj.metaObject()
+
+ # Should contain 4 signals and 3 slots immediately after type parsing
+ self.assertEqual(m.methodCount() - m.methodOffset(), 7)
+
+ # Save method indices to check that they do not change
+ methodIndices = {}
+ for i in range(m.methodOffset(), m.methodCount()):
+ signature = m.method(i).methodSignature()
+ methodIndices[signature] = i
+
+ # Check derivedSignal emission
+ obj.derivedSignal.connect(obj.derivedSlot)
+ obj.derivedSignal.emit('emit1')
+ self.assertTrue(obj.derivedSlotCalled)
+ self.assertFalse(obj.mixinTwoSlotCalled)
+ self.assertFalse(obj.mixinThreeSlotCalled)
+ obj.derivedSlotCalled = False
+
+ # Check derivedSignal emission after mixinThreeSignal connection
+ self.outsideSlotCalled = False
+ @QtCore.Slot()
+ def outsideSlot():
+ self.outsideSlotCalled = True
+
+ obj.mixinThreeSignal.connect(obj.mixinThreeSlot)
+ obj.mixinThreeSignal.connect(outsideSlot)
+ obj.derivedSignal.emit('emit2')
+ self.assertTrue(obj.derivedSlotCalled)
+ self.assertFalse(obj.mixinTwoSlotCalled)
+ self.assertFalse(obj.mixinThreeSlotCalled)
+ self.assertFalse(self.outsideSlotCalled)
+ obj.derivedSlotCalled = False
+
+ # Check mixinThreeSignal emission
+ obj.mixinThreeSignal.emit()
+ self.assertTrue(self.outsideSlotCalled)
+ self.assertTrue(obj.mixinThreeSlotCalled)
+ self.assertFalse(obj.derivedSlotCalled)
+ self.assertFalse(obj.mixinTwoSlotCalled)
+ self.outsideSlotCalled = False
+ obj.mixinThreeSlotCalled = False
+
+ # Check mixinTwoSignal emission
+ obj.mixinTwoSignal.connect(obj.mixinTwoSlot)
+ obj.mixinTwoSignal.emit()
+ self.assertTrue(obj.mixinTwoSlotCalled)
+ self.assertFalse(obj.mixinThreeSlotCalled)
+ self.assertFalse(obj.derivedSlotCalled)
+ self.assertFalse(self.outsideSlotCalled)
+ obj.mixinTwoSlotCalled = False
+
+ # Check mixinSignal emission
+ obj.mixinSignal.connect(outsideSlot)
+ obj.mixinSignal.emit()
+ self.assertTrue(self.outsideSlotCalled)
+ self.assertFalse(obj.mixinTwoSlotCalled)
+ self.assertFalse(obj.mixinThreeSlotCalled)
+ self.assertFalse(obj.derivedSlotCalled)
+ self.outsideSlotCalled = False
+
+ # Check that method indices haven't changed.
+ # Make sure to requery for the meta object, to check that a new one was not
+ # created as a child of the old one.
+ m = obj.metaObject()
+ self.assertEqual(m.methodCount() - m.methodOffset(), 7)
+ for i in range(m.methodOffset(), m.methodCount()):
+ signature = m.method(i).methodSignature()
+ self.assertEqual(methodIndices[signature], i)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/modelview_test.py b/sources/pyside6/tests/pysidetest/modelview_test.py
new file mode 100644
index 000000000..1db9f8d66
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/modelview_test.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestView
+from PySide6.QtCore import QAbstractListModel, QObject, QModelIndex
+
+'''Tests model/view relationship.'''
+
+object_name = 'test object'
+
+class MyObject(QObject):
+ pass
+
+class ListModelKeepsReference(QAbstractListModel):
+ def __init__(self, parent=None):
+ QAbstractListModel.__init__(self, parent)
+ self.obj = MyObject()
+ self.obj.setObjectName(object_name)
+
+ def rowCount(self, parent=QModelIndex()):
+ return 1
+
+ def data(self, index, role):
+ return self.obj
+
+class ListModelDoesntKeepsReference(QAbstractListModel):
+ def rowCount(self, parent=QModelIndex()):
+ return 1
+
+ def data(self, index, role):
+ obj = MyObject()
+ obj.setObjectName(object_name)
+ return obj
+
+class ListModelThatReturnsString(QAbstractListModel):
+ def rowCount(self, parent=QModelIndex()):
+ return 1
+
+ def data(self, index, role):
+ self.obj = 'string'
+ return self.obj
+
+
+class ModelViewTest(unittest.TestCase):
+
+ def testListModelDoesntKeepsReference(self):
+ model = ListModelDoesntKeepsReference()
+ view = TestView(model)
+ obj = view.getData()
+ self.assertEqual(type(obj), MyObject)
+ self.assertEqual(obj.objectName(), object_name)
+ obj.metaObject()
+
+ def testListModelKeepsReference(self):
+ model = ListModelKeepsReference()
+ view = TestView(model)
+ obj = view.getData()
+ self.assertEqual(type(obj), MyObject)
+ self.assertEqual(obj.objectName(), object_name)
+
+ def testListModelThatReturnsString(self):
+ model = ListModelThatReturnsString()
+ view = TestView(model)
+ obj = view.getData()
+ self.assertEqual(type(obj), str)
+ self.assertEqual(obj, 'string')
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/new_inherited_functions_test.py b/sources/pyside6/tests/pysidetest/new_inherited_functions_test.py
new file mode 100644
index 000000000..b74d2deb5
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/new_inherited_functions_test.py
@@ -0,0 +1,198 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import *
+for modname, mod in sys.modules.items():
+ # Python 2 leaves "None" in the dict.
+ if modname.startswith("PySide6.") and mod is not None:
+ print("importing", modname)
+ exec("import " + modname)
+
+# This test tests the existence and callability of the newly existing functions,
+# after the inheritance was made complete in the course of PYSIDE-331.
+
+new_functions = """
+ PySide6.QtCore.QAbstractItemModel().parent()
+ PySide6.QtCore.QAbstractListModel().parent()
+ PySide6.QtCore.QAbstractTableModel().parent()
+ PySide6.QtCore.QFile().resize(qint64)
+ m = PySide6.QtCore.QMutex(); m.tryLock(); m.unlock() # prevent a message "QMutex: destroying locked mutex"
+ PySide6.QtCore.QSortFilterProxyModel().parent()
+ PySide6.QtCore.QTemporaryFile(tfarg).open(openMode)
+"""
+
+new_functions += """
+ PySide6.QtGui.QStandardItemModel().insertColumn(int,qModelIndex)
+ PySide6.QtGui.QStandardItemModel().parent()
+ # PySide6.QtGui.QTextList(qTextDocument).setFormat(qTextFormat) # Segmentation fault: 11
+ # PySide6.QtGui.QTextTable(qTextDocument).setFormat(qTextFormat) # Segmentation fault: 11
+""" if "PySide6.QtGui" in sys.modules else ""
+
+new_functions += """
+ PySide6.QtWidgets.QAbstractItemView().update()
+ PySide6.QtWidgets.QApplication.palette()
+ PySide6.QtWidgets.QApplication.setFont(qFont)
+ PySide6.QtWidgets.QApplication.setPalette(qPalette)
+ PySide6.QtWidgets.QBoxLayout(direction).addWidget(qWidget)
+ PySide6.QtWidgets.QColorDialog().open()
+ PySide6.QtWidgets.QFileDialog().open()
+ PySide6.QtWidgets.QFileSystemModel().index(int,int,qModelIndex)
+ PySide6.QtWidgets.QFileSystemModel().parent()
+ PySide6.QtWidgets.QFontDialog().open()
+ PySide6.QtWidgets.QGestureEvent([]).accept()
+ PySide6.QtWidgets.QGestureEvent([]).ignore()
+ PySide6.QtWidgets.QGestureEvent([]).isAccepted()
+ PySide6.QtWidgets.QGestureEvent([]).setAccepted(bool)
+ # PySide6.QtWidgets.QGraphicsView().render(qPaintDevice,qPoint,qRegion,renderFlags) # QPaintDevice: NotImplementedError
+ PySide6.QtWidgets.QGridLayout().addWidget(qWidget)
+ PySide6.QtWidgets.QHeaderView(orientation).initStyleOption(qStyleOptionFrame)
+ PySide6.QtWidgets.QInputDialog().open()
+ PySide6.QtWidgets.QLineEdit().addAction(qAction)
+ PySide6.QtWidgets.QListWidget().closePersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QListWidget().openPersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QMessageBox().open()
+ PySide6.QtWidgets.QPlainTextEdit().find(findStr)
+ PySide6.QtWidgets.QProgressDialog().open()
+ PySide6.QtWidgets.QStackedLayout().widget()
+ # PySide6.QtWidgets.QStylePainter().begin(qPaintDevice) # QPaintDevice: NotImplementedError
+ PySide6.QtWidgets.QTableWidget().closePersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QTableWidget().openPersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QTextEdit().find(findStr)
+ PySide6.QtWidgets.QTreeWidget().closePersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QTreeWidget().openPersistentEditor(qModelIndex)
+ PySide6.QtWidgets.QWidget.find(quintptr)
+""" if "PySide6.QtWidgets" in sys.modules else ""
+
+new_functions += """
+ # PySide6.QtPrintSupport.QPageSetupDialog().open() # Segmentation fault: 11
+ # PySide6.QtPrintSupport.QPrintDialog().open() # opens the dialog, but works
+ PySide6.QtPrintSupport.QPrintDialog().printer()
+ PySide6.QtPrintSupport.QPrintPreviewDialog().open() # note: this prints something, but really shouldn't ;-)
+""" if "PySide6.QtPrintSupport" in sys.modules else ""
+
+new_functions += """
+ PySide6.QtHelp.QHelpContentModel().parent()
+ # PySide6.QtHelp.QHelpIndexModel().createIndex(int,int,quintptr) # returned NULL without setting an error
+ # PySide6.QtHelp.QHelpIndexModel().createIndex(int,int,object()) # returned NULL without setting an error
+""" if "PySide6.QtHelp" in sys.modules else ""
+
+new_functions += """
+ PySide6.QtQuick.QQuickPaintedItem().update()
+""" if "PySide6.QtQuick" in sys.modules else ""
+
+
+class MainTest(unittest.TestCase):
+
+ def testNewInheriedFunctionsExist(self):
+ """
+ Run all new method signarures
+ """
+ for app in "QtWidgets.QApplication", "QtGui.QGuiApplication", "QtCore.QCoreApplication":
+ try:
+ exec("qApp = PySide6.{0}([]) or PySide6.{0}.instance()".format(app))
+ break
+ except AttributeError:
+ continue
+ bool = True
+ int = 42
+ qint64 = 42
+ tfarg = os.path.join(PySide6.QtCore.QDir.tempPath(), "XXXXXX.tmp")
+ findStr = 'bla'
+ orientation = PySide6.QtCore.Qt.Orientation()
+ openMode = PySide6.QtCore.QIODevice.OpenMode(PySide6.QtCore.QIODevice.ReadOnly)
+ qModelIndex = PySide6.QtCore.QModelIndex()
+ transformationMode = PySide6.QtCore.Qt.TransformationMode()
+ qObject = PySide6.QtCore.QObject()
+ qPoint = PySide6.QtCore.QPoint()
+ try:
+ PySide6.QtGui
+ #qPaintDevice = PySide6.QtGui.QPaintDevice() # NotImplementedError
+ qTextDocument = PySide6.QtGui.QTextDocument()
+ qTextFormat = PySide6.QtGui.QTextFormat()
+ quintptr = 42
+ qFont = PySide6.QtGui.QFont()
+ qPalette = PySide6.QtGui.QPalette()
+ except AttributeError:
+ pass
+ try:
+ PySide6.QtWidgets
+ direction = PySide6.QtWidgets.QBoxLayout.Direction()
+ qWidget = PySide6.QtWidgets.QWidget()
+ qStyleOptionFrame = PySide6.QtWidgets.QStyleOptionFrame()
+ qAction = PySide6.QtGui.QAction(qObject)
+ renderFlags = PySide6.QtWidgets.QWidget.RenderFlags
+ except AttributeError:
+ pass
+
+ for func in new_functions.splitlines():
+ func = func.strip()
+ if func.startswith("#"):
+ # this is a crashing or otherwise untestable function
+ print(func)
+ continue
+ try:
+ exec(func)
+ except NotImplementedError:
+ print(func, "# raises NotImplementedError")
+ else:
+ print(func)
+
+ def testQAppSignatures(self):
+ """
+ Verify that qApp.palette owns three signatures, especially
+ palette() without argument.
+ """
+ try:
+ qApp = (PySide6.QtWidgets.QApplication.instance() or
+ PySide6.QtWidgets.QApplication([]))
+ except AttributeError:
+ unittest.TestCase().skipTest("this test makes only sense if QtWidgets is available.")
+ try:
+ PySide6.QtWidgets.QApplication.palette(42) # raises
+ except TypeError as e:
+ lines = e.args[0].splitlines()
+ heading_pos = lines.index("Supported signatures:")
+ lines = lines[heading_pos+1:]
+ self.assertEqual(len(lines), 3)
+ txt = '\n'.join(lines)
+ print("Signatures found:")
+ print(txt)
+ self.assertTrue("palette()" in txt)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/notify_id.py b/sources/pyside6/tests/pysidetest/notify_id.py
new file mode 100644
index 000000000..fbb520d0f
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/notify_id.py
@@ -0,0 +1,83 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal, Property, Slot
+
+'''Tests that the signal notify id of a property is correct, aka corresponds to the initially set
+notify method.'''
+
+class Foo(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self._prop = "Empty"
+
+ def getProp(self):
+ return self._prop
+
+ def setProp(self, value):
+ if value != self._prop:
+ self._prop = value
+ self.propChanged.emit()
+
+ # Inside the dynamic QMetaObject, the methods have to be sorted, so that this slot comes
+ # after any signals. That means the property notify id has to be updated, to have the correct
+ # relative method id.
+ @Slot()
+ def randomSlot():
+ pass
+
+ propChanged = Signal()
+ prop = Property(str, getProp, setProp, notify=propChanged)
+
+class NotifyIdSignal(unittest.TestCase):
+ def setUp(self):
+ self.obj = Foo()
+
+ def tearDown(self):
+ del self.obj
+
+ def testSignalEmission(self):
+ metaObject = self.obj.metaObject()
+ propertyIndex = metaObject.indexOfProperty("prop")
+ property = metaObject.property(propertyIndex)
+
+ signalIndex = property.notifySignalIndex()
+ signal = metaObject.method(signalIndex)
+ signalName = signal.name()
+ self.assertEqual(signalName, "propChanged")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/properties_test.py b/sources/pyside6/tests/pysidetest/properties_test.py
new file mode 100644
index 000000000..b54144562
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/properties_test.py
@@ -0,0 +1,132 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QStringListModel, Signal, Property, Slot
+
+"""Tests PySide6.QtCore.Property()"""
+
+
+class TestObject(QObject):
+
+ valueChanged = Signal()
+
+ def __init__(self, parent=None):
+ super(TestObject, self).__init__(parent)
+ self._value = -1
+ self.valueChanged.connect(self._changed)
+ self.getter_called = 0
+ self.setter_called = 0
+ self.changed_emitted = 0
+
+ @Slot(int)
+ def _changed(self):
+ self.changed_emitted += 1
+
+ def getValue(self):
+ self.getter_called += 1
+ return self._value
+
+ def setValue(self, value):
+ self.setter_called += 1
+ if (self._value != value):
+ self._value = value
+ self.valueChanged.emit()
+
+ value = Property(int, fget=getValue, fset=setValue,
+ notify=valueChanged)
+
+
+class TestDerivedObject(QStringListModel):
+
+ valueChanged = Signal()
+
+ def __init__(self, parent=None):
+ super(TestDerivedObject, self).__init__(parent)
+ self._value = -1
+ self.valueChanged.connect(self._changed)
+ self.getter_called = 0
+ self.setter_called = 0
+ self.changed_emitted = 0
+
+ @Slot(int)
+ def _changed(self):
+ self.changed_emitted += 1
+
+ def getValue(self):
+ self.getter_called += 1
+ return self._value
+
+ def setValue(self, value):
+ self.setter_called += 1
+ if (self._value != value):
+ self._value = value
+ self.valueChanged.emit()
+
+ value = Property(int, fget=getValue, fset=setValue,
+ notify=valueChanged)
+
+
+class PropertyTest(unittest.TestCase):
+
+ def test1Object(self):
+ """Basic property test."""
+ testObject = TestObject()
+ v = testObject.value
+ self.assertEqual(v, -1)
+ self.assertEqual(testObject.getter_called, 1)
+ testObject.value = 42
+ v = testObject.value
+ self.assertEqual(v, 42)
+ self.assertEqual(testObject.changed_emitted, 1)
+ self.assertEqual(testObject.setter_called, 1)
+ self.assertEqual(testObject.getter_called, 2)
+
+ def test2DerivedObject(self):
+ """PYSIDE-1255: Run the same test for a class inheriting QObject."""
+ testObject = TestDerivedObject()
+ v = testObject.value
+ self.assertEqual(v, -1)
+ self.assertEqual(testObject.getter_called, 1)
+ testObject.value = 42
+ v = testObject.value
+ self.assertEqual(v, 42)
+ self.assertEqual(testObject.changed_emitted, 1)
+ self.assertEqual(testObject.setter_called, 1)
+ self.assertEqual(testObject.getter_called, 2)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/property_python_test.py b/sources/pyside6/tests/pysidetest/property_python_test.py
new file mode 100644
index 000000000..26cd9a5bd
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/property_python_test.py
@@ -0,0 +1,231 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+Test for PySide's Property
+==========================
+
+This test is copied from Python's `test_property.py` and adapted to
+the PySide Property implementation.
+
+This test is to ensure maximum compatibility.
+"""
+
+# Test case for property
+# more tests are in test_descr
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import Property, QObject
+#from PyQt5.QtCore import pyqtProperty as Property, QObject
+
+# This are the original imports.
+import sys
+import unittest
+has_test = False
+try:
+ from test import support
+ has_test = True
+except ImportError:
+ pass
+
+class PropertyBase(Exception):
+ pass
+
+class PropertyGet(PropertyBase):
+ pass
+
+class PropertySet(PropertyBase):
+ pass
+
+class PropertyDel(PropertyBase):
+ pass
+
+class BaseClass(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+ self._spam = 5
+
+ @Property(object)
+ def spam(self):
+ """BaseClass.getter"""
+ return self._spam
+
+ @spam.setter
+ def spam(self, value):
+ self._spam = value
+
+ @spam.deleter
+ def spam(self):
+ del self._spam
+
+class SubClass(BaseClass):
+
+ @BaseClass.spam.getter
+ def spam(self):
+ """SubClass.getter"""
+ raise PropertyGet(self._spam)
+
+ @spam.setter
+ def spam(self, value):
+ raise PropertySet(self._spam)
+
+ @spam.deleter
+ def spam(self):
+ raise PropertyDel(self._spam)
+
+class PropertyDocBase(object):
+ _spam = 1
+ def _get_spam(self):
+ return self._spam
+ spam = Property(object, _get_spam, doc="spam spam spam")
+
+class PropertyDocSub(PropertyDocBase):
+ @PropertyDocBase.spam.getter
+ def spam(self):
+ """The decorator does not use this doc string"""
+ return self._spam
+
+class PropertySubNewGetter(BaseClass):
+ @BaseClass.spam.getter
+ def spam(self):
+ """new docstring"""
+ return 5
+
+class PropertyNewGetter(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+
+ @Property(object)
+ def spam(self):
+ """original docstring"""
+ return 1
+ @spam.getter
+ def spam(self):
+ """new docstring"""
+ return 8
+
+class PropertyTests(unittest.TestCase):
+ def test_property_decorator_baseclass(self):
+ # see #1620
+ base = BaseClass()
+ self.assertEqual(base.spam, 5)
+ self.assertEqual(base._spam, 5)
+ base.spam = 10
+ self.assertEqual(base.spam, 10)
+ self.assertEqual(base._spam, 10)
+ delattr(base, "spam")
+ self.assertTrue(not hasattr(base, "spam"))
+ self.assertTrue(not hasattr(base, "_spam"))
+ base.spam = 20
+ self.assertEqual(base.spam, 20)
+ self.assertEqual(base._spam, 20)
+
+ def test_property_decorator_subclass(self):
+ # see #1620
+ sub = SubClass()
+ self.assertRaises(PropertyGet, getattr, sub, "spam")
+ self.assertRaises(PropertySet, setattr, sub, "spam", None)
+ self.assertRaises(PropertyDel, delattr, sub, "spam")
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_decorator_subclass_doc(self):
+ sub = SubClass()
+ self.assertEqual(sub.__class__.spam.__doc__, "SubClass.getter")
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_decorator_baseclass_doc(self):
+ base = BaseClass()
+ self.assertEqual(base.__class__.spam.__doc__, "BaseClass.getter")
+
+ def test_property_decorator_doc(self):
+ base = PropertyDocBase()
+ sub = PropertyDocSub()
+ self.assertEqual(base.__class__.spam.__doc__, "spam spam spam")
+ self.assertEqual(sub.__class__.spam.__doc__, "spam spam spam")
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_getter_doc_override(self):
+ newgettersub = PropertySubNewGetter()
+ self.assertEqual(newgettersub.spam, 5)
+ self.assertEqual(newgettersub.__class__.spam.__doc__, "new docstring")
+ newgetter = PropertyNewGetter()
+ self.assertEqual(newgetter.spam, 8)
+ self.assertEqual(newgetter.__class__.spam.__doc__, "new docstring")
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_builtin_doc_writable(self):
+ p = Property(object, doc='basic')
+ self.assertEqual(p.__doc__, 'basic')
+ p.__doc__ = 'extended'
+ self.assertEqual(p.__doc__, 'extended')
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_decorator_doc_writable(self):
+ class PropertyWritableDoc(object):
+
+ @Property(object)
+ def spam(self):
+ """Eggs"""
+ return "eggs"
+
+ sub = PropertyWritableDoc()
+ self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
+ sub.__class__.spam.__doc__ = 'Spam'
+ self.assertEqual(sub.__class__.spam.__doc__, 'Spam')
+
+ if has_test: # This test has no support in Python 2
+ @support.refcount_test
+ def test_refleaks_in___init__(self):
+ gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
+ fake_prop = Property(object, 'fget', 'fset', "freset", 'fdel', 'doc')
+ refs_before = gettotalrefcount()
+ for i in range(100):
+ fake_prop.__init__(object, 'fget', 'fset', "freset", 'fdel', 'doc')
+ self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
+
+
+# Note: We ignore the whole subclass tests concerning __doc__ strings.
+# See the original Python test starting with:
+# "Issue 5890: subclasses of property do not preserve method __doc__ strings"
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/pysidetest_global.h b/sources/pyside6/tests/pysidetest/pysidetest_global.h
index 6f9b187ba..6f9b187ba 100644
--- a/sources/pyside2/tests/pysidetest/pysidetest_global.h
+++ b/sources/pyside6/tests/pysidetest/pysidetest_global.h
diff --git a/sources/pyside2/tests/pysidetest/pysidetest_macros.h b/sources/pyside6/tests/pysidetest/pysidetest_macros.h
index b561efbbc..b561efbbc 100644
--- a/sources/pyside2/tests/pysidetest/pysidetest_macros.h
+++ b/sources/pyside6/tests/pysidetest/pysidetest_macros.h
diff --git a/sources/pyside6/tests/pysidetest/qapp_like_a_macro_test.py b/sources/pyside6/tests/pysidetest/qapp_like_a_macro_test.py
new file mode 100644
index 000000000..2a796cea8
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/qapp_like_a_macro_test.py
@@ -0,0 +1,88 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6
+
+# This test tests the new "macro" feature of qApp.
+# It also uses the qApp variable to finish the instance and start over.
+
+# Note: this test makes qapplication_singleton_test.py obsolete.
+
+class qAppMacroTest(unittest.TestCase):
+ _test_1093_is_first = True
+
+ def test_qApp_is_like_a_macro_and_can_restart(self):
+ self._test_1093_is_first = False
+ from PySide6 import QtCore
+ try:
+ from PySide6 import QtGui, QtWidgets
+ except ImportError:
+ QtWidgets = QtGui = QtCore
+ # qApp is in the builtins
+ self.assertEqual(bool(qApp), False)
+ # and the type is None
+ self.assertTrue(qApp is None)
+ # now we create an application for all cases
+ classes = (QtCore.QCoreApplication,
+ QtGui.QGuiApplication,
+ QtWidgets.QApplication)
+ for klass in classes:
+ print("created", klass([]))
+ qApp.shutdown()
+ print("deleted qApp", qApp)
+ # creating without deletion raises:
+ QtCore.QCoreApplication([])
+ with self.assertRaises(RuntimeError):
+ QtCore.QCoreApplication([])
+ self.assertEqual(QtCore.QCoreApplication.instance(), qApp)
+
+ def test_1093(self):
+ # Test that without creating a QApplication staticMetaObject still exists.
+ # Please see https://bugreports.qt.io/browse/PYSIDE-1093 for explanation.
+ # Note: This test must run first, otherwise we would be mislead!
+ assert self._test_1093_is_first
+ from PySide6 import QtCore
+ self.assertTrue(QtCore.QObject.staticMetaObject is not None)
+ app = QtCore.QCoreApplication.instance()
+ self.assertTrue(QtCore.QObject.staticMetaObject is not None)
+ if app is None:
+ app = QtCore.QCoreApplication([])
+ self.assertTrue(QtCore.QObject.staticMetaObject is not None)
+ qApp.shutdown()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/qvariant_test.py b/sources/pyside6/tests/pysidetest/qvariant_test.py
new file mode 100644
index 000000000..e2a8a5f6e
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/qvariant_test.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestObject
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QKeySequence
+
+from helper.usesqapplication import UsesQApplication
+
+class QVariantTest(UsesQApplication):
+
+ def testQKeySequenceQVariantOperator(self):
+ # bug #775
+ ks = QKeySequence(Qt.SHIFT, Qt.CTRL, Qt.Key_P, Qt.Key_R)
+ self.assertEqual(TestObject.checkType(ks), 4107)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/repr_test.py b/sources/pyside6/tests/pysidetest/repr_test.py
index 356d11911..356d11911 100644
--- a/sources/pyside2/tests/pysidetest/repr_test.py
+++ b/sources/pyside6/tests/pysidetest/repr_test.py
diff --git a/sources/pyside6/tests/pysidetest/signal_slot_warning.py b/sources/pyside6/tests/pysidetest/signal_slot_warning.py
new file mode 100644
index 000000000..5ca3e3d0f
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/signal_slot_warning.py
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' PYSIDE-315: https://bugreports.qt.io/browse/PYSIDE-315
+ Test that creating a signal in the wrong order triggers a warning. '''
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+import warnings
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import PySide6.QtCore as QtCore
+
+
+class Whatever(QtCore.QObject):
+ echoSignal = QtCore.Signal(str)
+
+ def __init__(self):
+ super(Whatever, self).__init__()
+ self.echoSignal.connect(self.mySlot)
+
+ def mySlot(self, v):
+ pass
+
+class WarningTest(unittest.TestCase):
+ def testSignalSlotWarning(self):
+ # we create an object. This gives no warning.
+ obj = Whatever()
+ # then we insert a signal after slots have been created.
+ setattr(Whatever, "foo", QtCore.Signal())
+ with warnings.catch_warnings(record=True) as w:
+ # Cause all warnings to always be triggered.
+ warnings.simplefilter("always")
+ # Trigger a warning.
+ obj.foo.connect(obj.mySlot)
+ # Verify some things
+ assert issubclass(w[-1].category, RuntimeWarning)
+ assert "*** Sort Warning ***" in str(w[-1].message)
+ # note that this warning cannot be turned into an error (too hard)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside6/tests/pysidetest/signal_tp_descr_get_test.py b/sources/pyside6/tests/pysidetest/signal_tp_descr_get_test.py
new file mode 100644
index 000000000..f5af4e1ce
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/signal_tp_descr_get_test.py
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""
+PYSIDE-68: Test that signals have a `__get__` function after all.
+
+We supply a `tp_descr_get` slot for the signal type.
+That creates the `__get__` method via `PyType_Ready`.
+
+The original test script was converted to a unittest.
+See https://bugreports.qt.io/browse/PYSIDE-68 .
+
+Created: 16 May '12 21:25
+Updated: 17 Sep '20 17:02
+
+This fix was over 8 years late. :)
+"""
+
+from __future__ import print_function
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+def emit_upon_success(signal):
+ def f_(f):
+ def f__(self):
+ result = f(self)
+ s = signal.__get__(self)
+ print(result)
+ return result
+ return f__
+ return f_
+
+
+class Foo(QtCore.QObject):
+ SIG = QtCore.Signal()
+
+ @emit_upon_success(SIG)
+ def do_something(self):
+ print("hooka, it worrrks")
+ return 42
+
+
+class UnderUnderGetUnderUnderTest(unittest.TestCase):
+ def test_tp_descr_get(self):
+ foo = Foo()
+ ret = foo.do_something()
+ self.assertEqual(ret, 42)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/signalandnamespace_test.py b/sources/pyside6/tests/pysidetest/signalandnamespace_test.py
index f56beaf84..f56beaf84 100644
--- a/sources/pyside2/tests/pysidetest/signalandnamespace_test.py
+++ b/sources/pyside6/tests/pysidetest/signalandnamespace_test.py
diff --git a/sources/pyside6/tests/pysidetest/signalemissionfrompython_test.py b/sources/pyside6/tests/pysidetest/signalemissionfrompython_test.py
new file mode 100644
index 000000000..568564d6b
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/signalemissionfrompython_test.py
@@ -0,0 +1,114 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestObject
+from PySide6.QtCore import QObject, SIGNAL
+
+'''Tests the behaviour of signals with default values when emitted from Python.'''
+
+class SignalEmissionFromPython(unittest.TestCase):
+
+ def setUp(self):
+ self.obj1 = TestObject(0)
+ self.obj2 = TestObject(0)
+ self.one_called = 0
+ self.two_called = 0
+
+ def tearDown(self):
+ del self.obj1
+ del self.obj2
+ del self.one_called
+ del self.two_called
+
+ def testConnectNewStyleEmitVoidSignal(self):
+ def callbackOne():
+ self.one_called += 1
+ self.obj2.signalWithDefaultValue.emit()
+ def callbackTwo():
+ self.two_called += 1
+ self.obj1.signalWithDefaultValue.connect(callbackOne)
+ self.obj2.signalWithDefaultValue.connect(callbackTwo)
+ self.obj1.emitSignalWithDefaultValue_void()
+ self.obj2.emitSignalWithDefaultValue_void()
+ self.assertEqual(self.one_called, 1)
+ self.assertEqual(self.two_called, 2)
+
+ def testConnectOldStyleEmitVoidSignal(self):
+ def callbackOne():
+ self.one_called += 1
+ self.obj2.signalWithDefaultValue.emit()
+ def callbackTwo():
+ self.two_called += 1
+ QObject.connect(self.obj1, SIGNAL('signalWithDefaultValue()'), callbackOne)
+ QObject.connect(self.obj2, SIGNAL('signalWithDefaultValue()'), callbackTwo)
+ self.obj1.emitSignalWithDefaultValue_void()
+ self.obj2.emitSignalWithDefaultValue_void()
+ self.assertEqual(self.one_called, 1)
+ self.assertEqual(self.two_called, 2)
+
+ def testConnectNewStyleEmitBoolSignal(self):
+ def callbackOne():
+ self.one_called += 1
+ self.obj2.signalWithDefaultValue[bool].emit(True)
+ def callbackTwo():
+ self.two_called += 1
+ self.obj1.signalWithDefaultValue.connect(callbackOne)
+ self.obj2.signalWithDefaultValue.connect(callbackTwo)
+ self.obj1.emitSignalWithDefaultValue_void()
+ self.obj2.emitSignalWithDefaultValue_void()
+ self.assertEqual(self.one_called, 1)
+ self.assertEqual(self.two_called, 2)
+
+ def testConnectOldStyleEmitBoolSignal(self):
+ def callbackOne():
+ self.one_called += 1
+ self.obj2.signalWithDefaultValue[bool].emit(True)
+ def callbackTwo():
+ self.two_called += 1
+ QObject.connect(self.obj1, SIGNAL('signalWithDefaultValue()'), callbackOne)
+ QObject.connect(self.obj2, SIGNAL('signalWithDefaultValue()'), callbackTwo)
+ self.obj1.emitSignalWithDefaultValue_void()
+ self.obj2.emitSignalWithDefaultValue_void()
+ self.assertEqual(self.one_called, 1)
+ self.assertEqual(self.two_called, 2)
+
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/pysidetest/signalwithdefaultvalue_test.py b/sources/pyside6/tests/pysidetest/signalwithdefaultvalue_test.py
new file mode 100644
index 000000000..ac95ed71a
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/signalwithdefaultvalue_test.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from testbinding import TestObject
+from PySide6.QtCore import QObject, SIGNAL
+
+'''Tests the behaviour of signals with default values.'''
+
+class SignalWithDefaultValueTest(unittest.TestCase):
+
+ def setUp(self):
+ self.obj = TestObject(0)
+ self.void_called = False
+ self.bool_called = False
+
+ def tearDown(self):
+ del self.obj
+ del self.void_called
+ del self.bool_called
+
+ def testConnectNewStyleEmitVoidSignal(self):
+ def callbackVoid():
+ self.void_called = True
+ def callbackBool(value):
+ self.bool_called = True
+ self.obj.signalWithDefaultValue.connect(callbackVoid)
+ self.obj.signalWithDefaultValue[bool].connect(callbackBool)
+ self.obj.emitSignalWithDefaultValue_void()
+ self.assertTrue(self.void_called)
+ self.assertTrue(self.bool_called)
+
+ def testConnectNewStyleEmitBoolSignal(self):
+ def callbackVoid():
+ self.void_called = True
+ def callbackBool(value):
+ self.bool_called = True
+ self.obj.signalWithDefaultValue.connect(callbackVoid)
+ self.obj.signalWithDefaultValue[bool].connect(callbackBool)
+ self.obj.emitSignalWithDefaultValue_bool()
+ self.assertTrue(self.void_called)
+ self.assertTrue(self.bool_called)
+
+ def testConnectOldStyleEmitVoidSignal(self):
+ def callbackVoid():
+ self.void_called = True
+ def callbackBool(value):
+ self.bool_called = True
+ QObject.connect(self.obj, SIGNAL('signalWithDefaultValue()'), callbackVoid)
+ QObject.connect(self.obj, SIGNAL('signalWithDefaultValue(bool)'), callbackBool)
+ self.obj.emitSignalWithDefaultValue_void()
+ self.assertTrue(self.void_called)
+ self.assertTrue(self.bool_called)
+
+ def testConnectOldStyleEmitBoolSignal(self):
+ def callbackVoid():
+ self.void_called = True
+ def callbackBool(value):
+ self.bool_called = True
+ QObject.connect(self.obj, SIGNAL('signalWithDefaultValue()'), callbackVoid)
+ QObject.connect(self.obj, SIGNAL('signalWithDefaultValue(bool)'), callbackBool)
+ self.obj.emitSignalWithDefaultValue_bool()
+ self.assertTrue(self.void_called)
+ self.assertTrue(self.bool_called)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/pysidetest/symbols.filter b/sources/pyside6/tests/pysidetest/symbols.filter
index af6c744dd..af6c744dd 100644
--- a/sources/pyside2/tests/pysidetest/symbols.filter
+++ b/sources/pyside6/tests/pysidetest/symbols.filter
diff --git a/sources/pyside2/tests/pysidetest/testobject.cpp b/sources/pyside6/tests/pysidetest/testobject.cpp
index 43fa93bac..43fa93bac 100644
--- a/sources/pyside2/tests/pysidetest/testobject.cpp
+++ b/sources/pyside6/tests/pysidetest/testobject.cpp
diff --git a/sources/pyside2/tests/pysidetest/testobject.h b/sources/pyside6/tests/pysidetest/testobject.h
index c31a2ab73..c31a2ab73 100644
--- a/sources/pyside2/tests/pysidetest/testobject.h
+++ b/sources/pyside6/tests/pysidetest/testobject.h
diff --git a/sources/pyside2/tests/pysidetest/testview.cpp b/sources/pyside6/tests/pysidetest/testview.cpp
index 49e3730f5..49e3730f5 100644
--- a/sources/pyside2/tests/pysidetest/testview.cpp
+++ b/sources/pyside6/tests/pysidetest/testview.cpp
diff --git a/sources/pyside2/tests/pysidetest/testview.h b/sources/pyside6/tests/pysidetest/testview.h
index b80a7fca9..b80a7fca9 100644
--- a/sources/pyside2/tests/pysidetest/testview.h
+++ b/sources/pyside6/tests/pysidetest/testview.h
diff --git a/sources/pyside6/tests/pysidetest/typedef_signal_test.py b/sources/pyside6/tests/pysidetest/typedef_signal_test.py
new file mode 100644
index 000000000..f70eda0b2
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/typedef_signal_test.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from PySide6.QtCore import QObject
+from testbinding import TestObject
+
+class Receiver(QObject):
+
+ def __init__(self):
+ QObject.__init__(self)
+ self.received = None
+
+ def slot(self, value):
+ self.received = value
+
+class TypedefSignal(unittest.TestCase):
+
+ def testTypedef(self):
+ obj = TestObject(0)
+ receiver = Receiver()
+
+ obj.signalWithTypedefValue.connect(receiver.slot)
+ obj.emitSignalWithTypedefValue(2)
+ self.assertEqual(receiver.received.value, 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/pysidetest/typesystem_pysidetest.xml b/sources/pyside6/tests/pysidetest/typesystem_pysidetest.xml
index c959e7fd3..c959e7fd3 100644
--- a/sources/pyside2/tests/pysidetest/typesystem_pysidetest.xml
+++ b/sources/pyside6/tests/pysidetest/typesystem_pysidetest.xml
diff --git a/sources/pyside6/tests/pysidetest/version_test.py b/sources/pyside6/tests/pysidetest/version_test.py
new file mode 100644
index 000000000..03d84e73c
--- /dev/null
+++ b/sources/pyside6/tests/pysidetest/version_test.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import __version_info__, __version__, QtCore
+
+class CheckForVariablesTest(unittest.TestCase):
+ def testVesions(self):
+ version_tuple = (__version_info__[0], __version_info__[1], __version_info__[2])
+ self.assertTrue(version_tuple >= (1, 0, 0))
+
+ self.assertTrue(version_tuple < (99, 99, 99))
+ self.assertTrue(__version__)
+
+ self.assertTrue(QtCore.__version_info__ >= (4, 5, 0))
+ self.assertTrue(QtCore.__version__)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside2/tests/registry/CMakeLists.txt b/sources/pyside6/tests/registry/CMakeLists.txt
index df50037e1..df50037e1 100644
--- a/sources/pyside2/tests/registry/CMakeLists.txt
+++ b/sources/pyside6/tests/registry/CMakeLists.txt
diff --git a/sources/pyside6/tests/registry/existence_test.py b/sources/pyside6/tests/registry/existence_test.py
new file mode 100644
index 000000000..f08d70278
--- /dev/null
+++ b/sources/pyside6/tests/registry/existence_test.py
@@ -0,0 +1,253 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+"""
+existence_test.py
+-----------------
+
+A test that checks all function signatures if they still exist.
+
+Definition of the rules used:
+=============================
+
+Any entry
+---------
+
+ Exists in file Exists in Binary Result
+ + + ok
+ + - error
+ - + ok
+
+List entry
+----------
+
+ Arity in file Arity in Binary Result
+ n n ok
+ n < n error
+ n > n ok
+
+"""
+
+import os
+import re
+import sys
+from textwrap import dedent
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_all_test_paths
+init_all_test_paths()
+
+from init_platform import enum_all, generate_all
+from util import (isolate_warnings, check_warnings, suppress_warnings, warn,
+ is_ci, qt_version, get_script_dir, get_effective_refpath,
+ get_refpath, import_refmodule)
+from PySide6 import *
+
+refPath = get_refpath()
+effectiveRefPath = get_effective_refpath()
+pyc = os.path.splitext(effectiveRefPath)[0] + ".pyc"
+if os.path.exists(pyc) and not os.path.exists(effectiveRefPath):
+ # on Python2 the pyc file would be imported
+ os.unlink(pyc)
+
+if refPath != effectiveRefPath:
+ print("*** Falling back to ", effectiveRefPath, " since expected ",
+ refPath, " does not exist")
+
+script_dir = get_script_dir()
+shortpath = os.path.relpath(effectiveRefPath, script_dir)
+try:
+ sig_exists = import_refmodule()
+ print("found:", shortpath)
+ have_refmodule = True
+except ImportError:
+ print("*** not found:", shortpath)
+ have_refmodule = False
+except SyntaxError:
+ print("*** not a python file, removed:", shortpath)
+ os.unlink(effectiveRefPath)
+ have_refmodule = False
+except NameError as e:
+ if "recreate" in e.args[0]:
+ print("*** explicit request to recreate:", shortpath)
+ else:
+ print("*** unexpected NameError:", e, "- creating", shortpath)
+ os.unlink(effectiveRefPath)
+ have_refmodule = False
+dict_name = "sig_dict"
+if have_refmodule and not hasattr(sig_exists, dict_name):
+ print(f"*** wrong module without '{dict_name}', removed: {shortpath}")
+ os.unlink(effectiveRefPath)
+ have_refmodule = False
+
+
+@unittest.skipIf(not have_refmodule,
+ "not activated for this platform or version")
+class TestSignaturesExists(unittest.TestCase):
+ """
+ This is the current simple attempt to support a signature self test.
+ You can activate it for your platform by supplying your own reference
+ file. Simply run init_platform.py and add the generated file to the
+ repository.
+ """
+
+ @staticmethod
+ def _do_the_test(found_sigs):
+
+ def multi_signature_msg(key, actual, expect):
+ len_act = len(actual) if type(actual) is list else 1
+ len_exp = len(expect) if type(expect) is list else 1
+ return (f"multi-signature count mismatch for '{key}'. "
+ f"Actual {len_act} {actual} vs. expected {len_exp} {expect}")
+
+ for key, value in sig_exists.sig_dict.items():
+ name = key.rsplit(".", 1)[-1]
+ if name in ("next", "__next__"): # ignore problematic cases
+ continue
+ if "<" in key:
+ # Skip over remaining crap in "<...>"
+ continue
+ if key.startswith("sample.SampleNamespace"):
+ # We cannot work with sample namespaces after the change to __qualname__.
+ continue
+ if (key.startswith("smart.SharedPtr") or
+ re.match(r"PySide6\..*?\.QSharedPointer_", key)):
+ # These mangled names are not supported.
+ # We should fix them.
+ continue
+ if key not in found_sigs:
+ warn("missing key: '{} value={}'".format(key, value), stacklevel=3)
+ else:
+ found_val = found_sigs[key]
+ if type(value) is list and (
+ type(found_val) is tuple or
+ len(found_val) < len(value)):
+ # We check that nothing got lost. But it is ok when an older
+ # registry file does not know all variants, yet!
+ warn(multi_signature_msg(key, found_val, value), stacklevel=3)
+
+ def test_signatures(self):
+ found_sigs = enum_all()
+ with isolate_warnings():
+ self._do_the_test(found_sigs)
+ if is_ci and check_warnings():
+ raise RuntimeError("There are errors, see above.")
+
+ def test_error_is_raised(self):
+ found_sigs = enum_all()
+ # Make sure that errors are actually raised.
+ search = list(found_sigs.keys())
+ pos = 42 # arbitrary and historycal, could be 0 as well
+
+ # We try all variants:
+ while type(found_sigs[search[pos]]) is not tuple:
+ pos += 1
+ tuple_key = search[pos]
+ while type(found_sigs[search[pos]]) is not list:
+ pos += 1
+ list_key = search[pos]
+
+ test_sigs = found_sigs.copy()
+ test_sigs.pop(tuple_key)
+ with isolate_warnings(), suppress_warnings():
+ self._do_the_test(test_sigs)
+ self.assertTrue(check_warnings(), "you warn about too few entries")
+
+ test_sigs = found_sigs.copy()
+ test_sigs["whatnot"] = ("nothing", "real")
+ with isolate_warnings(), suppress_warnings():
+ self._do_the_test(test_sigs)
+ self.assertFalse(check_warnings(), "you ignore too many entries")
+
+ test_sigs = found_sigs.copy()
+ repl = test_sigs[list_key]
+ repl.pop(0)
+ test_sigs[list_key] = repl
+ with isolate_warnings(), suppress_warnings():
+ self._do_the_test(test_sigs)
+ # An arity that is now missing is an error.
+ self.assertTrue(check_warnings(), "you warn when arity got smaller")
+
+ test_sigs = found_sigs.copy()
+ repl = test_sigs[list_key]
+ repl = repl[0]
+ assert type(repl) is tuple
+ test_sigs[list_key] = repl
+ with isolate_warnings(), suppress_warnings():
+ self._do_the_test(test_sigs)
+ # An arity that is now missing is an error.
+ self.assertTrue(check_warnings(), "you warn when list degraded to tuple")
+
+ test_sigs = found_sigs.copy()
+ repl = test_sigs[list_key]
+ repl = repl + repl
+ test_sigs[list_key] = repl
+ with isolate_warnings(), suppress_warnings():
+ self._do_the_test(test_sigs)
+ # More arities are ignored, because we might test an older version.
+ self.assertFalse(check_warnings(), "you ignore when arity got bigger")
+
+
+tested_versions = (5, 6), (5, 9), (5, 11), (5, 12), (5, 14)
+
+if not have_refmodule and is_ci and qt_version()[:2] in tested_versions:
+ class TestFor_CI_Init(unittest.TestCase):
+ """
+ This helper class generates the reference file for CI.
+ It creates an output listing that can be used to check
+ the result back in.
+ """
+ generate_all()
+ sys.stderr.flush()
+ print("BEGIN_FILE", shortpath, file=sys.stderr)
+ with open(refPath) as f:
+ print(f.read(), file=sys.stderr)
+ print("END_FILE", shortpath, file=sys.stderr)
+ sys.stderr.flush()
+ raise RuntimeError(dedent("""
+ {line}
+ ** This is the initial call. You should check this file in:
+ ** {}
+ **""").format(shortpath, line=79 * "*"))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/registry/exists_darwin_5_14_2_ci.py b/sources/pyside6/tests/registry/exists_darwin_5_14_2_ci.py
index 1532642fe..1532642fe 100644
--- a/sources/pyside2/tests/registry/exists_darwin_5_14_2_ci.py
+++ b/sources/pyside6/tests/registry/exists_darwin_5_14_2_ci.py
diff --git a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py b/sources/pyside6/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py
index 24cf74589..24cf74589 100644
--- a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py
+++ b/sources/pyside6/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_2_ci.py
diff --git a/sources/pyside2/tests/registry/exists_win32_5_14_2_ci.py b/sources/pyside6/tests/registry/exists_win32_5_14_2_ci.py
index 7b79c5c56..7b79c5c56 100644
--- a/sources/pyside2/tests/registry/exists_win32_5_14_2_ci.py
+++ b/sources/pyside6/tests/registry/exists_win32_5_14_2_ci.py
diff --git a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py b/sources/pyside6/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py
index 4e6bb4f54..4e6bb4f54 100644
--- a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py
+++ b/sources/pyside6/tests/registry/exists_x86_64_suse_linux_5_14_2_ci.py
diff --git a/sources/pyside6/tests/registry/init_platform.py b/sources/pyside6/tests/registry/init_platform.py
new file mode 100644
index 000000000..5ac587bc5
--- /dev/null
+++ b/sources/pyside6/tests/registry/init_platform.py
@@ -0,0 +1,255 @@
+#############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+"""
+init_platform.py
+
+Existence registry
+==================
+
+This is a registry for all existing function signatures.
+One file is generated with all signatures of a platform and version.
+
+The scope has been extended to generate all signatures from the
+shiboken and pysidetest projects.
+"""
+
+import sys
+import os
+from contextlib import contextmanager
+from textwrap import dedent
+from util import get_refpath, get_script_dir
+
+def qt_build():
+ result = '<Unknown build of Qt>'
+ try:
+ from PySide6.QtCore import QLibraryInfo
+ result = QLibraryInfo.build()
+ except:
+ pass
+ return result
+
+script_dir = get_script_dir()
+history_dir = os.path.join(script_dir, 'build_history')
+
+# Find out if we have the build dir, already. Then use it.
+look_for = os.path.join("pyside6", "tests", "pysidetest")
+have_build_dir = [x for x in sys.path if x.endswith(look_for)]
+if have_build_dir:
+ all_build_dir = os.path.normpath(os.path.join(have_build_dir[0], "..", "..", ".."))
+elif os.path.exists(history_dir):
+ # Using the last build to find the build dir.
+ # Note: This is not reliable when building in parallel!
+ last_build = max(x for x in os.listdir(history_dir) if x.startswith("20"))
+ fpath = os.path.join(history_dir, last_build, "build_dir.txt")
+ if os.path.exists(fpath):
+ with open(fpath) as f:
+ f_contents = f.read().strip()
+ f_contents_split = f_contents.splitlines()
+ try:
+ all_build_dir = f_contents_split[0]
+ except IndexError:
+ print("Error: can't find the build dir in the given file '{}'".format(fpath))
+ sys.exit(1)
+else:
+ print(dedent("""
+ Can't find the build dir in the history.
+ Compile again and don't forget to specify "--build-tests".
+ """))
+ sys.exit(1)
+
+if not os.path.exists(os.path.join(all_build_dir, look_for)):
+ print(dedent("""
+ PySide has not been built with tests enabled.
+ Compile again and don't forget to specify "--build-tests".
+ """))
+ sys.exit(1)
+
+pyside_build_dir = os.path.join(all_build_dir, "pyside6")
+shiboken_build_dir = os.path.join(all_build_dir, "shiboken6")
+
+# now we compute all paths:
+def set_ospaths(build_dir):
+ ps = os.pathsep
+ ospath_var = "PATH" if sys.platform == "win32" else "LD_LIBRARY_PATH"
+ old_val = os.environ.get(ospath_var, "")
+ lib_path = [os.path.join(build_dir, "pyside6", "libpyside"),
+ os.path.join(build_dir, "pyside6", "tests", "pysidetest"),
+ os.path.join(build_dir, "shiboken6", "tests", "libminimal"),
+ os.path.join(build_dir, "shiboken6", "tests", "libsample"),
+ os.path.join(build_dir, "shiboken6", "tests", "libother"),
+ os.path.join(build_dir, "shiboken6", "tests", "libsmart"),
+ os.path.join(build_dir, "shiboken6", "libshiboken")]
+ ospath = ps.join(lib_path + old_val.split(ps))
+ os.environ[ospath_var] = ospath
+
+set_ospaths(all_build_dir)
+sys.path[:0] = [os.path.join(shiboken_build_dir, "shibokenmodule"),
+ pyside_build_dir]
+
+import PySide6
+
+all_modules = list("PySide6." + _ for _ in PySide6.__all__)
+
+# now we should be able to do all imports:
+if not have_build_dir:
+ sys.path.insert(0, os.path.join(pyside_build_dir, "tests", "pysidetest"))
+import testbinding
+all_modules.append("testbinding")
+
+# Note: This is not the shiboken dir as usual, but the binary.
+import shiboken6 as Shiboken
+Shiboken.__name__ = "Shiboken"
+sys.modules["Shiboken"] = sys.modules.pop("shiboken6")
+all_modules.append("Shiboken")
+
+# 'sample/smart' are needed by 'other', so import them first.
+for modname in "minimal sample smart other".split():
+ sys.path.insert(0, os.path.join(shiboken_build_dir, "tests", modname + "binding"))
+ __import__(modname)
+ all_modules.append(modname)
+
+from shibokensupport.signature.lib.enum_sig import SimplifyingEnumerator
+
+# Make sure not to get .pyc in Python2.
+sourcepath = os.path.splitext(__file__)[0] + ".py"
+
+
+class Formatter(object):
+ """
+ Formatter is formatting the signature listing of an enumerator.
+
+ It is written as context managers in order to avoid many callbacks.
+ The separation in formatter and enumerator is done to keep the
+ unrelated tasks of enumeration and formatting apart.
+ """
+ def __init__(self, outfile):
+ self.outfile = outfile
+ self.last_level = 0
+
+ def print(self, *args, **kw):
+ print(*args, file=self.outfile, **kw) if self.outfile else None
+
+ @contextmanager
+ def module(self, mod_name):
+ self.print(f"")
+ self.print(f"# Module {mod_name}")
+ self.print(f"sig_dict.update({{")
+ yield
+ self.print(f' }}) if "{mod_name}" in sys.modules else None')
+
+ @contextmanager
+ def klass(self, class_name, class_str):
+ self.print()
+ self.print(f"# class {self.mod_name}.{class_name}:")
+ yield
+
+ @contextmanager
+ def function(self, func_name, signature):
+ if self.last_level > self.level:
+ self.print()
+ self.last_level = self.level
+ class_name = self.class_name
+ if class_name is None:
+ key = viskey = f"{self.mod_name}.{func_name}"
+ else:
+ key = viskey = f"{self.mod_name}.{class_name}.{func_name}"
+ if key.endswith("lY"):
+ # Some classes like PySide6.QtGui.QContextMenuEvent have functions
+ # globalX and the same with Y. The gerrit robot thinks that this
+ # is a badly written "globally". Convince it by hiding this word.
+ viskey = viskey[:-1] + '""Y'
+ self.print(f' "{viskey}": {signature},')
+ yield key
+
+
+def enum_all():
+ fmt = Formatter(None)
+ enu = SimplifyingEnumerator(fmt)
+ ret = enu.result_type()
+ for mod_name in all_modules:
+ ret.update(enu.module(mod_name))
+ return ret
+
+
+def generate_all():
+ refPath = get_refpath()
+ module = os.path.basename(os.path.splitext(refPath)[0])
+ with open(refPath, "w") as outfile, open(sourcepath) as f:
+ fmt = Formatter(outfile)
+ enu = SimplifyingEnumerator(fmt)
+ lines = f.readlines()
+ license_line = next((lno for lno, line in enumerate(lines)
+ if "$QT_END_LICENSE$" in line))
+ fmt.print("#recreate # uncomment this to enforce generation")
+ fmt.print("".join(lines[:license_line + 3]))
+ version = sys.version.replace('\n', ' ')
+ build = qt_build()
+ fmt.print(dedent(f'''\
+ """
+ This file contains the simplified signatures for all functions in PySide
+ for module '{module}' using
+ Python {version}
+ {build}
+
+ There are no default values, no variable names and no self
+ parameter. Only types are present after simplification. The
+ functions 'next' resp. '__next__' are removed to make the output
+ identical for Python 2 and 3. '__div__' is also removed,
+ since it exists in Python 2, only.
+ """
+ '''))
+ fmt.print("import sys")
+ fmt.print("")
+ fmt.print("sig_dict = {}")
+ for mod_name in all_modules:
+ enu.module(mod_name)
+ fmt.print("# eof")
+
+
+def __main__():
+ print("+++ generating {}. You should probably check this file in."
+ .format(get_refpath()))
+ generate_all()
+
+
+if __name__ == "__main__":
+ __main__()
diff --git a/sources/pyside2/tests/registry/scrape_testresults.py b/sources/pyside6/tests/registry/scrape_testresults.py
index e0f451d10..e0f451d10 100644
--- a/sources/pyside2/tests/registry/scrape_testresults.py
+++ b/sources/pyside6/tests/registry/scrape_testresults.py
diff --git a/sources/pyside6/tests/registry/util.py b/sources/pyside6/tests/registry/util.py
new file mode 100644
index 000000000..6df88d858
--- /dev/null
+++ b/sources/pyside6/tests/registry/util.py
@@ -0,0 +1,181 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function, absolute_import
+
+"""
+Supporting isolation of warnings
+
+Warnings in unittests are not isolated.
+We sometimes use warnings to conveniently accumulate error messages
+and eventually report them afterwards as error.
+"""
+
+import sys
+import os
+import warnings
+import re
+from contextlib import contextmanager
+
+warn_name = "__warningregistry__"
+ignore_re = 'Not importing directory .*'
+
+@contextmanager
+def isolate_warnings():
+ save_warnings = {}
+ for name, mod in sys.modules.items():
+ if mod and hasattr(mod, warn_name):
+ save_warnings[name] = mod.__dict__[warn_name]
+ delattr(mod, warn_name)
+ else:
+ save_warnings[name] = None
+ yield
+ for name, warn in save_warnings.items():
+ mod = sys.modules[name]
+ if mod:
+ setattr(mod, warn_name, warn)
+ if warn is None:
+ delattr(mod, warn_name)
+
+@contextmanager
+def suppress_warnings():
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ yield
+
+def check_warnings():
+ for name, mod in sys.modules.items():
+ if mod:
+ reg = getattr(mod, warn_name, None)
+ if reg:
+ # XXX We need to filter warnings for Python 2.
+ # This should be avoided by renaming the duplicate folders.
+ for k in reg:
+ if type(k) is tuple and re.match(ignore_re, k[0]):
+ continue
+ return True
+ return False
+
+def warn(message, category=None, stacklevel=2):
+ """Issue a warning with the default 'RuntimeWarning'"""
+ if category is None:
+ category = UserWarning
+ warnings.warn(message, category, stacklevel)
+
+
+def linux_distribution():
+ """Returns the Linux distribution"""
+ # We have to be more specific because we had differences between
+ # RHEL 6.6 and RHEL 7.4 .
+ # Note: The platform module is deprecated. We need to switch to the
+ # distro package, ASAP! The distro has been extracted from Python,
+ # because it changes more often than the Python version.
+ distribution = []
+ try:
+ import distro
+ distribution = distro.linux_distribution()
+ except ImportError:
+ # platform.linux_distribution() was removed in 3.8
+ if sys.version_info[:2] < (3, 8):
+ import platform
+ distribution = platform.linux_distribution()
+ if distribution:
+ return "".join(distribution[:2]).lower()
+ warnings.warn('Cannot determine Linux distribution, please install distro',
+ UserWarning)
+ return ""
+
+
+# Python2 legacy: Correct 'linux2' to 'linux', recommended way.
+if sys.platform.startswith('linux'):
+ platform_name = linux_distribution()
+ # this currently happens on opensuse in 5.14:
+ if not platform_name:
+ # We intentionally crash when that last resort is also absent:
+ platform_name = os.environ["MACHTYPE"]
+ platform_name = re.sub('[^0-9a-z]', '_', platform_name)
+else:
+ platform_name = sys.platform
+# In the linux case, we need more information.
+
+is_py3 = sys.version_info[0] == 3
+is_ci = os.environ.get("QTEST_ENVIRONMENT", "") == "ci"
+
+def get_script_dir():
+ script_dir = os.path.normpath(os.path.dirname(__file__))
+ while "sources" not in os.listdir(script_dir):
+ script_dir = os.path.dirname(script_dir)
+ return script_dir
+
+def qt_version():
+ from PySide6.QtCore import __version__
+ return tuple(map(int, __version__.split(".")))
+
+# Format a registry file name for version.
+def _registry_filename(version, use_ci_module):
+ name = "exists_{}_{}_{}_{}{}.py".format(platform_name,
+ version[0], version[1], version[2], "_ci" if use_ci_module else "")
+ return os.path.join(os.path.dirname(__file__), name)
+
+# Return the expected registry file name.
+def get_refpath(use_ci_module=is_ci):
+ return _registry_filename(qt_version(), use_ci_module)
+
+# Return the registry file name, either that of the current
+# version or fall back to a previous patch release.
+def get_effective_refpath(use_ci_module=is_ci):
+ refpath = get_refpath(use_ci_module)
+ if os.path.exists(refpath):
+ return refpath
+ version = qt_version()
+ major, minor, patch = version[:3]
+ while patch >= 0:
+ file = _registry_filename((major, minor, patch), use_ci_module)
+ if os.path.exists(file):
+ return file
+ patch -= 1
+ return refpath
+
+# Import the CI version of the platform module
+def import_refmodule(use_ci_module=is_ci):
+ refpath = get_effective_refpath(use_ci_module)
+ modname = os.path.basename(os.path.splitext(refpath)[0])
+ return __import__(modname)
+
+# eof
diff --git a/sources/pyside2/tests/run_test.sh b/sources/pyside6/tests/run_test.sh
index f059ac014..f059ac014 100755
--- a/sources/pyside2/tests/run_test.sh
+++ b/sources/pyside6/tests/run_test.sh
diff --git a/sources/pyside2/tests/signals/CMakeLists.txt b/sources/pyside6/tests/signals/CMakeLists.txt
index 14936869f..14936869f 100644
--- a/sources/pyside2/tests/signals/CMakeLists.txt
+++ b/sources/pyside6/tests/signals/CMakeLists.txt
diff --git a/sources/pyside6/tests/signals/args_dont_match_test.py b/sources/pyside6/tests/signals/args_dont_match_test.py
new file mode 100644
index 000000000..71edff1ae
--- /dev/null
+++ b/sources/pyside6/tests/signals/args_dont_match_test.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+class ArgsDontMatch(unittest.TestCase):
+
+ def callback(self, arg1):
+ self.ok = True
+
+ def testConnectSignalToSlotWithLessArgs(self):
+ self.ok = False
+ obj1 = QObject()
+ QObject.connect(obj1, SIGNAL('the_signal(int, int, int)'), self.callback)
+ obj1.emit(SIGNAL('the_signal(int, int, int)'), 1, 2, 3)
+
+ self.assertTrue(self.ok)
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/bug_189.py b/sources/pyside6/tests/signals/bug_189.py
new file mode 100644
index 000000000..2e62ffe45
--- /dev/null
+++ b/sources/pyside6/tests/signals/bug_189.py
@@ -0,0 +1,60 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore, QtWidgets
+from helper.usesqapplication import UsesQApplication
+
+class TestBugPYSIDE189(UsesQApplication):
+
+ def testDisconnect(self):
+ # Disconnecting from a signal owned by a destroyed object
+ # should raise an exception, not segfault.
+ def onValueChanged(self, value):
+ pass
+
+ sld = QtWidgets.QSlider()
+ sld.valueChanged.connect(onValueChanged)
+
+ sld.deleteLater()
+
+ QtCore.QTimer.singleShot(0, self.app.quit)
+ self.app.exec_()
+
+ self.assertRaises(RuntimeError, sld.valueChanged.disconnect, onValueChanged)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/bug_311.py b/sources/pyside6/tests/signals/bug_311.py
new file mode 100644
index 000000000..ef59dafa1
--- /dev/null
+++ b/sources/pyside6/tests/signals/bug_311.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class DerivedDate(QtCore.QDate):
+ def __init__(self,y,m,d):
+ super(DerivedDate,self).__init__(y,m,d)
+
+class Emitter(QtCore.QObject):
+ dateSignal1 = QtCore.Signal(QtCore.QDate)
+ dateSignal2 = QtCore.Signal(DerivedDate)
+ tupleSignal = QtCore.Signal(tuple)
+
+class SignaltoSignalTest(UsesQCoreApplication):
+ def myCb(self, dt):
+ self._dt = dt
+
+ def testBug(self):
+ e = Emitter()
+ d = DerivedDate(2010,8,24)
+ self._dt = None
+ e.dateSignal1.connect(self.myCb)
+ e.dateSignal1.emit(d)
+ self.assertEqual(self._dt, d)
+
+ self._dt = None
+ e.dateSignal2.connect(self.myCb)
+ e.dateSignal2.emit(d)
+ self.assertEqual(self._dt, d)
+
+ myTuple = (5, 6, 7)
+ self._dt = None
+ e.tupleSignal.connect(self.myCb)
+ e.tupleSignal.emit(myTuple)
+ self.assertEqual(myTuple, self._dt)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/bug_312.py b/sources/pyside6/tests/signals/bug_312.py
new file mode 100644
index 000000000..71f4ae6da
--- /dev/null
+++ b/sources/pyside6/tests/signals/bug_312.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+MAX_LOOPS = 5
+MAX_OBJECTS = 200
+
+class Dummy(object):
+ def __init__(self, parent):
+ self._parent = parent
+
+ def callback(self):
+ self._called = True
+
+class MultipleSlots(unittest.TestCase):
+ def myCB(self):
+ self._count += 1
+
+ """
+ def testUnboundSignal(self):
+ o = QObject()
+ self._count = 0
+ for i in range(MAX_OBJECTS):
+ QObject.connect(o, SIGNAL("fire()"), lambda: self.myCB())
+
+ o.emit(SIGNAL("fire()"))
+ self.assertEqual(self._count, MAX_OBJECTS)
+
+ """
+ def testDisconnectCleanup(self):
+ for c in range(MAX_LOOPS):
+ self._count = 0
+ self._senders = []
+ for i in range(MAX_OBJECTS):
+ o = QObject()
+ QObject.connect(o, SIGNAL("fire()"), lambda: self.myCB())
+ self._senders.append(o)
+ o.emit(SIGNAL("fire()"))
+
+ self.assertEqual(self._count, MAX_OBJECTS)
+
+ #delete all senders will disconnect the signals
+ self._senders = []
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/signals/bug_319.py b/sources/pyside6/tests/signals/bug_319.py
new file mode 100644
index 000000000..62a74abd7
--- /dev/null
+++ b/sources/pyside6/tests/signals/bug_319.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class Listener(QtCore.QObject):
+ def __init__(self):
+ QtCore.QObject.__init__(self, None)
+ self._phrase = []
+
+ @QtCore.Slot(tuple)
+ def listen(self, words):
+ for w in words:
+ self._phrase.append(w)
+
+class Communicate(QtCore.QObject):
+ # create a new signal on the fly and name it 'speak'
+ speak = QtCore.Signal(tuple)
+
+class SignaltoSignalTest(UsesQCoreApplication):
+ def testBug(self):
+ someone = Communicate()
+ someone2 = Listener()
+ # connect signal and slot
+ someone.speak.connect(someone2.listen)
+ # emit 'speak' signal
+ talk = ("one","two","three")
+ someone.speak.emit(talk)
+ self.assertEqual(someone2._phrase, list(talk))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/bug_79.py b/sources/pyside6/tests/signals/bug_79.py
new file mode 100644
index 000000000..85e4408de
--- /dev/null
+++ b/sources/pyside6/tests/signals/bug_79.py
@@ -0,0 +1,76 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+import os
+import gc
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtGui, QtWidgets
+
+try:
+ from sys import gettotalrefcount
+ skiptest = False
+except ImportError:
+ skiptest = True
+
+class ConnectTest(unittest.TestCase):
+
+ def callback(self, o):
+ print("callback")
+ self._called = o
+
+ def testNoLeaks_ConnectAndDisconnect(self):
+ self._called = None
+ app = QtWidgets.QApplication([])
+ o = QtWidgets.QTreeView()
+ o.setModel(QtGui.QStandardItemModel())
+ o.selectionModel().destroyed.connect(self.callback)
+ o.selectionModel().destroyed.disconnect(self.callback)
+ gc.collect()
+ # if this is no debug build, then we check at least that
+ # we do not crash any longer.
+ if not skiptest:
+ total = gettotalrefcount()
+ for idx in range(1000):
+ o.selectionModel().destroyed.connect(self.callback)
+ o.selectionModel().destroyed.disconnect(self.callback)
+ gc.collect()
+ if not skiptest:
+ delta = gettotalrefcount() - total
+ print("delta total refcount =", delta)
+ self.assertTrue(abs(delta) < 10)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/decorators_test.py b/sources/pyside6/tests/signals/decorators_test.py
new file mode 100644
index 000000000..1ea3e37a6
--- /dev/null
+++ b/sources/pyside6/tests/signals/decorators_test.py
@@ -0,0 +1,111 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Slot, SIGNAL, SLOT
+
+class MyObject(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self._slotCalledCount = 0
+
+ @Slot()
+ def mySlot(self):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+ @Slot(int)
+ @Slot('QString')
+ def mySlot2(self, arg0):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+ @Slot(name='mySlot3')
+ def foo(self):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+ @Slot(str, int)
+ def mySlot4(self, a, b):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+ @Slot(result=int)
+ def mySlot5(self):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+ @Slot(result=QObject)
+ def mySlot6(self):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+class StaticMetaObjectTest(unittest.TestCase):
+
+ def testSignalPropagation(self):
+ o = MyObject()
+ m = o.metaObject()
+ self.assertTrue(m.indexOfSlot('mySlot()') > 0)
+ self.assertTrue(m.indexOfSlot('mySlot2(int)') > 0)
+ self.assertTrue(m.indexOfSlot('mySlot2(QString)') > 0)
+ self.assertTrue(m.indexOfSlot('mySlot3()') > 0)
+ self.assertTrue(m.indexOfSlot('mySlot4(QString,int)') > 0)
+
+ def testEmission(self):
+ o = MyObject()
+ o.connect(SIGNAL("mySignal()"), o, SLOT("mySlot()"))
+ o.emit(SIGNAL("mySignal()"))
+ self.assertTrue(o._slotCalledCount == 1)
+
+ def testResult(self):
+ o = MyObject()
+ mo = o.metaObject()
+ i = mo.indexOfSlot('mySlot5()')
+ m = mo.method(i)
+ self.assertEqual(m.typeName(), "int")
+
+ def testResultObject(self):
+ o = MyObject()
+ mo = o.metaObject()
+ i = mo.indexOfSlot('mySlot6()')
+ m = mo.method(i)
+ self.assertEqual(m.typeName(), "QObject*")
+
+class SlotWithoutArgs(unittest.TestCase):
+
+ def testError(self):
+ # It should be an error to call the slot without the
+ # arguments, as just @Slot would end up in a slot
+ # accepting argument functions
+ self.assertRaises(TypeError, Slot, lambda: 3)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/disconnect_test.py b/sources/pyside6/tests/signals/disconnect_test.py
new file mode 100644
index 000000000..9aa5bdba1
--- /dev/null
+++ b/sources/pyside6/tests/signals/disconnect_test.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(True)
+
+from PySide6.QtCore import *
+from testbinding import TestObject
+
+
+class Foo(QObject):
+ bar = Signal()
+
+class TestDisconnect(unittest.TestCase):
+ def theSlot1(self):
+ self.called1 = True
+
+ def theSlot2(self):
+ self.called2 = True
+
+ def testIt(self):
+ self.called1 = False
+ self.called2 = False
+ f = Foo()
+ f.bar.connect(self.theSlot1)
+ f.bar.connect(self.theSlot2)
+ f.bar.emit()
+ self.assertTrue(self.called1)
+ self.assertTrue(self.called2)
+
+ self.called1 = False
+ self.called2 = False
+ f.bar.disconnect()
+ f.bar.emit()
+ self.assertFalse(self.called1)
+ self.assertFalse(self.called2)
+
+ def testDuringCallback(self):
+ """ Test to see if the C++ object for a connection is accessed after the
+ method returns. This causes a segfault if the memory that was used by the
+ C++ object has been reused. """
+
+ self.called = False
+ obj = TestObject(0)
+ def callback():
+ obj.signalWithDefaultValue.disconnect(callback)
+
+ # Connect more callbacks to try to overwrite memory
+ for i in range(1000):
+ obj.signalWithDefaultValue.connect(lambda: None)
+
+ self.called = True
+
+ # A non-None return value is needed
+ return True
+ obj.signalWithDefaultValue.connect(callback)
+ obj.signalWithDefaultValue.emit()
+ self.assertTrue(self.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/invalid_callback_test.py b/sources/pyside6/tests/signals/invalid_callback_test.py
new file mode 100644
index 000000000..15ee3e84b
--- /dev/null
+++ b/sources/pyside6/tests/signals/invalid_callback_test.py
@@ -0,0 +1,62 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for passing invalid callbacks to QObject.connect'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+class InvalidCallback(unittest.TestCase):
+ '''Test case for passing an invalid callback to QObject.connect'''
+
+ def setUp(self):
+ #Acquire resources
+ self.obj = QObject()
+
+ def tearDown(self):
+ #Release resources
+ try:
+ del self.obj
+ except AttributeError:
+ pass
+
+ def testIntegerCb(self):
+ #Test passing an int as callback to QObject.connect
+ self.assertRaises(TypeError, QObject.connect, self.obj,
+ SIGNAL('destroyed()'), 42)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/lambda_gui_test.py b/sources/pyside6/tests/signals/lambda_gui_test.py
new file mode 100644
index 000000000..7311627b3
--- /dev/null
+++ b/sources/pyside6/tests/signals/lambda_gui_test.py
@@ -0,0 +1,79 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Connecting lambda to gui signals'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+try:
+ from PySide6.QtWidgets import QSpinBox, QPushButton
+ hasQtGui = True
+except ImportError:
+ hasQtGui = False
+
+from helper.usesqapplication import UsesQApplication
+
+if hasQtGui:
+ class Control:
+ def __init__(self):
+ self.arg = False
+
+ class QtGuiSigLambda(UsesQApplication):
+
+ def testButton(self):
+ #Connecting a lambda to a QPushButton.clicked()
+ obj = QPushButton('label')
+ ctr = Control()
+ func = lambda: setattr(ctr, 'arg', True)
+ QObject.connect(obj, SIGNAL('clicked()'), func)
+ obj.click()
+ self.assertTrue(ctr.arg)
+ QObject.disconnect(obj, SIGNAL('clicked()'), func)
+
+
+ def testSpinButton(self):
+ #Connecting a lambda to a QPushButton.clicked()
+ obj = QSpinBox()
+ ctr = Control()
+ arg = 444
+ func = lambda x: setattr(ctr, 'arg', 444)
+ QObject.connect(obj, SIGNAL('valueChanged(int)'), func)
+ obj.setValue(444)
+ self.assertEqual(ctr.arg, arg)
+ QObject.disconnect(obj, SIGNAL('valueChanged(int)'), func)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/lambda_test.py b/sources/pyside6/tests/signals/lambda_test.py
new file mode 100644
index 000000000..e22042933
--- /dev/null
+++ b/sources/pyside6/tests/signals/lambda_test.py
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Connecting lambda to signals'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, QProcess
+
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class Dummy(QObject):
+
+ def __init__(self, *args):
+ super(Dummy, self).__init__(*args)
+
+
+class BasicCase(unittest.TestCase):
+
+ def testSimplePythonSignalNoArgs(self):
+ #Connecting a lambda to a simple python signal without arguments
+ obj = Dummy()
+ QObject.connect(obj, SIGNAL('foo()'),
+ lambda: setattr(obj, 'called', True))
+ obj.emit(SIGNAL('foo()'))
+ self.assertTrue(obj.called)
+
+ def testSimplePythonSignal(self):
+ #Connecting a lambda to a simple python signal witharguments
+ obj = Dummy()
+ arg = 42
+ QObject.connect(obj, SIGNAL('foo(int)'),
+ lambda x: setattr(obj, 'arg', 42))
+ obj.emit(SIGNAL('foo(int)'), arg)
+ self.assertEqual(obj.arg, arg)
+
+
+class QtSigLambda(UsesQCoreApplication):
+
+ qapplication = True
+
+ def testNoArgs(self):
+ '''Connecting a lambda to a signal without arguments'''
+ proc = QProcess()
+ dummy = Dummy()
+ QObject.connect(proc, SIGNAL('started()'),
+ lambda: setattr(dummy, 'called', True))
+ proc.start(sys.executable, ['-c', '""'])
+ proc.waitForFinished()
+ self.assertTrue(dummy.called)
+
+ def testWithArgs(self):
+ '''Connecting a lambda to a signal with arguments'''
+ proc = QProcess()
+ dummy = Dummy()
+ QObject.connect(proc, SIGNAL('finished(int)'),
+ lambda x: setattr(dummy, 'called', x))
+ proc.start(sys.executable, ['-c', '""'])
+ proc.waitForFinished()
+ self.assertEqual(dummy.called, proc.exitCode())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/leaking_signal_test.py b/sources/pyside6/tests/signals/leaking_signal_test.py
new file mode 100644
index 000000000..fb0ffd1f3
--- /dev/null
+++ b/sources/pyside6/tests/signals/leaking_signal_test.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+import weakref
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+
+class LeakingSignal(unittest.TestCase):
+
+ def testLeakingSignal(self):
+ # Was segfaulting when the signal was garbage collected.
+ class Emitter(QtCore.QObject):
+ my_signal = QtCore.Signal(object)
+
+ emitter = Emitter()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/multiple_connections_gui_test.py b/sources/pyside6/tests/signals/multiple_connections_gui_test.py
new file mode 100644
index 000000000..827a64248
--- /dev/null
+++ b/sources/pyside6/tests/signals/multiple_connections_gui_test.py
@@ -0,0 +1,95 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from functools import partial
+import os
+import random
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+try:
+ from PySide6.QtWidgets import QPushButton, QSpinBox
+ hasQtGui = True
+except ImportError:
+ hasQtGui = False
+
+from helper.basicpyslotcase import BasicPySlotCase
+from helper.usesqapplication import UsesQApplication
+
+class MultipleSignalConnections(unittest.TestCase):
+ '''Base class for multiple signal connection testing'''
+
+ def run_many(self, sender, signal, emitter, receivers, args=None):
+ """Utility method to connect a list of receivers to a signal.
+ sender - QObject that will emit the signal
+ signal - string with the signal signature
+ emitter - the callable that will trigger the signal
+ receivers - list of BasicPySlotCase instances
+ args - tuple with the arguments to be sent.
+ """
+
+ if args is None:
+ args = tuple()
+
+ for rec in receivers:
+ rec.setUp()
+ QObject.connect(sender, SIGNAL(signal), rec.cb)
+ rec.args = tuple(args)
+
+ emitter(*args)
+
+ for rec in receivers:
+ self.assertTrue(rec.called)
+
+
+if hasQtGui:
+ class QtGuiMultipleSlots(UsesQApplication, MultipleSignalConnections):
+ '''Multiple connections to QtGui signals'''
+
+ def testButtonClick(self):
+ """Multiple connections to QPushButton.clicked()"""
+ sender = QPushButton('button')
+ receivers = [BasicPySlotCase() for x in range(30)]
+ self.run_many(sender, 'clicked()', sender.click, receivers)
+
+ def testSpinBoxValueChanged(self):
+ """Multiple connections to QSpinBox.valueChanged(int)"""
+ sender = QSpinBox()
+ #FIXME if number of receivers if higher than 50, segfaults
+ receivers = [BasicPySlotCase() for x in range(10)]
+ self.run_many(sender, 'valueChanged(int)', sender.setValue,
+ receivers, (1,))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/multiple_connections_test.py b/sources/pyside6/tests/signals/multiple_connections_test.py
new file mode 100644
index 000000000..3cb8c9c5c
--- /dev/null
+++ b/sources/pyside6/tests/signals/multiple_connections_test.py
@@ -0,0 +1,109 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from functools import partial
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, QProcess
+
+from helper.basicpyslotcase import BasicPySlotCase
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class MultipleSignalConnections(unittest.TestCase):
+ '''Base class for multiple signal connection testing'''
+
+ def run_many(self, sender, signal, emitter, receivers, args=None):
+ """Utility method to connect a list of receivers to a signal.
+ sender - QObject that will emit the signal
+ signal - string with the signal signature
+ emitter - the callable that will trigger the signal
+ receivers - list of BasicPySlotCase instances
+ args - tuple with the arguments to be sent.
+ """
+
+ if args is None:
+ args = tuple()
+ for rec in receivers:
+ rec.setUp()
+ self.assertTrue(QObject.connect(sender, SIGNAL(signal), rec.cb))
+ rec.args = tuple(args)
+
+ emitter(*args)
+
+ for rec in receivers:
+ self.assertTrue(rec.called)
+
+
+class PythonMultipleSlots(UsesQCoreApplication, MultipleSignalConnections):
+ '''Multiple connections to python signals'''
+
+ def testPythonSignal(self):
+ """Multiple connections to a python signal (short-circuit)"""
+
+ class Dummy(QObject):
+ pass
+
+ sender = Dummy()
+ receivers = [BasicPySlotCase() for x in range(10)]
+ self.run_many(sender, 'foobar(int)', partial(sender.emit,SIGNAL('foobar(int)')), receivers, (0, ))
+
+
+class QProcessMultipleSlots(UsesQCoreApplication, MultipleSignalConnections):
+ '''Multiple connections to QProcess signals'''
+
+ def testQProcessStarted(self):
+ '''Multiple connections to QProcess.started()'''
+ sender = QProcess()
+ receivers = [BasicPySlotCase() for x in range(10)]
+
+ def start_proc(*args):
+ sender.start(sys.executable, ['-c', '""'])
+ sender.waitForFinished()
+
+ self.run_many(sender, 'started()', start_proc, receivers)
+
+ def testQProcessFinished(self):
+ '''Multiple connections to QProcess.finished(int)'''
+ sender = QProcess()
+ receivers = [BasicPySlotCase() for x in range(10)]
+
+ def start_proc(*args):
+ sender.start(sys.executable, ['-c', '""'])
+ sender.waitForFinished()
+
+ self.run_many(sender, 'finished(int)', start_proc, receivers, (0,))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/pysignal_test.py b/sources/pyside6/tests/signals/pysignal_test.py
new file mode 100644
index 000000000..3f5cd63d6
--- /dev/null
+++ b/sources/pyside6/tests/signals/pysignal_test.py
@@ -0,0 +1,221 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT, Qt
+
+try:
+ from PySide6.QtWidgets import QSpinBox, QApplication, QWidget
+ hasQtGui = True
+except ImportError:
+ hasQtGui = False
+
+from helper.usesqapplication import UsesQApplication
+
+class Dummy(QObject):
+ """Dummy class used in this test."""
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+
+ def callDummy(self):
+ self.emit(SIGNAL("dummy(PyObject)"), "PyObject")
+
+ def callDummy2(self):
+ lst = []
+ lst.append("item1")
+ lst.append("item2")
+ lst.append("item3")
+ self.emit(SIGNAL("dummy2(PyObject, PyObject)"), "PyObject0", lst)
+
+
+class PyObjectType(UsesQApplication):
+ def mySlot(self, arg):
+ self.assertEqual(arg, "PyObject")
+ self.called = True
+ self.callCount += 1
+
+ def mySlot2(self, arg0, arg1):
+ self.assertEqual(arg0, "PyObject0")
+ self.assertEqual(arg1[0], "item1")
+ self.assertEqual(arg1[1], "item2")
+ self.assertEqual(arg1[2], "item3")
+ self.callCount += 1
+ if self.running:
+ self.app.quit()
+
+ def setUp(self):
+ super(PyObjectType, self).setUp()
+ self.callCount = 0
+ self.running = False
+
+ def testWithOneArg(self):
+ o = Dummy()
+ o.connect(SIGNAL("dummy(PyObject)"), self.mySlot)
+ o.callDummy()
+ self.assertEqual(self.callCount, 1)
+
+ def testWithTwoArg(self):
+ o = Dummy()
+ o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2)
+ o.callDummy2()
+ self.assertEqual(self.callCount, 1)
+
+ def testAsyncSignal(self):
+ self.called = False
+ self.running = True
+ o = Dummy()
+ o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2, Qt.QueuedConnection)
+ o.callDummy2()
+ self.app.exec_()
+ self.assertEqual(self.callCount, 1)
+
+ def testTwice(self):
+ self.called = False
+ self.running = True
+ o = Dummy()
+ o.connect(SIGNAL("dummy2(PyObject,PyObject)"), self.mySlot2, Qt.QueuedConnection)
+ o.callDummy2()
+ o.callDummy2()
+ self.app.exec_()
+ self.assertEqual(self.callCount, 2)
+
+class PythonSigSlot(unittest.TestCase):
+ def setUp(self):
+ self.called = False
+
+ def tearDown(self):
+ try:
+ del self.args
+ except:
+ pass
+
+ def callback(self, *args):
+ if tuple(self.args) == args:
+ self.called = True
+
+ def testNoArgs(self):
+ """Python signal and slots without arguments"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo()'), self.callback)
+ self.args = tuple()
+ obj1.emit(SIGNAL('foo()'), *self.args)
+
+ self.assertTrue(self.called)
+
+ def testWithArgs(self):
+ """Python signal and slots with integer arguments"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
+ self.args = (42,)
+ obj1.emit(SIGNAL('foo(int)'), *self.args)
+
+ self.assertTrue(self.called)
+
+
+ def testDisconnect(self):
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
+ QObject.disconnect(obj1, SIGNAL('foo(int)'), self.callback)
+
+ self.args = (42, )
+ obj1.emit(SIGNAL('foo(int)'), *self.args)
+
+ self.assertTrue(not self.called)
+
+
+if hasQtGui:
+ class SpinBoxPySignal(UsesQApplication):
+ """Tests the connection of python signals to QSpinBox qt slots."""
+
+ def setUp(self):
+ super(SpinBoxPySignal, self).setUp()
+ self.obj = Dummy()
+ self.spin = QSpinBox()
+ self.spin.setValue(0)
+
+ def tearDown(self):
+ super(SpinBoxPySignal, self).tearDown()
+ del self.obj
+ del self.spin
+
+ def testValueChanged(self):
+ """Emission of a python signal to QSpinBox setValue(int)"""
+ QObject.connect(self.obj, SIGNAL('dummy(int)'), self.spin, SLOT('setValue(int)'))
+ self.assertEqual(self.spin.value(), 0)
+
+ self.obj.emit(SIGNAL('dummy(int)'), 4)
+ self.assertEqual(self.spin.value(), 4)
+
+ def testValueChangedMultiple(self):
+ """Multiple emissions of a python signal to QSpinBox setValue(int)"""
+ QObject.connect(self.obj, SIGNAL('dummy(int)'), self.spin, SLOT('setValue(int)'))
+ self.assertEqual(self.spin.value(), 0)
+
+ self.obj.emit(SIGNAL('dummy(int)'), 4)
+ self.assertEqual(self.spin.value(), 4)
+
+ self.obj.emit(SIGNAL('dummy(int)'), 77)
+ self.assertEqual(self.spin.value(), 77)
+
+
+if hasQtGui:
+ class WidgetPySignal(UsesQApplication):
+ """Tests the connection of python signals to QWidget qt slots."""
+
+ def setUp(self):
+ super(WidgetPySignal, self).setUp()
+ self.obj = Dummy()
+ self.widget = QWidget()
+
+ def tearDown(self):
+ super(WidgetPySignal, self).tearDown()
+ del self.obj
+ del self.widget
+
+ def testShow(self):
+ """Emission of a python signal to QWidget slot show()"""
+ self.widget.hide()
+
+ QObject.connect(self.obj, SIGNAL('dummy()'), self.widget, SLOT('show()'))
+ self.assertTrue(not self.widget.isVisible())
+
+ self.obj.emit(SIGNAL('dummy()'))
+ self.assertTrue(self.widget.isVisible())
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/qobject_destroyed_test.py b/sources/pyside6/tests/signals/qobject_destroyed_test.py
new file mode 100644
index 000000000..5f5e08e68
--- /dev/null
+++ b/sources/pyside6/tests/signals/qobject_destroyed_test.py
@@ -0,0 +1,56 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+class QObjectDestroyed(unittest.TestCase):
+ """Very simple test case for the destroyed() signal of QObject"""
+
+ def setUp(self):
+ self.called = False
+
+ def destroyed_cb(self):
+ self.called = True
+
+ def testDestroyed(self):
+ """Emission of QObject.destroyed() to a python slot"""
+ obj = QObject()
+ QObject.connect(obj, SIGNAL('destroyed()'), self.destroyed_cb)
+ del obj
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/qobject_receivers_test.py b/sources/pyside6/tests/signals/qobject_receivers_test.py
new file mode 100644
index 000000000..ce73c3229
--- /dev/null
+++ b/sources/pyside6/tests/signals/qobject_receivers_test.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for QObject.receivers()'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+def cute_slot():
+ pass
+
+class TestQObjectReceivers(unittest.TestCase):
+ '''Test case for QObject::receivers'''
+
+ def testBasic(self):
+ sender = QObject()
+ receiver1 = QObject()
+ receiver2 = QObject()
+ self.assertEqual(sender.receivers(SIGNAL("")), 0)
+ sender.connect(sender, SIGNAL("destroyed()"), receiver1, SLOT("deleteLater()"))
+ self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 1)
+ sender.connect(sender, SIGNAL("destroyed()"), receiver2, SLOT("deleteLater()"))
+ self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 2)
+ sender.disconnect(sender, SIGNAL("destroyed()"), receiver2, SLOT("deleteLater()"))
+ self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 1)
+ del receiver2
+ del receiver1
+ del sender
+
+ def testPySlots(self):
+ sender = QObject()
+ receiver = QObject()
+ sender.connect(sender, SIGNAL("destroyed()"), cute_slot)
+ self.assertEqual(sender.receivers(SIGNAL("destroyed( )")), 1)
+ sender.connect(sender, SIGNAL("destroyed()"), receiver, SLOT("deleteLater()"))
+ self.assertEqual(sender.receivers(SIGNAL("destroyed()")), 2)
+ del sender
+ del receiver
+
+ def testPySignals(self):
+ sender = QObject()
+ receiver = QObject()
+ sender.connect(sender, SIGNAL("some_dynamic_signal()"), cute_slot)
+ self.assertEqual(sender.receivers(SIGNAL("some_dynamic_signal( )")), 1)
+ sender.connect(sender, SIGNAL("some_dynamic_signal()"), receiver, SLOT("deleteLater()"))
+ self.assertEqual(sender.receivers(SIGNAL("some_dynamic_signal( )")), 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/qobject_sender_test.py b/sources/pyside6/tests/signals/qobject_sender_test.py
new file mode 100644
index 000000000..3679e45c8
--- /dev/null
+++ b/sources/pyside6/tests/signals/qobject_sender_test.py
@@ -0,0 +1,127 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test cases for QObject.sender()'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class ExtQTimer(QTimer):
+ def __init__(self):
+ QTimer.__init__(self)
+
+class Receiver(QObject):
+ def __init__(self):
+ QObject.__init__(self)
+ self.the_sender = None
+
+ def callback(self):
+ self.the_sender = self.sender()
+ if QCoreApplication.instance():
+ QCoreApplication.instance().exit()
+
+class ObjectSenderTest(unittest.TestCase):
+ '''Test case for QObject.sender() method.'''
+
+ def testSenderPythonSignal(self):
+ sender = QObject()
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('foo()'), recv.callback)
+ sender.emit(SIGNAL('foo()'))
+ self.assertEqual(sender, recv.the_sender)
+
+class ObjectSenderCheckOnReceiverTest(unittest.TestCase):
+ '''Test case for QObject.sender() method, this one tests the equality on the Receiver object.'''
+
+ def testSenderPythonSignal(self):
+ sender = QObject()
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('foo()'), recv.callback)
+ sender.emit(SIGNAL('foo()'))
+ self.assertEqual(sender, recv.the_sender)
+
+class ObjectSenderWithQAppTest(UsesQCoreApplication):
+ '''Test case for QObject.sender() method with QApplication.'''
+
+ def testSenderCppSignal(self):
+ sender = QTimer()
+ sender.setObjectName('foo')
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
+ sender.start(10)
+ self.app.exec_()
+ self.assertEqual(sender, recv.the_sender)
+
+ def testSenderCppSignalSingleShotTimer(self):
+ recv = Receiver()
+ QTimer.singleShot(10, recv.callback)
+ self.app.exec_()
+ self.assertTrue(isinstance(recv.the_sender, QObject))
+
+ def testSenderCppSignalWithPythonExtendedClass(self):
+ sender = ExtQTimer()
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
+ sender.start(10)
+ self.app.exec_()
+ self.assertEqual(sender, recv.the_sender)
+
+class ObjectSenderWithQAppCheckOnReceiverTest(UsesQCoreApplication):
+ '''Test case for QObject.sender() method with QApplication.'''
+
+ def testSenderCppSignal(self):
+ sender = QTimer()
+ sender.setObjectName('foo')
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
+ sender.start(10)
+ self.app.exec_()
+ self.assertEqual(sender, recv.the_sender)
+
+ def testSenderCppSignalWithPythonExtendedClass(self):
+ sender = ExtQTimer()
+ recv = Receiver()
+ QObject.connect(sender, SIGNAL('timeout()'), recv.callback)
+ sender.start(10)
+ self.app.exec_()
+ self.assertEqual(sender, recv.the_sender)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/ref01_test.py b/sources/pyside6/tests/signals/ref01_test.py
new file mode 100644
index 000000000..9ad8bcaa7
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref01_test.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal
+
+class BoundAndUnboundSignalsTest(unittest.TestCase):
+
+ def setUp(self):
+ self.methods = set(('connect', 'disconnect', 'emit'))
+
+ def tearDown(self):
+ del self.methods
+
+ def testUnboundSignal(self):
+ self.assertEqual(type(QObject.destroyed), Signal)
+ self.assertFalse(self.methods.issubset(dir(QObject.destroyed)))
+
+ def testBoundSignal(self):
+ obj = QObject()
+ self.assertNotEqual(type(obj.destroyed), Signal)
+ self.assertTrue(self.methods.issubset(dir(obj.destroyed)))
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/signals/ref02_test.py b/sources/pyside6/tests/signals/ref02_test.py
new file mode 100644
index 000000000..7d6b33f13
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref02_test.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QCoreApplication, QTimeLine
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class NativeSignalsTest(UsesQCoreApplication):
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.called = False
+ self.timeline = QTimeLine(100)
+
+ def tearDown(self):
+ del self.called
+ del self.timeline
+ UsesQCoreApplication.tearDown(self)
+
+ def testSignalWithIntArgument(self):
+
+ def valueChangedSlot(value):
+ self.called = True
+ self.assertEqual(type(value), float)
+ self.app.quit()
+
+ self.timeline.valueChanged.connect(valueChangedSlot)
+ self.timeline.start()
+
+ self.app.exec_()
+ self.assertTrue(self.called)
+
+ def testSignalWithoutArguments(self):
+
+ def finishedSlot():
+ self.called = True
+ self.app.quit()
+
+ self.timeline.finished.connect(finishedSlot)
+ self.timeline.start()
+
+ self.app.exec_()
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/ref03_test.py b/sources/pyside6/tests/signals/ref03_test.py
new file mode 100644
index 000000000..ffd63e498
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref03_test.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject
+
+class DisconnectSignalsTest(unittest.TestCase):
+
+ def setUp(self):
+ self.emitter = QObject()
+
+ def tearDown(self):
+ del self.emitter
+
+ def testConnectionRefCount(self):
+
+ def destroyedSlot():
+ pass
+
+ self.assertEqual(getrefcount(destroyedSlot), 2)
+ self.emitter.destroyed.connect(destroyedSlot)
+ self.assertEqual(getrefcount(destroyedSlot), 3)
+ self.emitter.destroyed.disconnect(destroyedSlot)
+ self.assertEqual(getrefcount(destroyedSlot), 2)
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/ref04_test.py b/sources/pyside6/tests/signals/ref04_test.py
new file mode 100644
index 000000000..afed28f4f
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref04_test.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal
+
+class ExtQObject(QObject):
+
+ mySignal = Signal()
+
+ def __init__(self):
+ QObject.__init__(self)
+
+
+class UserSignalTest(unittest.TestCase):
+
+ def setUp(self):
+ self.emitter = ExtQObject()
+ self.counter = 0
+
+ def tearDown(self):
+ del self.emitter
+ del self.counter
+
+ def testConnectEmitDisconnect(self):
+
+ def slot():
+ self.counter += 1
+
+ self.emitter.mySignal.connect(slot)
+
+ self.assertEqual(self.counter, 0)
+ self.emitter.mySignal.emit()
+ self.assertEqual(self.counter, 1)
+ self.emitter.mySignal.emit()
+ self.assertEqual(self.counter, 2)
+
+ self.emitter.mySignal.disconnect(slot)
+
+ self.emitter.mySignal.emit()
+ self.assertEqual(self.counter, 2)
+
+# def testConnectWithConfigureMethod(self):
+#
+# def slot():
+# self.counter += 1
+#
+# self.emitter.pyqtConfigure(mySignal=slot)
+# self.assertEqual(self.counter, 0)
+# self.emitter.mySignal.emit()
+# self.assertEqual(self.counter, 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/ref05_test.py b/sources/pyside6/tests/signals/ref05_test.py
new file mode 100644
index 000000000..f75d26428
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref05_test.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication, QTimeLine, Slot
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class ExtQObject(QObject):
+
+ def __init__(self):
+ QObject.__init__(self)
+ self.counter = 0
+
+ @Slot('qreal')
+ def foo(self, value):
+ self.counter += 1
+
+
+class UserSlotTest(UsesQCoreApplication):
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.receiver = ExtQObject()
+ self.timeline = QTimeLine(100)
+
+ def tearDown(self):
+ del self.timeline
+ del self.receiver
+ UsesQCoreApplication.tearDown(self)
+
+ def testUserSlot(self):
+ self.timeline.setUpdateInterval(10)
+
+ self.timeline.finished.connect(self.app.quit)
+
+ self.timeline.valueChanged.connect(self.receiver.foo)
+ self.timeline.start()
+
+ self.app.exec_()
+
+ self.assertTrue(self.receiver.counter > 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/ref06_test.py b/sources/pyside6/tests/signals/ref06_test.py
new file mode 100644
index 000000000..df3d1e453
--- /dev/null
+++ b/sources/pyside6/tests/signals/ref06_test.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QCoreApplication, QTimeLine, Signal, Slot
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class ExtQObject(QObject):
+ signalbetween = Signal('qreal')
+
+ def __init__(self):
+ QObject.__init__(self)
+ self.counter = 0
+
+ @Slot('qreal')
+ def foo(self, value):
+ self.counter += 1
+
+
+class SignaltoSignalTest(UsesQCoreApplication):
+
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self.receiver = ExtQObject()
+ self.timeline = QTimeLine(100)
+
+ def tearDown(self):
+ del self.timeline
+ del self.receiver
+ UsesQCoreApplication.tearDown(self)
+
+ def testSignaltoSignal(self):
+ self.timeline.setUpdateInterval(10)
+
+ self.timeline.finished.connect(self.app.quit)
+
+ self.timeline.valueChanged.connect(self.receiver.signalbetween)
+ self.receiver.signalbetween.connect(self.receiver.foo)
+
+ self.timeline.start()
+
+ self.app.exec_()
+
+ self.assertTrue(self.receiver.counter > 1)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/segfault_proxyparent_test.py b/sources/pyside6/tests/signals/segfault_proxyparent_test.py
new file mode 100644
index 000000000..ea2435bea
--- /dev/null
+++ b/sources/pyside6/tests/signals/segfault_proxyparent_test.py
@@ -0,0 +1,92 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+# Description of the problem
+# After creating an PyObject that inherits from QObject, connecting it,
+# deleting it and later creating another Python QObject-based object, this
+# new object will point to the same memory position as the first one.
+
+# Somehow the underlying QObject also points to the same position.
+
+# In PyQt4, the connection works fine with the same memory behavior,
+# so it looks like specific to SIP.
+
+class Dummy(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+
+class Joe(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+
+class SegfaultCase(unittest.TestCase):
+ """Test case for the segfault happening when parent() is called inside
+ ProxyObject"""
+
+ def setUp(self):
+ self.called = False
+
+ def tearDown(self):
+ try:
+ del self.args
+ except:
+ pass
+
+ def callback(self, *args):
+ if tuple(self.args) == args:
+ self.called = True
+
+ def testSegfault(self):
+ """Regression: Segfault for qobjects in the same memory position."""
+ obj = Dummy()
+ QObject.connect(obj, SIGNAL('bar(int)'), self.callback)
+ self.args = (33,)
+ obj.emit(SIGNAL('bar(int)'), self.args[0])
+ self.assertTrue(self.called)
+ del obj
+
+ obj = Joe()
+ QObject.connect(obj, SIGNAL('bar(int)'), self.callback)
+ self.args = (33,)
+ obj.emit(SIGNAL('bar(int)'), self.args[0])
+ self.assertTrue(self.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/self_connect_test.py b/sources/pyside6/tests/signals/self_connect_test.py
new file mode 100644
index 000000000..4feae21bc
--- /dev/null
+++ b/sources/pyside6/tests/signals/self_connect_test.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Using self.connect(signal, method)'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT
+from PySide6.QtWidgets import QPushButton, QWidget
+
+from helper.usesqapplication import UsesQApplication
+
+
+class SelfConnect(UsesQApplication):
+
+ def testButtonClickClose(self):
+ button = QPushButton()
+ button.connect(button, SIGNAL('clicked()'), SLOT('close()'))
+
+ button.show()
+ self.assertTrue(button.isVisible())
+ button.click()
+ self.assertTrue(not button.isVisible())
+
+ def testWindowButtonClickClose(self):
+ button = QPushButton()
+ window = QWidget()
+ window.connect(button, SIGNAL('clicked()'), SLOT('close()'))
+
+ window.show()
+ self.assertTrue(window.isVisible())
+ button.click()
+ self.assertTrue(not window.isVisible())
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/short_circuit_test.py b/sources/pyside6/tests/signals/short_circuit_test.py
new file mode 100644
index 000000000..e3dd5b947
--- /dev/null
+++ b/sources/pyside6/tests/signals/short_circuit_test.py
@@ -0,0 +1,97 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT
+
+class Dummy(QObject):
+ """Dummy class used in this test."""
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+
+class ShortCircuitSignals(unittest.TestCase):
+ def setUp(self):
+ self.called = False
+
+ def tearDown(self):
+ try:
+ del self.args
+ except:
+ pass
+
+ def callback(self, *args):
+ if tuple(self.args) == args:
+ self.called = True
+
+ def testNoArgs(self):
+ """Short circuit signal without arguments"""
+ obj1 = Dummy()
+ QObject.connect(obj1, SIGNAL('foo()'), self.callback)
+ self.args = tuple()
+ obj1.emit(SIGNAL('foo()'), *self.args)
+ self.assertTrue(self.called)
+
+ def testWithArgs(self):
+ """Short circuit signal with integer arguments"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo(int)'), self.callback)
+ self.args = (42,)
+ obj1.emit(SIGNAL('foo(int)'), *self.args)
+
+ self.assertTrue(self.called)
+
+ def testMultipleArgs(self):
+ """Short circuit signal with multiple arguments"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo(int,int,QString)'), self.callback)
+ self.args = (42,33,'char')
+ obj1.emit(SIGNAL('foo(int,int,QString)'), *self.args)
+
+ self.assertTrue(self.called)
+
+ def testComplexArgs(self):
+ """Short circuit signal with complex arguments"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo(int,QObject*)'), self.callback)
+ self.args = (42, obj1)
+ obj1.emit(SIGNAL('foo(int,QObject*)'), *self.args)
+
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal2signal_connect_test.py b/sources/pyside6/tests/signals/signal2signal_connect_test.py
new file mode 100644
index 000000000..43d0ef237
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal2signal_connect_test.py
@@ -0,0 +1,142 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Test case for signal to signal connections.'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+def cute_slot():
+ pass
+
+class TestSignal2SignalConnect(unittest.TestCase):
+ '''Test case for signal to signal connections'''
+
+ def setUp(self):
+ #Set up the basic resources needed
+ self.sender = QObject()
+ self.forwarder = QObject()
+ self.args = None
+ self.called = False
+
+ def tearDown(self):
+ #Delete used resources
+ try:
+ del self.sender
+ except:
+ pass
+ try:
+ del self.forwarder
+ except:
+ pass
+ del self.args
+
+ def callback_noargs(self):
+ #Default callback without arguments
+ self.called = True
+
+ def callback_args(self, *args):
+ #Default callback with arguments
+ if args == self.args:
+ self.called = True
+ else:
+ raise TypeError("Invalid arguments")
+
+ def callback_qobject(self, *args):
+ #Default callback for QObject as argument
+ if args[0].objectName() == self.args[0]:
+ self.called = True
+ else:
+ raise TypeError("Invalid arguments")
+
+
+ def testSignalWithoutArguments(self):
+ QObject.connect(self.sender, SIGNAL("destroyed()"),
+ self.forwarder, SIGNAL("forward()"))
+ QObject.connect(self.forwarder, SIGNAL("forward()"),
+ self.callback_noargs)
+ del self.sender
+ self.assertTrue(self.called)
+
+
+ def testSignalWithOnePrimitiveTypeArgument(self):
+ QObject.connect(self.sender, SIGNAL("mysignal(int)"),
+ self.forwarder, SIGNAL("mysignal(int)"))
+ QObject.connect(self.forwarder, SIGNAL("mysignal(int)"),
+ self.callback_args)
+ self.args = (19,)
+ self.sender.emit(SIGNAL('mysignal(int)'), *self.args)
+ self.assertTrue(self.called)
+
+
+ def testSignalWithMultiplePrimitiveTypeArguments(self):
+ QObject.connect(self.sender, SIGNAL("mysignal(int,int)"),
+ self.forwarder, SIGNAL("mysignal(int,int)"))
+ QObject.connect(self.forwarder, SIGNAL("mysignal(int,int)"),
+ self.callback_args)
+ self.args = (23, 29)
+ self.sender.emit(SIGNAL('mysignal(int,int)'), *self.args)
+ self.assertTrue(self.called)
+
+
+ def testSignalWithOneStringArgument(self):
+ QObject.connect(self.sender, SIGNAL("mysignal(QString)"),
+ self.forwarder, SIGNAL("mysignal(QString)"))
+ QObject.connect(self.forwarder, SIGNAL("mysignal(QString)"),
+ self.callback_args)
+ self.args = ('myargument',)
+ self.sender.emit(SIGNAL('mysignal(QString)'), *self.args)
+ self.assertTrue(self.called)
+
+
+ def testSignalWithOneQObjectArgument(self):
+ QObject.connect(self.sender, SIGNAL('destroyed(QObject*)'),
+ self.forwarder, SIGNAL('forward(QObject*)'))
+ QObject.connect(self.forwarder, SIGNAL('forward(QObject*)'),
+ self.callback_qobject)
+
+ obj_name = 'sender'
+ self.sender.setObjectName(obj_name)
+ self.args = (obj_name, )
+ del self.sender
+ self.assertTrue(self.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/signals/signal_across_threads.py b/sources/pyside6/tests/signals/signal_across_threads.py
new file mode 100644
index 000000000..399093e96
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_across_threads.py
@@ -0,0 +1,106 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for PYSIDE-1354: Ensure that slots are invoked from the receiver's
+thread context when using derived classes (and thus, a global receiver).'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, QThread, QTimer, Slot
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class ReceiverBase(QObject):
+ def __init__(self, parent=None):
+ super(ReceiverBase, self).__init__(parent)
+ self.senderThread = None
+
+ @Slot()
+ def slot_function(self):
+ self.senderThread = QThread.currentThread()
+
+
+class Receiver(ReceiverBase):
+ pass
+
+
+class TestThread(QThread):
+ def __init__(self, parent=None):
+ super(TestThread, self).__init__(parent)
+
+ def run(self):
+ pass
+
+
+class SignalAcrossThreads(UsesQCoreApplication):
+ def setUp(self):
+ UsesQCoreApplication.setUp(self)
+ self._timer_tick = 0
+ self._timer = QTimer()
+ self._timer.setInterval(20)
+ self._timer.timeout.connect(self._control_test)
+ self._worker_thread = TestThread()
+
+ def tearDown(self):
+ UsesQCoreApplication.tearDown(self)
+
+ @Slot()
+ def _control_test(self):
+ if self._timer_tick == 0:
+ self._worker_thread.start()
+ elif self._timer_tick == 1:
+ self._worker_thread.wait()
+ else:
+ self._timer.stop()
+ self.app.quit()
+ self._timer_tick += 1
+
+ def test(self):
+ worker_thread_receiver = Receiver()
+ worker_thread_receiver.moveToThread(self._worker_thread)
+ self._worker_thread.started.connect(worker_thread_receiver.slot_function)
+
+ main_thread = QThread.currentThread()
+ main_thread_receiver = Receiver()
+ self._worker_thread.started.connect(main_thread_receiver.slot_function)
+
+ self._timer.start()
+ self.app.exec_()
+
+ self.assertEqual(worker_thread_receiver.senderThread, self._worker_thread)
+ self.assertEqual(main_thread_receiver.senderThread, main_thread)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_autoconnect_test.py b/sources/pyside6/tests/signals/signal_autoconnect_test.py
new file mode 100644
index 000000000..4f8a5cb76
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_autoconnect_test.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from PySide6.QtWidgets import *
+
+class MyObject(QWidget):
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+ self._method_called = False
+
+ @Slot()
+ def on_button_clicked(self):
+ self._method_called = True
+
+
+class AutoConnectionTest(unittest.TestCase):
+
+ def testConnection(self):
+ app = QApplication([])
+
+ win = MyObject()
+ btn = QPushButton("click", win)
+ btn.setObjectName("button")
+ QMetaObject.connectSlotsByName(win)
+ btn.click()
+ self.assertTrue(win._method_called)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_connectiontype_support_test.py b/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
new file mode 100644
index 000000000..a66ff3915
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_connectiontype_support_test.py
@@ -0,0 +1,61 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, Qt
+
+class Dummy(QObject):
+ """Dummy class used in this test."""
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+
+class TestConnectionTypeSupport(unittest.TestCase):
+ def callback(self, *args):
+ if tuple(self.args) == args:
+ self.called = True
+
+ def testNoArgs(self):
+ """Connect signal using a Qt.ConnectionType as argument"""
+ obj1 = Dummy()
+
+ QObject.connect(obj1, SIGNAL('foo()'), self.callback, Qt.DirectConnection)
+ self.args = tuple()
+ obj1.emit(SIGNAL('foo()'), *self.args)
+
+ self.assertTrue(self.called)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_emission_gui_test.py b/sources/pyside6/tests/signals/signal_emission_gui_test.py
new file mode 100644
index 000000000..93e30d5d8
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_emission_gui_test.py
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""Tests covering signal emission and receiving to python slots"""
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT
+
+try:
+ from PySide6.QtWidgets import QSpinBox, QPushButton
+ hasQtGui = True
+except ImportError:
+ hasQtGui = False
+
+from helper.basicpyslotcase import BasicPySlotCase
+from helper.usesqapplication import UsesQApplication
+
+if hasQtGui:
+ class ButtonPySlot(UsesQApplication, BasicPySlotCase):
+ """Tests the connection of python slots to QPushButton signals"""
+
+ def testButtonClicked(self):
+ """Connection of a python slot to QPushButton.clicked()"""
+ button = QPushButton('Mylabel')
+ QObject.connect(button, SIGNAL('clicked()'), self.cb)
+ self.args = tuple()
+ button.emit(SIGNAL('clicked(bool)'), False)
+ self.assertTrue(self.called)
+
+ def testButtonClick(self):
+ """Indirect qt signal emission using the QPushButton.click() method """
+ button = QPushButton('label')
+ QObject.connect(button, SIGNAL('clicked()'), self.cb)
+ self.args = tuple()
+ button.click()
+ self.assertTrue(self.called)
+
+
+if hasQtGui:
+ class SpinBoxPySlot(UsesQApplication, BasicPySlotCase):
+ """Tests the connection of python slots to QSpinBox signals"""
+
+ def setUp(self):
+ super(SpinBoxPySlot, self).setUp()
+ self.spin = QSpinBox()
+
+ def tearDown(self):
+ del self.spin
+ super(SpinBoxPySlot, self).tearDown()
+
+ def testSpinBoxValueChanged(self):
+ """Connection of a python slot to QSpinBox.valueChanged(int)"""
+ QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
+ self.args = [3]
+ self.spin.emit(SIGNAL('valueChanged(int)'), *self.args)
+ self.assertTrue(self.called)
+
+ def testSpinBoxValueChangedImplicit(self):
+ """Indirect qt signal emission using QSpinBox.setValue(int)"""
+ QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
+ self.args = [42]
+ self.spin.setValue(self.args[0])
+ self.assertTrue(self.called)
+
+ def atestSpinBoxValueChangedFewArgs(self):
+ """Emission of signals with fewer arguments than needed"""
+ # XXX: PyQt4 crashes on the assertRaises
+ QObject.connect(self.spin, SIGNAL('valueChanged(int)'), self.cb)
+ self.args = (554,)
+ self.assertRaises(TypeError, self.spin.emit, SIGNAL('valueChanged(int)'))
+
+if hasQtGui:
+ class QSpinBoxQtSlots(UsesQApplication):
+ """Tests the connection to QSpinBox qt slots"""
+
+ qapplication = True
+
+ def testSetValueIndirect(self):
+ """Indirect signal emission: QSpinBox using valueChanged(int)/setValue(int)"""
+ spinSend = QSpinBox()
+ spinRec = QSpinBox()
+
+ spinRec.setValue(5)
+
+ QObject.connect(spinSend, SIGNAL('valueChanged(int)'), spinRec, SLOT('setValue(int)'))
+ self.assertEqual(spinRec.value(), 5)
+ spinSend.setValue(3)
+ self.assertEqual(spinRec.value(), 3)
+ self.assertEqual(spinSend.value(), 3)
+
+ def testSetValue(self):
+ """Direct signal emission: QSpinBox using valueChanged(int)/setValue(int)"""
+ spinSend = QSpinBox()
+ spinRec = QSpinBox()
+
+ spinRec.setValue(5)
+ spinSend.setValue(42)
+
+ QObject.connect(spinSend, SIGNAL('valueChanged(int)'), spinRec, SLOT('setValue(int)'))
+ self.assertEqual(spinRec.value(), 5)
+ self.assertEqual(spinSend.value(), 42)
+ spinSend.emit(SIGNAL('valueChanged(int)'), 3)
+
+ self.assertEqual(spinRec.value(), 3)
+ #Direct emission shouldn't change the value of the emitter
+ self.assertEqual(spinSend.value(), 42)
+
+ spinSend.emit(SIGNAL('valueChanged(int)'), 66)
+ self.assertEqual(spinRec.value(), 66)
+ self.assertEqual(spinSend.value(), 42)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_emission_test.py b/sources/pyside6/tests/signals/signal_emission_test.py
new file mode 100644
index 000000000..c580be200
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_emission_test.py
@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""Tests covering signal emission and receiving to python slots"""
+
+import functools
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT, QProcess, QTimeLine
+
+from helper.basicpyslotcase import BasicPySlotCase
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+
+class ArgsOnEmptySignal(UsesQCoreApplication):
+ '''Trying to emit a signal without arguments passing some arguments'''
+
+ def testArgsToNoArgsSignal(self):
+ '''Passing arguments to a signal without arguments'''
+ process = QProcess()
+ self.assertRaises(TypeError, process.emit, SIGNAL('started()'), 42)
+
+
+class MoreArgsOnEmit(UsesQCoreApplication):
+ '''Trying to pass more args than needed to emit (signals with args)'''
+
+ def testMoreArgs(self):
+ '''Passing more arguments than needed'''
+ process = QProcess()
+ self.assertRaises(TypeError, process.emit, SIGNAL('finished(int)'), 55, 55)
+
+class Dummy(QObject):
+ '''Dummy class'''
+ pass
+
+class PythonSignalToCppSlots(UsesQCoreApplication):
+ '''Connect python signals to C++ slots'''
+
+ def testWithoutArgs(self):
+ '''Connect python signal to QTimeLine.toggleDirection()'''
+ timeline = QTimeLine()
+ dummy = Dummy()
+ QObject.connect(dummy, SIGNAL('dummy()'),
+ timeline, SLOT('toggleDirection()'))
+
+ orig_dir = timeline.direction()
+ dummy.emit(SIGNAL('dummy()'))
+ new_dir = timeline.direction()
+
+ if orig_dir == QTimeLine.Forward:
+ self.assertEqual(new_dir, QTimeLine.Backward)
+ else:
+ self.assertEqual(new_dir, QTimeLine.Forward)
+
+ def testWithArgs(self):
+ '''Connect python signals to QTimeLine.setCurrentTime(int)'''
+ timeline = QTimeLine()
+ dummy = Dummy()
+
+ QObject.connect(dummy, SIGNAL('dummy(int)'),
+ timeline, SLOT('setCurrentTime(int)'))
+
+ current = timeline.currentTime()
+ dummy.emit(SIGNAL('dummy(int)'), current+42)
+ self.assertEqual(timeline.currentTime(), current+42)
+
+class CppSignalsToCppSlots(UsesQCoreApplication):
+ '''Connection between C++ slots and signals'''
+
+ def testWithoutArgs(self):
+ '''Connect QProcess.started() to QTimeLine.togglePaused()'''
+ process = QProcess()
+ timeline = QTimeLine()
+
+ QObject.connect(process, SIGNAL('finished(int, QProcess::ExitStatus)'),
+ timeline, SLOT('toggleDirection()'))
+
+ orig_dir = timeline.direction()
+
+ process.start(sys.executable, ['-c', '"print 42"'])
+ process.waitForFinished()
+
+ new_dir = timeline.direction()
+
+ if orig_dir == QTimeLine.Forward:
+ self.assertEqual(new_dir, QTimeLine.Backward)
+ else:
+ self.assertEqual(new_dir, QTimeLine.Forward)
+
+called = False
+def someSlot(args=None):
+ global called
+ called = True
+
+class DynamicSignalsToFuncPartial(UsesQCoreApplication):
+
+ def testIt(self):
+ global called
+ called = False
+ o = QObject()
+ o.connect(o, SIGNAL("ASignal()"), functools.partial(someSlot, "partial .."))
+ o.emit(SIGNAL("ASignal()"))
+ self.assertTrue(called)
+
+class EmitUnknownType(UsesQCoreApplication):
+ def testIt(self):
+ a = QObject()
+ a.connect(SIGNAL('foobar(Dummy)'), lambda x: 42) # Just connect with an unknown type
+ self.assertRaises(TypeError, a.emit, SIGNAL('foobar(Dummy)'), 22)
+
+class EmitEnum(UsesQCoreApplication):
+ """Test emission of enum arguments"""
+
+ def slot(self, arg):
+ self.arg = arg
+
+ def testIt(self):
+ self.arg = None
+ p = QProcess()
+ p.stateChanged.connect(self.slot)
+ p.stateChanged.emit(QProcess.NotRunning)
+ self.assertEqual(self.arg, QProcess.NotRunning)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_enum_test.py b/sources/pyside6/tests/signals/signal_enum_test.py
new file mode 100644
index 000000000..d5b5fa179
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_enum_test.py
@@ -0,0 +1,80 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from enum import Enum
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, Signal, Slot
+
+
+class Colors(Enum):
+ red = 1
+ green = 2
+ blue = 3
+
+class Obj(QObject):
+ enum_signal = Signal(Colors)
+ object_signal = Signal(object)
+
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self.enum_signal.connect(self.get_result)
+ self.object_signal.connect(self.get_result)
+ self.value = -1
+
+ @Slot()
+ def get_result(self, i):
+ self.value = i
+
+
+class SignalEnumTests(unittest.TestCase):
+ '''Test Signal with enum.Enum'''
+
+ def testSignal(self):
+ o = Obj()
+ # Default value
+ self.assertEqual(o.value, -1)
+
+ # Enum Signal
+ o.enum_signal.emit(Colors.green)
+ self.assertEqual(o.value, Colors.green)
+
+ # object Signal
+ o.object_signal.emit(Colors.red)
+ self.assertEqual(o.value, Colors.red)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_func_test.py b/sources/pyside6/tests/signals/signal_func_test.py
new file mode 100644
index 000000000..41a360711
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_func_test.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import SIGNAL, SLOT
+
+class SIGNALSLOTTests(unittest.TestCase):
+ '''Test the output of SIGNAL and SLOT.'''
+
+ def testSIGNAL(self):
+ #SIGNAL function
+ a = "foobar"
+ self.assertEqual(str(SIGNAL(a)), "2foobar")
+
+ def testSLOT(self):
+ #SLOT function
+ a = "foobar"
+ self.assertEqual(str(SLOT(a)), "1foobar")
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_manager_refcount_test.py b/sources/pyside6/tests/signals/signal_manager_refcount_test.py
new file mode 100644
index 000000000..b33cdfe76
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_manager_refcount_test.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL
+
+class SignalManagerRefCount(unittest.TestCase):
+ """Simple test case to check if the signal_manager is erroneously incrementing the object refcounter"""
+
+ def testObjectRefcount(self):
+ """Emission of QObject.destroyed() to a python slot"""
+ def callback():
+ pass
+ obj = QObject()
+ refcount = getrefcount(obj)
+ QObject.connect(obj, SIGNAL('destroyed()'), callback)
+ self.assertEqual(refcount, getrefcount(obj))
+ QObject.disconnect(obj, SIGNAL('destroyed()'), callback)
+ self.assertEqual(refcount, getrefcount(obj))
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/signal_number_limit_test.py b/sources/pyside6/tests/signals/signal_number_limit_test.py
new file mode 100644
index 000000000..7c42e01d5
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_number_limit_test.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6 import QtCore
+
+class Emitter(QtCore.QObject):
+ s1 = QtCore.Signal()
+ s2 = QtCore.Signal()
+ s3 = QtCore.Signal()
+ s4 = QtCore.Signal()
+ s5 = QtCore.Signal()
+ s6 = QtCore.Signal()
+ s7 = QtCore.Signal()
+ s8 = QtCore.Signal()
+ s9 = QtCore.Signal()
+ s10 = QtCore.Signal()
+ s11 = QtCore.Signal()
+ s12 = QtCore.Signal()
+ s13 = QtCore.Signal()
+ s14 = QtCore.Signal()
+
+class SignalNumberLimitTest(unittest.TestCase):
+ def myCb(self):
+ self._count += 1
+
+ def testBug(self):
+ e = Emitter()
+ e.s1.connect(self.myCb)
+ e.s2.connect(self.myCb)
+ e.s3.connect(self.myCb)
+ e.s4.connect(self.myCb)
+ e.s5.connect(self.myCb)
+ e.s6.connect(self.myCb)
+ e.s7.connect(self.myCb)
+ e.s8.connect(self.myCb)
+ e.s9.connect(self.myCb)
+ e.s10.connect(self.myCb)
+ e.s11.connect(self.myCb)
+ e.s12.connect(self.myCb)
+ e.s13.connect(self.myCb)
+ e.s14.connect(self.myCb)
+
+ self._count = 0
+ e.s1.emit()
+ e.s2.emit()
+ e.s3.emit()
+ e.s4.emit()
+ e.s5.emit()
+ e.s6.emit()
+ e.s7.emit()
+ e.s8.emit()
+ e.s9.emit()
+ e.s10.emit()
+ e.s11.emit()
+ e.s12.emit()
+ e.s13.emit()
+ e.s14.emit()
+ self.assertEqual(self._count, 14)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_object_test.py b/sources/pyside6/tests/signals/signal_object_test.py
new file mode 100644
index 000000000..d32bd4360
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_object_test.py
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QTimer, Signal, QObject, Slot, Qt
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class MyObject(QTimer):
+ sig1 = Signal()
+ sig2 = Signal(int, name='rangeChanged')
+ sig3 = Signal(int)
+ sig4 = Signal((int,), (str,))
+ sig5 = Signal((str,), (int,))
+ sig6 = Signal(QObject)
+
+ @Slot(int)
+ def myRange(self, r):
+ self._range = r
+
+ def slot1(self):
+ self._called = True
+
+ def slotString(self, s):
+ self._s = s
+
+ def slotObject(self, o):
+ self._o = o
+
+
+class SignalObjectTest(UsesQCoreApplication):
+ def cb(self):
+ self._cb_called = True
+ self.app.exit()
+
+ def testsingleConnect(self):
+ o = MyObject()
+ o.sig1.connect(o.slot1)
+ o.sig1.emit()
+ self.assertTrue(o._called)
+
+ def testSignalWithArgs(self):
+ o = MyObject()
+ o.sig3.connect(o.myRange)
+ o.sig3.emit(10)
+ self.assertEqual(o._range, 10)
+
+ def testSignatureParse(self):
+ o = MyObject()
+ o.sig2.connect(o.myRange)
+ o.sig2.emit(10)
+
+ def testDictOperator(self):
+ o = MyObject()
+ o.sig4[str].connect(o.slotString)
+ o.sig4[str].emit("PySide")
+ self.assertEqual(o._s, "PySide")
+
+ def testGeneretedSignal(self):
+ o = MyObject()
+ o.timeout.connect(self.cb)
+ o.start(100)
+ self.app.exec_()
+ self.assertTrue(self._cb_called)
+
+ def testConnectionType(self):
+ o = MyObject()
+ o.timeout.connect(self.cb, type=Qt.DirectConnection)
+ o.start(100)
+ self.app.exec_()
+ self.assertTrue(self._cb_called)
+
+ def testSignalWithSignal(self):
+ o = MyObject()
+ o.sig2.connect(o.myRange)
+ o.sig5.connect(o.sig2)
+ o.sig5[int].emit(10)
+ self.assertEqual(o._range, 10)
+
+ def testSignalWithObject(self):
+ o = MyObject()
+ o.sig6.connect(o.slotObject)
+ arg = QObject()
+ o.sig6.emit(arg)
+ self.assertEqual(arg, o._o)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/signal_signature_test.py b/sources/pyside6/tests/signals/signal_signature_test.py
new file mode 100644
index 000000000..d5f44f5b8
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_signature_test.py
@@ -0,0 +1,121 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Test case for signal signature received by QObject::connectNotify().'''
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+called = False
+name = "Old"
+class Obj(QObject):
+ dummySignalArgs = Signal(str)
+ numberSignal = Signal(int)
+ def __init__(self):
+ QObject.__init__(self)
+ self.signal = ''
+
+ def connectNotify(self, signal):
+ self.signal = signal
+
+ @staticmethod
+ def static_method():
+ global called
+ called = True
+
+ @staticmethod
+ def static_method_args(arg="default"):
+ global name
+ name = arg
+
+def callback(arg=None):
+ pass
+def callback_empty():
+ pass
+
+class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
+ '''Test case for signal signature received by QObject::connectNotify().'''
+
+ def testOldStyle(self):
+ sender = Obj()
+ receiver = QObject()
+ sender.connect(SIGNAL('destroyed()'), receiver, SLOT('deleteLater()'))
+ # When connecting to a regular slot, and not a python callback function, QObject::connect
+ # will use the non-cloned method signature, so connectinc to destroyed() will actually
+ # connect to destroyed(QObject*).
+ self.assertEqual(sender.signal.methodSignature(), 'destroyed(QObject*)')
+
+ def testOldStyleWithPythonCallback(self):
+ sender = Obj()
+ sender.connect(SIGNAL('destroyed()'), callback)
+ self.assertEqual(sender.signal.methodSignature(), 'destroyed()')
+
+ def testNewStyle(self):
+ sender = Obj()
+
+ sender.destroyed.connect(callback_empty)
+ self.assertEqual(sender.signal.methodSignature(), 'destroyed()')
+
+ sender.destroyed[QObject].connect(callback)
+ self.assertEqual(sender.signal.methodSignature(), 'destroyed(QObject*)')
+
+ def testStaticSlot(self):
+ global called
+ sender = Obj()
+ sender.connect(sender, SIGNAL("dummySignal()"), Obj.static_method)
+ sender.emit(SIGNAL("dummySignal()"))
+ self.assertTrue(called)
+
+
+ def testStaticSlotArgs(self):
+ global name
+ sender = Obj()
+ sender.dummySignalArgs.connect(Obj.static_method_args)
+ sender.dummySignalArgs[str].emit("New")
+ self.assertEqual(name, "New")
+
+ def testLambdaSlot(self):
+ sender = Obj()
+ sender.numberSignal[int].connect(lambda x: 42)
+ with self.assertRaises(IndexError):
+ sender.numberSignal[str].emit("test")
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/sources/pyside6/tests/signals/signal_with_primitive_type_test.py b/sources/pyside6/tests/signals/signal_with_primitive_type_test.py
new file mode 100644
index 000000000..e3c6c7f39
--- /dev/null
+++ b/sources/pyside6/tests/signals/signal_with_primitive_type_test.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import *
+
+
+class SignalPrimitiveTypeTest(unittest.TestCase):
+
+ def signalValueChanged(self, v):
+ self.called = True
+ self._app.quit()
+
+ def createTimeLine(self):
+ self.called = False
+ tl = QTimeLine(10000)
+ QObject.connect(tl, SIGNAL("valueChanged(qreal)"), self.signalValueChanged)
+ return tl
+
+ def testTimeLine(self):
+ self._valueChangedCount = 0
+ self._app = QCoreApplication([])
+ tl = self.createTimeLine()
+ tl.start()
+ self._app.exec_()
+ self.assertTrue(self.called)
+
+if __name__ == '__main__':
+ unittest.main()
+
+
diff --git a/sources/pyside6/tests/signals/slot_reference_count_test.py b/sources/pyside6/tests/signals/slot_reference_count_test.py
new file mode 100644
index 000000000..d319624e0
--- /dev/null
+++ b/sources/pyside6/tests/signals/slot_reference_count_test.py
@@ -0,0 +1,87 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+''' Forced disconnection: Delete one end of the signal connection'''
+
+import os
+import sys
+from sys import getrefcount
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, SLOT
+
+class Dummy(QObject):
+ def dispatch(self):
+ self.emit(SIGNAL('foo()'))
+
+class PythonSignalRefCount(unittest.TestCase):
+
+ def setUp(self):
+ self.emitter = Dummy()
+
+ def tearDown(self):
+ self.emitter
+
+ def testRefCount(self):
+ def cb(*args):
+ pass
+
+ self.assertEqual(getrefcount(cb), 2)
+
+ QObject.connect(self.emitter, SIGNAL('foo()'), cb)
+ self.assertEqual(getrefcount(cb), 3)
+
+ QObject.disconnect(self.emitter, SIGNAL('foo()'), cb)
+ self.assertEqual(getrefcount(cb), 2)
+
+class CppSignalRefCount(unittest.TestCase):
+
+ def setUp(self):
+ self.emitter = QObject()
+
+ def tearDown(self):
+ self.emitter
+
+ def testRefCount(self):
+ def cb(*args):
+ pass
+
+ self.assertEqual(getrefcount(cb), 2)
+
+ QObject.connect(self.emitter, SIGNAL('destroyed()'), cb)
+ self.assertEqual(getrefcount(cb), 3)
+
+ QObject.disconnect(self.emitter, SIGNAL('destroyed()'), cb)
+ self.assertEqual(getrefcount(cb), 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/signals/static_metaobject_test.py b/sources/pyside6/tests/signals/static_metaobject_test.py
new file mode 100644
index 000000000..a93475336
--- /dev/null
+++ b/sources/pyside6/tests/signals/static_metaobject_test.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""Tests covering signal emission and receiving to python slots"""
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+from PySide6.QtCore import QObject, SIGNAL, Slot
+from helper.usesqcoreapplication import UsesQCoreApplication
+
+class MyObject(QObject):
+ def __init__(self, parent=None):
+ QObject.__init__(self, parent)
+ self._slotCalledCount = 0
+
+ # this '@Slot()' is needed to get the right sort order in testSharedSignalEmission.
+ # For some reason, it also makes the tests actually work!
+ @Slot()
+ def mySlot(self):
+ self._slotCalledCount = self._slotCalledCount + 1
+
+
+class StaticMetaObjectTest(UsesQCoreApplication):
+
+ def testSignalPropagation(self):
+ o = MyObject()
+ o2 = MyObject()
+
+ # SIGNAL foo not created yet
+ self.assertEqual(o.metaObject().indexOfSignal("foo()"), -1)
+
+ o.connect(SIGNAL("foo()"), o2.mySlot)
+ # SIGNAL foo create after connect
+ self.assertTrue(o.metaObject().indexOfSignal("foo()") > 0)
+
+ # SIGNAL does not propagate to others objects of the same type
+ self.assertEqual(o2.metaObject().indexOfSignal("foo()"), -1)
+
+ del o
+ del o2
+ o = MyObject()
+ # The SIGNAL was destroyed with old objects
+ self.assertEqual(o.metaObject().indexOfSignal("foo()"), -1)
+
+
+ def testSharedSignalEmission(self):
+ o = QObject()
+ m = MyObject()
+
+ o.connect(SIGNAL("foo2()"), m.mySlot)
+ m.connect(SIGNAL("foo2()"), m.mySlot)
+ o.emit(SIGNAL("foo2()"))
+ self.assertEqual(m._slotCalledCount, 1)
+ del o
+ m.emit(SIGNAL("foo2()"))
+ self.assertEqual(m._slotCalledCount, 2)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/support/CMakeLists.txt b/sources/pyside6/tests/support/CMakeLists.txt
index 1f18ecf23..1f18ecf23 100644
--- a/sources/pyside2/tests/support/CMakeLists.txt
+++ b/sources/pyside6/tests/support/CMakeLists.txt
diff --git a/sources/pyside6/tests/support/voidptr_test.py b/sources/pyside6/tests/support/voidptr_test.py
new file mode 100644
index 000000000..d56f29b68
--- /dev/null
+++ b/sources/pyside6/tests/support/voidptr_test.py
@@ -0,0 +1,71 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import sys
+import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import shiboken6 as shiboken
+from PySide6.support import VoidPtr
+from PySide6.QtCore import QByteArray
+
+class PySide6Support(unittest.TestCase):
+
+ def testVoidPtr(self):
+ # Creating a VoidPtr object requires an address of
+ # a C++ object, a wrapped Shiboken Object type,
+ # an object implementing the Python Buffer interface,
+ # or another VoidPtr object.
+
+ # Original content
+ b = b"Hello world"
+ ba = QByteArray(b)
+ vp = VoidPtr(ba, ba.size())
+ self.assertIsInstance(vp, shiboken.VoidPtr)
+
+ # Create QByteArray from voidptr byte interpretation
+ nba = QByteArray(vp.toBytes())
+ # Compare original bytes to toBytes()
+ self.assertTrue(b, vp.toBytes())
+ # Compare original with new QByteArray data
+ self.assertTrue(b, nba.data())
+ # Convert original and new to str
+ self.assertTrue(str(b), str(nba))
+
+ # Modify nba through a memoryview of vp
+ mv = memoryview(vp)
+ self.assertFalse(mv.readonly)
+ mv[6:11] = b'void*'
+ self.assertEqual(str(ba), str(b"Hello void*"))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside6/tests/tools/list-class-hierarchy.py b/sources/pyside6/tests/tools/list-class-hierarchy.py
new file mode 100644
index 000000000..e574c3355
--- /dev/null
+++ b/sources/pyside6/tests/tools/list-class-hierarchy.py
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+
+# This is a small script printing out Qt binding class hierarchies
+# for comparison purposes.
+#
+# Usage:
+#
+# ./list-class-hierarchy.py PySide6 > pyside6.list
+# ./list-class-hierarchy.py PyQt5 > pyqt5.list
+#
+# meld pyside.list pyqt5.list
+
+from __future__ import print_function
+
+import sys
+import pdb
+from inspect import isclass
+
+ignore = ["staticMetaObject",
+ "pyqtConfigure",
+ "registerUserData",
+ "thread",
+ ]
+
+def recurse_into(el,obj):
+ #s = el.split('.')[-1]
+ #pdb.set_trace()
+ symbols = []
+ for item in sorted(dir(obj)):
+ if item[0]=='_':
+ continue
+ mel = el + '.' + item
+ try:
+ mobj = eval(mel)
+ except Exception:
+ continue
+
+ if item in ignore:
+ continue
+ else:
+ symbols.append(mel)
+
+ if isclass(mobj):
+ symbols += recurse_into(mel,mobj)
+
+ return symbols
+
+if __name__=='__main__':
+ modules = [ 'QtCore',
+ 'QtGui',
+ 'QtHelp',
+ #'QtMultimedia',
+ 'QtNetwork',
+ #'QtOpenGL',
+ 'QtScript',
+ 'QtScriptTools',
+ 'QtSql',
+ 'QtSvg',
+ 'QtTest',
+ #'QtUiTools',
+ 'QtXml',
+ 'QtXmlPatterns' ]
+
+ libraries = ["PySide6", "PyQt5"]
+ librarySymbols = {}
+ for l in libraries:
+ dictionary = []
+ if l =="PyQt5":
+ import sip
+ sip.setapi('QDate',2)
+ sip.setapi('QDateTime',2)
+ sip.setapi('QString',2)
+ sip.setapi('QTextStream',2)
+ sip.setapi('QTime',2)
+ sip.setapi('QUrl',2)
+ sip.setapi('QVariant',2)
+
+ for m in modules:
+ exec("from %s import %s" % (l,m), globals(), locals())
+ dictionary += recurse_into(m, eval(m))
+ librarySymbols[l] = dictionary
+
+ print("PyQt5: ", len(librarySymbols["PyQt5"]), " PySide6: ", len(librarySymbols["PySide6"]))
+
+ for symbol in librarySymbols["PyQt5"]:
+ if not (symbol in librarySymbols["PySide6"]):
+ print("Symbol not found in PySide6:", symbol)
diff --git a/sources/pyside2/tests/util/color.py b/sources/pyside6/tests/util/color.py
index 37c2c86ef..37c2c86ef 100644
--- a/sources/pyside2/tests/util/color.py
+++ b/sources/pyside6/tests/util/color.py
diff --git a/sources/pyside2/tests/util/helper/__init__.py b/sources/pyside6/tests/util/helper/__init__.py
index 218d8921e..218d8921e 100644
--- a/sources/pyside2/tests/util/helper/__init__.py
+++ b/sources/pyside6/tests/util/helper/__init__.py
diff --git a/sources/pyside2/tests/util/helper/basicpyslotcase.py b/sources/pyside6/tests/util/helper/basicpyslotcase.py
index 511db8e08..511db8e08 100644
--- a/sources/pyside2/tests/util/helper/basicpyslotcase.py
+++ b/sources/pyside6/tests/util/helper/basicpyslotcase.py
diff --git a/sources/pyside2/tests/util/helper/docmodifier.py b/sources/pyside6/tests/util/helper/docmodifier.py
index 5db344f62..5db344f62 100644
--- a/sources/pyside2/tests/util/helper/docmodifier.py
+++ b/sources/pyside6/tests/util/helper/docmodifier.py
diff --git a/sources/pyside2/tests/util/helper/helper.py b/sources/pyside6/tests/util/helper/helper.py
index f03a4e90c..f03a4e90c 100644
--- a/sources/pyside2/tests/util/helper/helper.py
+++ b/sources/pyside6/tests/util/helper/helper.py
diff --git a/sources/pyside2/tests/util/helper/helper.pyproject b/sources/pyside6/tests/util/helper/helper.pyproject
index dc23d87a5..dc23d87a5 100644
--- a/sources/pyside2/tests/util/helper/helper.pyproject
+++ b/sources/pyside6/tests/util/helper/helper.pyproject
diff --git a/sources/pyside6/tests/util/helper/timedqapplication.py b/sources/pyside6/tests/util/helper/timedqapplication.py
new file mode 100644
index 000000000..f172878ef
--- /dev/null
+++ b/sources/pyside6/tests/util/helper/timedqapplication.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Helper classes and functions'''
+
+import unittest
+
+from PySide6.QtCore import QTimer
+from PySide6.QtWidgets import QApplication
+
+
+class TimedQApplication(unittest.TestCase):
+ '''Helper class with timed QApplication exec loop'''
+
+ def setUp(self, timeout=100):
+ '''Setups this Application.
+
+ timeout - timeout in milisseconds'''
+ self.app = QApplication.instance() or QApplication([])
+ QTimer.singleShot(timeout, self.app.quit)
+
+ def tearDown(self):
+ '''Delete resources'''
+ del self.app
diff --git a/sources/pyside6/tests/util/helper/usesqapplication.py b/sources/pyside6/tests/util/helper/usesqapplication.py
new file mode 100644
index 000000000..abb2ca238
--- /dev/null
+++ b/sources/pyside6/tests/util/helper/usesqapplication.py
@@ -0,0 +1,51 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Helper classes and functions'''
+
+import unittest
+
+from PySide6.QtWidgets import QApplication
+
+
+class UsesQApplication(unittest.TestCase):
+ '''Helper class to provide QApplication instances'''
+
+ qapplication = True
+
+ def setUp(self):
+ '''Creates the QApplication instance'''
+
+ # Simple way of making instance a singleton
+ super(UsesQApplication, self).setUp()
+ self.app = QApplication.instance() or QApplication([])
+
+ def tearDown(self):
+ '''Deletes the reference owned by self'''
+ del self.app
+ super(UsesQApplication, self).tearDown()
diff --git a/sources/pyside6/tests/util/helper/usesqcoreapplication.py b/sources/pyside6/tests/util/helper/usesqcoreapplication.py
new file mode 100644
index 000000000..9f4a4280d
--- /dev/null
+++ b/sources/pyside6/tests/util/helper/usesqcoreapplication.py
@@ -0,0 +1,59 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Helper classes and functions'''
+
+import unittest
+
+from PySide6.QtCore import QCoreApplication
+
+_core_instance = None
+
+
+class UsesQCoreApplication(unittest.TestCase):
+ '''Helper class for test cases that require an QCoreApplication
+ Just connect or call self.exit_app_cb. When called, will ask
+ self.app to exit.
+ '''
+
+ def setUp(self):
+ '''Set up resources'''
+
+ global _core_instance
+ if _core_instance is None:
+ _core_instance = QCoreApplication([])
+
+ self.app = _core_instance
+
+ def tearDown(self):
+ '''Release resources'''
+ del self.app
+
+ def exit_app_cb(self):
+ '''Quits the application'''
+ self.app.exit(0)
diff --git a/sources/pyside6/tests/util/helper/usesqguiapplication.py b/sources/pyside6/tests/util/helper/usesqguiapplication.py
new file mode 100644
index 000000000..65c4f4939
--- /dev/null
+++ b/sources/pyside6/tests/util/helper/usesqguiapplication.py
@@ -0,0 +1,49 @@
+#############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+'''Helper classes and functions'''
+
+import unittest
+
+from PySide6.QtGui import QGuiApplication
+
+
+class UsesQGuiApplication(unittest.TestCase):
+ '''Helper class to provide QGuiApplication instances'''
+
+ def setUp(self):
+ '''Creates the QGuiApplication instance'''
+
+ # Simple way of making instance a singleton
+ super(UsesQGuiApplication, self).setUp()
+ self.app = QGuiApplication.instance() or QGuiApplication([])
+
+ def tearDown(self):
+ '''Deletes the reference owned by self'''
+ del self.app
+ super(UsesQGuiApplication, self).tearDown()
diff --git a/sources/pyside2/tests/util/httpd.py b/sources/pyside6/tests/util/httpd.py
index 82bec337d..82bec337d 100644
--- a/sources/pyside2/tests/util/httpd.py
+++ b/sources/pyside6/tests/util/httpd.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtAssistant.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtAssistant.py
index d0975d51e..d0975d51e 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtAssistant.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtAssistant.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtCore.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtCore.py
index a6a225649..a6a225649 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtCore.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtCore.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtDesigner.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtDesigner.py
index 5cf9d5f6d..5cf9d5f6d 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtDesigner.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtDesigner.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtGui.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtGui.py
index 0b8b4e957..0b8b4e957 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtGui.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtGui.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtHelp.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtHelp.py
index dd3fd6cd8..dd3fd6cd8 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtHelp.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtHelp.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtNetwork.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtNetwork.py
index 1a669a421..1a669a421 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtNetwork.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtNetwork.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtScript.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtScript.py
index 4f6b30e8e..4f6b30e8e 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtScript.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtScript.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtSql.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtSql.py
index 35dd0a106..35dd0a106 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtSql.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtSql.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtSvg.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtSvg.py
index f308222b9..f308222b9 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtSvg.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtSvg.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtTest.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtTest.py
index 95f64006b..95f64006b 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtTest.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtTest.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtXml.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtXml.py
index 2888a4e49..2888a4e49 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtXml.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtXml.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtXmlPatterns.py b/sources/pyside6/tests/util/module_wrapper/PySide/QtXmlPatterns.py
index 6de76d830..6de76d830 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtXmlPatterns.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/QtXmlPatterns.py
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/__init__.py b/sources/pyside6/tests/util/module_wrapper/PySide/__init__.py
index e69de29bb..e69de29bb 100644
--- a/sources/pyside2/tests/util/module_wrapper/PySide/__init__.py
+++ b/sources/pyside6/tests/util/module_wrapper/PySide/__init__.py
diff --git a/sources/pyside2/tests/util/processtimer.py b/sources/pyside6/tests/util/processtimer.py
index 61a39dbf0..61a39dbf0 100644
--- a/sources/pyside2/tests/util/processtimer.py
+++ b/sources/pyside6/tests/util/processtimer.py
diff --git a/sources/pyside6/tests/util/pyqt_diff.py b/sources/pyside6/tests/util/pyqt_diff.py
new file mode 100644
index 000000000..3cbe9eb02
--- /dev/null
+++ b/sources/pyside6/tests/util/pyqt_diff.py
@@ -0,0 +1,64 @@
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+'''Script to show the difference between PyQt5 and ours'''
+
+import sys
+
+from color import print_colored
+
+def check_module_diff(module_name):
+ '''Difference between PySide6 and PyQt5 versions of qt bindings.
+ Returns a tuple with the members present only on PySide6 and only on PyQt5'''
+ shiboken_module = getattr(__import__('PySide6.' + module_name), module_name)
+ orig_module = getattr(__import__('PyQt5.' + module_name), module_name)
+
+ shiboken_set = set(dir(shiboken_module))
+ orig_set = set(dir(orig_module))
+
+ return sorted(shiboken_set - orig_set), sorted(orig_set - shiboken_set)
+
+
+def main(argv=None):
+ if argv is None:
+ argv = sys.argv
+
+ module_name = argv[1] if len(argv) >= 2 else 'QtCore'
+
+ only_shiboken, only_orig = check_module_diff(module_name)
+
+ print_colored('Only on Shiboken version')
+ print(only_shiboken)
+
+ print_colored('Only on SIP version')
+ print(only_orig)
+
+if __name__ == '__main__':
+ main()
diff --git a/sources/pyside2/tests/util/pyqtcheck.py b/sources/pyside6/tests/util/pyqtcheck.py
index d6cac920f..d6cac920f 100644
--- a/sources/pyside2/tests/util/pyqtcheck.py
+++ b/sources/pyside6/tests/util/pyqtcheck.py
diff --git a/sources/pyside2/tests/util/rename_imports.sh b/sources/pyside6/tests/util/rename_imports.sh
index 64b1123ef..64b1123ef 100755
--- a/sources/pyside2/tests/util/rename_imports.sh
+++ b/sources/pyside6/tests/util/rename_imports.sh
diff --git a/sources/pyside2/tests/util/test_processtimer.py b/sources/pyside6/tests/util/test_processtimer.py
index ba3e99775..ba3e99775 100644
--- a/sources/pyside2/tests/util/test_processtimer.py
+++ b/sources/pyside6/tests/util/test_processtimer.py
diff --git a/sources/pyside2/tests/util/use_pyqt4.sh b/sources/pyside6/tests/util/use_pyqt4.sh
index 5b88fa5c7..5b88fa5c7 100644
--- a/sources/pyside2/tests/util/use_pyqt4.sh
+++ b/sources/pyside6/tests/util/use_pyqt4.sh
diff --git a/sources/pyside2/tests/util/use_pyside.sh b/sources/pyside6/tests/util/use_pyside.sh
index 516207473..516207473 100644
--- a/sources/pyside2/tests/util/use_pyside.sh
+++ b/sources/pyside6/tests/util/use_pyside.sh
diff --git a/sources/pyside2/tests/util/valgrind-python.supp b/sources/pyside6/tests/util/valgrind-python.supp
index a54b451b3..a54b451b3 100644
--- a/sources/pyside2/tests/util/valgrind-python.supp
+++ b/sources/pyside6/tests/util/valgrind-python.supp
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
index 5d4375f23..9e515d4b4 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp
@@ -580,7 +580,7 @@ QString AbstractMetaTypeData::formatPythonSignature() const
for (Indirection i : m_indirections)
result += TypeInfo::indirectionKeyword(i);
// If it is a flags type, we replace it with the full name:
- // "PySide2.QtCore.Qt.ItemFlags" instead of "PySide2.QtCore.QFlags<Qt.ItemFlag>"
+ // "PySide6.QtCore.Qt.ItemFlags" instead of "PySide6.QtCore.QFlags<Qt.ItemFlag>"
if (m_typeEntry->isFlags())
result = m_typeEntry->qualifiedTargetLangName();
result.replace(QLatin1String("::"), QLatin1String("."));
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index a90adca17..512bda9e9 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -1185,7 +1185,7 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
d->m_currentFunction->setOverride(true);
break;
case CXCursor_StaticAssert:
- // Check for Q_PROPERTY() (see PySide2/global.h.in for an explanation
+ // Check for Q_PROPERTY() (see PySide6/global.h.in for an explanation
// how it is defined, and qdoc).
if (clang_isDeclaration(cursor.kind) && !d->m_currentClass.isNull()) {
auto snippet = getCodeSnippet(cursor);
diff --git a/sources/shiboken6/ApiExtractor/typesystemparser.cpp b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
index 369d41a44..19f968d87 100644
--- a/sources/shiboken6/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken6/ApiExtractor/typesystemparser.cpp
@@ -467,7 +467,7 @@ QString TypeSystemEntityResolver::readFile(const QString &entityName, QString *e
if (!fileName.contains(QLatin1Char('.')))
fileName += QLatin1String(".xml");
QString path = TypeDatabase::instance()->modifiedTypesystemFilepath(fileName, m_currentPath);
- if (!QFileInfo::exists(path)) // PySide2-specific hack
+ if (!QFileInfo::exists(path)) // PySide6-specific hack
fileName.prepend(QLatin1String("typesystem_"));
path = TypeDatabase::instance()->modifiedTypesystemFilepath(fileName, m_currentPath);
if (!QFileInfo::exists(path)) {
diff --git a/sources/shiboken6/data/Shiboken6Config-spec.cmake.in b/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
index 172ea479e..06518d253 100644
--- a/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
+++ b/sources/shiboken6/data/Shiboken6Config-spec.cmake.in
@@ -4,7 +4,7 @@
@PACKAGE_INIT@
# This is the version of Python against which Shiboken was built. Not necessarily the version
-# against which a downstream project is built (e.g. PySide2).
+# against which a downstream project is built (e.g. PySide6).
set(SHIBOKEN_PYTHON_VERSION_MAJOR "@PYTHON_VERSION_MAJOR@")
set(SHIBOKEN_PYTHON_VERSION_MINOR "@PYTHON_VERSION_MINOR@")
set(SHIBOKEN_PYTHON_VERSION_PATCH "@PYTHON_VERSION_PATCH@")
diff --git a/sources/shiboken6/doc/considerations.rst b/sources/shiboken6/doc/considerations.rst
index 3488c3407..6539f06d3 100644
--- a/sources/shiboken6/doc/considerations.rst
+++ b/sources/shiboken6/doc/considerations.rst
@@ -84,7 +84,7 @@ Example with old style class:
.. code-block:: python
- from PySide2 import QtCore
+ from PySide6 import QtCore
class MyOldStyleObject:
pass
@@ -99,7 +99,7 @@ this you will need use the new style class:
.. code-block:: python
- from PySide2 import QtCore
+ from PySide6 import QtCore
class MyOldStyleObject(object):
pass
diff --git a/sources/shiboken6/doc/examples/samplebinding.rst b/sources/shiboken6/doc/examples/samplebinding.rst
index a53b32bac..17a5bd38f 100644
--- a/sources/shiboken6/doc/examples/samplebinding.rst
+++ b/sources/shiboken6/doc/examples/samplebinding.rst
@@ -237,7 +237,7 @@ Try running it to see if the ice creams are delivered.
.. note::
You can find the sources for this example under
- :file:`<PYTHON_ENV_ROOT>/site-packages/lib/PySide2/examples/samplebinding`.
+ :file:`<PYTHON_ENV_ROOT>/site-packages/lib/PySide6/examples/samplebinding`.
Refer to the following topics for detailed information about using Shiboken:
* :doc:`Type System Variables <../typesystem_variables>`
diff --git a/sources/shiboken6/doc/gettingstarted.rst b/sources/shiboken6/doc/gettingstarted.rst
index 758bc9763..def1ecca5 100644
--- a/sources/shiboken6/doc/gettingstarted.rst
+++ b/sources/shiboken6/doc/gettingstarted.rst
@@ -47,7 +47,7 @@ The same can be used for the module, changing the value of ``internal-build-type
Using the wheels
----------------
-Installing ``pyside2`` or ``shiboken6`` from pip **does not** install ``shiboken6_generator``,
+Installing ``pyside6`` or ``shiboken6`` from pip **does not** install ``shiboken6_generator``,
because the wheels are not on PyPi.
You can get the ``shiboken6_generator`` wheels from Qt servers, and you can still install it
@@ -56,7 +56,7 @@ via ``pip``::
pip install \
--index-url=http://download.qt.io/official_releases/QtForPython/ \
--trusted-host download.qt.io \
- shiboken6 pyside2 shiboken6_generator
+ shiboken6 pyside6 shiboken6_generator
The ``whl`` package cannot automatically discover in your system the location for:
diff --git a/sources/shiboken6/doc/index.rst b/sources/shiboken6/doc/index.rst
index ebde8d1ff..dcebdfe19 100644
--- a/sources/shiboken6/doc/index.rst
+++ b/sources/shiboken6/doc/index.rst
@@ -7,7 +7,7 @@ Shiboken
.. ifconfig:: output_format == 'qthelp'
- Shiboken is a fundamental piece on the `Qt for Python <../pyside2/index.html>`__ project that serves two purposes:
+ Shiboken is a fundamental piece on the `Qt for Python <../pyside6/index.html>`__ project that serves two purposes:
* Generator_: Extract information from C or C++ headers and generate CPython_ code that allow
diff --git a/sources/shiboken6/doc/typesystem.rst b/sources/shiboken6/doc/typesystem.rst
index 0d43cec2c..c9e81ec4f 100644
--- a/sources/shiboken6/doc/typesystem.rst
+++ b/sources/shiboken6/doc/typesystem.rst
@@ -12,8 +12,8 @@ It is even possible to use the typesystem specification to inject arbitrary
code into the source files, such as an extra member function.
Below there is a complete reference guide to the various nodes (XML tags) of the typesystem.
-For usage examples, take a look at the typesystem files used to generate PySide2. These files
-can be found in the PySide2/<QT_MODULE_NAME> directory of the PySide2 package.
+For usage examples, take a look at the typesystem files used to generate PySide6. These files
+can be found in the PySide6/<QT_MODULE_NAME> directory of the PySide6 package.
Define types
------------
diff --git a/sources/shiboken6/doc/typesystem_manipulating_objects.rst b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
index 9f9bc2b33..453fa6752 100644
--- a/sources/shiboken6/doc/typesystem_manipulating_objects.rst
+++ b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
@@ -279,10 +279,10 @@ property
It may appear as a child of a complex type such as ``object-type`` or
``value-type``.
- If the PySide2 extension is not present, code will be generated using the
+ If the PySide6 extension is not present, code will be generated using the
``PyGetSetDef`` struct, similar to what is generated for fields.
- If the PySide2 extension is present, those properties complement the
+ If the PySide6 extension is present, those properties complement the
properties obtained from the ``Q_PROPERTY`` macro in Qt-based code.
The properties will be handled in ``libpyside`` unless code generation
is forced.
@@ -298,7 +298,7 @@ property
The optional ``set`` attribute specifies name of the setter function.
The optional ``generate-getsetdef`` attribute specifies whether to generate
- code for if the PySide2 extension is present (indicating this property is not
+ code for if the PySide6 extension is present (indicating this property is not
handled by libpyside). It defaults to *no*.
The optional ``since`` attribute specifies the API version when this
@@ -328,7 +328,7 @@ property
test = Test()
test.value = 42
- For Qt classes (with the PySide2 extension present), additional setters
+ For Qt classes (with the PySide6 extension present), additional setters
and getters that do not appear as ``Q_PROPERTY``, can be specified to
be properties:
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 53b403022..6d734e5e2 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -1074,7 +1074,7 @@ void QtXmlToSphinx::handleLinkEnd(LinkContext *linkContext)
}
// Copy images that are placed in a subdirectory "images" under the webxml files
-// by qdoc to a matching subdirectory under the "rst/PySide2/<module>" directory
+// by qdoc to a matching subdirectory under the "rst/PySide6/<module>" directory
static bool copyImage(const QString &href, const QString &docDataDir,
const QString &context, const QString &outputDir,
QString *errorMessage)
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 1d7649b18..82292b953 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -4161,7 +4161,7 @@ void CppGenerator::writeClassDefinition(QTextStream &s,
// privacy the same way. This worked before the heap types were used,
// because inheritance is not really checked for static types.
// Instead, we check this at runtime, see SbkObjectTypeTpNew.
- if (metaClass->fullName().startsWith(QLatin1String("PySide2.Qt"))) {
+ if (metaClass->fullName().startsWith(QLatin1String("PySide6.Qt"))) {
// PYSIDE-595: No idea how to do non-inheritance correctly.
// Since that is only relevant in shiboken, I used a shortcut for
// PySide.
@@ -4900,7 +4900,7 @@ void CppGenerator::writeSignatureInfo(QTextStream &s, const AbstractMetaFunction
for (const AbstractMetaFunction *f : overloads) {
QStringList args;
// PYSIDE-1328: `self`-ness cannot be computed in Python because there are mixed cases.
- // Toplevel functions like `PySide2.QtCore.QEnum` are always self-less.
+ // Toplevel functions like `PySide6.QtCore.QEnum` are always self-less.
if (!(f->isStatic()) && f->ownerClass())
args << QLatin1String("self");
const AbstractMetaArgumentList &arguments = f->arguments();
diff --git a/sources/shiboken6/libshiboken/embed/embedding_generator.py b/sources/shiboken6/libshiboken/embed/embedding_generator.py
index 1dd17e755..39aab10e4 100644
--- a/sources/shiboken6/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken6/libshiboken/embed/embedding_generator.py
@@ -3,7 +3,7 @@
## Copyright (C) 2019 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
-## This file is part of PySide2.
+## This file is part of PySide6.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
diff --git a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
index 08928e915..d56e16a4d 100644
--- a/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
+++ b/sources/shiboken6/libshiboken/embed/signature_bootstrap.py
@@ -3,7 +3,7 @@
## Copyright (C) 2019 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
-## This file is part of PySide2.
+## This file is part of PySide6.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index 05d3cad2d..5ebb83fbb 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -384,7 +384,7 @@ static int PySide_FinishSignatures(PyObject *module, const char *signatures[])
// was not yet run. But that is ok, because the first import is always for
// the shiboken module (or a test module).
if (pyside_globals->finish_import_func == nullptr) {
- assert(strncmp(name, "PySide2.", 8) != 0);
+ assert(strncmp(name, "PySide6.", 8) != 0);
return 0;
}
AutoDecRef ret(PyObject_CallFunction(
diff --git a/sources/shiboken6/libshiboken/signature/signature_doc.rst b/sources/shiboken6/libshiboken/signature/signature_doc.rst
index 95f0b8b08..872ed024a 100644
--- a/sources/shiboken6/libshiboken/signature/signature_doc.rst
+++ b/sources/shiboken6/libshiboken/signature/signature_doc.rst
@@ -81,7 +81,7 @@ The normal case are only a few accesses, and these are working pretty fast.
The key to make this signature module fast is to avoid computation as much as
possible. When no signature objects are used, then almost no time is lost in
initialization. Only the above mentioned strings and some support modules are
-additionally loaded on ``import PySide2``.
+additionally loaded on ``import PySide6``.
When it comes to signature usage, then late initialization is used and cached.
This technique is also known as *full laziness* in haskell.
@@ -98,7 +98,7 @@ There are actually two locations where late initialization occurs:
The initialization that is always done is just two dictionary writes
per class, and we have about 1000 classes.
To measure the additional overhead, we have simulated what happens
-when ``from PySide2 import *`` is performed.
+when ``from PySide6 import *`` is performed.
It turned out that the overhead is below 0.5 ms.
@@ -172,7 +172,7 @@ classes and functions. In order to centralize this enumeration, the process has
been factored out as a context manager. The user has only to supply functions
that do the actual formatting.
-See for example the .pyi generator ``pyside2/PySide2/support/generate_pyi.py``.
+See for example the .pyi generator ``pyside6/PySide6/support/generate_pyi.py``.
layout.py
@@ -221,7 +221,7 @@ future:
existence_test.py
-----------------
-The file ``pyside2/tests/registry/existence_test.py`` was written using the
+The file ``pyside6/tests/registry/existence_test.py`` was written using the
signatures from the signatures module. The idea is that there are some 15000
functions with a certain signature.
@@ -280,7 +280,7 @@ init_platform.py
~~~~~~~~~~~~~~~~
For generating the ``exists_{platf}_{version}`` modules, the module
-``pyside2/tests/registry/init_platform.py`` was written. It can be used
+``pyside6/tests/registry/init_platform.py`` was written. It can be used
standalone from the commandline, to check the compatibility of some
changes, directly.
@@ -289,7 +289,7 @@ scrape_testresults.py
---------------------
To simplify and automate the process of extracting the ``exists_{platf}_{version}_ci.py``
-files, the script ``pyside2/tests/registry/scrape_testresults.py`` has been written.
+files, the script ``pyside6/tests/registry/scrape_testresults.py`` has been written.
This script scans the whole testresults website for PySide, that is::
@@ -297,24 +297,24 @@ This script scans the whole testresults website for PySide, that is::
On the first scan, the script runs less than 30 minutes. After that, a cache
is generated and the scan works *much* faster. The test results are placed
-into the folder ``pyside2/tests/registry/testresults/embedded/`` with a
+into the folder ``pyside6/tests/registry/testresults/embedded/`` with a
unique name that allows for easy sorting. Example::
testresults/embedded/2018_09_10_10_40_34-test_1536891759-exists_linux_5_11_2_ci.py
These files are created only once. If they already exist, they are not touched, again.
-The file `pyside2/tests/registry/known_urls.json`` holds all scanned URLs after
+The file `pyside6/tests/registry/known_urls.json`` holds all scanned URLs after
a successful scan. The ``testresults/embedded`` folder can be kept for reference
or can be removed. Important is only the json file.
-The result of a scan is then directly placed into the ``pyside2/tests/registry/``
+The result of a scan is then directly placed into the ``pyside6/tests/registry/``
folder. It should be reviewed and then eventually checked in.
generate_pyi.py
---------------
-``pyside2/PySide2/support/generate_pyi.py`` is still under development.
+``pyside6/PySide6/support/generate_pyi.py`` is still under development.
This module generates so-called hinting stubs for integration of PySide
with diverse *Python IDEs*.
diff --git a/sources/shiboken6/libshiboken/signature/signature_extend.cpp b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
index 1490a6003..6f9dbe265 100644
--- a/sources/shiboken6/libshiboken/signature/signature_extend.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
@@ -162,7 +162,7 @@ static PyObject *handle_doc(PyObject *ob, PyObject *old_descr)
else
name = reinterpret_cast<PyTypeObject *>(ob_type_mod.object())->tp_name;
if (handle_doc_in_progress || name == nullptr
- || strncmp(name, "PySide2.", 8) != 0)
+ || strncmp(name, "PySide6.", 8) != 0)
return PyObject_CallMethodObjArgs(old_descr,
PyMagicName::get(),
ob, nullptr);
diff --git a/sources/shiboken6/libshiboken/signature/signature_helper.cpp b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
index 2b360c786..f38740254 100644
--- a/sources/shiboken6/libshiboken/signature/signature_helper.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_helper.cpp
@@ -357,10 +357,10 @@ static int _build_func_to_type(PyObject *obtype)
* It is possible that a method is overwritten by another
* attribute with the same name. This case was obviously provoked
* explicitly in "testbinding.TestObject.staticMethodDouble",
- * where instead of the method a "PySide2.QtCore.Signal" object
+ * where instead of the method a "PySide6.QtCore.Signal" object
* was in the dict.
* This overlap is also found in regular PySide under
- * "PySide2.QtCore.QProcess.error" where again a signal object is
+ * "PySide6.QtCore.QProcess.error" where again a signal object is
* returned. These hidden methods will be opened for the
* signature module by adding them under the name
* "{name}.overload".
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
index ece3d2edb..6cedcc1ec 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/__feature__.py
@@ -129,11 +129,11 @@ def _import(name, *args, **kwargs):
pyside_feature_dict["rlcompleter"] = flag
# Initialize feature (multiple times allowed) and clear cache.
- sys.modules["PySide2.QtCore"].__init_feature__()
+ sys.modules["PySide6.QtCore"].__init_feature__()
return sys.modules["__feature__"]
- if name.split(".")[0] == "PySide2":
- # This is a module that imports PySide2.
+ if name.split(".")[0] == "PySide6":
+ # This is a module that imports PySide6.
flag = existing if isinstance(existing, int) else 0
else:
# This is some other module. Ignore it in switching.
@@ -147,7 +147,7 @@ def __init__():
global _is_initialized
if not _is_initialized:
# use _one_ recursive import...
- import PySide2.QtCore
+ import PySide6.QtCore
# Initialize all prior imported modules
for name in sys.modules:
pyside_feature_dict.setdefault(name, -1)
@@ -165,7 +165,7 @@ def set_selection(select_id, mod_name=None):
if isinstance(select_id, int):
flag = select_id & 255
pyside_feature_dict[mod_name] = flag
- sys.modules["PySide2.QtCore"].__init_feature__()
+ sys.modules["PySide6.QtCore"].__init_feature__()
return _current_selection(flag)
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
index 3dbc2e011..7b1d4927e 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/importhandler.py
@@ -51,11 +51,11 @@ because the implementation of deprecated functions should be visible
to the users (in the hope they don't use it any longer <wink>).
As a first approach, the function finish_import redirects to
-PySide2/support/deprecated.py . There can come other extensions as well.
+PySide6/support/deprecated.py . There can come other extensions as well.
"""
try:
- from PySide2.support import deprecated
+ from PySide6.support import deprecated
have_deprecated = True
except ImportError:
have_deprecated = False
@@ -63,7 +63,7 @@ except ImportError:
# called by loader.py from signature.cpp
def finish_import(module):
- if have_deprecated and module.__name__.startswith("PySide2."):
+ if have_deprecated and module.__name__.startswith("PySide6."):
try:
name = "fix_for_" + module.__name__.split(".")[1]
func = getattr(deprecated, name, None)
@@ -89,7 +89,7 @@ was much less appealing.
Reason:
If someone executes as the first PySide statement
- from PySide2 import QtGui
+ from PySide6 import QtGui
then this import is already running. We can see the other imports like the
diverse initializations and QtCore, because it is triggered by import of
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
index dcbdd657c..06144836b 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
@@ -67,7 +67,7 @@ class ExactEnumerator(object):
global EnumType
try:
# Lazy import
- from PySide2.QtCore import Qt
+ from PySide6.QtCore import Qt
EnumType = type(Qt.Key)
except ImportError:
EnumType = None
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
index 49c6439b7..766ff2437 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py
@@ -50,7 +50,7 @@ to make sure that the functions are available when needed.
This is meanwhile necessary to make the '__doc__' attribute work correctly.
It does not mean that everything is initialized in advance. Only the modules
-are loaded completely after 'import PySide2'.
+are loaded completely after 'import PySide6'.
This version uses both a normal directory, but has also an embedded ZIP file
as a fallback solution. The ZIP file is generated by 'embedding_generator.py'
@@ -173,23 +173,23 @@ put_into_package(shibokensupport.signature, inspect, "inspect")
def move_into_pyside_package():
- import PySide2
+ import PySide6
try:
- import PySide2.support
+ import PySide6.support
except ModuleNotFoundError:
- PySide2.support = types.ModuleType("PySide2.support")
- put_into_package(PySide2.support, __feature__)
- put_into_package(PySide2.support, signature)
- put_into_package(PySide2.support.signature, mapping)
- put_into_package(PySide2.support.signature, errorhandler)
- put_into_package(PySide2.support.signature, layout)
- put_into_package(PySide2.support.signature, lib)
- put_into_package(PySide2.support.signature, parser)
- put_into_package(PySide2.support.signature, importhandler)
- put_into_package(PySide2.support.signature.lib, enum_sig)
-
- put_into_package(None if orig_typing else PySide2.support.signature, typing)
- put_into_package(PySide2.support.signature, inspect)
+ PySide6.support = types.ModuleType("PySide6.support")
+ put_into_package(PySide6.support, __feature__)
+ put_into_package(PySide6.support, signature)
+ put_into_package(PySide6.support.signature, mapping)
+ put_into_package(PySide6.support.signature, errorhandler)
+ put_into_package(PySide6.support.signature, layout)
+ put_into_package(PySide6.support.signature, lib)
+ put_into_package(PySide6.support.signature, parser)
+ put_into_package(PySide6.support.signature, importhandler)
+ put_into_package(PySide6.support.signature.lib, enum_sig)
+
+ put_into_package(None if orig_typing else PySide6.support.signature, typing)
+ put_into_package(PySide6.support.signature, inspect)
from shibokensupport.signature import mapping
from shibokensupport.signature import errorhandler
@@ -199,16 +199,16 @@ from shibokensupport.signature import parser
from shibokensupport.signature import importhandler
from shibokensupport.signature.lib import enum_sig
-if "PySide2" in sys.modules:
- # We publish everything under "PySide2.support.signature", again.
+if "PySide6" in sys.modules:
+ # We publish everything under "PySide6.support.signature", again.
move_into_pyside_package()
# PYSIDE-1019: Modify `__import__` to be `__feature__` aware.
# __feature__ is already in sys.modules, so this is actually no import
try:
- import PySide2.support.__feature__
- sys.modules["__feature__"] = PySide2.support.__feature__
- PySide2.support.__feature__.original_import = __builtins__["__import__"]
- __builtins__["__import__"] = PySide2.support.__feature__._import
+ import PySide6.support.__feature__
+ sys.modules["__feature__"] = PySide6.support.__feature__
+ PySide6.support.__feature__.original_import = __builtins__["__import__"]
+ __builtins__["__import__"] = PySide6.support.__feature__._import
# Maybe we should optimize that and change `__import__` from C, instead?
except ModuleNotFoundError:
print("__feature__ could not be imported. "
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 43be5b95f..46da17a47 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -198,10 +198,10 @@ class Reloader(object):
candidates = list(mod_name for mod_name in sys.modules.copy()
if self.module_valid(sys.modules[mod_name]))
for mod_name in candidates:
- # 'top' is PySide2 when we do 'import PySide.QtCore'
+ # 'top' is PySide6 when we do 'import PySide.QtCore'
# or Shiboken if we do 'import Shiboken'.
# Convince yourself that these two lines below have the same
- # global effect as "import Shiboken" or "import PySide2.QtCore".
+ # global effect as "import Shiboken" or "import PySide6.QtCore".
top = __import__(mod_name)
g[top.__name__] = top
proc_name = "init_" + mod_name.replace(".", "_")
@@ -331,7 +331,7 @@ type_map.update({
type_map.update({
# Handling variables that are returned, eventually as Tuples:
- "PySide2.QtQml.atomic[bool]": ResultVariable(bool), # QmlIncubationController::incubateWhile()
+ "PySide6.QtQml.atomic[bool]": ResultVariable(bool), # QmlIncubationController::incubateWhile()
"bool*" : ResultVariable(bool),
"float*" : ResultVariable(float),
"int*" : ResultVariable(int),
@@ -432,13 +432,13 @@ def init_smart():
# The PySide Part
-def init_PySide2_QtCore():
- from PySide2.QtCore import Qt, QUrl, QDir
- from PySide2.QtCore import QRect, QSize, QPoint, QLocale, QByteArray
- from PySide2.QtCore import QMarginsF # 5.9
+def init_PySide6_QtCore():
+ from PySide6.QtCore import Qt, QUrl, QDir
+ from PySide6.QtCore import QRect, QSize, QPoint, QLocale, QByteArray
+ from PySide6.QtCore import QMarginsF # 5.9
try:
# seems to be not generated by 5.9 ATM.
- from PySide2.QtCore import Connection
+ from PySide6.QtCore import Connection
except ImportError:
pass
type_map.update({
@@ -447,19 +447,19 @@ def init_PySide2_QtCore():
"'g'": "g",
"4294967295UL": 4294967295, # 5.6, RHEL 6.6
"CheckIndexOption.NoOption": Instance(
- "PySide2.QtCore.QAbstractItemModel.CheckIndexOptions.NoOption"), # 5.11
+ "PySide6.QtCore.QAbstractItemModel.CheckIndexOptions.NoOption"), # 5.11
"DescriptorType(-1)": int, # Native handle of QSocketDescriptor
"false": False,
- "list of QAbstractAnimation": typing.List[PySide2.QtCore.QAbstractAnimation],
+ "list of QAbstractAnimation": typing.List[PySide6.QtCore.QAbstractAnimation],
"long long": int,
"size_t": int,
"NULL": None, # 5.6, MSVC
"nullptr": None, # 5.9
"PyByteArray": bytearray,
"PyBytes": bytes,
- "QDeadlineTimer(QDeadlineTimer.Forever)": Instance("PySide2.QtCore.QDeadlineTimer"),
- "PySide2.QtCore.QUrl.ComponentFormattingOptions":
- PySide2.QtCore.QUrl.ComponentFormattingOption, # mismatch option/enum, why???
+ "QDeadlineTimer(QDeadlineTimer.Forever)": Instance("PySide6.QtCore.QDeadlineTimer"),
+ "PySide6.QtCore.QUrl.ComponentFormattingOptions":
+ PySide6.QtCore.QUrl.ComponentFormattingOption, # mismatch option/enum, why???
"PyUnicode": typing.Text,
"Q_NULLPTR": None,
"QDir.Filters(AllEntries | NoDotAndDotDot)": Instance(
@@ -472,8 +472,8 @@ def init_PySide2_QtCore():
"QGenericArgument(NULL)": ellipsis, # 5.6, MSVC
"QGenericArgument(nullptr)": ellipsis, # 5.10
"QGenericArgument(Q_NULLPTR)": ellipsis,
- "QJsonObject": typing.Dict[str, PySide2.QtCore.QJsonValue],
- "QModelIndex()": Invalid("PySide2.QtCore.QModelIndex"), # repr is btw. very wrong, fix it?!
+ "QJsonObject": typing.Dict[str, PySide6.QtCore.QJsonValue],
+ "QModelIndex()": Invalid("PySide6.QtCore.QModelIndex"), # repr is btw. very wrong, fix it?!
"QModelIndexList": ModelIndexList,
"QModelIndexList": ModelIndexList,
"QString()": "",
@@ -490,7 +490,7 @@ def init_PySide2_QtCore():
})
try:
type_map.update({
- "PySide2.QtCore.QMetaObject.Connection": PySide2.QtCore.Connection, # wrong!
+ "PySide6.QtCore.QMetaObject.Connection": PySide6.QtCore.Connection, # wrong!
})
except AttributeError:
# this does not exist on 5.9 ATM.
@@ -498,25 +498,25 @@ def init_PySide2_QtCore():
return locals()
-def init_PySide2_QtConcurrent():
+def init_PySide6_QtConcurrent():
type_map.update({
- "PySide2.QtCore.QFuture[QString]":
- PySide2.QtConcurrent.QFutureQString,
- "PySide2.QtCore.QFuture[void]":
- PySide2.QtConcurrent.QFutureVoid,
+ "PySide6.QtCore.QFuture[QString]":
+ PySide6.QtConcurrent.QFutureQString,
+ "PySide6.QtCore.QFuture[void]":
+ PySide6.QtConcurrent.QFutureVoid,
})
return locals()
-def init_PySide2_QtGui():
- from PySide2.QtGui import QPageLayout, QPageSize # 5.12 macOS
+def init_PySide6_QtGui():
+ from PySide6.QtGui import QPageLayout, QPageSize # 5.12 macOS
type_map.update({
"0.0f": 0.0,
"1.0f": 1.0,
"GL_COLOR_BUFFER_BIT": GL_COLOR_BUFFER_BIT,
"GL_NEAREST": GL_NEAREST,
"int32_t": int,
- "QPixmap()": Default("PySide2.QtGui.QPixmap"), # can't create without qApp
+ "QPixmap()": Default("PySide6.QtGui.QPixmap"), # can't create without qApp
"QPlatformSurface*": int, # a handle
"QVector< QTextLayout.FormatRange >()": [], # do we need more structure?
"uint32_t": int,
@@ -526,9 +526,9 @@ def init_PySide2_QtGui():
return locals()
-def init_PySide2_QtWidgets():
- from PySide2.QtWidgets import QWidget, QMessageBox, QStyleOption, QStyleHintReturn, QStyleOptionComplex
- from PySide2.QtWidgets import QGraphicsItem, QStyleOptionGraphicsItem # 5.9
+def init_PySide6_QtWidgets():
+ from PySide6.QtWidgets import QWidget, QMessageBox, QStyleOption, QStyleHintReturn, QStyleOptionComplex
+ from PySide6.QtWidgets import QGraphicsItem, QStyleOptionGraphicsItem # 5.9
type_map.update({
"QMessageBox.StandardButtons(Yes | No)": Instance(
"QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No)"),
@@ -539,13 +539,13 @@ def init_PySide2_QtWidgets():
"SO_Default": QStyleOption.SO_Default,
"static_cast<Qt.MatchFlags>(Qt.MatchExactly|Qt.MatchCaseSensitive)": Instance(
"Qt.MatchFlags(Qt.MatchExactly | Qt.MatchCaseSensitive)"),
- "Type": PySide2.QtWidgets.QListWidgetItem.Type,
+ "Type": PySide6.QtWidgets.QListWidgetItem.Type,
})
return locals()
-def init_PySide2_QtSql():
- from PySide2.QtSql import QSqlDatabase
+def init_PySide6_QtSql():
+ from PySide6.QtSql import QSqlDatabase
type_map.update({
"QLatin1String(defaultConnection)": QSqlDatabase.defaultConnection,
"QVariant.Invalid": Invalid("Variant"), # not sure what I should create, here...
@@ -553,12 +553,12 @@ def init_PySide2_QtSql():
return locals()
-def init_PySide2_QtNetwork():
- from PySide2.QtNetwork import QNetworkRequest
+def init_PySide6_QtNetwork():
+ from PySide6.QtNetwork import QNetworkRequest
best_structure = typing.OrderedDict if getattr(typing, "OrderedDict", None) else typing.Dict
type_map.update({
- "QMultiMap[PySide2.QtNetwork.QSsl.AlternativeNameEntryType, QString]":
- best_structure[PySide2.QtNetwork.QSsl.AlternativeNameEntryType, typing.List[str]],
+ "QMultiMap[PySide6.QtNetwork.QSsl.AlternativeNameEntryType, QString]":
+ best_structure[PySide6.QtNetwork.QSsl.AlternativeNameEntryType, typing.List[str]],
"DefaultTransferTimeoutConstant":
QNetworkRequest.TransferTimeoutConstant,
"QNetworkRequest.DefaultTransferTimeoutConstant":
@@ -568,28 +568,28 @@ def init_PySide2_QtNetwork():
return locals()
-def init_PySide2_QtXmlPatterns():
- from PySide2.QtXmlPatterns import QXmlName
+def init_PySide6_QtXmlPatterns():
+ from PySide6.QtXmlPatterns import QXmlName
type_map.update({
- "QXmlName.NamespaceCode": Missing("PySide2.QtXmlPatterns.QXmlName.NamespaceCode"),
- "QXmlName.PrefixCode": Missing("PySide2.QtXmlPatterns.QXmlName.PrefixCode"),
+ "QXmlName.NamespaceCode": Missing("PySide6.QtXmlPatterns.QXmlName.NamespaceCode"),
+ "QXmlName.PrefixCode": Missing("PySide6.QtXmlPatterns.QXmlName.PrefixCode"),
})
return locals()
-def init_PySide2_QtMultimedia():
- import PySide2.QtMultimediaWidgets
+def init_PySide6_QtMultimedia():
+ import PySide6.QtMultimediaWidgets
# Check if foreign import is valid. See mapping.py in shiboken6.
- check_module(PySide2.QtMultimediaWidgets)
+ check_module(PySide6.QtMultimediaWidgets)
type_map.update({
- "QGraphicsVideoItem": PySide2.QtMultimediaWidgets.QGraphicsVideoItem,
+ "QGraphicsVideoItem": PySide6.QtMultimediaWidgets.QGraphicsVideoItem,
"qint64": int,
- "QVideoWidget": PySide2.QtMultimediaWidgets.QVideoWidget,
+ "QVideoWidget": PySide6.QtMultimediaWidgets.QVideoWidget,
})
return locals()
-def init_PySide2_QtOpenGL():
+def init_PySide6_QtOpenGL():
type_map.update({
"GLbitfield": int,
"GLenum": int,
@@ -600,7 +600,7 @@ def init_PySide2_QtOpenGL():
return locals()
-def init_PySide2_QtQml():
+def init_PySide6_QtQml():
type_map.update({
"QJSValueList()": [],
"QVariantHash()": typing.Dict[str, Variant], # from 5.9
@@ -608,39 +608,39 @@ def init_PySide2_QtQml():
return locals()
-def init_PySide2_QtQuick():
+def init_PySide6_QtQuick():
type_map.update({
- "PySide2.QtQuick.QSharedPointer[PySide2.QtQuick.QQuickItemGrabResult]":
- PySide2.QtQuick.QQuickItemGrabResult,
+ "PySide6.QtQuick.QSharedPointer[PySide6.QtQuick.QQuickItemGrabResult]":
+ PySide6.QtQuick.QQuickItemGrabResult,
"UnsignedShortType": int,
})
return locals()
-def init_PySide2_QtScript():
+def init_PySide6_QtScript():
type_map.update({
"QScriptValueList()": [],
})
return locals()
-def init_PySide2_QtTest():
+def init_PySide6_QtTest():
type_map.update({
- "PySide2.QtTest.QTest.PySideQTouchEventSequence": PySide2.QtTest.QTest.QTouchEventSequence,
- "PySide2.QtTest.QTouchEventSequence": PySide2.QtTest.QTest.QTouchEventSequence,
+ "PySide6.QtTest.QTest.PySideQTouchEventSequence": PySide6.QtTest.QTest.QTouchEventSequence,
+ "PySide6.QtTest.QTouchEventSequence": PySide6.QtTest.QTest.QTouchEventSequence,
})
return locals()
# from 5.6, MSVC
-def init_PySide2_QtWinExtras():
+def init_PySide6_QtWinExtras():
type_map.update({
"QList< QWinJumpListItem* >()": [],
})
return locals()
# from 5.12, macOS
-def init_PySide2_QtDataVisualization():
- from PySide2.QtDataVisualization import QtDataVisualization
+def init_PySide6_QtDataVisualization():
+ from PySide6.QtDataVisualization import QtDataVisualization
QtDataVisualization.QBarDataRow = typing.List[QtDataVisualization.QBarDataItem]
QtDataVisualization.QBarDataArray = typing.List[QtDataVisualization.QBarDataRow]
QtDataVisualization.QSurfaceDataRow = typing.List[QtDataVisualization.QSurfaceDataItem]
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
index 6bf78cf95..c5261fc0b 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py
@@ -180,7 +180,7 @@ def get_name(thing):
def _resolve_value(thing, valtype, line):
if thing in ("0", "None") and valtype:
- if valtype.startswith("PySide2.") or valtype.startswith("typing."):
+ if valtype.startswith("PySide6.") or valtype.startswith("typing."):
return None
map = type_map[valtype]
# typing.Any: '_SpecialForm' object has no attribute '__name__'
@@ -230,12 +230,12 @@ def to_string(thing):
return str(thing)
-matrix_pattern = "PySide2.QtGui.QGenericMatrix"
+matrix_pattern = "PySide6.QtGui.QGenericMatrix"
def handle_matrix(arg):
n, m, typstr = tuple(map(lambda x:x.strip(), arg.split(",")))
assert typstr == "float"
- result = f"PySide2.QtGui.QMatrix{n}x{m}"
+ result = f"PySide6.QtGui.QMatrix{n}x{m}"
return eval(result, namespace)
@@ -251,7 +251,7 @@ def lno(level):
def _resolve_type(thing, line, level, var_handler):
# Capture total replacements, first. Happens in
- # "PySide2.QtCore.QCborStreamReader.StringResult[PySide2.QtCore.QByteArray]"
+ # "PySide6.QtCore.QCborStreamReader.StringResult[PySide6.QtCore.QByteArray]"
if thing in type_map:
return type_map[thing]
# Now the nested structures are handled.
diff --git a/testing/command.py b/testing/command.py
index d6f814a34..d21be492c 100644
--- a/testing/command.py
+++ b/testing/command.py
@@ -55,7 +55,7 @@ Building the project with something like
python setup.py build --build-tests --qmake=<qmakepath> --ignore-git --debug
is sufficient. The tests are run by changing into the latest build dir and there
-into pyside2, then 'make test'.
+into pyside6, then 'make test'.
New testing policy:
@@ -158,8 +158,8 @@ def test_project(project, args, blacklist, runs):
def main():
# create the top-level command parser
start_time = timer()
- all_projects = "shiboken6 pyside2".split()
- tested_projects = "shiboken6 pyside2".split()
+ all_projects = "shiboken6 pyside6".split()
+ tested_projects = "shiboken6 pyside6".split()
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description=dedent("""\
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index e911913da..a8760d27c 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -112,7 +112,7 @@ def get_examples_dir():
def package_prefix_names():
# Note: shiboken6_generator is not needed for compile_using_pyinstaller,
# but building modules with cmake needs it.
- return ["shiboken6", "shiboken6_generator", "PySide2"]
+ return ["shiboken6", "shiboken6_generator", "PySide6"]
def clean_egg_info():
diff --git a/tools/create_changelog.py b/tools/create_changelog.py
index 30679ecf3..914b87cc1 100644
--- a/tools/create_changelog.py
+++ b/tools/create_changelog.py
@@ -59,7 +59,7 @@ Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
-* PySide2 *
+* PySide6 *
****************************************************************************
"""
@@ -75,7 +75,7 @@ def parse_options() -> Namespace:
" v5.12.0..v5.12.1\n"
" cebc32a5..5.12")
- options = ArgumentParser(description="PySide2 changelog tool",
+ options = ArgumentParser(description="PySide6 changelog tool",
formatter_class=RawTextHelpFormatter)
options.add_argument("-d",
"--directory",
@@ -178,8 +178,8 @@ def git_command(versions: List[str], pattern: str):
if sha not in shiboken6_commits:
shiboken6_commits[sha] = entry
else:
- if sha not in pyside2_commits:
- pyside2_commits[sha] = entry
+ if sha not in pyside6_commits:
+ pyside6_commits[sha] = entry
def create_fixes_log(versions: List[str]) -> None:
@@ -221,7 +221,7 @@ def create_change_log(versions: List[str]) -> None:
if change_log[0].startswith('shiboken'):
shiboken6_changelogs.extend(change_log[1])
else:
- pyside2_changelogs.extend(change_log[1])
+ pyside6_changelogs.extend(change_log[1])
def gen_list(d: Dict[str, Dict[str, str]]) -> str:
@@ -238,9 +238,9 @@ def sort_dict(d: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str, str]]:
if __name__ == "__main__":
args = parse_options()
- pyside2_commits: Dict[str, Dict[str, str]] = {}
+ pyside6_commits: Dict[str, Dict[str, str]] = {}
shiboken6_commits: Dict[str, Dict[str, str]] = {}
- pyside2_changelogs: List[str] = []
+ pyside6_changelogs: List[str] = []
shiboken6_changelogs: List[str] = []
# Getting commits information
@@ -253,15 +253,15 @@ if __name__ == "__main__":
create_change_log(versions)
# Sort commits
- pyside2_commits = sort_dict(pyside2_commits)
+ pyside6_commits = sort_dict(pyside6_commits)
shiboken6_commits = sort_dict(shiboken6_commits)
# Generate message
print(content_header.replace("@VERSION", args.release).
replace("@TYPE", args.type))
- print('\n'.join(pyside2_changelogs))
- print(gen_list(pyside2_commits))
- if not pyside2_changelogs and not pyside2_commits:
+ print('\n'.join(pyside6_changelogs))
+ print(gen_list(pyside6_commits))
+ if not pyside6_changelogs and not pyside6_commits:
print(" - No changes")
print(shiboken_header)
print('\n'.join(shiboken6_changelogs))
diff --git a/tools/debug_windows.py b/tools/debug_windows.py
index dbde5f534..73696a379 100644
--- a/tools/debug_windows.py
+++ b/tools/debug_windows.py
@@ -39,15 +39,15 @@
"""
This is a troubleshooting script that assists finding out which DLLs or
-which symbols in a DLL are missing when executing a PySide2 python
+which symbols in a DLL are missing when executing a PySide6 python
script.
It can also be used with any other non Python executable.
Usage: python debug_windows.py
When no arguments are given the script will try to import
- PySide2.QtCore.
+ PySide6.QtCore.
-Usage: python debug_windows.py python -c "import PySide2.QtWebEngine"
+Usage: python debug_windows.py python -c "import PySide6.QtWebEngine"
python debug_windows.py my_executable.exe arg1 arg2 --arg3=4
Any arguments given after the script name will be considered
as the target executable and the arguments passed to that
@@ -338,8 +338,8 @@ def test_run_import_qt_core_under_cdb_with_gflags():
# The 2+2 is just ensure that Python itself works.
python_code = """
print(">>>>>>>>>>>>>>>>>>>>>>> Test computation of 2+2 is: {}".format(2+2))
-import PySide2.QtCore
-print(">>>>>>>>>>>>>>>>>>>>>>> QtCore object instance: {}".format(PySide2.QtCore))
+import PySide6.QtCore
+print(">>>>>>>>>>>>>>>>>>>>>>> QtCore object instance: {}".format(PySide6.QtCore))
"""
call_command_under_cdb_with_gflags(sys.executable, ["-c", python_code])
diff --git a/tools/dump_metaobject.py b/tools/dump_metaobject.py
index 873d90e65..96acc189c 100644
--- a/tools/dump_metaobject.py
+++ b/tools/dump_metaobject.py
@@ -39,7 +39,7 @@
"""Helper functions for formatting information on QMetaObject"""
-from PySide2.QtCore import (QMetaClassInfo, QMetaEnum, QMetaMethod,
+from PySide6.QtCore import (QMetaClassInfo, QMetaEnum, QMetaMethod,
QMetaProperty, QMetaObject, QObject)
diff --git a/tools/metaobject_dump.py b/tools/metaobject_dump.py
index 6c7a9f7df..db61ccc4b 100644
--- a/tools/metaobject_dump.py
+++ b/tools/metaobject_dump.py
@@ -41,7 +41,7 @@ import sys
from dump_metaobject import dump_metaobject
# Import all widget classes to enable instantiating them by type name
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
DESC = """
diff --git a/tools/missing_bindings-requirements.txt b/tools/missing_bindings-requirements.txt
index 4ddb60aa8..bbe8e7ac2 100644
--- a/tools/missing_bindings-requirements.txt
+++ b/tools/missing_bindings-requirements.txt
@@ -1,4 +1,4 @@
-pyside2
+pyside6
pyqt5
beautifulsoup4
pyqt3d
diff --git a/tools/missing_bindings.py b/tools/missing_bindings.py
index 33a296832..8e5960029 100644
--- a/tools/missing_bindings.py
+++ b/tools/missing_bindings.py
@@ -38,14 +38,14 @@
#############################################################################
# This script is used to generate a summary of missing types / classes
-# which are present in C++ Qt5, but are missing in PySide2.
+# which are present in C++ Qt5, but are missing in PySide6.
#
# Required packages: bs4
# Installed via: pip install bs4
#
# The script uses beautiful soup 4 to parse out the class names from
# the online Qt documentation. It then tries to import the types from
-# PySide2.
+# PySide6.
#
# Example invocation of script:
# python missing_bindings.py --qt-version 5.9 -w all
@@ -272,7 +272,7 @@ if hasattr(args, "module") and args.module != 'all':
modules_to_test.clear()
modules_to_test[args.module] = saved_value
-pyside_package_name = "PySide2"
+pyside_package_name = "PySide6"
pyqt_package_name = "PyQt5"
total_missing_types_count = 0
@@ -315,13 +315,13 @@ def log(*pargs, **kw):
print(computed_str, file=wiki_file)
-log('PySide2 bindings for Qt {}'.format(args.version), style='heading1')
+log('PySide6 bindings for Qt {}'.format(args.version), style='heading1')
log("""Using Qt version {} documentation to find public API Qt types and test
-if the types are present in the PySide2 package.""".format(args.version))
+if the types are present in the PySide6 package.""".format(args.version))
log("""Results are usually stored at
-https://wiki.qt.io/PySide2_Missing_Bindings
+https://wiki.qt.io/PySide6_Missing_Bindings
so consider taking the contents of the generated
missing_bindings_for_wiki_qt_io.txt file and updating the linked wiki page.""",
style='end')
diff --git a/tools/qtpy2cpp_lib/formatter.py b/tools/qtpy2cpp_lib/formatter.py
index 81a920bbc..a1e8c69db 100644
--- a/tools/qtpy2cpp_lib/formatter.py
+++ b/tools/qtpy2cpp_lib/formatter.py
@@ -184,8 +184,8 @@ def write_import(file, i_node):
def write_import_from(file, i_node):
"""Print an import from Qt classes as #include sequence"""
- # "from PySide2.QtGui import QGuiApplication" or
- # "from PySide2 import QtGui"
+ # "from PySide6.QtGui import QGuiApplication" or
+ # "from PySide6 import QtGui"
mod = i_node.module
if not mod.startswith('PySide') and not mod.startswith('PyQt'):
return
diff --git a/tools/qtpy2cpp_lib/test_baseline/uic.py b/tools/qtpy2cpp_lib/test_baseline/uic.py
index fe97c7825..73e3ca540 100644
--- a/tools/qtpy2cpp_lib/test_baseline/uic.py
+++ b/tools/qtpy2cpp_lib/test_baseline/uic.py
@@ -27,12 +27,12 @@
##
#############################################################################
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_ImageDialog(object):
def setupUi(self, dialog):