public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-systemmonitor/files/, kde-plasma/plasma-systemmonitor/
@ 2021-12-10 14:58 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-12-10 14:58 UTC (permalink / raw
  To: gentoo-commits

commit:     cd8fa8f4385208ebc2e4247feda460180a16fc96
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 10 14:56:24 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 14:58:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd8fa8f4

kde-plasma/plasma-systemmonitor: Fix Applications list after open/close

Upstream commits:
50f6378144ed244b9c1cd3e325ecbe45dd7544d4
b18f98fee76104d5be6b871dea330be32863ad27

KDE-BUG: https://bugs.kde.org/show_bug.cgi?id=445544
Package-Manager: Portage-3.0.29, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...pplications-add-comma-separated-filtering.patch | 36 +++++++++++
 ...ns-remove-unneeded-ProcessSortFilterModel.patch | 73 ++++++++++++++++++++++
 .../plasma-systemmonitor-5.23.4-r1.ebuild          | 48 ++++++++++++++
 3 files changed, 157 insertions(+)

diff --git a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch
new file mode 100644
index 000000000000..9257c8b4250f
--- /dev/null
+++ b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch
@@ -0,0 +1,36 @@
+From b18f98fee76104d5be6b871dea330be32863ad27 Mon Sep 17 00:00:00 2001
+From: David Redondo <kde@david-redondo.de>
+Date: Tue, 23 Nov 2021 10:52:11 +0100
+Subject: [PATCH] Add comma separated filtering to ApplicationsTableView
+
+Instead of using ProcessSortFilterModel we can implement in
+the callback of the KSortFilterProxyModel.
+
+
+(cherry picked from commit 364bada0ad5befd560758bad11190b1fd7043b34)
+---
+ .../contents/ui/ApplicationsTableView.qml                 | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
+index 3f3ed4f..1f2dd36 100644
+--- a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
++++ b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
+@@ -96,6 +96,14 @@ Table.BaseTableView {
+             }
+             return true
+         }
++        filterRowCallback: function(row, parent) {
++            if (filterString.length == 0) {
++                return true
++            }
++            const name = sourceModel.data(sourceModel.index(row, filterKeyColumn, parent), filterRole).toLowerCase()
++            const parts = filterString.toLowerCase().split(",").map(s => s.trim()).filter(s => s.length > 0)
++            return parts.some(part => name.includes(part))
++        }
+ 
+         sortRole: "Value"
+     }
+-- 
+GitLab
+

