From acd8605a4fd3bd6313a552dba1dfb50ca8a6edad Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 8 Mar 2023 14:26:36 +0100 Subject: [PATCH] Port dataengine usage to plasma5support DataEngines are deprecated and are being splitted in a (temporary lived) compat library called plasma5support --- .../qml/actiondrawer/LandscapeContentContainer.qml | 3 ++- .../qml/actiondrawer/quicksettings/BrightnessItem.qml | 3 ++- components/mobileshell/qml/dataproviders/BatteryInfo.qml | 3 ++- components/mobileshell/qml/statusbar/ClockText.qml | 3 ++- components/mobileshell/qml/statusbar/StatusBar.qml | 5 +++-- .../qml/widgets/mediacontrols/MediaControlsSource.qml | 3 ++- .../qml/widgets/notifications/BaseNotificationItem.qml | 3 ++- .../qml/widgets/notifications/NotificationGroupHeader.qml | 3 ++- .../qml/widgets/notifications/NotificationTimeText.qml | 3 ++- .../qml/widgets/notifications/NotificationsWidget.qml | 3 ++- .../homescreens/halcyon/package/contents/ui/Clock.qml | 3 ++- look-and-feel/contents/lockscreen/Clock.qml | 3 ++- quicksettings/caffeine/contents/ui/main.qml | 3 ++- 13 files changed, 27 insertions(+), 14 deletions(-) diff --git a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml index ca68b1be..5249a33b 100644 --- a/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/LandscapeContentContainer.qml @@ -12,6 +12,7 @@ import QtQuick.Window 2.2 import org.kde.kirigami 2.12 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.plasma.private.mobileshell 1.0 as MobileShell @@ -49,7 +50,7 @@ PlasmaCore.ColorScope { opacity: opacityValue } - PlasmaCore.DataSource { + P5Support.DataSource { id: timeSource engine: "time" connectedSources: ["Local"] diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml b/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml index f61f5043..a7bc8a16 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/BrightnessItem.qml @@ -11,6 +11,7 @@ import QtQuick.Layouts 1.1 import org.kde.kirigami 2.12 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 PC3 Item { @@ -49,7 +50,7 @@ Item { } } - PlasmaCore.DataSource { + P5Support.DataSource { id: pmSource engine: "powermanagement" connectedSources: ["PowerDevil"] diff --git a/components/mobileshell/qml/dataproviders/BatteryInfo.qml b/components/mobileshell/qml/dataproviders/BatteryInfo.qml index 3679467e..878999bd 100644 --- a/components/mobileshell/qml/dataproviders/BatteryInfo.qml +++ b/components/mobileshell/qml/dataproviders/BatteryInfo.qml @@ -9,6 +9,7 @@ import QtQuick 2.6 import QtQuick.Layouts 1.4 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.workspace.components 2.0 as PW @@ -17,7 +18,7 @@ Item { property int percent: pmSource.data["Battery"]["Percent"] 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" connectedSources: ["Battery", "AC Adapter"] } diff --git a/components/mobileshell/qml/statusbar/ClockText.qml b/components/mobileshell/qml/statusbar/ClockText.qml index 25bb802e..121fac63 100644 --- a/components/mobileshell/qml/statusbar/ClockText.qml +++ b/components/mobileshell/qml/statusbar/ClockText.qml @@ -9,6 +9,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.15 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.private.mobileshell 1.0 as MobileShell @@ -17,7 +18,7 @@ import "indicators" as Indicators PlasmaComponents.Label { id: clock - required property PlasmaCore.DataSource source + required property P5Support.DataSource source property bool is24HourTime: MobileShell.ShellUtil.isSystem24HourFormat diff --git a/components/mobileshell/qml/statusbar/StatusBar.qml b/components/mobileshell/qml/statusbar/StatusBar.qml index 6b68d087..748776ab 100644 --- a/components/mobileshell/qml/statusbar/StatusBar.qml +++ b/components/mobileshell/qml/statusbar/StatusBar.qml @@ -13,6 +13,7 @@ import QtQml.Models 2.12 import Qt5Compat.GraphicalEffects 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.private.mobileshell 1.0 as MobileShell import org.kde.plasma.private.mobileshell.state 1.0 as MobileShellState @@ -59,7 +60,7 @@ Item { readonly property real smallerTextPixelSize: 9 readonly property real elementSpacing: PlasmaCore.Units.smallSpacing * 1.5 - PlasmaCore.DataSource { + P5Support.DataSource { id: timeSource engine: "time" connectedSources: ["Local"] @@ -72,7 +73,7 @@ Item { Loader { id: statusNotifierSourceLoader active: !disableSystemTray - sourceComponent: PlasmaCore.DataSource { + sourceComponent: P5Support.DataSource { id: statusNotifierSource engine: "statusnotifieritem" interval: 0 diff --git a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml index 5594bab1..f3cd3d12 100644 --- a/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml +++ b/components/mobileshell/qml/widgets/mediacontrols/MediaControlsSource.qml @@ -8,8 +8,9 @@ import QtQuick 2.15 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.plasma5support 2.0 as P5Support -PlasmaCore.DataSource { +P5Support.DataSource { id: mpris2Source engine: "mpris2" diff --git a/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml b/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml index dbf5d283..f8d6e332 100644 --- a/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml +++ b/components/mobileshell/qml/widgets/notifications/BaseNotificationItem.qml @@ -11,6 +11,7 @@ import QtQuick.Window 2.2 import Qt5Compat.GraphicalEffects 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.extras 2.0 as PlasmaExtras @@ -37,7 +38,7 @@ Item { property var model property int modelIndex - property PlasmaCore.DataSource timeSource + property P5Support.DataSource timeSource readonly property int notificationType: model.type diff --git a/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml b/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml index 75622d95..25438a4a 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationGroupHeader.qml @@ -12,6 +12,7 @@ import QtQuick.Window 2.2 import org.kde.kirigami 2.12 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.plasma.extras 2.0 as PlasmaExtras @@ -30,7 +31,7 @@ RowLayout { property string originName property var time - property PlasmaCore.DataSource timeSource + property P5Support.DataSource timeSource property int jobState property QtObject jobDetails diff --git a/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml b/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml index 708a7fff..9c723ad9 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationTimeText.qml @@ -10,6 +10,7 @@ import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 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.extras 2.0 as PlasmaExtras @@ -27,7 +28,7 @@ PlasmaComponents.Label { property QtObject jobDetails property var time - property PlasmaCore.DataSource timeSource + property P5Support.DataSource timeSource // notification created/updated time changed onTimeChanged: updateAgoText() diff --git a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml index df0584d8..bf8a4dda 100644 --- a/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml +++ b/components/mobileshell/qml/widgets/notifications/NotificationsWidget.qml @@ -13,6 +13,7 @@ import Qt5Compat.GraphicalEffects import org.kde.kirigami 2.12 as Kirigami 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.extras 2.0 as PlasmaExtras import org.kde.plasma.components 3.0 as PlasmaComponents3 @@ -117,7 +118,7 @@ Item { MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_notifications"); } - PlasmaCore.DataSource { + P5Support.DataSource { id: timeDataSource engine: "time" connectedSources: ["Local"] diff --git a/containments/homescreens/halcyon/package/contents/ui/Clock.qml b/containments/homescreens/halcyon/package/contents/ui/Clock.qml index 261006e7..77a8b76e 100644 --- a/containments/homescreens/halcyon/package/contents/ui/Clock.qml +++ b/containments/homescreens/halcyon/package/contents/ui/Clock.qml @@ -7,6 +7,7 @@ import QtQuick.Controls import Qt5Compat.GraphicalEffects import org.kde.plasma.core as PlasmaCore +import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.private.mobileshell as MobileShell @@ -58,7 +59,7 @@ ColumnLayout { } } - PlasmaCore.DataSource { + P5Support.DataSource { id: timeSource engine: "time" connectedSources: ["Local"] diff --git a/look-and-feel/contents/lockscreen/Clock.qml b/look-and-feel/contents/lockscreen/Clock.qml index 901fc500..96d0b095 100644 --- a/look-and-feel/contents/lockscreen/Clock.qml +++ b/look-and-feel/contents/lockscreen/Clock.qml @@ -10,6 +10,7 @@ import QtQuick.Controls 2.15 import Qt5Compat.GraphicalEffects 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.private.mobileshell 1.0 as MobileShell @@ -20,7 +21,7 @@ Item { property int layoutAlignment - PlasmaCore.DataSource { + P5Support.DataSource { id: timeSource engine: "time" connectedSources: ["Local"] diff --git a/quicksettings/caffeine/contents/ui/main.qml b/quicksettings/caffeine/contents/ui/main.qml index 84c836c7..9ba6dacf 100644 --- a/quicksettings/caffeine/contents/ui/main.qml +++ b/quicksettings/caffeine/contents/ui/main.qml @@ -6,6 +6,7 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.plasma5support 2.0 as P5Support MobileShell.QuickSetting { text: i18n("Caffeine") @@ -13,7 +14,7 @@ MobileShell.QuickSetting { status: enabled ? i18n("Tap to disable sleep suspension") : i18n("Tap to suspend sleep") enabled: false - PlasmaCore.DataSource { + P5Support.DataSource { id: pmSource engine: "powermanagement" connectedSources: sources