Fix QML Connections-using code for Qt 5.12
This commit is contained in:
		@@ -15,6 +15,8 @@ and this project adheres to
 | 
				
			|||||||
- Fix checkboxes in the room settings not having their default values updated
 | 
					- Fix checkboxes in the room settings not having their default values updated
 | 
				
			||||||
  after switching room
 | 
					  after switching room
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fix various minor features broken on Qt 5.12 and the AppImage since v0.5.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 0.6.3 (2020-09-16)
 | 
					## 0.6.3 (2020-09-16)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,8 +42,7 @@ Video {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: mainUI.fullScreenPopup
 | 
					        target: mainUI.fullScreenPopup
 | 
				
			||||||
 | 
					        onClosed: fullScreen = false
 | 
				
			||||||
        function onClosed() { fullScreen = false }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    TapHandler {
 | 
					    TapHandler {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -215,8 +215,7 @@ HListView {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: pageLoader
 | 
					        target: pageLoader
 | 
				
			||||||
 | 
					        onPreviousShown: (componentUrl, properties)  => {
 | 
				
			||||||
        function onPreviousShown(componentUrl, properties) {
 | 
					 | 
				
			||||||
            if (setCorrectCurrentItem() === false) startCorrectItemSearch()
 | 
					            if (setCorrectCurrentItem() === false) startCorrectItemSearch()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,7 +145,7 @@ HListView {
 | 
				
			|||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: root.textArea
 | 
					        target: root.textArea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function onCursorPositionChanged() {
 | 
					        onCursorPositionChanged: {
 | 
				
			||||||
            if (! root.open) return
 | 
					            if (! root.open) return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const pos   = root.textArea.cursorPosition
 | 
					            const pos   = root.textArea.cursorPosition
 | 
				
			||||||
@@ -162,7 +162,7 @@ HListView {
 | 
				
			|||||||
            if (pos < start || pos > end) root.accept()
 | 
					            if (pos < start || pos > end) root.accept()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function onTextChanged() {
 | 
					        onTextChanged: {
 | 
				
			||||||
            let changed = false
 | 
					            let changed = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (const [id, name] of Object.entries(root.usersCompleted)) {
 | 
					            for (const [id, name] of Object.entries(root.usersCompleted)) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -136,7 +136,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            Connections {
 | 
					            Connections {
 | 
				
			||||||
                target: pageLoader
 | 
					                target: pageLoader
 | 
				
			||||||
                function onRecycled() { roomPane.appearAnimation.restart() }
 | 
					                onRecycled: roomPane.appearAnimation.restart()
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -248,8 +248,7 @@ HTextArea {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: pageLoader
 | 
					        target: pageLoader
 | 
				
			||||||
 | 
					        onRecycled: {
 | 
				
			||||||
        function onRecycled() {
 | 
					 | 
				
			||||||
            area.reset()
 | 
					            area.reset()
 | 
				
			||||||
            area.loadState()
 | 
					            area.loadState()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -307,8 +307,7 @@ HListView {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: py.eventHandlers
 | 
					        target: py.eventHandlers
 | 
				
			||||||
 | 
					        onDeviceUpdateSignal: forAccount => {
 | 
				
			||||||
        function onDeviceUpdateSignal(forAccount) {
 | 
					 | 
				
			||||||
            if (forAccount === root.userId) root.loadDevices()
 | 
					            if (forAccount === root.userId) root.loadDevices()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,8 +16,7 @@ HColumnLayout {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: pageLoader
 | 
					        target: pageLoader
 | 
				
			||||||
 | 
					        onAboutToRecycle: {
 | 
				
			||||||
        function onAboutToRecycle() {
 | 
					 | 
				
			||||||
            stackView.pop(stackView.initialItem)
 | 
					            stackView.pop(stackView.initialItem)
 | 
				
			||||||
            filterField.reset()
 | 
					            filterField.reset()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -78,8 +77,7 @@ HColumnLayout {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            Connections {
 | 
					            Connections {
 | 
				
			||||||
                target: pageLoader
 | 
					                target: pageLoader
 | 
				
			||||||
 | 
					                onRecycled: {
 | 
				
			||||||
                function onRecycled() {
 | 
					 | 
				
			||||||
                    memberList.model = null
 | 
					                    memberList.model = null
 | 
				
			||||||
                    updateModelTimer.restart()
 | 
					                    updateModelTimer.restart()
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,18 +88,13 @@ MultiviewPane {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: swipeView
 | 
					        target: swipeView
 | 
				
			||||||
 | 
					        onCurrentItemChanged:
 | 
				
			||||||
        function onCurrentItemChanged() {
 | 
					 | 
				
			||||||
            roomPane.swipeView.currentItem.keybindFocusItem.forceActiveFocus()
 | 
					            roomPane.swipeView.currentItem.keybindFocusItem.forceActiveFocus()
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: pageLoader
 | 
					        target: pageLoader
 | 
				
			||||||
 | 
					        onAboutToRecycle: roomPane.swipeView.currentIndex = 0
 | 
				
			||||||
        function onAboutToRecycle() {
 | 
					 | 
				
			||||||
            roomPane.swipeView.currentIndex = 0
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MemberView {}
 | 
					    MemberView {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -82,7 +82,7 @@ HFlickableColumnPage {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Connections {
 | 
					    Connections {
 | 
				
			||||||
        target: pageLoader
 | 
					        target: pageLoader
 | 
				
			||||||
        function onAboutToRecycle() { cancel() }
 | 
					        onAboutToRecycle: cancel()
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    HRoomAvatar {
 | 
					    HRoomAvatar {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -191,12 +191,8 @@ HRowLayout {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            Connections {
 | 
					            Connections {
 | 
				
			||||||
                target: eventList
 | 
					                target: eventList
 | 
				
			||||||
 | 
					                onCheckedChanged: contentLabel.deselect()
 | 
				
			||||||
                function onCheckedChanged() {
 | 
					                onDelegateWithSelectedTextChanged: {
 | 
				
			||||||
                    contentLabel.deselect()
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                function onDelegateWithSelectedTextChanged() {
 | 
					 | 
				
			||||||
                    if (eventList.delegateWithSelectedText !== model.id)
 | 
					                    if (eventList.delegateWithSelectedText !== model.id)
 | 
				
			||||||
                        contentLabel.deselect()
 | 
					                        contentLabel.deselect()
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -576,7 +576,7 @@ Rectangle {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        Connections {
 | 
					        Connections {
 | 
				
			||||||
            target: pageLoader
 | 
					            target: pageLoader
 | 
				
			||||||
            function onRecycled() { eventList.moreToLoad = true }
 | 
					            onRecycled: eventList.moreToLoad = true
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,10 +81,8 @@ HColumnPopup {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        Connections {
 | 
					        Connections {
 | 
				
			||||||
            target: Clipboard
 | 
					            target: Clipboard
 | 
				
			||||||
 | 
					            onContentChanged:
 | 
				
			||||||
            function onContentChanged() {
 | 
					 | 
				
			||||||
                Clipboard.hasImage ? image.updateCounter += 1 : popup.close()
 | 
					                Clipboard.hasImage ? image.updateCounter += 1 : popup.close()
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,10 +40,13 @@ void loggingHandler(
 | 
				
			|||||||
    Q_UNUSED(context)
 | 
					    Q_UNUSED(context)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Hide dumb warnings about thing we can't fix without breaking
 | 
					    // Hide dumb warnings about thing we can't fix without breaking
 | 
				
			||||||
    // compatibilty with Qt < 5.14
 | 
					    // compatibilty with Qt < 5.14/5.15
 | 
				
			||||||
    if (msg.contains("QML Binding: Not restoring previous value because"))
 | 
					    if (msg.contains("QML Binding: Not restoring previous value because"))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (msg.contains("QML Connections: Implicitly defined onFoo properties"))
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Hide layout-related spam introduced in Qt 5.14
 | 
					    // Hide layout-related spam introduced in Qt 5.14
 | 
				
			||||||
    if (msg.contains("Qt Quick Layouts: Detected recursive rearrange."))
 | 
					    if (msg.contains("Qt Quick Layouts: Detected recursive rearrange."))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user