Port to KSortFilterProxyModel

port away from the PlasmaCore version

see https://invent.kde.org/frameworks/plasma-framework/-/issues/19
This commit is contained in:
Marco Martin 2023-08-29 14:30:12 +00:00
parent 8db5df3ce9
commit 908029d4a6
4 changed files with 9 additions and 5 deletions

View file

@ -9,6 +9,7 @@ Dependencies:
'frameworks/kcoreaddons': '@latest-kf6'
'frameworks/ki18n': '@latest-kf6'
'frameworks/kio': '@latest-kf6'
'frameworks/kitemmodels': '@latest-kf6'
'frameworks/knotifications': '@latest-kf6'
'frameworks/kpackage': '@latest-kf6'
'frameworks/kservice': '@latest-kf6'

View file

@ -60,6 +60,7 @@ find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
DBusAddons
Plasma
PlasmaQuick
ItemModels
Service
Notifications
Wayland

View file

@ -17,6 +17,7 @@ import org.kde.kirigami as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kitemmodels as KItemModels
import "indicators" as Indicators
import "../dataproviders" as DataProviders
@ -144,9 +145,9 @@ Item {
// system tray
Repeater {
id: statusNotifierRepeater
model: PlasmaCore.SortFilterModel {
model: KItemModels.KSortFilterProxyModel {
id: filteredStatusNotifiers
filterRole: "Title"
filterRoleName: "Title"
sourceModel: P5Support.DataModel {
dataSource: statusNotifierSource ? statusNotifierSource : null
}

View file

@ -6,6 +6,7 @@ import QtQuick
import org.kde.plasma.core as PlasmaCore
import org.kde.taskmanager as TaskManager
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
import org.kde.kitemmodels as KItemModels
pragma Singleton
@ -14,10 +15,10 @@ pragma Singleton
QtObject {
readonly property bool showingWindow: __internal.count > 0 && !WindowPlugin.WindowUtil.isShowingDesktop
property var __internal: PlasmaCore.SortFilterModel {
property var __internal: KItemModels.KSortFilterProxyModel {
id: visibleMaximizedWindowsModel
filterRole: 'IsMinimized'
filterRegExp: 'false'
filterRoleName: 'IsMinimized'
filterString: 'false'
sourceModel: TaskManager.TasksModel {
id: tasksModel
filterByVirtualDesktop: true