mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Port to KSortFilterProxyModel
port away from the PlasmaCore version see https://invent.kde.org/frameworks/plasma-framework/-/issues/19
This commit is contained in:
parent
8db5df3ce9
commit
908029d4a6
4 changed files with 9 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ Dependencies:
|
||||||
'frameworks/kcoreaddons': '@latest-kf6'
|
'frameworks/kcoreaddons': '@latest-kf6'
|
||||||
'frameworks/ki18n': '@latest-kf6'
|
'frameworks/ki18n': '@latest-kf6'
|
||||||
'frameworks/kio': '@latest-kf6'
|
'frameworks/kio': '@latest-kf6'
|
||||||
|
'frameworks/kitemmodels': '@latest-kf6'
|
||||||
'frameworks/knotifications': '@latest-kf6'
|
'frameworks/knotifications': '@latest-kf6'
|
||||||
'frameworks/kpackage': '@latest-kf6'
|
'frameworks/kpackage': '@latest-kf6'
|
||||||
'frameworks/kservice': '@latest-kf6'
|
'frameworks/kservice': '@latest-kf6'
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||||
DBusAddons
|
DBusAddons
|
||||||
Plasma
|
Plasma
|
||||||
PlasmaQuick
|
PlasmaQuick
|
||||||
|
ItemModels
|
||||||
Service
|
Service
|
||||||
Notifications
|
Notifications
|
||||||
Wayland
|
Wayland
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
import org.kde.plasma.plasma5support 2.0 as P5Support
|
import org.kde.plasma.plasma5support 2.0 as P5Support
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
import org.kde.kitemmodels as KItemModels
|
||||||
|
|
||||||
import "indicators" as Indicators
|
import "indicators" as Indicators
|
||||||
import "../dataproviders" as DataProviders
|
import "../dataproviders" as DataProviders
|
||||||
|
|
@ -144,9 +145,9 @@ Item {
|
||||||
// system tray
|
// system tray
|
||||||
Repeater {
|
Repeater {
|
||||||
id: statusNotifierRepeater
|
id: statusNotifierRepeater
|
||||||
model: PlasmaCore.SortFilterModel {
|
model: KItemModels.KSortFilterProxyModel {
|
||||||
id: filteredStatusNotifiers
|
id: filteredStatusNotifiers
|
||||||
filterRole: "Title"
|
filterRoleName: "Title"
|
||||||
sourceModel: P5Support.DataModel {
|
sourceModel: P5Support.DataModel {
|
||||||
dataSource: statusNotifierSource ? statusNotifierSource : null
|
dataSource: statusNotifierSource ? statusNotifierSource : null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import QtQuick
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.taskmanager as TaskManager
|
import org.kde.taskmanager as TaskManager
|
||||||
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
import org.kde.plasma.private.mobileshell.windowplugin as WindowPlugin
|
||||||
|
import org.kde.kitemmodels as KItemModels
|
||||||
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
|
|
@ -14,10 +15,10 @@ pragma Singleton
|
||||||
QtObject {
|
QtObject {
|
||||||
readonly property bool showingWindow: __internal.count > 0 && !WindowPlugin.WindowUtil.isShowingDesktop
|
readonly property bool showingWindow: __internal.count > 0 && !WindowPlugin.WindowUtil.isShowingDesktop
|
||||||
|
|
||||||
property var __internal: PlasmaCore.SortFilterModel {
|
property var __internal: KItemModels.KSortFilterProxyModel {
|
||||||
id: visibleMaximizedWindowsModel
|
id: visibleMaximizedWindowsModel
|
||||||
filterRole: 'IsMinimized'
|
filterRoleName: 'IsMinimized'
|
||||||
filterRegExp: 'false'
|
filterString: 'false'
|
||||||
sourceModel: TaskManager.TasksModel {
|
sourceModel: TaskManager.TasksModel {
|
||||||
id: tasksModel
|
id: tasksModel
|
||||||
filterByVirtualDesktop: true
|
filterByVirtualDesktop: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue