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 { Connections {
target: plugin target: plugin
onNowPlayingChanged: { function onNowPlayingChanged() {
item.value = lastPosition item.value = lastPosition
} }
} }

View file

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

View file

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

View file

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