diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:04:57 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 03:04:57 +0200 |
commit | 243341a9a1bc178318f1345e663542c403fc3317 (patch) | |
tree | 7b55f7eae11d6260186db6633ccc3f22f4e7fd70 | |
parent | 05b9ce7ba740e92f14f1bc7261be4dbcce846b4f (diff) | |
parent | dbd8eb64fb444c9a8c2658a6d514b32167beca55 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ie329290402cd620654e82cc0eb41e06dea2893d8
3 files changed, 26 insertions, 23 deletions
diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml index da064820..6bf48bff 100644 --- a/src/virtualkeyboard/content/components/Keyboard.qml +++ b/src/virtualkeyboard/content/components/Keyboard.qml @@ -103,16 +103,16 @@ Item { } Connections { target: VirtualKeyboardSettings - onLocaleChanged: { + function onLocaleChanged() { updateDefaultLocale() localeIndex = defaultLocaleIndex } - onActiveLocalesChanged: { + function onActiveLocalesChanged() { updateDefaultLocale() if (!isValidLocale(localeIndex) || VirtualKeyboardSettings.locale) localeIndex = defaultLocaleIndex } - onFullScreenModeChanged: { + function onFullScreenModeChanged() { wordCandidateView.disableAnimation = VirtualKeyboardSettings.fullScreenMode keyboard.fullScreenMode = VirtualKeyboardSettings.fullScreenMode } @@ -151,23 +151,23 @@ Item { Connections { target: InputContext - onInputMethodHintsChanged: { + function onInputMethodHintsChanged() { if (InputContext.priv.focus) updateInputMethod() } } Connections { target: InputContext.priv - onInputItemChanged: { + function onInputItemChanged() { keyboard.hideLanguagePopup() if (active && symbolMode && !preferNumbers) symbolMode = false } - onFocusChanged: { + function onFocusChanged() { if (InputContext.priv.focus) updateInputMethod() } - onNavigationKeyPressed: { + function onNavigationKeyPressed(key, isAutoRepeat) { var initialKey var direction = wordCandidateView.effectiveLayoutDirection == Qt.LeftToRight ? 1 : -1 switch (key) { @@ -391,7 +391,7 @@ Item { break } } - onNavigationKeyReleased: { + function onNavigationKeyReleased(key, isAutoRepeat) { switch (key) { case Qt.Key_Return: if (!keyboard.navigationModeActive) { @@ -437,7 +437,7 @@ Item { } Connections { target: InputContext.inputEngine - onVirtualKeyClicked: { + function onVirtualKeyClicked(key, text, modifiers, isAutoRepeat) { if (isAutoRepeat && keyboard.activeKey) soundEffect.play(keyboard.activeKey.soundEffect) if (key !== Qt.Key_unknown && keyboardInputArea.dragSymbolMode) { @@ -457,7 +457,7 @@ Item { } Connections { target: layoutsModel - onCountChanged: { + function onCountChanged() { updateDefaultLocale() localeIndex = defaultLocaleIndex } @@ -624,7 +624,7 @@ Item { Connections { target: keyboard - onActiveChanged: { + function onActiveChanged() { if (keyboard.active) shadowInputControlVisibleTimer.start() else @@ -682,9 +682,9 @@ Item { onCurrentItemChanged: if (currentItem) soundEffect.register(currentItem.soundEffect) Connections { target: wordCandidateView.model ? wordCandidateView.model : null - onActiveItemChanged: wordCandidateView.currentIndex = index - onItemSelected: if (wordCandidateView.currentItem) soundEffect.play(wordCandidateView.currentItem.soundEffect) - onCountChanged: { + function onActiveItemChanged(index) { wordCandidateView.currentIndex = index } + function onItemSelected() { if (wordCandidateView.currentItem) soundEffect.play(wordCandidateView.currentItem.soundEffect) } + function onCountChanged() { var empty = wordCandidateView.model.count === 0 if (empty) wordCandidateViewAutoHideTimer.restart() @@ -696,11 +696,11 @@ Item { } Connections { target: InputContext.priv - onInputItemChanged: wordCandidateViewAutoHideTimer.stop() + function onInputItemChanged() { wordCandidateViewAutoHideTimer.stop() } } Connections { target: InputContext.inputEngine - onWordCandidateListVisibleHintChanged: wordCandidateViewAutoHideTimer.stop() + function onWordCandidateListVisibleHintChanged() { wordCandidateViewAutoHideTimer.stop() } } Timer { id: wordCandidateViewAutoHideTimer @@ -751,7 +751,7 @@ Item { Connections { target: VirtualKeyboardSettings - onStyleNameChanged: { + function onStyleNameChanged() { soundEffect.__sounds = {} soundEffect.available = false } @@ -841,7 +841,7 @@ Item { Connections { target: keyboardLayoutLoader - onStatusChanged: { + function onStatusChanged() { if (keyboardLayoutLoader.status == Loader.Ready && keyboard.navigationModeActive && keyboardInputArea.navigationCursor !== Qt.point(-1, -1)) @@ -850,7 +850,7 @@ Item { } Connections { target: keyboard - onNavigationModeActiveChanged: { + function onNavigationModeActiveChanged() { if (!keyboard.navigationModeActive) { keyboardInputArea.navigationCursor = Qt.point(-1, -1) keyboardInputArea.reset() diff --git a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml index aa7ae714..f3dc4ace 100644 --- a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml @@ -47,12 +47,12 @@ HandwritingInputPanel { Connections { target: InputContext - onPreeditTextChanged: if (InputContext.preeditText.length > 0) inputMethodResult(InputContext.preeditText) + function onPreeditTextChanged() { if (InputContext.preeditText.length > 0) inputMethodResult(InputContext.preeditText) } } Connections { target: InputContext.inputEngine - onVirtualKeyClicked: inputMethodResult(text) + function onVirtualKeyClicked(key, text, modifiers, isAutoRepeat) { inputMethodResult(text) } } SignalSpy { diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml index 62361824..dd46a5b9 100644 --- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml @@ -101,12 +101,15 @@ InputPanel { Connections { target: InputContext - onPreeditTextChanged: if (InputContext.preeditText.length > 0) inputMethodResult(InputContext.preeditText) + function onPreeditTextChanged() { + if (InputContext.preeditText.length > 0) + inputMethodResult(InputContext.preeditText) + } } Connections { target: InputContext.inputEngine - onVirtualKeyClicked: inputMethodResult(text) + function onVirtualKeyClicked(key, text, modifiers, isAutoRepeat) { inputMethodResult(text) } } SignalSpy { |