summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-07-18 20:32:12 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-07-18 20:46:35 +0200
commit8eca89a494294f5923ff4c62e1d2723ea02998dc (patch)
tree478ff262396a94f4a5f9ae44a0eeb913fd1e300b /kde-frameworks
parentkde-frameworks/ktexteditor: Drop 5.46.0 (r0) (diff)
downloadgentoo-8eca89a494294f5923ff4c62e1d2723ea02998dc.tar.gz
gentoo-8eca89a494294f5923ff4c62e1d2723ea02998dc.tar.bz2
gentoo-8eca89a494294f5923ff4c62e1d2723ea02998dc.zip
kde-frameworks/kxmlgui: KMainWindow saving incorrect widget settings
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=395988 See also: https://phabricator.kde.org/D13808 Package-Manager: Portage-2.3.43, Repoman-2.3.10
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/kxmlgui/files/kxmlgui-5.48.0-kmainwindow.patch32
-rw-r--r--kde-frameworks/kxmlgui/kxmlgui-5.48.0-r1.ebuild54
2 files changed, 86 insertions, 0 deletions
diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.48.0-kmainwindow.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.48.0-kmainwindow.patch
new file mode 100644
index 000000000000..ffc62a676d55
--- /dev/null
+++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.48.0-kmainwindow.patch
@@ -0,0 +1,32 @@
+From d35a88289513c0420863b80aa6c1cb7d2c6e978f Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <max@scarlettvisionmedia.com>
+Date: Tue, 17 Jul 2018 09:45:30 +0200
+Subject: Fix KMainWindow saving incorrect widget settings
+
+BUG: 395988
+In certain cases KMainWindow::saveMainWindowSettings() could have been
+called after mainwindow started destroying itself. Window settings would
+be saved with incorrect child widget states. e.g. some widgets would be
+saved as hidden even if they were visible before destroying.
+---
+ src/kmainwindow.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/kmainwindow.cpp b/src/kmainwindow.cpp
+index 810bf32..885ac60 100644
+--- a/src/kmainwindow.cpp
++++ b/src/kmainwindow.cpp
+@@ -524,6 +524,10 @@ void KMainWindow::closeEvent(QCloseEvent *e)
+ }
+
+ if (queryClose()) {
++ // widgets will start destroying themselves at this point and we don't
++ // want to save state anymore after this as it might be incorrect
++ d->autoSaveSettings = false;
++ d->letDirtySettings = false;
+ e->accept();
+ } else {
+ e->ignore(); //if the window should not be closed, don't close it
+--
+cgit v0.11.2
+
diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.48.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.48.0-r1.ebuild
new file mode 100644
index 000000000000..1bf6dd9dd26d
--- /dev/null
+++ b/kde-frameworks/kxmlgui/kxmlgui-5.48.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework for managing menu and toolbar actions in an abstract way"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+LICENSE="LGPL-2+"
+IUSE="attica"
+
+# slot op: includes QtCore/private/qlocale_p.h
+RDEPEND="
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kglobalaccel)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_qt_dep qtcore '' '' '5=')
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork 'ssl')
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ attica? ( $(add_frameworks_dep attica) )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-kmainwindow.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package attica KF5Attica)
+ )
+
+ kde5_src_configure
+}
+
+src_test() {
+ # Files are missing; whatever. Bug: 650290
+ local myctestargs=(
+ -E "(kxmlgui_unittest)"
+ )
+
+ kde5_src_test
+}