1 |
commit: 42f0c2565da241c89fbf0e7276718ebe41517400 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 28 22:11:17 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 29 12:45:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42f0c256 |
7 |
|
8 |
kde-frameworks/kxmlgui: Fix "N open terminals/tabs" warning on logout |
9 |
|
10 |
Upstream commits: |
11 |
4bcf28f16938bfefacbe56ed53a4d3b3f00c4114 |
12 |
ab73c532cbcb16d9a3912670f021477dc25634fc |
13 |
|
14 |
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=416728 |
15 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
...-5.74.0-fix-multiple-tabs-popup-on-logout.patch | 68 ++++++++++++++++++++++ |
19 |
kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild | 55 +++++++++++++++++ |
20 |
2 files changed, 123 insertions(+) |
21 |
|
22 |
diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.74.0-fix-multiple-tabs-popup-on-logout.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.74.0-fix-multiple-tabs-popup-on-logout.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..f49999eb649 |
25 |
--- /dev/null |
26 |
+++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.74.0-fix-multiple-tabs-popup-on-logout.patch |
27 |
@@ -0,0 +1,68 @@ |
28 |
+From 7cefdcf3d04669978aa28481d8ea274402935374 Mon Sep 17 00:00:00 2001 |
29 |
+From: Allan Sandfeld Jensen <allan.jensen@××.io> |
30 |
+Date: Mon, 10 Aug 2020 09:54:14 +0200 |
31 |
+Subject: [PATCH] Handle double close in main window |
32 |
+ |
33 |
+After a bug fix in Qt 5.14 we now get real close events for unclosed windows |
34 |
+when the application closes, so we would be getting two close events breaking |
35 |
+our logic when when to suppress on-close dialogs. |
36 |
+ |
37 |
+Suppress the real close event after we have handled our own simulated one. Also |
38 |
+works if there is no real close event. |
39 |
+ |
40 |
+BUG: 416728 |
41 |
+ |
42 |
+* Fixup after git merged the wrong commit |
43 |
+--- |
44 |
+ src/kmainwindow.cpp | 8 ++++++++ |
45 |
+ src/kmainwindow_p.h | 1 + |
46 |
+ 2 files changed, 9 insertions(+) |
47 |
+ |
48 |
+diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp |
49 |
+index b9bc2b6..33babb9 100644 |
50 |
+--- a/src/kmainwindow.cpp |
51 |
++++ b/src/kmainwindow.cpp |
52 |
+@@ -269,6 +269,7 @@ void KMainWindowPrivate::init(KMainWindow *_q) |
53 |
+ letDirtySettings = true; |
54 |
+ |
55 |
+ sizeApplied = false; |
56 |
++ suppressCloseEvent = false; |
57 |
+ } |
58 |
+ |
59 |
+ static bool endsWithHashNumber(const QString &s) |
60 |
+@@ -532,6 +533,10 @@ void KMainWindow::appHelpActivated() |
61 |
+ void KMainWindow::closeEvent(QCloseEvent *e) |
62 |
+ { |
63 |
+ K_D(KMainWindow); |
64 |
++ if (d->suppressCloseEvent) { |
65 |
++ e->accept(); |
66 |
++ return; |
67 |
++ } |
68 |
+ |
69 |
+ // Save settings if auto-save is enabled, and settings have changed |
70 |
+ if (d->settingsTimer && d->settingsTimer->isActive()) { |
71 |
+@@ -556,6 +561,9 @@ void KMainWindow::closeEvent(QCloseEvent *e) |
72 |
+ } else { |
73 |
+ e->ignore(); //if the window should not be closed, don't close it |
74 |
+ } |
75 |
++ // If saving session, we are processing a fake close event, and might get the real one later. |
76 |
++ if (e->isAccepted() && qApp->isSavingSession()) |
77 |
++ d->suppressCloseEvent = true; |
78 |
+ } |
79 |
+ |
80 |
+ bool KMainWindow::queryClose() |
81 |
+diff --git a/src/kmainwindow_p.h b/src/kmainwindow_p.h |
82 |
+index 13f6f19..bdd1eb4 100644 |
83 |
+--- a/src/kmainwindow_p.h |
84 |
++++ b/src/kmainwindow_p.h |
85 |
+@@ -33,6 +33,7 @@ public: |
86 |
+ bool settingsDirty: 1; |
87 |
+ bool autoSaveWindowSize: 1; |
88 |
+ bool sizeApplied: 1; |
89 |
++ bool suppressCloseEvent: 1; |
90 |
+ KConfigGroup autoSaveGroup; |
91 |
+ QTimer *settingsTimer; |
92 |
+ QTimer *sizeTimer; |
93 |
+-- |
94 |
+2.28.0 |
95 |
+ |
96 |
|
97 |
diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild |
98 |
new file mode 100644 |
99 |
index 00000000000..04c5486ff73 |
100 |
--- /dev/null |
101 |
+++ b/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild |
102 |
@@ -0,0 +1,55 @@ |
103 |
+# Copyright 1999-2020 Gentoo Authors |
104 |
+# Distributed under the terms of the GNU General Public License v2 |
105 |
+ |
106 |
+EAPI=7 |
107 |
+ |
108 |
+ECM_DESIGNERPLUGIN="true" |
109 |
+PVCUT=$(ver_cut 1-2) |
110 |
+QTMIN=5.14.2 |
111 |
+VIRTUALX_REQUIRED="test" |
112 |
+inherit ecm kde.org |
113 |
+ |
114 |
+DESCRIPTION="Framework for managing menu and toolbar actions in an abstract way" |
115 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
116 |
+LICENSE="LGPL-2+" |
117 |
+IUSE="" |
118 |
+ |
119 |
+# slot op: includes QtCore/private/qlocale_p.h |
120 |
+DEPEND=" |
121 |
+ >=dev-qt/qtcore-${QTMIN}:5= |
122 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
123 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
124 |
+ >=dev-qt/qtnetwork-${QTMIN}:5[ssl] |
125 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
126 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
127 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
128 |
+ =kde-frameworks/kconfig-${PVCUT}*:5 |
129 |
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5 |
130 |
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5 |
131 |
+ =kde-frameworks/kglobalaccel-${PVCUT}*:5 |
132 |
+ =kde-frameworks/ki18n-${PVCUT}*:5 |
133 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
134 |
+ =kde-frameworks/kitemviews-${PVCUT}*:5 |
135 |
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5 |
136 |
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5 |
137 |
+" |
138 |
+RDEPEND="${DEPEND}" |
139 |
+ |
140 |
+PATCHES=( "${FILESDIR}"/${P}-fix-multiple-tabs-popup-on-logout.patch ) |
141 |
+ |
142 |
+src_configure() { |
143 |
+ local mycmakeargs=( |
144 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_KF5Attica=ON |
145 |
+ ) |
146 |
+ |
147 |
+ ecm_src_configure |
148 |
+} |
149 |
+ |
150 |
+src_test() { |
151 |
+ # Files are missing; whatever. Bugs 650290, 668198 |
152 |
+ local myctestargs=( |
153 |
+ -E "(ktoolbar_unittest|kxmlgui_unittest)" |
154 |
+ ) |
155 |
+ |
156 |
+ ecm_src_test |
157 |
+} |