Fix deprecation warnings in lowenergyscanner example
This patch fixes several warnings like assets/Services.qml:81:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } Change-Id: Ic4af8f2fc76e437f7b4113e691f2b2461b273bbb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
parent
23cd59e767
commit
160e28b303
|
@ -70,7 +70,7 @@ Rectangle {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: device
|
target: device
|
||||||
onCharacteristicsUpdated: {
|
function onCharacteristicsUpdated() {
|
||||||
menu.menuText = "Back"
|
menu.menuText = "Back"
|
||||||
if (characteristicview.count === 0) {
|
if (characteristicview.count === 0) {
|
||||||
info.dialogText = "No characteristic found"
|
info.dialogText = "No characteristic found"
|
||||||
|
@ -81,7 +81,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onDisconnected: {
|
function onDisconnected() {
|
||||||
pageLoader.source = "main.qml"
|
pageLoader.source = "main.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,14 +80,14 @@ Rectangle {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: device
|
target: device
|
||||||
onServicesUpdated: {
|
function onServicesUpdated() {
|
||||||
if (servicesview.count === 0)
|
if (servicesview.count === 0)
|
||||||
info.dialogText = "No services found"
|
info.dialogText = "No services found"
|
||||||
else
|
else
|
||||||
info.visible = false;
|
info.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
onDisconnected: {
|
function onDisconnected() {
|
||||||
pageLoader.source = "main.qml"
|
pageLoader.source = "main.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue