From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1210582-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 8F959138359
	for <garchives@archives.gentoo.org>; Tue, 29 Sep 2020 12:49:33 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 71F82E088F;
	Tue, 29 Sep 2020 12:49:32 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 478CAE088D
	for <gentoo-commits@lists.gentoo.org>; Tue, 29 Sep 2020 12:49:32 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 13DC0340441
	for <gentoo-commits@lists.gentoo.org>; Tue, 29 Sep 2020 12:49:31 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 92615389
	for <gentoo-commits@lists.gentoo.org>; Tue, 29 Sep 2020 12:49:29 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1601383528.42f0c2565da241c89fbf0e7276718ebe41517400.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: kde-frameworks/kxmlgui/files/kxmlgui-5.74.0-fix-multiple-tabs-popup-on-logout.patch kde-frameworks/kxmlgui/kxmlgui-5.74.0-r1.ebuild
X-VCS-Directories: kde-frameworks/kxmlgui/ kde-frameworks/kxmlgui/files/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 42f0c2565da241c89fbf0e7276718ebe41517400
X-VCS-Branch: master
Date: Tue, 29 Sep 2020 12:49:29 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ac9a80d4-2d1e-448b-b421-20292d89cdae
X-Archives-Hash: a27e89da94394d668c9e11373c4d91d0

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
+}