Fix Connections deprecation warning on Qt 5.15

Adopt the correct behavior to get rid of
"QML Connections: Implicitly defined onFoo properties in Connections
 are deprecated. Use this syntax instead:
 function onFoo(<arguments>) { ... }"
This commit is contained in:
miruka 2020-06-22 14:11:56 -04:00
parent ae37e13c6e
commit ad36fc72f4
5 changed files with 16 additions and 6 deletions

View File

@ -50,7 +50,8 @@ HButton {
Connections {
enabled: contextMenuLoader.status === Loader.Ready
target: contextMenuLoader.item
onClosed: contextMenuLoader.active = false
function onClosed() { contextMenuLoader.active = false }
}
HLoader {

View File

@ -42,7 +42,8 @@ Video {
Connections {
target: mainUI.fullScreenPopup
onClosed: fullScreen = false
function onClosed() { fullScreen = false }
}
TapHandler {

View File

@ -199,9 +199,11 @@ HListView {
Connections {
target: pageLoader
onPreviousShown:
function onPreviousShown(componentUrl, properties) {
if (setCorrectCurrentItem() === false) startCorrectItemSearch()
}
}
Timer {
// On startup, the account/room takes an unknown amount of time to

View File

@ -71,9 +71,10 @@ MultiviewPane {
Connections {
target: swipeView
onCurrentItemChanged:
function onCurrentItemChanged() {
swipeView.currentItem.keybindFocusItem.forceActiveFocus()
}
}
MemberView {}
SettingsView {}

View File

@ -171,11 +171,16 @@ HRowLayout {
Connections {
target: eventList
onCheckedChanged: contentLabel.deselect()
onDelegateWithSelectedTextChanged:
function onCheckedChanged() {
contentLabel.deselect()
}
function onDelegateWithSelectedTextChanged() {
if (eventList.delegateWithSelectedText !== model.id)
contentLabel.deselect()
}
}
HoverHandler { id: contentHover }