diff --git a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch
new file mode 100644
index 000000000000..17505ee73146
--- /dev/null
+++ b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch
@@ -0,0 +1,73 @@
+From 50f6378144ed244b9c1cd3e325ecbe45dd7544d4 Mon Sep 17 00:00:00 2001
+From: David Redondo <kde@david-redondo.de>
+Date: Mon, 22 Nov 2021 12:15:14 +0100
+Subject: [PATCH] ApplicationsTable: Remove unneeded ProcessSortFilterModel
+
+ProcessSortFilterModel handles filtering pids and to which user a process
+belongs over a normal QSortFilterProxyModel. In doing so it also
+sets the filterKeyColumn to nameColumn in findColumns(). Note that the name
+of the name columns of the process and application table is different
+("name" and "appName"), so the filterKeyColumn is also set by ApplicationTableView.
+However this is racey depending on when the binding is evaluated.
+Since we don't need the extra features of the ProcessSortFilterModel we can use
+the existing SortFilterProxyModel in charge of filtering columns (something that
+the ProcessSortFilterModel also did) to also handle the row filtering.
+BUG:445544
+FIXED-IN:5.23.4
+
+
+(cherry picked from commit a96bc99a3650c3bf2e48ab1287dc779dbba87c51)
+---
+ .../contents/ui/ApplicationsTableView.qml         | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
+index 38915b3..3f3ed4f 100644
+--- a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
++++ b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
+@@ -32,7 +32,7 @@ Table.BaseTableView {
+     property alias columnDisplay: displayModel.columnDisplay
+     property alias sourceModel: appModel
+ 
+-    property alias filterString: filterProxy.filterString
++    property alias filterString: sortColumnFilter.filterString
+ 
+     property var selectedApplications: {
+         var result = []
+@@ -83,8 +83,9 @@ Table.BaseTableView {
+     model: KItemModels.KSortFilterProxyModel {
+         id: sortColumnFilter
+ 
+-        sourceModel: filterProxy
+-
++        sourceModel: cacheModel
++        filterKeyColumn: appModel.nameColumn
++        filterCaseSensitivity: Qt.CaseInsensitive
+         filterColumnCallback: function(column, parent) {
+             // Note: This assumes displayModel column == appModel column
+             // This may not always hold, but we get incorrect results if we try to
+@@ -99,13 +100,6 @@ Table.BaseTableView {
+         sortRole: "Value"
+     }
+ 
+-    Table.ProcessSortFilterModel {
+-        id: filterProxy
+-        sourceModel: cacheModel
+-        filterKeyColumn: appModel.nameColumn
+-        filterCaseSensitivity: Qt.CaseInsensitive
+-    }
+-
+     Table.ComponentCacheProxyModel {
+         id: cacheModel
+         sourceModel: displayModel
+@@ -184,7 +178,6 @@ Table.BaseTableView {
+             Table.FirstCellDelegate {
+                 iconName: {
+                     var index = sortColumnFilter.mapToSource(sortColumnFilter.index(model.row, 0));
+-                    index = filterProxy.mapToSource(filterProxy.index(index.row, 0));
+                     index = appModel.index(index.row, appModel.iconColumn)
+                     return appModel.data(index)
+                     return ""
+-- 
+GitLab
+

diff --git a/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild b/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild
new file mode 100644
index 000000000000..2be62cb12ed3
--- /dev/null
+++ b/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PVCUT=$(ver_cut 1-3)
+KFMIN=5.86.0
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Monitor system sensors, process information and other system resources"
+HOMEPAGE="https://apps.kde.org/plasma-systemmonitor/"
+
+LICENSE="|| ( GPL-3 GPL-2 )"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+DEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kdbusaddons-${KFMIN}:5
+	>=kde-frameworks/kdeclarative-${KFMIN}:5
+	>=kde-frameworks/kglobalaccel-${KFMIN}:5
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-plasma/libksysguard-${PVCUT}:5
+"
+RDEPEND="${DEPEND}
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	>=kde-frameworks/kquickcharts-${KFMIN}:5
+	>=kde-plasma/ksystemstats-${PVCUT}:5
+"
+
+PATCHES=(
+	# 5.23 branch, KDE-bug 445544
+	"${FILESDIR}"/${P}-applications-remove-unneeded-ProcessSortFilterModel.patch
+	"${FILESDIR}"/${P}-applications-add-comma-separated-filtering.patch
+)


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

* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-systemmonitor/files/, kde-plasma/plasma-systemmonitor/
@ 2022-01-25  9:49 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2022-01-25  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     db00e252e6a9947ddf7c03d0713340d6e2a00383
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 19 08:41:29 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jan 25 09:43:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db00e252

kde-plasma/plasma-systemmonitor: drop 5.23.4*

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

 kde-plasma/plasma-systemmonitor/Manifest           |  1 -
 ...pplications-add-comma-separated-filtering.patch | 36 -----------
 ...ns-remove-unneeded-ProcessSortFilterModel.patch | 73 ----------------------
 .../plasma-systemmonitor-5.23.4-r1.ebuild          | 48 --------------
 4 files changed, 158 deletions(-)

diff --git a/kde-plasma/plasma-systemmonitor/Manifest b/kde-plasma/plasma-systemmonitor/Manifest
index a3a397836e84..6277f221f4ed 100644
--- a/kde-plasma/plasma-systemmonitor/Manifest
+++ b/kde-plasma/plasma-systemmonitor/Manifest
@@ -1,3 +1,2 @@
-DIST plasma-systemmonitor-5.23.4.tar.xz 144844 BLAKE2B fc0deda7053096218e28f734e27052439f3d1ad12e3e64b71848ad8711427c47c0c2126ab39cce75973a08ba6c43cc8e2266a1a662730e95d1244ac317c82d06 SHA512 45d90129628cca6d4b2837fee589b2ef93529983a35d6e0890058f9f106fc3abce3b7e9cf76ee8061ade0306885be308c083513208a55d047a92ee4687fd84e5
 DIST plasma-systemmonitor-5.23.5.tar.xz 144876 BLAKE2B f424f44b07807360b59718e7894eb95e9832865431f6a875b3c32309ba2ff078c4a40a27268ec756c5465b0fdff6c2856e3f545cb17c7af6edc92305ac5cb83a SHA512 12e723d79917a2410e174c33f3e63018cabcbfc9f6795f82206075b8573f8aeec47b4708151cddd0a2f2cfed67da4743475f00d46a59c0eee03cdedc15e7a657
 DIST plasma-systemmonitor-5.23.90.tar.xz 149696 BLAKE2B 83c71db625b40b05300cd5cb644f8390a749f8f42c6fd0e7f38259bfd5d2dc173ddf2e2a17ad6bd189636e5be710d87262232d113ac2d358fcea93db55d24420 SHA512 9ac18b43f344d25e0da834e9fceff76b5180f193ba26a3613e61c53298ac074de05f68c67f236832924167cd58356f85bae77bc7996dc734cf9876fea6a7a0cf

diff --git a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch
deleted file mode 100644
index 9257c8b4250f..000000000000
--- a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-add-comma-separated-filtering.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From b18f98fee76104d5be6b871dea330be32863ad27 Mon Sep 17 00:00:00 2001
-From: David Redondo <kde@david-redondo.de>
-Date: Tue, 23 Nov 2021 10:52:11 +0100
-Subject: [PATCH] Add comma separated filtering to ApplicationsTableView
-
-Instead of using ProcessSortFilterModel we can implement in
-the callback of the KSortFilterProxyModel.
-
-
-(cherry picked from commit 364bada0ad5befd560758bad11190b1fd7043b34)
----
- .../contents/ui/ApplicationsTableView.qml                 | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-index 3f3ed4f..1f2dd36 100644
---- a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-+++ b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-@@ -96,6 +96,14 @@ Table.BaseTableView {
-             }
-             return true
-         }
-+        filterRowCallback: function(row, parent) {
-+            if (filterString.length == 0) {
-+                return true
-+            }
-+            const name = sourceModel.data(sourceModel.index(row, filterKeyColumn, parent), filterRole).toLowerCase()
-+            const parts = filterString.toLowerCase().split(",").map(s => s.trim()).filter(s => s.length > 0)
-+            return parts.some(part => name.includes(part))
-+        }
- 
-         sortRole: "Value"
-     }
--- 
-GitLab
-

diff --git a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch b/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch
deleted file mode 100644
index 17505ee73146..000000000000
--- a/kde-plasma/plasma-systemmonitor/files/plasma-systemmonitor-5.23.4-applications-remove-unneeded-ProcessSortFilterModel.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 50f6378144ed244b9c1cd3e325ecbe45dd7544d4 Mon Sep 17 00:00:00 2001
-From: David Redondo <kde@david-redondo.de>
-Date: Mon, 22 Nov 2021 12:15:14 +0100
-Subject: [PATCH] ApplicationsTable: Remove unneeded ProcessSortFilterModel
-
-ProcessSortFilterModel handles filtering pids and to which user a process
-belongs over a normal QSortFilterProxyModel. In doing so it also
-sets the filterKeyColumn to nameColumn in findColumns(). Note that the name
-of the name columns of the process and application table is different
-("name" and "appName"), so the filterKeyColumn is also set by ApplicationTableView.
-However this is racey depending on when the binding is evaluated.
-Since we don't need the extra features of the ProcessSortFilterModel we can use
-the existing SortFilterProxyModel in charge of filtering columns (something that
-the ProcessSortFilterModel also did) to also handle the row filtering.
-BUG:445544
-FIXED-IN:5.23.4
-
-
-(cherry picked from commit a96bc99a3650c3bf2e48ab1287dc779dbba87c51)
----
- .../contents/ui/ApplicationsTableView.qml         | 15 ++++-----------
- 1 file changed, 4 insertions(+), 11 deletions(-)
-
-diff --git a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-index 38915b3..3f3ed4f 100644
---- a/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-+++ b/src/faces/applicationstable/contents/ui/ApplicationsTableView.qml
-@@ -32,7 +32,7 @@ Table.BaseTableView {
-     property alias columnDisplay: displayModel.columnDisplay
-     property alias sourceModel: appModel
- 
--    property alias filterString: filterProxy.filterString
-+    property alias filterString: sortColumnFilter.filterString
- 
-     property var selectedApplications: {
-         var result = []
-@@ -83,8 +83,9 @@ Table.BaseTableView {
-     model: KItemModels.KSortFilterProxyModel {
-         id: sortColumnFilter
- 
--        sourceModel: filterProxy
--
-+        sourceModel: cacheModel
-+        filterKeyColumn: appModel.nameColumn
-+        filterCaseSensitivity: Qt.CaseInsensitive
-         filterColumnCallback: function(column, parent) {
-             // Note: This assumes displayModel column == appModel column
-             // This may not always hold, but we get incorrect results if we try to
-@@ -99,13 +100,6 @@ Table.BaseTableView {
-         sortRole: "Value"
-     }
- 
--    Table.ProcessSortFilterModel {
--        id: filterProxy
--        sourceModel: cacheModel
--        filterKeyColumn: appModel.nameColumn
--        filterCaseSensitivity: Qt.CaseInsensitive
--    }
--
-     Table.ComponentCacheProxyModel {
-         id: cacheModel
-         sourceModel: displayModel
-@@ -184,7 +178,6 @@ Table.BaseTableView {
-             Table.FirstCellDelegate {
-                 iconName: {
-                     var index = sortColumnFilter.mapToSource(sortColumnFilter.index(model.row, 0));
--                    index = filterProxy.mapToSource(filterProxy.index(index.row, 0));
-                     index = appModel.index(index.row, appModel.iconColumn)
-                     return appModel.data(index)
-                     return ""
--- 
-GitLab
-

diff --git a/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild b/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild
deleted file mode 100644
index 12fa84166ae2..000000000000
--- a/kde-plasma/plasma-systemmonitor/plasma-systemmonitor-5.23.4-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PVCUT=$(ver_cut 1-3)
-KFMIN=5.86.0
-QTMIN=5.15.2
-inherit ecm kde.org
-
-DESCRIPTION="Monitor system sensors, process information and other system resources"
-HOMEPAGE="https://apps.kde.org/plasma-systemmonitor/"
-
-LICENSE="|| ( GPL-3 GPL-2 )"
-SLOT="5"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
-IUSE=""
-
-DEPEND="
-	>=dev-qt/qtdbus-${QTMIN}:5
-	>=dev-qt/qtdeclarative-${QTMIN}:5
-	>=dev-qt/qtgui-${QTMIN}:5
-	>=dev-qt/qtwidgets-${QTMIN}:5
-	>=kde-frameworks/kconfig-${KFMIN}:5
-	>=kde-frameworks/kcoreaddons-${KFMIN}:5
-	>=kde-frameworks/kdbusaddons-${KFMIN}:5
-	>=kde-frameworks/kdeclarative-${KFMIN}:5
-	>=kde-frameworks/kglobalaccel-${KFMIN}:5
-	>=kde-frameworks/ki18n-${KFMIN}:5
-	>=kde-frameworks/kio-${KFMIN}:5
-	>=kde-frameworks/kitemmodels-${KFMIN}:5
-	>=kde-frameworks/knewstuff-${KFMIN}:5
-	>=kde-frameworks/kservice-${KFMIN}:5
-	>=kde-plasma/libksysguard-${PVCUT}:5
-"
-RDEPEND="${DEPEND}
-	>=dev-qt/qtquickcontrols2-${QTMIN}:5
-	>=kde-frameworks/kirigami-${KFMIN}:5
-	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
-	>=kde-frameworks/kquickcharts-${KFMIN}:5
-	>=kde-plasma/ksystemstats-${PVCUT}:5
-"
-
-PATCHES=(
-	# 5.23 branch, KDE-bug 445544
-	"${FILESDIR}"/${P}-applications-remove-unneeded-ProcessSortFilterModel.patch
-	"${FILESDIR}"/${P}-applications-add-comma-separated-filtering.patch
-)


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

end of thread, other threads:[~2022-01-25  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 14:58 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-systemmonitor/files/, kde-plasma/plasma-systemmonitor/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-01-25  9:49 Andreas Sturmlechner

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