summaryrefslogtreecommitdiff
path: root/kde-frameworks/kglobalaccel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /kde-frameworks/kglobalaccel
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'kde-frameworks/kglobalaccel')
-rw-r--r--kde-frameworks/kglobalaccel/Manifest3
-rw-r--r--kde-frameworks/kglobalaccel/files/kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch242
-rw-r--r--kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild (renamed from kde-frameworks/kglobalaccel/kglobalaccel-5.82.0.ebuild)4
3 files changed, 248 insertions, 1 deletions
diff --git a/kde-frameworks/kglobalaccel/Manifest b/kde-frameworks/kglobalaccel/Manifest
index a9ed5eb7b830..418d40cfebaa 100644
--- a/kde-frameworks/kglobalaccel/Manifest
+++ b/kde-frameworks/kglobalaccel/Manifest
@@ -1,6 +1,7 @@
AUX kglobalaccel-5.80.0-dont-run-w-root-privs.patch 1383 BLAKE2B 77925b30b0360ced4a2e31c5ab7529604e8d0e11f50bdc1f78c6b808796a3cc9b021ff17da429026e943319ba8ebd0041de4c60e88bd141f17fca7248950a62f SHA512 91a982bbc2b99569b03161e78b53b3fc6bcb7c03e3c69abac4d9a5917e4b5d0766d9289766d00efcd3c9df24016509c389fcea78a9efba190da8eb3e3bc06870
+AUX kglobalaccel-5.82.0-revert-prevent-activate-w-o-plasma.patch 7552 BLAKE2B 37de1efd65119ca8df9147a5f52da98711102215a381c9bbf9c8796558ceafab8309225281ace5ec4dd59692a37e11a051f0bc1ff0755ba8a81705f7e4a634d7 SHA512 2c8e910240c3405da9bdc5962fcb3cc2db5a9b5a61f6155d8b2673ec30c957d00819f661e605fba3c2e14734e944c766376df6cb3c3e8708b62d5b64672f3007
DIST kglobalaccel-5.80.0.tar.xz 87360 BLAKE2B f05027f4aeb71ba17b42bfe3214222737df4689e72e7eaa2e848d891e4934acead92051a21ce49313513050d4e3b01148576ca0ab58c609670fc88e7bedc15cb SHA512 6e12d3926f1b44425747bfca3eea21986cfe57ce032a2f691a2ab6b12556feec15cceea4b2b6c21bbdc9ecb6af11e9fb64489d60d9e95f4443b0a74ebab551af
DIST kglobalaccel-5.82.0.tar.xz 87932 BLAKE2B feed60b09b01da373b3a6b989ca465b93a67d1ba84ce45c503805e6cb49af1b7ce99afa1921414e9a616d344f95366e0e4822b58f41ea73222dacfcc448a588c SHA512 c6f757628ca8123183b1ead08fbf326bf8b6d5b97e4dc65c33a2c158103aa7915617d423692ee417059bd08a299546b7cdd373b31dbfd80f2498193da7b5aaf7
EBUILD kglobalaccel-5.80.0-r1.ebuild 855 BLAKE2B 8772c8ecb5ab37f6d51417f8722e6186e97a086cbb4ffb29db568d06516508acc16e62571a25f8d65bf0966ebe52d02c995539453e383a31c1b06cc0c064da8b SHA512 13c333282bb973e21a7cc381bf593c8beebd746870fc4c641b088bc2f4daa3e24a523999d4742ba66fa13c9919cc24e1103ffe1457745876a0a6f10ec279db68
-EBUILD kglobalaccel-5.82.0.ebuild 835 BLAKE2B 5f93998aa4ed4dd1dc96b9ad0c8f115efa8891dd68624d412987111dbf1f362638c5d7fd6f1082c5278a723f5c858864478ccca60bffe64334da0013577b6800 SHA512 a3b4887bd7292d887809cf101002da27274388e068471eba66f8e464fad18fb2512cfd00f6be713fb57e86ca4a76fa3da0e81b95de8e3a66df6f5d61358b9a49
+EBUILD kglobalaccel-5.82.0-r1.ebuild 926 BLAKE2B 71c1e4f00a7aa6d1e4a12ad841dd4baad6546f4a6b8860649a5afd5201efa3305a28b5d28a2d36db61b2e7147519d071faea19f1766e30738dc40cce13f4f954 SHA512 9cef7f7825749d3bee612a5427e0c7bc0c11326ec1de4c813c993c60894fa6fc493e1dc2e11243241c470cb280f01092b77eca15d8dd335a29a1f61b2a1be41d
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
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 000000000000..1cea821ebe96
--- /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 <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.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild
index c07636e53c53..a8a3e30dd7ed 100644
--- a/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0.ebuild
+++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.82.0-r1.ebuild
@@ -30,6 +30,10 @@ DEPEND="
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
}