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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8285D13835A for ; Sat, 29 May 2021 21:19:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68A1DE07D7; Sat, 29 May 2021 21:19:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D2BDE07D7 for ; Sat, 29 May 2021 21:19:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23682340F25 for ; Sat, 29 May 2021 21:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 56C2859C for ; Sat, 29 May 2021 21:19:50 +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: <1622322979.8dec78355342ff4b5d729c8b7be3fe70a8c00ca3.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kglobalaccel/files/, kde-frameworks/kglobalaccel/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild X-VCS-Directories: kde-frameworks/kglobalaccel/ kde-frameworks/kglobalaccel/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 8dec78355342ff4b5d729c8b7be3fe70a8c00ca3 X-VCS-Branch: master Date: Sat, 29 May 2021 21:19:50 +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: 26ca619f-65b6-47c5-9512-1e02bab80fbe X-Archives-Hash: 7a5b7c3bebbd23eb3dc0ddd6cf68ae22 commit: 8dec78355342ff4b5d729c8b7be3fe70a8c00ca3 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat May 29 15:24:44 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat May 29 21:16:19 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dec7835 kde-frameworks/kglobalaccel: Backport 5.83 upstream revert Upstream commit 9a48818abf50340e31d718cc675501dec6c51429 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=437034 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> ...5.82.0-revert-prevent-activate-w-o-plasma.patch | 242 +++++++++++++++++++++ .../kglobalaccel/kglobalaccel-5.82.0-r1.ebuild | 39 ++++ 2 files changed, 281 insertions(+) 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 new file mode 100644 index 00000000000..1cea821ebe9 --- /dev/null +++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch @@ -0,0 +1,242 @@ +From 9a48818abf50340e31d718cc675501dec6c51429 Mon Sep 17 00:00:00 2001 +From: Nate Graham +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 + #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 KGlobalAccel::allMainComponents() + { +- if (!active()) { +- return {}; +- } +- + return d->iface()->allMainComponents(); + } + #endif +@@ -537,9 +511,6 @@ QList KGlobalAccel::allMainComponents() + #if KGLOBALACCEL_BUILD_DEPRECATED_SINCE(4, 2) + QList KGlobalAccel::allActionsForComponent(const QStringList &actionId) + { +- if (!active()) { +- return {}; +- } + return d->iface()->allActionsForComponent(actionId); + } + #endif +@@ -548,29 +519,17 @@ QList 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 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 &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 QListd->iface()->action(seq[0]); + if (actionId.size() < 4) { // not a global shortcut +@@ -676,10 +623,6 @@ bool checkGarbageKeycode(const QList &shortcut) + + bool KGlobalAccel::setDefaultShortcut(QAction *action, const QList &shortcut, GlobalShortcutLoading loadFlag) + { +- if (!active()) { +- return false; +- } +- + if (checkGarbageKeycode(shortcut)) { + return false; + } +@@ -695,10 +638,6 @@ bool KGlobalAccel::setDefaultShortcut(QAction *action, const QList + + bool KGlobalAccel::setShortcut(QAction *action, const QList &shortcut, GlobalShortcutLoading loadFlag) + { +- if (!active()) { +- return false; +- } +- + if (checkGarbageKeycode(shortcut)) { + return false; + } +@@ -724,9 +663,6 @@ QList KGlobalAccel::shortcut(const QAction *action) const + + QList 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 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 &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 &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 new file mode 100644 index 00000000000..a8a3e30dd7e --- /dev/null +++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild @@ -0,0 +1,39 @@ +# 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 +}