Accepting request 714377 from home:illuusio:python
- These are from official GIT of pyside2 brancm 5.13 - Add patches to make FreeCAD not crash at start * 0002-Fix-qApp-import-of-QCoreApplication.patch * 0003-PySide2-QtCore-Remove-duplicated-type-entry-for-bool.patch OBS-URL: https://build.opensuse.org/request/show/714377 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/python3-pyside2?expand=0&rev=29
This commit is contained in:
parent
82426e6c63
commit
b31a7e0d2b
42
0002-Fix-qApp-import-of-QCoreApplication.patch
Normal file
42
0002-Fix-qApp-import-of-QCoreApplication.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 5376a134f13124b9b228dd160f151a7c8eccd09a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Tismer <tismer@stackless.com>
|
||||
Date: Thu, 27 Jun 2019 12:37:41 +0200
|
||||
Subject: [PATCH 1/7] Fix qApp import of QCoreApplication
|
||||
|
||||
The qApp fix for embedding has a recursion bug when
|
||||
QCoreApplication is imported.
|
||||
This patch avoids imports altogether and uses the already
|
||||
captured module, instead.
|
||||
|
||||
Change-Id: I1af7293a31840f6b09f8611446f6f35952dedd21
|
||||
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
||||
---
|
||||
sources/shiboken2/libshiboken/qapp_macro.cpp | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/sources/shiboken2/libshiboken/qapp_macro.cpp b/sources/shiboken2/libshiboken/qapp_macro.cpp
|
||||
index df24a805..12af9613 100644
|
||||
--- a/sources/shiboken2/libshiboken/qapp_macro.cpp
|
||||
+++ b/sources/shiboken2/libshiboken/qapp_macro.cpp
|
||||
@@ -240,11 +240,13 @@ NotifyModuleForQApp(PyObject *module, void *qApp)
|
||||
* Therefore, the implementation is very simple and just redirects the
|
||||
* qApp_contents variable and assigns the instance, instead of vice-versa.
|
||||
*/
|
||||
- if (qApp != nullptr) {
|
||||
- Shiboken::AutoDecRef pycore(PyImport_ImportModule("PySide2.QtCore"));
|
||||
- Shiboken::AutoDecRef coreapp(PyObject_GetAttrString(pycore, "QCoreApplication"));
|
||||
- qApp_content = PyObject_CallMethod(coreapp, "instance", "");
|
||||
- reset_qApp_var();
|
||||
+ PyObject *coreDict = qApp_moduledicts[1];
|
||||
+ if (qApp != nullptr && coreDict != nullptr) {
|
||||
+ PyObject *coreApp = PyDict_GetItemString(coreDict, "QCoreApplication");
|
||||
+ if (coreApp != nullptr) {
|
||||
+ qApp_content = PyObject_CallMethod(coreApp, "instance", "");
|
||||
+ reset_qApp_var();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 8fa674375a3ea5609ffe8dadeb697915347a4072 Mon Sep 17 00:00:00 2001
|
||||
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
Date: Thu, 4 Jul 2019 15:57:00 +0200
|
||||
Subject: [PATCH 6/7] PySide2/QtCore: Remove duplicated type entry for "bool"
|
||||
|
||||
Another entry with converters exists a few lines below.
|
||||
|
||||
Change-Id: Id1de3835e42869a55e0bf865aa992f38748f2e88
|
||||
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
||||
---
|
||||
sources/pyside2/PySide2/QtCore/typesystem_core_common.xml | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
|
||||
index 4f800cc9..2173e747 100644
|
||||
--- a/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
|
||||
+++ b/sources/pyside2/PySide2/QtCore/typesystem_core_common.xml
|
||||
@@ -171,7 +171,6 @@
|
||||
<primitive-type name="quint16"/>
|
||||
<primitive-type name="quint32"/>
|
||||
<primitive-type name="quint64"/>
|
||||
- <primitive-type name="bool"/>
|
||||
<primitive-type name="double"/>
|
||||
<primitive-type name="qreal"/>
|
||||
<primitive-type name="float"/>
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 10 06:37:12 UTC 2019 - Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
|
||||
|
||||
- Add patches to make FreeCAD not crash at start
|
||||
* 0002-Fix-qApp-import-of-QCoreApplication.patch
|
||||
* 0003-PySide2-QtCore-Remove-duplicated-type-entry-for-bool.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 1 18:00:38 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
@ -33,6 +33,8 @@ Source0: https://download.qt.io/official_releases/QtForPython/pyside2/PyS
|
||||
Patch0: lib64.patch
|
||||
# PATCH-FIX-UPSTREAM - PYSIDE-881
|
||||
Patch1: 0001-Remove-unnecessary-she-bang-from-icon-cache.py.patch
|
||||
Patch2: 0002-Fix-qApp-import-of-QCoreApplication.patch
|
||||
Patch3: 0003-PySide2-QtCore-Remove-duplicated-type-entry-for-bool.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -119,6 +121,8 @@ Examples and Tutorials for the PySide2 bindings for Qt.
|
||||
%patch0 -p1
|
||||
%endif
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
export LLVM_INSTALL_DIR=%{_prefix}
|
||||
|
Loading…
x
Reference in New Issue
Block a user