Commit d4487d49 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Port plasmoid context property to Plasmoid.self in Connections.target

It's a Qt 5 bug that target cannot take an attached object as a value
there. It's the reason why Plasmoid.self was introduced in the first
place.
parent f043a4b6
Pipeline #157202 passed with stage
in 5 minutes and 48 seconds
......@@ -66,7 +66,7 @@ PlasmaExtras.ExpandableListItem {
}
Connections {
target: plasmoid.action("unmountAllDevices")
target: Plasmoid.action("unmountAllDevices")
function onTriggered() {
removableActionTriggered();
}
......
......@@ -105,7 +105,7 @@ PlasmaExtras.Representation {
}
Connections {
target: plasmoid
target: Plasmoid.self
function onExpandedChanged() {
if (!Plasmoid.expanded) {
statusSource.clearMessage();
......
......@@ -328,7 +328,7 @@ PlasmaExtras.Representation {
}
Connections {
target: plasmoid.configuration
target: Plasmoid.configuration
onEnabledCalendarPluginsChanged: {
PlasmaCalendar.EventPluginsManager.enabledPlugins = Plasmoid.configuration.enabledCalendarPlugins;
......@@ -336,7 +336,7 @@ PlasmaExtras.Representation {
}
Binding {
target: plasmoid
target: Plasmoid.self
property: "hideOnWindowDeactivate"
value: !Plasmoid.configuration.pin
restoreMode: Binding.RestoreBinding
......
......@@ -76,7 +76,7 @@ Item {
onUse24hFormatChanged: { timeFormatCorrection(Qt.locale().timeFormat(Locale.ShortFormat)) }
Connections {
target: plasmoid
target: Plasmoid.self
function onContextualActionsAboutToShow() {
ClipboardMenu.secondsIncluded = main.showSeconds;
ClipboardMenu.currentDate = main.currentTime;
......@@ -84,7 +84,7 @@ Item {
}
Connections {
target: plasmoid.configuration
target: Plasmoid.configuration
function onSelectedTimeZonesChanged() {
// If the currently selected timezone was removed,
// default to the first one in the list
......
......@@ -87,7 +87,7 @@ Item {
//it's used for formatting in ToolTip.dateTimeChanged()
property var allTimezones
Connections {
target: plasmoid.configuration
target: Plasmoid.configuration
function onSelectedTimeZonesChanged() { root.initTimezones(); }
}
......
......@@ -79,7 +79,7 @@ MouseArea {
}
Connections {
target: plasmoid
target: Plasmoid.self
function onExternalData(mimetype, data) {
Plasmoid.nativeInterface.url = data
}
......
......@@ -54,7 +54,7 @@ Item {
name: "available"
when: !Keyboards.KWinVirtualKeyboard.available
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "input-keyboard-virtual-off"
toolTipSubText: i18n("Virtual Keyboard: unavailable")
status: PlasmaCore.Types.HiddenStatus
......@@ -65,7 +65,7 @@ Item {
name: "disabled"
when: Keyboards.KWinVirtualKeyboard.available && !Keyboards.KWinVirtualKeyboard.enabled
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "input-keyboard-virtual-off"
toolTipSubText: i18n("Virtual Keyboard: disabled")
status: PlasmaCore.Types.ActiveStatus
......@@ -76,7 +76,7 @@ Item {
name: "visible"
when: Keyboards.KWinVirtualKeyboard.available && Keyboards.KWinVirtualKeyboard.visible
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "arrow-down"
toolTipSubText: i18n("Virtual Keyboard: visible")
// It's only relevant in tablet mode
......@@ -88,7 +88,7 @@ Item {
name: "idle"
when: Keyboards.KWinVirtualKeyboard.available && Keyboards.KWinVirtualKeyboard.enabled && !Keyboards.KWinVirtualKeyboard.visible
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "input-keyboard-virtual-on"
toolTipSubText: i18n("Virtual Keyboard: enabled")
// It's only relevant in tablet mode
......
......@@ -50,7 +50,7 @@ PlasmaExtras.Representation {
}
Connections {
target: plasmoid
target: Plasmoid.self
function onExpandedChanged() {
if (Plasmoid.expanded) {
retrievePosition();
......
......@@ -312,7 +312,7 @@ Item {
when: !root.noPlayer && mpris2Source.currentData.PlaybackStatus === "Playing"
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "media-playback-playing"
toolTipMainText: track
toolTipSubText: artist ? i18nc("by Artist (player name)", "by %1 (%2)", artist, identity) : identity
......@@ -323,7 +323,7 @@ Item {
when: !root.noPlayer && mpris2Source.currentData.PlaybackStatus === "Paused"
PropertyChanges {
target: plasmoid
target: Plasmoid.self
icon: "media-playback-paused"
toolTipMainText: track
toolTipSubText: artist ? i18nc("by Artist (paused, player name)", "by %1 (paused, %2)", artist, identity) : i18nc("Paused (player name)", "Paused (%1)", identity)
......
......@@ -40,7 +40,7 @@ PlasmaExtras.Representation {
}
Connections {
target: plasmoid
target: Plasmoid.self
function onExpandedChanged() {
if (Plasmoid.expanded) {
list.positionViewAtBeginning();
......
......@@ -46,7 +46,7 @@ Control {
contentItem: Plasmoid.nativeInterface.faceController.compactRepresentation
Binding {
target: plasmoid.nativeInterface.faceController.compactRepresentation
target: Plasmoid.nativeInterface.faceController.compactRepresentation
property: "formFactor"
value: {
switch (Plasmoid.formFactor) {
......
......@@ -54,7 +54,7 @@ Control {
}
Binding {
target: plasmoid.nativeInterface.faceController.fullRepresentation
target: Plasmoid.nativeInterface.faceController.fullRepresentation
property: "formFactor"
value: {
switch (Plasmoid.formFactor) {
......
......@@ -47,7 +47,7 @@ Item {
}
Connections {
target: plasmoid.nativeInterface
target: Plasmoid.nativeInterface
function onInternalSystrayChanged() {
root.internalSystray = Plasmoid.nativeInterface.internalSystray;
root.internalSystray.parent = root;
......
......@@ -30,7 +30,7 @@ PlasmaCore.ToolTipArea {
property Item compactRepresentation
Connections {
target: plasmoid
target: Plasmoid.self
function onContextualActionsAboutToShow() {
appletRoot.hideImmediately()
}
......
......@@ -68,7 +68,7 @@ StackView {
}
Connections {
target: plasmoid
target: Plasmoid.self
function onAppletRemoved(applet) {
if (applet === systemTrayState.activeApplet) {
mainStack.clear()
......
......@@ -61,7 +61,7 @@ QtObject {
//listen on SystemTray AppletInterface signals
property Connections plasmoidConnections: Connections {
target: plasmoid
target: Plasmoid.self
//emitted when activation is requested, for example by using a global keyboard shortcut
function onActivated() {
acceptExpandedChange = true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment