commit:     c82423d5bf28e87d5a53389b589f49d0cb431e21
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 09:50:16 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 11:07:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c82423d5

kde-frameworks/kdeclarative: Fix broken KeyEvent emitting

Upstream commit 2caa62d11f322ca5c9829b6bc91839e8afd42686

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445277
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-KeySequenceItem-record-on-correct-window.patch | 36 ++++++++++++++++++++
 .../kdeclarative/kdeclarative-5.88.0-r1.ebuild     | 39 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git 
a/kde-frameworks/kdeclarative/files/kdeclarative-5.88.0-KeySequenceItem-record-on-correct-window.patch
 
b/kde-frameworks/kdeclarative/files/kdeclarative-5.88.0-KeySequenceItem-record-on-correct-window.patch
new file mode 100644
index 000000000000..bf4d6fc5dddb
--- /dev/null
+++ 
b/kde-frameworks/kdeclarative/files/kdeclarative-5.88.0-KeySequenceItem-record-on-correct-window.patch
@@ -0,0 +1,36 @@
+From 2caa62d11f322ca5c9829b6bc91839e8afd42686 Mon Sep 17 00:00:00 2001
+From: David Redondo <[email protected]>
+Date: Mon, 22 Nov 2021 14:22:14 +0100
+Subject: [PATCH] KeySequenceItem: Make sure we record on the correct window
+
+Unfortunately renderWindowFor is just a simple function call and
+so the binding is not updated when it would change. Now we make sure
+to update the window before each recording.
+BUG:445277
+---
+ src/qmlcontrols/kquickcontrols/KeySequenceItem.qml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/qmlcontrols/kquickcontrols/KeySequenceItem.qml 
b/src/qmlcontrols/kquickcontrols/KeySequenceItem.qml
+index 7b404bd..a41bf18 100644
+--- a/src/qmlcontrols/kquickcontrols/KeySequenceItem.qml
++++ b/src/qmlcontrols/kquickcontrols/KeySequenceItem.qml
+@@ -42,7 +42,6 @@ RowLayout {
+ 
+     KQuickControlsPrivate.KeySequenceHelper {
+         id: _helper
+-        window: renderWindow(parent.Window.window)
+         onGotKeySequence: {
+             if (isKeySequenceAvailable(keySequence)) {
+                 root.keySequence = keySequence
+@@ -95,6 +94,7 @@ RowLayout {
+ 
+         onCheckedChanged: {
+             if (checked) {
++                _helper.window = _helper.renderWindow(parent.Window.window)
+                 mainButton.forceActiveFocus()
+                 _helper.startRecording()
+             }
+-- 
+GitLab
+

diff --git a/kde-frameworks/kdeclarative/kdeclarative-5.88.0-r1.ebuild 
b/kde-frameworks/kdeclarative/kdeclarative-5.88.0-r1.ebuild
new file mode 100644
index 000000000000..e3888c95d29e
--- /dev/null
+++ b/kde-frameworks/kdeclarative/kdeclarative-5.88.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Framework providing integration of QML and KDE work spaces"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+DEPEND="
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtnetwork-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       =kde-frameworks/kconfig-${PVCUT}*:5
+       =kde-frameworks/kcoreaddons-${PVCUT}*:5
+       =kde-frameworks/kglobalaccel-${PVCUT}*:5
+       =kde-frameworks/ki18n-${PVCUT}*:5
+       =kde-frameworks/kiconthemes-${PVCUT}*:5
+       =kde-frameworks/kio-${PVCUT}*:5
+       =kde-frameworks/knotifications-${PVCUT}*:5
+       =kde-frameworks/kpackage-${PVCUT}*:5
+       =kde-frameworks/kservice-${PVCUT}*:5
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+       =kde-frameworks/kwindowsystem-${PVCUT}*:5
+       media-libs/libepoxy
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-KeySequenceItem-record-on-correct-window.patch" # 
KDE-bug 445277
+)

Reply via email to