Fix qml warning
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
b55013f57a
commit
f12aa5d88f
2 changed files with 4 additions and 4 deletions
|
@ -116,7 +116,7 @@ Kirigami.ScrollablePage {
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
text: i18nd("kdeconnect-app", "This device is not paired")
|
text: i18nd("kdeconnect-app", "This device is not paired")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: root.currentDevice.isReachable && !root.currentDevice.isTrusted && !root.currentDevice.hasPairingRequests
|
visible: root.currentDevice && root.currentDevice.isReachable && !root.currentDevice.isTrusted && !root.currentDevice.hasPairingRequests
|
||||||
helpfulAction: Kirigami.Action {
|
helpfulAction: Kirigami.Action {
|
||||||
text: i18nd("kdeconnect-app", "Pair")
|
text: i18nd("kdeconnect-app", "Pair")
|
||||||
icon.name:"network-connect"
|
icon.name:"network-connect"
|
||||||
|
@ -145,7 +145,7 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
visible: !root.currentDevice.isReachable
|
visible: root.currentDevice && !root.currentDevice.isReachable
|
||||||
text: i18nd("kdeconnect-app", "This device is not reachable")
|
text: i18nd("kdeconnect-app", "This device is not reachable")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ Kirigami.ScrollablePage {
|
||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: fileDialog
|
id: fileDialog
|
||||||
readonly property var shareIface: ShareDbusInterfaceFactory.create(root.currentDevice.id())
|
readonly property var shareIface: root.currentDevice ? ShareDbusInterfaceFactory.create(root.currentDevice.id()) : null
|
||||||
title: i18nd("kdeconnect-app", "Please choose a file")
|
title: i18nd("kdeconnect-app", "Please choose a file")
|
||||||
folder: shortcuts.home
|
folder: shortcuts.home
|
||||||
onAccepted: shareIface.shareUrl(fileDialog.fileUrl)
|
onAccepted: shareIface.shareUrl(fileDialog.fileUrl)
|
||||||
|
|
|
@ -12,7 +12,7 @@ Kirigami.Page {
|
||||||
property string configFile
|
property string configFile
|
||||||
property string device
|
property string device
|
||||||
|
|
||||||
actions.main: loader.item.action
|
actions.main: loader.item && loader.item.action ? loader.item.action : null
|
||||||
|
|
||||||
onConfigFileChanged: loader.setSource(configFile, {
|
onConfigFileChanged: loader.setSource(configFile, {
|
||||||
device: root.device
|
device: root.device
|
||||||
|
|
Loading…
Reference in a new issue