aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--build_scripts/config.py2
-rw-r--r--build_scripts/main.py2
-rw-r--r--build_scripts/platforms/macos.py2
-rw-r--r--build_scripts/platforms/unix.py2
-rw-r--r--build_scripts/platforms/windows_desktop.py3
-rw-r--r--dependencies.yaml7
-rw-r--r--examples/axcontainer/axviewer.py3
-rw-r--r--examples/corelib/tools/codecs/codecs.py253
-rw-r--r--examples/corelib/tools/settingseditor/settingseditor.py16
-rw-r--r--examples/external/matplotlib/widget_3dplot.py4
-rw-r--r--examples/external/opencv/webcam_pattern_detection.py4
-rw-r--r--examples/external/scikit/staining_colors_separation.py4
-rw-r--r--examples/multimedia/camera.py4
-rw-r--r--examples/multimedia/player.py6
-rw-r--r--examples/opengl/grabber.py12
-rw-r--r--examples/scriptableapplication/mainwindow.cpp2
-rw-r--r--examples/webenginewidgets/tabbedbrowser/main.py4
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.py18
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.py3
-rw-r--r--examples/widgets/mainwindows/application/application.py20
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.py6
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.py4
-rw-r--r--examples/widgets/systray/window.py4
-rw-r--r--examples/xml/dombookmarks/dombookmarks.py10
-rw-r--r--sources/cmake_helpers/helpers.cmake9
-rw-r--r--sources/pyside2/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt2
-rw-r--r--sources/pyside2/PySide2/QtCore/CMakeLists.txt53
-rw-r--r--sources/pyside2/PySide2/QtCore/typesystem_core_common.xml197
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt55
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml313
-rw-r--r--sources/pyside2/PySide2/QtNetwork/CMakeLists.txt3
-rw-r--r--sources/pyside2/PySide2/QtNetwork/typesystem_network.xml20
-rw-r--r--sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp38
-rw-r--r--sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h8
-rw-r--r--sources/pyside2/PySide2/QtQml/typesystem_qml.xml20
-rw-r--r--sources/pyside2/PySide2/QtQuick/CMakeLists.txt11
-rw-r--r--sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp74
-rw-r--r--sources/pyside2/PySide2/QtQuick/typesystem_quick.xml7
-rw-r--r--sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in2
-rw-r--r--sources/pyside2/PySide2/QtTest/typesystem_test.xml10
-rw-r--r--sources/pyside2/PySide2/QtWebKit/CMakeLists.txt34
-rw-r--r--sources/pyside2/PySide2/QtWebKit/typesystem_webkit.xml49
-rw-r--r--sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt65
-rw-r--r--sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml211
-rw-r--r--sources/pyside2/PySide2/QtWidgets/CMakeLists.txt9
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml149
-rw-r--r--sources/pyside2/PySide2/glue/qtcore.cpp16
-rw-r--r--sources/pyside2/PySide2/glue/qtgui.cpp2
-rw-r--r--sources/pyside2/PySide2/pysideqtesttouch.h14
-rw-r--r--sources/pyside2/PySide2/templates/core_common.xml4
-rw-r--r--sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h3
-rw-r--r--sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp60
-rw-r--r--sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebview_snippet.cpp80
-rw-r--r--sources/pyside2/doc/codesnippets/webkitsnippets/simple/main.cpp63
-rw-r--r--sources/pyside2/doc/codesnippets/webkitsnippets/webelement/main.cpp114
-rw-r--r--sources/pyside2/doc/codesnippets/webkitsnippets/webpage/main.cpp83
-rw-r--r--sources/pyside2/doc/extras/QtWebKit.rst94
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py4
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py4
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py4
-rw-r--r--sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py4
-rw-r--r--sources/pyside2/doc/tutorials/expenses/main.py4
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py3
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py4
-rw-r--r--sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py4
-rw-r--r--sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py3
-rw-r--r--sources/pyside2/plugins/CMakeLists.txt6
-rw-r--r--sources/pyside2/tests/QtCore/CMakeLists.txt2
-rw-r--r--sources/pyside2/tests/QtCore/qobject_parent_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qregexp_test.py55
-rw-r--r--sources/pyside2/tests/QtCore/qtext_codec_test.py54
-rw-r--r--sources/pyside2/tests/QtCore/qtextstream_test.py11
-rw-r--r--sources/pyside2/tests/QtCore/qurlquery_test.py2
-rw-r--r--sources/pyside2/tests/QtGui/CMakeLists.txt3
-rw-r--r--sources/pyside2/tests/QtGui/deepcopy_test.py7
-rw-r--r--sources/pyside2/tests/QtGui/qmatrix_test.py106
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocument_functions.py3
-rw-r--r--sources/pyside2/tests/QtGui/repr_test.py7
-rw-r--r--sources/pyside2/tests/QtNetwork/bug_446.py2
-rw-r--r--sources/pyside2/tests/QtOpenGL/CMakeLists.txt2
-rw-r--r--sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py (renamed from sources/pyside2/tests/QtGui/qopenglbuffer_test.py)0
-rw-r--r--sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py6
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_392.py2
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_426.py2
-rw-r--r--sources/pyside2/tests/QtWebKit/CMakeLists.txt11
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_448.py52
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_694.py84
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_803.py53
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_899.py71
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_959.py133
-rw-r--r--sources/pyside2/tests/QtWebKit/fox.html7
-rw-r--r--sources/pyside2/tests/QtWebKit/qml_plugin_test.py92
-rw-r--r--sources/pyside2/tests/QtWebKit/qmlplugin/dummy.pys1
-rw-r--r--sources/pyside2/tests/QtWebKit/qmlplugin/index.html5
-rw-r--r--sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py78
-rw-r--r--sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py63
-rw-r--r--sources/pyside2/tests/QtWebKit/webframe_test.py67
-rw-r--r--sources/pyside2/tests/QtWebKit/webpage_test.py95
-rw-r--r--sources/pyside2/tests/QtWebKit/webview_test.py101
-rw-r--r--sources/pyside2/tests/QtWebKitWidgets/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtWidgets/CMakeLists.txt2
-rw-r--r--sources/pyside2/tests/QtWidgets/add_action_test.py3
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_363.py59
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_632.py54
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_711.py3
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_860.py2
-rw-r--r--sources/pyside2/tests/QtWidgets/qaction_test.py3
-rw-r--r--sources/pyside2/tests/QtWidgets/qshortcut_test.py22
-rw-r--r--sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtoolbar_test.py3
-rw-r--r--sources/pyside2/tests/QtXml/qdomdocument_test.py2
-rw-r--r--sources/pyside2/tests/pysidetest/CMakeLists.txt12
-rw-r--r--sources/pyside2/tests/pysidetest/new_inherited_functions_test.py6
-rwxr-xr-xsources/pyside2/tests/tools/list-class-hierarchy.py1
-rw-r--r--sources/pyside2/tests/util/module_wrapper/PySide/QtWebKit.py2
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp121
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.cpp12
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.h3
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp37
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangparser.h10
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp6
-rw-r--r--sources/shiboken2/CMakeLists.txt2
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp6
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py4
132 files changed, 510 insertions, 3380 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 595489dfa..d8a43604d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,4 +20,3 @@ add_subdirectory(sources/pyside2)
# Semi-hack to include exported pyside2 variables.
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside2/libpyside")
-add_subdirectory(sources/pyside2-tools)
diff --git a/build_scripts/config.py b/build_scripts/config.py
index 4ec2af3de..ae09ed8a3 100644
--- a/build_scripts/config.py
+++ b/build_scripts/config.py
@@ -331,7 +331,7 @@ class Config(object):
if self.is_internal_shiboken_module_build() or self.is_internal_shiboken_generator_build():
return ['shiboken2']
elif self.is_internal_pyside_build():
- return ['pyside2', 'pyside2-tools']
+ return ['pyside2']
return None
def set_is_top_level_invocation(self):
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 99cc02185..a771e2d32 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -1015,7 +1015,7 @@ class PysideBuild(_build):
timestamp = get_package_timestamp()
cmake_cmd.append("-DPACKAGE_SETUP_PY_PACKAGE_TIMESTAMP={}".format(timestamp))
- if extension.lower() in ["shiboken2", "pyside2-tools"]:
+ if extension.lower() in ["shiboken2"]:
cmake_cmd.append("-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes")
if sys.version_info[0] > 2:
cmake_cmd.append("-DUSE_PYTHON_VERSION=3.3")
diff --git a/build_scripts/platforms/macos.py b/build_scripts/platforms/macos.py
index 7932db337..614d6acbc 100644
--- a/build_scripts/platforms/macos.py
+++ b/build_scripts/platforms/macos.py
@@ -140,8 +140,6 @@ def prepare_standalone_package_macos(self, vars):
ignored_modules = []
if not self.is_webengine_built(built_modules):
ignored_modules.extend(['libQt5WebEngine*.dylib'])
- if 'WebKit' not in built_modules:
- ignored_modules.extend(['libQt5WebKit*.dylib'])
accepted_modules = ['libQt5*.5.dylib']
if constrain_modules:
accepted_modules = ["libQt5" + module + "*.5.dylib" for module in constrain_modules]
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index b842510ff..754cdc961 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -204,7 +204,7 @@ def prepare_packages_posix(self, vars):
# compatibility
if sys.version_info[0] == 3:
examples_path = "{st_build_dir}/{st_package_name}/examples".format(**vars)
- pyside_rcc_path = "{install_dir}/bin/rcc".format(**vars)
+ pyside_rcc_path = "rcc"
pyside_rcc_options = ['-g', 'python']
regenerate_qt_resources(examples_path, pyside_rcc_path, pyside_rcc_options)
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index 49c384bc7..f8a776b87 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -220,8 +220,7 @@ def prepare_packages_win32(self, vars):
if sys.version_info[0] == 3:
examples_path = "{st_build_dir}/{st_package_name}/examples".format(
**vars)
- pyside_rcc_path = "{install_dir}/bin/rcc.exe".format(
- **vars)
+ pyside_rcc_path = "rcc.exe"
pyside_rcc_options = ['-g', 'python']
regenerate_qt_resources(examples_path, pyside_rcc_path, pyside_rcc_options)
diff --git a/dependencies.yaml b/dependencies.yaml
new file mode 100644
index 000000000..4ce8ce9af
--- /dev/null
+++ b/dependencies.yaml
@@ -0,0 +1,7 @@
+dependencies:
+ ../../qt/qtbase:
+ ref: 843b40328610c5e61bd7cada03c2046ece788b02
+ required: true
+ ../../qt/qtdeclarative:
+ ref: bdf70ab049f5e7a74d760c30de72c074b83792fb
+ required: true
diff --git a/examples/axcontainer/axviewer.py b/examples/axcontainer/axviewer.py
index e9083d8f4..50e50ee1c 100644
--- a/examples/axcontainer/axviewer.py
+++ b/examples/axcontainer/axviewer.py
@@ -43,7 +43,8 @@
import sys
from PySide2.QtAxContainer import QAxSelect, QAxWidget
-from PySide2.QtWidgets import (QAction, QApplication, QDialog,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QDialog,
QMainWindow, QMessageBox, QToolBar)
class MainWindow(QMainWindow):
diff --git a/examples/corelib/tools/codecs/codecs.py b/examples/corelib/tools/codecs/codecs.py
deleted file mode 100644
index 63e74a60b..000000000
--- a/examples/corelib/tools/codecs/codecs.py
+++ /dev/null
@@ -1,253 +0,0 @@
-
-#############################################################################
-##
-## Copyright (C) 2013 Riverbank Computing Limited.
-## Copyright (C) 2016 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$
-##
-#############################################################################
-
-"""PySide2 port of the widgets/tools/codecs example from Qt v5.x"""
-
-from PySide2 import QtCore, QtWidgets
-
-
-def codec_name(codec):
- try:
- # Python v3.
- name = str(codec.name(), encoding='ascii')
- except TypeError:
- # Python v2.
- name = str(codec.name())
-
- return name
-
-
-class MainWindow(QtWidgets.QMainWindow):
- def __init__(self):
- super(MainWindow, self).__init__()
-
- self.textEdit = QtWidgets.QTextEdit()
- self.textEdit.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
- self.setCentralWidget(self.textEdit)
-
- self.codecs = []
- self.findCodecs()
-
- self.previewForm = PreviewForm(self)
- self.previewForm.setCodecList(self.codecs)
-
- self.saveAsActs = []
- self.createActions()
- self.createMenus()
-
- self.setWindowTitle("Codecs")
- self.resize(500, 400)
-
- def open(self):
- fileName, _ = QtWidgets.QFileDialog.getOpenFileName(self)
- if fileName:
- inFile = QtCore.QFile(fileName)
- if not inFile.open(QtCore.QFile.ReadOnly):
- QtWidgets.QMessageBox.warning(self, "Codecs",
- "Cannot read file %s:\n%s" % (fileName, inFile.errorString()))
- return
-
- data = inFile.readAll()
-
- self.previewForm.setEncodedData(data)
- if self.previewForm.exec_():
- self.textEdit.setPlainText(self.previewForm.decodedString())
-
- def save(self):
- fileName = QtWidgets.QFileDialog.getSaveFileName(self)
- if fileName:
- outFile = QtCore.QFile(fileName)
- if not outFile.open(QtCore.QFile.WriteOnly|QtCore.QFile.Text):
- QtWidgets.QMessageBox.warning(self, "Codecs",
- "Cannot write file %s:\n%s" % (fileName, outFile.errorString()))
- return
-
- action = self.sender()
- codecName = action.data()
-
- out = QtCore.QTextStream(outFile)
- out.setCodec(codecName)
- out << self.textEdit.toPlainText()
-
- def about(self):
- QtWidgets.QMessageBox.about(self, "About Codecs",
- "The <b>Codecs</b> example demonstrates how to read and "
- "write files using various encodings.")
-
- def aboutToShowSaveAsMenu(self):
- currentText = self.textEdit.toPlainText()
-
- for action in self.saveAsActs:
- codecName = str(action.data())
- codec = QtCore.QTextCodec.codecForName(codecName)
- action.setVisible(codec and codec.canEncode(currentText))
-
- def findCodecs(self):
- codecMap = []
- iso8859RegExp = QtCore.QRegularExpression('^ISO[- ]8859-([0-9]+).*$')
- assert iso8859RegExp.isValid()
-
- for mib in QtCore.QTextCodec.availableMibs():
- codec = QtCore.QTextCodec.codecForMib(mib)
- sortKey = codec_name(codec).upper()
- rank = 0
-
- if sortKey.startswith('UTF-8'):
- rank = 1
- elif sortKey.startswith('UTF-16'):
- rank = 2
- else:
- match = iso8859RegExp.match(sortKey)
- if match.hasMatch():
- if len(match.captured(1)) == 1:
- rank = 3
- else:
- rank = 4
- else:
- rank = 5
-
- codecMap.append((str(rank) + sortKey, codec))
-
- codecMap.sort()
- self.codecs = [item[-1] for item in codecMap]
-
- def createActions(self):
- self.openAct = QtWidgets.QAction("&Open...", self, shortcut="Ctrl+O",
- triggered=self.open)
-
- for codec in self.codecs:
- name = codec_name(codec)
-
- action = QtWidgets.QAction(name + '...', self, triggered=self.save)
- action.setData(name)
- self.saveAsActs.append(action)
-
- self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
- triggered=self.close)
-
- self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
-
- self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
- triggered=qApp.aboutQt)
-
- def createMenus(self):
- self.saveAsMenu = QtWidgets.QMenu("&Save As", self)
- for action in self.saveAsActs:
- self.saveAsMenu.addAction(action)
-
- self.saveAsMenu.aboutToShow.connect(self.aboutToShowSaveAsMenu)
-
- self.fileMenu = QtWidgets.QMenu("&File", self)
- self.fileMenu.addAction(self.openAct)
- self.fileMenu.addMenu(self.saveAsMenu)
- self.fileMenu.addSeparator()
- self.fileMenu.addAction(self.exitAct)
-
- self.helpMenu = QtWidgets.QMenu("&Help", self)
- self.helpMenu.addAction(self.aboutAct)
- self.helpMenu.addAction(self.aboutQtAct)
-
- self.menuBar().addMenu(self.fileMenu)
- self.menuBar().addSeparator()
- self.menuBar().addMenu(self.helpMenu)
-
-
-class PreviewForm(QtWidgets.QDialog):
- def __init__(self, parent):
- super(PreviewForm, self).__init__(parent)
-
- self.encodingComboBox = QtWidgets.QComboBox()
- encodingLabel = QtWidgets.QLabel("&Encoding:")
- encodingLabel.setBuddy(self.encodingComboBox)
-
- self.textEdit = QtWidgets.QTextEdit()
- self.textEdit.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
- self.textEdit.setReadOnly(True)
-
- buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
-
- self.encodingComboBox.activated.connect(self.updateTextEdit)
- buttonBox.accepted.connect(self.accept)
- buttonBox.rejected.connect(self.reject)
-
- mainLayout = QtWidgets.QGridLayout()
- mainLayout.addWidget(encodingLabel, 0, 0)
- mainLayout.addWidget(self.encodingComboBox, 0, 1)
- mainLayout.addWidget(self.textEdit, 1, 0, 1, 2)
- mainLayout.addWidget(buttonBox, 2, 0, 1, 2)
- self.setLayout(mainLayout)
-
- self.setWindowTitle("Choose Encoding")
- self.resize(400, 300)
-
- def setCodecList(self, codecs):
- self.encodingComboBox.clear()
- for codec in codecs:
- self.encodingComboBox.addItem(codec_name(codec), codec.mibEnum())
-
- def setEncodedData(self, data):
- self.encodedData = data
- self.updateTextEdit()
-
- def decodedString(self):
- return self.decodedStr
-
- def updateTextEdit(self):
- mib = self.encodingComboBox.itemData(self.encodingComboBox.currentIndex())
- codec = QtCore.QTextCodec.codecForMib(mib)
-
- data = QtCore.QTextStream(self.encodedData)
- data.setAutoDetectUnicode(False)
- data.setCodec(codec)
-
- self.decodedStr = data.readAll()
- self.textEdit.setPlainText(self.decodedStr)
-
-
-if __name__ == '__main__':
-
- import sys
-
- app = QtWidgets.QApplication(sys.argv)
- mainWin = MainWindow()
- mainWin.show()
- sys.exit(app.exec_())
diff --git a/examples/corelib/tools/settingseditor/settingseditor.py b/examples/corelib/tools/settingseditor/settingseditor.py
index a3e50a7c9..121d7cb0e 100644
--- a/examples/corelib/tools/settingseditor/settingseditor.py
+++ b/examples/corelib/tools/settingseditor/settingseditor.py
@@ -47,9 +47,9 @@ import sys
from PySide2.QtCore import (QByteArray, QDate, QDateTime, QDir, QEvent, QPoint,
QRect, QRegularExpression, QSettings, QSize, QTime, QTimer, Qt)
-from PySide2.QtGui import (QColor, QIcon, QIntValidator, QDoubleValidator,
- QRegularExpressionValidator, QValidator)
-from PySide2.QtWidgets import (QAbstractItemView, QAction, QApplication,
+from PySide2.QtGui import (QAction, QColor, QIcon, QIntValidator,
+ QDoubleValidator, QRegularExpressionValidator, QValidator)
+from PySide2.QtWidgets import (QAbstractItemView, QApplication,
QCheckBox, QComboBox, QFileDialog, QDialog, QDialogButtonBox, QGridLayout,
QGroupBox, QHeaderView, QInputDialog, QItemDelegate, QLabel, QLineEdit,
QMainWindow, QMessageBox, QStyle, QSpinBox, QStyleOptionViewItem,
@@ -233,6 +233,16 @@ class MainWindow(QMainWindow):
"The <b>Settings Editor</b> example shows how to access "
"application settings using Qt.")
+ def createActions(self):
+ self.openSettingsAct = QtGui.QAction("&Open Application Settings...",
+ self, shortcut="Ctrl+O", triggered=self.openSettings)
+
+ self.openIniFileAct = QtGui.QAction("Open I&NI File...", self,
+ shortcut="Ctrl+N", triggered=self.openIniFile)
+
+ self.openPropertyListAct = QtGui.QAction("Open macOS &Property List...",
+ self, shortcut="Ctrl+P", triggered=self.openPropertyList)
+
def create_actions(self):
self.open_settings_action = QAction("&Open Application Settings...",
self, shortcut="Ctrl+O", triggered=self.open_settings)
diff --git a/examples/external/matplotlib/widget_3dplot.py b/examples/external/matplotlib/widget_3dplot.py
index b96405661..6f47da31b 100644
--- a/examples/external/matplotlib/widget_3dplot.py
+++ b/examples/external/matplotlib/widget_3dplot.py
@@ -45,8 +45,8 @@ 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 QKeySequence
-from PySide2.QtWidgets import (QAction, QApplication, QComboBox, QHBoxLayout,
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.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 553261615..664ba2111 100644
--- a/examples/external/opencv/webcam_pattern_detection.py
+++ b/examples/external/opencv/webcam_pattern_detection.py
@@ -44,8 +44,8 @@ import time
import cv2
from PySide2.QtCore import Qt, QThread, Signal, Slot
-from PySide2.QtGui import QImage, QKeySequence, QPixmap
-from PySide2.QtWidgets import (QAction, QApplication, QComboBox, QGroupBox,
+from PySide2.QtGui import QAction, QImage, QKeySequence, QPixmap
+from PySide2.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 051b2bc25..d21453927 100644
--- a/examples/external/scikit/staining_colors_separation.py
+++ b/examples/external/scikit/staining_colors_separation.py
@@ -45,8 +45,8 @@ 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 QKeySequence
-from PySide2.QtWidgets import (QAction, QApplication, QHBoxLayout, QLabel,
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSizePolicy,
QVBoxLayout, QWidget)
from skimage import data
diff --git a/examples/multimedia/camera.py b/examples/multimedia/camera.py
index d58b526d9..644b5340c 100644
--- a/examples/multimedia/camera.py
+++ b/examples/multimedia/camera.py
@@ -43,9 +43,9 @@
import os, sys
from PySide2.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QGuiApplication, QDesktopServices, QIcon
+from PySide2.QtGui import QAction, QGuiApplication, QDesktopServices, QIcon
from PySide2.QtGui import QImage, QPixmap
-from PySide2.QtWidgets import (QAction, QApplication, QHBoxLayout, QLabel,
+from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QTabWidget, QToolBar, QVBoxLayout, QWidget)
from PySide2.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
from PySide2.QtMultimediaWidgets import QCameraViewfinder
diff --git a/examples/multimedia/player.py b/examples/multimedia/player.py
index cb70e50d6..762d26b7e 100644
--- a/examples/multimedia/player.py
+++ b/examples/multimedia/player.py
@@ -43,8 +43,8 @@
import sys
from PySide2.QtCore import QStandardPaths, Qt
-from PySide2.QtGui import QIcon, QKeySequence
-from PySide2.QtWidgets import (QAction, QApplication, QDialog, QFileDialog,
+from PySide2.QtGui import QAction, QIcon, QKeySequence
+from PySide2.QtWidgets import (QApplication, QDialog, QFileDialog,
QMainWindow, QSlider, QStyle, QToolBar)
from PySide2.QtMultimedia import QMediaPlayer, QMediaPlaylist
from PySide2.QtMultimediaWidgets import QVideoWidget
@@ -137,7 +137,7 @@ class MainWindow(QMainWindow):
if self.player.position() <= 5000:
self.playlist.previous()
else:
- player.setPosition(0)
+ self.player.setPosition(0)
def updateButtons(self, state):
mediaCount = self.playlist.mediaCount()
diff --git a/examples/opengl/grabber.py b/examples/opengl/grabber.py
index 4c8f9a0d2..04a16fcbc 100644
--- a/examples/opengl/grabber.py
+++ b/examples/opengl/grabber.py
@@ -355,21 +355,21 @@ class MainWindow(QtWidgets.QMainWindow):
"rendering OpenGL into a Qt pixmap.")
def createActions(self):
- self.renderIntoPixmapAct = QtWidgets.QAction("&Render into Pixmap...",
+ self.renderIntoPixmapAct = QtGui.QAction("&Render into Pixmap...",
self, shortcut="Ctrl+R", triggered=self.renderIntoPixmap)
- self.grabFrameBufferAct = QtWidgets.QAction("&Grab Frame Buffer", self,
+ self.grabFrameBufferAct = QtGui.QAction("&Grab Frame Buffer", self,
shortcut="Ctrl+G", triggered=self.grabFrameBuffer)
- self.clearPixmapAct = QtWidgets.QAction("&Clear Pixmap", self,
+ self.clearPixmapAct = QtGui.QAction("&Clear Pixmap", self,
shortcut="Ctrl+L", triggered=self.clearPixmap)
- self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
triggered=self.close)
- self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
+ self.aboutAct = QtGui.QAction("&About", self, triggered=self.about)
- self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ self.aboutQtAct = QtGui.QAction("About &Qt", self,
triggered=qApp.aboutQt)
def createMenus(self):
diff --git a/examples/scriptableapplication/mainwindow.cpp b/examples/scriptableapplication/mainwindow.cpp
index ef4a2f2e0..0811990de 100644
--- a/examples/scriptableapplication/mainwindow.cpp
+++ b/examples/scriptableapplication/mainwindow.cpp
@@ -51,7 +51,7 @@
#include "mainwindow.h"
#include "pythonutils.h"
-#include <QtWidgets/QAction>
+#include <QtGui.QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py
index 438dd5c9d..086946bac 100644
--- a/examples/webenginewidgets/tabbedbrowser/main.py
+++ b/examples/webenginewidgets/tabbedbrowser/main.py
@@ -49,8 +49,8 @@ from findtoolbar import FindToolBar
from webengineview import WebEngineView
from PySide2 import QtCore
from PySide2.QtCore import Qt, QUrl
-from PySide2.QtGui import QKeySequence, QIcon
-from PySide2.QtWidgets import (QAction, QApplication, QDockWidget, QLabel,
+from PySide2.QtGui import QAction, QKeySequence, QIcon
+from PySide2.QtWidgets import (QApplication, QDockWidget, QLabel,
QLineEdit, QMainWindow, QToolBar)
from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.py b/examples/widgets/graphicsview/diagramscene/diagramscene.py
index 3890782c4..048681bdb 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.py
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.py
@@ -607,38 +607,38 @@ class MainWindow(QtWidgets.QMainWindow):
self.toolBox.addItem(backgroundWidget, "Backgrounds")
def createActions(self):
- self.toFrontAction = QtWidgets.QAction(
+ self.toFrontAction = QtGui.QAction(
QtGui.QIcon(':/images/bringtofront.png'), "Bring to &Front",
self, shortcut="Ctrl+F", statusTip="Bring item to front",
triggered=self.bringToFront)
- self.sendBackAction = QtWidgets.QAction(
+ self.sendBackAction = QtGui.QAction(
QtGui.QIcon(':/images/sendtoback.png'), "Send to &Back", self,
shortcut="Ctrl+B", statusTip="Send item to back",
triggered=self.sendToBack)
- self.deleteAction = QtWidgets.QAction(QtGui.QIcon(':/images/delete.png'),
+ self.deleteAction = QtGui.QAction(QtGui.QIcon(':/images/delete.png'),
"&Delete", self, shortcut="Delete",
statusTip="Delete item from diagram",
triggered=self.deleteItem)
- self.exitAction = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+X",
+ self.exitAction = QtGui.QAction("E&xit", self, shortcut="Ctrl+X",
statusTip="Quit Scenediagram example", triggered=self.close)
- self.boldAction = QtWidgets.QAction(QtGui.QIcon(':/images/bold.png'),
+ self.boldAction = QtGui.QAction(QtGui.QIcon(':/images/bold.png'),
"Bold", self, checkable=True, shortcut="Ctrl+B",
triggered=self.handleFontChange)
- self.italicAction = QtWidgets.QAction(QtGui.QIcon(':/images/italic.png'),
+ self.italicAction = QtGui.QAction(QtGui.QIcon(':/images/italic.png'),
"Italic", self, checkable=True, shortcut="Ctrl+I",
triggered=self.handleFontChange)
- self.underlineAction = QtWidgets.QAction(
+ self.underlineAction = QtGui.QAction(
QtGui.QIcon(':/images/underline.png'), "Underline", self,
checkable=True, shortcut="Ctrl+U",
triggered=self.handleFontChange)
- self.aboutAction = QtWidgets.QAction("A&bout", self, shortcut="Ctrl+B",
+ self.aboutAction = QtGui.QAction("A&bout", self, shortcut="Ctrl+B",
triggered=self.about)
def createMenus(self):
@@ -780,7 +780,7 @@ class MainWindow(QtWidgets.QMainWindow):
colorMenu = QtWidgets.QMenu(self)
for color, name in zip(colors, names):
- action = QtWidgets.QAction(self.createColorIcon(color), name, self,
+ action = QtGui.QAction(self.createColorIcon(color), name, self,
triggered=slot)
action.setData(QtGui.QColor(color))
colorMenu.addAction(action)
diff --git a/examples/widgets/itemviews/addressbook/addressbook.py b/examples/widgets/itemviews/addressbook/addressbook.py
index 262027a64..35d095287 100644
--- a/examples/widgets/itemviews/addressbook/addressbook.py
+++ b/examples/widgets/itemviews/addressbook/addressbook.py
@@ -40,7 +40,8 @@
##
#############################################################################
-from PySide2.QtWidgets import (QMainWindow, QAction, QFileDialog, QApplication)
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QMainWindow, QFileDialog, QApplication)
from addresswidget import AddressWidget
diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py
index 8c4626f9b..d68e77b41 100644
--- a/examples/widgets/mainwindows/application/application.py
+++ b/examples/widgets/mainwindows/application/application.py
@@ -106,46 +106,46 @@ class MainWindow(QtWidgets.QMainWindow):
self.setWindowModified(self.textEdit.document().isModified())
def createActions(self):
- self.newAct = QtWidgets.QAction(QtGui.QIcon(':/images/new.png'), "&New",
+ self.newAct = QtGui.QAction(QtGui.QIcon(':/images/new.png'), "&New",
self, shortcut=QtGui.QKeySequence.New,
statusTip="Create a new file", triggered=self.newFile)
- self.openAct = QtWidgets.QAction(QtGui.QIcon(':/images/open.png'),
+ self.openAct = QtGui.QAction(QtGui.QIcon(':/images/open.png'),
"&Open...", self, shortcut=QtGui.QKeySequence.Open,
statusTip="Open an existing file", triggered=self.open)
- self.saveAct = QtWidgets.QAction(QtGui.QIcon(':/images/save.png'),
+ self.saveAct = QtGui.QAction(QtGui.QIcon(':/images/save.png'),
"&Save", self, shortcut=QtGui.QKeySequence.Save,
statusTip="Save the document to disk", triggered=self.save)
- self.saveAsAct = QtWidgets.QAction("Save &As...", self,
+ self.saveAsAct = QtGui.QAction("Save &As...", self,
shortcut=QtGui.QKeySequence.SaveAs,
statusTip="Save the document under a new name",
triggered=self.saveAs)
- self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
statusTip="Exit the application", triggered=self.close)
- self.cutAct = QtWidgets.QAction(QtGui.QIcon(':/images/cut.png'), "Cu&t",
+ self.cutAct = QtGui.QAction(QtGui.QIcon(':/images/cut.png'), "Cu&t",
self, shortcut=QtGui.QKeySequence.Cut,
statusTip="Cut the current selection's contents to the clipboard",
triggered=self.textEdit.cut)
- self.copyAct = QtWidgets.QAction(QtGui.QIcon(':/images/copy.png'),
+ self.copyAct = QtGui.QAction(QtGui.QIcon(':/images/copy.png'),
"&Copy", self, shortcut=QtGui.QKeySequence.Copy,
statusTip="Copy the current selection's contents to the clipboard",
triggered=self.textEdit.copy)
- self.pasteAct = QtWidgets.QAction(QtGui.QIcon(':/images/paste.png'),
+ self.pasteAct = QtGui.QAction(QtGui.QIcon(':/images/paste.png'),
"&Paste", self, shortcut=QtGui.QKeySequence.Paste,
statusTip="Paste the clipboard's contents into the current selection",
triggered=self.textEdit.paste)
- self.aboutAct = QtWidgets.QAction("&About", self,
+ self.aboutAct = QtGui.QAction("&About", self,
statusTip="Show the application's About box",
triggered=self.about)
- self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ self.aboutQtAct = QtGui.QAction("About &Qt", self,
statusTip="Show the Qt library's About box",
triggered=qApp.aboutQt)
diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
index 53f6f7818..3f8e7dbf7 100644
--- a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
+++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py
@@ -43,10 +43,10 @@
"""PySide2 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 (QFont, QIcon, QKeySequence, QTextCharFormat,
- QTextCursor, QTextTableFormat)
+from PySide2.QtGui import (QAction, QFont, QIcon, QKeySequence,
+ QTextCharFormat, QTextTableFormat)
from PySide2.QtPrintSupport import QPrintDialog, QPrinter
-from PySide2.QtWidgets import (QAction, QApplication, QDialog, QDockWidget,
+from PySide2.QtWidgets import (QApplication, QDialog, QDockWidget,
QFileDialog, QListWidget, QMainWindow, QMessageBox, QTextEdit)
import dockwidgets_rc
diff --git a/examples/widgets/mainwindows/mdi/mdi.py b/examples/widgets/mainwindows/mdi/mdi.py
index 9daca826d..f9d90767e 100644
--- a/examples/widgets/mainwindows/mdi/mdi.py
+++ b/examples/widgets/mainwindows/mdi/mdi.py
@@ -44,8 +44,8 @@
from PySide2.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper,
QSaveFile, QSize, QTextStream, Qt)
-from PySide2.QtGui import QIcon, QKeySequence
-from PySide2.QtWidgets import (QAction, QApplication, QFileDialog, QMainWindow,
+from PySide2.QtGui import QAction, QIcon, QKeySequence
+from PySide2.QtWidgets import (QApplication, QFileDialog, QMainWindow,
QMdiArea, QMessageBox, QTextEdit, QWidget)
import mdi_rc
diff --git a/examples/widgets/systray/window.py b/examples/widgets/systray/window.py
index ca65f04e1..634646327 100644
--- a/examples/widgets/systray/window.py
+++ b/examples/widgets/systray/window.py
@@ -39,8 +39,8 @@
#############################################################################
from PySide2.QtCore import Slot
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import (QAction, QCheckBox, QComboBox, QDialog,
+from PySide2.QtGui import QAction, QIcon
+from PySide2.QtWidgets import (QCheckBox, QComboBox, QDialog,
QGridLayout, QGroupBox, QHBoxLayout, QLabel,
QLineEdit, QMenu, QMessageBox, QPushButton,
QSpinBox, QStyle, QSystemTrayIcon, QTextEdit,
diff --git a/examples/xml/dombookmarks/dombookmarks.py b/examples/xml/dombookmarks/dombookmarks.py
index 20ec09e2d..f645bedce 100644
--- a/examples/xml/dombookmarks/dombookmarks.py
+++ b/examples/xml/dombookmarks/dombookmarks.py
@@ -100,18 +100,18 @@ class MainWindow(QtWidgets.QMainWindow):
"DOM classes to read and write XML documents.")
def createActions(self):
- self.openAct = QtWidgets.QAction("&Open...", self, shortcut="Ctrl+O",
+ self.openAct = QtGui.QAction("&Open...", self, shortcut="Ctrl+O",
triggered=self.open)
- self.saveAsAct = QtWidgets.QAction("&Save As...", self, shortcut="Ctrl+S",
+ self.saveAsAct = QtGui.QAction("&Save As...", self, shortcut="Ctrl+S",
triggered=self.saveAs)
- self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
triggered=self.close)
- self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
+ self.aboutAct = QtGui.QAction("&About", self, triggered=self.about)
- self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ self.aboutQtAct = QtGui.QAction("About &Qt", self,
triggered=qApp.aboutQt)
def createMenus(self):
diff --git a/sources/cmake_helpers/helpers.cmake b/sources/cmake_helpers/helpers.cmake
index fed96b5cd..86b0c4f62 100644
--- a/sources/cmake_helpers/helpers.cmake
+++ b/sources/cmake_helpers/helpers.cmake
@@ -26,7 +26,6 @@ macro(collect_optional_modules)
# Collect all optional modules.
set(ALL_OPTIONAL_MODULES
Xml
- XmlPatterns
Help Multimedia
MultimediaWidgets
OpenGL
@@ -39,8 +38,6 @@ set(ALL_OPTIONAL_MODULES
QuickWidgets
RemoteObjects
Scxml
- Script
- ScriptTools
Sensors
SerialPort
TextToSpeech
@@ -56,9 +53,6 @@ endif()
if(WIN32)
list(APPEND ALL_OPTIONAL_MODULES AxContainer)
endif()
-# Disabling WebKit by default
-# If WebKit support is needed add the following elements
-# to the list: WebKit WebKitWidgets
list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngine WebEngineWidgets WebSockets)
if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.9.3) # Depending on fixes in Qt3D
list(APPEND ALL_OPTIONAL_MODULES 3DCore 3DRender 3DInput 3DLogic 3DAnimation 3DExtras)
@@ -179,8 +173,7 @@ macro(COLLECT_MODULE_IF_FOUND shortname)
get_target_property(Qt6${shortname}_PRIVATE_INCLUDE_DIRS
Qt6::${shortname}Private
INTERFACE_INCLUDE_DIRECTORIES)
- get_target_property(Qt6${shortname}_LIBRARIES Qt6::${shortname}
- INTERFACE_LINK_LIBRARIES)
+ set(Qt6${shortname}_LIBRARIES Qt::${shortname})
endif()
else()
if("${module_state}" STREQUAL "optional")
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index dc2beded0..254139aff 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -6,7 +6,7 @@ cmake_policy(VERSION 3.1)
# Don't ignore targets that do not exist, inside add_dependencies calls.
cmake_policy(SET CMP0046 NEW)
-set (QT_MAJOR_VERSION 5)
+set (QT_MAJOR_VERSION 6)
project(pysidebindings)
@@ -84,7 +84,6 @@ add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
message(STATUS "GL Headers path:" "${GL_H}")
-include(FindQt5Extra)
set(XVFB_EXEC "")
option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping windows on the screen." FALSE)
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 120bc8e52..0ded09f5d 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -100,8 +100,6 @@ 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/webkitwidgets_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
diff --git a/sources/pyside2/PySide2/QtCore/CMakeLists.txt b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
index 20ed65a67..3820d439e 100644
--- a/sources/pyside2/PySide2/QtCore/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtCore/CMakeLists.txt
@@ -26,22 +26,26 @@ ${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}/qchildevent_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}/qcborstringresultstring_wrapper.cpp
-${QtCore_GEN_DIR}/qcborstringresultbytearray_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
@@ -58,9 +62,9 @@ ${QtCore_GEN_DIR}/qeventloop_wrapper.cpp
${QtCore_GEN_DIR}/qeventtransition_wrapper.cpp
${QtCore_GEN_DIR}/qfactoryinterface_wrapper.cpp
${QtCore_GEN_DIR}/qfile_wrapper.cpp
-${QtCore_GEN_DIR}/qfileselector_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}/qfinalstate_wrapper.cpp
${QtCore_GEN_DIR}/qgenericargument_wrapper.cpp
@@ -68,13 +72,13 @@ ${QtCore_GEN_DIR}/qgenericreturnargument_wrapper.cpp
${QtCore_GEN_DIR}/qhistorystate_wrapper.cpp
${QtCore_GEN_DIR}/qidentityproxymodel_wrapper.cpp
${QtCore_GEN_DIR}/qiodevice_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}/qitemselection_wrapper.cpp
-${QtCore_GEN_DIR}/qitemselectionmodel_wrapper.cpp
-${QtCore_GEN_DIR}/qitemselectionrange_wrapper.cpp
${QtCore_GEN_DIR}/qlibraryinfo_wrapper.cpp
${QtCore_GEN_DIR}/qline_wrapper.cpp
${QtCore_GEN_DIR}/qlinef_wrapper.cpp
@@ -107,13 +111,13 @@ ${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}/qrandomgenerator_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}/qregexp_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
@@ -132,8 +136,8 @@ ${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}/qstate_wrapper.cpp
${QtCore_GEN_DIR}/qstandardpaths_wrapper.cpp
+${QtCore_GEN_DIR}/qstate_wrapper.cpp
${QtCore_GEN_DIR}/qstatemachine_signalevent_wrapper.cpp
${QtCore_GEN_DIR}/qstatemachine_wrappedevent_wrapper.cpp
${QtCore_GEN_DIR}/qstatemachine_wrapper.cpp
@@ -145,10 +149,6 @@ ${QtCore_GEN_DIR}/qt_wrapper.cpp
${QtCore_GEN_DIR}/qtemporarydir_wrapper.cpp
${QtCore_GEN_DIR}/qtemporaryfile_wrapper.cpp
${QtCore_GEN_DIR}/qtextboundaryfinder_wrapper.cpp
-${QtCore_GEN_DIR}/qtextcodec_converterstate_wrapper.cpp
-${QtCore_GEN_DIR}/qtextcodec_wrapper.cpp
-${QtCore_GEN_DIR}/qtextdecoder_wrapper.cpp
-${QtCore_GEN_DIR}/qtextencoder_wrapper.cpp
${QtCore_GEN_DIR}/qtextstream_wrapper.cpp
${QtCore_GEN_DIR}/qtextstreammanipulator_wrapper.cpp
${QtCore_GEN_DIR}/qthread_wrapper.cpp
@@ -157,9 +157,10 @@ ${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_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
@@ -176,33 +177,11 @@ ${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
)
-if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_EQUAL 5.13.0
- OR Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.13.0)
- list(APPEND QtCore_SRC
- ${QtCore_GEN_DIR}/qconcatenatetablesproxymodel_wrapper.cpp
- ${QtCore_GEN_DIR}/qtransposeproxymodel_wrapper.cpp)
-endif()
-
-if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_EQUAL 5.14.0
- OR Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.14.0)
- list(APPEND QtCore_SRC
- ${QtCore_GEN_DIR}/qcalendar_wrapper.cpp
- ${QtCore_GEN_DIR}/qcalendar_yearmonthday_wrapper.cpp
- ${QtCore_GEN_DIR}/qrecursivemutex_wrapper.cpp)
-endif()
-
-if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_EQUAL 5.15.0
- OR Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 5.15.0)
- list(APPEND QtCore_SRC
- ${QtCore_GEN_DIR}/qbytearray_frombase64result_wrapper.cpp)
-endif()
-
set(QtCore_glue_sources
"${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.cpp"
"${QtCore_SOURCE_DIR}/glue/qeasingcurve_glue.h"
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
index 1fc0c8d23..b8a78f8de 100644
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
@@ -170,7 +170,6 @@
<enum-type name="QtMsgType"/>
-
<enum-type name="QCborSimpleType" since="5.12"/>
<enum-type name="QCborKnownTags" since="5.12"/>
@@ -189,6 +188,8 @@
<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"/>
@@ -354,7 +355,7 @@
<include file-name="qcborstream.h" location="global"/>
<value-type name="StringResult" generate="no"/>
<!-- 64bit (qsizetype = long long) -->
- <modify-function signature="readStringChunk(char*,long long)" remove="all"/>
+ <modify-function signature="readStringChunk(char*,qsizetype)" remove="all"/>
<!-- 32bit (qsizetype = int) -->
<modify-function signature="readStringChunk(char*,int)" remove="all"/>
</object-type>
@@ -405,6 +406,7 @@
</conversion-rule>
</container-type>
+ <!-- FIXME: Which one is it going to be? -->
<container-type name="QList" type="list">
<include file-name="QList" location="global"/>
<conversion-rule>
@@ -419,21 +421,6 @@
</conversion-rule>
</container-type>
- <container-type name="QVector" type="vector">
- <include file-name="QVector" location="global"/>
- <conversion-rule>
- <native-to-target>
- <insert-template name="cppvector_to_pylist_conversion"/>
- </native-to-target>
- <target-to-native>
- <add-conversion type="PySequence">
- <insert-template name="pyseq_to_cppvector_conversion"/>
- </add-conversion>
- </target-to-native>
- </conversion-rule>
-
- </container-type>
-
<container-type name="QStack" type="stack">
<include file-name="QStack" location="global"/>
<conversion-rule>
@@ -462,20 +449,6 @@
</conversion-rule>
</container-type>
- <container-type name="QLinkedList" type="linked-list">
- <include file-name="QLinkedList" 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. -->
@@ -634,6 +607,7 @@
<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"/>
@@ -827,7 +801,6 @@
<extra-includes>
<include file-name="datetime.h" location="global"/>
</extra-includes>
- <enum-type name="MonthNameType"/>
<add-function signature="__repr__" return-type="PyObject">
<inject-code class="target" position="beginning">
<insert-template name="repr_code">
@@ -848,7 +821,7 @@
<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*)" >
+ <modify-function signature="getDate(int*,int*,int*)const" >
<modify-argument index="1">
<remove-argument/>
</modify-argument>
@@ -1310,8 +1283,6 @@
<rename to="format"/>
</modify-argument>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toUInt(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toUInt(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1324,8 +1295,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toULongLong(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toULongLong(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1338,8 +1307,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions -->
- <modify-function signature="toDouble(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toDouble(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1352,8 +1319,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions -->
- <modify-function signature="toFloat(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toFloat(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1366,8 +1331,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toInt(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toInt(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1379,8 +1342,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toLongLong(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toLongLong(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1392,8 +1353,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toShort(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toShort(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1405,8 +1364,6 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
- <!-- Qt5: ignore the new QStringRef versions, int arg is gone -->
- <modify-function signature="toUShort(QStringRef,bool*)const" remove="all"/>
<modify-function signature="toUShort(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1505,7 +1462,7 @@
<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,void*)const" remove="all"/>
+ <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">
@@ -1586,10 +1543,6 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
- <!--### Obsolete in 4.3-->
- <modify-function signature="clear()" remove="all"/>
- <modify-function signature="filterChanged()" remove="all"/>
- <!--### End of obsolete section -->
</object-type>
<object-type name="QIdentityProxyModel"/>
<object-type name="QTransposeProxyModel" since="5.13"/>
@@ -1731,12 +1684,6 @@
<replace-default-expression with="QString()"/>
</modify-argument>
</add-function>
- <add-function signature="findChildren(PyTypeObject*,const QRegExp&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="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">
@@ -1819,64 +1766,8 @@
</inject-code>
</add-function>
</value-type>
- <value-type name="QRegExp">
- <enum-type name="CaretMode"/>
- <enum-type name="PatternSyntax"/>
- <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', %i, %i"/>
- <replace from="%REPR_ARGS" to="qPrintable(%CPPSELF.pattern()), (int)%CPPSELF.caseSensitivity(), (int)%CPPSELF.patternSyntax()"/>
- </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="sii"/>
- <replace from="%REDUCE_ARGS" to="qPrintable(%CPPSELF.pattern()), (int)%CPPSELF.caseSensitivity(), (int)%CPPSELF.patternSyntax()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <add-function signature="replace(QString,QString)" return-type="QString">
- <modify-argument index="1">
- <rename to="sourceString"/>
- </modify-argument>
- <modify-argument index="2">
- <rename to="after"/>
- </modify-argument>
- <inject-documentation format="target" mode="append">
- Replaces every occurrence of the regular expression in *sourceString* with *after*.
- Returns a new Python string with the modified contents. For example:
-
- ::
-
- s = "Banana"
- re = QRegExp("a[mn]")
- s = re.replace(s, "ox")
- # s == "Boxoxa"
-
-
- For regular expressions containing capturing parentheses, occurrences of \1, \2, ..., in *after*
- are replaced with rx.cap(1), cap(2), ...
-
- ::
-
- t = "A &lt;i>bon mot&lt;/i>."
- re = QRegExp("&lt;i>([^&lt;]*)&lt;/i>")
- t = re.replace(t, "\\emph{\\1}")
- # t == "A \\emph{bon mot}."
-
- </inject-documentation>
- <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qregexp-replace"/>
- </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"/>
@@ -1918,56 +1809,41 @@
<!-- ### These overloads must be removed accept strings with \x00 in their contents -->
<modify-function signature="append(const char*,int)" remove="all"/>
<modify-function signature="append(const char*)" remove="all"/>
- <modify-function signature="append(QString)" remove="all"/>
<modify-function signature="contains(const char*)const" remove="all"/>
<modify-function signature="count(const char*)const" remove="all"/>
<modify-function signature="endsWith(const char*)const" remove="all"/>
<modify-function signature="indexOf(const char*,int)const" remove="all"/>
<modify-function signature="indexOf(char,int)const" remove="all"/>
- <modify-function signature="indexOf(QString,int)const" remove="all"/>
<modify-function signature="insert(int,const char*)" remove="all"/>
<modify-function signature="insert(int,char)" remove="all"/>
<modify-function signature="insert(int,const char*,int)" since="4.6" remove="all"/>
- <modify-function signature="insert(int,QString)" remove="all"/>
<modify-function signature="lastIndexOf(const char*,int)const" remove="all"/>
- <modify-function signature="lastIndexOf(QString,int)const" remove="all"/>
<modify-function signature="lastIndexOf(char,int)const" remove="all"/>
<modify-function signature="prepend(const char*)" remove="all"/>
<modify-function signature="prepend(const char*,int)" since="4.6" remove="all"/>
<modify-function signature="replace(QByteArray,const char*)" remove="all"/>
<modify-function signature="replace(const char*,int,const char*,int)" remove="all"/>
- <modify-function signature="replace(QString,const char*)" remove="all"/>
<modify-function signature="replace(const char*,QByteArray)" remove="all"/>
<modify-function signature="replace(const char*,const char*)" remove="all"/>
<modify-function signature="replace(int,int,const char*)" remove="all"/>
<modify-function signature="replace(int,int,const char*,int)" since="4.6" remove="all"/>
<modify-function signature="replace(char,const char*)" remove="all"/>
- <modify-function signature="replace(char,QString)" remove="all"/>
<modify-function signature="startsWith(const char*)const" remove="all"/>
- <modify-function signature="operator==(QString)const" remove="all"/>
<modify-function signature="operator==(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator==(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator>(QString)const" remove="all"/>
<modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator>(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator>=(QString)const" 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;(QString)const" remove="all"/>
<modify-function signature="operator&lt;(const char*,QByteArray)" remove="all"/>
- <modify-function signature="operator&lt;=(QString)const" 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!=(QString)const" remove="all"/>
<modify-function signature="operator!=(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator!=(QByteArray,const char*)" remove="all"/>
- <modify-function signature="operator+=(QString)" 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"/>
- <modify-function signature="operator+(QString,QByteArray)" remove="all"/>
- <modify-function signature="operator+(QByteArray,QString)" remove="all"/>
<add-function signature="operator+(PyBytes,QByteArray)">
<inject-code file="../glue/qtcore.cpp" snippet="qbytearray-operatorplus-1"/>
</add-function>
@@ -2053,15 +1929,18 @@
<modify-function signature="operator>(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator>=(const char*,QByteArray)" remove="all"/>
<modify-function signature="operator[](int)const" remove="all"/>
- <modify-function signature="operator[](uint)const" 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"/>
<!--### -->
@@ -2199,7 +2078,7 @@
<!-- 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*,long*)">
+ <modify-function signature="nativeEventFilter(const QByteArray&amp;,void*,qintptr*)">
<modify-argument index="3">
<remove-argument/>
<conversion-rule class="native">
@@ -2313,7 +2192,7 @@
</object-type>
<object-type name="QCryptographicHash">
<enum-type name="Algorithm"/>
- <modify-function signature="addData(const char*,int)">
+ <modify-function signature="addData(const char*,qsizetype)">
<modify-argument index="2">
<remove-argument />
</modify-argument>
@@ -2409,38 +2288,6 @@
<include file-name="QUrl" location="global"/>
</extra-includes>
</object-type>
- <object-type name="QTextCodec">
- <enum-type name="ConversionFlag" flags="ConversionFlags"/>
-
- <object-type name="ConverterState">
- <include file-name="QTextCodec" location="global"/>
- <modify-function signature="ConverterState(QFlags&lt;QTextCodec::ConversionFlag&gt;)">
- <modify-argument index="1">
- <replace-default-expression with="QTextCodec::DefaultConversion"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <modify-function signature="setCodecForLocale(QTextCodec*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <!-- fromUnicode(QString) does the job -->
- <modify-function signature="fromUnicode(const QChar*,int,QTextCodec::ConverterState*)const" remove="all"/>
- <modify-function signature="convertFromUnicode(const QChar*,int,QTextCodec::ConverterState*)const" remove="all"/>
- <!-- this causes a warning that I cannot avoid. See suppressed warning at the end. -->
- </object-type>
- <object-type name="QTextDecoder">
- <!-- ### toUnicode(QByteArray) does the job -->
- <modify-function signature="toUnicode(const char*,int)" remove="all"/>
- <modify-function signature="toUnicode(QString*,const char*,int)" remove="all"/>
- <!-- ### -->
- </object-type>
- <object-type name="QTextEncoder">
- <!-- fromUnicode(QString) does the job -->
- <modify-function signature="fromUnicode(const QChar*,int)" remove="all"/>
- </object-type>
<object-type name="QTimeLine">
<enum-type name="CurveShape"/>
<enum-type name="Direction"/>
@@ -2496,7 +2343,6 @@
<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="execute(QString)" allow-thread="yes"/>
<modify-function signature="startDetached(QString,QStringList,QString,qint64*)">
<modify-argument index="4">
<remove-argument />
@@ -2511,10 +2357,6 @@
<add-function signature="pid()" return-type="long">
<inject-code file="../glue/qtcore.cpp" snippet="qprocess-pid"/>
</add-function>
- <!--### Obsolete in 4.3-->
- <modify-function signature="setReadChannelMode(QProcess::ProcessChannelMode)" remove="all"/>
- <modify-function signature="readChannelMode()const" remove="all"/>
- <!-- ### -->
</object-type>
<object-type name="QSignalMapper"/>
@@ -2593,12 +2435,6 @@
<!--### Obsolete in 4.3-->
<modify-function signature="setSystemIniPath(const QString&amp;)" remove="all"/>
<modify-function signature="setUserIniPath(const QString&amp;)" remove="all"/>
- <!--### Obsolete in 4.3-->
- <modify-function signature="iniCodec()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
<!-- 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"/>
@@ -2885,11 +2721,6 @@
<object-type name="QXmlStreamWriter">
<!-- Removed because it expect QString to be mutable -->
<modify-function signature="QXmlStreamWriter(QString*)" remove="all"/>
- <modify-function signature="codec()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- </modify-function>
</object-type>
<value-type name="QModelIndex" hash-function="qHash">
<modify-function signature="internalPointer()const">
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
index dcc5e29cf..f574b8081 100644
--- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
@@ -1,10 +1,6 @@
project(QtGui)
-if (${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- qt6_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h")
-else()
- qt5_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h")
-endif()
+qt_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside2_SOURCE_DIR}/qpytextobject.h")
set(QtGui_DROPPED_ENTRIES)
@@ -12,7 +8,6 @@ get_property(QtGui_enabled_features TARGET Qt${QT_MAJOR_VERSION}::Gui
PROPERTY QT_ENABLED_PUBLIC_FEATURES)
set(QtGui_SRC
-${QtGui_GEN_DIR}/qabstractopenglfunctions_wrapper.cpp
${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp
${QtGui_GEN_DIR}/qabstracttextdocumentlayout_wrapper.cpp
@@ -31,13 +26,16 @@ ${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}/qconicalgradient_wrapper.cpp
${QtGui_GEN_DIR}/qcontextmenuevent_wrapper.cpp
${QtGui_GEN_DIR}/qcursor_wrapper.cpp
@@ -70,6 +68,7 @@ ${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
@@ -79,7 +78,6 @@ ${QtGui_GEN_DIR}/qintvalidator_wrapper.cpp
${QtGui_GEN_DIR}/qkeyevent_wrapper.cpp
${QtGui_GEN_DIR}/qkeysequence_wrapper.cpp
${QtGui_GEN_DIR}/qlineargradient_wrapper.cpp
-${QtGui_GEN_DIR}/qmatrix_wrapper.cpp
${QtGui_GEN_DIR}/qmatrix2x2_wrapper.cpp
${QtGui_GEN_DIR}/qmatrix2x3_wrapper.cpp
${QtGui_GEN_DIR}/qmatrix2x4_wrapper.cpp
@@ -95,20 +93,8 @@ ${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}/qopengldebuglogger_wrapper.cpp
-${QtGui_GEN_DIR}/qopengldebugmessage_wrapper.cpp
${QtGui_GEN_DIR}/qopenglextrafunctions_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglframebufferobjectformat_wrapper.cpp
${QtGui_GEN_DIR}/qopenglfunctions_wrapper.cpp
-# Compile error on Windows: ${QtGui_GEN_DIR}/qopenglpaintdevice_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglpixeltransferoptions_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglshaderprogram_wrapper.cpp
-${QtGui_GEN_DIR}/qopengltexture_wrapper.cpp
-${QtGui_GEN_DIR}/qopengltextureblitter_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglversionprofile_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglvertexarrayobject_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglvertexarrayobject_binder_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglwindow_wrapper.cpp
${QtGui_GEN_DIR}/qpagedpaintdevice_margins_wrapper.cpp
${QtGui_GEN_DIR}/qpagedpaintdevice_wrapper.cpp
${QtGui_GEN_DIR}/qpagelayout_wrapper.cpp
@@ -127,18 +113,18 @@ ${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}/qpictureio_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}/qregexpvalidator_wrapper.cpp
${QtGui_GEN_DIR}/qregularexpressionvalidator_wrapper.cpp
${QtGui_GEN_DIR}/qregion_wrapper.cpp
${QtGui_GEN_DIR}/qresizeevent_wrapper.cpp
@@ -148,14 +134,11 @@ ${QtGui_GEN_DIR}/qshowevent_wrapper.cpp
${QtGui_GEN_DIR}/qstandarditem_wrapper.cpp
${QtGui_GEN_DIR}/qstandarditemmodel_wrapper.cpp
${QtGui_GEN_DIR}/qstatustipevent_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglbuffer_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}/qopenglshader_wrapper.cpp
-#${QtGui_GEN_DIR}/qopenglshaderprogram_wrapper.cpp
-${QtGui_GEN_DIR}/qopenglframebufferobject_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
@@ -199,11 +182,13 @@ ${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}/qtouchdevice_wrapper.cpp
${QtGui_GEN_DIR}/qtouchevent_touchpoint_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
@@ -216,24 +201,6 @@ ${QtGui_GEN_DIR}/qwindowstatechangeevent_wrapper.cpp
${QtGui_GEN_DIR}/qtgui_module_wrapper.cpp
)
-if (Qt${QT_MAJOR_VERSION}Gui_VERSION VERSION_EQUAL 5.14.0
- OR Qt${QT_MAJOR_VERSION}Gui_VERSION VERSION_GREATER 5.14.0)
- list(APPEND QtGui_SRC ${QtGui_GEN_DIR}/qcolorspace_wrapper.cpp)
-endif()
-
-# cf qtbase/src/gui/opengl/opengl.pri
-list(FIND QtGui_enabled_features "opengles2" _opengles2Index)
-# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features)
-if(_opengles2Index GREATER -1)
- list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
- message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
-else()
- list(APPEND QtGui_SRC
- ${QtGui_GEN_DIR}/qopengltimemonitor_wrapper.cpp
- ${QtGui_GEN_DIR}/qopengltimerquery_wrapper.cpp)
- message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Adding Desktop OpenGL classes")
-endif()
-
configure_file("${QtGui_SOURCE_DIR}/typesystem_gui.xml.in"
"${QtGui_BINARY_DIR}/typesystem_gui.xml" @ONLY)
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index 4be4fc8f3..06ea29d14 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -247,6 +247,40 @@
<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*">
@@ -405,10 +439,10 @@
<modify-function signature="operator QVariant()const" remove="all"/>
</value-type>
<value-type name="QPicture" >
- <modify-function signature="load(QIODevice*,const char*)" allow-thread="yes"/>
- <modify-function signature="load(const QString&amp;,const char*)" allow-thread="yes"/>
- <modify-function signature="save(QIODevice*,const char*)" allow-thread="yes"/>
- <modify-function signature="save(const QString&amp;,const char*)" allow-thread="yes"/>
+ <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">
@@ -501,7 +535,6 @@
</value-type>
<value-type name="QPolygon">
<extra-includes>
- <include file-name="QMatrix" location="global"/>
<include file-name="QTransform" location="global"/>
</extra-includes>
<add-function signature="__reduce__" return-type="PyObject*">
@@ -527,7 +560,6 @@
</value-type>
<value-type name="QPolygonF">
<extra-includes>
- <include file-name="QMatrix" location="global"/>
<include file-name="QTransform" location="global"/>
</extra-includes>
<!-- ### A QVector parameter, for no defined type, will generate wrong code. -->
@@ -655,70 +687,6 @@
</modify-function>
</value-type>
- <!-- Qt5: this _should_ be obsolete, but QImage is still using it... -->
- <value-type name="QMatrix">
- <extra-includes>
- <include file-name="QPainterPath" 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, %f, %f"/>
- <replace from="%REPR_ARGS"
- to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.dx(), %CPPSELF.dy()"/>
- </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="dddddd"/>
- <replace from="%REDUCE_ARGS" to="%CPPSELF.m11(), %CPPSELF.m12(), %CPPSELF.m21(), %CPPSELF.m22(), %CPPSELF.dx(), %CPPSELF.dy()"/>
- </insert-template>
- </inject-code>
- </add-function>
- <modify-function signature="map(int,int,int*,int*)const">
- <modify-argument index="3">
- <remove-argument />
- </modify-argument>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code>
- <insert-template name="qmatrix_map"/>
- </inject-code>
- </modify-function>
- <modify-function signature="map(qreal,qreal,qreal*,qreal*)const">
- <modify-argument index="3">
- <remove-argument />
- </modify-argument>
- <modify-argument index="4">
- <remove-argument />
- </modify-argument>
- <inject-code>
- <insert-template name="qmatrix_map"/>
- </inject-code>
- </modify-function>
- <modify-function signature="map(const QPoint&amp;)const">
- <modify-argument index="return">
- <replace-type modified-type="QPoint"/>
- </modify-argument>
- <inject-code file="../glue/qtgui.cpp" snippet="qmatrix-map-point" />
- </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>
- </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"/>
@@ -756,7 +724,6 @@
<enum-type name="InvertMode"/>
<extra-includes>
<include file-name="QStringList" location="global"/>
- <include file-name="QMatrix" location="global"/>
</extra-includes>
<modify-function signature="load(const QString&amp;, const char*)" allow-thread="yes"/>
@@ -764,7 +731,7 @@
<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,int,QImage::Format,QImageCleanupFunction,void*)">
+ <modify-function signature="QImage(uchar*,int,int,qsizetype,QImage::Format,QImageCleanupFunction,void*)">
<modify-argument index="1">
<replace-type modified-type="PyBuffer"/>
</modify-argument>
@@ -801,7 +768,7 @@
</add-function>
<!-- The non-const versions are already used -->
- <modify-function signature="QImage(const uchar*,int,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all"/>
+ <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"/>
<!-- ### -->
@@ -909,7 +876,7 @@
<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*)">
+ <modify-function signature="getCmyk(int*,int*,int*,int*,int*)const">
<modify-argument index="0">
<replace-type modified-type="PyObject*"/>
</modify-argument>
@@ -936,7 +903,7 @@
</insert-template>
</inject-code>
</modify-function>
- <modify-function signature="getCmykF(qreal*,qreal*,qreal*,qreal*,qreal*)">
+ <modify-function signature="getCmykF(qreal*,qreal*,qreal*,qreal*,qreal*)const">
<modify-argument index="0">
<replace-type modified-type="PyObject*"/>
</modify-argument>
@@ -1120,7 +1087,7 @@
</inject-code>
</modify-function>
- <modify-function signature="width(QChar)const" rename="widthChar">
+ <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
<modify-argument index="1">
<replace-type modified-type="char"/>
</modify-argument>
@@ -1156,7 +1123,7 @@
</inject-code>
</modify-function>
- <modify-function signature="width(QChar)const" rename="widthChar">
+ <modify-function signature="horizontalAdvance(QChar)const" rename="horizontalAdvanceChar">
<modify-argument index="1">
<replace-type modified-type="char"/>
</modify-argument>
@@ -1258,15 +1225,6 @@
<object-type name="QIntValidator"/>
<object-type name="QPainterPathStroker" copyable="false"/>
- <object-type name="QPictureIO">
- <modify-function signature="setIODevice(QIODevice*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="read()" allow-thread="yes"/>
- <modify-function signature="write()" allow-thread="yes"/>
- </object-type>
<object-type name="QPixmapCache">
<value-type name="Key"/>
<add-function signature="find(QPixmapCache::Key&amp;)">
@@ -1274,7 +1232,6 @@
</add-function>
</object-type>
- <object-type name="QRegExpValidator"/>
<object-type name="QRegularExpressionValidator"/>
<object-type name="QStandardItem">
@@ -1454,10 +1411,7 @@
</object-type>
<object-type name="QShowEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Show"/>
<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">
- <enum-type name="PointerType"/>
- <enum-type name="TabletDevice"/>
- </object-type>
+ <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"/>
@@ -1476,6 +1430,7 @@
<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" >
@@ -1892,14 +1847,6 @@
<insert-template name="qpainter_drawlist"/>
</inject-code>
</add-function>
- <modify-function signature="drawRoundRect(int,int,int,int,int,int)">
- <modify-argument index="5">
- <rename to="xRound"/>
- </modify-argument>
- <modify-argument index="6">
- <rename to="yRound"/>
- </modify-argument>
- </modify-function>
<modify-function signature="drawTiledPixmap(const QRect&amp;,const QPixmap&amp;,const QPoint&amp;)">
<modify-argument index="3">
<rename to="pos"/>
@@ -1915,16 +1862,6 @@
<no-null-pointer/>
</modify-argument>
</modify-function>
- <modify-function signature="setRedirected(const QPaintDevice*,QPaintDevice*,const QPoint&amp;)">
- <modify-argument index="1">
- <no-null-pointer/>
- </modify-argument>
- </modify-function>
- <modify-function signature="restoreRedirected(const 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/>
@@ -2258,6 +2195,7 @@
</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.
@@ -2381,9 +2319,9 @@
</value-type>
</object-type>
- <object-type name="QTouchDevice">
- <enum-type name="CapabilityFlag" flags="Capabilities"/>
- <enum-type name="DeviceType"/>
+ <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">
@@ -2527,7 +2465,7 @@
<enum-type name="Visibility"/>
<modify-function signature="raise()" rename="raise_"/>
<!-- see QWidget::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
- <modify-function signature="nativeEvent(const QByteArray &amp;,void*,long*)">
+ <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
<modify-argument index="3">
<remove-argument/>
<conversion-rule class="native">
@@ -2578,29 +2516,10 @@
</object-type>
- <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="QOpenGLContext">
<enum-type name="OpenGLModuleType"/>
</object-type>
<object-type name="QOpenGLContextGroup" since="5.0"/>
- <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"/>
<!-- Compile error on Windows: QOpenGLPaintDevice::QOpenGLPaintDevice(const QOpenGLPaintDevice &)': attempting to reference a deleted function
<object-type name="QOpenGLPaintDevice" since="5.0"/>
-->
@@ -2887,7 +2806,6 @@
<modify-argument index="2"><array/></modify-argument>
</modify-function>
</object-type>
- <object-type name="QAbstractOpenGLFunctions" since="5.1"/>
<!-- 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"/>
@@ -2917,98 +2835,6 @@
<object-type name="QOpenGLFunctions_4_5_Core" since="5.5"/>
<object-type name="QOpenGLFunctions_ES2" 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"/>
- <!-- Work around link error introduced by qtbase/d15b02ff291e3124d9bb8ac3b06b704c292f52ab, can be removed once
- qtbase/1bfabe35d8178c93e66acef21c01e08980f9ed0d has landed -->
- <modify-function signature="setData(int,int,int,int,int,int,int,QOpenGLTexture::PixelFormat,QOpenGLTexture::PixelType,const void*,QOpenGLPixelTransferOptions*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>
<value-type name="QPageLayout">
<enum-type name="Mode"/>
<enum-type name="Orientation"/>
@@ -3030,6 +2856,9 @@
<enum-type name="YUVLayout"/>
</value-type>
<object-type name="QPdfWriter"/>
+ <object-type name="QPointingDevice" since="6.0">
+ <enum-type name="PointerType" flags="PointerTypes"/>
+ </object-type>
<value-type name="QPointingDeviceUniqueId"/>
<value-type name="QRawFont">
<enum-type name="AntialiasingType"/>
@@ -3051,4 +2880,38 @@
</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/QtNetwork/CMakeLists.txt b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
index 9557c4a26..fca44d92c 100644
--- a/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtNetwork/CMakeLists.txt
@@ -23,8 +23,6 @@ ${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}/qnetworkconfiguration_wrapper.cpp
-${QtNetwork_GEN_DIR}/qnetworkconfigurationmanager_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkcookie_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkcookiejar_wrapper.cpp
${QtNetwork_GEN_DIR}/qnetworkdatagram_wrapper.cpp
@@ -35,7 +33,6 @@ ${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}/qnetworksession_wrapper.cpp
${QtNetwork_GEN_DIR}/qpassworddigestor_wrapper.cpp
${QtNetwork_GEN_DIR}/qssl_wrapper.cpp
${QtNetwork_GEN_DIR}/qsslcertificate_wrapper.cpp
diff --git a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
index dc60a509d..f078b9bf7 100644
--- a/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
+++ b/sources/pyside2/PySide2/QtNetwork/typesystem_network.xml
@@ -42,6 +42,8 @@
<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"/>
@@ -53,6 +55,8 @@
</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"/>
@@ -172,7 +176,6 @@
<enum-type name="LocalSocketState"/>
</object-type>
<object-type name="QNetworkAccessManager">
- <enum-type name="NetworkAccessibility" since="4.7"/>
<enum-type name="Operation"/>
<modify-function signature="createRequest(QNetworkAccessManager::Operation,const QNetworkRequest&amp;,QIODevice*)">
<modify-argument index="3" invalidate-after-use="yes"/>
@@ -262,21 +265,6 @@
<enum-type name="TransferTimeoutConstant" since="5.15"/>
</value-type>
- <value-type name="QNetworkConfiguration" since="4.7">
- <enum-type name="BearerType"/>
- <enum-type name="Purpose" since="4.7"/>
- <enum-type name="StateFlag" flags="StateFlags" since="4.7"/>
- <enum-type name="Type" since="4.7"/>
- </value-type>
- <object-type name="QNetworkConfigurationManager" since="4.7">
- <enum-type name="Capability" flags="Capabilities" since="4.7"/>
- </object-type>
- <object-type name="QNetworkSession" since="4.7">
- <enum-type name="SessionError" since="4.7"/>
- <enum-type name="State" since="4.7"/>
- <enum-type name="UsagePolicy" flags="UsagePolicies"/>
- </object-type>
-
<object-type name="QAbstractNetworkCache"/>
<object-type name="QNetworkDiskCache"/>
<value-type name="QNetworkCacheMetaData"/>
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
index efc86a048..5af6abb47 100644
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
@@ -132,7 +132,6 @@ int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
Q_ASSERT(metaObject);
QQmlPrivate::RegisterType type;
- type.version = 0;
// Allow registering Qt Quick items.
bool registered = false;
@@ -153,8 +152,8 @@ int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
pyTypes[nextType] = pyObj;
// FIXME: Fix this to assign new type ids each time.
- type.typeId = qMetaTypeId<QObject *>();
- type.listId = qMetaTypeId<QQmlListProperty<QObject> >();
+ type.typeId = QMetaType(QMetaType::QObjectStar);
+ type.listId = QMetaType::fromType<QQmlListProperty<QObject> >();
type.attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<QObject>();
type.attachedPropertiesMetaObject = QQmlPrivate::attachedPropertiesMetaObject<QObject>();
@@ -170,8 +169,7 @@ int PySide::qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor,
type.objectSize = objectSize;
type.create = createFuncs[nextType];
type.uri = uri;
- type.versionMajor = versionMajor;
- type.versionMinor = versionMinor;
+ type.version = QTypeRevision::fromVersion(versionMajor, versionMinor);
type.elementName = qmlName;
type.extensionObjectCreate = 0;
@@ -367,18 +365,23 @@ QtQml_VolatileBoolObject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
QtQml_VolatileBoolObject *self
= reinterpret_cast<QtQml_VolatileBoolObject *>(type->tp_alloc(type, 0));
- if (self != Q_NULLPTR)
- self->flag = ok;
+ 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)
{
- if (self->flag)
- return Py_True;
- return Py_False;
+ return *self->flag ? Py_True : Py_False;
}
static PyObject *
@@ -397,10 +400,7 @@ QtQml_VolatileBoolObject_set(QtQml_VolatileBoolObject *self, PyObject *args)
return Q_NULLPTR;
}
- if (ok > 0)
- self->flag = true;
- else
- self->flag = false;
+ *self->flag = ok > 0;
Py_RETURN_NONE;
}
@@ -420,7 +420,7 @@ QtQml_VolatileBoolObject_repr(QtQml_VolatileBoolObject *self)
{
PyObject *s;
- if (self->flag)
+ if (*self->flag)
s = PyBytes_FromFormat("%s(True)",
Py_TYPE(self)->tp_name);
else
@@ -435,12 +435,12 @@ QtQml_VolatileBoolObject_str(QtQml_VolatileBoolObject *self)
{
PyObject *s;
- if (self->flag)
+ if (*self->flag)
s = PyBytes_FromFormat("%s(True) -> %p",
- Py_TYPE(self)->tp_name, &(self->flag));
+ Py_TYPE(self)->tp_name, self->flag);
else
s = PyBytes_FromFormat("%s(False) -> %p",
- Py_TYPE(self)->tp_name, &(self->flag));
+ Py_TYPE(self)->tp_name, self->flag);
Py_XINCREF(s);
return s;
}
@@ -450,7 +450,7 @@ static PyType_Slot QtQml_VolatileBoolType_slots[] = {
{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 *)Sbk_object_dealloc},
+ {Py_tp_dealloc, (void *)QtQml_VolatileBoolObject_dealloc},
{0, 0}
};
static PyType_Spec QtQml_VolatileBoolType_spec = {
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h
index e94ea043f..74690d937 100644
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h
+++ b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h
@@ -42,6 +42,8 @@
#include <sbkpython.h>
+#include <atomic>
+
struct SbkObjectType;
namespace PySide
@@ -71,11 +73,13 @@ int qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int vers
const char *qmlName);
}
-// Volatile Bool Ptr type definition.
+// Volatile Bool Ptr type definition for QQmlIncubationController::incubateWhile(std::atomic<bool> *, int)
+
+using AtomicBool = std::atomic<bool>;
typedef struct {
PyObject_HEAD
- volatile bool flag;
+ AtomicBool *flag;
} QtQml_VolatileBoolObject;
PyAPI_FUNC(PyTypeObject *) QtQml_VolatileBoolTypeF(void);
diff --git a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
index b61b28c07..af6f75131 100644
--- a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
+++ b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml
@@ -54,9 +54,17 @@
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-documentation format="target" mode="append">
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.
@@ -93,6 +101,7 @@
<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>
@@ -116,7 +125,6 @@
<enum-type name="StartMode"/>
</object-type>
<object-type name="QQmlEngine">
- <enum-type name="ObjectOwnership"/>
<modify-function signature="addImageProvider(const QString&amp;,QQmlImageProviderBase*)">
<modify-argument index="2">
<define-ownership owner="c++"/>
@@ -153,14 +161,14 @@
<enum-type name="Status"/>
</object-type>
<object-type name="QQmlIncubationController">
- <modify-function signature="incubateWhile(volatile bool*,int)" allow-thread="yes">
+ <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. -->
+ 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">
- volatile bool * %out =
- &amp;((reinterpret_cast&lt;QtQml_VolatileBoolObject *&gt;(%PYARG_1))->flag);
+ auto volatileBool = reinterpret_cast&lt;QtQml_VolatileBoolObject *&gt;(%PYARG_1);
+ std::atomic&lt;bool&gt; *%out = volatileBool->flag;
</conversion-rule>
</modify-argument>
</modify-function>
diff --git a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt b/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
index 0f453c90e..25f54679f 100644
--- a/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtQuick/CMakeLists.txt
@@ -3,10 +3,12 @@ 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
@@ -17,11 +19,9 @@ ${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}/qsgabstractrenderer_wrapper.cpp
${QtQuick_GEN_DIR}/qsgbasicgeometrynode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgclipnode_wrapper.cpp
${QtQuick_GEN_DIR}/qsgdynamictexture_wrapper.cpp
-${QtQuick_GEN_DIR}/qsgengine_wrapper.cpp
#${QtQuick_GEN_DIR}/qsgflatcolormaterial_wrapper.cpp
${QtQuick_GEN_DIR}/qsggeometry_attribute_wrapper.cpp
${QtQuick_GEN_DIR}/qsggeometry_attributeset_wrapper.cpp
@@ -51,13 +51,6 @@ ${QtQuick_GEN_DIR}/qsgtransformnode_wrapper.cpp
${QtQuick_GEN_DIR}/qtquick_module_wrapper.cpp
)
-if (Qt${QT_MAJOR_VERSION}Quick_VERSION VERSION_GREATER 5.5.1)
- set(QtQuick_SRC ${QtQuick_SRC}
- ${QtQuick_GEN_DIR}/qquickasyncimageprovider_wrapper.cpp
- ${QtQuick_GEN_DIR}/qquickimageresponse_wrapper.cpp
- )
-endif()
-
set(QtQuick_include_dirs ${QtQuick_SOURCE_DIR}
${QtQml_SOURCE_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
diff --git a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
index a042ac2cc..f19dcdc03 100644
--- a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
+++ b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
@@ -117,6 +117,39 @@ bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, QByteArray className
return isDerived;
}
+template <typename T>
+struct QPysideQmlMetaTypeInterface : QtPrivate::QMetaTypeInterface
+{
+ const QByteArray name;
+
+ QPysideQmlMetaTypeInterface(const QByteArray &name, const QMetaObject *metaObject = nullptr)
+ : QMetaTypeInterface {
+ /*.revision=*/ 0,
+ /*.size=*/ sizeof(T),
+ /*.alignment=*/ alignof(T),
+ /*.flags=*/ QtPrivate::QMetaTypeTypeFlags<T>::Flags,
+ /*.metaObject=*/ metaObject,
+ /*.name=*/ name.constData(),
+ /*.typeId=*/ 0,
+ /*.ref=*/ { Q_BASIC_ATOMIC_INITIALIZER(0) },
+ /*.deleteSelf=*/ [](QMetaTypeInterface *self) {
+ delete static_cast<QPysideQmlMetaTypeInterface *>(self);
+ },
+ /*.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();
+ },
+ /*.legacyRegisterOp=*/ nullptr
+ }
+ , name(name) {}
+};
+
template <class WrapperClass>
void registerTypeIfInheritsFromClass(
QByteArray className,
@@ -129,40 +162,11 @@ void registerTypeIfInheritsFromClass(
{
bool shouldRegister = !registered && pyTypeObjectInheritsFromClass(typeToRegister, className);
if (shouldRegister) {
- int ptrType =
- QMetaType::registerNormalizedType(
- typePointerName.constData(),
- QtMetaTypePrivate::QMetaTypeFunctionHelper<WrapperClass *>::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<WrapperClass *>::Construct,
- sizeof(WrapperClass *),
- static_cast< ::QFlags<QMetaType::TypeFlag> >(QtPrivate::QMetaTypeTypeFlags<
- WrapperClass *>::Flags),
- typeMetaObject);
- if (ptrType == -1) {
- PyErr_Format(PyExc_TypeError, "Meta type registration of \"%s\" for QML usage failed.",
- typePointerName.constData());
- return;
- }
-
- int lstType =
- QMetaType::registerNormalizedType(
- typeListName.constData(),
- QtMetaTypePrivate::QMetaTypeFunctionHelper<QQmlListProperty<WrapperClass> >
- ::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<QQmlListProperty<WrapperClass> >
- ::Construct,
- sizeof(QQmlListProperty<WrapperClass>),
- static_cast< ::QFlags<QMetaType::TypeFlag> >(
- QtPrivate::QMetaTypeTypeFlags<QQmlListProperty<WrapperClass> >::Flags),
- nullptr);
- if (lstType == -1) {
- PyErr_Format(PyExc_TypeError, "Meta type registration of \"%s\" for QML usage failed.",
- typeListName.constData());
- return;
- }
+ QMetaType ptrType(new QPysideQmlMetaTypeInterface<WrapperClass *>(typePointerName, typeMetaObject));
+ QMetaType lstType(new QPysideQmlMetaTypeInterface<QQmlListProperty<WrapperClass>>(typeListName));
- type->typeId = ptrType;
- type->listId = lstType;
+ type->typeId = std::move(ptrType);
+ type->listId = std::move(lstType);
type->attachedPropertiesFunction = QQmlPrivate::attachedPropertiesFunc<WrapperClass>();
type->attachedPropertiesMetaObject =
QQmlPrivate::attachedPropertiesMetaObject<WrapperClass>();
@@ -228,10 +232,8 @@ bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int v
return false;
type->create = createFuncs[nextType];
- type->version = 0;
type->uri = uri;
- type->versionMajor = versionMajor;
- type->versionMinor = versionMinor;
+ type->version = QTypeRevision::fromVersion(versionMajor, versionMinor);
type->elementName = qmlName;
type->metaObject = metaObject;
diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
index 223eff773..31e05979b 100644
--- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
+++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
@@ -107,16 +107,9 @@
<enum-type name="TextRenderType" since="5.10"/>
</object-type>
- <object-type name="QSGAbstractRenderer">
- <enum-type name="ClearModeBit" flags="ClearMode"/>
- <enum-type name="MatrixTransformFlag" flags="MatrixTransformFlags" since="5.14"/>
- </object-type>
<object-type name="QSGBasicGeometryNode"/>
<object-type name="QSGClipNode"/>
<object-type name="QSGDynamicTexture"/>
- <object-type name="QSGEngine">
- <enum-type name="CreateTextureOption" flags="CreateTextureOptions"/>
- </object-type>
<!-- <object-type name="QSGFlatColorMaterial"/> -->
<object-type name="QSGGeometry">
<enum-type name="DataPattern"/>
diff --git a/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in b/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in
index 65daf1b84..da5534b82 100644
--- a/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in
+++ b/sources/pyside2/PySide2/QtTest/QtTest_global.pre.h.in
@@ -1,5 +1,5 @@
// QT_WIDGETS_LIB changes code generation in pysideqtesttouch.h
-#if @Qt5Widgets_FOUND@
+#if @Qt6Widgets_FOUND@
# define QT_WIDGETS_LIB
#endif
diff --git a/sources/pyside2/PySide2/QtTest/typesystem_test.xml b/sources/pyside2/PySide2/QtTest/typesystem_test.xml
index f7facaf7d..b22289149 100644
--- a/sources/pyside2/PySide2/QtTest/typesystem_test.xml
+++ b/sources/pyside2/PySide2/QtTest/typesystem_test.xml
@@ -89,14 +89,14 @@
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*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
- signature 'generateTouchEvent(QWindow*,QTouchDevice*,bool)' for function modification in 'QTest' not found. Possible candidates:
+ 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="QTouchDevice">
+ <object-type name="QInputDevice">
<enum-type name="CapabilityFlag" flags="Capabilities"/>
<enum-type name="DeviceType"/>
</object-type>
@@ -151,12 +151,12 @@
</modify-argument>
</modify-function>
</object-type>
- <modify-function signature="generateTouchEvent(QWidget*,QTouchDevice*,bool)" rename="touchEvent" since="4.6">
+ <modify-function signature="generateTouchEvent(QWidget*,QInputDevice*,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*,QTouchDevice*,bool)" rename="touchEvent" since="4.6">
+ <modify-function signature="generateTouchEvent(QWindow*,QInputDevice*,bool)" rename="touchEvent" since="4.6">
<modify-argument index="return">
<define-ownership class="target" owner="target"/>
</modify-argument>
diff --git a/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt b/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt
deleted file mode 100644
index 4220e46bf..000000000
--- a/sources/pyside2/PySide2/QtWebKit/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-project(QtWebKit)
-
-set(QtWebKit_SRC
-${QtWebKit_GEN_DIR}/webcore_wrapper.cpp
-# module is always needed
-${QtWebKit_GEN_DIR}/qtwebkit_module_wrapper.cpp
-)
-
-set(QtWebKit_include_dirs ${QtWebKit_SOURCE_DIR}
- ${QtWebKit_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}WebKit_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- )
-set(QtWebKit_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebKit_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtWebKit_deps QtGui QtNetwork)
-create_pyside_module(NAME QtWebKit
- INCLUDE_DIRS QtWebKit_include_dirs
- LIBRARIES QtWebKit_libraries
- DEPS QtWebKit_deps
- TYPESYSTEM_PATH QtWebKit_SOURCE_DIR
- SOURCES QtWebKit_SRC)
-
diff --git a/sources/pyside2/PySide2/QtWebKit/typesystem_webkit.xml b/sources/pyside2/PySide2/QtWebKit/typesystem_webkit.xml
deleted file mode 100644
index e92417f26..000000000
--- a/sources/pyside2/PySide2/QtWebKit/typesystem_webkit.xml
+++ /dev/null
@@ -1,49 +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.QtWebKit">
- <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="WebCore"/>
-
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt
deleted file mode 100644
index 0bf660a62..000000000
--- a/sources/pyside2/PySide2/QtWebKitWidgets/CMakeLists.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-project(QtWebKitWidgets)
-
-set(QtWebKitWidgets_SRC
-${QtWebKitWidgets_GEN_DIR}/qgraphicswebview_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebdatabase_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebelement_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebelementcollection_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebframe_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebhistory_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebhistoryinterface_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebhistoryitem_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebhittestresult_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebinspector_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_choosemultiplefilesextensionoption_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_choosemultiplefilesextensionreturn_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_errorpageextensionoption_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_errorpageextensionreturn_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_extensionoption_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_extensionreturn_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_viewportattributes_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpage_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpluginfactory_mimetype_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpluginfactory_plugin_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebpluginfactory_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebsecurityorigin_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebsettings_wrapper.cpp
-${QtWebKitWidgets_GEN_DIR}/qwebview_wrapper.cpp
-# module is always needed
-${QtWebKitWidgets_GEN_DIR}/qtwebkitwidgets_module_wrapper.cpp
-)
-
-set(QtWebKitWidgets_include_dirs
- ${QtWebKitWidgets_SOURCE_DIR}
- ${QtWebKitWidgets_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}WebKit_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}PrintSupport_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebKitWidgets_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- ${QtGui_GEN_DIR}
- ${QtWidgets_GEN_DIR}
- ${QtPrintSupport_GEN_DIR}
- ${QtWebKit_GEN_DIR}
- ${QtNetwork_GEN_DIR}
- )
-set(QtWebKitWidgets_libraries pyside2
- ${Qt${QT_MAJOR_VERSION}WebKit_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebKitWidgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtWebKitWidgets_deps QtWidgets QtPrintSupport QtNetwork)
-create_pyside_module(NAME QtWebKitWidgets
- INCLUDE_DIRS QtWebKitWidgets_include_dirs
- LIBRARIES QtWebKitWidgets_libraries
- DEPS QtWebKitWidgets_deps
- TYPESYSTEM_PATH QtWebKitWidgets_SOURCE_DIR
- SOURCES QtWebKitWidgets_SRC)
-
diff --git a/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml b/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml
deleted file mode 100644
index 7760c1c3d..000000000
--- a/sources/pyside2/PySide2/QtWebKitWidgets/typesystem_webkitwidgets.xml
+++ /dev/null
@@ -1,211 +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.QtWebKitWidgets">
- <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="QtWebKit/typesystem_webkit.xml" generate="no"/>
- <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
- <load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
- <load-typesystem name="templates/webkitwidgets_common.xml" generate="no"/>
-
- <value-type name="QWebDatabase"/>
-
- <object-type name="QWebPluginFactory">
- <enum-type name="Extension"/>
- <value-type name="Plugin"/>
- <value-type name="MimeType"/>
- <modify-function signature="create(const QString &amp;,const QUrl &amp;,const QStringList &amp;,const QStringList &amp;)const">
- <modify-argument index="return">
- <define-ownership class="native" owner="c++"/>
- <define-ownership class="target" owner="target"/>
- </modify-argument>
- </modify-function>
- </object-type>
-
- <object-type name="QWebHistory"/>
- <object-type name="QWebHistoryInterface"/>
- <value-type name="QWebHistoryItem"/>
-
- <value-type name="QWebSecurityOrigin">
- <enum-type name="SubdomainSetting"/>
- </value-type>
-
- <object-type name="QWebSettings">
- <enum-type name="FontFamily"/>
- <enum-type name="FontSize"/>
- <enum-type name="ThirdPartyCookiePolicy"/>
- <enum-type name="WebAttribute"/>
- <enum-type name="WebGraphic"/>
- </object-type>
-
- <object-type name="QWebView">
- <modify-function signature="setPage(QWebPage*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="page()const">
- <modify-argument index="return">
- <define-ownership class="target" owner="default"/>
- </modify-argument>
- <inject-code position="end" file="../glue/qtwebkitwidgets.cpp" snippet="qwebview-page"/>
- </modify-function>
- <modify-function signature="print(QPrinter*)const" rename="print_"/>
- </object-type>
-
- <value-type name="QWebElement" since="4.6">
- <enum-type name="StyleResolveStrategy"/>
- </value-type>
-
- <value-type name="QWebElementCollection" since="4.6">
- <add-function signature="__len__">
- <inject-code file="../glue/qtwebkitwidgets.cpp" snippet="qwebelementcollection-len"/>
- </add-function>
- <add-function signature="__getitem__">
- <inject-code file="../glue/qtwebkitwidgets.cpp" snippet="qwebelementcollection-getitem"/>
- </add-function>
- </value-type>
-
- <object-type name="QWebFrame">
- <enum-type name="RenderLayer" flags="RenderLayers" since="4.6"/>
- <enum-type name="ValueOwnership"/>
- <modify-function signature="addToJavaScriptWindowObject(QString,QObject*,QWebFrame::ValueOwnership)">
- <modify-argument index="2">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="print(QPrinter*)const" rename="print_"/>
- <modify-function signature="metaData()const">
- <modify-argument index="return">
- <replace-type modified-type="PyObject"/>
- </modify-argument>
- <inject-code position="end" file="../glue/qtwebkitwidgets.cpp" snippet="qwebframe-metadata" />
- </modify-function>
- </object-type>
-
- <object-type name="QWebPage">
- <enum-type name="ErrorDomain"/>
- <enum-type name="Extension"/>
- <enum-type name="Feature"/>
- <enum-type name="FindFlag" flags="FindFlags"/>
- <enum-type name="LinkDelegationPolicy"/>
- <enum-type name="NavigationType"/>
- <enum-type name="PermissionPolicy" since="4.8" revision="4800"/>
- <enum-type name="VisibilityState"/>
- <enum-type name="WebAction"/>
- <enum-type name="WebWindowType"/>
-
- <value-type name="ChooseMultipleFilesExtensionOption"/>
- <value-type name="ChooseMultipleFilesExtensionReturn"/>
- <value-type name="ErrorPageExtensionOption" since="4.6"/>
- <value-type name="ErrorPageExtensionReturn" since="4.6"/>
- <value-type name="ExtensionOption"/>
- <value-type name="ExtensionReturn"/>
- <value-type name="ViewportAttributes"/>
-
- <modify-function signature="extension(QWebPage::Extension,const QWebPage::ExtensionOption*,QWebPage::ExtensionReturn*)">
- <modify-argument index="2" invalidate-after-use="yes">
- <conversion-rule class="target">
- <insert-template name="qwebpage_extension_argument_conversion">
- <replace from="$TYPE_SUFFIX" to="Option"/>
- </insert-template>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="3" invalidate-after-use="yes">
- <conversion-rule class="target">
- <insert-template name="qwebpage_extension_argument_conversion">
- <replace from="$TYPE_SUFFIX" to="Return"/>
- </insert-template>
- </conversion-rule>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="setNetworkAccessManager(QNetworkAccessManager*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="networkAccessManager()const">
- <modify-argument index="return">
- <reference-count action="set" variable-name="setNetworkAccessManager(QNetworkAccessManager*)1"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="view()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
- <modify-function signature="pluginFactory()const">
- <modify-argument index="return">
- <define-ownership owner="default"/>
- </modify-argument>
- </modify-function>
-
- <modify-function signature="javaScriptPrompt(QWebFrame*,const QString &amp;,const QString &amp;,QString*)">
- <modify-argument index="4">
- <remove-argument />
- <conversion-rule class="native">
- <insert-template name="qstring_remove"/>
- </conversion-rule>
- </modify-argument>
- <modify-argument index="return">
- <replace-type modified-type="PySequence"/>
- <conversion-rule class="native">
- <insert-template name="pysequence_qstring"/>
- </conversion-rule>
- <conversion-rule class="target">
- <insert-template name="qstring_pytuple"/>
- </conversion-rule>
- </modify-argument>
- </modify-function>
-
- <add-function signature="qt_metacall()">
- <inject-code class="native" file="../glue/qtwebkitwidgets.cpp" snippet="qwebpage-qt-metacall"/>
- </add-function>
- </object-type>
-
- <value-type name="QWebHitTestResult"/>
-
- <object-type name="QGraphicsWebView" since="4.6"/>
- <object-type name="QWebInspector" since="4.6"/>
-</typesystem>
diff --git a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
index 506a6fc78..5383d9410 100644
--- a/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtWidgets/CMakeLists.txt
@@ -9,8 +9,6 @@ ${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}/qaction_wrapper.cpp
-${QtWidgets_GEN_DIR}/qactiongroup_wrapper.cpp
${QtWidgets_GEN_DIR}/qapplication_wrapper.cpp
${QtWidgets_GEN_DIR}/qboxlayout_wrapper.cpp
${QtWidgets_GEN_DIR}/qbuttongroup_wrapper.cpp
@@ -26,11 +24,9 @@ ${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}/qdesktopwidget_wrapper.cpp
${QtWidgets_GEN_DIR}/qdial_wrapper.cpp
${QtWidgets_GEN_DIR}/qdialog_wrapper.cpp
${QtWidgets_GEN_DIR}/qdialogbuttonbox_wrapper.cpp
-${QtWidgets_GEN_DIR}/qdirmodel_wrapper.cpp
${QtWidgets_GEN_DIR}/qdockwidget_wrapper.cpp
${QtWidgets_GEN_DIR}/qdoublespinbox_wrapper.cpp
${QtWidgets_GEN_DIR}/qerrormessage_wrapper.cpp
@@ -109,7 +105,6 @@ ${QtWidgets_GEN_DIR}/qmenu_wrapper.cpp
${QtWidgets_GEN_DIR}/qmenubar_wrapper.cpp
${QtWidgets_GEN_DIR}/qmessagebox_wrapper.cpp
${QtWidgets_GEN_DIR}/qmouseeventtransition_wrapper.cpp
-${QtWidgets_GEN_DIR}/qopenglwidget_wrapper.cpp
${QtWidgets_GEN_DIR}/qpangesture_wrapper.cpp
${QtWidgets_GEN_DIR}/qpinchgesture_wrapper.cpp
${QtWidgets_GEN_DIR}/qplaintextdocumentlayout_wrapper.cpp
@@ -124,7 +119,6 @@ ${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}/qshortcut_wrapper.cpp
${QtWidgets_GEN_DIR}/qsizegrip_wrapper.cpp
${QtWidgets_GEN_DIR}/qsizepolicy_wrapper.cpp
${QtWidgets_GEN_DIR}/qslider_wrapper.cpp
@@ -190,9 +184,6 @@ ${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}/qundocommand_wrapper.cpp
-${QtWidgets_GEN_DIR}/qundogroup_wrapper.cpp
-${QtWidgets_GEN_DIR}/qundostack_wrapper.cpp
${QtWidgets_GEN_DIR}/qundoview_wrapper.cpp
${QtWidgets_GEN_DIR}/qvboxlayout_wrapper.cpp
${QtWidgets_GEN_DIR}/qwhatsthis_wrapper.cpp
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index d2fc0705e..160082d07 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -235,7 +235,7 @@
<object-type name="QLayoutItem">
- <modify-function signature="widget()">
+ <modify-function signature="widget()const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
@@ -461,19 +461,6 @@
<enum-type name="SliderAction"/>
<enum-type name="SliderChange"/>
</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="QCheckBox"/>
<object-type name="QCommonStyle">
</object-type>
@@ -525,14 +512,6 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QDirModel" polymorphic-id-expression="qobject_cast&lt;QDirModel*&gt;(%1)">
- <enum-type name="Roles"/>
- <modify-function signature="setIconProvider(QFileIconProvider*)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
- </modify-argument>
- </modify-function>
- </object-type>
<object-type name="QFileIconProvider">
<enum-type name="IconType"/>
<enum-type name="Option" flags="Options"/>
@@ -638,8 +617,6 @@
<object-type name="QItemDelegate">
<!-- ### "doLayout(...)" is an internal method. -->
<modify-function signature="doLayout(QStyleOptionViewItem,QRect*,QRect*,QRect*,bool)const" remove="all"/>
- <!-- ### "selected(QPixmap,QPalette,bool)" is an internal method. -->
- <modify-function signature="selected(QPixmap,QPalette,bool)const" remove="all"/>
<!-- ### -->
<modify-function signature="drawCheck(QPainter*,QStyleOptionViewItem,QRect,Qt::CheckState)const">
<modify-argument index="1" invalidate-after-use="yes"/>
@@ -963,15 +940,6 @@
</modify-function>
</object-type>
- <object-type name="QShortcut">
- <add-function signature="QShortcut(QKeySequence&amp;,QWidget*,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>
<object-type name="QSpacerItem"/>
<object-type name="QStatusBar">
<modify-function signature="addWidget(QWidget*,int)">
@@ -1078,40 +1046,6 @@
</modify-argument>
</modify-function>
</object-type>
- <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>
<object-type name="QUndoView">
<modify-function signature="setGroup(QUndoGroup*)">
<modify-argument index="1">
@@ -1252,8 +1186,6 @@
<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"/>
- <!-- Qt5: obsolete -->
- <modify-function signature="getRgba(unsigned int,bool*,QWidget*)" remove="all"/>
</object-type>
<object-type name="QLayout">
@@ -1562,16 +1494,6 @@
</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;)" 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="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/>
@@ -2024,7 +1946,7 @@
<object-type name="QWidget" delete-in-main-thread="true">
<!-- see QWindow::nativeEvent(), QAbstractNativeEventFilter::nativeEventFilter() -->
- <modify-function signature="nativeEvent(const QByteArray &amp;,void*,long*)">
+ <modify-function signature="nativeEvent(const QByteArray &amp;,void*,qintptr*)">
<modify-argument index="3">
<remove-argument/>
<conversion-rule class="native">
@@ -2225,33 +2147,6 @@
</modify-argument>
</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>
<modify-function signature="insertAction(QAction*,QAction*)">
<modify-argument index="2">
<parent index="this" action="add"/>
@@ -2706,28 +2601,6 @@
</modify-argument>
</modify-function>
<modify-function signature="del()" rename="del_"/>
- <modify-function signature="getTextMargins(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>
- </modify-function>
<add-function signature="addAction(QAction*)">
<inject-code class="target" position="beginning" file="../glue/qtwidgets.cpp" snippet="qlineedit-addaction"/>
@@ -2738,9 +2611,6 @@
<enum-type name="Mode"/>
<enum-type name="SegmentStyle"/>
</object-type>
- <object-type name="QOpenGLWidget">
- <enum-type name="UpdateBehavior"/>
- </object-type>
<object-type name="QSplashScreen">
<!-- Override QWidget.painter -->
<modify-function signature="repaint()" remove="all"/>
@@ -2761,7 +2631,6 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QDesktopWidget"/>
<object-type name="QFrame">
<enum-type name="Shadow"/>
<enum-type name="Shape"/>
@@ -2782,7 +2651,7 @@
sys.exit(app.exec_())
</inject-documentation>
</modify-function>
- <modify-function signature="valueChanged(QString)">
+ <modify-function signature="textChanged(QString)">
<inject-documentation mode="append" format="target">
::
@@ -2943,20 +2812,8 @@
</modify-function>
<modify-function signature="print(QPagedPaintDevice*)const" rename="print_"/>
</object-type>
- <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="QApplication">
- <enum-type name="ColorSpec"/>
<extra-includes>
<include file-name="QBasicTimer" location="global"/>
<include file-name="QFont" location="global"/>
diff --git a/sources/pyside2/PySide2/glue/qtcore.cpp b/sources/pyside2/PySide2/glue/qtcore.cpp
index a0ca23662..6d8c0876d 100644
--- a/sources/pyside2/PySide2/glue/qtcore.cpp
+++ b/sources/pyside2/PySide2/glue/qtcore.cpp
@@ -647,8 +647,10 @@ if (%PYARG_0 == Py_None)
// @snippet qline-hash
namespace PySide {
- template<> inline Py_ssize_t hash(const QLine &v) {
- return qHash(qMakePair(qMakePair(v.x1(), v.y1()), qMakePair(v.x2(), v.y2())));
+ 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
@@ -723,8 +725,9 @@ namespace PySide {
// @snippet qrect
namespace PySide {
- template<> inline Py_ssize_t hash(const QRect &v) {
- return qHash(qMakePair(qMakePair(v.x(), v.y()), qMakePair(v.width(), v.height())));
+ 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
@@ -801,11 +804,6 @@ static QObject *_findChildHelper(const QObject *parent, const QString &name, PyT
return nullptr;
}
-static inline bool _findChildrenComparator(const QObject *&child, const QRegExp &name)
-{
- return name.indexIn(child->objectName()) != -1;
-}
-
static inline bool _findChildrenComparator(const QObject *&child, const QRegularExpression &name)
{
return name.match(child->objectName()).hasMatch();
diff --git a/sources/pyside2/PySide2/glue/qtgui.cpp b/sources/pyside2/PySide2/glue/qtgui.cpp
index a6b45b7c0..2a139fe69 100644
--- a/sources/pyside2/PySide2/glue/qtgui.cpp
+++ b/sources/pyside2/PySide2/glue/qtgui.cpp
@@ -144,7 +144,7 @@ for (int i = 0, i_max = %CPPSELF.count(); i < i_max; ++i){
// @snippet qpixmap
// @snippet qimage-constbits
-%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.byteCount());
+%PYARG_0 = Shiboken::Buffer::newObject(%CPPSELF.%FUNCTION_NAME(), %CPPSELF.sizeInBytes());
// @snippet qimage-constbits
// @snippet qimage-bits
diff --git a/sources/pyside2/PySide2/pysideqtesttouch.h b/sources/pyside2/PySide2/pysideqtesttouch.h
index 115c7835e..7c08fbc02 100644
--- a/sources/pyside2/PySide2/pysideqtesttouch.h
+++ b/sources/pyside2/PySide2/pysideqtesttouch.h
@@ -142,12 +142,12 @@ namespace QTest
private:
#ifdef QT_WIDGETS_LIB
- PySideQTouchEventSequence(QWidget *widget, QTouchDevice *aDevice, bool autoCommit)
+ PySideQTouchEventSequence(QWidget *widget, QInputDevice *aDevice, bool autoCommit)
: targetWidget(widget), targetWindow(0), device(aDevice), commitWhenDestroyed(autoCommit)
{
}
#endif
- PySideQTouchEventSequence(QWindow *window, QTouchDevice *aDevice, bool autoCommit)
+ PySideQTouchEventSequence(QWindow *window, QInputDevice *aDevice, bool autoCommit)
:
#ifdef QT_WIDGETS_LIB
targetWidget(0),
@@ -195,18 +195,18 @@ private:
QWidget *targetWidget;
#endif
QWindow *targetWindow;
- QTouchDevice *device;
+ QInputDevice *device;
bool commitWhenDestroyed;
#ifdef QT_WIDGETS_LIB
- friend PySideQTouchEventSequence *generateTouchEvent(QWidget *, QTouchDevice *, bool);
+ friend PySideQTouchEventSequence *generateTouchEvent(QWidget *, QInputDevice *, bool);
#endif
- friend PySideQTouchEventSequence *generateTouchEvent(QWindow *, QTouchDevice *, bool);
+ friend PySideQTouchEventSequence *generateTouchEvent(QWindow *, QInputDevice *, bool);
};
#ifdef QT_WIDGETS_LIB
inline
PySideQTouchEventSequence *generateTouchEvent(QWidget *widget,
- QTouchDevice *device,
+ QInputDevice *device,
bool autoCommit = true)
{
return new PySideQTouchEventSequence(widget, device, autoCommit);
@@ -214,7 +214,7 @@ private:
#endif
inline
PySideQTouchEventSequence *generateTouchEvent(QWindow *window,
- QTouchDevice *device,
+ QInputDevice *device,
bool autoCommit = true)
{
return new PySideQTouchEventSequence(window, device, autoCommit);
diff --git a/sources/pyside2/PySide2/templates/core_common.xml b/sources/pyside2/PySide2/templates/core_common.xml
index 6d02428ad..b6fb72a2f 100644
--- a/sources/pyside2/PySide2/templates/core_common.xml
+++ b/sources/pyside2/PySide2/templates/core_common.xml
@@ -242,8 +242,8 @@
<!-- Helpers for modifying "bool nativeEventFilter(QByteArray, void*, long *result)"
to return a tuple of bool,long -->
<template name="return_native_eventfilter_conversion_variables">
- long resultVar{0};
- long *%out = &amp;resultVar;
+ qintptr resultVar{0};
+ qintptr *%out = &amp;resultVar;
</template>
<template name="return_native_eventfilter_conversion">
%RETURN_TYPE %out = false;
diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h
index bdb7bcf22..d2cda4aa2 100644
--- a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h
+++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.h
@@ -48,7 +48,8 @@
**
****************************************************************************/
-from PySide2.QtWidgets import (QAction, QApplication, QMainWindow, QMenu,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QMainWindow, QMenu,
QPlainTextEdit, QSessionManager)
diff --git a/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp b/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp
deleted file mode 100644
index 79dc15177..000000000
--- a/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebinspector_snippet.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$
-**
-****************************************************************************/
-
-def wrapInFunction():
-//! [0]
- # ...
- page = QWebPage()
- # ...
-
- inspector = QWebInspector()
- inspector.setPage(page)
-//! [0]
-
diff --git a/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebview_snippet.cpp b/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebview_snippet.cpp
deleted file mode 100644
index 268f4344e..000000000
--- a/sources/pyside2/doc/codesnippets/webkitsnippets/qtwebkit_qwebview_snippet.cpp
+++ /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 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$
-**
-****************************************************************************/
-
-def wrapInFunction():
-//! [0]
- view.page().history()
-//! [0]
-
-
-//! [1]
- view.page().settings()
-//! [1]
-
-
-//! [2]
- view.triggerAction(QWebPage.Copy)
-//! [2]
-
-
-//! [3]
- view.page().triggerPageAction(QWebPage.Stop)
-//! [3]
-
-
-//! [4]
- view.page().triggerPageAction(QWebPage.GoBack)
-//! [4]
-
-
-//! [5]
- view.page().triggerPageAction(QWebPage.GoForward)
-//! [5]
-
diff --git a/sources/pyside2/doc/codesnippets/webkitsnippets/simple/main.cpp b/sources/pyside2/doc/codesnippets/webkitsnippets/simple/main.cpp
deleted file mode 100644
index 1382cd446..000000000
--- a/sources/pyside2/doc/codesnippets/webkitsnippets/simple/main.cpp
+++ /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 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$
-**
-****************************************************************************/
-
-from PySide2.QtCore import *
-from PySide2.QtGui import *
-from PySide2.QtWebKit import *
-import sys
-
-app = QApplication(sys.argv)
-parent = None
-//! [Using QWebView]
-view = QWebView(parent)
-view.load(QUrl("http://qt-project.org/"))
-view.show()
-//! [Using QWebView]
-sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/codesnippets/webkitsnippets/webelement/main.cpp b/sources/pyside2/doc/codesnippets/webkitsnippets/webelement/main.cpp
deleted file mode 100644
index 67e101ae0..000000000
--- a/sources/pyside2/doc/codesnippets/webkitsnippets/webelement/main.cpp
+++ /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 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$
-**
-****************************************************************************/
-
-def traverse():
-//! [Traversing with QWebElement]
- frame.setHtml("<html><body><p>First Paragraph</p><p>Second Paragraph</p></body></html>")
- doc = frame.documentElement()
- body = doc.firstChild()
- firstParagraph = body.firstChild()
- secondParagraph = firstParagraph.nextSibling()
-//! [Traversing with QWebElement]
-
-def findButtonAndClick():
- frame.setHtml("<form name=\"myform\" action=\"submit_form.asp\" method=\"get\">" \
- "<input type=\"text\" name=\"myfield\">" \
- "<input type=\"submit\" value=\"Submit\">" \
- "</form>")
-
-//! [Calling a DOM element method]
-
- document = frame.documentElement()
- # Assume that the document has the following structure:
- #
- # <form name="myform" action="submit_form.asp" method="get">
- # <input type="text" name="myfield">
- # <input type="submit" value="Submit">
- # </form>
-
- button = document.findFirst("input[type=submit]")
- button.evaluateJavaScript("click()")
-
-//! [Calling a DOM element method]
-
-def autocomplete1():
- document = frame.documentElement()
-//! [autocomplete1]
- firstTextInput = document.findFirst("input[type=text]")
- storedText = firstTextInput.attribute("value")
-//! [autocomplete1]
-
-def autocomplete2():
- document = frame.documentElement()
- storedText = "text"
-
-//! [autocomplete2]
- firstTextInput = document.findFirst("input[type=text]")
- textInput.setAttribute("value", storedText)
-//! [autocomplete2]
-
-def findAll():
-//! [FindAll]
- document = frame.documentElement()
- # Assume the document has the following structure:
- #
- # <p class=intro>
- # <span>Intro</span>
- # <span>Snippets</span>
- # </p>
- # <p>
- # <span>Content</span>
- # <span>Here</span>
- # </p>
-
-//! [FindAll intro]
- allSpans = document.findAll("span")
- introSpans = document.findAll("p.intro span")
-//! [FindAll intro] //! [FindAll]
diff --git a/sources/pyside2/doc/codesnippets/webkitsnippets/webpage/main.cpp b/sources/pyside2/doc/codesnippets/webkitsnippets/webpage/main.cpp
deleted file mode 100644
index b64a4f35b..000000000
--- a/sources/pyside2/doc/codesnippets/webkitsnippets/webpage/main.cpp
+++ /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 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]
-class Thumbnailer (QObject):
- def __init__(self, url):
-//! [1]
- QObject.__init__(self)
- self.page = QWebPage()
- self.page.mainFrame().load(url)
- page.loadFinished[bool].connect(self.render)
-//! [1]
-
- finished = Signal()
-
-//! [2]
- def render(self):
- self.page.setViewportSize(self.page.mainFrame().contentsSize())
- image = QImage(self.page.viewportSize(), QImage.Format_ARGB32)
- painter = QPainter(image)
-
- self.page.mainFrame().render(painter)
- painter.end()
-
- thumbnail = image.scaled(400, 400)
- thumbnail.save("thumbnail.png")
-
- self.finished.emit()
-//! [2]
-//! [0]
-
-app = QApplication(sys.argv)
-
-thumbnail = Thumbnailer(QUrl("http://qt-project.org"))
-thumbnail.finished.connect(app.quit)
-sys.exit(app.exec_())
diff --git a/sources/pyside2/doc/extras/QtWebKit.rst b/sources/pyside2/doc/extras/QtWebKit.rst
deleted file mode 100644
index 58f9230a7..000000000
--- a/sources/pyside2/doc/extras/QtWebKit.rst
+++ /dev/null
@@ -1,94 +0,0 @@
-QtWebKit provides a Web browser engine that makes it easy to embed content from the World Wide Web into your Qt application. At the same time Web content can be enhanced with native controls.
-
-QtWebKit provides facilities for rendering of HyperText Markup Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript.
-
-A bridge between the JavaScript execution environment and the Qt object model makes it possible for custom QObjects to be scripted. Integration with the Qt networking module enables Web pages to be transparently loaded from Web servers, the local file system or even the Qt resource system.
-
-In addition to providing pure rendering features, HTML documents can be made fully editable to the user through the use of the contenteditable attribute on HTML elements.
-
-QtWebKit is based on the Open Source WebKit engine. More information about WebKit itself can be found on the _`WebKit Open Source Project <http://webkit.org/>` Web site.
-
-Including In Your Project
--------------------------
-
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide2.QtWebKit
-
-
-.. note:: Web site icons, also known as "FavIcons", are currently not supported on Windows. We plan to address this in a future release.
-
-Architecture
-------------
-
-The easiest way to render content is through the QWebView class. As a widget it can be embedded into your forms or a graphics view, and it provides convenience functions for downloading and rendering web sites.
-
-::
-
- view = QWebView(parent)
- view.load(QUrl("http://qt.nokia.com/"))
- view.show()
-
-QWebView is used to view Web pages. An instance of QWebView has one QWebPage. QWebPage provides access to the document structure in a page, describing features such as frames, the navigation history, and the undo/redo stack for editable content.
-
-HTML documents can be nested using frames in a frameset. An individual frame in HTML is represented using the QWebFrame class. This class includes the bridge to the JavaScript window object and can be painted using QPainter. Each QWebPage has one QWebFrame object as its main frame, and the main frame may contain many child frames.
-
-Individual elements of an HTML document can be accessed via DOM JavaScript interfaces from within a web page. The equivalent of this API in QtWebKit is represented by QWebElement. QWebElement objects are obtained using QWebFrame's findAllElements() and findFirstElement() functions with CSS selector queries.
-
-Common web browser features, defaults and other settings can be configured through the QWebSettings class. It is possible to provide defaults for all QWebPage instances through the default settings. Individual attributes can be overidden by the page specific settings object.
-
-Netscape Plugin Support
------------------------
-
-.. note:: Netscape plugin support is only available on desktop platforms.
-
-Since WebKit supports the Netscape Plugin API, Qt applications can display Web pages that embed common plugins on platforms for which those plugins are available. To enable plugin support, the user must have the appropriate binary files for those plugins installed and the ``QWebSettings.PluginsEnabled`` attribute must be enabled for the application.
-
-The following locations are searched for plugins:
-
-* Linux/Unix (X11)
- * .mozilla/plugins in the user's home directory
- * .netscape/plugins in the user's home directory
- * System locations, such as
- * /usr/lib/browser/plugins
- * /usr/local/lib/mozilla/plugins
- * /usr/lib/firefox/plugins
- * /usr/lib64/browser-plugins
- * /usr/lib/browser-plugins
- * /usr/lib/mozilla/plugins
- * /usr/local/netscape/plugins
- * /opt/mozilla/plugins
- * /opt/mozilla/lib/plugins
- * /opt/netscape/plugins
- * /opt/netscape/communicator/plugins
- * /usr/lib/netscape/plugins
- * /usr/lib/netscape/plugins-libc5
- * /usr/lib/netscape/plugins-libc6
- * /usr/lib64/netscape/plugins
- * /usr/lib64/mozilla/plugins
- * Locations specified by environment variables:
- * $MOZILLA_HOME/plugins
- * $MOZ_PLUGIN_PATH
- * $QTWEBKIT_PLUGIN_PATH
-* Windows
- * The user's Application Data\Mozilla\plugins directory
- * Standard system locations of plugins for Quicktime, Flash, etc.
-* Mac OS X
- * Library/Internet Plug-Ins in the user's home directory
- * The system /Library/Internet Plug-Ins directory
-
-License Information
--------------------
-
-Qt Commercial Edition licensees that wish to distribute applications that use the QtWebKit 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.
-WebKit 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. \ No newline at end of file
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
index 64f831e5d..656609a55 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize3/main_window.py
@@ -39,8 +39,8 @@
#############################################################################
from PySide2.QtCore import Slot, qApp
-from PySide2.QtGui import QKeySequence
-from PySide2.QtWidgets import QMainWindow, QAction
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.QtWidgets import QMainWindow
class MainWindow(QMainWindow):
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
index 9f7c6814f..2157b7b15 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize4/main_window.py
@@ -39,8 +39,8 @@
#############################################################################
from PySide2.QtCore import Slot, qApp
-from PySide2.QtGui import QKeySequence
-from PySide2.QtWidgets import QMainWindow, QAction
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.QtWidgets import QMainWindow
class MainWindow(QMainWindow):
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
index 4786365e8..30d6582ba 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize5/main_window.py
@@ -39,8 +39,8 @@
#############################################################################
from PySide2.QtCore import Slot, qApp
-from PySide2.QtGui import QKeySequence
-from PySide2.QtWidgets import QMainWindow, QAction
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.QtWidgets import QMainWindow
class MainWindow(QMainWindow):
diff --git a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
index c223aa69b..9e9ea8472 100644
--- a/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
+++ b/sources/pyside2/doc/tutorials/datavisualize/datavisualize6/main_window.py
@@ -39,8 +39,8 @@
#############################################################################
from PySide2.QtCore import Slot, qApp
-from PySide2.QtGui import QKeySequence
-from PySide2.QtWidgets import QMainWindow, QAction
+from PySide2.QtGui import QAction, QKeySequence
+from PySide2.QtWidgets import QMainWindow
class MainWindow(QMainWindow):
diff --git a/sources/pyside2/doc/tutorials/expenses/main.py b/sources/pyside2/doc/tutorials/expenses/main.py
index 6cc911671..d927f126c 100644
--- a/sources/pyside2/doc/tutorials/expenses/main.py
+++ b/sources/pyside2/doc/tutorials/expenses/main.py
@@ -40,8 +40,8 @@
import sys
from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+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
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py
index 0546bc9f3..9ffb2f9d0 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/02-expenses.py
@@ -39,7 +39,8 @@
#############################################################################
import sys
-from PySide2.QtWidgets import QAction, QApplication, QMainWindow
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QApplication, QMainWindow
class MainWindow(QMainWindow):
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py
index bc753309f..1cb2f0035 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/03-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import QAction, QApplication, QMainWindow
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QApplication, QMainWindow
from PySide2.QtCharts import QtCharts
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py
index 78e9b1d1d..80a5cb16f 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/04-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import QAction, QApplication, QMainWindow, QWidget
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QApplication, QMainWindow, QWidget
class Widget(QWidget):
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py
index 6fd515f40..a72f8d990 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/05-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QMainWindow,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QMainWindow,
QTableWidget, QTableWidgetItem, QWidget)
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py
index 38fa881bf..e2c32e5c6 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/06-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py
index 6b915806d..acc7edc7c 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/07-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py
index 2f18dff9f..a6003cb35 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/08-expenses.py
@@ -40,7 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py
index 6b5d87e2e..3f1aed2c9 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/09-expenses.py
@@ -40,8 +40,8 @@
import sys
from PySide2.QtCore import Slot
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+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
diff --git a/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py b/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py
index 6cc911671..2a7bddab0 100644
--- a/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py
+++ b/sources/pyside2/doc/tutorials/expenses/steps/10-expenses.py
@@ -40,8 +40,8 @@
import sys
from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QAction, QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
+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
diff --git a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
index 4bc4cf48b..8b0c7a6ad 100644
--- a/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
+++ b/sources/pyside2/doc/tutorials/portingguide/chapter3/bookwindow.py
@@ -40,7 +40,8 @@
from __future__ import print_function, absolute_import
-from PySide2.QtWidgets import (QAction, QAbstractItemView, qApp, QDataWidgetMapper,
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import (QAbstractItemView, qApp, QDataWidgetMapper,
QHeaderView, QMainWindow, QMessageBox)
from PySide2.QtGui import QKeySequence
from PySide2.QtSql import (QSqlRelation, QSqlRelationalTableModel, QSqlTableModel,
diff --git a/sources/pyside2/plugins/CMakeLists.txt b/sources/pyside2/plugins/CMakeLists.txt
index c9e652800..4daf81944 100644
--- a/sources/pyside2/plugins/CMakeLists.txt
+++ b/sources/pyside2/plugins/CMakeLists.txt
@@ -11,11 +11,7 @@ set(ui_plugin_moc
)
include_directories(${Qt${QT_MAJOR_VERSION}Designer_INCLUDE_DIRS})
-if (${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- qt6_wrap_cpp(MOC_FILES ${ui_plugin_moc})
-else()
- qt5_wrap_cpp(MOC_FILES ${ui_plugin_moc})
-endif()
+qt_wrap_cpp(MOC_FILES ${ui_plugin_moc})
add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
if(CMAKE_HOST_UNIX AND NOT CYGWIN)
diff --git a/sources/pyside2/tests/QtCore/CMakeLists.txt b/sources/pyside2/tests/QtCore/CMakeLists.txt
index 771e1aeef..c0ec2ef79 100644
--- a/sources/pyside2/tests/QtCore/CMakeLists.txt
+++ b/sources/pyside2/tests/QtCore/CMakeLists.txt
@@ -99,7 +99,6 @@ PYSIDE_TEST(qpoint_test.py)
PYSIDE_TEST(qprocess_test.py)
PYSIDE_TEST(qproperty_decorator.py)
PYSIDE_TEST(qrect_test.py)
-PYSIDE_TEST(qregexp_test.py)
PYSIDE_TEST(qregularexpression_test.py)
PYSIDE_TEST(qresource_test.py)
PYSIDE_TEST(qsettings_test.py)
@@ -113,7 +112,6 @@ PYSIDE_TEST(qstate_test.py)
PYSIDE_TEST(qstorageinfo_test.py)
PYSIDE_TEST(qstring_test.py)
PYSIDE_TEST(qsysinfo_test.py)
-PYSIDE_TEST(qtext_codec_test.py)
PYSIDE_TEST(qtextstream_test.py)
PYSIDE_TEST(qthread_prod_cons_test.py)
PYSIDE_TEST(qthread_signal_test.py)
diff --git a/sources/pyside2/tests/QtCore/qobject_parent_test.py b/sources/pyside2/tests/QtCore/qobject_parent_test.py
index 0a02fbc26..386209e8a 100644
--- a/sources/pyside2/tests/QtCore/qobject_parent_test.py
+++ b/sources/pyside2/tests/QtCore/qobject_parent_test.py
@@ -148,10 +148,6 @@ class ParentCase(unittest.TestCase):
res = parent.findChildren(QObject, QRegularExpression("^fo+"))
self.assertEqual(res, test_children)
- # test findChildren with a QRegExp (deprecated)
- res = parent.findChildren(QObject, QRegExp("^fo+"))
- self.assertEqual(res, test_children)
-
def testParentEquality(self):
#QObject.parent() == parent
parent = QObject()
diff --git a/sources/pyside2/tests/QtCore/qregexp_test.py b/sources/pyside2/tests/QtCore/qregexp_test.py
deleted file mode 100644
index a031137fd..000000000
--- a/sources/pyside2/tests/QtCore/qregexp_test.py
+++ /dev/null
@@ -1,55 +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 QRegExp
-
-class QRegExpTest(unittest.TestCase):
-
- def testReplace1(self):
- re = QRegExp('a[mn]')
- string = re.replace('Banana', 'ox')
- self.assertEqual(string, 'Boxoxa')
-
- def testReplace2(self):
- re = QRegExp('<i>([^<]*)</i>')
- string = re.replace('A <i>bon mot</i>.', '\\emph{\\1}')
- self.assertEqual(string, 'A \\emph{bon mot}.')
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtCore/qtext_codec_test.py b/sources/pyside2/tests/QtCore/qtext_codec_test.py
deleted file mode 100644
index 9e41c38c6..000000000
--- a/sources/pyside2/tests/QtCore/qtext_codec_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 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 QTextCodec
-
-class TestCodecGetters(unittest.TestCase):
-
- def testCodecsNames(self):
- for codec_name in QTextCodec.availableCodecs():
- codec = QTextCodec.codecForName(codec_name)
- self.assertTrue(type(codec), QTextCodec)
-
- def testCodecsMibs(self):
- for codec_num in QTextCodec.availableMibs():
- codec = QTextCodec.codecForMib(codec_num)
- self.assertTrue(type(codec), QTextCodec)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtCore/qtextstream_test.py b/sources/pyside2/tests/QtCore/qtextstream_test.py
index bd25367c3..d4bbd8479 100644
--- a/sources/pyside2/tests/QtCore/qtextstream_test.py
+++ b/sources/pyside2/tests/QtCore/qtextstream_test.py
@@ -38,7 +38,7 @@ init_test_paths(False)
import py3kcompat as py3k
-from PySide2.QtCore import QByteArray, QTextStream, QIODevice, QTextCodec, QFile
+from PySide2.QtCore import QByteArray, QTextStream, QIODevice, QFile
class QTextStreamShiftTest(unittest.TestCase):
@@ -61,14 +61,6 @@ class QTextStreamGetSet(unittest.TestCase):
def setUp(self):
self.obj = QTextStream()
-
- def testCodec(self):
- '''QTextStream set/get Codec'''
-
- codec = QTextCodec.codecForName('ISO8859-1')
- self.obj.setCodec(codec)
- self.assertEqual(codec, self.obj.codec())
-
def testDevice(self):
'''QTextStream get/set Device'''
device = QFile()
@@ -83,7 +75,6 @@ class QTextStreamInitialization(unittest.TestCase):
'''QTextStream construction'''
obj = QTextStream()
- self.assertEqual(obj.codec(), QTextCodec.codecForLocale())
self.assertEqual(obj.device(), None)
self.assertEqual(obj.string(), None)
diff --git a/sources/pyside2/tests/QtCore/qurlquery_test.py b/sources/pyside2/tests/QtCore/qurlquery_test.py
index ac7ab69b0..6e538c919 100644
--- a/sources/pyside2/tests/QtCore/qurlquery_test.py
+++ b/sources/pyside2/tests/QtCore/qurlquery_test.py
@@ -45,8 +45,6 @@ class QUrlQueryTest(unittest.TestCase):
def testConstructing(self):
empty = QUrlQuery()
self.assertTrue(empty.isEmpty())
- self.assertEqual(empty.queryPairDelimiter(), QUrlQuery.defaultQueryPairDelimiter())
- self.assertEqual(empty.queryValueDelimiter(), QUrlQuery.defaultQueryValueDelimiter())
empty.clear();
self.assertTrue(empty.isEmpty())
diff --git a/sources/pyside2/tests/QtGui/CMakeLists.txt b/sources/pyside2/tests/QtGui/CMakeLists.txt
index 172703ab9..179e88fd6 100644
--- a/sources/pyside2/tests/QtGui/CMakeLists.txt
+++ b/sources/pyside2/tests/QtGui/CMakeLists.txt
@@ -26,8 +26,6 @@ PYSIDE_TEST(qfontmetrics_test.py)
PYSIDE_TEST(qguiapplication_test.py)
PYSIDE_TEST(qicon_test.py)
PYSIDE_TEST(qitemselection_test.py)
-PYSIDE_TEST(qmatrix_test.py)
-PYSIDE_TEST(qopenglbuffer_test.py)
PYSIDE_TEST(qpainter_test.py)
PYSIDE_TEST(qpdfwriter_test.py)
PYSIDE_TEST(qpixelformat_test.py)
@@ -37,7 +35,6 @@ PYSIDE_TEST(qpolygonf_test.py)
PYSIDE_TEST(qkeysequence_test.py)
PYSIDE_TEST(qradialgradient_test.py)
PYSIDE_TEST(qrasterwindow_test.py)
-PYSIDE_TEST(qopenglwindow_test.py)
PYSIDE_TEST(qregion_test.py)
PYSIDE_TEST(qstylehints_test.py)
PYSIDE_TEST(qtextdocument_functions.py)
diff --git a/sources/pyside2/tests/QtGui/deepcopy_test.py b/sources/pyside2/tests/QtGui/deepcopy_test.py
index d4dcdd64c..0fa82150f 100644
--- a/sources/pyside2/tests/QtGui/deepcopy_test.py
+++ b/sources/pyside2/tests/QtGui/deepcopy_test.py
@@ -36,7 +36,6 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide2.QtCore import QPoint
-from PySide2.QtGui import QMatrix
from PySide2.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
from PySide2.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
from PySide2.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
@@ -81,7 +80,7 @@ class QColorCMYKDeepCopy(DeepCopyColorHelperF, unittest.TestCase):
class QTransformDeepCopy(DeepCopyHelper, unittest.TestCase):
def setUp(self):
- self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8)
+ self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
class QKeySequenceDeepCopy(DeepCopyHelper, unittest.TestCase):
def setUp(self):
@@ -107,10 +106,6 @@ class QPolygonDeepCopy(DeepCopyHelper, unittest.TestCase):
def setUp(self):
self.original = QPolygon([QPoint(1, 2), QPoint(3, 4), QPoint(5, 6)])
-class QMatrixDeepCopy(DeepCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix(1, 2, 3, 4, 5, 6)
-
# Avoid these tests until get gcc fixed
# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
diff --git a/sources/pyside2/tests/QtGui/qmatrix_test.py b/sources/pyside2/tests/QtGui/qmatrix_test.py
deleted file mode 100644
index 48380faf6..000000000
--- a/sources/pyside2/tests/QtGui/qmatrix_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.QtCore import QPoint
-from PySide2.QtGui import QMatrix, QMatrix2x2, QMatrix4x4
-
-
-def qpointTimesQMatrix(point, matrix):
- '''As seen in "QPoint QMatrix::map(const QPoint &p) const" C++ implementation.'''
- return QPoint(matrix.m11() * point.x() + matrix.m21() * point.y() + matrix.dx(),
- matrix.m12() * point.x() + matrix.m22() * point.y() + matrix.dy())
-
-class QMatrixTest(unittest.TestCase):
-
- def testMatrix(self):
- matrix = QMatrix(11, 12, 21, 22, 100, 200)
- point = QPoint(3, 3)
- self.assertEqual(matrix.map(point), qpointTimesQMatrix(point, matrix))
-
- def testMatrixWithWrongType(self):
- matrix = QMatrix(11, 12, 21, 22, 100, 200)
- point = QPoint(3, 3)
- # This exception may move from a TypeError to a ValueError.
- self.assertRaises((TypeError, ValueError), matrix.__mul__, point)
-
- def testMatrix2x2(self):
- matrix = QMatrix2x2([1.0, 2.0, 3.0, 4.0])
-
- expectedTransposed = QMatrix2x2([1.0, 3.0, 2.0, 4.0])
- self.assertEqual(matrix.transposed(), expectedTransposed)
-
- expectedMultiplied = QMatrix2x2([2.0, 4.0, 6.0, 8.0])
- matrix *= 2.0
- self.assertEqual(matrix, expectedMultiplied)
-
- matrix.setToIdentity()
- self.assertTrue(matrix.isIdentity())
-
- def testMatrix4x4(self):
- self.assertRaises(TypeError, QMatrix4x4, [0.0, 1.0, 2.0, 3.0])
- self.assertRaises(TypeError, QMatrix4x4, [0.0, 1.0, 2.0, 'I',
- 4.0, 5.0, 6.0, 7.0,
- 8.0, 9.0, 'N', 11.0,
- 12.0, 'd', 14.0, 'T'])
-
- my_data = [0.0, 1.0, 2.0, 3.0,
- 4.0, 5.0, 6.0, 7.0,
- 8.0, 9.0, 10.0, 11.0,
- 12.0, 13.0, 14.0, 15.0]
- my_datac = [0.0, 4.0, 8.0, 12.0,
- 1.0, 5.0, 9.0, 13.0,
- 2.0, 6.0, 10.0, 14.0,
- 3.0, 7.0, 11.0, 15.0]
-
- m = QMatrix4x4(my_data)
- d = m.data()
- self.assertTrue(my_datac, d)
-
- d = m.copyDataTo()
- self.assertTrue(my_data == list(d))
-
- def testMatrixMapping(self):
- m = QMatrix(1.0, 2.0, 1.0, 3.0, 100.0, 200.0)
- res = m.map(5, 5)
- self.assertAlmostEqual(res[0], 5 * 1.0 + 5 * 1.0 + 100.0)
- self.assertAlmostEqual(res[1], 5 * 2.0 + 5 * 3.0 + 200.0)
- res = m.map(5.0, 5.0)
- self.assertAlmostEqual(res[0], 5.0 * 1.0 + 5.0 * 1.0 + 100.0)
- self.assertAlmostEqual(res[1], 5.0 * 2.0 + 5.0 * 3.0 + 200.0)
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtGui/qtextdocument_functions.py b/sources/pyside2/tests/QtGui/qtextdocument_functions.py
index 765a6b5b7..bd1462049 100644
--- a/sources/pyside2/tests/QtGui/qtextdocument_functions.py
+++ b/sources/pyside2/tests/QtGui/qtextdocument_functions.py
@@ -35,7 +35,6 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide2.QtGui import Qt
-from PySide2.QtCore import QTextCodec
class QTextDocumentFunctions(unittest.TestCase):
@@ -45,8 +44,6 @@ class QTextDocumentFunctions(unittest.TestCase):
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>')
- codec = Qt.codecForHtml(b'bla')
- self.assertTrue(codec)
if __name__ == '__main__':
diff --git a/sources/pyside2/tests/QtGui/repr_test.py b/sources/pyside2/tests/QtGui/repr_test.py
index e06f4d487..770c9d5bd 100644
--- a/sources/pyside2/tests/QtGui/repr_test.py
+++ b/sources/pyside2/tests/QtGui/repr_test.py
@@ -36,7 +36,6 @@ init_test_paths(False)
import PySide2
from PySide2.QtCore import QPoint
-from PySide2.QtGui import QMatrix
from PySide2.QtGui import QMatrix2x2, QMatrix2x3, QMatrix2x4
from PySide2.QtGui import QMatrix3x2, QMatrix3x3, QMatrix3x4
from PySide2.QtGui import QMatrix4x2, QMatrix4x3, QMatrix4x4
@@ -52,7 +51,7 @@ class ReprCopyHelper:
class QTransformReprCopy(ReprCopyHelper, unittest.TestCase):
def setUp(self):
- self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8)
+ self.original = QTransform(1, 2, 3, 4, 5, 6, 7, 8, 9)
class QKeySequenceReprCopy(ReprCopyHelper, unittest.TestCase):
def setUp(self):
@@ -74,10 +73,6 @@ class QVector4DReprCopy(ReprCopyHelper, unittest.TestCase):
def setUp(self):
self.original = QVector4D(1, 2, 3, 4)
-class QMatrixReprCopy(ReprCopyHelper, unittest.TestCase):
- def setUp(self):
- self.original = QMatrix(1, 2, 3, 4, 5, 6)
-
# Avoid these tests until get gcc fixed
# Related bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247
diff --git a/sources/pyside2/tests/QtNetwork/bug_446.py b/sources/pyside2/tests/QtNetwork/bug_446.py
index f15ff01f9..e94bef510 100644
--- a/sources/pyside2/tests/QtNetwork/bug_446.py
+++ b/sources/pyside2/tests/QtNetwork/bug_446.py
@@ -49,7 +49,7 @@ class HttpSignalsCase(UsesQCoreApplication):
def onNewConnection(self):
self.serverConnection = self.server.nextPendingConnection()
- self.serverConnection.error.connect(self.onError)
+ self.serverConnection.errorOccurred.connect(self.onError)
self.serverConnection.write(HttpSignalsCase.DATA)
self.server.close()
diff --git a/sources/pyside2/tests/QtOpenGL/CMakeLists.txt b/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
index b37a9ddce..a0e8d0053 100644
--- a/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
+++ b/sources/pyside2/tests/QtOpenGL/CMakeLists.txt
@@ -1,2 +1,4 @@
PYSIDE_TEST(qglbuffer_test.py)
PYSIDE_TEST(qglwidget_test.py)
+PYSIDE_TEST(qopenglbuffer_test.py)
+PYSIDE_TEST(qopenglwindow_test.py)
diff --git a/sources/pyside2/tests/QtGui/qopenglbuffer_test.py b/sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py
index a5d8385c9..a5d8385c9 100644
--- a/sources/pyside2/tests/QtGui/qopenglbuffer_test.py
+++ b/sources/pyside2/tests/QtOpenGL/qopenglbuffer_test.py
diff --git a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
index 573ca9940..0a3a72fc0 100644
--- a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
+++ b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py
@@ -71,12 +71,6 @@ class ReturnsQuadruplesOfNumbers(UsesQApplication):
obj = GraphicsLayoutItem()
self.assertTrue(self.compareTuples(obj.getContentsMargins(), (0.0, 0.0, 0.0, 0.0)))
- def testQWidgetGetContentsMargins(self):
- obj = QWidget()
- values = (10, 20, 30, 40)
- obj.setContentsMargins(*values)
- self.assertTrue(self.compareTuples(obj.getContentsMargins(), values))
-
def testQLayoutGetContentsMargins(self):
obj = Layout()
values = (10, 20, 30, 40)
diff --git a/sources/pyside2/tests/QtUiTools/bug_392.py b/sources/pyside2/tests/QtUiTools/bug_392.py
index 2439e7203..07db9802e 100644
--- a/sources/pyside2/tests/QtUiTools/bug_392.py
+++ b/sources/pyside2/tests/QtUiTools/bug_392.py
@@ -53,7 +53,7 @@ class BugTest(UsesQApplication):
filePath = os.path.join(os.path.dirname(__file__), 'action.ui')
result = loader.load(filePath, w)
- self.assertTrue(isinstance(result.actionFoo, QtWidgets.QAction))
+ self.assertTrue(isinstance(result.actionFoo, QtGui.QAction))
def testPythonCustomWidgets(self):
w = QtWidgets.QWidget()
diff --git a/sources/pyside2/tests/QtUiTools/bug_426.py b/sources/pyside2/tests/QtUiTools/bug_426.py
index e84da0382..15cfeee2b 100644
--- a/sources/pyside2/tests/QtUiTools/bug_426.py
+++ b/sources/pyside2/tests/QtUiTools/bug_426.py
@@ -42,7 +42,7 @@ class Window(object):
loader = QUiLoader()
filePath = os.path.join(os.path.dirname(__file__), 'bug_426.ui')
self.widget = loader.load(filePath)
- self.group = QtWidgets.QActionGroup(self.widget)
+ self.group = QtGui.QActionGroup(self.widget)
self.widget.show()
QtCore.QTimer.singleShot(0, self.widget.close)
diff --git a/sources/pyside2/tests/QtWebKit/CMakeLists.txt b/sources/pyside2/tests/QtWebKit/CMakeLists.txt
deleted file mode 100644
index 7fab64773..000000000
--- a/sources/pyside2/tests/QtWebKit/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-PYSIDE_TEST(bug_448.py)
-PYSIDE_TEST(bug_694.py)
-PYSIDE_TEST(bug_803.py)
-PYSIDE_TEST(bug_899.py)
-PYSIDE_TEST(bug_959.py)
-PYSIDE_TEST(qvariantlist_property_test.py)
-PYSIDE_TEST(qml_plugin_test.py)
-PYSIDE_TEST(shouldInterruptjavascript_test.py)
-PYSIDE_TEST(webpage_test.py)
-PYSIDE_TEST(webview_test.py)
-PYSIDE_TEST(webframe_test.py)
diff --git a/sources/pyside2/tests/QtWebKit/bug_448.py b/sources/pyside2/tests/QtWebKit/bug_448.py
deleted file mode 100644
index 98ebb1958..000000000
--- a/sources/pyside2/tests/QtWebKit/bug_448.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 bug: http://bugs.openbossa.org/show_bug.cgi?id=448'''
-
-import os
-import sys
-import unittest
-
-sys.path.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.QtWebKit import QWebView
-
-class Bug448(unittest.TestCase):
- def onError(self, erros):
- pass
-
- def testReturnOwnership(self):
- app = QApplication(sys.argv)
- webview = QWebView()
- webview.page().networkAccessManager().sslErrors.connect(self.onError)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/bug_694.py b/sources/pyside2/tests/QtWebKit/bug_694.py
deleted file mode 100644
index b18d658f6..000000000
--- a/sources/pyside2/tests/QtWebKit/bug_694.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 PySide2.QtCore import *
-from PySide2.QtWidgets import *
-from PySide2.QtWebKit import *
-
-class ErrorPage (QWebPage):
-
- def __init__(self):
- QWebPage.__init__(self)
- self.rcv_extension = None
- self.rcv_url = None
- self.rcv_url_copy = None
- self.rcv_option_type = None
- self.rcv_output_type = None
-
-
- def supportsExtension(self, extension):
- return extension == QWebPage.ErrorPageExtension
-
- def extension(self, extension, option, output):
- self.rcv_extension = extension
- self.rcv_url = option.url
- self.rcv_url_copy = QUrl(option.url)
- self.rcv_option_type = type(option)
- self.rcv_output_type = type(output)
- return True
-
-class TestWebPageExtension(unittest.TestCase):
- def testIt(self):
- app = QApplication([])
- ep = ErrorPage()
- view = QWebView()
- view.setPage(ep)
- view.load("foo://bar") # Some malformmed url
- view.show()
-
- # If the timeout is 0 the webpage isn't even loaded on Qt4.6-i386, so we use 100 :-)
- QTimer.singleShot(100, app.quit)
- app.exec_()
-
- self.assertEqual(ep.rcv_extension, QWebPage.ErrorPageExtension)
- self.assertRaises(RuntimeError, ep.rcv_url.__str__)
-
- self.assertEqual(ep.rcv_url_copy, "foo://bar")
- self.assertEqual(ep.rcv_option_type, QWebPage.ErrorPageExtensionOption)
- self.assertEqual(ep.rcv_output_type, QWebPage.ErrorPageExtensionReturn)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/bug_803.py b/sources/pyside2/tests/QtWebKit/bug_803.py
deleted file mode 100644
index ec6f93c33..000000000
--- a/sources/pyside2/tests/QtWebKit/bug_803.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 *
-from PySide2.QtWebKit import *
-
-class TestBug803 (unittest.TestCase):
-
- def testIt(self):
- app = QApplication([])
- page = QWebPage()
- frame = page.mainFrame()
- frame.setHtml("<html><head></head><body><p>1</p><p>2</p></body></html>")
- elems = frame.findAllElements("p")
- self.assertEqual(len(elems), 2)
- self.assertEqual(elems[0].toPlainText(), "1")
- self.assertEqual(elems[1].toPlainText(), "2")
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/bug_899.py b/sources/pyside2/tests/QtWebKit/bug_899.py
deleted file mode 100644
index cb8e76784..000000000
--- a/sources/pyside2/tests/QtWebKit/bug_899.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 PySide2.QtCore import Property, QObject
-from PySide2.QtWebKit import QWebView
-from helper.timedqapplication import TimedQApplication
-
-class TestLambdaPropery(TimedQApplication):
-
- def testBug899(self):
- html = '''
- <html><body>
- <script type="text/javascript">
- document.write("<p>"+py_obj.list1+"</p>")
- document.write("<p>"+py_obj.list2+"</p>")
- </script>
- </body></html>
- '''
-
- class Obj(object):
- list1 = ['foo', 'bar', 'baz']
- list2 = ['fi', 'fo', 'fum']
-
- obj = Obj()
-
- wrapper_dict = {}
- for name in ('list1', 'list2'):
- getter = lambda arg=None, name=name: getattr(obj, name)
- wrapper_dict[name] = Property('QVariantList', getter)
- wrapper = type('PyObj', (QObject,), wrapper_dict)
-
- view = QWebView()
- view.page().mainFrame().addToJavaScriptWindowObject('py_obj', wrapper())
- view.setHtml(html)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/bug_959.py b/sources/pyside2/tests/QtWebKit/bug_959.py
deleted file mode 100644
index 5214ee1e1..000000000
--- a/sources/pyside2/tests/QtWebKit/bug_959.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## 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 PySide2.QtCore import QObject, Slot, QTimer
-from PySide2.QtWebKit import QWebView
-from PySide2.QtWidgets import QApplication
-from PySide2 import 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 helper.usesqapplication import UsesQApplication
-
-functionID = -1
-currentWebView = None
-
-class JSFuncs(QObject):
- @Slot(str,result=str)
- def slot_str_str(self, x):
- global functionID
- functionID = 0
- return x.upper()
-
- @Slot(str,result='QVariant')
- def slot_str_list(self, x):
- global functionID
- functionID = 1
- return [x, x]
-
- @Slot('QStringList',result=str)
- def slot_strlist_str(self, x):
- global functionID
- functionID = 2
- return x[-1]
-
- @Slot('QVariant',result=str)
- def slot_variant_str(self, x):
- global functionID
- functionID = 3
- return str(x)
-
- @Slot('QVariantList',result=str)
- def slot_variantlist_str(self, x):
- global functionID
- functionID = 4
- return str(x[-1])
-
- @Slot('QVariantMap',result=str)
- def slot_variantmap_str(self, x):
- global functionID
- functionID = 5
- return str(x["foo"])
-
-
-
-PAGE_DATA = "data:text/html,<!doctype html><html><body onload='%s'></body></html>"
-FUNCTIONS_LIST = ['jsfuncs.slot_str_str("hello")',
- 'jsfuncs.slot_str_list("hello")',
- 'jsfuncs.slot_strlist_str(["hello","world"])',
- 'jsfuncs.slot_variant_str("hello")',
- 'jsfuncs.slot_variantlist_str(["hello","world"])',
- 'jsfuncs.slot_variantmap_str({"foo": "bar"})']
-
-
-def onLoadFinished( result ):
- QTimer.singleShot( 100, createNextWebView )
-
-def createNextWebView():
- global functionID
-
- nListCount = len(FUNCTIONS_LIST) - 1
- functionID = functionID + 1
- print functionID
-
- if functionID < nListCount:
- createWebView( functionID )
- else:
- QTimer.singleShot(300, QApplication.instance().quit)
-
-
-def createWebView( nIndex ):
- global functionID
- global currentWebView
-
- functionID = nIndex
- currentWebView = QWebView()
- currentWebView._jsfuncs = JSFuncs()
- currentWebView.page().mainFrame().addToJavaScriptWindowObject("jsfuncs", currentWebView._jsfuncs)
- QObject.connect( currentWebView, QtCore.SIGNAL('loadFinished( bool )'), onLoadFinished )
- currentWebView.load(PAGE_DATA % FUNCTIONS_LIST[ nIndex ])
- currentWebView.show()
-
-class Bug959(UsesQApplication):
-
- def testJavaScriptInWebViewForCrash( self ):
- # wait for the webview load to be finished before creating the next webview
- # don't create the webview inside of onLoadFinished
- # also call onLoadFinished with the correct number of variables
- createNextWebView()
- self.app.exec_()
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/fox.html b/sources/pyside2/tests/QtWebKit/fox.html
deleted file mode 100644
index da873b1cc..000000000
--- a/sources/pyside2/tests/QtWebKit/fox.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
-<title>Title</title>
-<meta name="description" content="PySide Test METADATA." />
-<body>
-<p>The quick <b>brown</b> fox <i>jumps</i> over the lazy dog.</p>
-</body>
-</html>
diff --git a/sources/pyside2/tests/QtWebKit/qml_plugin_test.py b/sources/pyside2/tests/QtWebKit/qml_plugin_test.py
deleted file mode 100644
index 33497bdc1..000000000
--- a/sources/pyside2/tests/QtWebKit/qml_plugin_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 QUrl, QTimer
-from PySide2.QtWidgets import QApplication, QLabel
-from PySide2.QtWebKit import QWebPluginFactory, QWebView, QWebSettings
-
-from helper.usesqapplication import UsesQApplication
-
-class PluginFactory(QWebPluginFactory):
-
- def plugins(self):
- plugins = []
-
- mime = self.MimeType()
- mime.name = 'DummyFile'
- mime.fileExtensions = ['.pys']
-
- plugin = self.Plugin()
- plugin.name = 'DummyPlugin'
- plugin.mimeTypes = [mime]
-
- plugins.append(plugin)
-
- return plugins
-
- def create(self, mimeType, url, argumentNames, argumentValues):
- if mimeType != 'application/x-dummy':
- return None
-
- for name, value in zip(argumentNames, argumentValues):
- if name == 'text':
- text = value
- else:
- text = "Webkit plugins!"
-
- widget = QLabel(text)
- return widget
-
-class TestPlugin(UsesQApplication):
-
- def testPlugin(self):
- view = QWebView()
- fac = PluginFactory()
- view.page().setPluginFactory(fac)
- QWebSettings.globalSettings().setAttribute(QWebSettings.PluginsEnabled, True)
-
- view.load(QUrl(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'qmlplugin', 'index.html')))
-
- view.resize(840, 600)
- view.show()
-
- QTimer.singleShot(500, self.app.quit)
-
- self.app.exec_()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/qmlplugin/dummy.pys b/sources/pyside2/tests/QtWebKit/qmlplugin/dummy.pys
deleted file mode 100644
index 0b7469da4..000000000
--- a/sources/pyside2/tests/QtWebKit/qmlplugin/dummy.pys
+++ /dev/null
@@ -1 +0,0 @@
-Foobar!
diff --git a/sources/pyside2/tests/QtWebKit/qmlplugin/index.html b/sources/pyside2/tests/QtWebKit/qmlplugin/index.html
deleted file mode 100644
index db0d6b5b2..000000000
--- a/sources/pyside2/tests/QtWebKit/qmlplugin/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<html><body>
- <h1>Custom Plugin</h1>
- <object type="application/x-dummy" data="./dummy.pys" text="My text">
- </object>
-</body></html>
diff --git a/sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py b/sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py
deleted file mode 100644
index 6a51a6488..000000000
--- a/sources/pyside2/tests/QtWebKit/qvariantlist_property_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$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.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 PySide2.QtWebKit import QWebView
-from helper.timedqapplication import TimedQApplication
-
-class TestLoadFinished(TimedQApplication):
-
- def setUp(self):
- TimedQApplication.setUp(self, timeout=1000)
-
- def tearDown(self):
- TimedQApplication.tearDown(self)
-
- def testQVariantListProperty(self):
- class Obj(object):
- list = ['foo', 'bar', 'baz']
-
- obj = Obj()
-
- wrapper_dict = {}
- for name in ['list']:
- getter = lambda arg=None, name=name: getattr(obj, name)
- wrapper_dict[name] = Property('QVariantList', getter)
- wrapper = type('PyObj', (QObject,), wrapper_dict)
-
- view = QWebView()
- frame = view.page().mainFrame()
- frame.addToJavaScriptWindowObject('py_obj', wrapper())
-
- html = '''
- <html><body>
- <script type="text/javascript">
- document.write(py_obj.list)
- </script>
- </body></html>
- '''
- view.setHtml(html)
- view.show()
- self.app.exec_()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py b/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py
deleted file mode 100644
index 4db5adbb5..000000000
--- a/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py
+++ /dev/null
@@ -1,63 +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, QtWebKit
-
-from helper.usesqapplication import UsesQApplication
-
-class QWebPageHeadless(QtWebKit.QWebPage):
- # FIXME: This is not working, the slot is not overriden!
- # http://doc.qt.nokia.com/4.7-snapshot/qwebpage.html#shouldInterruptJavaScript
- @QtCore.Slot()
- def shouldInterruptJavaScript(self):
- self._interrupted = True
- QtCore.QTimer.singleShot(300, self._app.quit)
- return True
-
-class TestSlotOverride(UsesQApplication):
- def testFunctionCall(self):
- page = QWebPageHeadless()
- page._interrupted = False
- page._app = self.app
- page.mainFrame().setHtml('<script>while(1);</script>')
- self.app.exec_()
- self.assertTrue(page._interrupted)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/webframe_test.py b/sources/pyside2/tests/QtWebKit/webframe_test.py
deleted file mode 100644
index d46c1b229..000000000
--- a/sources/pyside2/tests/QtWebKit/webframe_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$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-sys.path.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, QUrl
-from PySide2.QtWebKit import *
-from PySide2.QtNetwork import QNetworkRequest
-
-from helper.helper import adjust_filename
-from helper.usesqapplication import UsesQApplication
-
-
-class TestWebFrame(UsesQApplication):
- def load_finished(self, ok):
- self.assertTrue(ok)
- page = self.view.page()
- self.assertTrue(page)
- frame = page.mainFrame()
- self.assertTrue(frame)
- meta = frame.metaData()
- self.assertEqual(meta['description'], ['PySide Test METADATA.'])
- self.app.quit()
-
- def testMetaData(self):
- self.view = QWebView()
- QObject.connect(self.view, SIGNAL('loadFinished(bool)'),
- self.load_finished)
- url = QUrl.fromLocalFile(adjust_filename('fox.html', __file__))
- self.view.setUrl(url)
- self.app.exec_()
-
-
-if __name__ == '__main__':
- unittest.main()
-
diff --git a/sources/pyside2/tests/QtWebKit/webpage_test.py b/sources/pyside2/tests/QtWebKit/webpage_test.py
deleted file mode 100644
index 0c37befa2..000000000
--- a/sources/pyside2/tests/QtWebKit/webpage_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$
-##
-#############################################################################
-
-'''Test cases for QWebPage'''
-
-import os
-import sys
-import unittest
-
-sys.path.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, QUrl
-from PySide2.QtWebKit import QWebPage
-from PySide2.QtNetwork import QNetworkAccessManager
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-#Define a global timeout because TimedQApplication uses a singleton!
-#Use a value big enough to run all the tests.
-TIMEOUT = 1000
-
-class TestFindText(TimedQApplication):
- '''Test cases for finding text'''
-
- def setUp(self):
- TimedQApplication.setUp(self, timeout=TIMEOUT)
- self.page = QWebPage()
- QObject.connect(self.page, SIGNAL('loadFinished(bool)'),
- self.load_finished)
- self.called = False
-
- def tearDown(self):
- #Release resources
- del self.page
- self.called = False
- TimedQApplication.tearDown(self)
-
- def testFindSelectText(self):
- url = QUrl.fromLocalFile(adjust_filename('fox.html', __file__))
- self.page.mainFrame().load(url)
- self.app.exec_()
- self.assertTrue(self.called)
-
- def load_finished(self, ok):
- #Callback to check if load was successful
- if ok:
- self.called = True
- self.assertTrue(self.page.findText('fox'))
- self.assertEqual(self.page.selectedText(), 'fox')
- self.app.quit()
-
-class SetNetworkAccessManagerCase(TimedQApplication):
-
- def setUp(self):
- TimedQApplication.setUp(self, timeout=TIMEOUT)
-
- def testSetNetworkAccessManager(self):
- page = QWebPage()
- manager = QNetworkAccessManager()
- page.setNetworkAccessManager(manager)
-
- def testNetWorkAccessManager(self):
- page = QWebPage()
- a = page.networkAccessManager()
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKit/webview_test.py b/sources/pyside2/tests/QtWebKit/webview_test.py
deleted file mode 100644
index 5ecac5387..000000000
--- a/sources/pyside2/tests/QtWebKit/webview_test.py
+++ /dev/null
@@ -1,101 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## 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 QWebView'''
-
-import os
-import sys
-import unittest
-
-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 py3kcompat as py3k
-
-from PySide2.QtCore import QObject, SIGNAL, QUrl
-from PySide2.QtWebKit import QWebPage, QWebView
-from PySide2.QtNetwork import QNetworkRequest
-
-from helper.helper import adjust_filename
-from helper.timedqapplication import TimedQApplication
-
-
-class testWebPage(QWebPage):
- def sayMyName(self):
- return 'testWebPage'
-
-class TestLoadFinished(TimedQApplication):
- '''Test case for signal QWebView.loadFinished(bool)'''
-
- def setUp(self):
- #Acquire resources
- TimedQApplication.setUp(self, timeout=1000)
- self.view = QWebView()
- QObject.connect(self.view, SIGNAL('loadFinished(bool)'),
- self.load_finished)
- self.called = False
-
- def tearDown(self):
- #Release resources
- del self.view
- self.called = False
- TimedQApplication.tearDown(self)
-
- def testLoadFinishedFromFile(self):
- url = QUrl.fromLocalFile(adjust_filename('fox.html', __file__))
- self.view.setUrl(url)
- self.app.exec_()
-
- self.assertTrue(self.called)
-
- def testSetPageAndGetPage(self):
- twp = testWebPage()
- self.view.setPage(twp)
- del twp
- p = self.view.page()
- self.assertEqual(p.sayMyName(), 'testWebPage')
-
- # Setting the same webpage should not incref the python obj
- refCount = sys.getrefcount(p)
- self.view.setPage(p)
- self.assertEqual(sys.getrefcount(p), refCount)
-
- # Changing the webpage obj should decref the old one
- twp2 = testWebPage()
- self.view.setPage(twp2)
- self.assertEqual(sys.getrefcount(p), refCount - 1)
-
- def load_finished(self, ok):
- #Callback to check if load was successful
- self.app.quit()
- if ok:
- self.called = True
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWebKitWidgets/CMakeLists.txt b/sources/pyside2/tests/QtWebKitWidgets/CMakeLists.txt
deleted file mode 100644
index 2f7cb08b9..000000000
--- a/sources/pyside2/tests/QtWebKitWidgets/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-# Please add some tests, here
diff --git a/sources/pyside2/tests/QtWidgets/CMakeLists.txt b/sources/pyside2/tests/QtWidgets/CMakeLists.txt
index 6682136ea..f6c3c01b8 100644
--- a/sources/pyside2/tests/QtWidgets/CMakeLists.txt
+++ b/sources/pyside2/tests/QtWidgets/CMakeLists.txt
@@ -9,7 +9,6 @@ PYSIDE_TEST(bug_243.py)
PYSIDE_TEST(bug_307.py)
PYSIDE_TEST(bug_324.py)
PYSIDE_TEST(bug_338.py)
-PYSIDE_TEST(bug_363.py)
PYSIDE_TEST(bug_389.py)
PYSIDE_TEST(bug_400.py)
PYSIDE_TEST(bug_416.py)
@@ -28,7 +27,6 @@ PYSIDE_TEST(bug_575.py)
PYSIDE_TEST(bug_576.py)
PYSIDE_TEST(bug_585.py)
PYSIDE_TEST(bug_589.py)
-PYSIDE_TEST(bug_632.py)
PYSIDE_TEST(bug_635.py)
PYSIDE_TEST(bug_640.py)
PYSIDE_TEST(bug_653.py)
diff --git a/sources/pyside2/tests/QtWidgets/add_action_test.py b/sources/pyside2/tests/QtWidgets/add_action_test.py
index c8a7c2269..d4af8b5d1 100644
--- a/sources/pyside2/tests/QtWidgets/add_action_test.py
+++ b/sources/pyside2/tests/QtWidgets/add_action_test.py
@@ -37,7 +37,8 @@ from init_paths import init_test_paths
init_test_paths(False)
from PySide2.QtCore import SLOT
-from PySide2.QtWidgets import QMenuBar, QAction, QPushButton
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QMenuBar, QPushButton
from helper.usesqapplication import UsesQApplication
diff --git a/sources/pyside2/tests/QtWidgets/bug_363.py b/sources/pyside2/tests/QtWidgets/bug_363.py
deleted file mode 100644
index 910525fed..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_363.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 363: http://bugs.openbossa.org/show_bug.cgi?id=363'''
-
-import os
-import sys
-import unittest
-
-sys.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
-
-# Check for desktop object lifetime
-class BugTest(UsesQApplication):
- def mySlot(self):
- pass
-
- # test if it is possible to connect with a desktop object after storing that on an auxiliar variable
- def testCase1(self):
- desktop = QtWidgets.QApplication.desktop()
- desktop.resized[int].connect(self.mySlot)
- self.assertTrue(True)
-
- # test if it is possible to connect with a desktop object without storing that on an auxiliar variable
- def testCase2(self):
- QtWidgets.QApplication.desktop().resized[int].connect(self.mySlot)
- self.assertTrue(True)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_632.py b/sources/pyside2/tests/QtWidgets/bug_632.py
deleted file mode 100644
index d836b2ff6..000000000
--- a/sources/pyside2/tests/QtWidgets/bug_632.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.QtWidgets import QLineEdit, QApplication
-
-
-class Bug589(unittest.TestCase):
- def testWrongSignature(self):
- text = QLineEdit("PySide bug 632")
- a = b = c = d = 0
- self.assertRaises(TypeError, text.getTextMargins, (a, b, c, d))
-
- def testTupleReturn(self):
- text = QLineEdit("PySide bug 632")
- text.setTextMargins(10, 20, 30, 40)
- (a, b, c, d) = text.getTextMargins()
- self.assertTrue((a, b, c, d), (10, 20, 30, 40))
-
-if __name__ == "__main__":
- app = QApplication(sys.argv)
- unittest.main()
diff --git a/sources/pyside2/tests/QtWidgets/bug_711.py b/sources/pyside2/tests/QtWidgets/bug_711.py
index 43e4b7bb2..3898e23f5 100644
--- a/sources/pyside2/tests/QtWidgets/bug_711.py
+++ b/sources/pyside2/tests/QtWidgets/bug_711.py
@@ -34,7 +34,8 @@ sys.path.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 QToolBar, QApplication, QAction, QToolButton
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QToolBar, QApplication, QToolButton
try:
xrange
diff --git a/sources/pyside2/tests/QtWidgets/bug_860.py b/sources/pyside2/tests/QtWidgets/bug_860.py
index 8cdab2e45..483973fdb 100644
--- a/sources/pyside2/tests/QtWidgets/bug_860.py
+++ b/sources/pyside2/tests/QtWidgets/bug_860.py
@@ -52,7 +52,7 @@ class MultipleSlotTest(UsesQApplication):
box.stateChanged.connect(checkboxMapper.map)
checkboxMapper.setMapping(box, box.text())
- checkboxMapper.mapped[str].connect(self.cb_changed)
+ checkboxMapper.mappedString[str].connect(self.cb_changed)
self._changed = False
box.setChecked(True)
self.assertTrue(self._changed)
diff --git a/sources/pyside2/tests/QtWidgets/qaction_test.py b/sources/pyside2/tests/QtWidgets/qaction_test.py
index 8fc8f6c05..d587a59b1 100644
--- a/sources/pyside2/tests/QtWidgets/qaction_test.py
+++ b/sources/pyside2/tests/QtWidgets/qaction_test.py
@@ -34,7 +34,8 @@ sys.path.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 QAction, QWidget
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QWidget
from helper.usesqapplication import UsesQApplication
class QPainterDrawText(UsesQApplication):
diff --git a/sources/pyside2/tests/QtWidgets/qshortcut_test.py b/sources/pyside2/tests/QtWidgets/qshortcut_test.py
index 18aec285d..dbe99167c 100644
--- a/sources/pyside2/tests/QtWidgets/qshortcut_test.py
+++ b/sources/pyside2/tests/QtWidgets/qshortcut_test.py
@@ -38,11 +38,13 @@ sys.path.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, QtGui, QtWidgets
+from PySide2.QtCore import Qt, QTimer
+from PySide2.QtGui import QKeySequence, QShortcut
+from PySide2.QtWidgets import QApplication, QWidget
-class Foo(QtWidgets.QWidget):
+class Foo(QWidget):
def __init__(self):
- QtWidgets.QWidget.__init__(self)
+ QWidget.__init__(self)
self.ok = False
self.copy = False
@@ -52,22 +54,22 @@ class Foo(QtWidgets.QWidget):
def slot_of_copy(self):
self.copy = True
-class MyShortcut(QtWidgets.QShortcut):
+class MyShortcut(QShortcut):
def __init__(self, keys, wdg, slot):
- QtWidgets.QShortcut.__init__(self, keys, wdg, slot)
+ QShortcut.__init__(self, keys, wdg, slot)
def emit_signal(self):
- self.emit(QtCore.SIGNAL("activated()"))
+ self.activated.emit()
class QAppPresence(unittest.TestCase):
def testQShortcut(self):
- self.qapp = QtWidgets.QApplication([])
+ self.qapp = QApplication([])
f = Foo()
- self.sc = MyShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Return), f, f.slot_of_foo)
- self.scstd = MyShortcut(QtGui.QKeySequence.Copy, f, f.slot_of_copy)
- QtCore.QTimer.singleShot(0, self.init);
+ 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)
diff --git a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py b/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py
index 0321b69a4..79842aac2 100644
--- a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py
+++ b/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py
@@ -42,8 +42,8 @@ init_test_paths(False)
import py3kcompat as py3k
from helper.usesqapplication import UsesQApplication
-from PySide2.QtGui import QKeySequence
-from PySide2.QtWidgets import QAction
+from PySide2.QtGui import QAction, QKeySequence
+
class QStringQKeySequenceTest(UsesQApplication):
'''Tests conversions of QString to and from QKeySequence.'''
diff --git a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py b/sources/pyside2/tests/QtWidgets/qtoolbar_test.py
index 856bf07f3..a70305c4a 100644
--- a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py
+++ b/sources/pyside2/tests/QtWidgets/qtoolbar_test.py
@@ -36,7 +36,8 @@ sys.path.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 QToolBar, QMainWindow, QAction
+from PySide2.QtGui import QAction
+from PySide2.QtWidgets import QToolBar, QMainWindow
from helper.usesqapplication import UsesQApplication
diff --git a/sources/pyside2/tests/QtXml/qdomdocument_test.py b/sources/pyside2/tests/QtXml/qdomdocument_test.py
index 67da9952c..07319092c 100644
--- a/sources/pyside2/tests/QtXml/qdomdocument_test.py
+++ b/sources/pyside2/tests/QtXml/qdomdocument_test.py
@@ -67,7 +67,7 @@ class QDomDocumentTest(unittest.TestCase):
'''Sets invalid xml as the QDomDocument contents.'''
ok, errorStr, errorLine, errorColumn = self.dom.setContent(self.badXmlData, True)
self.assertFalse(ok)
- self.assertEqual(errorStr, 'tag mismatch')
+ self.assertEqual(errorStr, 'Opening and ending tag mismatch.')
self.assertEqual(errorLine, 4)
self.assertEqual(errorColumn, 21)
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
index bdd88ea37..cdf653745 100644
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
@@ -23,11 +23,7 @@ testview.h
hiddenobject.h
)
-if (${QT_MAJOR_VERSION} GREATER_EQUAL 6)
- qt6_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
-else()
- qt5_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
-endif()
+qt_wrap_cpp(pysidetest_MOC_SRC ${pysidetest_MOC_HEADERS})
set(testbinding_SRC
${CMAKE_CURRENT_BINARY_DIR}/testbinding/testobject_wrapper.cpp
@@ -48,9 +44,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/testbinding/testbinding_module_wrapper.cpp
# 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)
+ 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)
diff --git a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py b/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py
index 81a764986..55953ad69 100644
--- a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py
+++ b/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py
@@ -57,7 +57,6 @@ new_functions = """
"""
new_functions += """
- PySide2.QtGui.QBitmap().transformed(qMatrix,transformationMode)
PySide2.QtGui.QStandardItemModel().insertColumn(int,qModelIndex)
PySide2.QtGui.QStandardItemModel().parent()
# PySide2.QtGui.QTextList(qTextDocument).setFormat(qTextFormat) # Segmentation fault: 11
@@ -71,8 +70,6 @@ new_functions += """
PySide2.QtWidgets.QApplication.setPalette(qPalette)
PySide2.QtWidgets.QBoxLayout(direction).addWidget(qWidget)
PySide2.QtWidgets.QColorDialog().open()
- PySide2.QtWidgets.QDirModel().index(int,int,qModelIndex)
- PySide2.QtWidgets.QDirModel().parent()
PySide2.QtWidgets.QFileDialog().open()
PySide2.QtWidgets.QFileSystemModel().index(int,int,qModelIndex)
PySide2.QtWidgets.QFileSystemModel().parent()
@@ -145,7 +142,6 @@ class MainTest(unittest.TestCase):
try:
PySide2.QtGui
#qPaintDevice = PySide2.QtGui.QPaintDevice() # NotImplementedError
- qMatrix = PySide2.QtGui.QMatrix()
qTextDocument = PySide2.QtGui.QTextDocument()
qTextFormat = PySide2.QtGui.QTextFormat()
quintptr = long(42) if sys.version_info[0] < 3 else 42
@@ -158,7 +154,7 @@ class MainTest(unittest.TestCase):
direction = PySide2.QtWidgets.QBoxLayout.Direction()
qWidget = PySide2.QtWidgets.QWidget()
qStyleOptionFrame = PySide2.QtWidgets.QStyleOptionFrame()
- qAction = PySide2.QtWidgets.QAction(qObject)
+ qAction = PySide2.QtGui.QAction(qObject)
renderFlags = PySide2.QtWidgets.QWidget.RenderFlags
except AttributeError:
pass
diff --git a/sources/pyside2/tests/tools/list-class-hierarchy.py b/sources/pyside2/tests/tools/list-class-hierarchy.py
index b734ae69e..70075b27e 100755
--- a/sources/pyside2/tests/tools/list-class-hierarchy.py
+++ b/sources/pyside2/tests/tools/list-class-hierarchy.py
@@ -87,7 +87,6 @@ if __name__=='__main__':
'QtSvg',
'QtTest',
#'QtUiTools',
- 'QtWebKit',
'QtXml',
'QtXmlPatterns' ]
diff --git a/sources/pyside2/tests/util/module_wrapper/PySide/QtWebKit.py b/sources/pyside2/tests/util/module_wrapper/PySide/QtWebKit.py
deleted file mode 100644
index bffc79968..000000000
--- a/sources/pyside2/tests/util/module_wrapper/PySide/QtWebKit.py
+++ /dev/null
@@ -1,2 +0,0 @@
-
-from PyQt4.QtWebKit import *
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
index d08720934..ef3471d6a 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
@@ -31,6 +31,7 @@
#include "clangutils.h"
#include <codemodel.h>
+#include <reporthandler.h>
#include <QtCore/QDebug>
#include <QtCore/QDir>
@@ -168,8 +169,10 @@ public:
bool addClass(const CXCursor &cursor, CodeModel::ClassType t);
FunctionModelItem createFunction(const CXCursor &cursor,
- CodeModel::FunctionType t = CodeModel::Normal);
- FunctionModelItem createMemberFunction(const CXCursor &cursor);
+ CodeModel::FunctionType t = CodeModel::Normal,
+ bool isTemplateCode = false);
+ FunctionModelItem createMemberFunction(const CXCursor &cursor,
+ bool isTemplateCode = false);
void qualifyConstructor(const CXCursor &cursor);
TypeInfo createTypeInfoHelper(const CXType &type) const; // uncashed
TypeInfo createTypeInfo(const CXType &type) const;
@@ -257,12 +260,54 @@ bool BuilderPrivate::addClass(const CXCursor &cursor, CodeModel::ClassType t)
return true;
}
-static inline ExceptionSpecification exceptionSpecificationFromClang(int ce)
+static QString msgCannotDetermineException(const std::string_view &snippetV)
{
+ const auto newLine = snippetV.find('\n'); // Multiline noexcept specifications have been found in Qt
+ const bool truncate = newLine != std::string::npos;
+ const qsizetype length = qsizetype(truncate ? newLine : snippetV.size());
+ QString snippet = QString::fromUtf8(snippetV.cbegin(), length);
+ if (truncate)
+ snippet += QStringLiteral("...");
+
+ return QLatin1String("Cannot determine exception specification: \"")
+ + snippet + QLatin1Char('"');
+}
+
+// Return whether noexcept(<value>) throws. noexcept() takes a constexpr value.
+// Try to determine the simple cases (true|false) via code snippet.
+static ExceptionSpecification computedExceptionSpecificationFromClang(BaseVisitor *bv,
+ const CXCursor &cursor,
+ bool isTemplateCode)
+{
+ const std::string_view snippet = bv->getCodeSnippet(cursor);
+ if (snippet.empty())
+ return ExceptionSpecification::Unknown; // Macro expansion, cannot tell
+ if (snippet.find("noexcept(false)") != std::string::npos)
+ return ExceptionSpecification::Throws;
+ if (snippet.find("noexcept(true)") != std::string::npos)
+ return ExceptionSpecification::NoExcept;
+ // Warn about it unless it is some form of template code where it is common
+ // to have complicated code, which is of no concern to shiboken, like:
+ // "QList::emplace(T) noexcept(is_pod<T>)".
+ if (!isTemplateCode && ReportHandler::isDebug(ReportHandler::FullDebug)) {
+ const Diagnostic d(msgCannotDetermineException(snippet), cursor, CXDiagnostic_Warning);
+ qWarning() << d;
+ bv->appendDiagnostic(d);
+ }
+ return ExceptionSpecification::Unknown;
+}
+
+static ExceptionSpecification exceptionSpecificationFromClang(BaseVisitor *bv,
+ const CXCursor &cursor,
+ bool isTemplateCode)
+{
+ const auto ce = clang_getCursorExceptionSpecificationType(cursor);
switch (ce) {
- case CXCursor_ExceptionSpecificationKind_BasicNoexcept:
case CXCursor_ExceptionSpecificationKind_ComputedNoexcept:
+ return computedExceptionSpecificationFromClang(bv, cursor, isTemplateCode);
+ case CXCursor_ExceptionSpecificationKind_BasicNoexcept:
case CXCursor_ExceptionSpecificationKind_DynamicNone: // throw()
+ case CXCursor_ExceptionSpecificationKind_NoThrow:
return ExceptionSpecification::NoExcept;
case CXCursor_ExceptionSpecificationKind_Dynamic: // throw(t1..)
case CXCursor_ExceptionSpecificationKind_MSAny: // throw(...)
@@ -277,7 +322,8 @@ static inline ExceptionSpecification exceptionSpecificationFromClang(int ce)
}
FunctionModelItem BuilderPrivate::createFunction(const CXCursor &cursor,
- CodeModel::FunctionType t)
+ CodeModel::FunctionType t,
+ bool isTemplateCode)
{
QString name = getCursorSpelling(cursor);
// Apply type fixes to "operator X &" -> "operator X&"
@@ -289,7 +335,7 @@ FunctionModelItem BuilderPrivate::createFunction(const CXCursor &cursor,
result->setFunctionType(t);
result->setScope(m_scope);
result->setStatic(clang_Cursor_getStorageClass(cursor) == CX_SC_Static);
- result->setExceptionSpecification(exceptionSpecificationFromClang(clang_getCursorExceptionSpecificationType(cursor)));
+ result->setExceptionSpecification(exceptionSpecificationFromClang(m_baseVisitor, cursor, isTemplateCode));
switch (clang_getCursorAvailability(cursor)) {
case CXAvailability_Available:
break;
@@ -326,13 +372,15 @@ static inline CodeModel::FunctionType functionTypeFromCursor(const CXCursor &cur
return result;
}
-FunctionModelItem BuilderPrivate::createMemberFunction(const CXCursor &cursor)
+FunctionModelItem BuilderPrivate::createMemberFunction(const CXCursor &cursor,
+ bool isTemplateCode)
{
const CodeModel::FunctionType functionType =
m_currentFunctionType == CodeModel::Signal || m_currentFunctionType == CodeModel::Slot
? m_currentFunctionType // by annotation
: functionTypeFromCursor(cursor);
- FunctionModelItem result = createFunction(cursor, functionType);
+ isTemplateCode |= m_currentClass->name().endsWith(QLatin1Char('>'));
+ auto result = createFunction(cursor, functionType, isTemplateCode);
result->setAccessPolicy(accessPolicy(clang_getCXXAccessSpecifier(cursor)));
result->setConstant(clang_CXXMethod_isConst(cursor) != 0);
result->setStatic(clang_CXXMethod_isStatic(cursor) != 0);
@@ -574,44 +622,15 @@ void BuilderPrivate::endTemplateTypeAlias(const CXCursor &typeAliasCursor)
// CXCursor_EnumConstantDecl, ParmDecl (a = Flag1 | Flag2)
QString BuilderPrivate::cursorValueExpression(BaseVisitor *bv, const CXCursor &cursor) const
{
- BaseVisitor::CodeSnippet snippet = bv->getCodeSnippet(cursor);
- const char *equalSign = std::find(snippet.first, snippet.second, '=');
- if (equalSign == snippet.second)
+ const std::string_view snippet = bv->getCodeSnippet(cursor);
+ auto equalSign = snippet.find('=');
+ if (equalSign == std::string::npos)
return QString();
++equalSign;
- return QString::fromLocal8Bit(equalSign, int(snippet.second - equalSign)).trimmed();
+ return QString::fromLocal8Bit(snippet.cbegin() + equalSign,
+ int(snippet.size() - equalSign)).trimmed();
}
-// A hacky reimplementation of clang_EnumDecl_isScoped() for Clang < 5.0
-// which simply checks for a blank-delimited " class " keyword in the enum snippet.
-
-#define CLANG_NO_ENUMDECL_ISSCOPED \
- (CINDEX_VERSION_MAJOR == 0 && CINDEX_VERSION_MINOR < 43)
-
-#if CLANG_NO_ENUMDECL_ISSCOPED
-static const char *indexOf(const BaseVisitor::CodeSnippet &snippet, const char *needle)
-{
- const size_t snippetLength = snippet.first ? size_t(snippet.second - snippet.first) : 0;
- const size_t needleLength = strlen(needle);
- if (needleLength > snippetLength)
- return nullptr;
- for (const char *c = snippet.first, *end = snippet.second - needleLength; c < end; ++c) {
- if (memcmp(c, needle, needleLength) == 0)
- return c;
- }
- return nullptr;
-}
-
-long clang_EnumDecl_isScoped4(BaseVisitor *bv, const CXCursor &cursor)
-{
- BaseVisitor::CodeSnippet snippet = bv->getCodeSnippet(cursor);
- const char *classSpec = indexOf(snippet, "class");
- const bool isClass = classSpec && classSpec > snippet.first
- && isspace(*(classSpec - 1)) && isspace(*(classSpec + 5));
- return isClass ? 1 : 0;
-}
-#endif // CLANG_NO_ENUMDECL_ISSCOPED
-
// Resolve declaration and type of a base class
struct TypeDeclaration
@@ -988,7 +1007,7 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
// Skip inline member functions outside class, only go by declarations inside class
if (!withinClassDeclaration(cursor))
return Skip;
- d->m_currentFunction = d->createMemberFunction(cursor);
+ d->m_currentFunction = d->createMemberFunction(cursor, false);
d->m_scopeStack.back()->addFunction(d->m_currentFunction);
break;
// Not fully supported, currently, seen as normal function
@@ -997,16 +1016,18 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
const CXCursor semParent = clang_getCursorSemanticParent(cursor);
if (isClassCursor(semParent)) {
if (semParent == clang_getCursorLexicalParent(cursor)) {
- d->m_currentFunction = d->createMemberFunction(cursor);
+ d->m_currentFunction = d->createMemberFunction(cursor, true);
d->m_scopeStack.back()->addFunction(d->m_currentFunction);
break;
}
return Skip; // inline member functions outside class
}
}
- Q_FALLTHROUGH(); // fall through to free template function.
+ d->m_currentFunction = d->createFunction(cursor, CodeModel::Normal, true);
+ d->m_scopeStack.back()->addFunction(d->m_currentFunction);
+ break;
case CXCursor_FunctionDecl:
- d->m_currentFunction = d->createFunction(cursor);
+ d->m_currentFunction = d->createFunction(cursor, CodeModel::Normal, false);
d->m_scopeStack.back()->addFunction(d->m_currentFunction);
break;
case CXCursor_Namespace: {
@@ -1122,10 +1143,10 @@ BaseVisitor::StartTokenResult Builder::startToken(const CXCursor &cursor)
// how it is defined, and qdoc).
if (clang_isDeclaration(cursor.kind) && !d->m_currentClass.isNull()) {
auto snippet = getCodeSnippet(cursor);
- const auto length = snippet.second - snippet.first;
- if (length > 12 && *(snippet.second - 1) == ')'
- && std::strncmp(snippet.first, "Q_PROPERTY(", 11) == 0) {
- const QString qProperty = QString::fromUtf8(snippet.first + 11, length - 12);
+ const auto length = snippet.size();
+ if (length > 12 && *snippet.rbegin() == ')'
+ && snippet.compare(0, 11, "Q_PROPERTY(") == 0) {
+ const QString qProperty = QString::fromUtf8(snippet.data() + 11, length - 12);
d->m_currentClass->addPropertyDeclaration(qProperty);
}
}
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.cpp
index d6915daab..7123c22d8 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.cpp
@@ -147,4 +147,16 @@ QDebug operator<<(QDebug s, const CXSourceLocation &location)
return s;
}
+QDebug operator<<(QDebug s, const std::string_view &v)
+{
+ QDebugStateSaver saver(s);
+ s.nospace();
+ s.noquote();
+ s << '"';
+ for (auto c : v)
+ s << c;
+ s << '"';
+ return s;
+}
+
#endif // !QT_NO_DEBUG_STREAM
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.h b/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.h
index 2bbe526f7..ae3840fb4 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.h
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangdebugutils.h
@@ -33,6 +33,8 @@
#include <clang-c/Index.h>
+#include <string_view>
+
QT_FORWARD_DECLARE_CLASS(QDebug)
QT_FORWARD_DECLARE_CLASS(QString)
@@ -43,6 +45,7 @@ QDebug operator<<(QDebug s, CX_CXXAccessSpecifier ac);
QDebug operator<<(QDebug s, const CXType &t);
QDebug operator<<(QDebug s, const CXCursor &cursor);
QDebug operator<<(QDebug s, const CXSourceLocation &location);
+QDebug operator<<(QDebug s, const std::string_view &v); // for code snippets
#endif // !QT_NO_DEBUG_STREAM
#endif // CLANGDEBUGUTILS_H
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp
index d0c5bc1b8..599114b2f 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp
@@ -1,4 +1,4 @@
-/****************************************************************************
+/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
@@ -48,10 +48,10 @@ QString SourceFileCache::getFileName(CXFile file)
return it.value();
}
-SourceFileCache::Snippet SourceFileCache::getCodeSnippet(const CXCursor &cursor,
- QString *errorMessage)
+std::string_view SourceFileCache::getCodeSnippet(const CXCursor &cursor,
+ QString *errorMessage)
{
- Snippet result(nullptr, nullptr);
+ static const char empty[] = "";
if (errorMessage)
errorMessage->clear();
@@ -60,12 +60,12 @@ SourceFileCache::Snippet SourceFileCache::getCodeSnippet(const CXCursor &cursor,
// Quick check for equal locations: Frequently happens if the code is
// the result of a macro expansion
if (range.first == range.second)
- return result;
+ return std::string_view(empty, 0);
if (range.first.file != range.second.file) {
if (errorMessage)
*errorMessage = QStringLiteral("Range spans several files");
- return result;
+ return std::string_view(empty, 0);
}
auto it = m_fileBufferCache.find(range.first.file);
@@ -74,7 +74,7 @@ SourceFileCache::Snippet SourceFileCache::getCodeSnippet(const CXCursor &cursor,
if (fileName.isEmpty()) {
if (errorMessage)
*errorMessage = QStringLiteral("Range has no file");
- return result;
+ return std::string_view(empty, 0);
}
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly)) {
@@ -83,7 +83,7 @@ SourceFileCache::Snippet SourceFileCache::getCodeSnippet(const CXCursor &cursor,
str << "Cannot open \"" << QDir::toNativeSeparators(fileName)
<< "\": " << file.errorString();
}
- return result;
+ return std::string_view(empty, 0);
}
it = m_fileBufferCache.insert(range.first.file, file.readAll());
}
@@ -99,11 +99,10 @@ SourceFileCache::Snippet SourceFileCache::getCodeSnippet(const CXCursor &cursor,
<< QDir::toNativeSeparators(getFileName(range.first.file))
<< "\" (" << contents.size() << ')';
}
- return result;
+ return std::string_view(empty, 0);
}
- result.first = contents.constData() + pos;
- result.second = contents.constData() + end;
- return result;
+
+ return std::string_view(contents.constData() + pos, end - pos);
}
BaseVisitor::BaseVisitor() = default;
@@ -135,11 +134,11 @@ bool BaseVisitor::cbHandleEndToken(const CXCursor &cursor, StartTokenResult star
return result;
}
-BaseVisitor::CodeSnippet BaseVisitor::getCodeSnippet(const CXCursor &cursor)
+std::string_view BaseVisitor::getCodeSnippet(const CXCursor &cursor)
{
QString errorMessage;
- CodeSnippet result = m_fileCache.getCodeSnippet(cursor, &errorMessage);
- if (result.first == nullptr && !errorMessage.isEmpty()) {
+ const std::string_view result = m_fileCache.getCodeSnippet(cursor, &errorMessage);
+ if (result.empty() && !errorMessage.isEmpty()) {
QString message;
QTextStream str(&message);
str << "Unable to retrieve code snippet \"" << getCursorSpelling(cursor)
@@ -151,10 +150,10 @@ BaseVisitor::CodeSnippet BaseVisitor::getCodeSnippet(const CXCursor &cursor)
QString BaseVisitor::getCodeSnippetString(const CXCursor &cursor)
{
- CodeSnippet result = getCodeSnippet(cursor);
- return result.first != nullptr
- ? QString::fromUtf8(result.first, int(result.second - result.first))
- : QString();
+ const std::string_view result = getCodeSnippet(cursor);
+ return result.empty()
+ ? QString()
+ : QString::fromUtf8(result.cbegin(), result.size());
}
static CXChildVisitResult
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangparser.h b/sources/shiboken2/ApiExtractor/clangparser/clangparser.h
index 825de331c..7e918263a 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangparser.h
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangparser.h
@@ -37,15 +37,15 @@
#include <QtCore/QString>
#include <QtCore/QVector>
+#include <string_view>
+
namespace clang {
struct Diagnostic;
class SourceFileCache {
public:
- using Snippet = QPair<const char *, const char *>;
-
- Snippet getCodeSnippet(const CXCursor &cursor, QString *errorMessage = nullptr);
+ std::string_view getCodeSnippet(const CXCursor &cursor, QString *errorMessage = nullptr);
QString getFileName(CXFile file);
private:
@@ -60,7 +60,6 @@ class BaseVisitor {
Q_DISABLE_COPY(BaseVisitor)
public:
using Diagnostics = QVector<Diagnostic>;
- using CodeSnippet = SourceFileCache::Snippet;
enum StartTokenResult { Error, Skip, Recurse };
@@ -78,8 +77,7 @@ public:
bool cbHandleEndToken(const CXCursor &cursor, StartTokenResult startResult);
QString getFileName(CXFile file) { return m_fileCache.getFileName(file); }
-
- CodeSnippet getCodeSnippet(const CXCursor &cursor);
+ std::string_view getCodeSnippet(const CXCursor &cursor);
QString getCodeSnippetString(const CXCursor &cursor);
Diagnostics diagnostics() const;
diff --git a/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp b/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
index 4fd4269f6..debe25be6 100644
--- a/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testmodifyfunction.cpp
@@ -335,7 +335,11 @@ struct Base {
struct A : public Base {
void unspecified();
void nonThrowing() noexcept;
+# if __cplusplus >= 201703L // C++ 17
+ void throwing() noexcept(false);
+#else
void throwing() throw(int);
+#endif
};
)CPP";
@@ -374,7 +378,7 @@ struct A : public Base {
<object-type name='Base'/>
<object-type name='A'>
<modify-function signature='unspecified()' exception-handling='auto-on'/>
- <modify-function signature='throwing()' exception-handling='off'/>
+ <modify-function signature='throwing()' exception-handling='no'/>
</object-type>
</typesystem>)XML")
<< true << false << false // exception
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 3de5d3223..ee9692f95 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -18,7 +18,7 @@ option(BUILD_TESTS "Build tests." TRUE)
option(USE_PYTHON_VERSION "Use specific python version to build shiboken2." "")
option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE)
-set (QT_MAJOR_VERSION 5)
+set (QT_MAJOR_VERSION 6)
message(STATUS "Using Qt ${QT_MAJOR_VERSION}")
find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core)
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index 014cc948e..47cf9f2f9 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -1367,7 +1367,7 @@ void QtXmlToSphinx::Table::normalize()
newCell.rowSpan = -1;
int targetRow = row + 1;
const int targetEndRow =
- std::min(targetRow + cell.rowSpan - 1, m_rows.count());
+ std::min(targetRow + cell.rowSpan - 1, int(m_rows.count()));
cell.rowSpan = 0;
for ( ; targetRow < targetEndRow; ++targetRow)
m_rows[targetRow].insert(col, newCell);
@@ -1405,7 +1405,7 @@ void QtXmlToSphinx::Table::format (QTextStream& s) const
const QVector<QStringRef> rowLines = row[j].data.splitRef(QLatin1Char('\n')); // cache this would be a good idea
for (const QStringRef &str : rowLines)
colWidths[j] = std::max(colWidths[j], str.count());
- rowHeights[i] = std::max(rowHeights[i], row[j].data.count(QLatin1Char('\n')) + 1);
+ rowHeights[i] = std::max(rowHeights[i], int(row[j].data.count(QLatin1Char('\n')) + 1));
}
}
@@ -1441,7 +1441,7 @@ void QtXmlToSphinx::Table::format (QTextStream& s) const
// Print the table cells
for (int rowLine = 0; rowLine < rowHeights[i]; ++rowLine) { // for each line in a row
int j = 0;
- for (int maxJ = std::min(row.count(), headerColumnCount); j < maxJ; ++j) { // for each column
+ for (int maxJ = std::min(int(row.count()), headerColumnCount); j < maxJ; ++j) { // for each column
const QtXmlToSphinx::TableCell& cell = row[j];
const QVector<QStringRef> rowLines = cell.data.splitRef(QLatin1Char('\n')); // FIXME: Cache this!!!
if (!j) // First column, so we need print the identation
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index c6d67c4f4..71a78cd3e 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -246,6 +246,7 @@ type_map.update({
"qint64": int,
"qint8": int,
"qintptr": int,
+ "qsizetype": int,
"QList": ArrayLikeVariable,
"qlonglong": int,
"QMap": typing.Dict,
@@ -329,6 +330,7 @@ type_map.update({
type_map.update({
# Handling variables that are returned, eventually as Tuples:
+ "PySide2.QtQml.atomic[bool]": ResultVariable(bool), # QmlIncubationController::incubateWhile()
"bool*" : ResultVariable(bool),
"float*" : ResultVariable(float),
"int*" : ResultVariable(int),
@@ -339,6 +341,8 @@ type_map.update({
"qint64*" : ResultVariable(int),
"qreal*" : ResultVariable(float),
"QString*" : ResultVariable(str),
+ "qintptr*" : ResultVariable(int),
+ "quintptr*" : ResultVariable(int),
"quint16*" : ResultVariable(int),
"uint*" : ResultVariable(int),
"unsigned int*" : ResultVariable(int),