Ana Guerrero 2024-05-28 15:29:41 +00:00 committed by Git OBS Bridge
commit dfde1a8ce0
8 changed files with 60 additions and 255 deletions

View File

@ -1,225 +0,0 @@
From 8daf9fb00fd805ce12a6ab18a9af7a5968b78a93 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Tue, 9 Apr 2024 09:44:15 +0200
Subject: [PATCH] Multimedia: Adapt to revert of QAudio->QtAudio namespace
renaming
Partially revert 4d761eaaf852f8d82925e111150f25c0dd5f3e83.
Adapt to qtmultimedia/7fcea568c9c64f3bcebda21f0df02aa0107dfd0c,
reverting qtmultimedia/edaec2bf714c98d65f12c8ed9a2ffbd1603635a7.
Task-number: QTBUG-123997
Pick-to: 6.7
Change-Id: Ibd0ad737293f4b9107909f37554c03f64bce5d1e
---
.../multimedia/audiooutput/audiooutput.py | 22 +++++++++----------
.../multimedia/audiosource/audiosource.py | 16 +++++++-------
.../PySide6/QtMultimedia/CMakeLists.txt | 2 +-
.../QtMultimedia/typesystem_multimedia.xml | 8 +------
sources/pyside6/PySide6/glue/qtmultimedia.cpp | 3 ++-
sources/pyside6/libpyside/signalmanager.cpp | 5 -----
6 files changed, 23 insertions(+), 33 deletions(-)
diff --git a/examples/multimedia/audiooutput/audiooutput.py b/examples/multimedia/audiooutput/audiooutput.py
index 5219bf652..06d52f68a 100644
--- a/examples/multimedia/audiooutput/audiooutput.py
+++ b/examples/multimedia/audiooutput/audiooutput.py
@@ -10,7 +10,7 @@ from struct import pack
from PySide6.QtCore import (QByteArray, QIODevice, Qt, QSysInfo, QTimer,
qWarning, Slot)
-from PySide6.QtMultimedia import (QtAudio, QAudioFormat,
+from PySide6.QtMultimedia import (QAudio, QAudioFormat,
QAudioSink, QMediaDevices)
from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSlider,
@@ -209,7 +209,7 @@ class AudioTest(QMainWindow):
@Slot()
def pull_timer_expired(self):
- if self.m_audioSink is not None and self.m_audioSink.state() != QtAudio.StoppedState:
+ if self.m_audioSink is not None and self.m_audioSink.state() != QAudio.StoppedState:
bytes_free = self.m_audioSink.bytesFree()
data = self.m_generator.read(bytes_free)
if data:
@@ -234,28 +234,28 @@ class AudioTest(QMainWindow):
@Slot()
def toggle_suspend_resume(self):
- if self.m_audioSink.state() == QtAudio.State.SuspendedState:
+ if self.m_audioSink.state() == QAudio.SuspendedState:
qWarning("status: Suspended, resume()")
self.m_audioSink.resume()
self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
- elif self.m_audioSink.state() == QtAudio.State.ActiveState:
+ elif self.m_audioSink.state() == QAudio.ActiveState:
qWarning("status: Active, suspend()")
self.m_audioSink.suspend()
self.m_suspendResumeButton.setText(self.RESUME_LABEL)
- elif self.m_audioSink.state() == QtAudio.State.StoppedState:
+ elif self.m_audioSink.state() == QAudio.StoppedState:
qWarning("status: Stopped, resume()")
self.m_audioSink.resume()
self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
- elif self.m_audioSink.state() == QtAudio.State.IdleState:
+ elif self.m_audioSink.state() == QAudio.IdleState:
qWarning("status: IdleState")
state_map = {
- QtAudio.State.ActiveState: "ActiveState",
- QtAudio.State.SuspendedState: "SuspendedState",
- QtAudio.State.StoppedState: "StoppedState",
- QtAudio.State.IdleState: "IdleState"}
+ QAudio.ActiveState: "ActiveState",
+ QAudio.SuspendedState: "SuspendedState",
+ QAudio.StoppedState: "StoppedState",
+ QAudio.IdleState: "IdleState"}
- @Slot(QtAudio.State)
+ @Slot("QAudio::State")
def handle_state_changed(self, state):
state = self.state_map.get(state, 'Unknown')
qWarning(f"state = {state}")
diff --git a/examples/multimedia/audiosource/audiosource.py b/examples/multimedia/audiosource/audiosource.py
index 40046f0a3..a78beb584 100644
--- a/examples/multimedia/audiosource/audiosource.py
+++ b/examples/multimedia/audiosource/audiosource.py
@@ -19,7 +19,7 @@ from typing import Optional
import PySide6
from PySide6.QtCore import QByteArray, QMargins, Qt, Slot, qWarning
from PySide6.QtGui import QPainter, QPalette
-from PySide6.QtMultimedia import QtAudio, QAudioDevice, QAudioFormat, QAudioSource, QMediaDevices
+from PySide6.QtMultimedia import QAudio, QAudioDevice, QAudioFormat, QAudioSource, QMediaDevices
from PySide6.QtWidgets import (QApplication, QComboBox, QPushButton, QSlider, QVBoxLayout,
QWidget, QLabel)
@@ -164,10 +164,10 @@ class InputTest(QWidget):
self.m_audio_info = AudioInfo(format)
self.m_audio_input = QAudioSource(device_info, format)
- initial_volume = QtAudio.convertVolume(
+ initial_volume = QAudio.convertVolume(
self.m_audio_input.volume(),
- QtAudio.LinearVolumeScale,
- QtAudio.LogarithmicVolumeScale,
+ QAudio.LinearVolumeScale,
+ QAudio.LogarithmicVolumeScale,
)
self.m_volume_slider.setValue(int(round(initial_volume * 100)))
self.toggle_mode()
@@ -196,10 +196,10 @@ class InputTest(QWidget):
def toggle_suspend(self):
# toggle suspend/resume
state = self.m_audio_input.state()
- if (state == QtAudio.SuspendedState) or (state == QtAudio.StoppedState):
+ if (state == QAudio.SuspendedState) or (state == QAudio.StoppedState):
self.m_audio_input.resume()
self.m_suspend_resume_button.setText("Suspend recording")
- elif state == QtAudio.ActiveState:
+ elif state == QAudio.ActiveState:
self.m_audio_input.suspend()
self.m_suspend_resume_button.setText("Resume recording")
# else no-op
@@ -212,8 +212,8 @@ class InputTest(QWidget):
@Slot(int)
def slider_changed(self, value):
- linearVolume = QtAudio.convertVolume(
- value / float(100), QtAudio.LogarithmicVolumeScale, QtAudio.LinearVolumeScale
+ linearVolume = QAudio.convertVolume(
+ value / float(100), QAudio.LogarithmicVolumeScale, QAudio.LinearVolumeScale
)
self.m_audio_input.setVolume(linearVolume)
diff --git a/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
index 61f52cc2b..5cac97ca9 100644
--- a/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtMultimedia/CMakeLists.txt
@@ -12,6 +12,7 @@ ${QtMultimedia_GEN_DIR}/qaudioinput_wrapper.cpp
${QtMultimedia_GEN_DIR}/qaudiooutput_wrapper.cpp
${QtMultimedia_GEN_DIR}/qaudiosink_wrapper.cpp
${QtMultimedia_GEN_DIR}/qaudiosource_wrapper.cpp
+${QtMultimedia_GEN_DIR}/qaudio_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcameraformat_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcameradevice_wrapper.cpp
${QtMultimedia_GEN_DIR}/qcamera_wrapper.cpp
@@ -28,7 +29,6 @@ ${QtMultimedia_GEN_DIR}/qmediatimerange_wrapper.cpp
${QtMultimedia_GEN_DIR}/qmediatimerange_interval_wrapper.cpp
${QtMultimedia_GEN_DIR}/qscreencapture_wrapper.cpp
${QtMultimedia_GEN_DIR}/qsoundeffect_wrapper.cpp
-${QtMultimedia_GEN_DIR}/qtaudio_wrapper.cpp
${QtMultimedia_GEN_DIR}/qtvideo_wrapper.cpp
${QtMultimedia_GEN_DIR}/qvideoframe_wrapper.cpp
${QtMultimedia_GEN_DIR}/qvideoframeformat_wrapper.cpp
diff --git a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
index dc3534299..c4de5dc9a 100644
--- a/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
+++ b/sources/pyside6/PySide6/QtMultimedia/typesystem_multimedia.xml
@@ -8,7 +8,7 @@
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
- <namespace-type name="QtAudio">
+ <namespace-type name="QAudio">
<enum-type name="Error"/>
<enum-type name="State"/>
<enum-type name="VolumeScale"/>
@@ -64,9 +64,6 @@
</modify-argument>
</modify-function>
<modify-function signature="stop()" allow-thread="true"/>
- <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) -->
- <declare-function signature="state()const" return-type="QtAudio::State"/>
- <declare-function signature="error()const" return-type="QtAudio::Error"/>
</object-type>
<object-type name="QAudioSink">
@@ -81,9 +78,6 @@
</modify-argument>
</modify-function>
<modify-function signature="stop()" allow-thread="true"/>
- <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) -->
- <declare-function signature="state()const" return-type="QtAudio::State"/>
- <declare-function signature="error()const" return-type="QtAudio::Error"/>
</object-type>
<object-type name="QCamera">
diff --git a/sources/pyside6/PySide6/glue/qtmultimedia.cpp b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
index d193b1bd3..ac8434b97 100644
--- a/sources/pyside6/PySide6/glue/qtmultimedia.cpp
+++ b/sources/pyside6/PySide6/glue/qtmultimedia.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// @snippet qvideoframe-bits
+#include "object.h"
%BEGIN_ALLOW_THREADS
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1);
%END_ALLOW_THREADS
@@ -23,5 +24,5 @@ const auto size = %CPPSELF.byteCount();
// @snippet qtaudio-namespace-compatibility-alias
Py_INCREF(pyType);
-PyModule_AddObject(module, "QAudio", reinterpret_cast<PyObject *>(pyType));
+PyModule_AddObject(module, "QtAudio", reinterpret_cast<PyObject *>(pyType));
// @snippet qtaudio-namespace-compatibility-alias
diff --git a/sources/pyside6/libpyside/signalmanager.cpp b/sources/pyside6/libpyside/signalmanager.cpp
index 625e4a405..557f130e0 100644
--- a/sources/pyside6/libpyside/signalmanager.cpp
+++ b/sources/pyside6/libpyside/signalmanager.cpp
@@ -813,11 +813,6 @@ static PyObject *parseArguments(const QMetaMethod &method, void **args)
for (qsizetype i = 0; i < argsSize; ++i) {
void *data = args[i+1];
auto param = paramTypes.at(i);
-#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
- // Qt 6.7 renamed namespace "QAudio"->"QtAudio" except for signals
- if (param.startsWith("QAudio::"_ba))
- param.insert(1, 't');
-#endif
Shiboken::Conversions::SpecificConverter converter(param.constData());
if (!converter) {
PyErr_SetString(PyExc_TypeError, msgCannotConvertParameter(method, i).constData());
--
2.44.0

View File

@ -0,0 +1,40 @@
From 6c3759e342efa8b9bcc46e1701eed3a12548db85 Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Mon, 27 May 2024 04:59:20 +0000
Subject: [PATCH] shiboken: add missing include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Amend b829abcc7b2e9fcdb027e653a6a52cdb0706de11 and add missing include
to fix:
| sbkmodule.cpp:459:15: error: Shiboken::Conversions has not been declared
| Shiboken::Conversions::clearNegativeLazyCache();
| ^~~~~~~~~~~
Pick-to: 6.7
Fixes: PYSIDE-2765
Task-number: PYSIDE-2749
Task-number: PYSIDE-2404
Change-Id: I13625848bff3b0e90a53649104d6e5d84553a984
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
---
sources/shiboken6/libshiboken/sbkmodule.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp
index ccc7cc2cd..b7e6bf126 100644
--- a/sources/shiboken6/libshiboken/sbkmodule.cpp
+++ b/sources/shiboken6/libshiboken/sbkmodule.cpp
@@ -7,6 +7,7 @@
#include "bindingmanager.h"
#include "sbkstring.h"
#include "sbkcppstring.h"
+#include "sbkconverter_p.h"
#include <unordered_map>
#include <unordered_set>
--
2.45.1

View File

@ -1,16 +0,0 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="changesgenerate">disable</param>
<param name="version">6.7.0~git</param>
<param name="url">git://code.qt.io/pyside/pyside-setup.git</param>
<param name="revision">6.7.0</param>
<param name="scm">git</param>
<param name="filename">pyside-setup-everywhere-src</param>
</service>
<service name="set_version" mode="disabled" />
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef1c4c50106645c91cabb4fc61cc000cf82c75063630c58b10e3b0cd2ddb589a
size 31221773

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6f33de37f4121e547064023edb344b95e2ab454234fa8fce27ea73df96f933cd
size 14400976

View File

@ -1,4 +0,0 @@
name: pyside-setup-everywhere-src
version: 6.7.0~git
mtime: 1712333469
commit: 06744deed8bfb71255a74dee9f12c8ec1f79eb49

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri May 24 11:22:44 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.7.1. Check the installed changes-6.7.1 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-Multimedia-Adapt-to-revert-of-QAudio-QtAudio-namespa.patch
- Add upstream build fix:
* 0001-shiboken-add-missing-include.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 9 11:46:05 UTC 2024 - Christophe Marin <christophe@krop.fr> Tue Apr 9 11:46:05 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@ -43,17 +43,16 @@ ExclusiveArch: donotbuild
%endif %endif
Name: %{mypython}-%{pyside_flavor} Name: %{mypython}-%{pyside_flavor}
Version: 6.7.0~git Version: 6.7.1
Release: 0 Release: 0
Summary: Python bindings for Qt 6 Summary: Python bindings for Qt 6
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-2.0-only AND GPL-3.0-only WITH Qt-GPL-exception-1.0 License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-2.0-only AND GPL-3.0-only WITH Qt-GPL-exception-1.0
URL: https://www.qt.io URL: https://www.qt.io
# Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%%{version}-src/%%{tar_name}-%%{version}.tar.xz Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{version}.tar.xz
Source0: %{tar_name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE # PATCH-FIX-OPENSUSE
Patch0: 0001-Always-link-to-python-libraries.patch Patch0: 0001-Always-link-to-python-libraries.patch
# PATCH-FIX-UPSTREAM # PATCH-FIX-UPSTREAM
Patch1: 0001-Multimedia-Adapt-to-revert-of-QAudio-QtAudio-namespa.patch Patch1: 0001-shiboken-add-missing-include.patch
# SECTION common_dependencies # SECTION common_dependencies
BuildRequires: clang-devel BuildRequires: clang-devel
BuildRequires: %{mypython}-Sphinx BuildRequires: %{mypython}-Sphinx
@ -246,7 +245,7 @@ ctest_exclude_regex="smart_smart_pointer"
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\ %define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
%define excluded_tests 1 %define excluded_tests 1
# Excluded tests (last update: 2024-04-08) # Excluded tests (last update: 2024-05-27)
# QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer' # QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer'
# QtGui_qpen_test times out # QtGui_qpen_test times out
# QtMultimediaWidgets_qmultimediawidgets aborts # QtMultimediaWidgets_qmultimediawidgets aborts
@ -257,9 +256,10 @@ ctest_exclude_regex="smart_smart_pointer"
# QtCore_qoperatingsystemversion_test fails after https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1214edc # QtCore_qoperatingsystemversion_test fails after https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1214edc
ctest_exclude_regex="QtWebEngineWidgets_pyside-474-qtwebengineview|QtGui_qpen_test|QtMultimediaWidgets_qmultimediawidgets|Qt3DExtras_qt3dextras_test|QtPositioning_positioning|pyside6-deploy_test_pyside6_deploy|QtWidgets_qwidget_test|pyside6-android-deploy_test_pyside6_android_deploy|qoperatingsystemversion" ctest_exclude_regex="QtWebEngineWidgets_pyside-474-qtwebengineview|QtGui_qpen_test|QtMultimediaWidgets_qmultimediawidgets|Qt3DExtras_qt3dextras_test|QtPositioning_positioning|pyside6-deploy_test_pyside6_deploy|QtWidgets_qwidget_test|pyside6-android-deploy_test_pyside6_android_deploy|qoperatingsystemversion"
# Random failures on aarch64: registry_existence_test times out and QtWebEngineCore_web_engine_custom_scheme asserts # registry_existence_test randomly times out and QtWebEngineCore_web_engine_custom_scheme asserts
# QtWebEngineCore_qwebenginecookiestore_test fails with a mesa error ('MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)')
%ifarch aarch64 %ifarch aarch64
ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme" ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme|QtWebEngineCore_qwebenginecookiestore_test"
%endif %endif
# python311-distro is unavailable in 15.5, skip registry_existence_test # python311-distro is unavailable in 15.5, skip registry_existence_test
%if 0%{?sle_version} == 150500 %if 0%{?sle_version} == 150500