1 |
commit: 46ebee1ecc827efdf49097f41fd812cc36f90ec9 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 30 15:33:33 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 30 16:09:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46ebee1e |
7 |
|
8 |
kde-frameworks/knewstuff: Fix QtQuickDialogWrapper dialog for konsole |
9 |
|
10 |
Upstream commit b634b65dd081746ccb8bdfa9bf2d878d13e2c0fb |
11 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=452593 |
12 |
|
13 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
...94.0-fix-QtQuickDialogWrapper-for-konsole.patch | 54 ++++++++++++++++++++++ |
17 |
.../knewstuff/knewstuff-5.94.0-r1.ebuild | 51 ++++++++++++++++++++ |
18 |
2 files changed, 105 insertions(+) |
19 |
|
20 |
diff --git a/kde-frameworks/knewstuff/files/knewstuff-5.94.0-fix-QtQuickDialogWrapper-for-konsole.patch b/kde-frameworks/knewstuff/files/knewstuff-5.94.0-fix-QtQuickDialogWrapper-for-konsole.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..002d4c182b28 |
23 |
--- /dev/null |
24 |
+++ b/kde-frameworks/knewstuff/files/knewstuff-5.94.0-fix-QtQuickDialogWrapper-for-konsole.patch |
25 |
@@ -0,0 +1,54 @@ |
26 |
+From b634b65dd081746ccb8bdfa9bf2d878d13e2c0fb Mon Sep 17 00:00:00 2001 |
27 |
+From: Alexander Lohnau <alexander.lohnau@×××.de> |
28 |
+Date: Tue, 24 May 2022 12:58:54 +0200 |
29 |
+Subject: [PATCH] Fix QtQuickDialogWrapper dialog not being usable in konsole |
30 |
+ |
31 |
+Patch provided by David Edmundson. |
32 |
+ |
33 |
+``` |
34 |
+Issue is QGuiApplicationPrivate::showModalWindow |
35 |
+ |
36 |
+it marks every other non-modal window as blocked, including new windows. |
37 |
+ |
38 |
+when we focus the new dialog at a wayland/X level Qt gets it, but in it's own internal dispatching ignores that and sends it to the modal window |
39 |
+ |
40 |
+Qt is smart enough to handle child windows appropriately, but only if it knows about them. Having a transient parent should take care of this. We should have this anyway as that will fix some window placement bugs. |
41 |
+``` |
42 |
+ |
43 |
+BUG: 452593 |
44 |
+--- |
45 |
+ src/qtquickdialogwrapper.cpp | 7 +++++++ |
46 |
+ 1 file changed, 7 insertions(+) |
47 |
+ |
48 |
+diff --git a/src/qtquickdialogwrapper.cpp b/src/qtquickdialogwrapper.cpp |
49 |
+index 4f22b650..e31e8d80 100644 |
50 |
+--- a/src/qtquickdialogwrapper.cpp |
51 |
++++ b/src/qtquickdialogwrapper.cpp |
52 |
+@@ -7,10 +7,12 @@ |
53 |
+ #include "qtquickdialogwrapper.h" |
54 |
+ |
55 |
+ #include <QEventLoop> |
56 |
++#include <QGuiApplication> |
57 |
+ #include <QQmlComponent> |
58 |
+ #include <QQmlContext> |
59 |
+ #include <QQmlEngine> |
60 |
+ #include <QTimer> |
61 |
++#include <QWindow> |
62 |
+ |
63 |
+ #include <KLocalizedContext> |
64 |
+ |
65 |
+@@ -70,6 +72,11 @@ QtQuickDialogWrapper::QtQuickDialogWrapper(const QString &configFile, QObject *p |
66 |
+ |
67 |
+ // Forward relevant signals |
68 |
+ connect(d->item, SIGNAL(closed()), this, SIGNAL(closed())); |
69 |
++ |
70 |
++ // Otherwise, the dialog is not in front of other popups, BUG: 452593 |
71 |
++ auto window = qobject_cast<QWindow *>(d->item); |
72 |
++ Q_ASSERT(window); |
73 |
++ window->setTransientParent(QGuiApplication::focusWindow()); |
74 |
+ } |
75 |
+ } |
76 |
+ |
77 |
+-- |
78 |
+GitLab |
79 |
+ |
80 |
|
81 |
diff --git a/kde-frameworks/knewstuff/knewstuff-5.94.0-r1.ebuild b/kde-frameworks/knewstuff/knewstuff-5.94.0-r1.ebuild |
82 |
new file mode 100644 |
83 |
index 000000000000..73336dd92ec0 |
84 |
--- /dev/null |
85 |
+++ b/kde-frameworks/knewstuff/knewstuff-5.94.0-r1.ebuild |
86 |
@@ -0,0 +1,51 @@ |
87 |
+# Copyright 1999-2022 Gentoo Authors |
88 |
+# Distributed under the terms of the GNU General Public License v2 |
89 |
+ |
90 |
+EAPI=8 |
91 |
+ |
92 |
+ECM_TEST="false" |
93 |
+PVCUT=$(ver_cut 1-2) |
94 |
+QTMIN=5.15.3 |
95 |
+inherit ecm kde.org |
96 |
+ |
97 |
+DESCRIPTION="Framework for downloading and sharing additional application data" |
98 |
+ |
99 |
+LICENSE="LGPL-2+" |
100 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
101 |
+IUSE="opds" |
102 |
+ |
103 |
+DEPEND=" |
104 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
105 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
106 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
107 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
108 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
109 |
+ =kde-frameworks/attica-${PVCUT}*:5 |
110 |
+ =kde-frameworks/karchive-${PVCUT}*:5 |
111 |
+ =kde-frameworks/kcompletion-${PVCUT}*:5 |
112 |
+ =kde-frameworks/kconfig-${PVCUT}*:5 |
113 |
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5 |
114 |
+ =kde-frameworks/ki18n-${PVCUT}*:5 |
115 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
116 |
+ =kde-frameworks/kio-${PVCUT}*:5 |
117 |
+ =kde-frameworks/kitemviews-${PVCUT}*:5 |
118 |
+ =kde-frameworks/kpackage-${PVCUT}*:5 |
119 |
+ =kde-frameworks/kservice-${PVCUT}*:5 |
120 |
+ =kde-frameworks/ktextwidgets-${PVCUT}*:5 |
121 |
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5 |
122 |
+ =kde-frameworks/kxmlgui-${PVCUT}*:5 |
123 |
+ opds? ( =kde-frameworks/syndication-${PVCUT}*:5 ) |
124 |
+" |
125 |
+RDEPEND="${DEPEND} |
126 |
+ >=kde-frameworks/kirigami-${PVCUT}:5 |
127 |
+" |
128 |
+ |
129 |
+PATCHES=( "${FILESDIR}/${P}-fix-QtQuickDialogWrapper-for-konsole.patch" ) # KDE-bug 452593 |
130 |
+ |
131 |
+src_configure() { |
132 |
+ local mycmakeargs=( |
133 |
+ $(cmake_use_find_package opds KF5Syndication) |
134 |
+ ) |
135 |
+ |
136 |
+ ecm_src_configure |
137 |
+} |