* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/
@ 2019-04-24 21:47 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-04-24 21:47 UTC (permalink / raw
To: gentoo-commits
commit: d39b643ada53bfb2e3d1508dfd68e592bebbfafa
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 21:44:54 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 21:45:05 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d39b643a
kde-frameworks/kglobalaccel: Fix runtime crashes
Upstream commit abe32ec599397bda0ce73471519410bee2c16059
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=406426
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../kglobalaccel-5.57.0-runtime-crashfix.patch | 36 ++++++++++++++++++++++
.../kglobalaccel/kglobalaccel-5.57.0-r1.ebuild | 32 +++++++++++++++++++
2 files changed, 68 insertions(+)
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix.patch
new file mode 100644
index 00000000000..762623d6d4f
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix.patch
@@ -0,0 +1,36 @@
+From abe32ec599397bda0ce73471519410bee2c16059 Mon Sep 17 00:00:00 2001
+From: Laurent Montel <montel@kde.org>
+Date: Sun, 14 Apr 2019 20:15:31 +0200
+Subject: Don't use qAsConst over a temporary variable
+
+Summary: BUG: 406426
+
+Reviewers: dfaure
+
+Reviewed By: dfaure
+
+Subscribers: kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D20555
+---
+ src/runtime/component.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/runtime/component.cpp b/src/runtime/component.cpp
+index ce276b9..669df67 100644
+--- a/src/runtime/component.cpp
++++ b/src/runtime/component.cpp
+@@ -330,7 +330,8 @@ bool Component::isShortcutAvailable(
+ // context
+ if (component==uniqueName())
+ {
+- for (GlobalShortcut *sc : qAsConst(shortcutContext(context)->_actions))
++ const auto actions = shortcutContext(context)->_actions;
++ for (GlobalShortcut *sc : actions)
+ {
+ if (sc->keys().contains(key)) return false;
+ }
+--
+cgit v1.1
diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r1.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r1.ebuild
new file mode 100644
index 00000000000..8d218d0d3af
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework to handle global shortcuts"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+LICENSE="LGPL-2+"
+IUSE="nls"
+
+BDEPEND="
+ nls? ( $(add_qt_dep linguist-tools) )
+"
+DEPEND="
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kwindowsystem X)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtx11extras)
+ x11-libs/libxcb
+ x11-libs/xcb-util-keysyms
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-runtime-crashfix.patch" )
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/
@ 2019-04-27 14:46 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-04-27 14:46 UTC (permalink / raw
To: gentoo-commits
commit: 074f26d812887c6ca707ee9909361c5d8aa3cb4b
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 27 12:22:01 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 14:45:49 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=074f26d8
kde-frameworks/kglobalaccel: Bump for another crash fix
Package-Manager: Portage-2.3.65, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../kglobalaccel-5.57.0-runtime-crashfix1.patch | 47 ++++++++++++++++++++++
.../kglobalaccel/kglobalaccel-5.57.0-r2.ebuild | 32 +++++++++++++++
2 files changed, 79 insertions(+)
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch
new file mode 100644
index 00000000000..68a76d5f00e
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch
@@ -0,0 +1,47 @@
+From 78a711361db3a5156f511eab89ff7ebbc86b9125 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Thu, 18 Apr 2019 14:32:11 +0200
+Subject: Copy container in Component::cleanUp before interating
+
+Summary:
+Crash was reported:
+
+Thread 1 (Thread 0x7fdc95c68800 (LWP 6402)):
+[KCrash Handler]
+#6 QHashData::nextNode (node=node@entry=0x562f53ffbd10) at tools/qhash.cpp:598
+#7 0x00007fdc95a1fbab in QHash<QString, GlobalShortcut*>::const_iterator::operator++ (this=<synthetic pointer>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:395
+#8 KdeDGlobalAccel::Component::cleanUp (this=0x562f53ffb040) at ./src/runtime/component.cpp:163
+
+Apparently the container is modified while iterating over it. That does not work with the range-for as it does not detach, as opposed to Q_FOREACH.
+
+Test Plan: @lbeltrame saw valgrind errors before applying this, but those disappeared with this patch.
+
+Reviewers: #frameworks, davidedmundson
+
+Reviewed By: davidedmundson
+
+Subscribers: lbeltrame, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D20659
+---
+ src/runtime/component.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletion(-)
+
+diff --git a/src/runtime/component.cpp b/src/runtime/component.cpp
+--- b/src/runtime/component.cpp
++++ b/src/runtime/component.cpp
+@@ -158,9 +158,10 @@
+
+ bool Component::cleanUp()
+ {
+- bool changed = false;;
++ bool changed = false;
+
+- for (GlobalShortcut *shortcut : qAsConst(_current->_actions))
++ const auto actions = _current->_actions;
++ for (GlobalShortcut *shortcut : actions)
+ {
+ qCDebug(KGLOBALACCELD) << _current->_actions.size();
+ if (!shortcut->isPresent())
diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild
new file mode 100644
index 00000000000..06ce9c5c409
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework to handle global shortcuts"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+LICENSE="LGPL-2+"
+IUSE="nls"
+
+BDEPEND="
+ nls? ( $(add_qt_dep linguist-tools) )
+"
+DEPEND="
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kwindowsystem X)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtx11extras)
+ x11-libs/libxcb
+ x11-libs/xcb-util-keysyms
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-runtime-crashfix{,1}.patch )
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/
@ 2021-04-04 13:23 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-04-04 13:23 UTC (permalink / raw
To: gentoo-commits
commit: 8369a03e08c0708871944fed47f3939eca024659
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 4 12:33:55 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 4 13:19:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8369a03e
kde-frameworks/kglobalaccel: Don't make krunner run with root privs
Upstream commit bbec74337b3186bc258bd5adf849b89191789535
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=423059
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=432975
Bug: https://bugs.gentoo.org/767478
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...kglobalaccel-5.80.0-dont-run-w-root-privs.patch | 43 ++++++++++++++++++++++
.../kglobalaccel/kglobalaccel-5.80.0-r1.ebuild | 36 ++++++++++++++++++
2 files changed, 79 insertions(+)
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch
new file mode 100644
index 00000000000..ab606eebed9
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch
@@ -0,0 +1,43 @@
+From bbec74337b3186bc258bd5adf849b89191789535 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Fri, 29 Jan 2021 11:31:54 +0100
+Subject: [PATCH] Don't let kglobalaccel run if KDE_SESSION_UID mismatches
+
+Otherwise shortcuts execute actions as the wrong user.
+---
+ src/runtime/main.cpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/runtime/main.cpp b/src/runtime/main.cpp
+index d2917ad..46506b3 100644
+--- a/src/runtime/main.cpp
++++ b/src/runtime/main.cpp
+@@ -10,6 +10,8 @@
+ #include "kglobalacceld.h"
+ #include "logging_p.h"
+
++#include <unistd.h>
++
+ #include <KAboutData>
+ #include <KCrash>
+ #include <KDBusService>
+@@ -57,6 +59,16 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
+ return 0;
+ }
+
++ // It's possible that kglobalaccel gets started as the wrong user by
++ // accident, e.g. kdesu dolphin leads to dbus activation. It then installs
++ // its grabs and the actions are run as the wrong user.
++ bool isUidset = false;
++ const int sessionuid = qEnvironmentVariableIntValue("KDE_SESSION_UID", &isUidset);
++ if(isUidset && static_cast<uid_t>(sessionuid) != getuid()) {
++ qCWarning(KGLOBALACCELD) << "kglobalaccel running as wrong user, exiting.";
++ return 0;
++ }
++
+ KDBusService service(KDBusService::Unique);
+
+ app.setQuitOnLastWindowClosed(false);
+--
+GitLab
+
diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.80.0-r1.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.80.0-r1.ebuild
new file mode 100644
index 00000000000..4f9f131751b
--- /dev/null
+++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.80.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework to handle global shortcuts"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+LICENSE="LGPL-2+"
+IUSE="nls"
+
+BDEPEND="
+ nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+DEPEND="
+ >=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
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-dont-run-w-root-privs.patch # bug 767478, KDE-bug 423059
+)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/
@ 2021-09-14 9:04 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-09-14 9:04 UTC (permalink / raw
To: gentoo-commits
commit: 2969b4b614413e9a5078dcf5e7884005a279aede
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 14 08:06:57 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 14 09:03:30 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2969b4b6
kde-frameworks/kglobalaccel: drop 5.82.0*
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-frameworks/kglobalaccel/Manifest | 1 -
...5.82.0-revert-prevent-activate-w-o-plasma.patch | 242 ---------------------
.../kglobalaccel/kglobalaccel-5.82.0-r1.ebuild | 39 ----
3 files changed, 282 deletions(-)
diff --git a/kde-frameworks/kglobalaccel/Manifest b/kde-frameworks/kglobalaccel/Manifest
index f20f5ed1514..50f9ad1707b 100644
--- a/kde-frameworks/kglobalaccel/Manifest
+++ b/kde-frameworks/kglobalaccel/Manifest
@@ -1,3 +1,2 @@
-DIST kglobalaccel-5.82.0.tar.xz 87932 BLAKE2B feed60b09b01da373b3a6b989ca465b93a67d1ba84ce45c503805e6cb49af1b7ce99afa1921414e9a616d344f95366e0e4822b58f41ea73222dacfcc448a588c SHA512 c6f757628ca8123183b1ead08fbf326bf8b6d5b97e4dc65c33a2c158103aa7915617d423692ee417059bd08a299546b7cdd373b31dbfd80f2498193da7b5aaf7
DIST kglobalaccel-5.85.0.tar.xz 87868 BLAKE2B c76a60426406689434b8b7e90ff9f107173ffa8bb6e6f78603541c2f7fdba62719d141f01ac2a7e3ebeae06a2a891a5467e6ee87eb5d30a53ed4e3faa98a1b28 SHA512 091194d3171820c121c32356bf1dfd98416b91952b745afbf35fc75a7e944a5c80f17fb1f8418016513eaaf63ccb07c1aec822f5f3823f3f4aa604c3dd9963f2
DIST kglobalaccel-5.86.0.tar.xz 88000 BLAKE2B 3c9d361ddf8a85fef783dedafa508f98e90da22652e057298b68a6957d882ddd2c7a28cc13278520c9d5672b1d3954e634d1df0963c7b78c18bfc6183c4db9a7 SHA512 ee1b700cd0c7f9162f6b649e61164e5e0915be3acdc52c504c85f133b64ec8d2ea962503d60d772efb127b6537c3bbd7d61f2b018b9846a791e9cf8caa4c0eb6
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch
deleted file mode 100644
index 1cea821ebe9..00000000000
--- a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From 9a48818abf50340e31d718cc675501dec6c51429 Mon Sep 17 00:00:00 2001
-From: Nate Graham <nate@kde.org>
-Date: Wed, 26 May 2021 13:14:13 -0600
-Subject: [PATCH] Revert "Prevent kglobalaccel5 getting activated on non-Plasma
- systems"
-
-This reverts commit 48c3376927e5e9c13377bf3cfc8b0c411783e7f3.
-
-This change broke users of KGlobalAccel run outside of the Plasma
-Desktop. This sort of behavior change probably needs to be made during
-a major transition like KF6 so that developers have some notice and it
-doesn't randomly change and break stuff unexpectedly.
-
-CCBUG: 435420
-BUG: 437034
-FIXED-IN: 5.83
----
- src/kglobalaccel.cpp | 80 --------------------------------------------
- 1 file changed, 80 deletions(-)
-
-diff --git a/src/kglobalaccel.cpp b/src/kglobalaccel.cpp
-index 8bb43e5..154caed 100644
---- a/src/kglobalaccel.cpp
-+++ b/src/kglobalaccel.cpp
-@@ -25,11 +25,6 @@
- #include <QX11Info>
- #endif
-
--bool active()
--{
-- return qgetenv("XDG_CURRENT_DESKTOP") == QByteArrayLiteral("KDE");
--}
--
- org::kde::kglobalaccel::Component *KGlobalAccelPrivate::getComponent(const QString &componentUnique, bool remember = false)
- {
- // Check if we already have this component
-@@ -148,11 +143,6 @@ KGlobalAccel::~KGlobalAccel()
- void KGlobalAccel::activateGlobalShortcutContext(const QString &contextUnique, const QString &contextFriendly, const QString &programName)
- {
- Q_UNUSED(contextFriendly);
--
-- if (!active()) {
-- return;
-- }
--
- // TODO: provide contextFriendly
- self()->d->iface()->activateGlobalShortcutContext(programName, contextUnique);
- }
-@@ -160,10 +150,6 @@ void KGlobalAccel::activateGlobalShortcutContext(const QString &contextUnique, c
- // static
- bool KGlobalAccel::cleanComponent(const QString &componentUnique)
- {
-- if (!active()) {
-- return false;
-- }
--
- org::kde::kglobalaccel::Component *component = self()->getComponent(componentUnique);
- if (!component) {
- return false;
-@@ -175,10 +161,6 @@ bool KGlobalAccel::cleanComponent(const QString &componentUnique)
- // static
- bool KGlobalAccel::isComponentActive(const QString &componentUnique)
- {
-- if (!active()) {
-- return false;
-- }
--
- org::kde::kglobalaccel::Component *component = self()->getComponent(componentUnique);
- if (!component) {
- return false;
-@@ -196,10 +178,6 @@ bool KGlobalAccel::isEnabled() const
-
- org::kde::kglobalaccel::Component *KGlobalAccel::getComponent(const QString &componentUnique)
- {
-- if (!active()) {
-- return nullptr;
-- }
--
- return d->getComponent(componentUnique);
- }
-
-@@ -526,10 +504,6 @@ void KGlobalAccelPrivate::reRegisterAll()
- #if KGLOBALACCEL_BUILD_DEPRECATED_SINCE(4, 2)
- QList<QStringList> KGlobalAccel::allMainComponents()
- {
-- if (!active()) {
-- return {};
-- }
--
- return d->iface()->allMainComponents();
- }
- #endif
-@@ -537,9 +511,6 @@ QList<QStringList> KGlobalAccel::allMainComponents()
- #if KGLOBALACCEL_BUILD_DEPRECATED_SINCE(4, 2)
- QList<QStringList> KGlobalAccel::allActionsForComponent(const QStringList &actionId)
- {
-- if (!active()) {
-- return {};
-- }
- return d->iface()->allActionsForComponent(actionId);
- }
- #endif
-@@ -548,29 +519,17 @@ QList<QStringList> KGlobalAccel::allActionsForComponent(const QStringList &actio
- #if KGLOBALACCEL_BUILD_DEPRECATED_SINCE(4, 2)
- QStringList KGlobalAccel::findActionNameSystemwide(const QKeySequence &seq)
- {
-- if (!active()) {
-- return {};
-- }
--
- return self()->d->iface()->action(seq[0]);
- }
- #endif
-
- QList<KGlobalShortcutInfo> KGlobalAccel::getGlobalShortcutsByKey(const QKeySequence &seq)
- {
-- if (!active()) {
-- return {};
-- }
--
- return self()->d->iface()->getGlobalShortcutsByKey(seq[0]);
- }
-
- bool KGlobalAccel::isGlobalShortcutAvailable(const QKeySequence &seq, const QString &comp)
- {
-- if (!active()) {
-- return false;
-- }
--
- return self()->d->iface()->isGlobalShortcutAvailable(seq[0], comp);
- }
-
-@@ -578,10 +537,6 @@ bool KGlobalAccel::isGlobalShortcutAvailable(const QKeySequence &seq, const QStr
- #if KGLOBALACCEL_BUILD_DEPRECATED_SINCE(4, 2)
- bool KGlobalAccel::promptStealShortcutSystemwide(QWidget *parent, const QStringList &actionIdentifier, const QKeySequence &seq)
- {
-- if (!active()) {
-- return false;
-- }
--
- if (actionIdentifier.size() < 4) {
- return false;
- }
-@@ -604,10 +559,6 @@ bool KGlobalAccel::promptStealShortcutSystemwide(QWidget *parent, const QStringL
- // static
- bool KGlobalAccel::promptStealShortcutSystemwide(QWidget *parent, const QList<KGlobalShortcutInfo> &shortcuts, const QKeySequence &seq)
- {
-- if (!active()) {
-- return false;
-- }
--
- if (shortcuts.isEmpty()) {
- // Usage error. Just say no
- return false;
-@@ -640,10 +591,6 @@ bool KGlobalAccel::promptStealShortcutSystemwide(QWidget *parent, const QList<KG
- // static
- void KGlobalAccel::stealShortcutSystemwide(const QKeySequence &seq)
- {
-- if (!active()) {
-- return;
-- }
--
- // get the shortcut, remove seq, and set the new shortcut
- const QStringList actionId = self()->d->iface()->action(seq[0]);
- if (actionId.size() < 4) { // not a global shortcut
-@@ -676,10 +623,6 @@ bool checkGarbageKeycode(const QList<QKeySequence> &shortcut)
-
- bool KGlobalAccel::setDefaultShortcut(QAction *action, const QList<QKeySequence> &shortcut, GlobalShortcutLoading loadFlag)
- {
-- if (!active()) {
-- return false;
-- }
--
- if (checkGarbageKeycode(shortcut)) {
- return false;
- }
-@@ -695,10 +638,6 @@ bool KGlobalAccel::setDefaultShortcut(QAction *action, const QList<QKeySequence>
-
- bool KGlobalAccel::setShortcut(QAction *action, const QList<QKeySequence> &shortcut, GlobalShortcutLoading loadFlag)
- {
-- if (!active()) {
-- return false;
-- }
--
- if (checkGarbageKeycode(shortcut)) {
- return false;
- }
-@@ -724,9 +663,6 @@ QList<QKeySequence> KGlobalAccel::shortcut(const QAction *action) const
-
- QList<QKeySequence> KGlobalAccel::globalShortcut(const QString &componentName, const QString &actionId) const
- {
-- if (!active()) {
-- return {};
-- }
- // see also d->updateGlobalShortcut(action, KGlobalAccelPrivate::ActiveShortcut, KGlobalAccel::Autoloading);
-
- // how componentName and actionId map to QAction, e.g:
-@@ -740,19 +676,11 @@ QList<QKeySequence> KGlobalAccel::globalShortcut(const QString &componentName, c
-
- void KGlobalAccel::removeAllShortcuts(QAction *action)
- {
-- if (!active()) {
-- return;
-- }
--
- d->remove(action, KGlobalAccelPrivate::UnRegister);
- }
-
- bool KGlobalAccel::hasShortcut(const QAction *action) const
- {
-- if (!active()) {
-- return false;
-- }
--
- return d->actionShortcuts.contains(action) || d->actionDefaultShortcuts.contains(action);
- }
-
-@@ -765,10 +693,6 @@ bool KGlobalAccel::eventFilter(QObject *watched, QEvent *event)
-
- bool KGlobalAccel::setGlobalShortcut(QAction *action, const QList<QKeySequence> &shortcut)
- {
-- if (!active()) {
-- return false;
-- }
--
- KGlobalAccel *g = KGlobalAccel::self();
- return g->d->setShortcutWithDefault(action, shortcut, Autoloading);
- }
-@@ -780,10 +704,6 @@ bool KGlobalAccel::setGlobalShortcut(QAction *action, const QKeySequence &shortc
-
- bool KGlobalAccelPrivate::setShortcutWithDefault(QAction *action, const QList<QKeySequence> &shortcut, KGlobalAccel::GlobalShortcutLoading loadFlag)
- {
-- if (!active()) {
-- return false;
-- }
--
- if (checkGarbageKeycode(shortcut)) {
- return false;
- }
---
-GitLab
-
diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild
deleted file mode 100644
index 5cf9c27bbef..00000000000
--- a/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PVCUT=$(ver_cut 1-2)
-QTMIN=5.15.2
-VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
-
-DESCRIPTION="Framework to handle global shortcuts"
-
-LICENSE="LGPL-2+"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
-IUSE="nls"
-
-DEPEND="
- >=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
-"
-RDEPEND="${DEPEND}"
-BDEPEND="nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-revert-prevent-activate-w-o-plasma.patch # KDE-bug 437034
-)
-
-src_test() {
- XDG_CURRENT_DESKTOP="KDE" ecm_src_test # bug 789342
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/
@ 2022-06-29 19:53 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-06-29 19:53 UTC (permalink / raw
To: gentoo-commits
commit: be8d5d31fabe30019827aba39e50153a58a3f395
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 29 19:35:11 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> 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 <asturm <AT> 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 <a.samirh78@gmail.com>
+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<QList<QStringList>>();
+ qDBusRegisterMetaType<KGlobalShortcutInfo>();
+ qDBusRegisterMetaType<QList<KGlobalShortcutInfo>>();
++ qDBusRegisterMetaType<KGlobalAccel::MatchType>();
+ }
+
+ KGlobalAccel::~KGlobalAccel()
+@@ -785,4 +786,22 @@ bool KGlobalAccelPrivate::setShortcutWithDefault(QAction *action, const QList<QK
+ return true;
+ }
+
++QDBusArgument &operator<<(QDBusArgument &argument, const KGlobalAccel::MatchType &type)
++{
++ argument.beginStructure();
++ argument << static_cast<int>(type);
++ argument.endStructure();
++ return argument;
++}
++
++const QDBusArgument &operator>>(const QDBusArgument &argument, KGlobalAccel::MatchType &type)
++{
++ argument.beginStructure();
++ int arg;
++ argument >> arg;
++ type = static_cast<KGlobalAccel::MatchType>(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 @@
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList<KGlobalShortcutInfo>"/>
+ <arg name="key" type="ai" direction="in"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QKeySequence"/>
+- <arg name="type" type="i" direction="in"/>
++ <arg name="matchType" type="KGlobalAccel::MatchType" direction="in"/>
++ <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="KGlobalAccel::MatchType"/>
+ </method>
+ <method name="globalShortcutAvailable">
+ <arg type="b" direction="out"/>
+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 <QMetaMethod>
+ #include <QTimer>
+
+-#include "kglobalaccel.h"
+-
+ struct KGlobalAccelDPrivate {
+ KGlobalAccelDPrivate(KGlobalAccelD *qq)
+ : q(qq)
+@@ -175,6 +174,7 @@ bool KGlobalAccelD::init()
+ qDBusRegisterMetaType<QStringList>();
+ qDBusRegisterMetaType<KGlobalShortcutInfo>();
+ qDBusRegisterMetaType<QList<KGlobalShortcutInfo>>();
++ qDBusRegisterMetaType<KGlobalAccel::MatchType>();
+
+ 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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-29 19:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24 21:47 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/, kde-frameworks/kglobalaccel/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2019-04-27 14:46 Andreas Sturmlechner
2021-04-04 13:23 Andreas Sturmlechner
2021-09-14 9:04 Andreas Sturmlechner
2022-06-29 19:53 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox