mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 10:17:08 -08:00
kde-plasma/kscreen: kcm: Fix wrong settings shown when reverting changes
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=490586 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From 50a3ee595f5f5c6cebed220b79f13483f3ecad97 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Beard <olib141@outlook.com>
|
||||
Date: Fri, 4 Apr 2025 12:51:04 +0000
|
||||
Subject: [PATCH] kcm: Fix wrong settings shown when reverting changes When
|
||||
reverting display changes, due to model changes, the StackLayout's
|
||||
currentIndex is changed by the stackLayout. This is a behaviour added in Qt
|
||||
6.5, and requires working around to ensure we keep it the same as
|
||||
selectedOutput.
|
||||
|
||||
BUG: 490586
|
||||
FIXED-IN: 6.3
|
||||
|
||||
|
||||
(cherry picked from commit 3e8ccda33895efe9311b5b5f1e142c6d608846da)
|
||||
|
||||
Co-authored-by: Oliver Beard <olib141@outlook.com>
|
||||
---
|
||||
kcm/ui/Panel.qml | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/kcm/ui/Panel.qml b/kcm/ui/Panel.qml
|
||||
index 799477a6f..1b9ebac72 100644
|
||||
--- a/kcm/ui/Panel.qml
|
||||
+++ b/kcm/ui/Panel.qml
|
||||
@@ -58,6 +58,12 @@ ColumnLayout {
|
||||
enabledOutputs: root.enabledOutputs
|
||||
onReorder: root.reorder()
|
||||
}
|
||||
+
|
||||
+ // "Since 6.5, inserting/removing a new Item at an index less than or equal to the current
|
||||
+ // index will increment/decrement the current index, but keep the current Item."
|
||||
+ // This causes BUG: 490586 and the following works around it:
|
||||
+ onItemAdded: panelView.currentIndex = Qt.binding(() => root.selectedOutput)
|
||||
+ onItemRemoved: panelView.currentIndex = Qt.binding(() => root.selectedOutput)
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_TEST="forceoptional"
|
||||
KFMIN=6.10.0
|
||||
QTMIN=6.8.1
|
||||
inherit ecm plasma.kde.org xdg
|
||||
|
||||
DESCRIPTION="KDE Plasma screen management"
|
||||
HOMEPAGE="https://invent.kde.org/plasma/kscreen"
|
||||
|
||||
LICENSE="GPL-2" # TODO: CHECK
|
||||
SLOT="6"
|
||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||
IUSE="X"
|
||||
|
||||
# bug #580440, last checked 5.6.3
|
||||
RESTRICT="test"
|
||||
|
||||
# qtbase slot op: GuiPrivate use in kded daemon
|
||||
DEPEND="
|
||||
>=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets]
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:6[widgets]
|
||||
>=dev-qt/qtsensors-${QTMIN}:6
|
||||
>=kde-frameworks/kcmutils-${KFMIN}:6
|
||||
>=kde-frameworks/kconfig-${KFMIN}:6
|
||||
>=kde-frameworks/kcoreaddons-${KFMIN}:6
|
||||
>=kde-frameworks/kdbusaddons-${KFMIN}:6
|
||||
>=kde-frameworks/kglobalaccel-${KFMIN}:6
|
||||
>=kde-frameworks/ki18n-${KFMIN}:6
|
||||
>=kde-frameworks/ksvg-${KFMIN}:6
|
||||
>=kde-frameworks/kwindowsystem-${KFMIN}:6
|
||||
>=kde-frameworks/kxmlgui-${KFMIN}:6
|
||||
>=kde-plasma/layer-shell-qt-${KDE_CATV}:6
|
||||
>=kde-plasma/libkscreen-${KDE_CATV}:6=
|
||||
>=kde-plasma/libplasma-${KDE_CATV}:6
|
||||
X? (
|
||||
>=dev-qt/qtbase-${QTMIN}:6=[X]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXi
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-qt/qt5compat-${QTMIN}:6[qml]
|
||||
"
|
||||
BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:6"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-kcm-fix-wrong-settings-after-revert.patch" ) # KDE-bug 490586, in 6.3.5
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_X11=$(usex X)
|
||||
)
|
||||
ecm_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user