public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
Date: Tue, 29 Sep 2020 12:49:29 +0000 (UTC)	[thread overview]
Message-ID: <1601383528.42f0c2565da241c89fbf0e7276718ebe41517400.asturm@gentoo> (raw)

commit:     42f0c2565da241c89fbf0e7276718ebe41517400
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 28 22:11:17 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 12:45:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42f0c256

kde-frameworks/kxmlgui: Fix "N open terminals/tabs" warning on logout

Upstream commits:
4bcf28f16938bfefacbe56ed53a4d3b3f00c4114
ab73c532cbcb16d9a3912670f021477dc25634fc

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=416728
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-5.74.0-fix-multiple-tabs-popup-on-logout.patch | 68 ++++++++++++++++++++++
 kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild    | 55 +++++++++++++++++
 2 files changed, 123 insertions(+)

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
new file mode 100644
index 00000000000..f49999eb649
--- /dev/null
+++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.74.0-fix-multiple-tabs-popup-on-logout.patch
@@ -0,0 +1,68 @@
+From 7cefdcf3d04669978aa28481d8ea274402935374 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@qt.io>
+Date: Mon, 10 Aug 2020 09:54:14 +0200
+Subject: [PATCH] Handle double close in main window
+
+After a bug fix in Qt 5.14 we now get real close events for unclosed windows
+when the application closes, so we would be getting two close events breaking
+our logic when when to suppress on-close dialogs.
+
+Suppress the real close event after we have handled our own simulated one. Also
+works if there is no real close event.
+
+BUG: 416728
+
+* Fixup after git merged the wrong commit
+---
+ src/kmainwindow.cpp | 8 ++++++++
+ src/kmainwindow_p.h | 1 +
+ 2 files changed, 9 insertions(+)
+
+diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp
+index b9bc2b6..33babb9 100644
+--- a/src/kmainwindow.cpp
++++ b/src/kmainwindow.cpp
+@@ -269,6 +269,7 @@ void KMainWindowPrivate::init(KMainWindow *_q)
+     letDirtySettings = true;
+ 
+     sizeApplied = false;
++    suppressCloseEvent = false;
+ }
+ 
+ static bool endsWithHashNumber(const QString &s)
+@@ -532,6 +533,10 @@ void KMainWindow::appHelpActivated()
+ void KMainWindow::closeEvent(QCloseEvent *e)
+ {
+     K_D(KMainWindow);
++    if (d->suppressCloseEvent) {
++        e->accept();
++        return;
++    }
+ 
+     // Save settings if auto-save is enabled, and settings have changed
+     if (d->settingsTimer && d->settingsTimer->isActive()) {
+@@ -556,6 +561,9 @@ void KMainWindow::closeEvent(QCloseEvent *e)
+     } else {
+         e->ignore();    //if the window should not be closed, don't close it
+     }
++    // If saving session, we are processing a fake close event, and might get the real one later.
++    if (e->isAccepted() && qApp->isSavingSession())
++        d->suppressCloseEvent = true;
+ }
+ 
+ bool KMainWindow::queryClose()
+diff --git a/src/kmainwindow_p.h b/src/kmainwindow_p.h
+index 13f6f19..bdd1eb4 100644
+--- a/src/kmainwindow_p.h
++++ b/src/kmainwindow_p.h
+@@ -33,6 +33,7 @@ public:
+     bool settingsDirty: 1;
+     bool autoSaveWindowSize: 1;
+     bool sizeApplied: 1;
++    bool suppressCloseEvent: 1;
+     KConfigGroup autoSaveGroup;
+     QTimer *settingsTimer;
+     QTimer *sizeTimer;
+-- 
+2.28.0
+

diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild
new file mode 100644
index 00000000000..04c5486ff73
--- /dev/null
+++ b/kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_DESIGNERPLUGIN="true"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.14.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework for managing menu and toolbar actions in an abstract way"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+LICENSE="LGPL-2+"
+IUSE=""
+
+# slot op: includes QtCore/private/qlocale_p.h
+DEPEND="
+	>=dev-qt/qtcore-${QTMIN}:5=
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtnetwork-${QTMIN}:5[ssl]
+	>=dev-qt/qtprintsupport-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	=kde-frameworks/kconfig-${PVCUT}*:5
+	=kde-frameworks/kconfigwidgets-${PVCUT}*:5
+	=kde-frameworks/kcoreaddons-${PVCUT}*:5
+	=kde-frameworks/kglobalaccel-${PVCUT}*:5
+	=kde-frameworks/ki18n-${PVCUT}*:5
+	=kde-frameworks/kiconthemes-${PVCUT}*:5
+	=kde-frameworks/kitemviews-${PVCUT}*:5
+	=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+	=kde-frameworks/kwindowsystem-${PVCUT}*:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-fix-multiple-tabs-popup-on-logout.patch )
+
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKE_DISABLE_FIND_PACKAGE_KF5Attica=ON
+	)
+
+	ecm_src_configure
+}
+
+src_test() {
+	# Files are missing; whatever. Bugs 650290, 668198
+	local myctestargs=(
+		-E "(ktoolbar_unittest|kxmlgui_unittest)"
+	)
+
+	ecm_src_test
+}


             reply	other threads:[~2020-09-29 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 12:49 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-03 15:29 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/ Sam James
2021-04-11 14:23 Andreas Sturmlechner
2018-07-18 18:46 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1601383528.42f0c2565da241c89fbf0e7276718ebe41517400.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox