aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
commit91b93e1021ccc06d13e0d66a43bf7f9063faeff3 (patch)
treef5270164466b42367d4df63d723b3a4db4d7d0fe
parentedae6185cef9c0ddd7c7c88bfa97c5043ba0d78a (diff)
parent06f97eca45ddadf4f04229cf14d5dc0bbd867316 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
-rw-r--r--build_scripts/main.py6
-rw-r--r--coin_test_instructions.py5
-rw-r--r--debug_windows.py5
-rw-r--r--dist/changes-5.12.335
-rw-r--r--examples/charts/chartthemes/ui_themewidget.py84
-rw-r--r--examples/installer_test/hello_app.spec9
-rw-r--r--examples/opengl/contextinfo.py121
-rw-r--r--examples/widgets/animation/easing/ui_form.py225
-rw-r--r--examples/xmlpatterns/schema/ui_schema.py122
-rw-r--r--sources/pyside2/CMakeLists.txt13
-rw-r--r--sources/pyside2/PySide2/CMakeLists.txt10
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml8
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt72
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in61
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml409
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml51
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml103
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml44
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml44
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml47
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml49
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml49
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml1
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml43
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml57
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml58
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml43
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml46
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml43
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml52
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml41
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml43
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py43
-rw-r--r--sources/pyside2/PySide2/templates/gui_common.xml8
-rw-r--r--sources/pyside2/PySide2/templates/openglfunctions_common.xml50
-rw-r--r--sources/pyside2/libpyside/dynamicqmetaobject.cpp13
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp29
-rw-r--r--sources/pyside2/libpyside/pysideproperty_p.h39
-rw-r--r--sources/pyside2/libpyside/pysidesignal.cpp213
-rw-r--r--sources/pyside2/libpyside/pysidesignal_p.h45
-rw-r--r--sources/pyside2/libpyside/pysideslot.cpp59
-rw-r--r--sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/registry/exists_darwin_5_12_0_ci.py4
-rw-r--r--sources/pyside2/tests/registry/exists_opensuse423_5_12_0_ci.py4
-rw-r--r--sources/pyside2/tests/registry/exists_redhatenterpriselinuxworkstation74_5_12_0_ci.py4
-rw-r--r--sources/pyside2/tests/registry/exists_win32_5_12_0_ci.py4
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp39
-rw-r--r--sources/shiboken2/ApiExtractor/reporthandler.cpp72
-rw-r--r--sources/shiboken2/ApiExtractor/reporthandler.h11
-rw-r--r--sources/shiboken2/doc/contents.rst18
-rw-r--r--sources/shiboken2/doc/index.rst19
-rw-r--r--sources/shiboken2/generator/main.cpp5
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp54
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.h3
-rw-r--r--sources/shiboken2/generator/shiboken2/headergenerator.h3
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp103
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.h16
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.cpp4
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.h4
-rw-r--r--sources/shiboken2/libshiboken/embed/embedding_generator.py6
-rw-r--r--sources/shiboken2/libshiboken/pep384impl.h5
-rw-r--r--sources/shiboken2/libshiboken/pep384impl_doc.rst3
-rw-r--r--testing/wheel_tester.py33
68 files changed, 2521 insertions, 622 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index b9c83b939..4d9f95b14 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -234,9 +234,11 @@ def prefix():
name = "pyside"
name += str(sys.version_info[0])
if OPTION_DEBUG:
- name += 'd'
+ name += "d"
if is_debug_python():
- name += 'p'
+ name += "p"
+ if OPTION_LIMITED_API == "yes" and sys.version_info[0] == 3:
+ name += "a"
return name
# Initialize, pull and checkout submodules
diff --git a/coin_test_instructions.py b/coin_test_instructions.py
index 5b08c773e..f31c35e59 100644
--- a/coin_test_instructions.py
+++ b/coin_test_instructions.py
@@ -46,7 +46,6 @@ from build_scripts.utils import rmtree
from build_scripts.utils import acceptCITestConfiguration
from build_scripts.utils import get_ci_qmake_path
import os
-import sys
# Values must match COIN thrift
CI_HOST_OS = option_value("os")
@@ -78,8 +77,8 @@ def call_testrunner(python_ver, buildnro):
qmake_path = get_ci_qmake_path(CI_ENV_INSTALL_DIR, CI_HOST_OS)
- # Try to install built wheels, and build some buildable examples (except macOS/Python 2.16)
- if CI_RELEASE_CONF and CI_HOST_OS != 'MacOS' or sys.version_info[0] == 3:
+ # Try to install built wheels, and build some buildable examples.
+ if CI_RELEASE_CONF:
wheel_tester_path = os.path.join("testing", "wheel_tester.py")
cmd = [env_python, wheel_tester_path, qmake_path]
run_instruction(cmd, "Error while running wheel_tester.py")
diff --git a/debug_windows.py b/debug_windows.py
index 704228c1f..ab1c03aba 100644
--- a/debug_windows.py
+++ b/debug_windows.py
@@ -200,6 +200,9 @@ def get_cdb_and_gflags_path(kits):
bits = 'x64' if (sys.maxsize > 2 ** 32) else 'x32'
debuggers_path = path.join(first_path_path, 'Debuggers', bits)
cdb_path = path.join(debuggers_path, 'cdb.exe')
+ if not path.exists(cdb_path): # Try for older "Debugging Tools" packages
+ debuggers_path = "C:\\Program Files\\Debugging Tools for Windows (x64)"
+ cdb_path = path.join(debuggers_path, 'cdb.exe')
if not path.exists(cdb_path):
log.error("Couldn't find cdb.exe at: {}.".format(cdb_path))
@@ -320,7 +323,7 @@ def call_command_under_cdb_with_gflags(executable_path, args):
snippets = find_error_like_snippets(out_decoded)
print_error_snippets(snippets)
- log.info("Finished processing.\n !!! Full log can be found at: "
+ log.info("Finished processing.\n !!! Full log can be found at:\n"
"{}".format(verbose_log_file_name))
diff --git a/dist/changes-5.12.3 b/dist/changes-5.12.3
new file mode 100644
index 000000000..fda65b457
--- /dev/null
+++ b/dist/changes-5.12.3
@@ -0,0 +1,35 @@
+Qt for Python 5.12.3 is a bug-fix release.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qtforpython/
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* PySide2 *
+****************************************************************************
+
+ - [PYSIDE-993] Use correct environment variable to detect when running in Coin
+ - Many updated to the documentation
+ - Add array modification for QGLShaderProgram::setAttributeArray(int,const float *v,int,int)
+ - Signatures: Add support for PySide2.QtCore.short/ushort/signed char
+ - Add explicit methods for QOpenGLShaderProgramm.setUniformValue (i/f)
+
+****************************************************************************
+* Shiboken2 *
+****************************************************************************
+
+ - [PYSIDE-977] Shiboken: Add "noexcept" to wrapper when wrapped function is noexcept
+ - [PYSIDE-975] shiboken: Allow for include paths with relative directories
+ - [PYSIDE-995] shiboken: Enable adding call operators
+ - shiboken: Move the Api extractor documentation into shiboken
+ - shiboken: Fix code injection not working for operator functions
+ - shiboken: Enable including typesystem XML snippets via entities
diff --git a/examples/charts/chartthemes/ui_themewidget.py b/examples/charts/chartthemes/ui_themewidget.py
new file mode 100644
index 000000000..aa673eea9
--- /dev/null
+++ b/examples/charts/chartthemes/ui_themewidget.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'themewidget.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
+
+class Ui_ThemeWidgetForm(object):
+ def setupUi(self, ThemeWidgetForm):
+ if ThemeWidgetForm.objectName():
+ ThemeWidgetForm.setObjectName(u"ThemeWidgetForm")
+ ThemeWidgetForm.resize(900, 600)
+ self.gridLayout = QGridLayout(ThemeWidgetForm);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.horizontalLayout = QHBoxLayout();
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.themeLabel = QLabel(ThemeWidgetForm)
+ self.themeLabel.setObjectName(u"themeLabel")
+
+ self.horizontalLayout.addWidget(self.themeLabel);
+
+ self.themeComboBox = QComboBox(ThemeWidgetForm)
+ self.themeComboBox.setObjectName(u"themeComboBox")
+
+ self.horizontalLayout.addWidget(self.themeComboBox);
+
+ self.animatedLabel = QLabel(ThemeWidgetForm)
+ self.animatedLabel.setObjectName(u"animatedLabel")
+
+ self.horizontalLayout.addWidget(self.animatedLabel);
+
+ self.animatedComboBox = QComboBox(ThemeWidgetForm)
+ self.animatedComboBox.setObjectName(u"animatedComboBox")
+
+ self.horizontalLayout.addWidget(self.animatedComboBox);
+
+ self.legendLabel = QLabel(ThemeWidgetForm)
+ self.legendLabel.setObjectName(u"legendLabel")
+
+ self.horizontalLayout.addWidget(self.legendLabel);
+
+ self.legendComboBox = QComboBox(ThemeWidgetForm)
+ self.legendComboBox.setObjectName(u"legendComboBox")
+
+ self.horizontalLayout.addWidget(self.legendComboBox);
+
+ self.antialiasCheckBox = QCheckBox(ThemeWidgetForm)
+ self.antialiasCheckBox.setObjectName(u"antialiasCheckBox")
+ self.antialiasCheckBox.setChecked(False)
+
+ self.horizontalLayout.addWidget(self.antialiasCheckBox);
+
+ self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum);
+
+ self.horizontalLayout.addItem(self.horizontalSpacer);
+
+
+ self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 3);
+
+
+ self.retranslateUi(ThemeWidgetForm)
+ self.themeComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+ self.antialiasCheckBox.toggled.connect(ThemeWidgetForm.updateUI);
+ self.legendComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+ self.animatedComboBox.currentIndexChanged.connect(ThemeWidgetForm.updateUI);
+
+ QMetaObject.connectSlotsByName(ThemeWidgetForm)
+ # setupUi
+
+ def retranslateUi(self, ThemeWidgetForm):
+ self.themeLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Theme:", None))
+ self.animatedLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Animation:", None))
+ self.legendLabel.setText(QCoreApplication.translate("ThemeWidgetForm", u"Legend:", None))
+ self.antialiasCheckBox.setText(QCoreApplication.translate("ThemeWidgetForm", u"Anti-aliasing", None))
+ # retranslateUi
+
diff --git a/examples/installer_test/hello_app.spec b/examples/installer_test/hello_app.spec
index d096ab170..84d6d0029 100644
--- a/examples/installer_test/hello_app.spec
+++ b/examples/installer_test/hello_app.spec
@@ -59,7 +59,14 @@ a = Analysis(['hello.py'],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
- excludes=[],
+ # 2019-04-28
+ # This hack circumvents a side effect of Python 2.7.16 which leads to a failure
+ # in 'hook-_tkinter.py'. The error is reported. Until it is fixed, we circumvent
+ # the problem by this exclude.
+ # This effect is triggered by installing 'numpy'. It is somewhat special since
+ # the problem does not show up in Python 3.7 . tkinter would have the same
+ # problem on Python 3.7, but numpy would not trigger it for some reason.
+ excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
index f0ea345e7..a963b8952 100644
--- a/examples/opengl/contextinfo.py
+++ b/examples/opengl/contextinfo.py
@@ -41,10 +41,13 @@
"""PySide2 port of the opengl/contextinfo example from Qt v5.x"""
+from argparse import ArgumentParser, RawTextHelpFormatter
import numpy
import sys
+from textwrap import dedent
-from PySide2.QtCore import QLibraryInfo, QSize, QTimer, Qt
+
+from PySide2.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
from PySide2.QtGui import (QMatrix4x4, QOpenGLBuffer, QOpenGLContext, QOpenGLShader,
QOpenGLShaderProgram, QOpenGLVertexArrayObject, QSurfaceFormat, QWindow)
from PySide2.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
@@ -61,50 +64,56 @@ except ImportError:
messageBox.exec_()
sys.exit(1)
-vertexShaderSource110 = """
-#version 110
-attribute highp vec4 posAttr;
-attribute lowp vec4 colAttr;
-varying lowp vec4 col;
-uniform highp mat4 matrix;
-void main() {
- col = colAttr;
- gl_Position = matrix * posAttr;
-}
-"""
-
-fragmentShaderSource110 = """
-#version 110
-varying lowp vec4 col;
-void main() {
- gl_FragColor = col;
-}
-"""
-
-vertexShaderSource = """
-#version 150
-in vec4 posAttr;
-in vec4 colAttr;
-out vec4 col;
-uniform mat4 matrix;
-void main() {
- col = colAttr;
- gl_Position = matrix * posAttr;
-}
-"""
-
-fragmentShaderSource = """
-#version 150
-in vec4 col;
-out vec4 fragColor;
-void main() {
- fragColor = col;
-}
-"""
+vertexShaderSource110 = dedent("""
+ // version 110
+ attribute highp vec4 posAttr;
+ attribute lowp vec4 colAttr;
+ varying lowp vec4 col;
+ uniform highp mat4 matrix;
+ void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+ }
+ """)
+
+fragmentShaderSource110 = dedent("""
+ // version 110
+ varying lowp vec4 col;
+ void main() {
+ gl_FragColor = col;
+ }
+ """)
+
+vertexShaderSource = dedent("""
+ // version 150
+ in vec4 posAttr;
+ in vec4 colAttr;
+ out vec4 col;
+ uniform mat4 matrix;
+ void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+ }
+ """)
+
+fragmentShaderSource = dedent("""
+ // version 150
+ in vec4 col;
+ out vec4 fragColor;
+ void main() {
+ fragColor = col;
+ }
+ """)
vertices = numpy.array([0, 0.707, -0.5, -0.5, 0.5, -0.5], dtype = numpy.float32)
colors = numpy.array([1, 0, 0, 0, 1, 0, 0, 0, 1], dtype = numpy.float32)
+
+def print_surface_format(surface_format):
+ profile_name = 'core' if surface_format.profile() == QSurfaceFormat.CoreProfile else 'compatibility'
+ return "{} version {}.{}".format(profile_name,
+ surface_format.majorVersion(), surface_format.minorVersion())
+
class RenderWindow(QWindow):
def __init__(self, format):
super(RenderWindow, self).__init__()
@@ -173,7 +182,11 @@ class RenderWindow(QWindow):
if self.timer is None:
self.timer = QTimer(self)
self.timer.timeout.connect(self.slotTimer)
+ if not self.timer.isActive():
self.timer.start(10)
+ else:
+ if self.timer and self.timer.isActive():
+ self.timer.stop()
def render(self):
if not self.context.makeCurrent(self):
@@ -184,7 +197,9 @@ class RenderWindow(QWindow):
functions.glClearColor(0, 0, 0, 1)
self.initGl()
- functions.glViewport(0, 0, self.width(), self.height())
+ retinaScale = self.devicePixelRatio()
+ functions.glViewport(0, 0, self.width() * retinaScale,
+ self.height() * retinaScale)
functions.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
self.program.bind()
@@ -217,10 +232,13 @@ class RenderWindow(QWindow):
if not self.context.makeCurrent(self):
raise Exception("makeCurrent() failed")
functions = self.context.functions()
- text = "Vendor: {}\nRenderer: {}\nVersion: {}\nShading language: {}".format(
+ text = """Vendor: {}\nRenderer: {}\nVersion: {}\nShading language: {}
+\nContext Format: {}\n\nSurface Format: {}""".format(
functions.glGetString(GL.GL_VENDOR), functions.glGetString(GL.GL_RENDERER),
functions.glGetString(GL.GL_VERSION),
- functions.glGetString(GL.GL_SHADING_LANGUAGE_VERSION))
+ functions.glGetString(GL.GL_SHADING_LANGUAGE_VERSION),
+ print_surface_format(self.context.format()),
+ print_surface_format(self.format()))
self.context.doneCurrent()
return text
@@ -243,6 +261,21 @@ class MainWindow(QWidget):
self.plainTextEdit.setPlainText(text)
if __name__ == '__main__':
+ parser = ArgumentParser(description="contextinfo", formatter_class=RawTextHelpFormatter)
+ parser.add_argument('--gles', '-g', action='store_true',
+ help='Use OpenGL ES')
+ parser.add_argument('--software', '-s', action='store_true',
+ help='Use Software OpenGL')
+ parser.add_argument('--desktop', '-d', action='store_true',
+ help='Use Desktop OpenGL')
+ options = parser.parse_args()
+ if options.gles:
+ QCoreApplication.setAttribute(Qt.AA_UseOpenGLES)
+ elif options.software:
+ QCoreApplication.setAttribute(Qt.AA_UseSoftwareOpenGL)
+ elif options.desktop:
+ QCoreApplication.setAttribute(Qt.AA_UseDesktopOpenGL)
+
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
diff --git a/examples/widgets/animation/easing/ui_form.py b/examples/widgets/animation/easing/ui_form.py
index 4ecf4858d..515a4ee91 100644
--- a/examples/widgets/animation/easing/ui_form.py
+++ b/examples/widgets/animation/easing/ui_form.py
@@ -1,115 +1,152 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'form.ui'
-#
-# Created: Wed Feb 16 22:14:47 2011
-# by: pyside-uic 0.2.6 running on PySide 1.0.0~beta5
-#
-# WARNING! All changes made in this file will be lost!
+################################################################################
+## Form generated from reading UI file 'form.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
class Ui_Form(object):
def setupUi(self, Form):
- Form.setObjectName("Form")
+ if Form.objectName():
+ Form.setObjectName(u"Form")
Form.resize(545, 471)
- self.gridLayout = QtWidgets.QGridLayout(Form)
- self.gridLayout.setObjectName("gridLayout")
- self.easingCurvePicker = QtWidgets.QListWidget(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
+ self.gridLayout = QGridLayout(Form);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.easingCurvePicker = QListWidget(Form)
+ self.easingCurvePicker.setObjectName(u"easingCurvePicker")
+ sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(self.easingCurvePicker.sizePolicy().hasHeightForWidth())
self.easingCurvePicker.setSizePolicy(sizePolicy)
- self.easingCurvePicker.setMaximumSize(QtCore.QSize(16777215, 120))
- self.easingCurvePicker.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.easingCurvePicker.setMovement(QtWidgets.QListView.Static)
+ self.easingCurvePicker.setMaximumSize(QSize(16777215, 120))
+ self.easingCurvePicker.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+ self.easingCurvePicker.setMovement(QListView.Static)
self.easingCurvePicker.setProperty("isWrapping", False)
- self.easingCurvePicker.setViewMode(QtWidgets.QListView.IconMode)
+ self.easingCurvePicker.setViewMode(QListView.IconMode)
self.easingCurvePicker.setSelectionRectVisible(False)
- self.easingCurvePicker.setObjectName("easingCurvePicker")
- self.gridLayout.addWidget(self.easingCurvePicker, 0, 0, 1, 2)
- self.verticalLayout = QtWidgets.QVBoxLayout()
- self.verticalLayout.setObjectName("verticalLayout")
- self.groupBox_2 = QtWidgets.QGroupBox(Form)
- self.groupBox_2.setObjectName("groupBox_2")
- self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
- self.verticalLayout_2.setObjectName("verticalLayout_2")
- self.lineRadio = QtWidgets.QRadioButton(self.groupBox_2)
- self.lineRadio.setChecked(True)
- self.lineRadio.setObjectName("lineRadio")
- self.buttonGroup = QtWidgets.QButtonGroup(Form)
- self.buttonGroup.setObjectName("buttonGroup")
+
+ self.gridLayout.addWidget(self.easingCurvePicker, 0, 0, 1, 2);
+
+ self.verticalLayout = QVBoxLayout();
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.groupBox_2 = QGroupBox(Form)
+ self.groupBox_2.setObjectName(u"groupBox_2")
+ self.verticalLayout_2 = QVBoxLayout(self.groupBox_2);
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.lineRadio = QRadioButton(self.groupBox_2)
+ self.buttonGroup = QButtonGroup(Form)
+ self.buttonGroup.setObjectName(u"buttonGroup")
+ self.buttonGroup.setExclusive(False)
self.buttonGroup.addButton(self.lineRadio)
- self.verticalLayout_2.addWidget(self.lineRadio)
- self.circleRadio = QtWidgets.QRadioButton(self.groupBox_2)
- self.circleRadio.setObjectName("circleRadio")
+ self.lineRadio.setObjectName(u"lineRadio")
+ self.lineRadio.setChecked(True)
+
+ self.verticalLayout_2.addWidget(self.lineRadio);
+
+ self.circleRadio = QRadioButton(self.groupBox_2)
self.buttonGroup.addButton(self.circleRadio)
- self.verticalLayout_2.addWidget(self.circleRadio)
- self.verticalLayout.addWidget(self.groupBox_2)
- self.groupBox = QtWidgets.QGroupBox(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
- self.groupBox.setSizePolicy(sizePolicy)
- self.groupBox.setObjectName("groupBox")
- self.formLayout = QtWidgets.QFormLayout(self.groupBox)
- self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
- self.formLayout.setObjectName("formLayout")
- self.label = QtWidgets.QLabel(self.groupBox)
- self.label.setObjectName("label")
- self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
- self.periodSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.circleRadio.setObjectName(u"circleRadio")
+
+ self.verticalLayout_2.addWidget(self.circleRadio);
+
+
+ self.verticalLayout.addWidget(self.groupBox_2);
+
+ self.groupBox = QGroupBox(Form)
+ self.groupBox.setObjectName(u"groupBox")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
+ sizePolicy1.setHorizontalStretch(0);
+ sizePolicy1.setVerticalStretch(0);
+ sizePolicy1.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
+ self.groupBox.setSizePolicy(sizePolicy1)
+ self.formLayout = QFormLayout(self.groupBox);
+ self.formLayout.setObjectName(u"formLayout")
+ self.formLayout.setFieldGrowthPolicy(QFormLayout.AllNonFixedFieldsGrow)
+ self.label = QLabel(self.groupBox)
+ self.label.setObjectName(u"label")
+
+ self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label);
+
+ self.periodSpinBox = QDoubleSpinBox(self.groupBox)
+ self.periodSpinBox.setObjectName(u"periodSpinBox")
self.periodSpinBox.setEnabled(False)
- self.periodSpinBox.setMinimum(-1.0)
- self.periodSpinBox.setSingleStep(0.1)
- self.periodSpinBox.setProperty("value", -1.0)
- self.periodSpinBox.setObjectName("periodSpinBox")
- self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.periodSpinBox)
- self.label_2 = QtWidgets.QLabel(self.groupBox)
- self.label_2.setObjectName("label_2")
- self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
- self.amplitudeSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.periodSpinBox.setMinimum(-1.000000000000000)
+ self.periodSpinBox.setSingleStep(0.100000000000000)
+ self.periodSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(0, QFormLayout.FieldRole, self.periodSpinBox);
+
+ self.label_2 = QLabel(self.groupBox)
+ self.label_2.setObjectName(u"label_2")
+
+ self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label_2);
+
+ self.amplitudeSpinBox = QDoubleSpinBox(self.groupBox)
+ self.amplitudeSpinBox.setObjectName(u"amplitudeSpinBox")
self.amplitudeSpinBox.setEnabled(False)
- self.amplitudeSpinBox.setMinimum(-1.0)
- self.amplitudeSpinBox.setSingleStep(0.1)
- self.amplitudeSpinBox.setProperty("value", -1.0)
- self.amplitudeSpinBox.setObjectName("amplitudeSpinBox")
- self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.amplitudeSpinBox)
- self.label_3 = QtWidgets.QLabel(self.groupBox)
- self.label_3.setObjectName("label_3")
- self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
- self.overshootSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
+ self.amplitudeSpinBox.setMinimum(-1.000000000000000)
+ self.amplitudeSpinBox.setSingleStep(0.100000000000000)
+ self.amplitudeSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(1, QFormLayout.FieldRole, self.amplitudeSpinBox);
+
+ self.label_3 = QLabel(self.groupBox)
+ self.label_3.setObjectName(u"label_3")
+
+ self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_3);
+
+ self.overshootSpinBox = QDoubleSpinBox(self.groupBox)
+ self.overshootSpinBox.setObjectName(u"overshootSpinBox")
self.overshootSpinBox.setEnabled(False)
- self.overshootSpinBox.setMinimum(-1.0)
- self.overshootSpinBox.setSingleStep(0.1)
- self.overshootSpinBox.setProperty("value", -1.0)
- self.overshootSpinBox.setObjectName("overshootSpinBox")
- self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.overshootSpinBox)
- self.verticalLayout.addWidget(self.groupBox)
- spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
- self.verticalLayout.addItem(spacerItem)
- self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1)
- self.graphicsView = QtWidgets.QGraphicsView(Form)
- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
- self.graphicsView.setSizePolicy(sizePolicy)
- self.graphicsView.setObjectName("graphicsView")
- self.gridLayout.addWidget(self.graphicsView, 1, 1, 1, 1)
+ self.overshootSpinBox.setMinimum(-1.000000000000000)
+ self.overshootSpinBox.setSingleStep(0.100000000000000)
+ self.overshootSpinBox.setValue(-1.000000000000000)
+
+ self.formLayout.setWidget(2, QFormLayout.FieldRole, self.overshootSpinBox);
+
+
+ self.verticalLayout.addWidget(self.groupBox);
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding);
+
+ self.verticalLayout.addItem(self.verticalSpacer);
+
+
+ self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1);
+
+ self.graphicsView = QGraphicsView(Form)
+ self.graphicsView.setObjectName(u"graphicsView")
+ sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0);
+ sizePolicy2.setVerticalStretch(0);
+ sizePolicy2.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
+ self.graphicsView.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.graphicsView, 1, 1, 1, 1);
+
self.retranslateUi(Form)
- QtCore.QMetaObject.connectSlotsByName(Form)
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
def retranslateUi(self, Form):
- Form.setWindowTitle(QtWidgets.QApplication.translate("Form", "Easing curves", None))
- self.groupBox_2.setTitle(QtWidgets.QApplication.translate("Form", "Path type", None))
- self.lineRadio.setText(QtWidgets.QApplication.translate("Form", "Line", None))
- self.circleRadio.setText(QtWidgets.QApplication.translate("Form", "Circle", None))
- self.groupBox.setTitle(QtWidgets.QApplication.translate("Form", "Properties", None))
- self.label.setText(QtWidgets.QApplication.translate("Form", "Period", None))
- self.label_2.setText(QtWidgets.QApplication.translate("Form", "Amplitude", None))
- self.label_3.setText(QtWidgets.QApplication.translate("Form", "Overshoot", None))
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Easing curves", None))
+ self.groupBox_2.setTitle(QCoreApplication.translate("Form", u"Path type", None))
+ self.lineRadio.setText(QCoreApplication.translate("Form", u"Line", None))
+ self.circleRadio.setText(QCoreApplication.translate("Form", u"Circle", None))
+ self.groupBox.setTitle(QCoreApplication.translate("Form", u"Properties", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Period", None))
+ self.label_2.setText(QCoreApplication.translate("Form", u"Amplitude", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Overshoot", None))
+ # retranslateUi
diff --git a/examples/xmlpatterns/schema/ui_schema.py b/examples/xmlpatterns/schema/ui_schema.py
index a5690c28d..28084624d 100644
--- a/examples/xmlpatterns/schema/ui_schema.py
+++ b/examples/xmlpatterns/schema/ui_schema.py
@@ -1,62 +1,88 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'schema.ui'
-#
-# Created: Fri Feb 5 15:27:54 2010
-# by: PyQt4 UI code generator snapshot-4.7.1-c39e85a8e2ec
-#
-# WARNING! All changes made in this file will be lost!
+################################################################################
+## Form generated from reading UI file 'schema.ui'
+##
+## Created by: Qt User Interface Compiler version 5.14.0
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
+ QRect, QSize, QUrl, Qt)
+from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap)
+from PySide2.QtWidgets import *
class Ui_SchemaMainWindow(object):
def setupUi(self, SchemaMainWindow):
- SchemaMainWindow.setObjectName("SchemaMainWindow")
+ if SchemaMainWindow.objectName():
+ SchemaMainWindow.setObjectName(u"SchemaMainWindow")
SchemaMainWindow.resize(417, 594)
- self.centralwidget = QtWidgets.QWidget(SchemaMainWindow)
- self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.schemaLabel = QtWidgets.QLabel(self.centralwidget)
- self.schemaLabel.setObjectName("schemaLabel")
- self.gridLayout.addWidget(self.schemaLabel, 0, 0, 1, 2)
- self.schemaSelection = QtWidgets.QComboBox(self.centralwidget)
- self.schemaSelection.setObjectName("schemaSelection")
- self.gridLayout.addWidget(self.schemaSelection, 0, 2, 1, 2)
- self.schemaView = QtWidgets.QTextBrowser(self.centralwidget)
- self.schemaView.setObjectName("schemaView")
- self.gridLayout.addWidget(self.schemaView, 1, 0, 1, 4)
- self.instanceLabel = QtWidgets.QLabel(self.centralwidget)
- self.instanceLabel.setObjectName("instanceLabel")
- self.gridLayout.addWidget(self.instanceLabel, 2, 0, 1, 2)
- self.instanceSelection = QtWidgets.QComboBox(self.centralwidget)
- self.instanceSelection.setObjectName("instanceSelection")
- self.gridLayout.addWidget(self.instanceSelection, 2, 2, 1, 2)
- self.instanceEdit = QtWidgets.QTextEdit(self.centralwidget)
- self.instanceEdit.setObjectName("instanceEdit")
- self.gridLayout.addWidget(self.instanceEdit, 3, 0, 1, 4)
- self.label = QtWidgets.QLabel(self.centralwidget)
- self.label.setObjectName("label")
- self.gridLayout.addWidget(self.label, 4, 0, 1, 1)
- self.validationStatus = QtWidgets.QLabel(self.centralwidget)
- self.validationStatus.setObjectName("validationStatus")
- self.gridLayout.addWidget(self.validationStatus, 4, 1, 1, 2)
- self.validateButton = QtWidgets.QPushButton(self.centralwidget)
- self.validateButton.setObjectName("validateButton")
- self.gridLayout.addWidget(self.validateButton, 4, 3, 1, 1)
+ self.centralwidget = QWidget(SchemaMainWindow)
+ self.centralwidget.setObjectName(u"centralwidget")
+ self.gridLayout = QGridLayout(self.centralwidget);
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.schemaLabel = QLabel(self.centralwidget)
+ self.schemaLabel.setObjectName(u"schemaLabel")
+
+ self.gridLayout.addWidget(self.schemaLabel, 0, 0, 1, 2);
+
+ self.schemaSelection = QComboBox(self.centralwidget)
+ self.schemaSelection.setObjectName(u"schemaSelection")
+
+ self.gridLayout.addWidget(self.schemaSelection, 0, 2, 1, 2);
+
+ self.schemaView = QTextBrowser(self.centralwidget)
+ self.schemaView.setObjectName(u"schemaView")
+
+ self.gridLayout.addWidget(self.schemaView, 1, 0, 1, 4);
+
+ self.instanceLabel = QLabel(self.centralwidget)
+ self.instanceLabel.setObjectName(u"instanceLabel")
+
+ self.gridLayout.addWidget(self.instanceLabel, 2, 0, 1, 2);
+
+ self.instanceSelection = QComboBox(self.centralwidget)
+ self.instanceSelection.setObjectName(u"instanceSelection")
+
+ self.gridLayout.addWidget(self.instanceSelection, 2, 2, 1, 2);
+
+ self.instanceEdit = QTextEdit(self.centralwidget)
+ self.instanceEdit.setObjectName(u"instanceEdit")
+
+ self.gridLayout.addWidget(self.instanceEdit, 3, 0, 1, 4);
+
+ self.label = QLabel(self.centralwidget)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout.addWidget(self.label, 4, 0, 1, 1);
+
+ self.validationStatus = QLabel(self.centralwidget)
+ self.validationStatus.setObjectName(u"validationStatus")
+
+ self.gridLayout.addWidget(self.validationStatus, 4, 1, 1, 2);
+
+ self.validateButton = QPushButton(self.centralwidget)
+ self.validateButton.setObjectName(u"validateButton")
+
+ self.gridLayout.addWidget(self.validateButton, 4, 3, 1, 1);
+
SchemaMainWindow.setCentralWidget(self.centralwidget)
- self.statusbar = QtWidgets.QStatusBar(SchemaMainWindow)
- self.statusbar.setObjectName("statusbar")
+ self.statusbar = QStatusBar(SchemaMainWindow)
+ self.statusbar.setObjectName(u"statusbar")
SchemaMainWindow.setStatusBar(self.statusbar)
self.retranslateUi(SchemaMainWindow)
- QtCore.QMetaObject.connectSlotsByName(SchemaMainWindow)
+
+ QMetaObject.connectSlotsByName(SchemaMainWindow)
+ # setupUi
def retranslateUi(self, SchemaMainWindow):
- SchemaMainWindow.setWindowTitle(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Schema Validation", None))
- self.schemaLabel.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Schema Document:", None))
- self.instanceLabel.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "XML Instance Document:", None))
- self.label.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "Status:", None))
- self.validationStatus.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "not validated", None))
- self.validateButton.setText(QtWidgets.QApplication.translate("SchemaMainWindow", "Validate", None))
+ SchemaMainWindow.setWindowTitle(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Validation", None))
+ self.schemaLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Schema Document:", None))
+ self.instanceLabel.setText(QCoreApplication.translate("SchemaMainWindow", u"XML Instance Document:", None))
+ self.label.setText(QCoreApplication.translate("SchemaMainWindow", u"Status:", None))
+ self.validationStatus.setText(QCoreApplication.translate("SchemaMainWindow", u"not validated", None))
+ self.validateButton.setText(QCoreApplication.translate("SchemaMainWindow", u"Validate", None))
+ # retranslateUi
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 1e6f017d7..e5e5ab4e7 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -173,7 +173,10 @@ include(PySideModules)
macro(COLLECT_MODULE_IF_FOUND shortname)
set(name "Qt5${shortname}")
-
+ set(_qt_module_name "${name}")
+ if ("${shortname}" STREQUAL "OpenGLFunctions")
+ set(_qt_module_name "Qt5Gui")
+ endif()
# Determine essential/optional/missing
set(module_state "missing")
list(FIND ALL_ESSENTIAL_MODULES "${shortname}" essentialIndex)
@@ -192,12 +195,12 @@ macro(COLLECT_MODULE_IF_FOUND shortname)
set(quiet_argument "QUIET")
endif()
- find_package(${name} ${quiet_argument})
+ find_package(${_qt_module_name} ${quiet_argument})
# If package is found, _name_found will be equal to 1
- set(_name_found "${name}_FOUND")
+ set(_name_found "${_qt_module_name}_FOUND")
# _name_dir will keep the path to the directory where the CMake rules were found
# e.g: ~/qt5.9-install/qtbase/lib/cmake/Qt5Core or /usr/lib64/cmake/Qt5Core
- set(_name_dir "${name}_DIR")
+ set(_name_dir "${_qt_module_name}_DIR")
# Qt5Core will set the base path to check if all the modules are on the same
# directory, to avoid CMake looking in another path.
# This will be saved in a global variable at the beginning of the modules
@@ -256,7 +259,7 @@ endif()
# Collect all optional modules.
set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia
-MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets RemoteObjects Scxml Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization)
+MultimediaWidgets OpenGL OpenGLFunctions Positioning Location Qml Quick QuickWidgets RemoteObjects Scxml Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization)
find_package(Qt5UiTools)
if(Qt5UiTools_FOUND)
list(APPEND ALL_OPTIONAL_MODULES UiTools)
diff --git a/sources/pyside2/PySide2/CMakeLists.txt b/sources/pyside2/PySide2/CMakeLists.txt
index 5a371b8a9..d666751ea 100644
--- a/sources/pyside2/PySide2/CMakeLists.txt
+++ b/sources/pyside2/PySide2/CMakeLists.txt
@@ -43,7 +43,11 @@ file(READ "${CMAKE_CURRENT_BINARY_DIR}/pyside2_global.h" pyside2_global_contents
foreach(shortname IN LISTS all_module_shortnames)
set(name "Qt5${shortname}")
- HAS_QT_MODULE(${name}_FOUND Qt${shortname})
+ set(_qt_module_name "${name}")
+ if ("${shortname}" STREQUAL "OpenGLFunctions")
+ set(_qt_module_name "Qt5Gui")
+ endif()
+ HAS_QT_MODULE(${_qt_module_name}_FOUND Qt${shortname})
# Create a module header consisting of pyside2_global.h and the module
# include. Note: The contents of pyside2_global.h must be copied instead of
@@ -59,7 +63,7 @@ foreach(shortname IN LISTS all_module_shortnames)
endif()
set(module_header_content "${module_header_content}\n${pyside2_global_contents}")
# AxContainer/AxServer from Active Qt do not have module headers
- if(NOT "${shortname}" STREQUAL "AxContainer")
+ if(NOT "${shortname}" STREQUAL "AxContainer" AND NOT "${shortname}" STREQUAL "OpenGLFunctions")
set(module_header_content "${module_header_content}\n#include <Qt${shortname}/Qt${shortname}>")
endif()
set(post_header "${CMAKE_CURRENT_BINARY_DIR}/Qt${shortname}/Qt${shortname}_global.post.h")
@@ -87,6 +91,8 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/datavisualization_common.xml
DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/opengl_common.xml
DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/openglfunctions_common.xml
+ DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/webkitwidgets_common.xml
DESTINATION share/PySide2${pyside_SUFFIX}/typesystems)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/templates/xml_common.xml
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index cadfc33fa..71001140c 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -43,6 +43,7 @@
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
<load-typesystem name="templates/core_common.xml" generate="no"/>
<load-typesystem name="templates/gui_common.xml" generate="no"/>
+ <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
<rejection class="^Q.*$" argument-type="^QPlatform.*$"/>
@@ -2906,12 +2907,7 @@
<modify-argument index="2"><array/></modify-argument>
</modify-function>
<!-- Add explicit signatures for the setUniformValue functions -->
- <modify-function signature="setUniformValue(const char*, GLfloat)" remove="all"/>
- <modify-function signature="setUniformValue(const char*, GLint)" remove="all"/>
- <modify-function signature="setUniformValue(const char*, GLuint)" remove="all"/>
- <modify-function signature="setUniformValue(int, GLfloat)" remove="all"/>
- <modify-function signature="setUniformValue(int, GLint)" remove="all"/>
- <modify-function signature="setUniformValue(int, GLuint)" remove="all"/>
+ <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"/>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
new file mode 100644
index 000000000..72b3a16ca
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
@@ -0,0 +1,72 @@
+project(QtOpenGLFunctions)
+
+set(QtOpenGLFunctions_DROPPED_ENTRIES)
+
+get_property(QtOpenGLFunctions_enabled_features TARGET Qt5::Gui PROPERTY INTERFACE_QT_ENABLED_FEATURES)
+
+set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_wrapper.cpp)
+
+# cf qtbase/src/gui/opengl/opengl.pri
+list(FIND QtOpenGLFunctions_enabled_features "opengles2" _opengles2Index)
+# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtOpenGLFunctions_enabled_features)
+if(_opengles2Index GREATER -1)
+ list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
+ list(APPEND QtOpenGLFunctions_SRC
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
+ message(STATUS "Qt5OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)")
+else()
+ list(APPEND QtOpenGLFunctions_SRC
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_2_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_3_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_4_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_1_5_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_2_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_0_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_1_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_2_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_3_3_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_0_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_1_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_2_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_3_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp)
+ message(STATUS "Qt5OpenGLFunctions: Adding Desktop OpenGL classes")
+endif()
+
+configure_file("${QtOpenGLFunctions_SOURCE_DIR}/QtOpenGLFunctions_global.post.h.in"
+ "${QtOpenGLFunctions_BINARY_DIR}/QtOpenGLFunctions_global.post.h" @ONLY)
+
+set(QtOpenGLFunctions_include_dirs ${QtGOpenGLFunctions_SOURCE_DIR}
+ ${QtOpenGLFunctions_BINARY_DIR}
+ ${pyside2_SOURCE_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Gui_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ )
+set(QtOpenGLFunctions_libraries pyside2
+ ${Qt5Gui_LIBRARIES})
+
+set(QtOpenGLFunctions_deps QtGui)
+
+create_pyside_module(NAME QtOpenGLFunctions
+ INCLUDE_DIRS QtOpenGLFunctions_include_dirs
+ LIBRARIES QtOpenGLFunctions_libraries
+ DEPS QtOpenGLFunctions_deps
+ TYPESYSTEM_PATH QtOpenGLFunctions_SOURCE_DIR
+ SOURCES QtOpenGLFunctions_SRC
+ TYPESYSTEM_NAME ${QtOpenGLFunctions_BINARY_DIR}/typesystem_openglfunctions.xml
+ DROPPED_ENTRIES QtOpenGLFunctions_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in b/sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
new file mode 100644
index 000000000..6c8c77087
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qtgui-config.h>
+// OpenGL functions are not in the QtGui module header
+#if QT_CONFIG(opengl)
+# include <QtGui/qopenglfunctions_1_0.h>
+# include <QtGui/qopenglfunctions_1_1.h>
+# include <QtGui/qopenglfunctions_1_2.h>
+# include <QtGui/qopenglfunctions_1_3.h>
+# include <QtGui/qopenglfunctions_1_4.h>
+# include <QtGui/qopenglfunctions_1_5.h>
+# include <QtGui/qopenglfunctions_2_0.h>
+# include <QtGui/qopenglfunctions_2_1.h>
+# include <QtGui/qopenglfunctions_3_0.h>
+# include <QtGui/qopenglfunctions_3_1.h>
+# include <QtGui/qopenglfunctions_3_2_compatibility.h>
+# include <QtGui/qopenglfunctions_3_2_core.h>
+# include <QtGui/qopenglfunctions_3_3_compatibility.h>
+# include <QtGui/qopenglfunctions_3_3_core.h>
+# include <QtGui/qopenglfunctions_4_0_compatibility.h>
+# include <QtGui/qopenglfunctions_4_0_core.h>
+# include <QtGui/qopenglfunctions_4_1_compatibility.h>
+# include <QtGui/qopenglfunctions_4_1_core.h>
+# include <QtGui/qopenglfunctions_4_2_compatibility.h>
+# include <QtGui/qopenglfunctions_4_2_core.h>
+# include <QtGui/qopenglfunctions_4_3_compatibility.h>
+# include <QtGui/qopenglfunctions_4_3_core.h>
+# include <QtGui/qopenglfunctions_4_4_compatibility.h>
+# include <QtGui/qopenglfunctions_4_4_core.h>
+# include <QtGui/qopenglfunctions_4_5_compatibility.h>
+# include <QtGui/qopenglfunctions_4_5_core.h>
+#endif
+#if QT_CONFIG(opengles2)
+# include <QtGui/qopenglfunctions_es2.h>
+#endif
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml
new file mode 100644
index 000000000..1d5b08edb
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions.xml
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtOpenGLFunctions">
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
+ <load-typesystem name="templates/openglfunctions_common.xml" generate="no"/>
+
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?GLboolean ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^char\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="GLsync"/>
+ <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/>
+ <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/>
+ <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/>
+ <rejection class="^QOpenGLFunctions.*$" function-name="^glGet(Buffer|VertexAttrib)?Pointer.*$"/>
+ <rejection class="^QOpenGLFunctions.*$" function-name="^glMultiDrawElements.*$"/>
+ <!-- Reject any non-const array of the version functions -->
+ <rejection class="^QOpenGLFunctions_\d_\d.*$" argument-type="^GL\w+ ?\*$"/>
+
+ <object-type name="QOpenGLFunctions_1_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_2" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_3" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_4" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_1_5" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_2_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ </object-type>
+ <object-type name="QOpenGLFunctions_2_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_0" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_1" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_2_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_2_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_3_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ </object-type>
+ <object-type name="QOpenGLFunctions_3_3_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_0_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_0_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_1_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_0;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_1_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_2_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_2_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_3_Compatibility" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_3_Core" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_4_Compatibility" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_4_Core" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications_va;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_5_Compatibility" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_0_compat;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_1_compat;
+ &openglfunctions_modifications1_2_compat;
+ &openglfunctions_modifications1_3_compat;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications1_4_compat;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_0_compat;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications3_3a;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ &openglfunctions_modifications4_5;
+ </object-type>
+ <object-type name="QOpenGLFunctions_4_5_Core" since="5.5">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ &openglfunctions_modifications1_4;
+ &openglfunctions_modifications2_0;
+ &openglfunctions_modifications2_1;
+ &openglfunctions_modifications3_0;
+ &openglfunctions_modifications3_3;
+ &openglfunctions_modifications4_0;
+ &openglfunctions_modifications4_1;
+ &openglfunctions_modifications4_3;
+ &openglfunctions_modifications4_4;
+ &openglfunctions_modifications4_4_core;
+ &openglfunctions_modifications4_5;
+ &openglfunctions_modifications_va;
+ </object-type>
+ <object-type name="QOpenGLFunctions_ES2" since="5.1">
+ &openglfunctions_modifications1_0;
+ &openglfunctions_modifications1_1;
+ </object-type>
+ <suppress-warning text="^There's no user provided way.*QOpenGLFunctions_\d_\d.*::glIndex.*$"/>
+
+</typesystem>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml
new file mode 100644
index 000000000..5652ad6b6
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0.xml
@@ -0,0 +1,51 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glGetStringi?\(.*$">
+ <modify-argument index="return">
+ <replace-type modified-type="QString"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="glGetString_return_QString"/>
+ </inject-code>
+</modify-function>
+<modify-function signature="^glTexParameterI?u?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml
new file mode 100644
index 000000000..5793048cd
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_0_compat.xml
@@ -0,0 +1,103 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glBitmap\(.*$" remove="all"/>
+<modify-function signature="^glColor[34][a-z]{1,2}v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="glClipPlane(unsigned int,const double *)">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glEvalCoord\d[a-z]{1,2}v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glFog[fi]v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glIndex[a-z]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glLoadMatrix[df]\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glLight[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glLightModel[fi]v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMap1[df]\(.*$">
+ <modify-argument index="6"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMap2[df]\(.*$">
+ <modify-argument index="10"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMaterial[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMultMatrix[df]\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glNormal3.v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glPixelMap[a-z]{1,2}v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glPolygonStipple\(.*$" remove="all"/>
+<modify-function signature="^glRasterPos\d[a-z]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glRect[dfis]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glTexCoord\d[dfis]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glTexEnv[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glTexGen[dfi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glVertex\d[dfis]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml
new file mode 100644
index 000000000..9383fb83f
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1.xml
@@ -0,0 +1,44 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<!-- Except glGenLists/glDeleteLists -->
+<modify-function signature="^glDelete[A-KM-Z].*s\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml
new file mode 100644
index 000000000..3f8075b30
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_1_compat.xml
@@ -0,0 +1,44 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glPrioritizeTextures\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml
new file mode 100644
index 000000000..c13b09b5b
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_2_compat.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glColorTableParameter[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glConvolutionParameter[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml
new file mode 100644
index 000000000..e35f3b334
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_3_compat.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^gl(Load|Mult)TransposeMatrix[df]\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMultiTexCoord\d[a-z]v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml
new file mode 100644
index 000000000..1102daea8
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4.xml
@@ -0,0 +1,47 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glMultiDrawArrays\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glPointParameter[fi]v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml
new file mode 100644
index 000000000..4cb75d418
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications1_4_compat.xml
@@ -0,0 +1,49 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glFogCoord[df]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glSecondaryColor3u?[bdfis]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glWindowPos[23][dfis]v\(.*$">
+ <modify-argument index="1"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml
new file mode 100644
index 000000000..28a424e1a
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0.xml
@@ -0,0 +1,49 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glDrawBuffers\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glUniformMatrix\d[df]v\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glUniform\d?.v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml
new file mode 100644
index 000000000..49cbd5c05
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_0_compat.xml
@@ -0,0 +1 @@
+&typesystem_openglfunctions_modifications_va.xml;
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml
new file mode 100644
index 000000000..af515ed8c
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications2_1.xml
@@ -0,0 +1,43 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glUniformMatrix\dx\d[a-z]v\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml
new file mode 100644
index 000000000..8377e440b
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_0.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glClearBufferu?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glUniform\duiv\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml
new file mode 100644
index 000000000..7f4717170
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glSamplerParameterI?u?[dfi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glVertexAttribP\duiv\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml
new file mode 100644
index 000000000..4bf2bc8f5
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications3_3a.xml
@@ -0,0 +1,57 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+Present from 3.3..4.5 except 4.4 Core/4.5 Core
+-->
+<modify-function signature="^glColorP[34]uiv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glMultiTexCoordP\duiv\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^gl(Normal|SecondaryColor)P3uiv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glTexCoordP\duiv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glVertexP\duiv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml
new file mode 100644
index 000000000..cf2e47a5c
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_0.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glPatchParameterfv\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glUniformSubroutinesuiv\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml
new file mode 100644
index 000000000..bc92ce80d
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_1.xml
@@ -0,0 +1,58 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^gl(DepthRange|Scissor|Viewport)Arrayv\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glProgramUniform\du?[dfi]v\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glProgramUniformMatrix\d[df]v\(.*$">
+ <modify-argument index="5"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glProgramUniformMatrix\dx\d[df]v\(.*$">
+ <modify-argument index="5"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^gl(Scissor|Viewport)Indexedf?v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
+<modify-function signature="glShaderBinary(int,const unsigned int*,unsigned int,const void *,int)">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml
new file mode 100644
index 000000000..b3c2b618d
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_3.xml
@@ -0,0 +1,43 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glInvalidate(Sub)?Framebuffer\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml
new file mode 100644
index 000000000..ef6949a8e
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4.xml
@@ -0,0 +1,46 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glBindBuffersBase\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glBind(ImageTextures|Samplers|Textures)\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml
new file mode 100644
index 000000000..c747997aa
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_4_core.xml
@@ -0,0 +1,43 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glDebugMessageControl\(.*$">
+ <modify-argument index="5"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml
new file mode 100644
index 000000000..0a83531e6
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5.xml
@@ -0,0 +1,52 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glClearNamedFramebufferu?[fi]v\(.*$">
+ <modify-argument index="4"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glInvalidateNamedFramebuffer(Sub)?Data\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glNamedFramebufferDrawBuffers\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
+<modify-function signature="^glTextureParameterI?u?[fi]v\(.*$">
+ <modify-argument index="3"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml
new file mode 100644
index 000000000..5cd5161f8
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications4_5_core.xml
@@ -0,0 +1,41 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+ Remove me!
+-->
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml
new file mode 100644
index 000000000..ae4d49ab1
--- /dev/null
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/typesystem_openglfunctions_modifications_va.xml
@@ -0,0 +1,43 @@
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<modify-function signature="^glVertexAttrib[IL]?\dN?u?[bdfis]v\(.*$">
+ <modify-argument index="2"><array/></modify-argument>
+</modify-function>
diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
index f286e34f1..377a53331 100644
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ b/sources/pyside2/PySide2/support/generate_pyi.py
@@ -53,6 +53,7 @@ import re
import subprocess
import argparse
import glob
+import math
from contextlib import contextmanager
from textwrap import dedent
import traceback
@@ -183,6 +184,33 @@ def find_imports(text):
return [imp for imp in PySide2.__all__ if imp + "." in text]
+_cache = {}
+
+def check_if_skipable(outfilepath):
+ # A file can be skipped if it exists, and if it's file time is not
+ # older than this script or any of its dependencies.
+ def _do_find_newest_module():
+ newest = 0
+ for obj in sys.modules.values():
+ if getattr(obj, "__file__", None) and os.path.isfile(obj.__file__):
+ sourcepath = os.path.splitext(obj.__file__)[0] + ".py"
+ if os.path.exists(sourcepath):
+ newest = max(os.path.getmtime(sourcepath), newest)
+ return newest
+
+ def find_newest_module():
+ cache_name = "newest_module"
+ if cache_name not in _cache:
+ _cache[cache_name] = _do_find_newest_module()
+ return _cache[cache_name]
+
+ if os.path.exists(outfilepath):
+ stamp = os.path.getmtime(outfilepath)
+ if stamp >= find_newest_module():
+ return True
+ return False
+
+
def generate_pyi(import_name, outpath, options):
"""
Generates a .pyi file.
@@ -198,7 +226,7 @@ def generate_pyi(import_name, outpath, options):
pid = os.getpid()
plainname = import_name.split(".")[-1]
outfilepath = os.path.join(outpath, plainname + ".pyi")
- if options.skip and os.path.exists(outfilepath):
+ if options.skip and check_if_skipable(outfilepath):
logger.debug("{pid}:Skipped existing: {op}"
.format(op=os.path.basename(outfilepath), **locals()))
return -1
@@ -291,7 +319,17 @@ def generate_all_pyi(outpath, options):
valid = check = 0
if not outpath:
outpath = os.path.dirname(PySide2.__file__)
- lockdir = os.path.join(outpath, "generate_pyi.lockfile")
+ lockdir = os.path.join(outpath, "generate_pyi.lockdir")
+
+ pyi_var = "GENERATE_PYI_RECURSE {}".format(math.pi) # should not be set by anybody
+ if not os.environ.get(pyi_var, ""):
+ # To catch a possible crash, we run as a subprocess:
+ os.environ[pyi_var] = "yes"
+ ret = subprocess.call([sys.executable] + sys.argv)
+ if ret and os.path.exists(lockdir):
+ os.rmdir(lockdir)
+ sys.exit(ret)
+ # We are the subprocess. Do the real work.
with single_process(lockdir) as locked:
if locked:
if is_ci:
@@ -343,3 +381,4 @@ if __name__ == "__main__":
else:
parser_run.print_help()
sys.exit(1)
+# eof
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml
index 363422c8f..f3e772a8c 100644
--- a/sources/pyside2/PySide2/templates/gui_common.xml
+++ b/sources/pyside2/PySide2/templates/gui_common.xml
@@ -251,14 +251,6 @@
}
</template>
- <template name="glGetString_return_QString">
- %BEGIN_ALLOW_THREADS
- const GLubyte *us = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES);
- const QString s = QString::fromLocal8Bit(reinterpret_cast&lt;const char *&gt;(us));
- %END_ALLOW_THREADS
- %PYARG_0 = %CONVERTTOPYTHON[QString](s);
- </template>
-
<template name="fix_args,QRectF*">
QRectF rect_;
%BEGIN_ALLOW_THREADS
diff --git a/sources/pyside2/PySide2/templates/openglfunctions_common.xml b/sources/pyside2/PySide2/templates/openglfunctions_common.xml
new file mode 100644
index 000000000..e01094004
--- /dev/null
+++ b/sources/pyside2/PySide2/templates/openglfunctions_common.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem>
+ <template name="glGetString_return_QString">
+ %BEGIN_ALLOW_THREADS
+ const GLubyte *us = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES);
+ const QString s = QString::fromLocal8Bit(reinterpret_cast&lt;const char *&gt;(us));
+ %END_ALLOW_THREADS
+ %PYARG_0 = %CONVERTTOPYTHON[QString](s);
+ </template>
+</typesystem>
diff --git a/sources/pyside2/libpyside/dynamicqmetaobject.cpp b/sources/pyside2/libpyside/dynamicqmetaobject.cpp
index 417ffef5f..c5de54aa0 100644
--- a/sources/pyside2/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside2/libpyside/dynamicqmetaobject.cpp
@@ -464,16 +464,9 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
if (Signal::checkType(value)) {
// Register signals.
auto data = reinterpret_cast<PySideSignal *>(value);
- const char *signalName = Shiboken::String::toCString(key);
- data->signalName = strdup(signalName);
- QByteArray sig;
- sig.reserve(128);
- for (int i = 0; i < data->signaturesSize; ++i) {
- sig = signalName;
- sig += '(';
- if (data->signatures[i])
- sig += data->signatures[i];
- sig += ')';
+ data->data->signalName = Shiboken::String::toCString(key);
+ for (const auto &s : data->data->signatures) {
+ const auto sig = data->data->signalName + '(' + s.signature + ')';
if (m_baseObject->indexOfSignal(sig) == -1)
m_builder->addSignal(sig);
}
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index 091b0c447..c48a6f882 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -152,11 +152,6 @@ static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, Py
{
PySideProperty* me = reinterpret_cast<PySideProperty*>(subtype->tp_alloc(subtype, 0));
me->d = new PySidePropertyPrivate;
- memset(me->d, 0, sizeof(PySidePropertyPrivate));
- PySidePropertyPrivate* pData = me->d;
- pData->designable = true;
- pData->scriptable = true;
- pData->stored = true;
return reinterpret_cast<PyObject *>(me);
}
@@ -170,21 +165,29 @@ int qpropertyTpInit(PyObject* self, PyObject* args, PyObject* kwds)
static const char *kwlist[] = {"type", "fget", "fset", "freset", "fdel", "doc", "notify",
"designable", "scriptable", "stored", "user",
"constant", "final", 0};
+ char *doc{};
+
if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O|OOOOsObbbbbb:QtCore.QProperty",
const_cast<char**>(kwlist),
/*OO*/ &type, &(pData->fget),
/*OOO*/ &(pData->fset), &(pData->freset), &(pData->fdel),
- /*s*/ &(pData->doc),
+ /*s*/ &doc,
/*O*/ &(pData->notify),
/*bbbbbb*/ &(pData->designable), &(pData->scriptable), &(pData->stored), &(pData->user), &(pData->constant), &(pData->final))) {
return 0;
}
+ if (doc) {
+ pData->doc = doc;
+ free(doc);
+ } else {
+ pData->doc.clear();
+ }
pData->typeName = PySide::Signal::getTypeName(type);
- if (!pData->typeName)
+ if (pData->typeName.isEmpty())
PyErr_SetString(PyExc_TypeError, "Invalid property type or type name.");
else if (pData->constant && (pData->fset || pData->notify))
PyErr_SetString(PyExc_TypeError, "A constant property cannot have a WRITE method or a NOTIFY signal.");
@@ -287,9 +290,6 @@ static int qpropertyClear(PyObject* self)
Py_CLEAR(data->notify);
- free(data->typeName);
- free(data->doc);
- free(data->notifySignature);
delete data;
reinterpret_cast<PySideProperty*>(self)->d = 0;
return 0;
@@ -459,13 +459,14 @@ bool isFinal(const PySideProperty* self)
const char* getNotifyName(PySideProperty* self)
{
- if (!self->d->notifySignature) {
+ if (self->d->notifySignature.isEmpty()) {
PyObject* str = PyObject_Str(self->d->notify);
- self->d->notifySignature = strdup(Shiboken::String::toCString(str));
+ self->d->notifySignature = Shiboken::String::toCString(str);
Py_DECREF(str);
}
- return self->d->notifySignature;
+ return self->d->notifySignature.isEmpty()
+ ? nullptr : self->d->notifySignature.constData();
}
void setMetaCallHandler(PySideProperty* self, MetaCallHandler handler)
@@ -475,7 +476,7 @@ void setMetaCallHandler(PySideProperty* self, MetaCallHandler handler)
void setTypeName(PySideProperty* self, const char* typeName)
{
- self->d->typeName = strdup(typeName);
+ self->d->typeName = typeName;
}
void setUserData(PySideProperty* self, void* data)
diff --git a/sources/pyside2/libpyside/pysideproperty_p.h b/sources/pyside2/libpyside/pysideproperty_p.h
index f08e5f540..4db638021 100644
--- a/sources/pyside2/libpyside/pysideproperty_p.h
+++ b/sources/pyside2/libpyside/pysideproperty_p.h
@@ -41,35 +41,32 @@
#define PYSIDE_QPROPERTY_P_H
#include <sbkpython.h>
+#include <QtCore/QByteArray>
#include <QMetaObject>
#include "pysideproperty.h"
struct PySideProperty;
-extern "C"
+struct PySidePropertyPrivate
{
-
-struct PySidePropertyPrivate {
- char* typeName;
- PySide::Property::MetaCallHandler metaCallHandler;
- PyObject* fget;
- PyObject* fset;
- PyObject* freset;
- PyObject* fdel;
- PyObject* notify;
- char* notifySignature;
- char* doc;
- bool designable;
- bool scriptable;
- bool stored;
- bool user;
- bool constant;
- bool final;
- void* userData;
+ QByteArray typeName;
+ PySide::Property::MetaCallHandler metaCallHandler = nullptr;
+ PyObject *fget = nullptr;
+ PyObject *fset = nullptr;
+ PyObject *freset = nullptr;
+ PyObject *fdel = nullptr;
+ PyObject *notify = nullptr;
+ QByteArray notifySignature;
+ QByteArray doc;
+ bool designable = true;
+ bool scriptable = true;
+ bool stored = true;
+ bool user = false;
+ bool constant = false;
+ bool final = false;
+ void *userData = nullptr;
};
-} // extern "C"
-
namespace PySide { namespace Property {
/**
diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
index cf99de785..0f1993e79 100644
--- a/sources/pyside2/libpyside/pysidesignal.cpp
+++ b/sources/pyside2/libpyside/pysidesignal.cpp
@@ -71,11 +71,11 @@ namespace Signal {
QMetaMethod::Attributes m_attributes = QMetaMethod::Compatibility;
};
- static char* buildSignature(const char*, const char*);
+ static QByteArray buildSignature(const QByteArray &, const QByteArray &);
static void appendSignature(PySideSignal*, const SignalSignature &);
static void instanceInitialize(PySideSignalInstance*, PyObject*, PySideSignal*, PyObject*, int);
- static char* parseSignature(PyObject*);
- static PyObject* buildQtCompatible(const char*);
+ static QByteArray parseSignature(PyObject *);
+ static PyObject* buildQtCompatible(const QByteArray &);
}
}
@@ -215,28 +215,27 @@ int signalTpInit(PyObject* self, PyObject* args, PyObject* kwds)
bool tupledArgs = false;
PySideSignal* data = reinterpret_cast<PySideSignal*>(self);
- if (argName) {
- data->signalName = strdup(argName);
- }
+ if (!data->data)
+ data->data = new PySideSignalData;
+ if (argName)
+ data->data->signalName = argName;
for (Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
PyObject* arg = PyTuple_GET_ITEM(args, i);
if (PySequence_Check(arg) && !Shiboken::String::check(arg)) {
tupledArgs = true;
- char *sig = PySide::Signal::parseSignature(arg);
+ const auto sig = PySide::Signal::parseSignature(arg);
PySide::Signal::appendSignature(
data,
PySide::Signal::SignalSignature(sig));
- free(sig);
}
}
if (!tupledArgs) {
- char *sig = PySide::Signal::parseSignature(args);
+ const auto sig = PySide::Signal::parseSignature(args);
PySide::Signal::appendSignature(
data,
PySide::Signal::SignalSignature(sig));
- free(sig);
}
return 1;
@@ -246,17 +245,8 @@ void signalFree(void* self)
{
PyObject* pySelf = reinterpret_cast<PyObject*>(self);
PySideSignal* data = reinterpret_cast<PySideSignal*>(self);
-
- for (int i = 0, i_max = data->signaturesSize; i < i_max; i++) {
- if (data->signatures[i])
- free(data->signatures[i]);
- }
-
- free(data->signatures);
- free(data->signatureAttributes);
- free(data->signalName);
- data->initialized = 0;
- data->signaturesSize = 0;
+ delete data->data;
+ data->data = nullptr;
Py_XDECREF(data->homonymousMethod);
data->homonymousMethod = 0;
@@ -266,20 +256,15 @@ void signalFree(void* self)
PyObject* signalGetItem(PyObject* self, PyObject* key)
{
PySideSignal* data = reinterpret_cast<PySideSignal*>(self);
- char* sigKey;
+ QByteArray sigKey;
if (key) {
sigKey = PySide::Signal::parseSignature(key);
} else {
- if (data->signatures[0])
- sigKey = strdup(data->signatures[0]);
- else
- sigKey = strdup("void");
+ sigKey = data->data == nullptr || data->data->signatures.isEmpty()
+ ? PySide::Signal::voidType() : data->data->signatures.constFirst().signature;
}
- char* sig = PySide::Signal::buildSignature(data->signalName, sigKey);
- free(sigKey);
- PyObject* pySignature = Shiboken::String::fromCString(sig);
- free(sig);
- return pySignature;
+ auto sig = PySide::Signal::buildSignature(data->data->signalName, sigKey);
+ return Shiboken::String::fromCString(sig.constData());
}
@@ -294,8 +279,6 @@ void signalInstanceFree(void* self)
PySideSignalInstance* data = reinterpret_cast<PySideSignalInstance*>(self);
PySideSignalInstancePrivate* dataPvt = data->d;
- free(dataPvt->signalName);
- free(dataPvt->signature);
Py_XDECREF(dataPvt->homonymousMethod);
@@ -422,7 +405,8 @@ PyObject* signalInstanceConnect(PyObject* self, PyObject* args, PyObject* kwds)
Py_XDECREF(result);
}
if (!PyErr_Occurred()) // PYSIDE-79: inverse the logic. A Null return needs an error.
- PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s.", source->d->signature);
+ PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s.",
+ source->d->signature.constData());
return 0;
}
@@ -472,23 +456,20 @@ PyObject* signalInstanceEmit(PyObject* self, PyObject* args)
PyObject* signalInstanceGetItem(PyObject* self, PyObject* key)
{
PySideSignalInstance* data = reinterpret_cast<PySideSignalInstance*>(self);
- char* sigKey = PySide::Signal::parseSignature(key);
- char* sig = PySide::Signal::buildSignature(data->d->signalName, sigKey);
- free(sigKey);
- const char* sigName = data->d->signalName;
-
+ const auto sigName = data->d->signalName;
+ const auto sigKey = PySide::Signal::parseSignature(key);
+ const auto sig = PySide::Signal::buildSignature(sigName, sigKey);
while (data) {
- if (strcmp(data->d->signature, sig) == 0) {
- free(sig);
+ if (data->d->signature == sig) {
PyObject* result = reinterpret_cast<PyObject*>(data);
Py_INCREF(result);
return result;
}
- data = reinterpret_cast<PySideSignalInstance*>(data->d->next);
+ data = data->d->next;
}
- PyErr_Format(PyExc_IndexError, "Signature %s not found for signal: %s", sig, sigName);
- free(sig);
+ PyErr_Format(PyExc_IndexError, "Signature %s not found for signal: %s",
+ sig.constData(), sigName.constData());
return 0;
}
@@ -539,7 +520,8 @@ PyObject* signalInstanceDisconnect(PyObject* self, PyObject* args)
Py_DECREF(result);
}
- PyErr_Format(PyExc_RuntimeError, "Failed to disconnect signal %s.", source->d->signature);
+ PyErr_Format(PyExc_RuntimeError, "Failed to disconnect signal %s.",
+ source->d->signature.constData());
return 0;
}
@@ -640,72 +622,59 @@ void updateSourceObject(PyObject* source)
Py_XDECREF(objType);
}
-char* getTypeName(PyObject* type)
+QByteArray getTypeName(PyObject *type)
{
if (PyType_Check(type)) {
- char* typeName = NULL;
if (PyType_IsSubtype(reinterpret_cast<PyTypeObject*>(type),
reinterpret_cast<PyTypeObject*>(SbkObject_TypeF()))) {
SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(type);
- typeName = strdup(Shiboken::ObjectType::getOriginalName(objType));
- } else {
- // Translate python types to Qt names
- PyTypeObject* objType = reinterpret_cast<PyTypeObject*>(type);
- if (Shiboken::String::checkType(objType))
- typeName = strdup("QString");
- else if (objType == &PyInt_Type)
- typeName = strdup("int");
- else if (objType == &PyLong_Type)
- typeName = strdup("long");
- else if (objType == &PyFloat_Type)
- typeName = strdup("double");
- else if (objType == &PyBool_Type)
- typeName = strdup("bool");
- else if (Py_TYPE(objType) == SbkEnumType_TypeF())
- typeName = strdup(Shiboken::Enum::getCppName(objType));
- else
- typeName = strdup("PyObject");
+ return Shiboken::ObjectType::getOriginalName(objType);
}
- return typeName;
+ // Translate python types to Qt names
+ PyTypeObject* objType = reinterpret_cast<PyTypeObject*>(type);
+ if (Shiboken::String::checkType(objType))
+ return QByteArrayLiteral("QString");
+ if (objType == &PyInt_Type)
+ return QByteArrayLiteral("int");
+ if (objType == &PyLong_Type)
+ return QByteArrayLiteral("long");
+ if (objType == &PyFloat_Type)
+ return QByteArrayLiteral("double");
+ if (objType == &PyBool_Type)
+ return QByteArrayLiteral("bool");
+ if (Py_TYPE(objType) == SbkEnumType_TypeF())
+ return Shiboken::Enum::getCppName(objType);
+ return QByteArrayLiteral("PyObject");
}
if (type == Py_None) // Must be checked before as Shiboken::String::check accepts Py_None
- return strdup("void");
+ return voidType();
if (Shiboken::String::check(type)) {
- const char *result = Shiboken::String::toCString(type);
- if (!strcmp(result, "qreal"))
+ QByteArray result = Shiboken::String::toCString(type);
+ if (result == "qreal")
result = sizeof(qreal) == sizeof(double) ? "double" : "float";
- return strdup(result);
+ return result;
}
- return 0;
+ return QByteArray();
}
-char* buildSignature(const char* name, const char* signature)
+QByteArray buildSignature(const QByteArray &name, const QByteArray &signature)
{
- QByteArray signal(name);
- signal += '(';
- signal += signature;
- signal += ')';
- return strdup(QMetaObject::normalizedSignature(signal));
+ return QMetaObject::normalizedSignature(name + '(' + signature + ')');
}
-char* parseSignature(PyObject* args)
+QByteArray parseSignature(PyObject* args)
{
- char* signature = 0;
if (args && (Shiboken::String::check(args) || !PySequence_Check(args)))
return getTypeName(args);
+ QByteArray signature;
for (Py_ssize_t i = 0, i_max = PySequence_Size(args); i < i_max; i++) {
Shiboken::AutoDecRef arg(PySequence_GetItem(args, i));
- char* typeName = getTypeName(arg);
- if (typeName) {
- if (signature) {
- signature = reinterpret_cast<char*>(realloc(signature, (strlen(signature) + 1 + strlen(typeName)) * sizeof(char*)));
- signature = strcat(signature, ",");
- signature = strcat(signature, typeName);
- free(typeName);
- } else {
- signature = typeName;
- }
+ const auto typeName = getTypeName(arg);
+ if (!typeName.isEmpty()) {
+ if (!signature.isEmpty())
+ signature += ',';
+ signature += typeName;
}
}
return signature;
@@ -713,17 +682,7 @@ char* parseSignature(PyObject* args)
void appendSignature(PySideSignal* self, const SignalSignature &signature)
{
- self->signaturesSize++;
-
- if (self->signaturesSize > 1) {
- self->signatures = reinterpret_cast<char **>(realloc(self->signatures, sizeof(char *) * self->signaturesSize));
- self->signatureAttributes = reinterpret_cast<int *>(realloc(self->signatureAttributes, sizeof(int) * self->signaturesSize));
- } else {
- self->signatures = reinterpret_cast<char **>(malloc(sizeof(char *)));
- self->signatureAttributes = reinterpret_cast<int *>(malloc(sizeof(int)));
- }
- self->signatures[self->signaturesSize - 1] = strdup(signature.m_parameterTypes);
- self->signatureAttributes[self->signaturesSize - 1] = signature.m_attributes;
+ self->data->signatures.append({signature.m_parameterTypes, signature.m_attributes});
}
PySideSignalInstance* initialize(PySideSignal* self, PyObject* name, PyObject* object)
@@ -740,17 +699,15 @@ void instanceInitialize(PySideSignalInstance* self, PyObject* name, PySideSignal
{
self->d = new PySideSignalInstancePrivate;
PySideSignalInstancePrivate* selfPvt = self->d;
- selfPvt->next = 0;
- if (data->signalName)
- selfPvt->signalName = strdup(data->signalName);
- else {
- selfPvt->signalName = strdup(Shiboken::String::toCString(name));
- data->signalName = strdup(selfPvt->signalName);
- }
+ selfPvt->next = nullptr;
+ if (data->data->signalName.isEmpty())
+ data->data->signalName = Shiboken::String::toCString(name);
+ selfPvt->signalName = data->data->signalName;
selfPvt->source = source;
- selfPvt->signature = buildSignature(self->d->signalName, data->signatures[index]);
- selfPvt->attributes = data->signatureAttributes[index];
+ const auto &signature = data->data->signatures.at(index);
+ selfPvt->signature = buildSignature(self->d->signalName, signature.signature);
+ selfPvt->attributes = signature.attributes;
selfPvt->homonymousMethod = 0;
if (data->homonymousMethod) {
selfPvt->homonymousMethod = data->homonymousMethod;
@@ -758,7 +715,7 @@ void instanceInitialize(PySideSignalInstance* self, PyObject* name, PySideSignal
}
index++;
- if (index < data->signaturesSize) {
+ if (index < data->data->signatures.size()) {
selfPvt->next = PyObject_New(PySideSignalInstance, PySideSignalInstanceTypeF());
instanceInitialize(selfPvt->next, name, data, source, index);
}
@@ -800,8 +757,8 @@ PySideSignalInstance* newObjectFromMethod(PyObject* source, const QList<QMetaMet
QByteArray cppName(m.methodSignature());
cppName.truncate(cppName.indexOf('('));
// separe SignalName
- selfPvt->signalName = strdup(cppName.data());
- selfPvt->signature = strdup(m.methodSignature());
+ selfPvt->signalName = cppName;
+ selfPvt->signature = m.methodSignature();
selfPvt->attributes = m.attributes();
selfPvt->homonymousMethod = 0;
selfPvt->next = 0;
@@ -814,11 +771,8 @@ PySideSignal* newObject(const char* name, ...)
va_list listSignatures;
char* sig = 0;
PySideSignal* self = PyObject_New(PySideSignal, PySideSignalTypeF());
- self->signalName = strdup(name);
- self->signaturesSize = 0;
- self->signatures = 0;
- self->signatureAttributes = 0;
- self->initialized = 0;
+ self->data = new PySideSignalData;
+ self->data->signalName = name;
self->homonymousMethod = 0;
va_start(listSignatures, name);
@@ -897,11 +851,8 @@ void registerSignals(SbkObjectType* pyObj, const QMetaObject* metaObject)
SignalSigMap::Iterator end = signalsFound.end();
for (; it != end; ++it) {
PySideSignal* self = PyObject_New(PySideSignal, PySideSignalTypeF());
- self->signalName = strdup(it.key().constData());
- self->signaturesSize = 0;
- self->signatures = 0;
- self->signatureAttributes = 0;
- self->initialized = false;
+ self->data = new PySideSignalData;
+ self->data->signalName = it.key();
self->homonymousMethod = 0;
// Empty signatures comes first! So they will be the default signal signature
@@ -918,11 +869,9 @@ void registerSignals(SbkObjectType* pyObj, const QMetaObject* metaObject)
}
}
-PyObject* buildQtCompatible(const char* signature)
+PyObject* buildQtCompatible(const QByteArray &signature)
{
- QByteArray ba;
- ba.append(QT_SIGNAL_SENTINEL);
- ba.append(signature);
+ const auto ba = QT_SIGNAL_SENTINEL + signature;
return Shiboken::String::fromStringAndSize(ba, ba.size());
}
@@ -941,13 +890,6 @@ const char* getSignature(PySideSignalInstance* signal)
return signal->d->signature;
}
-const char** getSignatures(PyObject* signal, int* size)
-{
- PySideSignal* self = reinterpret_cast<PySideSignal*>(signal);
- *size = self->signaturesSize;
- return const_cast<const char**>(self->signatures);
-}
-
QStringList getArgsFromSignature(const char* signature, bool* isShortCircuit)
{
const QString qsignature = QLatin1String(signature);
@@ -1058,6 +1000,11 @@ QString codeCallbackName(PyObject* callback, const QString& funcName)
return funcName + QString::number(quint64(callback), 16);
}
+QByteArray voidType()
+{
+ return QByteArrayLiteral("void");
+}
+
} //namespace Signal
} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysidesignal_p.h b/sources/pyside2/libpyside/pysidesignal_p.h
index 24cbde505..a5cd67f66 100644
--- a/sources/pyside2/libpyside/pysidesignal_p.h
+++ b/sources/pyside2/libpyside/pysidesignal_p.h
@@ -42,40 +42,51 @@
#include <sbkpython.h>
+#include <QtCore/QByteArray>
+#include <QtCore/QVector>
+
+struct PySideSignalData
+{
+ struct Signature
+ {
+ QByteArray signature;
+ int attributes;
+ };
+
+ QByteArray signalName;
+ QVector<Signature> signatures;
+};
+
extern "C"
{
extern PyTypeObject *PySideSignalTypeF(void);
struct PySideSignal {
PyObject_HEAD
- bool initialized;
- char* signalName;
- char** signatures;
- int* signatureAttributes;
- int signaturesSize;
+ PySideSignalData *data;
PyObject* homonymousMethod;
};
struct PySideSignalInstance;
- struct PySideSignalInstancePrivate {
- char* signalName;
- char* signature;
- int attributes;
- PyObject* source;
- PyObject* homonymousMethod;
- PySideSignalInstance* next;
- };
-
-
}; //extern "C"
+struct PySideSignalInstancePrivate
+{
+ QByteArray signalName;
+ QByteArray signature;
+ int attributes = 0;
+ PyObject *source = nullptr;
+ PyObject *homonymousMethod = nullptr;
+ PySideSignalInstance *next = nullptr;
+};
+
namespace PySide { namespace Signal {
void init(PyObject* module);
bool connect(PyObject* source, const char* signal, PyObject* callback);
- char* getTypeName(PyObject*);
- const char** getSignatures(PyObject* self, int *size);
+ QByteArray getTypeName(PyObject *);
QString codeCallbackName(PyObject* callback, const QString& funcName);
+ QByteArray voidType();
}} //namespace PySide
diff --git a/sources/pyside2/libpyside/pysideslot.cpp b/sources/pyside2/libpyside/pysideslot.cpp
index 6f6658cf8..4104c090d 100644
--- a/sources/pyside2/libpyside/pysideslot.cpp
+++ b/sources/pyside2/libpyside/pysideslot.cpp
@@ -48,12 +48,17 @@
#define SLOT_DEC_NAME "Slot"
+struct SlotData
+{
+ QByteArray name;
+ QByteArray args;
+ QByteArray resultType;
+};
+
typedef struct
{
PyObject_HEAD
- char* slotName;
- char* args;
- char* resultType;
+ SlotData *slotData;
} PySideSlot;
extern "C"
@@ -103,31 +108,25 @@ int slotTpInit(PyObject *self, PyObject *args, PyObject *kw)
}
PySideSlot *data = reinterpret_cast<PySideSlot*>(self);
+ if (!data->slotData)
+ data->slotData = new SlotData;
for(Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) {
PyObject *argType = PyTuple_GET_ITEM(args, i);
- char *typeName = PySide::Signal::getTypeName(argType);
- if (typeName) {
- if (data->args) {
- data->args = reinterpret_cast<char*>(realloc(data->args, (strlen(data->args) + 1 + strlen(typeName)) * sizeof(char*)));
- data->args = strcat(data->args, ",");
- data->args = strcat(data->args, typeName);
- free(typeName);
- } else {
- data->args = typeName;
- }
- } else {
+ const auto typeName = PySide::Signal::getTypeName(argType);
+ if (typeName.isEmpty()) {
PyErr_Format(PyExc_TypeError, "Unknown signal argument type: %s", Py_TYPE(argType)->tp_name);
return -1;
}
+ if (!data->slotData->args.isEmpty())
+ data->slotData->args += ',';
+ data->slotData->args += typeName;
}
if (argName)
- data->slotName = strdup(argName);
+ data->slotData->name = argName;
- if (argResult)
- data->resultType = PySide::Signal::getTypeName(argResult);
- else
- data->resultType = strdup("void");
+ data->slotData->resultType = argResult
+ ? PySide::Signal::getTypeName(argResult) : PySide::Signal::voidType();
return 1;
}
@@ -142,15 +141,15 @@ PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */)
if (PyFunction_Check(callback)) {
PySideSlot *data = reinterpret_cast<PySideSlot*>(self);
- if (!data->slotName) {
- PyObject *funcName = PepFunction_GetName(callback);
- data->slotName = strdup(Shiboken::String::toCString(funcName));
- }
+ if (!data->slotData)
+ data->slotData = new SlotData;
+ if (data->slotData->name.isEmpty())
+ data->slotData->name = Shiboken::String::toCString(PepFunction_GetName(callback));
- QByteArray returnType = QMetaObject::normalizedType(data->resultType);
- QByteArray signature = QString().sprintf("%s(%s)", data->slotName, data->args).toUtf8();
- signature = returnType + " " + signature;
+ const QByteArray returnType = QMetaObject::normalizedType(data->slotData->resultType);
+ const QByteArray signature =
+ returnType + ' ' + data->slotData->name + '(' + data->slotData->args + ')';
if (!pySlotName)
pySlotName = Shiboken::String::fromCString(PYSIDE_SLOT_LIST_ATTR);
@@ -169,12 +168,8 @@ PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */)
Py_DECREF(pySignature);
//clear data
- free(data->slotName);
- data->slotName = 0;
- free(data->resultType);
- data->resultType = 0;
- free(data->args);
- data->args = 0;
+ delete data->slotData;
+ data->slotData = nullptr;
return callback;
}
return callback;
diff --git a/sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside2/tests/QtOpenGLFunctions/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here
diff --git a/sources/pyside2/tests/registry/exists_darwin_5_12_0_ci.py b/sources/pyside2/tests/registry/exists_darwin_5_12_0_ci.py
index a1fd624d9..689c17750 100644
--- a/sources/pyside2/tests/registry/exists_darwin_5_12_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_darwin_5_12_0_ci.py
@@ -5184,7 +5184,9 @@ if "PySide2.QtGui" in sys.modules:
"QOpenGLShaderProgram.setDefaultInnerTessellationLevels": ('list',),
"QOpenGLShaderProgram.setDefaultOuterTessellationLevels": ('list',),
"QOpenGLShaderProgram.setPatchVertexCount": ('int',),
- "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'int'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue1i": [('str', 'int')],
+ "QOpenGLShaderProgram.setUniformValue1f": [('str', 'float')],
"QOpenGLShaderProgram.setUniformValueArray": [('int', 'float', 'int', 'int'), ('int', 'int', 'int'), ('str', 'float', 'int', 'int'), ('str', 'int', 'int')],
"QOpenGLShaderProgram.shaders": (),
"QOpenGLShaderProgram.uniformLocation": [('PySide2.QtCore.QByteArray',), ('str',)],
diff --git a/sources/pyside2/tests/registry/exists_opensuse423_5_12_0_ci.py b/sources/pyside2/tests/registry/exists_opensuse423_5_12_0_ci.py
index 4b753386f..1bc359d3f 100644
--- a/sources/pyside2/tests/registry/exists_opensuse423_5_12_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_opensuse423_5_12_0_ci.py
@@ -5183,7 +5183,9 @@ if "PySide2.QtGui" in sys.modules:
"QOpenGLShaderProgram.setDefaultInnerTessellationLevels": ('list',),
"QOpenGLShaderProgram.setDefaultOuterTessellationLevels": ('list',),
"QOpenGLShaderProgram.setPatchVertexCount": ('int',),
- "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'int'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue1i": [('str', 'int')],
+ "QOpenGLShaderProgram.setUniformValue1f": [('str', 'float')],
"QOpenGLShaderProgram.setUniformValueArray": [('int', 'float', 'int', 'int'), ('int', 'int', 'int'), ('str', 'float', 'int', 'int'), ('str', 'int', 'int')],
"QOpenGLShaderProgram.shaders": (),
"QOpenGLShaderProgram.uniformLocation": [('PySide2.QtCore.QByteArray',), ('str',)],
diff --git a/sources/pyside2/tests/registry/exists_redhatenterpriselinuxworkstation74_5_12_0_ci.py b/sources/pyside2/tests/registry/exists_redhatenterpriselinuxworkstation74_5_12_0_ci.py
index 1a68c8c85..9e32998e1 100644
--- a/sources/pyside2/tests/registry/exists_redhatenterpriselinuxworkstation74_5_12_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_redhatenterpriselinuxworkstation74_5_12_0_ci.py
@@ -5183,7 +5183,9 @@ if "PySide2.QtGui" in sys.modules:
"QOpenGLShaderProgram.setDefaultInnerTessellationLevels": ('list',),
"QOpenGLShaderProgram.setDefaultOuterTessellationLevels": ('list',),
"QOpenGLShaderProgram.setPatchVertexCount": ('int',),
- "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'int'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List[typing.List[float]]'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'typing.List[typing.List[float]]')],
+ "QOpenGLShaderProgram.setUniformValue1i": [('str', 'int')],
+ "QOpenGLShaderProgram.setUniformValue1f": [('str', 'float')],
"QOpenGLShaderProgram.setUniformValueArray": [('int', 'float', 'int', 'int'), ('int', 'int', 'int'), ('str', 'float', 'int', 'int'), ('str', 'int', 'int')],
"QOpenGLShaderProgram.shaders": (),
"QOpenGLShaderProgram.uniformLocation": [('PySide2.QtCore.QByteArray',), ('str',)],
diff --git a/sources/pyside2/tests/registry/exists_win32_5_12_0_ci.py b/sources/pyside2/tests/registry/exists_win32_5_12_0_ci.py
index 10b2acf4c..ae170e517 100644
--- a/sources/pyside2/tests/registry/exists_win32_5_12_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_win32_5_12_0_ci.py
@@ -5196,7 +5196,9 @@ if "PySide2.QtGui" in sys.modules:
"QOpenGLShaderProgram.setDefaultInnerTessellationLevels": ('list',),
"QOpenGLShaderProgram.setDefaultOuterTessellationLevels": ('list',),
"QOpenGLShaderProgram.setPatchVertexCount": ('int',),
- "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'int'), ('str', 'typing.List')],
+ "QOpenGLShaderProgram.setUniformValue": [('int', 'PySide2.QtCore.QPoint'), ('int', 'PySide2.QtCore.QPointF'), ('int', 'PySide2.QtCore.QSize'), ('int', 'PySide2.QtCore.QSizeF'), ('int', 'PySide2.QtGui.QColor'), ('int', 'PySide2.QtGui.QMatrix2x2'), ('int', 'PySide2.QtGui.QMatrix2x3'), ('int', 'PySide2.QtGui.QMatrix2x4'), ('int', 'PySide2.QtGui.QMatrix3x2'), ('int', 'PySide2.QtGui.QMatrix3x3'), ('int', 'PySide2.QtGui.QMatrix3x4'), ('int', 'PySide2.QtGui.QMatrix4x2'), ('int', 'PySide2.QtGui.QMatrix4x3'), ('int', 'PySide2.QtGui.QMatrix4x4'), ('int', 'PySide2.QtGui.QTransform'), ('int', 'PySide2.QtGui.QVector2D'), ('int', 'PySide2.QtGui.QVector3D'), ('int', 'PySide2.QtGui.QVector4D'), ('int', 'float'), ('int', 'float', 'float'), ('int', 'float', 'float', 'float'), ('int', 'float', 'float', 'float', 'float'), ('int', 'int'), ('int', 'typing.List'), ('str', 'PySide2.QtCore.QPoint'), ('str', 'PySide2.QtCore.QPointF'), ('str', 'PySide2.QtCore.QSize'), ('str', 'PySide2.QtCore.QSizeF'), ('str', 'PySide2.QtGui.QColor'), ('str', 'PySide2.QtGui.QMatrix2x2'), ('str', 'PySide2.QtGui.QMatrix2x3'), ('str', 'PySide2.QtGui.QMatrix2x4'), ('str', 'PySide2.QtGui.QMatrix3x2'), ('str', 'PySide2.QtGui.QMatrix3x3'), ('str', 'PySide2.QtGui.QMatrix3x4'), ('str', 'PySide2.QtGui.QMatrix4x2'), ('str', 'PySide2.QtGui.QMatrix4x3'), ('str', 'PySide2.QtGui.QMatrix4x4'), ('str', 'PySide2.QtGui.QTransform'), ('str', 'PySide2.QtGui.QVector2D'), ('str', 'PySide2.QtGui.QVector3D'), ('str', 'PySide2.QtGui.QVector4D'), ('str', 'float', 'float'), ('str', 'float', 'float', 'float'), ('str', 'float', 'float', 'float', 'float'), ('str', 'typing.List')],
+ "QOpenGLShaderProgram.setUniformValue1i": [('str', 'int')],
+ "QOpenGLShaderProgram.setUniformValue1f": [('str', 'float')],
"QOpenGLShaderProgram.setUniformValueArray": [('int', 'float', 'int', 'int'), ('int', 'int', 'int'), ('str', 'float', 'int', 'int'), ('str', 'int', 'int')],
"QOpenGLShaderProgram.shaders": (),
"QOpenGLShaderProgram.uniformLocation": [('PySide2.QtCore.QByteArray',), ('str',)],
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 6e95e79e7..7e998d315 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -428,20 +428,20 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
// Start the generation...
const ClassList &typeValues = dom->classes();
- ReportHandler::setProgressReference(typeValues);
+
+ ReportHandler::startProgress("Generating class model ("
+ + QByteArray::number(typeValues.size()) + ")...");
for (const ClassModelItem &item : typeValues) {
- ReportHandler::progress(QStringLiteral("Generating class model (%1)...")
- .arg(typeValues.size()));
if (AbstractMetaClass *cls = traverseClass(dom, item, nullptr))
addAbstractMetaClass(cls, item.data());
}
// We need to know all global enums
const EnumList &enums = dom->enums();
- ReportHandler::setProgressReference(enums);
+
+ ReportHandler::startProgress("Generating enum model ("
+ + QByteArray::number(enums.size()) + ")...");
for (const EnumModelItem &item : enums) {
- ReportHandler::progress(QStringLiteral("Generating enum model (%1)...")
- .arg(enums.size()));
AbstractMetaEnum *metaEnum = traverseEnum(item, 0, QSet<QString>());
if (metaEnum) {
if (metaEnum->typeEntry()->generateCode())
@@ -450,10 +450,9 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
}
const auto &namespaceTypeValues = dom->namespaces();
- ReportHandler::setProgressReference(namespaceTypeValues);
+ ReportHandler::startProgress("Generating namespace model ("
+ + QByteArray::number(namespaceTypeValues.size()) + ")...");
for (const NamespaceModelItem &item : namespaceTypeValues) {
- ReportHandler::progress(QStringLiteral("Generating namespace model (%1)...")
- .arg(namespaceTypeValues.size()));
if (AbstractMetaClass *metaClass = traverseNamespace(dom, item))
addAbstractMetaClass(metaClass, item.data());
}
@@ -461,10 +460,9 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
// Go through all typedefs to see if we have defined any
// specific typedefs to be used as classes.
const TypeDefList typeDefs = dom->typeDefs();
- ReportHandler::setProgressReference(typeDefs);
+ ReportHandler::startProgress("Resolving typedefs ("
+ + QByteArray::number(typeDefs.size()) + ")...");
for (const TypeDefModelItem &typeDef : typeDefs) {
- ReportHandler::progress(QStringLiteral("Resolving typedefs (%1)...")
- .arg(typeDefs.size()));
if (AbstractMetaClass *cls = traverseTypeDef(dom, typeDef, nullptr))
addAbstractMetaClass(cls, typeDef.data());
}
@@ -506,16 +504,14 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
m_globalFunctions << metaFunc;
}
- ReportHandler::setProgressReference(m_metaClasses);
+ ReportHandler::startProgress("Fixing class inheritance...");
for (AbstractMetaClass *cls : qAsConst(m_metaClasses)) {
- ReportHandler::progress(QLatin1String("Fixing class inheritance..."));
if (!cls->isInterface() && !cls->isNamespace())
setupInheritance(cls);
}
- ReportHandler::setProgressReference(m_metaClasses);
+ ReportHandler::startProgress("Detecting inconsistencies in class model...");
for (AbstractMetaClass *cls : qAsConst(m_metaClasses)) {
- ReportHandler::progress(QLatin1String("Detecting inconsistencies in class model..."));
cls->fixFunctions();
if (!cls->typeEntry()) {
@@ -538,8 +534,9 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
cls->typeEntry()->setLookupName(cls->typeEntry()->targetLangName() + QLatin1String("$ConcreteWrapper"));
}
const auto &allEntries = types->entries();
- ReportHandler::progress(QStringLiteral("Detecting inconsistencies in typesystem (%1)...")
- .arg(allEntries.size()));
+
+ ReportHandler::startProgress("Detecting inconsistencies in typesystem ("
+ + QByteArray::number(allEntries.size()) + ")...");
for (auto it = allEntries.cbegin(), end = allEntries.cend(); it != end; ++it) {
TypeEntry *entry = it.value();
if (!entry->isPrimitive()) {
@@ -638,8 +635,12 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
traverseStreamOperator(item, nullptr);
}
+ ReportHandler::startProgress("Checking inconsistencies in function modifications...");
+
checkFunctionModifications();
+ ReportHandler::startProgress("Writing log files...");
+
// sort all classes topologically
m_metaClasses = classesTopologicalSorted(m_metaClasses);
@@ -673,6 +674,8 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
}
m_itemToClass.clear();
+
+ ReportHandler::endProgress();
}
static bool metaEnumLessThan(const AbstractMetaEnum *e1, const AbstractMetaEnum *e2)
diff --git a/sources/shiboken2/ApiExtractor/reporthandler.cpp b/sources/shiboken2/ApiExtractor/reporthandler.cpp
index 6ff5b8d03..c0c323029 100644
--- a/sources/shiboken2/ApiExtractor/reporthandler.cpp
+++ b/sources/shiboken2/ApiExtractor/reporthandler.cpp
@@ -52,22 +52,13 @@ static int m_warningCount = 0;
static int m_suppressedCount = 0;
static ReportHandler::DebugLevel m_debugLevel = ReportHandler::NoDebug;
static QSet<QString> m_reportedWarnings;
-static QString m_progressBuffer;
static QString m_prefix;
-static int m_step_size = 0;
-static int m_step = -1;
+static bool m_withinProgress = false;
static int m_step_warning = 0;
static QElapsedTimer m_timer;
Q_LOGGING_CATEGORY(lcShiboken, "qt.shiboken")
-static void printProgress()
-{
- std::printf("%s", m_progressBuffer.toUtf8().data());
- std::fflush(stdout);
- m_progressBuffer.clear();
-}
-
void ReportHandler::install()
{
qInstallMessageHandler(ReportHandler::messageOutput);
@@ -94,12 +85,6 @@ int ReportHandler::warningCount()
return m_warningCount;
}
-void ReportHandler::setProgressReference(int max)
-{
- m_step_size = max;
- m_step = -1;
-}
-
bool ReportHandler::isSilent()
{
return m_silent;
@@ -136,38 +121,45 @@ void ReportHandler::messageOutput(QtMsgType type, const QMessageLogContext &cont
fprintf(stderr, "%s\n", qPrintable(qFormatLogMessage(type, context, message)));
}
-void ReportHandler::progress(const QString& str, ...)
+static QByteArray timeStamp()
+{
+ const qint64 elapsed = m_timer.elapsed();
+ return elapsed > 5000
+ ? QByteArray::number(elapsed / 1000) + 's'
+ : QByteArray::number(elapsed) + "ms";
+}
+
+void ReportHandler::startProgress(const QByteArray& str)
{
if (m_silent)
return;
- if (m_step == -1) {
- QTextStream buf(&m_progressBuffer);
- buf.setFieldWidth(45);
- buf.setFieldAlignment(QTextStream::AlignLeft);
- buf << str;
- printProgress();
- m_step = 0;
- }
- m_step++;
- if (m_step >= m_step_size) {
- if (m_step_warning == 0) {
- m_progressBuffer = QLatin1String("[" COLOR_GREEN "OK" COLOR_END "]\n");
- } else {
- m_progressBuffer = QLatin1String("[" COLOR_YELLOW "WARNING" COLOR_END "]\n");
- }
- printProgress();
- m_step_warning = 0;
- }
+ if (m_withinProgress)
+ endProgress();
+
+ m_withinProgress = true;
+ const auto ts = '[' + timeStamp() + ']';
+ std::printf("%s %8s %-60s", qPrintable(m_prefix), ts.constData(), str.constData());
+ std::fflush(stdout);
+}
+
+void ReportHandler::endProgress()
+{
+ if (m_silent)
+ return;
+
+ m_withinProgress = false;
+ const char *endMessage = m_step_warning == 0
+ ? "[" COLOR_GREEN "OK" COLOR_END "]\n"
+ : "[" COLOR_YELLOW "WARNING" COLOR_END "]\n";
+ std::fputs(endMessage, stdout);
+ std::fflush(stdout);
+ m_step_warning = 0;
}
QByteArray ReportHandler::doneMessage()
{
- QByteArray result = "Done, " + m_prefix.toUtf8() + ' ';
- const qint64 elapsed = m_timer.elapsed();
- result += elapsed > 5000
- ? QByteArray::number(elapsed / 1000) + 's'
- : QByteArray::number(elapsed) + "ms";
+ QByteArray result = "Done, " + m_prefix.toUtf8() + ' ' + timeStamp();
if (m_warningCount)
result += ", " + QByteArray::number(m_warningCount) + " warnings";
if (m_suppressedCount)
diff --git a/sources/shiboken2/ApiExtractor/reporthandler.h b/sources/shiboken2/ApiExtractor/reporthandler.h
index 8f97cb506..08ab7d23c 100644
--- a/sources/shiboken2/ApiExtractor/reporthandler.h
+++ b/sources/shiboken2/ApiExtractor/reporthandler.h
@@ -48,15 +48,8 @@ public:
static int suppressedCount();
- template <typename T>
- static void setProgressReference(T collection)
- {
- setProgressReference(collection.count());
- }
-
- static void setProgressReference(int max);
-
- static void progress(const QString &str, ...);
+ static void startProgress(const QByteArray &str);
+ static void endProgress();
static bool isDebug(DebugLevel level)
{ return debugLevel() >= level; }
diff --git a/sources/shiboken2/doc/contents.rst b/sources/shiboken2/doc/contents.rst
deleted file mode 100644
index 7cdc0063e..000000000
--- a/sources/shiboken2/doc/contents.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-Table of contents
-*****************
-.. toctree::
- :maxdepth: 3
-
- overview.rst
- samplebinding.rst
- commandlineoptions.rst
- projectfile.rst
- typesystemvariables.rst
- typeconverters.rst
- codeinjectionsemantics.rst
- sequenceprotocol.rst
- ownership.rst
- wordsofadvice.rst
- shibokenmodule.rst
- faq.rst
- typesystem.rst
diff --git a/sources/shiboken2/doc/index.rst b/sources/shiboken2/doc/index.rst
index 4cc5b204e..9403293ac 100644
--- a/sources/shiboken2/doc/index.rst
+++ b/sources/shiboken2/doc/index.rst
@@ -18,11 +18,22 @@ properly handle the data structures or types.
The final outcome of this process is a set of wrappers written in CPython,
which can be used as a module in your python code.
-Refer to the following topics for more information and examples:
+Table of contents
+*****************
.. toctree::
:maxdepth: 1
- overview
- samplebinding
- contents
+ overview.rst
+ samplebinding.rst
+ commandlineoptions.rst
+ projectfile.rst
+ typesystemvariables.rst
+ typeconverters.rst
+ codeinjectionsemantics.rst
+ sequenceprotocol.rst
+ ownership.rst
+ wordsofadvice.rst
+ shibokenmodule.rst
+ faq.rst
+ typesystem.rst
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp
index 9beaf47c7..ac576d657 100644
--- a/sources/shiboken2/generator/main.cpp
+++ b/sources/shiboken2/generator/main.cpp
@@ -624,7 +624,10 @@ int main(int argc, char *argv[])
for (const GeneratorPtr &g : qAsConst(generators)) {
g->setOutputDirectory(outputDirectory);
g->setLicenseComment(licenseComment);
- if (!g->setup(extractor) || !g->generate()) {
+ ReportHandler::startProgress(QByteArray("Running ") + g->name() + "...");
+ const bool ok = g->setup(extractor) && g->generate();
+ ReportHandler::endProgress();
+ if (!ok) {
errorPrint(QLatin1String("Error running generator: ")
+ QLatin1String(g->name()) + QLatin1Char('.'));
return EXIT_FAILURE;
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 29220c739..58788d5ef 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -330,8 +330,8 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext)
// The multiple inheritance initialization function
// needs the 'set' class from C++ STL.
- if (hasMultipleInheritanceInAncestry(metaClass))
- s << "#include <set>" << endl;
+ if (getMultipleInheritingClass(metaClass) != nullptr)
+ s << "#include <algorithm>\n#include <set>\n";
if (metaClass->generateExceptionHandling())
s << "#include <exception>" << endl;
@@ -453,8 +453,8 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext)
s << endl << "// Target ---------------------------------------------------------" << endl << endl;
s << "extern \"C\" {" << endl;
- const FunctionGroupMap &functionGroups = getFunctionGroups(metaClass);
- for (FunctionGroupMapIt it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
+ const auto &functionGroups = getFunctionGroups(metaClass);
+ for (auto it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
AbstractMetaFunctionList overloads;
QSet<QString> seenSignatures;
bool staticEncountered = false;
@@ -1726,7 +1726,7 @@ void CppGenerator::writeConstructorWrapper(QTextStream &s, const AbstractMetaFun
}
{
Indentation indentation(INDENT);
- s << INDENT << "Shiboken::ObjectType::copyMultimpleheritance(type, myType);" << endl;
+ s << INDENT << "Shiboken::ObjectType::copyMultipleInheritance(type, myType);" << endl;
}
if (!metaClass->isAbstract())
s << INDENT << '}' << endl << endl;
@@ -3553,11 +3553,18 @@ QStringList CppGenerator::getAncestorMultipleInheritance(const AbstractMetaClass
const AbstractMetaClassList &baseClases = getBaseClasses(metaClass);
if (!baseClases.isEmpty()) {
for (const AbstractMetaClass *baseClass : baseClases) {
- result.append(QString::fromLatin1("((size_t) static_cast<const %1*>(class_ptr)) - base")
- .arg(baseClass->qualifiedCppName()));
- result.append(QString::fromLatin1("((size_t) static_cast<const %1*>((%2*)((void*)class_ptr))) - base")
- .arg(baseClass->qualifiedCppName(), metaClass->qualifiedCppName()));
+ QString offset;
+ QTextStream(&offset) << "reinterpret_cast<uintptr_t>(static_cast<const "
+ << baseClass->qualifiedCppName() << "*>(class_ptr)) - base";
+ result.append(offset);
+ offset.clear();
+ QTextStream(&offset) << "reinterpret_cast<uintptr_t>(static_cast<const "
+ << baseClass->qualifiedCppName() << "*>(static_cast<const "
+ << metaClass->qualifiedCppName()
+ << "*>(static_cast<const void*>(class_ptr)))) - base";
+ result.append(offset);
}
+
for (const AbstractMetaClass *baseClass : baseClases)
result.append(getAncestorMultipleInheritance(baseClass));
}
@@ -3579,25 +3586,17 @@ void CppGenerator::writeMultipleInheritanceInitializerFunction(QTextStream& s, c
{
Indentation indent(INDENT);
s << INDENT << "std::set<int> offsets;" << endl;
- s << INDENT << "std::set<int>::iterator it;" << endl;
- s << INDENT << "const " << className << "* class_ptr = reinterpret_cast<const " << className << "*>(cptr);" << endl;
- s << INDENT << "size_t base = (size_t) class_ptr;" << endl;
+ s << INDENT << "const auto* class_ptr = reinterpret_cast<const " << className << "*>(cptr);" << endl;
+ s << INDENT << "const auto base = reinterpret_cast<uintptr_t>(class_ptr);" << endl;
for (const QString &ancestor : ancestors)
- s << INDENT << "offsets.insert(" << ancestor << ");" << endl;
+ s << INDENT << "offsets.insert(int(" << ancestor << "));" << endl;
s << endl;
s << INDENT << "offsets.erase(0);" << endl;
s << endl;
- s << INDENT << "int i = 0;" << endl;
- s << INDENT << "for (it = offsets.begin(); it != offsets.end(); it++) {" << endl;
- {
- Indentation indent(INDENT);
- s << INDENT << "mi_offsets[i] = *it;" << endl;
- s << INDENT << "i++;" << endl;
- }
- s << INDENT << '}' << endl;
+ s << INDENT << "std::copy(offsets.cbegin(), offsets.cend(), mi_offsets);\n";
}
s << INDENT << '}' << endl;
s << INDENT << "return mi_offsets;" << endl;
@@ -3748,8 +3747,6 @@ void CppGenerator::writeExtendedConverterInitialization(QTextStream& s, const Ty
QString CppGenerator::multipleInheritanceInitializerFunctionName(const AbstractMetaClass* metaClass)
{
- if (!hasMultipleInheritanceInAncestry(metaClass))
- return QString();
return cpythonBaseName(metaClass->typeEntry()) + QLatin1String("_mi_init");
}
@@ -5050,7 +5047,7 @@ void CppGenerator::writeClassRegister(QTextStream &s,
if (miClass == metaClass) {
s << multipleInheritanceInitializerFunctionName(miClass) << ";" << endl;
} else {
- s << "Shiboken::ObjectType::getMultipleIheritanceFunction(reinterpret_cast<SbkObjectType*>(";
+ s << "Shiboken::ObjectType::getMultipleInheritanceFunction(reinterpret_cast<SbkObjectType*>(";
s << cpythonTypeNameExt(miClass->typeEntry()) << "));" << endl;
}
s << INDENT << "Shiboken::ObjectType::setMultipleInheritanceFunction(";
@@ -5404,8 +5401,8 @@ bool CppGenerator::finishGeneration()
Indentation indent(INDENT);
- const FunctionGroupMap &functionGroups = getFunctionGroups();
- for (FunctionGroupMapIt it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
+ const auto functionGroups = getGlobalFunctionGroups();
+ for (auto it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
AbstractMetaFunctionList overloads;
for (AbstractMetaFunction *func : it.value()) {
if (!func->isModifiedRemoved()) {
@@ -5824,7 +5821,10 @@ bool CppGenerator::writeParentChildManagement(QTextStream& s, const AbstractMeta
const int numArgs = func->arguments().count();
bool ctorHeuristicEnabled = func->isConstructor() && useCtorHeuristic() && useHeuristicPolicy;
- bool usePyArgs = pythonFunctionWrapperUsesListOfArguments(OverloadData(getFunctionGroups(func->implementingClass())[func->name()], this));
+ const auto &groups = func->implementingClass()
+ ? getFunctionGroups(func->implementingClass())
+ : getGlobalFunctionGroups();
+ bool usePyArgs = pythonFunctionWrapperUsesListOfArguments(OverloadData(groups[func->name()], this));
ArgumentOwner argOwner = getArgumentOwner(func, argIndex);
ArgumentOwner::Action action = argOwner.action;
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.h b/sources/shiboken2/generator/shiboken2/cppgenerator.h
index d2e04dba2..519e12b7b 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.h
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.h
@@ -38,6 +38,9 @@ class CppGenerator : public ShibokenGenerator
{
public:
CppGenerator();
+
+ const char *name() const override { return "Source generator"; }
+
protected:
QString fileNameSuffix() const override;
QString fileNameForContext(GeneratorContext &context) const override;
diff --git a/sources/shiboken2/generator/shiboken2/headergenerator.h b/sources/shiboken2/generator/shiboken2/headergenerator.h
index 821531aab..f59e0fd9a 100644
--- a/sources/shiboken2/generator/shiboken2/headergenerator.h
+++ b/sources/shiboken2/generator/shiboken2/headergenerator.h
@@ -42,6 +42,9 @@ class HeaderGenerator : public ShibokenGenerator
{
public:
OptionDescriptions options() const override { return OptionDescriptions(); }
+
+ const char *name() const override { return "Header generator"; }
+
protected:
QString fileNameSuffix() const override;
QString fileNameForContext(GeneratorContext &context) const override;
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 002ab8cfb..44405c700 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -118,6 +118,16 @@ static QString resolveScopePrefix(const AbstractMetaEnum *metaEnum,
return resolveScopePrefix(parts, value);
}
+struct GeneratorClassInfoCacheEntry
+{
+ ShibokenGenerator::FunctionGroups functionGroups;
+ bool needsGetattroFunction = false;
+};
+
+using GeneratorClassInfoCache = QHash<const AbstractMetaClass *, GeneratorClassInfoCacheEntry>;
+
+Q_GLOBAL_STATIC(GeneratorClassInfoCache, generatorClassInfoCache)
+
ShibokenGenerator::ShibokenGenerator()
{
if (m_pythonPrimitiveTypeName.isEmpty())
@@ -1739,7 +1749,10 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
argsRemoved++;
}
- OverloadData od(getFunctionGroups(func->implementingClass())[func->name()], this);
+ const auto &groups = func->implementingClass()
+ ? getFunctionGroups(func->implementingClass())
+ : getGlobalFunctionGroups();
+ OverloadData od(groups[func->name()], this);
bool usePyArgs = pythonFunctionWrapperUsesListOfArguments(od);
// Replace %PYARG_# variables.
@@ -2165,26 +2178,19 @@ bool ShibokenGenerator::injectedCodeUsesArgument(const AbstractMetaFunction* fun
return false;
}
-bool ShibokenGenerator::hasMultipleInheritanceInAncestry(const AbstractMetaClass* metaClass)
+bool ShibokenGenerator::classNeedsGetattroFunction(const AbstractMetaClass* metaClass)
{
- if (!metaClass || metaClass->baseClassNames().isEmpty())
- return false;
- if (metaClass->baseClassNames().size() > 1)
- return true;
- return hasMultipleInheritanceInAncestry(metaClass->baseClass());
+ return getGeneratorClassInfo(metaClass).needsGetattroFunction;
}
-typedef QMap<QString, AbstractMetaFunctionList> FunctionGroupMap;
-typedef FunctionGroupMap::const_iterator FunctionGroupMapIt;
-
-bool ShibokenGenerator::classNeedsGetattroFunction(const AbstractMetaClass* metaClass)
+bool ShibokenGenerator::classNeedsGetattroFunctionImpl(const AbstractMetaClass* metaClass)
{
if (!metaClass)
return false;
if (metaClass->typeEntry()->isSmartPointer())
return true;
- const FunctionGroupMap &functionGroup = getFunctionGroups(metaClass);
- for (FunctionGroupMapIt it = functionGroup.cbegin(), end = functionGroup.cend(); it != end; ++it) {
+ const auto &functionGroup = getFunctionGroups(metaClass);
+ for (auto it = functionGroup.cbegin(), end = functionGroup.cend(); it != end; ++it) {
AbstractMetaFunctionList overloads;
for (AbstractMetaFunction *func : qAsConst(it.value())) {
if (func->isAssignmentOperator() || func->isCastOperator() || func->isModifiedRemoved()
@@ -2212,8 +2218,8 @@ AbstractMetaFunctionList ShibokenGenerator::getMethodsWithBothStaticAndNonStatic
{
AbstractMetaFunctionList methods;
if (metaClass) {
- const FunctionGroupMap &functionGroups = getFunctionGroups(metaClass);
- for (FunctionGroupMapIt it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
+ const auto &functionGroups = getFunctionGroups(metaClass);
+ for (auto it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
AbstractMetaFunctionList overloads;
for (AbstractMetaFunction *func : qAsConst(it.value())) {
if (func->isAssignmentOperator() || func->isCastOperator() || func->isModifiedRemoved()
@@ -2254,7 +2260,7 @@ AbstractMetaClassList ShibokenGenerator::getBaseClasses(const AbstractMetaClass*
const AbstractMetaClass* ShibokenGenerator::getMultipleInheritingClass(const AbstractMetaClass* metaClass)
{
if (!metaClass || metaClass->baseClassNames().isEmpty())
- return 0;
+ return nullptr;
if (metaClass->baseClassNames().size() > 1)
return metaClass;
return getMultipleInheritingClass(metaClass->baseClass());
@@ -2358,23 +2364,56 @@ static bool isGroupable(const AbstractMetaFunction* func)
return true;
}
-QMap< QString, AbstractMetaFunctionList > ShibokenGenerator::getFunctionGroups(const AbstractMetaClass* scope)
+ShibokenGenerator::FunctionGroups ShibokenGenerator::getGlobalFunctionGroups() const
{
- AbstractMetaFunctionList lst = scope ? scope->functions() : globalFunctions();
+ const AbstractMetaFunctionList &lst = globalFunctions();
+ FunctionGroups results;
+ for (AbstractMetaFunction *func : lst) {
+ if (isGroupable(func))
+ results[func->name()].append(func);
+ }
+ return results;
+}
- QMap<QString, AbstractMetaFunctionList> results;
- for (AbstractMetaFunction *func : qAsConst(lst)) {
+const GeneratorClassInfoCacheEntry &ShibokenGenerator::getGeneratorClassInfo(const AbstractMetaClass *scope)
+{
+ auto cache = generatorClassInfoCache();
+ auto it = cache->find(scope);
+ if (it == cache->end()) {
+ it = cache->insert(scope, {});
+ it.value().functionGroups = getFunctionGroupsImpl(scope);
+ it.value().needsGetattroFunction = classNeedsGetattroFunctionImpl(scope);
+ }
+ return it.value();
+}
+
+ShibokenGenerator::FunctionGroups ShibokenGenerator::getFunctionGroups(const AbstractMetaClass *scope)
+{
+ Q_ASSERT(scope);
+ return getGeneratorClassInfo(scope).functionGroups;
+}
+
+ShibokenGenerator::FunctionGroups ShibokenGenerator::getFunctionGroupsImpl(const AbstractMetaClass *scope)
+{
+ const AbstractMetaFunctionList &lst = scope->functions();
+
+ FunctionGroups results;
+ for (AbstractMetaFunction *func : lst) {
if (isGroupable(func)) {
- AbstractMetaFunctionList &list = results[func->name()];
- // If there are virtuals methods in the mix (PYSIDE-570,
- // QFileSystemModel::index(QString,int) and
- // QFileSystemModel::index(int,int,QModelIndex)) override, make sure
- // the overriding method of the most-derived class is seen first
- // and inserted into the "seenSignatures" set.
- if (func->isVirtual())
- list.prepend(func);
- else
- list.append(func);
+ auto it = results.find(func->name());
+ if (it == results.end()) {
+ results.insert(func->name(), AbstractMetaFunctionList(1, func));
+ } else {
+ // If there are virtuals methods in the mix (PYSIDE-570,
+ // QFileSystemModel::index(QString,int) and
+ // QFileSystemModel::index(int,int,QModelIndex)) override, make sure
+ // the overriding method of the most-derived class is seen first
+ // and inserted into the "seenSignatures" set.
+ if (func->isVirtual())
+ it.value().prepend(func);
+ else
+ it.value().append(func);
+ }
}
}
return results;
@@ -2503,8 +2542,8 @@ bool ShibokenGenerator::doSetup()
Q_ASSERT(moduleEntry);
getCode(snips, moduleEntry);
- const FunctionGroupMap &functionGroups = getFunctionGroups();
- for (FunctionGroupMapIt it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
+ const auto &functionGroups = getGlobalFunctionGroups();
+ for (auto it = functionGroups.cbegin(), end = functionGroups.cend(); it != end; ++it) {
for (AbstractMetaFunction *func : it.value())
getCode(snips, func->injectedCodeSnips());
}
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.h b/sources/shiboken2/generator/shiboken2/shibokengenerator.h
index 80b172778..f5f291526 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.h
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.h
@@ -54,6 +54,7 @@ extern const char *END_ALLOW_THREADS;
class DocParser;
class CodeSnip;
class OverloadData;
+struct GeneratorClassInfoCacheEntry;
QT_FORWARD_DECLARE_CLASS(QTextStream)
@@ -63,6 +64,8 @@ QT_FORWARD_DECLARE_CLASS(QTextStream)
class ShibokenGenerator : public Generator
{
public:
+ using FunctionGroups = QMap<QString, AbstractMetaFunctionList>; // Sorted
+
ShibokenGenerator();
~ShibokenGenerator() override;
@@ -99,7 +102,8 @@ protected:
* Example of return value: { "foo" -> ["foo(int)", "foo(int, long)], "bar" -> "bar(double)"}
* \param scope Where to search for functions, null means all global functions.
*/
- QMap<QString, AbstractMetaFunctionList> getFunctionGroups(const AbstractMetaClass* scope = 0);
+ FunctionGroups getGlobalFunctionGroups() const;
+ static FunctionGroups getFunctionGroups(const AbstractMetaClass *scope);
/**
* Returns all different inherited overloads of func, and includes func as well.
@@ -179,8 +183,8 @@ protected:
Options options = NoOption,
int arg_count = -1) const;
- /// Returns true if there are cases of multiple inheritance in any of its ancestors.
- bool hasMultipleInheritanceInAncestry(const AbstractMetaClass* metaClass);
+ /// Returns the top-most class that has multiple inheritance in the ancestry.
+ static const AbstractMetaClass *getMultipleInheritingClass(const AbstractMetaClass* metaClass);
/// Returns true if the class needs to have a getattro function.
bool classNeedsGetattroFunction(const AbstractMetaClass* metaClass);
@@ -194,8 +198,6 @@ protected:
/// Returns a list of parent classes for a given class.
AbstractMetaClassList getBaseClasses(const AbstractMetaClass* metaClass) const;
- const AbstractMetaClass* getMultipleInheritingClass(const AbstractMetaClass* metaClass);
-
void writeToPythonConversion(QTextStream& s, const AbstractMetaType* type,
const AbstractMetaClass* context, const QString& argumentName);
void writeToCppConversion(QTextStream& s, const AbstractMetaType* type, const AbstractMetaClass* context, const QString& inArgName, const QString& outArgName);
@@ -440,6 +442,10 @@ protected:
static QStringList m_knownPythonTypes;
private:
+ static const GeneratorClassInfoCacheEntry &getGeneratorClassInfo(const AbstractMetaClass *scope);
+ static FunctionGroups getFunctionGroupsImpl(const AbstractMetaClass *scope);
+ static bool classNeedsGetattroFunctionImpl(const AbstractMetaClass *metaClass);
+
QString translateTypeForWrapperMethod(const AbstractMetaType* cType,
const AbstractMetaClass* context,
Options opt = NoOption) const;
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index 3a043d849..6ea793a79 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -711,7 +711,7 @@ void setTypeDiscoveryFunctionV2(SbkObjectType* type, TypeDiscoveryFuncV2 func)
PepType_SOTP(type)->type_discovery = func;
}
-void copyMultimpleheritance(SbkObjectType* type, SbkObjectType* other)
+void copyMultipleInheritance(SbkObjectType *type, SbkObjectType *other)
{
PepType_SOTP(type)->mi_init = PepType_SOTP(other)->mi_init;
PepType_SOTP(type)->mi_offsets = PepType_SOTP(other)->mi_offsets;
@@ -723,7 +723,7 @@ void setMultipleInheritanceFunction(SbkObjectType* type, MultipleInheritanceInit
PepType_SOTP(type)->mi_init = function;
}
-MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkObjectType* type)
+MultipleInheritanceInitFunction getMultipleInheritanceFunction(SbkObjectType *type)
{
return PepType_SOTP(type)->mi_init;
}
diff --git a/sources/shiboken2/libshiboken/basewrapper.h b/sources/shiboken2/libshiboken/basewrapper.h
index d12b7222b..55445b026 100644
--- a/sources/shiboken2/libshiboken/basewrapper.h
+++ b/sources/shiboken2/libshiboken/basewrapper.h
@@ -184,9 +184,9 @@ LIBSHIBOKEN_API void setOriginalName(SbkObjectType* self, const char* nam
LIBSHIBOKEN_API const char* getOriginalName(SbkObjectType* self);
LIBSHIBOKEN_API void setTypeDiscoveryFunctionV2(SbkObjectType* self, TypeDiscoveryFuncV2 func);
-LIBSHIBOKEN_API void copyMultimpleheritance(SbkObjectType* self, SbkObjectType* other);
+LIBSHIBOKEN_API void copyMultipleInheritance(SbkObjectType *self, SbkObjectType *other);
LIBSHIBOKEN_API void setMultipleInheritanceFunction(SbkObjectType* self, MultipleInheritanceInitFunction func);
-LIBSHIBOKEN_API MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkObjectType* self);
+LIBSHIBOKEN_API MultipleInheritanceInitFunction getMultipleInheritanceFunction(SbkObjectType *self);
LIBSHIBOKEN_API void setDestructorFunction(SbkObjectType* self, ObjectDestructor func);
diff --git a/sources/shiboken2/libshiboken/embed/embedding_generator.py b/sources/shiboken2/libshiboken/embed/embedding_generator.py
index b6bfb1467..77aa5c329 100644
--- a/sources/shiboken2/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken2/libshiboken/embed/embedding_generator.py
@@ -92,7 +92,7 @@ def create_zipfile(limited_api):
flag = '-b' if sys.version_info >= (3,) else ''
os.chdir(work_dir)
- # Limited API: Remove all left-over py[co] files first, in case we use '--reuse-build'.
+ # Remove all left-over py[co] and other files first, in case we use '--reuse-build'.
# Note that we could improve that with the PyZipfile function to use .pyc files
# in different folders, but that makes only sense when COIN allows us to have
# multiple Python versions in parallel.
@@ -100,9 +100,9 @@ def create_zipfile(limited_api):
for root, dirs, files in os.walk(work_dir):
for name in files:
fpath = os.path.join(root, name)
- if name.endswith(".pyc") or name.endswith(".pyo"):
+ ew = name.endswith
+ if ew(".pyc") or ew(".pyo") or ew(".zip") or ew(".inc"):
os.remove(fpath)
-
# We copy every Python file into this dir, but only for the right version.
# For testing in the source dir, we need to filter.
if sys.version_info[0] == 3:
diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h
index ffbc570a8..93f718988 100644
--- a/sources/shiboken2/libshiboken/pep384impl.h
+++ b/sources/shiboken2/libshiboken/pep384impl.h
@@ -201,7 +201,12 @@ LIBSHIBOKEN_API int Pep_GetVerboseFlag(void);
LIBSHIBOKEN_API char *_PepUnicode_AsString(PyObject *);
+#if PY_VERSION_HEX < 0x03000000
#define PyUnicode_GET_SIZE(op) PyUnicode_GetSize((PyObject *)(op))
+#else
+// PyUnicode_GetSize is deprecated in favor of PyUnicode_GetLength
+#define PyUnicode_GET_SIZE(op) PyUnicode_GetLength((PyObject *)(op))
+#endif
#else
#define _PepUnicode_AsString PyUnicode_AsUTF8
diff --git a/sources/shiboken2/libshiboken/pep384impl_doc.rst b/sources/shiboken2/libshiboken/pep384impl_doc.rst
index ab286dd3e..2f3b7ea97 100644
--- a/sources/shiboken2/libshiboken/pep384impl_doc.rst
+++ b/sources/shiboken2/libshiboken/pep384impl_doc.rst
@@ -70,7 +70,8 @@ supported. We redefined it as macro ``Py_VerboseFlag`` which calls ``Pep_Verbose
unicodeobject.h
---------------
-The macro ``PyUnicode_GET_SIZE`` was redefined to call into ``PyUnicode_GetSize``.
+The macro ``PyUnicode_GET_SIZE`` was redefined to call into ``PyUnicode_GetSize``
+for Python 2, and ``PyUnicode_GetLength`` for Python 3.
Function ``_PyUnicode_AsString`` is unavailable and was replaced by a macro
that calls ``_PepUnicode_AsString``. The implementation was a bit involved,
and it would be better to change the code and replace this function.
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index a6ee2d463..180526b33 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -51,6 +51,7 @@ looked up in your PATH.
Make sure that some generated wheels already exist in the dist/
directory (e.g. setup.py bdist_wheel was already executed).
"""
+from __future__ import print_function, absolute_import
import os, sys
@@ -68,7 +69,7 @@ from build_scripts.options import OPTION_CMAKE
from build_scripts.utils import find_files_using_glob
from build_scripts.utils import find_glob_in_path
-from build_scripts.utils import run_process
+from build_scripts.utils import run_process, run_process_output
from build_scripts.utils import rmtree
import distutils.log as log
import platform
@@ -204,6 +205,19 @@ def generate_build_qmake():
log.info("")
+def raise_error_pyinstaller(msg):
+ print()
+ print("PYINST: {msg}".format(**locals()))
+ print("PYINST: sys.version = {}".format(sys.version.splitlines()[0]))
+ print("PYINST: platform.platform() = {}".format(platform.platform()))
+ print("PYINST: See the error message above.")
+ print()
+ for line in run_process_output([sys.executable, "-m", "pip", "list"]):
+ print("PyInstaller pip list: ", line)
+ print()
+ raise(RuntimeError(msg))
+
+
def compile_using_pyinstaller():
src_path = os.path.join("..", "hello.py")
spec_path = os.path.join("..", "hello_app.spec")
@@ -213,14 +227,9 @@ def compile_using_pyinstaller():
# By using a spec file, we avoid all the probing that might disturb certain
# platforms and also save some analysis time.
if exit_code:
- # raise RuntimeError("Failure while compiling script using PyInstaller.")
- print("PYINST: Failure while compiling script using PyInstaller.")
- print("PYINST: sys.version = {}".format(sys.version.splitlines()[0]))
- print("PYINST: platform.platform() = {}".format(platform.platform()))
- print("PYINST: See the error message above.")
- return False
+ # 2019-04-28 Raising on error is again enabled
+ raise_error_pyinstaller("Failure while compiling script using PyInstaller.")
log.info("")
- return True
def run_make():
@@ -256,7 +265,7 @@ def run_compiled_script(binary_path):
args = [binary_path]
exit_code = run_process(args)
if exit_code:
- raise RuntimeError("Failure while executing compiled script: {}".format(binary_path))
+ raise_error_pyinstaller("Failure while executing compiled script: {}".format(binary_path))
log.info("")
@@ -293,10 +302,8 @@ def try_build_examples():
src_path = os.path.join(examples_dir, "installer_test")
prepare_build_folder(src_path, "pyinstaller")
- # Currently, there are bugs in the COIN setup.
- # That is currently not the subject of this test:
- if compile_using_pyinstaller():
- run_compiled_script(os.path.join(src_path,
+ compile_using_pyinstaller()
+ run_compiled_script(os.path.join(src_path,
"pyinstaller", "dist", "hello_app", "hello_app"))
log.info("Attempting to build and run samplebinding using cmake.")