Port dataengine usage to plasma5support

DataEngines are deprecated and are being splitted in a (temporary lived)
compat library called plasma5support
This commit is contained in:
Marco Martin 2023-03-08 14:26:36 +01:00
parent e06e08727a
commit acd8605a4f
13 changed files with 27 additions and 14 deletions

View file

@ -12,6 +12,7 @@ import QtQuick.Window 2.2
import org.kde.kirigami 2.12 as Kirigami import org.kde.kirigami 2.12 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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -49,7 +50,7 @@ PlasmaCore.ColorScope {
opacity: opacityValue opacity: opacityValue
} }
PlasmaCore.DataSource { P5Support.DataSource {
id: timeSource id: timeSource
engine: "time" engine: "time"
connectedSources: ["Local"] connectedSources: ["Local"]

View file

@ -11,6 +11,7 @@ import QtQuick.Layouts 1.1
import org.kde.kirigami 2.12 as Kirigami import org.kde.kirigami 2.12 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.components 3.0 as PC3 import org.kde.plasma.components 3.0 as PC3
Item { Item {
@ -49,7 +50,7 @@ Item {
} }
} }
PlasmaCore.DataSource { P5Support.DataSource {
id: pmSource id: pmSource
engine: "powermanagement" engine: "powermanagement"
connectedSources: ["PowerDevil"] connectedSources: ["PowerDevil"]

View file

@ -9,6 +9,7 @@ import QtQuick 2.6
import QtQuick.Layouts 1.4 import QtQuick.Layouts 1.4
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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.workspace.components 2.0 as PW import org.kde.plasma.workspace.components 2.0 as PW
@ -17,7 +18,7 @@ Item {
property int percent: pmSource.data["Battery"]["Percent"] property int percent: pmSource.data["Battery"]["Percent"]
property bool pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false property bool pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false
property PlasmaCore.DataSource pmSource: PlasmaCore.DataSource { property P5Support.DataSource pmSource: P5Support.DataSource {
engine: "powermanagement" engine: "powermanagement"
connectedSources: ["Battery", "AC Adapter"] connectedSources: ["Battery", "AC Adapter"]
} }

View file

@ -9,6 +9,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -17,7 +18,7 @@ import "indicators" as Indicators
PlasmaComponents.Label { PlasmaComponents.Label {
id: clock id: clock
required property PlasmaCore.DataSource source required property P5Support.DataSource source
property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat

View file

@ -13,6 +13,7 @@ import QtQml.Models 2.12
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState
@ -59,7 +60,7 @@ Item {
readonly property real smallerTextPixelSize: 9 readonly property real smallerTextPixelSize: 9
readonly property real elementSpacing: PlasmaCore.Units.smallSpacing * 1.5 readonly property real elementSpacing: PlasmaCore.Units.smallSpacing * 1.5
PlasmaCore.DataSource { P5Support.DataSource {
id: timeSource id: timeSource
engine: "time" engine: "time"
connectedSources: ["Local"] connectedSources: ["Local"]
@ -72,7 +73,7 @@ Item {
Loader { Loader {
id: statusNotifierSourceLoader id: statusNotifierSourceLoader
active: !disableSystemTray active: !disableSystemTray
sourceComponent: PlasmaCore.DataSource { sourceComponent: P5Support.DataSource {
id: statusNotifierSource id: statusNotifierSource
engine: "statusnotifieritem" engine: "statusnotifieritem"
interval: 0 interval: 0

View file

@ -8,8 +8,9 @@
import QtQuick 2.15 import QtQuick 2.15
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
PlasmaCore.DataSource { P5Support.DataSource {
id: mpris2Source id: mpris2Source
engine: "mpris2" engine: "mpris2"

View file

@ -11,6 +11,7 @@ import QtQuick.Window 2.2
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
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.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
@ -37,7 +38,7 @@ Item {
property var model property var model
property int modelIndex property int modelIndex
property PlasmaCore.DataSource timeSource property P5Support.DataSource timeSource
readonly property int notificationType: model.type readonly property int notificationType: model.type

View file

@ -12,6 +12,7 @@ import QtQuick.Window 2.2
import org.kde.kirigami 2.12 as Kirigami import org.kde.kirigami 2.12 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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
@ -30,7 +31,7 @@ RowLayout {
property string originName property string originName
property var time property var time
property PlasmaCore.DataSource timeSource property P5Support.DataSource timeSource
property int jobState property int jobState
property QtObject jobDetails property QtObject jobDetails

View file

@ -10,6 +10,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
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.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
@ -27,7 +28,7 @@ PlasmaComponents.Label {
property QtObject jobDetails property QtObject jobDetails
property var time property var time
property PlasmaCore.DataSource timeSource property P5Support.DataSource timeSource
// notification created/updated time changed // notification created/updated time changed
onTimeChanged: updateAgoText() onTimeChanged: updateAgoText()

View file

@ -13,6 +13,7 @@ import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.12 as Kirigami import org.kde.kirigami 2.12 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.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
@ -117,7 +118,7 @@ Item {
MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_notifications"); MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_notifications");
} }
PlasmaCore.DataSource { P5Support.DataSource {
id: timeDataSource id: timeDataSource
engine: "time" engine: "time"
connectedSources: ["Local"] connectedSources: ["Local"]

View file

@ -7,6 +7,7 @@ import QtQuick.Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.plasma.core as PlasmaCore import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasma5support 2.0 as P5Support
import org.kde.plasma.private.mobileshell as MobileShell import org.kde.plasma.private.mobileshell as MobileShell
@ -58,7 +59,7 @@ ColumnLayout {
} }
} }
PlasmaCore.DataSource { P5Support.DataSource {
id: timeSource id: timeSource
engine: "time" engine: "time"
connectedSources: ["Local"] connectedSources: ["Local"]

View file

@ -10,6 +10,7 @@ import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
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.components 3.0 as PC3 import org.kde.plasma.components 3.0 as PC3
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
@ -20,7 +21,7 @@ Item {
property int layoutAlignment property int layoutAlignment
PlasmaCore.DataSource { P5Support.DataSource {
id: timeSource id: timeSource
engine: "time" engine: "time"
connectedSources: ["Local"] connectedSources: ["Local"]

View file

@ -6,6 +6,7 @@
import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell
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
MobileShell.QuickSetting { MobileShell.QuickSetting {
text: i18n("Caffeine") text: i18n("Caffeine")
@ -13,7 +14,7 @@ MobileShell.QuickSetting {
status: enabled ? i18n("Tap to disable sleep suspension") : i18n("Tap to suspend sleep") status: enabled ? i18n("Tap to disable sleep suspension") : i18n("Tap to suspend sleep")
enabled: false enabled: false
PlasmaCore.DataSource { P5Support.DataSource {
id: pmSource id: pmSource
engine: "powermanagement" engine: "powermanagement"
connectedSources: sources connectedSources: sources