Fix QML Connections-using code for Qt 5.12
This commit is contained in:
@@ -145,7 +145,7 @@ HListView {
|
||||
Connections {
|
||||
target: root.textArea
|
||||
|
||||
function onCursorPositionChanged() {
|
||||
onCursorPositionChanged: {
|
||||
if (! root.open) return
|
||||
|
||||
const pos = root.textArea.cursorPosition
|
||||
@@ -162,7 +162,7 @@ HListView {
|
||||
if (pos < start || pos > end) root.accept()
|
||||
}
|
||||
|
||||
function onTextChanged() {
|
||||
onTextChanged: {
|
||||
let changed = false
|
||||
|
||||
for (const [id, name] of Object.entries(root.usersCompleted)) {
|
||||
|
@@ -136,7 +136,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
function onRecycled() { roomPane.appearAnimation.restart() }
|
||||
onRecycled: roomPane.appearAnimation.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -248,8 +248,7 @@ HTextArea {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onRecycled() {
|
||||
onRecycled: {
|
||||
area.reset()
|
||||
area.loadState()
|
||||
}
|
||||
|
@@ -307,8 +307,7 @@ HListView {
|
||||
|
||||
Connections {
|
||||
target: py.eventHandlers
|
||||
|
||||
function onDeviceUpdateSignal(forAccount) {
|
||||
onDeviceUpdateSignal: forAccount => {
|
||||
if (forAccount === root.userId) root.loadDevices()
|
||||
}
|
||||
}
|
||||
|
@@ -16,8 +16,7 @@ HColumnLayout {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onAboutToRecycle() {
|
||||
onAboutToRecycle: {
|
||||
stackView.pop(stackView.initialItem)
|
||||
filterField.reset()
|
||||
}
|
||||
@@ -78,8 +77,7 @@ HColumnLayout {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onRecycled() {
|
||||
onRecycled: {
|
||||
memberList.model = null
|
||||
updateModelTimer.restart()
|
||||
}
|
||||
|
@@ -88,18 +88,13 @@ MultiviewPane {
|
||||
|
||||
Connections {
|
||||
target: swipeView
|
||||
|
||||
function onCurrentItemChanged() {
|
||||
onCurrentItemChanged:
|
||||
roomPane.swipeView.currentItem.keybindFocusItem.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onAboutToRecycle() {
|
||||
roomPane.swipeView.currentIndex = 0
|
||||
}
|
||||
onAboutToRecycle: roomPane.swipeView.currentIndex = 0
|
||||
}
|
||||
|
||||
MemberView {}
|
||||
|
@@ -82,7 +82,7 @@ HFlickableColumnPage {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
function onAboutToRecycle() { cancel() }
|
||||
onAboutToRecycle: cancel()
|
||||
}
|
||||
|
||||
HRoomAvatar {
|
||||
|
@@ -191,12 +191,8 @@ HRowLayout {
|
||||
|
||||
Connections {
|
||||
target: eventList
|
||||
|
||||
function onCheckedChanged() {
|
||||
contentLabel.deselect()
|
||||
}
|
||||
|
||||
function onDelegateWithSelectedTextChanged() {
|
||||
onCheckedChanged: contentLabel.deselect()
|
||||
onDelegateWithSelectedTextChanged: {
|
||||
if (eventList.delegateWithSelectedText !== model.id)
|
||||
contentLabel.deselect()
|
||||
}
|
||||
|
@@ -576,7 +576,7 @@ Rectangle {
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
function onRecycled() { eventList.moreToLoad = true }
|
||||
onRecycled: eventList.moreToLoad = true
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user