aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2')
-rw-r--r--sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml14
-rw-r--r--sources/pyside2/PySide2/QtGui/CMakeLists.txt2
-rw-r--r--sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt2
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml8
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py15
-rw-r--r--sources/pyside2/doc/gettingstarted-linux.rst6
-rw-r--r--sources/pyside2/doc/gettingstarted-macOS.rst6
-rw-r--r--sources/pyside2/doc/gettingstarted-windows.rst4
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp2
-rw-r--r--sources/pyside2/libpyside/pysideqflags.cpp5
-rw-r--r--sources/pyside2/libpyside/pysidesignal.cpp5
-rw-r--r--sources/pyside2/libpyside/pysideweakref.cpp9
-rw-r--r--sources/pyside2/pyside_version.py2
13 files changed, 50 insertions, 30 deletions
diff --git a/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml b/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml
index 5dc87a013..1e0219fd0 100644
--- a/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml
+++ b/sources/pyside2/PySide2/QtDataVisualization/typesystem_datavisualization.xml
@@ -85,8 +85,20 @@
</object-type>
<object-type name="QCategory3DAxis"/>
<object-type name="QLogValue3DAxisFormatter"/>
- <object-type name="QValue3DAxis"/>
+ <object-type name="QValue3DAxis">
+ <modify-function signature="setFormatter(QValue3DAxisFormatter *)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<object-type name="QValue3DAxisFormatter">
+ <modify-function signature="createNewInstance() const">
+ <modify-argument index="return">
+ <define-ownership class="native" owner="c++"/>
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
<modify-function signature="populateCopy(QtDataVisualization::QValue3DAxisFormatter&amp;)const">
<modify-argument index="1">
<parent index="this" action="add"/>
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
index 88d8be93f..38a0c1a50 100644
--- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
@@ -227,7 +227,7 @@ endif()
list(FIND QtGui_enabled_features "opengles2" _opengles2Index)
# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features)
if(_opengles2Index GREATER -1)
- list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
+ list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory)
message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
else()
list(APPEND QtGui_SRC
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
index 62ed669cc..208e76fac 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
@@ -11,7 +11,7 @@ set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_
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_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory)
list(APPEND QtOpenGLFunctions_SRC
${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)")
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index c20351723..bc71213ee 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -2306,9 +2306,17 @@
</extra-includes>
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
+ <modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
+ allow-thread="yes"/>
<modify-function signature="QMessageBox(const QString&amp;,const QString&amp;,QMessageBox::Icon,int,int,int,QWidget*,QFlags&lt;Qt::WindowType&gt;)" remove="all"/>
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
index 9eb84de7a..19565338f 100644
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ b/sources/pyside2/PySide2/support/generate_pyi.py
@@ -147,10 +147,7 @@ class Formatter(Writer):
self.print("from PySide2.support.signature.mapping import (")
self.print(" Virtual, Missing, Invalid, Default, Instance)")
self.print()
- self.print("class Object(object): pass")
- self.print()
- self.print("import shiboken2 as Shiboken")
- self.print("Shiboken.Object = Object")
+ self.print("from shiboken2 import Shiboken")
self.print()
# This line will be replaced by the missing imports postprocess.
self.print("IMPORTS")
@@ -222,7 +219,6 @@ def generate_pyi(import_name, outpath, options):
outfile = io.StringIO()
fmt = Formatter(outfile)
fmt.print(LICENSE_TEXT.strip())
- need_imports = not USE_PEP563
if USE_PEP563:
fmt.print("from __future__ import annotations")
fmt.print()
@@ -246,11 +242,10 @@ def generate_pyi(import_name, outpath, options):
line = line.rstrip()
# we remove the IMPORTS marker and insert imports if needed
if line == "IMPORTS":
- if need_imports:
- for mod_name in find_imports(outfile.getvalue()):
- imp = "PySide2." + mod_name
- if imp != import_name:
- wr.print("import " + imp)
+ for mod_name in find_imports(outfile.getvalue()):
+ imp = "PySide2." + mod_name
+ if imp != import_name:
+ wr.print("import " + imp)
wr.print("import " + import_name)
wr.print()
wr.print()
diff --git a/sources/pyside2/doc/gettingstarted-linux.rst b/sources/pyside2/doc/gettingstarted-linux.rst
index 0474d457f..6ce2d1f86 100644
--- a/sources/pyside2/doc/gettingstarted-linux.rst
+++ b/sources/pyside2/doc/gettingstarted-linux.rst
@@ -49,11 +49,11 @@ If you don't have libclang already in your system, you can download from the Qt
wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
+Extract the files, and leave it on any desired path, and set the environment
+variable required::
7z x libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
+ export LLVM_INSTALL_DIR=$PWD/libclang
Getting PySide2
~~~~~~~~~~~~~~~
diff --git a/sources/pyside2/doc/gettingstarted-macOS.rst b/sources/pyside2/doc/gettingstarted-macOS.rst
index fd1bf89f8..b0208ff2c 100644
--- a/sources/pyside2/doc/gettingstarted-macOS.rst
+++ b/sources/pyside2/doc/gettingstarted-macOS.rst
@@ -50,11 +50,11 @@ If you don't have libclang already in your system, you can download from the Qt
wget http://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-mac.7z
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
+Extract the files, and leave it on any desired path, and set the environment
+variable required::
7z x libclang-release_100-based-mac.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
+ export LLVM_INSTALL_DIR=$PWD/libclang
Getting PySide2
~~~~~~~~~~~~~~~
diff --git a/sources/pyside2/doc/gettingstarted-windows.rst b/sources/pyside2/doc/gettingstarted-windows.rst
index 069358e0f..442e6f7ed 100644
--- a/sources/pyside2/doc/gettingstarted-windows.rst
+++ b/sources/pyside2/doc/gettingstarted-windows.rst
@@ -59,8 +59,8 @@ Setting up CLANG
If you don't have libclang already in your system, you can download from the Qt servers,
e.g. ``libclang-release_100-based-windows-vs2019_64.7z``.
-Extract the files, and leave it on any desired path, e.g ``c:\``, and then set these two required
-environment variables::
+Extract the files, and leave it on any desired path, for example, ``c:``,
+and set the environment variable required::
set LLVM_INSTALL_DIR=c:\libclang
set PATH=C:\libclang\bin;%PATH%
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index 73d6767dd..0d0957f55 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -104,6 +104,7 @@ static PyType_Slot PySidePropertyType_slots[] = {
{Py_tp_init, (void *)qpropertyTpInit},
{Py_tp_new, (void *)qpropertyTpNew},
{Py_tp_getset, PySidePropertyType_getset},
+ {Py_tp_del, reinterpret_cast<void *>(PyObject_GC_Del)},
{0, 0}
};
// Dotted modulename is crucial for SbkType_FromSpec to work. Is this name right?
@@ -249,6 +250,7 @@ static void qpropertyDeAlloc(PyObject *self)
// This was not needed before Python 3.8 (Python issue 35810)
Py_DECREF(Py_TYPE(self));
}
+ PyObject_GC_UnTrack(self);
Py_TYPE(self)->tp_free(self);
}
diff --git a/sources/pyside2/libpyside/pysideqflags.cpp b/sources/pyside2/libpyside/pysideqflags.cpp
index 8b224f2c8..1f64b089d 100644
--- a/sources/pyside2/libpyside/pysideqflags.cpp
+++ b/sources/pyside2/libpyside/pysideqflags.cpp
@@ -191,8 +191,9 @@ namespace QFlags
SbkNewQFlagsType_slots[idx].pfunc = numberMethods[idx].pfunc;
}
newspec.slots = SbkNewQFlagsType_spec.slots;
- PyTypeObject *type = (PyTypeObject *)SbkType_FromSpec(&newspec);
- Py_TYPE(type) = &PyType_Type;
+ auto *obj = SbkType_FromSpec(&newspec);
+ auto *type = reinterpret_cast<PyTypeObject *>(obj);
+ obj->ob_type = &PyType_Type;
PySideQFlagsType *flagsType = reinterpret_cast<PySideQFlagsType *>(type);
PepType_PFTP(flagsType)->converterPtr = &PepType_PFTP(flagsType)->converter;
diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
index b5069a00a..607ce163c 100644
--- a/sources/pyside2/libpyside/pysidesignal.cpp
+++ b/sources/pyside2/libpyside/pysidesignal.cpp
@@ -160,9 +160,10 @@ PyTypeObject *PySideSignalTypeF(void)
{
static PyTypeObject *type = nullptr;
if (!type) {
- type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalType_spec));
+ auto *obj = SbkType_FromSpec(&PySideSignalType_spec);
+ type = reinterpret_cast<PyTypeObject *>(obj);
PyTypeObject *hold = Py_TYPE(type);
- Py_TYPE(type) = PySideMetaSignalTypeF();
+ obj->ob_type = PySideMetaSignalTypeF();
Py_INCREF(Py_TYPE(type));
Py_DECREF(hold);
}
diff --git a/sources/pyside2/libpyside/pysideweakref.cpp b/sources/pyside2/libpyside/pysideweakref.cpp
index cd90634bd..707df98f5 100644
--- a/sources/pyside2/libpyside/pysideweakref.cpp
+++ b/sources/pyside2/libpyside/pysideweakref.cpp
@@ -88,10 +88,11 @@ PyObject *create(PyObject *obj, PySideWeakRefFunction func, void *userData)
if (obj == Py_None)
return 0;
- if (Py_TYPE(PySideCallableObjectTypeF()) == 0)
- {
- Py_TYPE(PySideCallableObjectTypeF()) = &PyType_Type;
- PyType_Ready(PySideCallableObjectTypeF());
+ auto *callableObject_Type = PySideCallableObjectTypeF();
+ auto *callableObject_PyObject = reinterpret_cast<PyObject *>(callableObject_Type);
+ if (callableObject_PyObject->ob_type == nullptr) {
+ callableObject_PyObject->ob_type = &PyType_Type;
+ PyType_Ready(callableObject_Type);
}
PyTypeObject *type = PySideCallableObjectTypeF();
diff --git a/sources/pyside2/pyside_version.py b/sources/pyside2/pyside_version.py
index 80dd16ae0..88792a380 100644
--- a/sources/pyside2/pyside_version.py
+++ b/sources/pyside2/pyside_version.py
@@ -39,7 +39,7 @@
major_version = "5"
minor_version = "15"
-patch_version = "10"
+patch_version = "11"
# For example: "a", "b", "rc"
# (which means "alpha", "beta", "release candidate").