public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
@ 2018-07-18 18:46 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2018-07-18 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     8eca89a494294f5923ff4c62e1d2723ea02998dc
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 18 18:32:12 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jul 18 18:46:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8eca89a4

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

 .../kxmlgui/files/kxmlgui-5.48.0-kmainwindow.patch | 32 +++++++++++++
 kde-frameworks/kxmlgui/kxmlgui-5.48.0-r1.ebuild    | 54 ++++++++++++++++++++++
 2 files changed, 86 insertions(+)

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 00000000000..ffc62a676d5
--- /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 00000000000..1bf6dd9dd26
--- /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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
@ 2020-09-29 12:49 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2020-09-29 12:49 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
@ 2021-04-11 14:23 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2021-04-11 14:23 UTC (permalink / raw
  To: gentoo-commits

commit:     34899caec5ebadf4fcf15a67e1c6e9e310937749
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  6 12:14:14 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 14:23:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34899cae

kde-frameworks/kxmlgui: drop 5.77.0*

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-frameworks/kxmlgui/Manifest                    |  1 -
 .../files/kxmlgui-5.77.0-fix-key-recording.patch   | 29 -----------
 .../files/kxmlgui-5.77.0-no-kwindowsystem.patch    | 40 ---------------
 kde-frameworks/kxmlgui/kxmlgui-5.77.0-r1.ebuild    | 58 ----------------------
 4 files changed, 128 deletions(-)

diff --git a/kde-frameworks/kxmlgui/Manifest b/kde-frameworks/kxmlgui/Manifest
index 8bfd38bc40f..7d72a4f7fad 100644
--- a/kde-frameworks/kxmlgui/Manifest
+++ b/kde-frameworks/kxmlgui/Manifest
@@ -1,3 +1,2 @@
-DIST kxmlgui-5.77.0.tar.xz 860548 BLAKE2B c862dd9524698c5fc3f83933a20b229ad8b52c94b3b5a703f64518bd4e13543f46bfa2dcf85ed21a0d19c0d72e9efafe412f6cbf6698c14e4827ad4f38da6afa SHA512 bd0e9f0b41927f6e90b71328f5e680a9d83a9c9f502edefc78f898fcab6be3cf553409b63e117c80cc8541b7a48ceb66de49fbcc6e7c8afc33a0d9fd901512b0
 DIST kxmlgui-5.80.0.tar.xz 861784 BLAKE2B e2a3673594806100e416206cf108fe1cab5c0647f2b68eede7608dc0fb886852587f4e6aed8d25f7ccd97fcbe5eaf9ad313a52a36ace5eace7f6a0df0fb7ac82 SHA512 ae19b33329c3c371d1cc94c83ebdae5f02b95e0e3562fed915a4f7185c7d9c639b0a0d8afaef8cb06598d1c44c48595b3f7d7a0a10c8a0c555a8d5d923361a16
 DIST kxmlgui-5.81.0.tar.xz 862492 BLAKE2B f9ba5ae603986a53f3f8675a56018d5ffe75be9df936f0d410145ebb1ab6958d9c2b9ab53fab7de4e662a634ed7978753706c33ac23f892fa900f10b4af7d7af SHA512 950c03601b6ab0f83d79d3fd958ec050d98779619143ef4969213e9ead016cf8c6693ee4da5136533c9793ab73336a1c49678b189028e3fab140fc69ff166dd8

diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch
deleted file mode 100644
index ae1269ac667..00000000000
--- a/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-fix-key-recording.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1bd9ac05b0eed3582937829150b31ea48fd95bb0 Mon Sep 17 00:00:00 2001
-From: Weng Xuetian <wengxt@gmail.com>
-Date: Thu, 17 Dec 2020 11:12:40 -0800
-Subject: [PATCH] Fix key recording by setWindow before capture starts.
-
-It is common that during the construction of widget, it is not yet added to
-a window. Thus windowHandle will simply return null in this case. Always set
-the window to before the capture starts.
-
-BUG: 430388
----
- src/kkeysequencewidget.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/kkeysequencewidget.cpp b/src/kkeysequencewidget.cpp
-index a51c6cc..c1f5c42 100644
---- a/src/kkeysequencewidget.cpp
-+++ b/src/kkeysequencewidget.cpp
-@@ -493,6 +493,7 @@ void KKeySequenceWidget::setCheckActionCollections(const QList<KActionCollection
- //slot
- void KKeySequenceWidget::captureKeySequence()
- {
-+    d->recorder->setWindow(window()->windowHandle());
-     d->recorder->startRecording();
- }
- 
--- 
-GitLab
-

diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-no-kwindowsystem.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-no-kwindowsystem.patch
deleted file mode 100644
index ba7c45eb6a0..00000000000
--- a/kde-frameworks/kxmlgui/files/kxmlgui-5.77.0-no-kwindowsystem.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From ffd68935c2ef48fc60cbbb1b4159d49a018e597b Mon Sep 17 00:00:00 2001
-From: Nicolas Fella <nicolas.fella@gmx.de>
-Date: Thu, 10 Dec 2020 17:22:21 +0100
-Subject: [PATCH] Remove unused KWindowSystem dependency
-
-Since
-https://invent.kde.org/frameworks/kxmlgui/-/commit/28a80aba1463b83ea8845ff22566a2110c8fb041
-it's not needed any more
----
- CMakeLists.txt     | 1 -
- src/CMakeLists.txt | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a7ffac4..0e516c5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -54,7 +54,6 @@ find_package(KF5GuiAddons ${KF5_DEP_VERSION} REQUIRED)
- find_package(KF5I18n ${KF5_DEP_VERSION} REQUIRED)
- find_package(KF5IconThemes ${KF5_DEP_VERSION} REQUIRED)
- find_package(KF5WidgetsAddons ${KF5_DEP_VERSION} REQUIRED)
--find_package(KF5WindowSystem ${KF5_DEP_VERSION} REQUIRED)
- find_package(KF5Attica ${KF5_DEP_VERSION})
- set_package_properties(KF5Attica PROPERTIES DESCRIPTION "A Qt library that implements the Open Collaboration Services API"
-                        PURPOSE "Support for Get Hot New Stuff in KXMLGUI"
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index e965d8d..3875a6b 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -110,7 +110,6 @@ PRIVATE
-     KF5::ItemViews           #KWidgetItemDelegate in KAboutApplicationPersonListDelegate
-     KF5::I18n                #i18n and i18nc in many places
-     KF5::IconThemes         #KIconLoader and KIconThemes in KToolBar
--    KF5::WindowSystem       #KKeyServer in kkeysequencewidget
-     ${XMLGUI_EXTRA_LIBS}
- )
- if (TARGET Qt5::DBus)
--- 
-GitLab
-

diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.77.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.77.0-r1.ebuild
deleted file mode 100644
index fe6e58394fc..00000000000
--- a/kde-frameworks/kxmlgui/kxmlgui-5.77.0-r1.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2021 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.15.1
-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/kguiaddons-${PVCUT}*:5
-	=kde-frameworks/ki18n-${PVCUT}*:5
-	=kde-frameworks/kiconthemes-${PVCUT}*:5
-	=kde-frameworks/kitemviews-${PVCUT}*:5
-	=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-no-kwindowsystem.patch
-	"${FILESDIR}"/${P}-fix-key-recording.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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kxmlgui/, kde-frameworks/kxmlgui/files/
@ 2023-10-03 15:29 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-10-03 15:29 UTC (permalink / raw
  To: gentoo-commits

commit:     84f85d1105409ac7cd5119e9ff7a47b91c2cb172
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  3 15:28:54 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  3 15:29:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84f85d11

kde-frameworks/kxmlgui: fix XML merging (shortcut scheme handling)

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=475016
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/kxmlgui-5.111.0-fix-xml-merging.patch    | 156 +++++++++++++++++++++
 kde-frameworks/kxmlgui/kxmlgui-5.110.0-r1.ebuild   |  49 +++++++
 2 files changed, 205 insertions(+)

diff --git a/kde-frameworks/kxmlgui/files/kxmlgui-5.111.0-fix-xml-merging.patch b/kde-frameworks/kxmlgui/files/kxmlgui-5.111.0-fix-xml-merging.patch
new file mode 100644
index 000000000000..013fbab9d1c7
--- /dev/null
+++ b/kde-frameworks/kxmlgui/files/kxmlgui-5.111.0-fix-xml-merging.patch
@@ -0,0 +1,156 @@
+https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/190
+https://bugs.kde.org/show_bug.cgi?id=475016
+
+From f015fa6006d2e2eea2d2aac11c18219b255722ef Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Fri, 29 Sep 2023 20:01:49 +0200
+Subject: [PATCH] Fix merging of XMLs with multiple ActionProperties tags
+
+BUG: 475016
+--- a/autotests/kxmlgui_unittest.cpp
++++ b/autotests/kxmlgui_unittest.cpp
+@@ -88,6 +88,26 @@ static void createXmlFile(QFile &file, int version, int flags, const QByteArray
+     file.write("</" + toplevelTag + ">\n");
+ }
+ 
++class ShortcutSchemeHandler
++{
++public:
++    ShortcutSchemeHandler(const QString &scheme)
++        : cgScheme(KSharedConfig::openConfig(), "Shortcut Schemes")
++        , prevScheme(cgScheme.readEntry("Current Scheme", QStringLiteral("Default")))
++    {
++        cgScheme.writeEntry("Current Scheme", scheme);
++    }
++
++    ~ShortcutSchemeHandler()
++    {
++        cgScheme.writeEntry("Current Scheme", prevScheme);
++    }
++
++private:
++    KConfigGroup cgScheme;
++    const QString prevScheme;
++};
++
+ static void clickApply(KEditToolBar *dialog)
+ {
+     QDialogButtonBox *box = dialog->findChild<QDialogButtonBox *>();
+@@ -106,6 +126,15 @@ void KXmlGui_UnitTest::initTestCase()
+         QFile::remove(configFile);
+         KSharedConfig::openConfig()->reparseConfiguration();
+     }
++
++    // Create "Test" shortcut scheme to eliminate the KF warning
++    QFile testScheme = QFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
++        + QLatin1String("/%1/shortcuts/%2").arg(QCoreApplication::applicationName(), QStringLiteral("Test")));
++    if (!testScheme.exists()) {
++        QVERIFY(QFileInfo(testScheme).dir().mkpath(QStringLiteral(".")));
++        QVERIFY(testScheme.open(QIODevice::WriteOnly));
++        testScheme.write(QByteArray("<gui><ActionProperties/></gui>"));
++    }
+ }
+ 
+ void KXmlGui_UnitTest::testFindVersionNumber_data()
+@@ -457,6 +486,56 @@ void KXmlGui_UnitTest::testPartMerging()
+     factory.removeClient(&hostClient);
+ }
+ 
++void KXmlGui_UnitTest::testShortcutSchemeMerging()
++{
++    TestGuiClient client;
++
++    ShortcutSchemeHandler sss(QStringLiteral("Test"));
++
++    KActionCollection *ac = client.actionCollection();
++
++    QAction *a = ac->addAction(QStringLiteral("test_action"));
++    ac->setDefaultShortcut(a, QKeySequence(QStringLiteral("Ctrl+A")));
++
++    const QByteArray appXml = R"(<?xml version = "1.0"?>
++<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
++<kpartgui name="foo" version="5">
++<MenuBar>
++  <Menu name="file"><text>&amp;File</text>
++    <Action name="test_action" />
++  </Menu>
++</MenuBar></kpartgui>
++)";
++    client.createGUI(appXml, false);
++
++    const QByteArray settingsXml = R"(<!DOCTYPE kpartgui SYSTEM 'kpartgui.dtd'>
++<kpartgui name="foo" version="1">
++ <MenuBar>
++  <Menu name="file">
++   <text>&amp;File</text>
++   <Action name="test_action" />
++  </Menu>
++ </MenuBar>
++ <ActionProperties scheme="Default">
++  <Action name="test_action" shortcut="Ctrl+B"/>
++ </ActionProperties>
++ <ActionProperties scheme="Test">
++  <Action name="test_action" shortcut="Ctrl+C"/>
++ </ActionProperties>
++</kpartgui>
++)";
++    client.mergeXML(settingsXml);
++
++    KMainWindow mainWindow;
++    KXMLGUIBuilder builder(&mainWindow);
++    KXMLGUIFactory factory(&builder);
++    factory.addClient(&client);
++
++    QCOMPARE(a->shortcut(), QKeySequence(QStringLiteral("Ctrl+C")));
++
++    factory.removeClient(&client);
++}
++
+ void KXmlGui_UnitTest::testPartMergingSettings() // #252911
+ {
+     const QByteArray hostXml =
+--- a/autotests/kxmlgui_unittest.h
++++ b/autotests/kxmlgui_unittest.h
+@@ -23,6 +23,7 @@ private Q_SLOTS:
+     void testVersionHandlerNewVersionUserChanges();
+     void testPartMerging();
+     void testPartMergingSettings();
++    void testShortcutSchemeMerging();
+     void testUiStandardsMerging_data();
+     void testUiStandardsMerging();
+     void testActionListAndSeparator();
+--- a/autotests/testguiclient.h
++++ b/autotests/testguiclient.h
+@@ -42,6 +42,10 @@ public:
+ 
+         setXML(QString::fromLatin1(xml), true);
+     }
++    void mergeXML(const QByteArray &xml)
++    {
++        setXML(QString::fromLatin1(xml), true);
++    }
+     void createActions(const QStringList &actionNames)
+     {
+         KActionCollection *coll = actionCollection();
+--- a/src/kxmlguiclient.cpp
++++ b/src/kxmlguiclient.cpp
+@@ -587,6 +587,8 @@ bool KXMLGUIClientPrivate::isEmptyContainer(const QDomElement &base, KActionColl
+ 
+ QDomElement KXMLGUIClientPrivate::findMatchingElement(const QDomElement &base, const QDomElement &additive)
+ {
++    const QString idAttribute(base.tagName() == QLatin1String("ActionProperties") ? QStringLiteral("scheme") : QStringLiteral("name"));
++
+     QDomNode n = additive.firstChild();
+     while (!n.isNull()) {
+         QDomElement e = n.toElement();
+@@ -604,7 +606,7 @@ QDomElement KXMLGUIClientPrivate::findMatchingElement(const QDomElement &base, c
+ 
+         // now see if our tags are equivalent
+         if (equalstr(tag, base.tagName()) //
+-            && e.attribute(QStringLiteral("name")) == base.attribute(QStringLiteral("name"))) {
++            && e.attribute(idAttribute) == base.attribute(idAttribute)) {
+             return e;
+         }
+     }
+-- 
+GitLab

diff --git a/kde-frameworks/kxmlgui/kxmlgui-5.110.0-r1.ebuild b/kde-frameworks/kxmlgui/kxmlgui-5.110.0-r1.ebuild
new file mode 100644
index 000000000000..e891a27f3694
--- /dev/null
+++ b/kde-frameworks/kxmlgui/kxmlgui-5.110.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_DESIGNERPLUGIN="true"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.9
+inherit ecm frameworks.kde.org
+
+DESCRIPTION="Framework for managing menu and toolbar actions in an abstract way"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~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/kguiaddons-${PVCUT}*:5
+	=kde-frameworks/ki18n-${PVCUT}*:5
+	=kde-frameworks/kiconthemes-${PVCUT}*:5
+	=kde-frameworks/kitemviews-${PVCUT}*:5
+	=kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-5.111.0-fix-xml-merging.patch
+)
+
+src_test() {
+	# Files are missing; whatever. Bugs 650290, 668198, 808216
+	local myctestargs=(
+		-E "(ktoolbar_unittest|kxmlgui_unittest|ktooltiphelper_unittest)"
+	)
+
+	ecm_src_test
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-03 15:29 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox