diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-02-10 09:20:09 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-02-10 10:10:40 +0100 |
commit | ba3f1fa4a036008b4d6baa1d2f76d772f21170d0 (patch) | |
tree | 675d5c9b6457dedce1eee27bbb66d51c65613476 /kde-frameworks/kwidgetsaddons | |
parent | kde-frameworks/kwayland: drop 5.88.0* (diff) | |
download | gentoo-ba3f1fa4a036008b4d6baa1d2f76d772f21170d0.tar.gz gentoo-ba3f1fa4a036008b4d6baa1d2f76d772f21170d0.tar.bz2 gentoo-ba3f1fa4a036008b4d6baa1d2f76d772f21170d0.zip |
kde-frameworks/kwidgetsaddons: drop 5.88.0*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kwidgetsaddons')
3 files changed, 0 insertions, 188 deletions
diff --git a/kde-frameworks/kwidgetsaddons/Manifest b/kde-frameworks/kwidgetsaddons/Manifest index 5d22a11a9a1c..1cb4a97dff18 100644 --- a/kde-frameworks/kwidgetsaddons/Manifest +++ b/kde-frameworks/kwidgetsaddons/Manifest @@ -1,2 +1 @@ -DIST kwidgetsaddons-5.88.0.tar.xz 2306968 BLAKE2B dd90673cac33f878186c003cc66fced723ed1d87845535da3ee87315fdbdae285b284cd52b776e354f104cd89640176aabe534fae9ecc310ae7dc447f66237e5 SHA512 722c55dad25fc3f7b516c7822ba2f0a2b87c6124435fc376f42bbba84aff28a0abf1791e8bb39c16a7708c91961c2fba4f6174ae704348a1a2058c65c4182bc8 DIST kwidgetsaddons-5.90.0.tar.xz 2311612 BLAKE2B 558d19a8a98fb4d49437c435856d35f0f92103a90cf3e49286eb3021b94e48ad154c03997fe9089226837db2dbf1b1eee07f6fcde0ef445c3c096ed83227f8a3 SHA512 7e68785540a73ef08bc99ca37b486af037657afa0f24971d53b9143e4f8ec0a4fcb4bf4bf986eedfbc9251e86e034796a242f69dd6ef88f7480691789f27e631 diff --git a/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.88.0-kacceleratormanager-alt-x-shortcuts.patch b/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.88.0-kacceleratormanager-alt-x-shortcuts.patch deleted file mode 100644 index 6e7ca9e47298..000000000000 --- a/kde-frameworks/kwidgetsaddons/files/kwidgetsaddons-5.88.0-kacceleratormanager-alt-x-shortcuts.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 294fe8ddc2f10d0a783bf9b80769c31ecc5922b1 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid <aacid@kde.org> -Date: Fri, 5 Nov 2021 23:23:59 +0100 -Subject: [PATCH] KAcceleratorManager: Take into account actions with Alt+X - shortcuts - -We need to mark those X labels as used, otherwise the accelerator -manager may decide to use X for an accelerator and when pressing Alt+X -we will have a conflict - -BUGS: 444990 ---- - autotests/kacceleratormanagertest.cpp | 21 +++++++++++++++++++ - src/kacceleratormanager.cpp | 30 ++++++++++++++++++++------- - src/kacceleratormanager_p.h | 4 ++-- - 3 files changed, 46 insertions(+), 9 deletions(-) - -diff --git a/autotests/kacceleratormanagertest.cpp b/autotests/kacceleratormanagertest.cpp -index 3fc07928..2bdc4f74 100644 ---- a/autotests/kacceleratormanagertest.cpp -+++ b/autotests/kacceleratormanagertest.cpp -@@ -8,6 +8,7 @@ - #include <kacceleratormanager.h> - - #include <QMenu> -+#include <QPushButton> - #include <QTest> - - #define QSL QStringLiteral -@@ -75,6 +76,26 @@ private Q_SLOTS: - QCOMPARE(texts, expectedTexts); - } - -+ void testExistingActionsShortcutsAreTakenIntoAccount() -+ { -+ std::unique_ptr<QWidget> w(new QWidget()); -+ -+ QPushButton *pb = new QPushButton(QSL("Open"), w.get()); -+ -+ KAcceleratorManager::manage(w.get()); -+ QCOMPARE(pb->text(), QSL("&Open")); -+ -+ delete pb; -+ pb = new QPushButton(QSL("Open"), w.get()); -+ -+ QAction *a = new QAction(); -+ a->setShortcut(QSL("Alt+O")); -+ w->addAction(a); -+ -+ KAcceleratorManager::manage(w.get()); -+ QCOMPARE(pb->text(), QSL("O&pen")); -+ } -+ - void testActionIconTexts_data() - { - QTest::addColumn<QStringList>("initialTexts"); -diff --git a/src/kacceleratormanager.cpp b/src/kacceleratormanager.cpp -index 66d596d3..2f7b1879 100644 ---- a/src/kacceleratormanager.cpp -+++ b/src/kacceleratormanager.cpp -@@ -94,9 +94,8 @@ void KAcceleratorManagerPrivate::manage(QWidget *widget) - - Item *root = new Item; - -- manageWidget(widget, root); -- - QString used; -+ manageWidget(widget, root, used); - calculateAccelerators(root, used); - delete root; - } -@@ -175,7 +174,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used - } - } - --void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item) -+void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item, QString &used) - { - const QList<QWidget *> childList = widget->findChildren<QWidget *>(); - for (QWidget *w : childList) { -@@ -192,12 +191,29 @@ void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item) - continue; - } - -- manageWidget(w, item); -+ manageWidget(w, item, used); - } - } - --void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item) -+void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item, QString &used) - { -+ // If the widget has any action whose shortcuts contain keystrokes in the -+ // form of Alt+X we need to mark X as used, otherwise we may assign it as accelerator -+ // and there will be a conflict when trying to use it -+ const QList<QAction *> widgetActions = w->actions(); -+ for (QAction *action : widgetActions) { -+ const QList<QKeySequence> actionShortcuts = action->shortcuts(); -+ for (const QKeySequence &sequence : actionShortcuts) { -+ const QString sequenceAsText = sequence.toString(QKeySequence::PortableText); -+ const QStringList splitSequence = sequenceAsText.split(QStringLiteral(", ")); -+ for (const QString &shortcut : splitSequence) { -+ if (shortcut.length() == 5 && shortcut.startsWith(QStringLiteral("Alt+"))) { -+ used.append(shortcut.right(1)); -+ } -+ } -+ } -+ } -+ - // first treat the special cases - - QTabBar *tabBar = qobject_cast<QTabBar *>(w); -@@ -247,7 +263,7 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item) - } - - if (w->inherits("KUrlRequester")) { -- traverseChildren(w, item); -+ traverseChildren(w, item, used); - return; - } - -@@ -316,7 +332,7 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item) - item->addChild(i); - } - } -- traverseChildren(w, item); -+ traverseChildren(w, item, used); - } - - void KAcceleratorManagerPrivate::manageTabBar(QTabBar *bar, Item *item) -diff --git a/src/kacceleratormanager_p.h b/src/kacceleratormanager_p.h -index a92d04ab..04926476 100644 ---- a/src/kacceleratormanager_p.h -+++ b/src/kacceleratormanager_p.h -@@ -227,9 +227,9 @@ public: - typedef QList<Item *> ItemList; - - private: -- static void traverseChildren(QWidget *widget, Item *item); -+ static void traverseChildren(QWidget *widget, Item *item, QString &used); - -- static void manageWidget(QWidget *widget, Item *item); -+ static void manageWidget(QWidget *widget, Item *item, QString &used); - static void manageMenuBar(QMenuBar *mbar, Item *item); - static void manageTabBar(QTabBar *bar, Item *item); - static void manageDockWidget(QDockWidget *dock, Item *item); --- -GitLab - diff --git a/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.88.0-r1.ebuild b/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.88.0-r1.ebuild deleted file mode 100644 index 4540eecce948..000000000000 --- a/kde-frameworks/kwidgetsaddons/kwidgetsaddons-5.88.0-r1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -ECM_DESIGNERPLUGIN="true" -QTMIN=5.15.2 -VIRTUALX_REQUIRED="test" -inherit ecm kde.org - -DESCRIPTION="An assortment of high-level widgets for common tasks" -LICENSE="LGPL-2.1+" -KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86" -IUSE="nls" - -DEPEND=" - >=dev-qt/qtgui-${QTMIN}:5 - >=dev-qt/qtwidgets-${QTMIN}:5 -" -RDEPEND="${DEPEND}" -BDEPEND=" - nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 ) -" - -PATCHES=( "${FILESDIR}/${P}-kacceleratormanager-alt-x-shortcuts.patch" ) # KDE-bug 444990 - -src_configure() { - local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_PythonModuleGeneration=ON # bug 746866 - ) - ecm_src_configure -} - -src_test() { - # bug 650216, 653186, 697866, 808216 - local myctestargs=( -E "(kdatecomboboxtest|ksqueezedtextlabelautotest|ktwofingertaptest|ktwofingerswipetest)" ) - ecm_src_test -} |