Port away from deprecated QML features

This commit is contained in:
ivan tkachenko 2022-09-21 01:14:37 +03:00
parent 03a58c66a5
commit 4b6caf9af4
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3
4 changed files with 7 additions and 6 deletions

View file

@ -57,7 +57,7 @@ Loader {
Connections {
target: plugin
onNowPlayingChanged: {
function onNowPlayingChanged() {
item.value = lastPosition
}
}

View file

@ -61,9 +61,10 @@ Kirigami.Page
Connections {
target: PointerLocker
onPointerMoved: {
if (!PointerLocker.isLocked)
function onPointerMoved() {
if (!PointerLocker.isLocked) {
return;
}
mousepad.pluginInterface.moveCursor(Qt.point(delta.x, delta.y));
}
}

View file

@ -20,13 +20,13 @@ TextField {
pluginName: "remotekeyboard"
}
property variant remoteKeyboard: null
property var remoteKeyboard: null
readonly property bool remoteState: available ? remoteKeyboard.remoteState : false
Connections {
target: remoteKeyboard
onKeyPressReceived: {
function onKeyPressReceived() {
//console.log("XXX received keypress key=" + key + " special=" + specialKey + " shift=" + shift + " ctrl=" + ctrl + " text=" + text + " cursorPos=" + cursorPosition);
// interpret some special keys:
if (specialKey == 12 || specialKey == 14) // Return/Esc -> clear

View file

@ -135,7 +135,7 @@ Item {
Connections {
target: conversationModel
onFilePathReceived: {
function onFilePathReceived() {
if (root.uniqueIdentifier == fileName && root.sourcePath == "") {
root.sourcePath = "file:" + filePath