Accepting request 924859 from home:cgiboudeaux:Qt6:release:pyside

- Add upstream patches to fix a test failure...
  * 0001-Fix-hang-in-test-bug_430.py-in-Qt-6.3.patch
- ...and failures with llvm > 12
  * 0001-shiboken6-Adapt-to-LLVM-12.01.patch

OBS-URL: https://build.opensuse.org/request/show/924859
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/python3-pyside6?expand=0&rev=3
This commit is contained in:
Fabian Vogt 2021-10-12 12:25:51 +00:00 committed by Git OBS Bridge
parent a8afd41f6f
commit 940f852f45
4 changed files with 91 additions and 3 deletions

View File

@ -0,0 +1,43 @@
From 300e33b8fb175f79195b20fb170db4232afb5740 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Fri, 1 Oct 2021 14:53:32 +0200
Subject: [PATCH] Fix hang in test bug_430.py in Qt 6.3
Terminating the application via closing the last window
only works when the window was actually shown.
Add a call to show() and reformat code.
Task-number: QTBUG-97033
Change-Id: I1e0a82d1baf1676de5a38c1a8fd2408e104b464a
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 01b31e518ce4fa82c58db6ae89f481be152eb4dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
sources/pyside6/tests/QtWidgets/bug_430.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sources/pyside6/tests/QtWidgets/bug_430.py b/sources/pyside6/tests/QtWidgets/bug_430.py
index b6cf492..6ce463b 100644
--- a/sources/pyside6/tests/QtWidgets/bug_430.py
+++ b/sources/pyside6/tests/QtWidgets/bug_430.py
@@ -44,9 +44,11 @@ class ListModel(QAbstractListModel):
return 0
-app = QApplication([])
-model = ListModel()
-v = QListView()
-v.setModel(model)
-QTimer.singleShot(0, v.close)
-app.exec()
+if __name__ == '__main__':
+ app = QApplication([])
+ model = ListModel()
+ v = QListView()
+ v.setModel(model)
+ v.show()
+ QTimer.singleShot(0, v.close)
+ app.exec()
--
2.33.0

View File

@ -0,0 +1,34 @@
From a4a5fa4568473dd63bf04c9bfd115d3cbe3c504e Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Tue, 12 Oct 2021 09:33:53 +0200
Subject: [PATCH] shiboken6: Adapt to LLVM 12.01
The identifier for anonymous enums has been changed, causing
shiboken to no longer recognize them.
Pick-to: 6.2 5.15
Task-number: PYSIDE-1686
Change-Id: I4d463132b8bd3fffa0b57f03be6c58ecbae94a49
---
sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index 0b6c87f..f34bd8c 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -952,8 +952,10 @@ static QString enumType(const CXCursor &cursor)
// PYSIDE-1228: For "typedef enum { v1, v2 } Foo;", type will return
// "Foo" as expected. Care must be taken to exclude real anonymous enums.
name = getTypeName(clang_getCursorType(cursor));
- if (name.contains(QLatin1String("(anonymous")))
+ if (name.contains(u"(unnamed") // Clang 12.0.1
+ || name.contains(u"(anonymous")) { // earlier
name.clear();
+ }
}
return name;
}
--
2.33.0

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 12 09:51:22 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patches to fix a test failure...
* 0001-Fix-hang-in-test-bug_430.py-in-Qt-6.3.patch
- ...and failures with llvm > 12
* 0001-shiboken6-Adapt-to-LLVM-12.01.patch
-------------------------------------------------------------------
Thu Sep 30 13:14:54 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -40,6 +40,10 @@ Source: https://download.qt.io/official_releases/QtForPython/pyside6/PyS
Patch0: 0001-Don-t-install-CMake-files-into-versioned-directories.patch
# PATCH-FIX-OPENSUSE
Patch1: 0001-Always-link-to-python-libraries.patch
# PATCH-FIX-UPSTREAM
Patch2: 0001-Fix-hang-in-test-bug_430.py-in-Qt-6.3.patch
# PATCH-FIX-UPSTREAM
Patch3: 0001-shiboken6-Adapt-to-LLVM-12.01.patch
# SECTION common_dependencies
BuildRequires: clang-devel
BuildRequires: fdupes
@ -185,13 +189,12 @@ export LD_LIBRARY_PATH=%{buildroot}%{_qt6_libdir}:$LD_LIBRARY_PATH
%if "%{pyside_flavor}" == "pyside6"
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
# Excluded tests (last update: 2021-09-29)
# Excluded tests (last update: 2021-10-12)
# registry_existence_test can only be run if pyside and shiboken are built together
# QtWidgets_bug_430 times out
# QtWidgets_bug_635 fails
# QtWebEngineWidgets_pyside-474-qtwebengineview & QtWebEngineCore_web_engine_custom_scheme
# pass locally but not on the build service
%define ctest_exclude_regex '(registry_existence_test|QtWidgets_bug_430|QtWidgets_bug_635|QtWebEngineWidgets_pyside-474-qtwebengineview|QtWebEngineCore_web_engine_custom_scheme)'
%define ctest_exclude_regex '(registry_existence_test|QtWidgets_bug_635|QtWebEngineWidgets_pyside-474-qtwebengineview|QtWebEngineCore_web_engine_custom_scheme)'
%endif
pushd sources/%{pyside_flavor}