summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-02-10 09:20:37 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-02-10 10:10:52 +0100
commit5facb69afa74b909502ab0b70c762a7ff7a1b6c6 (patch)
tree24501a7d0daad67c630bd68df2746ec1ab0f156e /kde-frameworks
parentkde-frameworks/kcmutils: drop 5.88.0* (diff)
downloadgentoo-5facb69afa74b909502ab0b70c762a7ff7a1b6c6.tar.gz
gentoo-5facb69afa74b909502ab0b70c762a7ff7a1b6c6.tar.bz2
gentoo-5facb69afa74b909502ab0b70c762a7ff7a1b6c6.zip
kde-frameworks/kconfigwidgets: drop 5.88.0*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/kconfigwidgets/Manifest1
-rw-r--r--kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-KCommandBar-alignment.patch494
-rw-r--r--kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-hamburger-menu-no-window-on-wayland.patch87
-rw-r--r--kde-frameworks/kconfigwidgets/kconfigwidgets-5.88.0-r1.ebuild46
4 files changed, 0 insertions, 628 deletions
diff --git a/kde-frameworks/kconfigwidgets/Manifest b/kde-frameworks/kconfigwidgets/Manifest
index 7454c320f899..a12266355e70 100644
--- a/kde-frameworks/kconfigwidgets/Manifest
+++ b/kde-frameworks/kconfigwidgets/Manifest
@@ -1,2 +1 @@
-DIST kconfigwidgets-5.88.0.tar.xz 412648 BLAKE2B 45b08f839fea13f848a8c6f0990b0da1fad44c27659d18102fcba9ec407fed7588cafc20d401f9b0253fb26baba484bb901b5ffe310f2e8ad4b666673773968d SHA512 cbc4af1f19509325528cef138746b081552547bbbd5c741dada8d9b58e6d510eb3611867335d94b892d42fa1eb771f0ab4b93c56014cede65bf6769cf10b5a3e
DIST kconfigwidgets-5.90.1.tar.xz 414176 BLAKE2B 3e6bdcefd2dc0b275b2c8d7e6d314e98fb3f2911fc60e4445b6a07adb52240b247927cb869a27695f2c43d0304e545a534de809518a84b2f53c34cce9fa73ed0 SHA512 51e1f388a4d6c41f538b7adc01b0fd87242b483f10c425f8ff0e4920e82cded5b9c921ec0e1ad858cdb905bd3fdc32befd5e17424702c7861ec2c9fbf517a208
diff --git a/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-KCommandBar-alignment.patch b/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-KCommandBar-alignment.patch
deleted file mode 100644
index 1ebd8e3dd551..000000000000
--- a/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-KCommandBar-alignment.patch
+++ /dev/null
@@ -1,494 +0,0 @@
-From 34d5352c1f30d92b10667574cb7fcc1cf7e9af66 Mon Sep 17 00:00:00 2001
-From: Eugene Popov <popov895@ukr.net>
-Date: Sat, 6 Nov 2021 18:49:37 +0000
-Subject: [PATCH] [KCommandBar] Dynamic column widths + shortcuts alignment
-
----
- src/kcommandbar.cpp | 278 +++++++++++++++++++++----------------
- src/kcommandbarmodel_p.cpp | 17 +--
- src/kcommandbarmodel_p.h | 9 +-
- tests/kcommandbartest.cpp | 9 ++
- 4 files changed, 176 insertions(+), 137 deletions(-)
-
-diff --git a/src/kcommandbar.cpp b/src/kcommandbar.cpp
-index 0d17ffa0..4d0987d7 100644
---- a/src/kcommandbar.cpp
-+++ b/src/kcommandbar.cpp
-@@ -16,6 +16,7 @@
- #include <QTextLayout>
- #include <QTreeView>
- #include <QVBoxLayout>
-+#include <QHeaderView>
-
- #include <KConfigGroup>
- #include <KFuzzyMatcher>
-@@ -147,32 +148,24 @@ public:
-
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
- {
-- QStyleOptionViewItem options = option;
-- initStyleOption(&options, index);
--
- painter->save();
-
-- // paint background
-- if (option.state & QStyle::State_Selected) {
-- painter->fillRect(option.rect, option.palette.highlight());
-- } else {
-- painter->fillRect(option.rect, option.palette.base());
-- }
--
- /**
- * Draw everything, (widget, icon etc) except the text
- */
-- options.text = QString(); // clear old text
-- QStyle *style = options.widget->style();
-- style->drawControl(QStyle::CE_ItemViewItem, &options, painter, options.widget);
-+ QStyleOptionViewItem optionCopy = option;
-+ initStyleOption(&optionCopy, index);
-+ optionCopy.text.clear(); // clear old text
-+ QStyle *style = option.widget->style();
-+ style->drawControl(QStyle::CE_ItemViewItem, &optionCopy, painter, option.widget);
-
-- const int hMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, &options, options.widget);
-+ const int hMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, &option, option.widget);
-
- QRect outputRect = option.rect;
-
- const CommandBarFilterModel *model = static_cast<const CommandBarFilterModel*>(index.model());
- if (model->hasActionsWithIcons()) {
-- const int iconWidth = options.decorationSize.width() + hMargin;
-+ const int iconWidth = option.decorationSize.width() + hMargin;
- if (option.direction == Qt::RightToLeft) {
- outputRect.adjust(0, 0, -iconWidth, 0);
- } else {
-@@ -198,7 +191,7 @@ public:
- }
-
- QTextCharFormat fmt;
-- fmt.setForeground(options.palette.link().color());
-+ fmt.setForeground(option.palette.link().color());
- fmt.setFontWeight(QFont::Bold);
-
- /**
-@@ -206,13 +199,13 @@ public:
- */
- const auto fmtRanges = KFuzzyMatcher::matchedRanges(m_filterString, str);
- QTextCharFormat f;
-- f.setForeground(options.palette.link());
-+ f.setForeground(option.palette.link());
- std::transform(fmtRanges.begin(), fmtRanges.end(), std::back_inserter(formats), [f, actionNameStart](const KFuzzyMatcher::Range &fr) {
- return QTextLayout::FormatRange{fr.start + actionNameStart, fr.length, f};
- });
-
- outputRect.adjust(hMargin, 0, -hMargin, 0);
-- paintItemText(painter, original, outputRect, options, std::move(formats));
-+ paintItemText(painter, original, outputRect, option, std::move(formats));
-
- painter->restore();
- }
-@@ -240,122 +233,159 @@ public:
- return shortcutString.split(QLatin1String(", "), Qt::SkipEmptyParts);
- }
-
-+ // returns the width needed to draw the shortcut
-+ static int shortcutDrawingWidth(const QStyleOptionViewItem &option, const QString &shortcut, int hMargin)
-+ {
-+ int width = 0;
-+ if (!shortcut.isEmpty()) {
-+ // adapt the shortcut as it will be drawn
-+ // "Ctrl+A, Alt+B" => "Ctrl+A+Alt+B"
-+ QString adaptedShortcut = shortcut;
-+ adaptedShortcut.replace(QStringLiteral(", "), QStringLiteral("+"));
-+
-+ width = option.fontMetrics.horizontalAdvance(adaptedShortcut);
-+
-+ // count the number of segments
-+ // "Ctrl+A+Alt+B" => ["Ctrl", "+", "A", "+", "Alt", "+", "B"]
-+ static const QRegularExpression regExp(QStringLiteral("(\\+(?!\\+)|\\+(?=\\+{2}))"));
-+ const int segmentsCount = 2 * adaptedShortcut.count(regExp) + 1;
-+
-+ // add left and right margins for each segment
-+ width += segmentsCount * 2 * hMargin;
-+ }
-+
-+ return width;
-+ }
-+
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
- {
-- QStyleOptionViewItem options = option;
-- initStyleOption(&options, index);
-- painter->save();
-+ // draw background
-+ option.widget->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter);
-
- const QString shortcutString = index.data().toString();
--
-- // paint background
-- if (option.state & QStyle::State_Selected) {
-- painter->fillRect(option.rect, option.palette.highlight());
-- } else {
-- painter->fillRect(option.rect, option.palette.base());
-+ if (shortcutString.isEmpty()) {
-+ return;
- }
-
-- options.text = QString(); // clear old text
-- options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter, options.widget);
--
-- if (!shortcutString.isEmpty()) {
-- /**
-- * Shortcut string splitting
-- *
-- * We do it in two steps
-- * 1. Split on ", " so that if we have multi modifier shortcuts they are nicely
-- * split into strings.
-- * 2. Split each shortcut from step 1 into individual string.
-- *
-- * Example:
-- *
-- * "Ctrl+,, Alt+:"
-- * Step 1: [ "Ctrl+," , "Alt+:"]
-- * Step 2: [ "Ctrl", ",", "Alt", ":"]
-- */
-- const QStringList spaceSplitted = splitShortcutString(shortcutString);
-- QStringList list;
-- list.reserve(spaceSplitted.size() * 2);
-- for (const QString &shortcut : spaceSplitted) {
-- list += shortcut.split(QLatin1Char('+'), Qt::SkipEmptyParts);
-- if (shortcut.endsWith(QLatin1Char('+'))) {
-- list.append(QStringLiteral("+"));
-- }
-+ /**
-+ * Shortcut string splitting
-+ *
-+ * We do it in two steps
-+ * 1. Split on ", " so that if we have multi modifier shortcuts they are nicely
-+ * split into strings.
-+ * 2. Split each shortcut from step 1 into individual string.
-+ *
-+ * Example:
-+ *
-+ * "Ctrl+,, Alt+:"
-+ * Step 1: [ "Ctrl+," , "Alt+:"]
-+ * Step 2: [ "Ctrl", ",", "Alt", ":"]
-+ */
-+ const QStringList spaceSplitted = splitShortcutString(shortcutString);
-+ QStringList list;
-+ list.reserve(spaceSplitted.size() * 2);
-+ for (const QString &shortcut : spaceSplitted) {
-+ list += shortcut.split(QLatin1Char('+'), Qt::SkipEmptyParts);
-+ if (shortcut.endsWith(QLatin1Char('+'))) {
-+ list.append(QStringLiteral("+"));
- }
-+ }
-
-- /**
-- * Create rects for each string from the previous step
-- *
-- * @todo boundingRect may give issues here, use horizontalAdvance
-- * @todo We probably dont need the full rect, just the width so the
-- * "btns" vector can just be vector<pair<int, string>>
-- */
-- QVector<QPair<QRect, QString>> btns;
-- btns.reserve(list.size());
-- const int height = options.rect.height();
-- for (const QString &text : std::as_const(list)) {
-- if (text.isEmpty()) {
-- continue;
-- }
-- QRect r = option.fontMetrics.boundingRect(text);
-- // this happens on gnome so we manually decrease the
-- // height a bit
-- if (r.height() == height) {
-- r.setHeight(r.height() - 4);
-- }
-- r.setWidth(r.width() + 8);
-- btns.append({r, text});
-+ /**
-+ * Create rects for each string from the previous step
-+ *
-+ * @todo We probably dont need the full rect, just the width so the
-+ * "btns" vector can just be vector<pair<int, string>>
-+ */
-+ QVector<QPair<QRect, QString>> btns;
-+ btns.reserve(list.size());
-+ const int height = option.rect.height();
-+ const int hMargin = horizontalMargin(option);
-+ for (const QString &text : std::as_const(list)) {
-+ if (text.isEmpty()) {
-+ continue;
- }
--
-- // we have nothing, just return
-- if (btns.isEmpty()) {
-- return;
-+ QRect r(0, 0, option.fontMetrics.horizontalAdvance(text), option.fontMetrics.lineSpacing());
-+ // this happens on gnome so we manually decrease the
-+ // height a bit
-+ if (r.height() == height) {
-+ r.setHeight(r.height() - 4);
- }
-+ r.setWidth(r.width() + 2 * hMargin);
-+ btns.append({r, text});
-+ }
-+
-+ // we have nothing, just return
-+ if (btns.isEmpty()) {
-+ return;
-+ }
-+
-+ const QRect plusRect = option.fontMetrics.boundingRect(QLatin1Char('+'));
-
-- const QRect plusRect = option.fontMetrics.boundingRect(QLatin1Char('+'));
--
-- // draw them
-- int x = option.rect.x();
-- const int y = option.rect.y();
-- const int plusY = option.rect.y() + plusRect.height() / 2;
-- const int total = btns.size();
--
-- // make sure our rects are nicely V-center aligned in the row
-- painter->translate(QPoint(0, (option.rect.height() - btns.at(0).first.height()) / 2));
--
-- int i = 0;
-- painter->setRenderHint(QPainter::Antialiasing);
-- for (const auto &btn : std::as_const(btns)) {
-- painter->setPen(Qt::NoPen);
-- const QRect &rect = btn.first;
--
-- QRect buttonRect(x, y, rect.width(), rect.height());
--
-- // draw rounded rect shadow
-- auto shadowRect = buttonRect.translated(0, 1);
-- painter->setBrush(option.palette.shadow());
-- painter->drawRoundedRect(shadowRect, 3.0, 3.0);
--
-- // draw rounded rect itself
-- painter->setBrush(option.palette.button());
-- painter->drawRoundedRect(buttonRect, 3.0, 3.0);
--
-- // draw text inside rounded rect
-- painter->setPen(option.palette.buttonText().color());
-- painter->drawText(buttonRect, Qt::AlignCenter, btn.second);
--
-- // draw '+'
-- if (i + 1 < total) {
-- x += rect.width() + 5;
-- painter->drawText(QPoint(x, plusY + (rect.height() / 2)), QStringLiteral("+"));
-- x += plusRect.width() + 5;
-- }
-- i++;
-+ // draw them
-+ int x;
-+ if (option.direction == Qt::RightToLeft) {
-+ x = option.rect.x() + hMargin;
-+ } else {
-+ x = option.rect.right() - shortcutDrawingWidth(option, shortcutString, hMargin) - hMargin;
-+ }
-+ const int y = option.rect.y() + (option.rect.height() - btns.at(0).first.height()) / 2;
-+ const int plusY = option.rect.y() + (option.rect.height() - plusRect.height()) / 2;
-+ const int total = btns.size();
-+
-+ int i = 0;
-+ painter->save();
-+ painter->setRenderHint(QPainter::Antialiasing);
-+ for (const auto &btn : std::as_const(btns)) {
-+ painter->setPen(Qt::NoPen);
-+ const QRect &rect = btn.first;
-+
-+ QRect buttonRect(x, y, rect.width(), rect.height());
-+
-+ // draw rounded rect shadow
-+ auto shadowRect = buttonRect.translated(0, 1);
-+ painter->setBrush(option.palette.shadow());
-+ painter->drawRoundedRect(shadowRect, 3.0, 3.0);
-+
-+ // draw rounded rect itself
-+ painter->setBrush(option.palette.button());
-+ painter->drawRoundedRect(buttonRect, 3.0, 3.0);
-+
-+ // draw text inside rounded rect
-+ painter->setPen(option.palette.buttonText().color());
-+ painter->drawText(buttonRect, Qt::AlignCenter, btn.second);
-+
-+ // draw '+'
-+ if (i + 1 < total) {
-+ x += rect.width() + hMargin;
-+ painter->drawText(QPoint(x, plusY + (rect.height() / 2)), QStringLiteral("+"));
-+ x += plusRect.width() + hMargin;
- }
-+ i++;
- }
-
- painter->restore();
- }
-+
-+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
-+ {
-+ if (index.isValid() && index.column() == KCommandBarModel::Column_Shortcut) {
-+ QString shortcut = index.data().toString();
-+ if (!shortcut.isEmpty()) {
-+ const int hMargin = horizontalMargin(option);
-+ const int width = shortcutDrawingWidth(option, shortcut, hMargin) + 2 * hMargin;
-+
-+ return QSize(width, 0);
-+ }
-+ }
-+
-+ return QStyledItemDelegate::sizeHint(option, index);
-+ }
-+
-+ int horizontalMargin(const QStyleOptionViewItem &option) const
-+ {
-+ return option.widget->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, &option) + 2;
-+ }
- };
-
- // BEGIN KCommandBarPrivate
-@@ -410,9 +440,6 @@ void KCommandBarPrivate::updateViewGeometry(KCommandBar *q)
-
- const QSize viewMaxSize(centralSize.width() / 2.4, centralSize.height() / 2);
-
-- // First column occupies 60% of the width
-- m_treeView.setColumnWidth(0, viewMaxSize.width() * 0.6);
--
- // Position should be central over window
- const int xPos = std::max(0, (centralSize.width() - viewMaxSize.width()) / 2);
- const int yPos = std::max(0, (centralSize.height() - viewMaxSize.height()) * 1 / 4);
-@@ -505,8 +532,8 @@ KCommandBar::KCommandBar(QWidget *parent)
-
- CommandBarStyleDelegate *delegate = new CommandBarStyleDelegate(this);
- ShortcutStyleDelegate *del = new ShortcutStyleDelegate(this);
-- d->m_treeView.setItemDelegateForColumn(0, delegate);
-- d->m_treeView.setItemDelegateForColumn(1, del);
-+ d->m_treeView.setItemDelegateForColumn(KCommandBarModel::Column_Command, delegate);
-+ d->m_treeView.setItemDelegateForColumn(KCommandBarModel::Column_Shortcut, del);
-
- connect(&d->m_lineEdit, &QLineEdit::returnPressed, this, [this]() {
- d->slotReturnPressed(this);
-@@ -525,6 +552,11 @@ KCommandBar::KCommandBar(QWidget *parent)
- d->m_treeView.setSortingEnabled(true);
- d->m_treeView.setModel(&d->m_proxyModel);
-
-+ d->m_treeView.header()->setMinimumSectionSize(0);
-+ d->m_treeView.header()->setStretchLastSection(false);
-+ d->m_treeView.header()->setSectionResizeMode(KCommandBarModel::Column_Command, QHeaderView::Stretch);
-+ d->m_treeView.header()->setSectionResizeMode(KCommandBarModel::Column_Shortcut, QHeaderView::ResizeToContents);
-+
- d->m_treeView.installEventFilter(this);
- d->m_lineEdit.installEventFilter(this);
-
-diff --git a/src/kcommandbarmodel_p.cpp b/src/kcommandbarmodel_p.cpp
-index fee271c5..6a172c9c 100644
---- a/src/kcommandbarmodel_p.cpp
-+++ b/src/kcommandbarmodel_p.cpp
-@@ -69,12 +69,9 @@ void KCommandBarModel::refresh(const QVector<KCommandBar::ActionGroup> &actionGr
- QVector<Item> temp_rows;
- std::unordered_set<QAction *> uniqueActions;
- temp_rows.reserve(totalActions);
-- int actionGroupIdx = 0;
- for (const auto &ag : actionGroups) {
- const auto &agActions = ag.actions;
- fillRows(temp_rows, ag.name, agActions, uniqueActions);
--
-- actionGroupIdx++;
- }
-
- /**
-@@ -117,22 +114,16 @@ QVariant KCommandBarModel::data(const QModelIndex &index, int role) const
-
- switch (role) {
- case Qt::DisplayRole:
-- if (col == 0) {
-+ if (col == Column_Command) {
- return entry.displayName();
-- } else {
-- return entry.action->shortcut().toString();
- }
-+ Q_ASSERT(col == Column_Shortcut);
-+ return entry.action->shortcut().toString();
- case Qt::DecorationRole:
-- if (col == 0) {
-+ if (col == Column_Command) {
- return entry.action->icon();
- }
- break;
-- case Qt::TextAlignmentRole:
-- if (col == 0) {
-- return Qt::AlignLeft;
-- } else {
-- return Qt::AlignRight;
-- }
- case Qt::ToolTipRole: {
- QString toolTip = entry.displayName();
- if (!entry.action->shortcut().isEmpty()) {
-diff --git a/src/kcommandbarmodel_p.h b/src/kcommandbarmodel_p.h
-index 29a0249c..af547104 100644
---- a/src/kcommandbarmodel_p.h
-+++ b/src/kcommandbarmodel_p.h
-@@ -29,6 +29,13 @@ public:
-
- enum Role { Score = Qt::UserRole + 1 };
-
-+ enum Column
-+ {
-+ Column_Command,
-+ Column_Shortcut,
-+ Column_Count
-+ };
-+
- /**
- * Resets the model
- *
-@@ -48,7 +55,7 @@ public:
- int columnCount(const QModelIndex &parent = QModelIndex()) const override
- {
- Q_UNUSED(parent);
-- return 2;
-+ return Column_Count;
- }
-
- /**
-diff --git a/tests/kcommandbartest.cpp b/tests/kcommandbartest.cpp
-index 46e1bc86..1c631bbb 100644
---- a/tests/kcommandbartest.cpp
-+++ b/tests/kcommandbartest.cpp
-@@ -103,6 +103,9 @@ public:
- for (; i < 2; ++i) {
- acts[1].actions.append(genAction(this, QStringLiteral("folder"), i));
- }
-+ acts[1].actions[0]->setShortcut(QStringLiteral("G"));
-+ acts[1].actions[1]->setCheckable(true);
-+ acts[1].actions[1]->setShortcut(QStringLiteral("Ctrl++"));
-
- acts[2].name = QStringLiteral("Second Menu Group - Disabled acts");
- for (; i < 4; ++i) {
-@@ -116,6 +119,8 @@ public:
- for (; i < 6; ++i) {
- acts[3].actions.append(genAction(this, QStringLiteral("security-low"), i, Qt::CTRL | Qt::ALT));
- }
-+ acts[3].actions[0]->setCheckable(true);
-+ acts[3].actions[0]->setShortcut(QStringLiteral("Ctrl+,, Ctrl++, Ctrl+K"));
-
- return acts;
- }
-@@ -128,10 +133,14 @@ public:
- acts[0].name = QStringLiteral("مینو گروپ");
- acts[0].actions = {new QAction(QIcon::fromTheme("folder"), QStringLiteral("یہ فولڈر ایکشن ہے"), this),
- new QAction(QIcon::fromTheme("folder"), QStringLiteral("یہ ایک اور فولڈر ایکشن ہے"), this)};
-+ acts[0].actions[1]->setCheckable(true);
-+ acts[0].actions[1]->setShortcut(QStringLiteral("Ctrl+Shift++"));
-
- acts[1].name = QStringLiteral("گروپ");
- acts[1].actions = {new QAction(QIcon::fromTheme("zoom-out"), QStringLiteral("یہ فولڈر ایکشن ہے"), this),
- new QAction(QIcon::fromTheme("security-low"), QStringLiteral("یہ ایک اور فولڈر ایکشن ہے"), this)};
-+ acts[1].actions[1]->setCheckable(true);
-+ acts[1].actions[1]->setShortcut(QStringLiteral("Ctrl+-"));
-
- return acts;
- }
---
-GitLab
-
diff --git a/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-hamburger-menu-no-window-on-wayland.patch b/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-hamburger-menu-no-window-on-wayland.patch
deleted file mode 100644
index 8cf60aeb7594..000000000000
--- a/kde-frameworks/kconfigwidgets/files/kconfigwidgets-5.88.0-hamburger-menu-no-window-on-wayland.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 82c40f18709484fd462643aa113a8ccf961b646a Mon Sep 17 00:00:00 2001
-From: Felix Ernst <fe.a.ernst@gmail.com>
-Date: Tue, 26 Oct 2021 17:28:09 +0200
-Subject: [PATCH] Fix hamburger menu opening as a window on Wayland
-
-Before this commit, if an app window is unfocused and the first
-click on the window is the hamburger menu button, the menu would
-appear displaced as a separate window on Wayland.
-
-This commit fixes this by setting a sane transientParent for the
-menu. This is slightly difficult because there can be any number
-of hamburger buttons in any number of different windows so we need
-to figure out spontaneously which button was pressed to open the
-menu.
-
-BUG: 442375
----
- src/khamburgermenuhelpers.cpp | 26 ++++++++++++++++++++++++--
- src/khamburgermenuhelpers_p.h | 2 +-
- 2 files changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/src/khamburgermenuhelpers.cpp b/src/khamburgermenuhelpers.cpp
-index 88242aa5..d1ae2835 100644
---- a/src/khamburgermenuhelpers.cpp
-+++ b/src/khamburgermenuhelpers.cpp
-@@ -10,7 +10,10 @@
- #include "khamburgermenu.h"
-
- #include <QEvent>
-+#include <QMenu>
-+#include <QToolButton>
- #include <QWidget>
-+#include <QWindow>
-
- ListenerContainer::ListenerContainer(KHamburgerMenuPrivate *hamburgerMenuPrivate)
- : QObject{hamburgerMenuPrivate},
-@@ -28,13 +31,32 @@ bool AddOrRemoveActionListener::eventFilter(QObject * /*watched*/, QEvent *event
- return false;
- }
-
--bool ButtonPressListener::eventFilter(QObject * /*watched*/, QEvent *event)
-+bool ButtonPressListener::eventFilter(QObject *watched, QEvent *event)
- {
- if (event->type() == QEvent::KeyPress || event->type() == QEvent::MouseButtonPress) {
- auto hamburgerMenuPrivate = static_cast<KHamburgerMenuPrivate *>(parent());
- auto q = static_cast<KHamburgerMenu *>(hamburgerMenuPrivate->q_ptr);
- Q_EMIT q->aboutToShowMenu();
-- hamburgerMenuPrivate->resetMenu();
-+ hamburgerMenuPrivate->resetMenu(); // This menu never has a parent which can be
-+ // problematic because it can lead to situations in which the QMenu itself is
-+ // treated like its own window.
-+ // To avoid this we set a sane transientParent() now even if it already has one
-+ // because the menu might be opened from another window this time.
-+ const auto watchedButton = qobject_cast<QToolButton *>(watched);
-+ if (!watchedButton) {
-+ return false;
-+ }
-+ auto menu = watchedButton->menu();
-+ if (!menu) {
-+ return false;
-+ }
-+ menu->winId(); // trigger being a native widget already, to ensure windowHandle created
-+ // generic code if not known if the available parent widget is a native widget or not
-+ auto parentWindowHandle = watchedButton->windowHandle();
-+ if (!parentWindowHandle) {
-+ parentWindowHandle = watchedButton->nativeParentWidget()->windowHandle();
-+ }
-+ menu->windowHandle()->setTransientParent(parentWindowHandle);
- }
- return false;
- }
-diff --git a/src/khamburgermenuhelpers_p.h b/src/khamburgermenuhelpers_p.h
-index f0d98790..4993ee61 100644
---- a/src/khamburgermenuhelpers_p.h
-+++ b/src/khamburgermenuhelpers_p.h
-@@ -80,7 +80,7 @@ class ButtonPressListener : public QObject
- protected:
- inline ButtonPressListener(QObject *parent) : QObject{parent} { };
-
-- bool eventFilter(QObject * /*watched*/, QEvent *event) override;
-+ bool eventFilter(QObject *watched, QEvent *event) override;
-
- friend class ListenerContainer;
- };
---
-GitLab
-
diff --git a/kde-frameworks/kconfigwidgets/kconfigwidgets-5.88.0-r1.ebuild b/kde-frameworks/kconfigwidgets/kconfigwidgets-5.88.0-r1.ebuild
deleted file mode 100644
index 7d172fd46987..000000000000
--- a/kde-frameworks/kconfigwidgets/kconfigwidgets-5.88.0-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_DESIGNERPLUGIN="true"
-PVCUT=$(ver_cut 1-2)
-QTMIN=5.15.2
-VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
-
-DESCRIPTION="Framework providing an assortment of configuration-related widgets"
-LICENSE="LGPL-2+"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
-IUSE="+man"
-
-BDEPEND="
- man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )
-"
-DEPEND="
- >=dev-qt/qtdbus-${QTMIN}:5
- >=dev-qt/qtgui-${QTMIN}:5
- >=dev-qt/qtwidgets-${QTMIN}:5
- =kde-frameworks/kauth-${PVCUT}*:5
- =kde-frameworks/kcodecs-${PVCUT}*:5
- =kde-frameworks/kconfig-${PVCUT}*:5
- =kde-frameworks/kcoreaddons-${PVCUT}*:5
- =kde-frameworks/kguiaddons-${PVCUT}*:5
- =kde-frameworks/ki18n-${PVCUT}*:5
- =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${P}-hamburger-menu-no-window-on-wayland.patch
- "${FILESDIR}"/${P}-KCommandBar-alignment.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_PythonModuleGeneration=ON # bug 746866
- $(cmake_use_find_package man KF5DocTools)
- )
-
- ecm_src_configure
-}