From 6d429be4d77841218d89f5e563593fb39812395d Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Wed, 19 Sep 2018 23:06:22 +0300 Subject: tests: Backport test_wclAutoCommitWordSetting from 5.12 Fixes flaky test. Task-number: QTBUG-62518 Task-number: QTBUG-61279 Task-number: QTQAINFRA-2226 Change-Id: I55208710ed4b9699fde6643438b23148cb7c7240 Reviewed-by: Mitch Curtis --- tests/auto/inputpanel/data/inputpanel/inputpanel.qml | 7 +++++++ tests/auto/inputpanel/data/tst_inputpanel.qml | 11 +++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml index ded8aee3..517caadb 100644 --- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml @@ -88,6 +88,7 @@ InputPanel { property alias soundEffectSpy: soundEffectSpy property alias inputMethodResultSpy: inputMethodResultSpy property alias wordCandidateListChangedSpy: wordCandidateListChangedSpy + property alias inputMethodSelectionListChangedSpy: inputMethodSelectionListChangedSpy property alias wordCandidateListVisibleSpy: wordCandidateListVisibleSpy property alias shiftStateSpy: shiftStateSpy property alias shadowInputControlVisibleSpy: shadowInputControlVisibleSpy @@ -171,6 +172,12 @@ InputPanel { signalName: "dataChanged" } + SignalSpy { + id: inputMethodSelectionListChangedSpy + target: InputContext.inputEngine.inputMethod + signalName: "selectionListChanged" + } + SignalSpy { id: wordCandidateListVisibleSpy target: wordCandidateView diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml index 91371fef..10a9b906 100644 --- a/tests/auto/inputpanel/data/tst_inputpanel.qml +++ b/tests/auto/inputpanel/data/tst_inputpanel.qml @@ -1685,19 +1685,14 @@ Rectangle { skip("Prediction/spell correction not enabled") for (var len = 1; len <= 5; ++len) { - inputPanel.wordCandidateListChangedSpy.clear() inputPanel.virtualKeyClick("z") - waitForRendering(inputPanel) - if (len >= 3) { - if (data.wclAutoCommitWord) - tryVerify(function() { return inputPanel.wordCandidateView.model.count === 0 }, 500) - else - wait(500) + if (len >= 2) { + inputPanel.inputMethodSelectionListChangedSpy.clear() + inputPanel.inputMethodSelectionListChangedSpy.wait() if (inputPanel.wordCandidateView.model.count <= 1) break } } - waitForRendering(inputPanel) if (data.wclAutoCommitWord) compare(inputPanel.wordCandidateView.model.count, 0) -- cgit v1.2.3 From 50d1d95af5cb271285abb4375e63ca28cbadd77a Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Mon, 24 Sep 2018 10:23:19 +0300 Subject: tests: Verify current item in selectionListSelectCurrentItem For investigating flaky tests. Task-number: QTBUG-62518 Task-number: QTBUG-61279 Task-number: QTQAINFRA-2226 Change-Id: I447f8e4a332b60df617c834fc3ccbf4e3f6a47ce Reviewed-by: Mitch Curtis --- tests/auto/inputpanel/data/inputpanel/inputpanel.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml index 517caadb..18ca94b4 100644 --- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml @@ -579,6 +579,17 @@ InputPanel { if (!inputPanel.wordCandidateView.currentItem) return false testcase.wait(200) + testcase.verify(inputPanel.wordCandidateView.currentItem, + "Expected wordCandidateView to have a currentItem, but it's null." + + " Its property values at the time of failure are:" + + " x=" + inputPanel.wordCandidateView.x + + " y=" + inputPanel.wordCandidateView.y + + " width=" + inputPanel.wordCandidateView.width + + " height=" + inputPanel.wordCandidateView.height + + " count=" + inputPanel.wordCandidateView.count + + " flicking=" + inputPanel.wordCandidateView.flicking + + " moving=" + inputPanel.wordCandidateView.moving + + " visible=" + inputPanel.wordCandidateView.visible) var itemPos = inputPanel.mapFromItem(inputPanel.wordCandidateView.currentItem, inputPanel.wordCandidateView.currentItem.width / 2, inputPanel.wordCandidateView.currentItem.height / 2) -- cgit v1.2.3 From 8b3a4d6f305955171a595ad93460346c58df51d7 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Mon, 24 Sep 2018 11:12:22 +0300 Subject: Fix word candidate list auto hiding Stop auto hide timer when the word candidate list is not empty. Constantly failing CI bot revealed this error: agent:2018/09/24 07:50:50 build.go:193: FAIL! : inputpanel::tst_plugin::test_zhuyinInputMethod(row 17) 'Expected wordCandidateView to have a currentItem, but it's null. Its property values at the time of failure are: x=0 y=-9.478976 width=400 height=13 count=0 flicking=false moving=false visible=false' returned FALSE. () Task-number: QTBUG-62518 Task-number: QTBUG-61279 Task-number: QTQAINFRA-2226 Change-Id: I775aa834da9809008a34fc760e994610ad6e95a8 Reviewed-by: Mitch Curtis --- src/virtualkeyboard/content/components/Keyboard.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml index 012ec48a..47e6d9cb 100644 --- a/src/virtualkeyboard/content/components/Keyboard.qml +++ b/src/virtualkeyboard/content/components/Keyboard.qml @@ -619,6 +619,8 @@ Item { var empty = wordCandidateView.model.count === 0 if (empty) wordCandidateViewAutoHideTimer.restart() + else + wordCandidateViewAutoHideTimer.stop() wordCandidateView.empty = empty } } -- cgit v1.2.3 From 3f152060b4072cb9aea5ca98d956b22a25c25697 Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Tue, 18 Sep 2018 17:04:47 +0200 Subject: Doc: Use correct image in virtual keyboard layout docs Task-number: QTBUG-70602 Change-Id: I04a7015b6ee41dd9676f8b5859399e9758e7de1f Reviewed-by: Mitch Curtis --- src/virtualkeyboard/doc/src/layouts.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtualkeyboard/doc/src/layouts.qdoc b/src/virtualkeyboard/doc/src/layouts.qdoc index 231f6cb2..044732f1 100644 --- a/src/virtualkeyboard/doc/src/layouts.qdoc +++ b/src/virtualkeyboard/doc/src/layouts.qdoc @@ -150,7 +150,7 @@ The next sections illustrate each layout. \section2 Romanian Layout -\image layouts/qtvirtualkeyboard-layout-ar_AR.png +\image layouts/qtvirtualkeyboard-layout-ro_RO.png \section2 Russian Layout -- cgit v1.2.3