From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03E31158094 for ; Wed, 29 Jun 2022 19:53:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF937E09BF; Wed, 29 Jun 2022 19:53:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D381EE09BF for ; Wed, 29 Jun 2022 19:53:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1874C341AB0 for ; Wed, 29 Jun 2022 19:53:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1D2EC51E for ; Wed, 29 Jun 2022 19:53:28 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1656532397.be8d5d31fabe30019827aba39e50153a58a3f395.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kglobalaccel/files/kglobalaccel-5.95.0-fix-shortcut-conflict-dialog.patch kde-frameworks/kglobalaccel/kglobalaccel-5.95.0-r1.ebuild X-VCS-Directories: kde-frameworks/kglobalaccel/files/ kde-frameworks/kglobalaccel/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: be8d5d31fabe30019827aba39e50153a58a3f395 X-VCS-Branch: master Date: Wed, 29 Jun 2022 19:53:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ff5fe203-a3ba-4048-95f5-56f125c3c57c X-Archives-Hash: 3f9a9190a6e294feca797ede574b3fe5 commit: be8d5d31fabe30019827aba39e50153a58a3f395 Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Jun 29 19:35:11 2022 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Jun 29 19:53:17 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be8d5d31 kde-frameworks/kglobalaccel: Fix D-Bus de/marshalling MatchType Upstream commit 1a8e8cb00cda5807926a90ae8e5d5597354f3541 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=454704 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> ...accel-5.95.0-fix-shortcut-conflict-dialog.patch | 151 +++++++++++++++++++++ .../kglobalaccel/kglobalaccel-5.95.0-r1.ebuild | 46 +++++++ 2 files changed, 197 insertions(+) diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.95.0-fix-shortcut-conflict-dialog.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.95.0-fix-shortcut-conflict-dialog.patch new file mode 100644 index 000000000000..c39f30d86d3c --- /dev/null +++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.95.0-fix-shortcut-conflict-dialog.patch @@ -0,0 +1,151 @@ +From 1a8e8cb00cda5807926a90ae8e5d5597354f3541 Mon Sep 17 00:00:00 2001 +From: Ahmad Samir +Date: Sat, 4 Jun 2022 23:00:15 +0200 +Subject: [PATCH] Fix D-Bus de/marshalling KGlobalAccel::MatchType + +Otherwise the globalShortcutsByKey() method is silently skipped, and isn't +visible on the org.kde.KGlobalAccel D-Bus interface. + +It turns out that to test changes made in kglobalaccel d-bus interface, you +need to kill the system /usr/bin/kglobalaccel process (be careful as that +breaks the most basic shortcuts, e.g. Alt+Tab), and run the one from the +build-dir, otherwise the session d-bus won't pick up your changes. + +To test: +- List all methods on the interface: + `qdbus org.kde.kglobalaccel /kglobalaccel` +- The followin messages are printed in the system log/journal: +Skipped method "globalShortcutsByKey" : Unregistered input type in parameter list: KGlobalAccel::MatchType +Skipped method "globalShortcutsByKey" : Unregistered input type in parameter list: KGlobalAccel::MatchType + +To see the behaviour mentioned in the bug report: +- Create a global shortcut of some kind (e.g. F4 to start some app) +- open the shortcut editor in e.g. Dolphin, and try to assign that same + shortcut to some other action the conflict shortcut message dialog should + show a message similar to the one in the attached screenshot at: + https://bugs.kde.org/show_bug.cgi?id=454704#c0 +The list of GlobalShortcutInfo returned by globalShortcutsByKey() is empty +because the method couldn't be found on the d-bus interface. + +After applying patch: +- kill the system /usr/bin/kglobalaccel and start the one from the build + dir +- Start Dolphin with the libs from the build-dir e.g.: + LD_LIBRARY_PATH=build-dir/bin/ dolphin +- The info about the global shortcut should be shown in the message dialog + +BUG: 454704 +FIXED-IN: 5.95 +--- + src/kglobalaccel.cpp | 19 +++++++++++++++++++ + src/kglobalaccel.h | 3 +++ + src/kglobalshortcutinfo_p.h | 1 + + src/org.kde.KGlobalAccel.xml | 3 ++- + src/runtime/kglobalacceld.cpp | 4 ++-- + 5 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/src/kglobalaccel.cpp b/src/kglobalaccel.cpp +index d0d2932..ef51b56 100644 +--- a/src/kglobalaccel.cpp ++++ b/src/kglobalaccel.cpp +@@ -147,6 +147,7 @@ KGlobalAccel::KGlobalAccel() + qDBusRegisterMetaType>(); + qDBusRegisterMetaType(); + qDBusRegisterMetaType>(); ++ qDBusRegisterMetaType(); + } + + KGlobalAccel::~KGlobalAccel() +@@ -785,4 +786,22 @@ bool KGlobalAccelPrivate::setShortcutWithDefault(QAction *action, const QList(type); ++ argument.endStructure(); ++ return argument; ++} ++ ++const QDBusArgument &operator>>(const QDBusArgument &argument, KGlobalAccel::MatchType &type) ++{ ++ argument.beginStructure(); ++ int arg; ++ argument >> arg; ++ type = static_cast(arg); ++ argument.endStructure(); ++ return argument; ++} ++ + #include "moc_kglobalaccel.cpp" +diff --git a/src/kglobalaccel.h b/src/kglobalaccel.h +index 563278b..a74a311 100644 +--- a/src/kglobalaccel.h ++++ b/src/kglobalaccel.h +@@ -400,4 +400,7 @@ private: + friend class KGlobalAccelSingleton; + }; + ++KGLOBALACCEL_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const KGlobalAccel::MatchType &type); ++KGLOBALACCEL_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, KGlobalAccel::MatchType &type); ++ + #endif // _KGLOBALACCEL_H_ +diff --git a/src/kglobalshortcutinfo_p.h b/src/kglobalshortcutinfo_p.h +index 4b9146f..b3fa620 100644 +--- a/src/kglobalshortcutinfo_p.h ++++ b/src/kglobalshortcutinfo_p.h +@@ -13,6 +13,7 @@ + + static const int maxSequenceLength = 4; + ++#include "kglobalaccel.h" + #include "kglobalshortcutinfo.h" + + class KGlobalShortcutInfoPrivate +diff --git a/src/org.kde.KGlobalAccel.xml b/src/org.kde.KGlobalAccel.xml +index 65f93b8..d48ce87 100644 +--- a/src/org.kde.KGlobalAccel.xml ++++ b/src/org.kde.KGlobalAccel.xml +@@ -121,7 +121,8 @@ + + + +- ++ ++ + + + +diff --git a/src/runtime/kglobalacceld.cpp b/src/runtime/kglobalacceld.cpp +index cf22d26..e14d419 100644 +--- a/src/runtime/kglobalacceld.cpp ++++ b/src/runtime/kglobalacceld.cpp +@@ -13,6 +13,7 @@ + #include "globalshortcut.h" + #include "globalshortcutcontext.h" + #include "globalshortcutsregistry.h" ++#include "kglobalaccel.h" + #include "kserviceactioncomponent.h" + #include "logging_p.h" + +@@ -21,8 +22,6 @@ + #include + #include + +-#include "kglobalaccel.h" +- + struct KGlobalAccelDPrivate { + KGlobalAccelDPrivate(KGlobalAccelD *qq) + : q(qq) +@@ -175,6 +174,7 @@ bool KGlobalAccelD::init() + qDBusRegisterMetaType(); + qDBusRegisterMetaType(); + qDBusRegisterMetaType>(); ++ qDBusRegisterMetaType(); + + GlobalShortcutsRegistry *reg = GlobalShortcutsRegistry::self(); + Q_ASSERT(reg); +-- +GitLab + diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.95.0-r1.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.95.0-r1.ebuild new file mode 100644 index 000000000000..28733db44c48 --- /dev/null +++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.95.0-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PVCUT=$(ver_cut 1-2) +QTMIN=5.15.3 +VIRTUALX_REQUIRED="test" +inherit ecm kde.org + +DESCRIPTION="Framework to handle global shortcuts" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="nls" + +# requires installed instance +RESTRICT="test" + +RDEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=dev-qt/qtx11extras-${QTMIN}:5 + =kde-frameworks/kconfig-${PVCUT}*:5 + =kde-frameworks/kcoreaddons-${PVCUT}*:5 + =kde-frameworks/kcrash-${PVCUT}*:5 + =kde-frameworks/kdbusaddons-${PVCUT}*:5 + =kde-frameworks/kwindowsystem-${PVCUT}*:5[X] + x11-libs/libxcb + x11-libs/xcb-util-keysyms +" +DEPEND="${RDEPEND} + test? ( + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtquickcontrols2-${QTMIN}:5 + =kde-frameworks/kdeclarative-${PVCUT}*:5 + ) +" +BDEPEND="nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )" + +PATCHES=( "${FILESDIR}/${P}-fix-shortcut-conflict-dialog.patch" ) + +src_test() { + XDG_CURRENT_DESKTOP="KDE" ecm_src_test # bug 789342 +}