mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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:
parent
e06e08727a
commit
acd8605a4f
13 changed files with 27 additions and 14 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue