aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/cmake/CMakeLists.txt12
-rw-r--r--tests/auto/cmake/cmake.pro6
-rw-r--r--tests/auto/inputpanel/BLACKLIST14
-rw-r--r--tests/auto/inputpanel/data/inputpanel/handwriting.js7
-rw-r--r--tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml9
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml200
-rw-r--r--tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js854
-rw-r--r--tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js1930
-rw-r--r--tests/auto/inputpanel/data/tst_inputpanel.qml447
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt208
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt46
-rw-r--r--tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt276
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt89
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt41
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt29
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt82
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt72
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt88
-rw-r--r--tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt71
-rw-r--r--tests/auto/inputpanel/tst_inputpanel.cpp15
-rw-r--r--tests/auto/layoutfilesystem/data/layouts/en_GB/main.qml2
-rw-r--r--tests/auto/layoutresources/data/layouts/en_GB/main.qml2
23 files changed, 3683 insertions, 819 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 6b71c159..15685d5f 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -5,4 +5,4 @@ SUBDIRS += \
styles \
layoutfilesystem \
layoutresources \
-
+ cmake \
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
new file mode 100644
index 00000000..3d77b9e5
--- /dev/null
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(qmake_cmake_files)
+
+enable_testing()
+
+find_package(Qt5Core REQUIRED)
+
+include("${_Qt5CTestMacros}")
+
+test_module_includes(
+)
diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro
new file mode 100644
index 00000000..f8635657
--- /dev/null
+++ b/tests/auto/cmake/cmake.pro
@@ -0,0 +1,6 @@
+# Cause make to do nothing.
+TEMPLATE = subdirs
+
+CMAKE_QT_MODULES_UNDER_TEST = virtualkeyboard
+
+CONFIG += ctest_testcase
diff --git a/tests/auto/inputpanel/BLACKLIST b/tests/auto/inputpanel/BLACKLIST
deleted file mode 100644
index 462882f7..00000000
--- a/tests/auto/inputpanel/BLACKLIST
+++ /dev/null
@@ -1,14 +0,0 @@
-# QTBUG-61279
-# Test fails if hunspell support is enabled in qtvirtualkeyboard
-# and hunspell-en-gb is installed to the system
-[tst_plugin::test_wclAutoCommitWordSetting:row 0]
-b2qt
-
-# QTBUG-65507
-[tst_plugin::test_inputMethodHints:row 8]
-b2qt
-
-# QTBUG-65507
-[tst_plugin::test_shiftCapsLock:row 1]
-b2qt
-
diff --git a/tests/auto/inputpanel/data/inputpanel/handwriting.js b/tests/auto/inputpanel/data/inputpanel/handwriting.js
index a4c4ec1a..0721f141 100644
--- a/tests/auto/inputpanel/data/inputpanel/handwriting.js
+++ b/tests/auto/inputpanel/data/inputpanel/handwriting.js
@@ -38,14 +38,17 @@
.import "unipen_data_cyrillic.js" as UnipenDataCyrillic
.import "unipen_data_arabic.js" as UnipenDataArabic
.import "unipen_data_hebrew.js" as UnipenDataHebrew
+.import "unipen_data_vietnamese.js" as UnipenDataVietnamese
-function emulate(testcase, hwrInputArea, ch, instant) {
+function emulate(testcase, hwrInputArea, ch, instant, locale) {
var chKey = (((typeof ch == "number") ? ch : ch.charCodeAt(0)) + 0x100000000).toString(16).substr(1)
while (chKey.length > 4 && chKey[0] === '0')
chKey = chKey.substring(1)
chKey = "0x" + chKey
var unipenData
- if (UnipenData.unipenData.hasOwnProperty(chKey))
+ if (locale === "vi_VN" && UnipenDataVietnamese.unipenData.hasOwnProperty(chKey))
+ unipenData = UnipenDataVietnamese
+ else if (UnipenData.unipenData.hasOwnProperty(chKey))
unipenData = UnipenData
else if (UnipenDataSimpChinese.unipenData.hasOwnProperty(chKey))
unipenData = UnipenDataSimpChinese
diff --git a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
index 692116d0..aa7ae714 100644
--- a/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/handwritinginputpanel.qml
@@ -38,6 +38,7 @@ HandwritingInputPanel {
z: 99
property var testcase
+ readonly property var inputMethod: InputContext.inputEngine.inputMethod
readonly property var wordCandidatePopupList: Utils.findChildByProperty(handwritingInputPanel, "objectName", "wordCandidatePopupList", null)
anchors.fill: parent
@@ -129,7 +130,15 @@ HandwritingInputPanel {
console.warn("Cannot produce the symbol '%1' in full screen handwriting mode".arg(ch))
return false
}
+ if (isSuperimposedHandwriting())
+ return true;
inputMethodResultSpy.wait(3000)
return inputMethodResultSpy.count > 0
}
+
+ function isSuperimposedHandwriting() {
+ if (!available)
+ return false
+ return inputMethod != null && inputMethod.hasOwnProperty("superimposed") && inputMethod.superimposed;
+ }
}
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index 18ca94b4..79526c91 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -47,8 +47,8 @@ InputPanel {
readonly property int cursorPosition: InputContext.cursorPosition
readonly property string preeditText: InputContext.preeditText
readonly property string surroundingText: InputContext.surroundingText
- readonly property bool autoCapitalizationEnabled: InputContext.shiftHandler.autoCapitalizationEnabled
- readonly property bool toggleShiftEnabled: InputContext.shiftHandler.toggleShiftEnabled
+ readonly property bool autoCapitalizationEnabled: InputContext.priv.shiftHandler.autoCapitalizationEnabled
+ readonly property bool toggleShiftEnabled: InputContext.priv.shiftHandler.toggleShiftEnabled
readonly property string locale: keyboard.locale
readonly property string defaultLocale: VirtualKeyboardSettings.locale
readonly property var availableLocales: VirtualKeyboardSettings.availableLocales
@@ -67,6 +67,7 @@ InputPanel {
naviationHighlight.widthAnimation.running ||
naviationHighlight.heightAnimation.running
readonly property var wordCandidateView: Utils.findChildByProperty(keyboard, "objectName", "wordCandidateView", null)
+ readonly property var wordCandidateContextMenu: Utils.findChildByProperty(keyboard, "objectName", "wordCandidateContextMenu", null)
readonly property var shadowInputControl: Utils.findChildByProperty(keyboard, "objectName", "shadowInputControl", null)
readonly property var shadowInput: Utils.findChildByProperty(keyboard, "objectName", "shadowInput", null)
readonly property var selectionControl: Utils.findChildByProperty(inputPanel, "objectName", "selectionControl", null)
@@ -96,6 +97,8 @@ InputPanel {
signal inputMethodResult(var text)
+ LayoutMirroring.childrenInherit: true
+
Connections {
target: InputContext
onPreeditTextChanged: if (InputContext.preeditText.length > 0) inputMethodResult(InputContext.preeditText)
@@ -185,9 +188,15 @@ InputPanel {
}
SignalSpy {
+ id: wordCandidateContextMenuActiveSpy
+ target: wordCandidateContextMenu
+ signalName: "onActiveChanged"
+ }
+
+ SignalSpy {
id: shiftStateSpy
target: InputContext
- signalName: "onShiftChanged"
+ signalName: "onShiftActiveChanged"
}
SignalSpy {
@@ -258,39 +267,39 @@ InputPanel {
function mapInputMode(inputModeName) {
if (inputModeName === "Latin")
- return InputEngine.Latin
+ return InputEngine.InputMode.Latin
else if (inputModeName === "Numeric")
- return InputEngine.Numeric
+ return InputEngine.InputMode.Numeric
else if (inputModeName === "Dialable")
- return InputEngine.Dialable
+ return InputEngine.InputMode.Dialable
else if (inputModeName === "Pinyin")
- return InputEngine.Pinyin
+ return InputEngine.InputMode.Pinyin
else if (inputModeName === "Cangjie")
- return InputEngine.Cangjie
+ return InputEngine.InputMode.Cangjie
else if (inputModeName === "Zhuyin")
- return InputEngine.Zhuyin
+ return InputEngine.InputMode.Zhuyin
else if (inputModeName === "Hangul")
- return InputEngine.Hangul
+ return InputEngine.InputMode.Hangul
else if (inputModeName === "Hiragana")
- return InputEngine.Hiragana
+ return InputEngine.InputMode.Hiragana
else if (inputModeName === "Katakana")
- return InputEngine.Katakana
+ return InputEngine.InputMode.Katakana
else if (inputModeName === "FullwidthLatin")
- return InputEngine.FullwidthLatin
+ return InputEngine.InputMode.FullwidthLatin
else if (inputModeName === "Greek")
- return InputEngine.Greek
+ return InputEngine.InputMode.Greek
else if (inputModeName === "Cyrillic")
- return InputEngine.Cyrillic
+ return InputEngine.InputMode.Cyrillic
else if (inputModeName === "Arabic")
- return InputEngine.Arabic
+ return InputEngine.InputMode.Arabic
else if (inputModeName === "Hebrew")
- return InputEngine.Hebrew
+ return InputEngine.InputMode.Hebrew
else if (inputModeName === "ChineseHandwriting")
- return InputEngine.ChineseHandwriting
+ return InputEngine.InputMode.ChineseHandwriting
else if (inputModeName === "JapaneseHandwriting")
- return InputEngine.JapaneseHandwriting
+ return InputEngine.InputMode.JapaneseHandwriting
else if (inputModeName === "KoreanHandwriting")
- return InputEngine.KoreanHandwriting
+ return InputEngine.InputMode.KoreanHandwriting
else
return -1
}
@@ -307,10 +316,83 @@ InputPanel {
return true
}
+ function testPublicEnums() {
+ // Scoped
+ testcase.verify(InputEngine.TextCase.Lower !== undefined)
+ testcase.verify(InputEngine.TextCase.Upper !== undefined)
+ testcase.verify(InputEngine.InputMode.Latin !== undefined)
+ testcase.verify(InputEngine.InputMode.Numeric !== undefined)
+ testcase.verify(InputEngine.InputMode.Dialable !== undefined)
+ testcase.verify(InputEngine.InputMode.Pinyin !== undefined)
+ testcase.verify(InputEngine.InputMode.Cangjie !== undefined)
+ testcase.verify(InputEngine.InputMode.Zhuyin !== undefined)
+ testcase.verify(InputEngine.InputMode.Hangul !== undefined)
+ testcase.verify(InputEngine.InputMode.Hiragana !== undefined)
+ testcase.verify(InputEngine.InputMode.Katakana !== undefined)
+ testcase.verify(InputEngine.InputMode.FullwidthLatin !== undefined)
+ testcase.verify(InputEngine.InputMode.Greek !== undefined)
+ testcase.verify(InputEngine.InputMode.Cyrillic !== undefined)
+ testcase.verify(InputEngine.InputMode.Arabic !== undefined)
+ testcase.verify(InputEngine.InputMode.Hebrew !== undefined)
+ testcase.verify(InputEngine.InputMode.ChineseHandwriting !== undefined)
+ testcase.verify(InputEngine.InputMode.JapaneseHandwriting !== undefined)
+ testcase.verify(InputEngine.InputMode.KoreanHandwriting !== undefined)
+ testcase.verify(InputEngine.PatternRecognitionMode.None !== undefined)
+ testcase.verify(InputEngine.PatternRecognitionMode.PatternRecognitionDisabled !== undefined)
+ testcase.verify(InputEngine.PatternRecognitionMode.Handwriting !== undefined)
+ testcase.verify(InputEngine.PatternRecognitionMode.HandwritingRecoginition !== undefined)
+ testcase.verify(InputEngine.ReselectFlag.WordBeforeCursor !== undefined)
+ testcase.verify(InputEngine.ReselectFlag.WordAfterCursor !== undefined)
+ testcase.verify(InputEngine.ReselectFlag.WordAtCursor !== undefined)
+ testcase.verify(SelectionListModel.Type.WordCandidateList !== undefined)
+ testcase.verify(SelectionListModel.Role.Display !== undefined)
+ testcase.verify(SelectionListModel.Role.WordCompletionLength !== undefined)
+ testcase.verify(SelectionListModel.Role.Dictionary !== undefined)
+ testcase.verify(SelectionListModel.DictionaryType.Default !== undefined)
+ testcase.verify(SelectionListModel.DictionaryType.User !== undefined)
+ // Unscoped
+ testcase.verify(InputEngine.Lower !== undefined)
+ testcase.verify(InputEngine.Upper !== undefined)
+ testcase.verify(InputEngine.Latin !== undefined)
+ testcase.verify(InputEngine.Numeric !== undefined)
+ testcase.verify(InputEngine.Dialable !== undefined)
+ testcase.verify(InputEngine.Pinyin !== undefined)
+ testcase.verify(InputEngine.Cangjie !== undefined)
+ testcase.verify(InputEngine.Zhuyin !== undefined)
+ testcase.verify(InputEngine.Hangul !== undefined)
+ testcase.verify(InputEngine.Hiragana !== undefined)
+ testcase.verify(InputEngine.Katakana !== undefined)
+ testcase.verify(InputEngine.FullwidthLatin !== undefined)
+ testcase.verify(InputEngine.Greek !== undefined)
+ testcase.verify(InputEngine.Cyrillic !== undefined)
+ testcase.verify(InputEngine.Arabic !== undefined)
+ testcase.verify(InputEngine.Hebrew !== undefined)
+ testcase.verify(InputEngine.ChineseHandwriting !== undefined)
+ testcase.verify(InputEngine.JapaneseHandwriting !== undefined)
+ testcase.verify(InputEngine.KoreanHandwriting !== undefined)
+ testcase.verify(InputEngine.None !== undefined)
+ testcase.verify(InputEngine.PatternRecognitionDisabled !== undefined)
+ testcase.verify(InputEngine.Handwriting !== undefined)
+ testcase.verify(InputEngine.HandwritingRecoginition !== undefined)
+ testcase.verify(InputEngine.WordBeforeCursor !== undefined)
+ testcase.verify(InputEngine.WordAfterCursor !== undefined)
+ testcase.verify(InputEngine.WordAtCursor !== undefined)
+ testcase.verify(SelectionListModel.WordCandidateList !== undefined)
+ testcase.verify(SelectionListModel.DisplayRole !== undefined)
+ testcase.verify(SelectionListModel.WordCompletionLengthRole !== undefined)
+ testcase.verify(SelectionListModel.DictionaryType !== undefined)
+ testcase.verify(SelectionListModel.Default !== undefined)
+ testcase.verify(SelectionListModel.User !== undefined)
+ }
+
function setExternalLanguageSwitchEnabled(enabled) {
externalLanguageSwitchEnabled = enabled
}
+ function setLayoutMirroring(enabled) {
+ LayoutMirroring.enabled = enabled
+ }
+
function findVirtualKey(key) {
return Utils.findChild(keyboardLayoutLoader, key, function(obj, param) {
if (!obj.hasOwnProperty("key") || !obj.hasOwnProperty("text"))
@@ -351,7 +433,7 @@ InputPanel {
testcase.wait(20)
if (alternativeKey) {
alternativeKeysSpy.wait()
- var keyIndex = keyObj.effectiveAlternativeKeys.indexOf(key)
+ var keyIndex = keyObj.effectiveAlternativeKeys.indexOf(key.toLowerCase())
var itemX = keyIndex * keyboard.style.alternateKeysListItemWidth + keyboard.style.alternateKeysListItemWidth / 2
virtualKeyPressPoint.x = inputPanel.mapFromItem(alternativeKeys.listView, itemX, 0).x
testcase.mouseMove(inputPanel, virtualKeyPressPoint.x, virtualKeyPressPoint.y)
@@ -383,12 +465,15 @@ InputPanel {
}
} else if (typeof key != "number" || key !== Qt.Key_Shift) {
// Some layouts (such as Arabic, Hindi) may have a second layout
- virtualKeyPress(Qt.Key_Shift)
- InputContext.shiftHandler.clearToggleShiftTimer()
+ virtualKeyClick(Qt.Key_Shift)
+ InputContext.priv.shiftHandler.clearToggleShiftTimer()
testcase.waitForRendering(inputPanel)
success = keyActionOnCurrentLayoutCb(key)
- virtualKeyPress(Qt.Key_Shift)
- InputContext.shiftHandler.clearToggleShiftTimer()
+ if (!success) {
+ virtualKeyClick(Qt.Key_Shift)
+ InputContext.priv.shiftHandler.clearToggleShiftTimer()
+ testcase.waitForRendering(inputPanel)
+ }
}
if (success)
break
@@ -521,6 +606,8 @@ InputPanel {
function activateNavigationKeyMode() {
if (!inputPanel.naviationHighlight.visible) {
+ inputPanel.naviationHighlight.moveDuration = 0
+ inputPanel.naviationHighlight.resizeDuration = 0
emulateNavigationKeyClick(Qt.Key_Right)
if (inputPanel.naviationHighlight.visible) {
while (inputPanel.naviationHighlightAnimating)
@@ -531,7 +618,15 @@ InputPanel {
}
function toggleShift() {
- InputContext.shiftHandler.toggleShift()
+ InputContext.priv.shiftHandler.toggleShift()
+ }
+
+ function setShiftActive(shiftActive) {
+ InputContext.priv.shiftHandler.shiftActive = shiftActive
+ }
+
+ function setCapsLockActive(capsLockActive) {
+ InputContext.priv.shiftHandler.capsLockActive = capsLockActive
}
function style() {
@@ -598,6 +693,48 @@ InputPanel {
return true
}
+ function selectionListCurrentIndex() {
+ return inputPanel.wordCandidateView.currentIndex
+ }
+
+ function selectionListSuggestionIsFromUserDictionary() {
+ if (!inputPanel.wordCandidateView.currentItem)
+ return false
+ var dictionaryType = inputPanel.wordCandidateView.model.dataAt(inputPanel.wordCandidateView.currentIndex, SelectionListModel.Role.Dictionary)
+ return dictionaryType !== undefined && dictionaryType === SelectionListModel.DictionaryType.User
+ }
+
+ function openWordCandidateContextMenu() {
+ if (!inputPanel.wordCandidateView.currentItem)
+ return false
+ testcase.wait(200)
+ wordCandidateContextMenuActiveSpy.clear()
+ testcase.mousePress(inputPanel.wordCandidateView.currentItem)
+ wordCandidateContextMenuActiveSpy.wait()
+ testcase.mouseRelease(inputPanel.wordCandidateView.currentItem)
+ return wordCandidateContextMenu.active
+ }
+
+ function selectItemFromWordCandidateContextMenu(index) {
+ if (!inputPanel.wordCandidateView.currentItem)
+ return false
+ if (!wordCandidateContextMenu.active)
+ return false
+ var wordCandidateContextMenuList = Utils.findChildByProperty(keyboard, "objectName", "wordCandidateContextMenuList", null)
+ if (wordCandidateContextMenuList.currentIndex !== index) {
+ wordCandidateContextMenuList.currentIndex = index
+ testcase.waitForRendering(inputPanel)
+ }
+ if (!wordCandidateContextMenuList.currentItem)
+ return false
+ var itemPos = inputPanel.mapFromItem(wordCandidateContextMenuList.currentItem,
+ wordCandidateContextMenuList.currentItem.width / 2,
+ wordCandidateContextMenuList.currentItem.height / 2)
+ testcase.mouseClick(inputPanel, itemPos.x, itemPos.y, Qt.LeftButton, 0, 20)
+ testcase.waitForRendering(inputPanel)
+ return true
+ }
+
function setHandwritingMode(enabled) {
if (inputPanel.keyboard.handwritingMode !== enabled) {
if (!enabled || inputPanel.keyboard.isHandwritingAvailable())
@@ -611,13 +748,22 @@ InputPanel {
return false
var hwrInputArea = Utils.findChildByProperty(keyboard, "objectName", "hwrInputArea", null)
inputMethodResultSpy.clear()
- if (!Handwriting.emulate(testcase, hwrInputArea, ch, instant)) {
+ if (!Handwriting.emulate(testcase, hwrInputArea, ch, instant,
+ VirtualKeyboardSettings.locale)) {
if (virtualKeyClick(ch))
return true
console.warn("Cannot produce the symbol '%1' in handwriting mode".arg(ch))
return false
}
+ if (isSuperimposedHandwriting())
+ return true
inputMethodResultSpy.wait(3000)
return inputMethodResultSpy.count > 0
}
+
+ function isSuperimposedHandwriting() {
+ if (!inputPanel.keyboard.handwritingMode)
+ return false
+ return inputMethod != null && inputMethod.hasOwnProperty("superimposed") && inputMethod.superimposed
+ }
}
diff --git a/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js b/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
index 1b487c49..db30adda 100644
--- a/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
+++ b/tests/auto/inputpanel/data/inputpanel/unipen_data_korean.js
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
@@ -38,528 +38,528 @@ var unipenData = {
".PEN": [
[
[
- 379,
+ 344,
53,
0
],
[
- 380,
+ 345,
53,
155
],
[
- 382,
+ 347,
53,
177
],
[
- 385,
+ 350,
53,
179
],
[
- 391,
+ 356,
53,
243
],
[
- 400,
+ 365,
53,
244
],
[
- 421,
+ 386,
55,
311
],
[
- 437,
+ 402,
55,
313
],
[
- 441,
+ 406,
55,
315
],
[
- 448,
+ 413,
55,
365
],
[
- 454,
+ 419,
55,
366
],
[
- 461,
+ 426,
55,
370
],
[
- 467,
+ 432,
54,
426
],
[
- 472,
+ 437,
54,
427
],
[
- 475,
+ 440,
54,
486
],
[
- 477,
+ 442,
54,
487
],
[
- 478,
+ 443,
54,
490
],
[
- 479,
+ 444,
54,
548
],
[
- 480,
+ 445,
54,
549
],
[
- 482,
+ 447,
54,
610
],
[
- 485,
+ 450,
54,
610
],
[
- 488,
+ 453,
54,
670
],
[
- 489,
+ 454,
54,
731
],
[
- 489,
+ 454,
55,
939
],
[
- 489,
+ 454,
56,
1003
],
[
- 489,
+ 454,
60,
1004
],
[
- 489,
+ 454,
64,
1064
],
[
- 489,
+ 454,
66,
1065
],
[
- 489,
+ 454,
72,
1124
],
[
- 489,
+ 454,
75,
1125
],
[
- 489,
+ 454,
79,
1131
],
[
- 489,
+ 454,
81,
1184
],
[
- 489,
+ 454,
86,
1185
],
[
- 489,
+ 454,
91,
1245
],
[
- 489,
+ 454,
92,
1246
],
[
- 489,
+ 454,
97,
1306
],
[
- 489,
+ 454,
99,
1307
],
[
- 489,
+ 454,
101,
1366
],
[
- 489,
+ 454,
102,
1367
],
[
- 489,
+ 454,
103,
1427
],
[
- 489,
+ 454,
105,
1429
],
[
- 489,
+ 454,
106,
1500
],
[
- 489,
+ 454,
107,
1549
],
[
- 489,
+ 454,
108,
1550
],
[
- 489,
+ 454,
109,
1614
]
],
[
[
- 383,
+ 348,
113,
2999
],
[
- 384,
+ 349,
113,
3259
],
[
- 385,
+ 350,
112,
3291
],
[
- 386,
+ 351,
112,
3360
],
[
- 399,
+ 364,
112,
3361
],
[
- 412,
+ 377,
112,
3389
],
[
- 434,
+ 399,
112,
3449
],
[
- 440,
+ 405,
112,
3450
],
[
- 451,
+ 416,
112,
3451
],
[
- 455,
+ 420,
112,
3510
],
[
- 479,
+ 444,
111,
3511
],
[
- 493,
+ 458,
110,
3574
],
[
- 506,
+ 471,
109,
3576
],
[
- 513,
+ 478,
109,
3632
],
[
- 515,
+ 480,
109,
3633
],
[
- 516,
+ 481,
109,
3636
]
],
[
[
- 430,
+ 395,
115,
5767
],
[
- 430,
+ 395,
116,
5851
],
[
- 432,
+ 397,
120,
5884
],
[
- 433,
+ 398,
123,
5937
],
[
- 433,
+ 398,
127,
5938
],
[
- 434,
+ 399,
130,
6000
],
[
- 434,
+ 399,
133,
6002
],
[
- 435,
+ 400,
139,
6058
],
[
- 435,
+ 400,
141,
6059
],
[
- 435,
+ 400,
142,
6124
],
[
- 435,
+ 400,
143,
6523
]
],
[
[
- 393,
+ 358,
151,
7943
],
[
- 394,
+ 359,
151,
8099
],
[
- 399,
+ 364,
150,
8124
],
[
- 412,
+ 377,
150,
8184
],
[
- 422,
+ 387,
150,
8185
],
[
- 438,
+ 403,
150,
8245
],
[
- 448,
+ 413,
150,
8246
],
[
- 465,
+ 430,
149,
8305
],
[
- 478,
+ 443,
149,
8306
],
[
- 485,
+ 450,
149,
8366
],
[
- 487,
+ 452,
149,
8366
],
[
- 488,
+ 453,
149,
8432
],
[
- 489,
+ 454,
149,
8490
],
[
- 491,
+ 456,
149,
8492
],
[
- 492,
+ 457,
149,
8549
],
[
- 492,
+ 457,
150,
8835
],
[
- 492,
+ 457,
152,
8882
],
[
- 492,
+ 457,
155,
8883
],
[
- 492,
+ 457,
159,
8944
],
[
- 492,
+ 457,
163,
8945
],
[
- 492,
+ 457,
168,
9005
],
[
- 491,
+ 456,
173,
9005
],
[
- 491,
+ 456,
177,
9067
],
[
- 490,
+ 455,
182,
9068
],
[
- 490,
+ 455,
188,
9126
],
[
- 490,
+ 455,
192,
9126
],
[
- 490,
+ 455,
193,
9130
],
[
- 490,
+ 455,
196,
9188
],
[
- 490,
+ 455,
198,
9247
],
[
- 490,
+ 455,
200,
9247
],
[
- 490,
+ 455,
202,
9307
],
[
- 490,
+ 455,
203,
9308
]
@@ -871,108 +871,128 @@ var unipenData = {
],
[
625,
- 120,
- 3236
+ 121,
+ 3096
+ ],
+ [
+ 626,
+ 121,
+ 3155
+ ],
+ [
+ 628,
+ 121,
+ 3199
+ ],
+ [
+ 629,
+ 121,
+ 3254
+ ],
+ [
+ 631,
+ 121,
+ 3310
]
],
[
[
- 614,
+ 626,
42,
3848
],
[
- 614,
+ 626,
45,
3896
],
[
- 614,
+ 626,
47,
3897
],
[
- 614,
+ 626,
54,
3900
],
[
- 615,
+ 627,
63,
3958
],
[
- 617,
+ 629,
76,
3958
],
[
- 619,
+ 631,
92,
4017
],
[
- 620,
+ 632,
100,
4018
],
[
- 620,
+ 632,
115,
4078
],
[
- 620,
+ 632,
133,
4079
],
[
- 618,
+ 630,
141,
4084
],
[
- 616,
+ 628,
153,
4138
],
[
- 616,
+ 628,
157,
4139
],
[
- 615,
+ 627,
169,
4200
],
[
- 614,
+ 626,
176,
4201
],
[
- 614,
+ 626,
178,
4205
],
[
- 613,
+ 625,
184,
4260
],
[
- 613,
+ 625,
188,
4261
],
[
- 613,
+ 625,
190,
4420
],
[
- 613,
+ 625,
191,
4540
]
@@ -996,134 +1016,134 @@ var unipenData = {
".PEN": [
[
[
- 169,
- 59,
+ 224,
+ 27,
0
],
[
- 171,
- 59,
+ 223,
+ 27,
148
],
[
- 175,
- 59,
+ 222,
+ 34,
170
],
[
- 183,
- 59,
+ 222,
+ 39,
228
],
[
- 197,
- 59,
+ 223,
+ 46,
229
],
[
- 210,
- 59,
+ 223,
+ 47,
288
],
[
223,
- 61,
+ 50,
289
],
[
- 233,
- 61,
+ 224,
+ 53,
292
],
[
- 241,
- 61,
+ 224,
+ 56,
350
],
[
- 252,
- 62,
+ 224,
+ 57,
350
],
[
- 260,
- 62,
+ 225,
+ 59,
418
],
[
- 265,
- 62,
+ 225,
+ 61,
419
],
[
- 266,
+ 225,
62,
748
]
],
[
[
- 224,
- 27,
+ 169,
+ 59,
1367
],
[
- 223,
- 27,
+ 171,
+ 59,
1414
],
[
- 222,
- 34,
+ 175,
+ 59,
1444
],
[
- 222,
- 39,
+ 183,
+ 59,
1502
],
[
- 223,
- 46,
+ 197,
+ 59,
1503
],
[
- 223,
- 47,
+ 210,
+ 59,
1508
],
[
223,
- 50,
+ 61,
1566
],
[
- 224,
- 53,
+ 233,
+ 61,
1568
],
[
- 224,
- 56,
+ 241,
+ 61,
1629
],
[
- 224,
- 57,
+ 252,
+ 62,
1630
],
[
- 225,
- 59,
+ 260,
+ 62,
1630
],
[
- 225,
- 61,
+ 265,
+ 62,
1686
],
[
- 225,
+ 266,
62,
1687
]
@@ -1132,568 +1152,568 @@ var unipenData = {
[
244,
82,
- 3184
+ 2184
],
[
243,
81,
- 3259
+ 2259
],
[
242,
81,
- 3285
+ 2285
],
[
238,
80,
- 3349
+ 2349
],
[
225,
80,
- 3350
+ 2350
],
[
210,
80,
- 3412
+ 2412
],
[
198,
82,
- 3414
+ 2414
],
[
192,
84,
- 3474
+ 2474
],
[
186,
88,
- 3476
+ 2476
],
[
184,
90,
- 3478
+ 2478
],
[
180,
95,
- 3532
+ 2532
],
[
178,
100,
- 3533
+ 2533
],
[
178,
109,
- 3595
+ 2595
],
[
178,
117,
- 3598
+ 2598
],
[
181,
125,
- 3657
+ 2657
],
[
186,
130,
- 3658
+ 2658
],
[
194,
136,
- 3716
+ 2716
],
[
197,
137,
- 3717
+ 2717
],
[
199,
137,
- 3775
+ 2775
],
[
202,
137,
- 3776
+ 2776
],
[
204,
137,
- 3780
+ 2780
],
[
206,
137,
- 3835
+ 2835
],
[
223,
135,
- 3836
+ 2836
],
[
234,
133,
- 3897
+ 2897
],
[
240,
130,
- 3898
+ 2898
],
[
242,
129,
- 3900
+ 2900
],
[
244,
128,
- 3958
+ 2958
],
[
251,
120,
- 3959
+ 2959
],
[
253,
117,
- 4017
+ 3017
],
[
253,
114,
- 4020
+ 3020
],
[
253,
110,
- 4081
+ 3081
],
[
251,
104,
- 4083
+ 3083
],
[
249,
99,
- 4140
+ 3140
],
[
247,
95,
- 4141
+ 3141
],
[
243,
89,
- 4205
+ 3205
],
[
242,
86,
- 4206
+ 3206
],
[
242,
85,
- 4212
+ 3212
],
[
241,
84,
- 4284
+ 3284
],
[
240,
84,
- 4324
+ 3324
],
[
239,
84,
- 4596
- ]
- ],
- [
- [
- 177,
- 144,
- 6344
- ],
- [
- 178,
- 144,
- 6573
- ],
- [
- 178,
- 146,
- 6600
- ],
- [
- 179,
- 148,
- 6604
- ],
- [
- 179,
- 150,
- 6657
- ],
- [
- 180,
- 153,
- 6658
- ],
- [
- 181,
- 160,
- 6719
- ],
- [
- 182,
- 167,
- 6720
- ],
- [
- 183,
- 176,
- 6779
- ],
- [
- 184,
- 182,
- 6780
- ],
- [
- 184,
- 185,
- 6840
- ],
- [
- 185,
- 189,
- 6841
- ],
- [
- 186,
- 189,
- 7108
- ],
- [
- 195,
- 189,
- 7174
- ],
- [
- 206,
- 187,
- 7234
- ],
- [
- 213,
- 186,
- 7236
- ],
- [
- 219,
- 186,
- 7294
- ],
- [
- 224,
- 186,
- 7296
- ],
- [
- 233,
- 186,
- 7355
- ],
- [
- 241,
- 185,
- 7355
- ],
- [
- 252,
- 185,
- 7417
- ],
- [
- 262,
- 185,
- 7419
- ],
- [
- 268,
- 186,
- 7421
- ],
- [
- 276,
- 186,
- 7475
- ],
- [
- 281,
- 186,
- 7476
- ],
- [
- 289,
- 186,
- 7536
- ],
- [
- 290,
- 186,
- 7537
- ],
- [
- 291,
- 186,
- 7597
- ],
- [
- 292,
- 186,
- 7660
- ],
- [
- 293,
- 186,
- 7724
- ],
- [
- 294,
- 186,
- 7725
- ],
- [
- 295,
- 186,
- 8172
+ 3596
]
],
[
[
283,
25,
- 9136
+ 4344
],
[
283,
26,
- 9220
+ 4573
],
[
283,
27,
- 9244
+ 4600
],
[
283,
33,
- 9299
+ 4604
],
[
283,
41,
- 9300
+ 4657
],
[
282,
53,
- 9359
+ 4658
],
[
282,
65,
- 9359
+ 4719
],
[
282,
78,
- 9420
+ 4720
],
[
282,
92,
- 9421
+ 4779
],
[
281,
115,
- 9481
+ 4780
],
[
280,
124,
- 9482
+ 4840
],
[
279,
133,
- 9484
+ 4841
],
[
279,
135,
- 9542
+ 5108
],
[
278,
142,
- 9542
+ 5174
],
[
277,
148,
- 9605
+ 5234
],
[
277,
150,
- 9607
+ 5236
],
[
277,
151,
- 9764
+ 5294
],
[
277,
153,
- 9816
+ 5296
],
[
277,
154,
- 9876
+ 5355
],
[
277,
153,
- 10124
+ 5355
],
[
277,
151,
- 10180
+ 5417
]
],
[
[
282,
89,
- 10651
+ 6136
],
[
283,
89,
- 10796
+ 6220
],
[
286,
89,
- 10821
+ 6244
],
[
288,
88,
- 10879
+ 6299
],
[
291,
88,
- 10879
+ 6300
],
[
294,
88,
- 10941
+ 6359
],
[
295,
88,
- 10941
+ 6359
],
[
297,
88,
- 11003
+ 6420
],
[
298,
88,
- 11004
+ 6421
],
[
299,
88,
- 11061
+ 6481
],
[
300,
88,
- 11062
+ 6482
],
[
301,
88,
- 11121
+ 6484
],
[
302,
88,
- 11123
+ 6542
],
[
303,
88,
- 11185
+ 6542
],
[
304,
88,
- 11187
+ 6605
],
[
305,
88,
- 11189
+ 6607
],
[
306,
88,
- 11248
+ 6764
],
[
307,
88,
- 11249
+ 6816
],
[
309,
89,
- 11304
+ 6876
+ ]
+ ],
+ [
+ [
+ 177,
+ 144,
+ 7651
+ ],
+ [
+ 178,
+ 144,
+ 7796
+ ],
+ [
+ 178,
+ 146,
+ 7821
+ ],
+ [
+ 179,
+ 148,
+ 7879
+ ],
+ [
+ 179,
+ 150,
+ 7879
+ ],
+ [
+ 180,
+ 153,
+ 7941
+ ],
+ [
+ 181,
+ 160,
+ 7941
+ ],
+ [
+ 182,
+ 167,
+ 8003
+ ],
+ [
+ 183,
+ 176,
+ 8004
+ ],
+ [
+ 184,
+ 182,
+ 8061
+ ],
+ [
+ 184,
+ 185,
+ 8062
+ ],
+ [
+ 185,
+ 189,
+ 8121
+ ],
+ [
+ 186,
+ 189,
+ 8123
+ ],
+ [
+ 195,
+ 189,
+ 8185
+ ],
+ [
+ 206,
+ 187,
+ 8187
+ ],
+ [
+ 213,
+ 186,
+ 8189
+ ],
+ [
+ 219,
+ 186,
+ 8248
+ ],
+ [
+ 224,
+ 186,
+ 8249
+ ],
+ [
+ 233,
+ 186,
+ 8304
+ ],
+ [
+ 241,
+ 185,
+ 8304
+ ],
+ [
+ 252,
+ 185,
+ 8366
+ ],
+ [
+ 262,
+ 185,
+ 8368
+ ],
+ [
+ 268,
+ 186,
+ 8370
+ ],
+ [
+ 276,
+ 186,
+ 8424
+ ],
+ [
+ 281,
+ 186,
+ 8425
+ ],
+ [
+ 289,
+ 186,
+ 8485
+ ],
+ [
+ 290,
+ 186,
+ 8486
+ ],
+ [
+ 291,
+ 186,
+ 8546
+ ],
+ [
+ 292,
+ 186,
+ 8609
+ ],
+ [
+ 293,
+ 186,
+ 8673
+ ],
+ [
+ 294,
+ 186,
+ 8674
+ ],
+ [
+ 295,
+ 186,
+ 8738
]
]
],
diff --git a/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js b/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js
new file mode 100644
index 00000000..09d2fae6
--- /dev/null
+++ b/tests/auto/inputpanel/data/inputpanel/unipen_data_vietnamese.js
@@ -0,0 +1,1930 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+var unipenData = {
+ "0x0067": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 493,
+ 87,
+ 0
+ ],
+ [
+ 492,
+ 86,
+ 57
+ ],
+ [
+ 488,
+ 84,
+ 87
+ ],
+ [
+ 484,
+ 83,
+ 150
+ ],
+ [
+ 480,
+ 83,
+ 152
+ ],
+ [
+ 473,
+ 83,
+ 212
+ ],
+ [
+ 462,
+ 85,
+ 215
+ ],
+ [
+ 454,
+ 89,
+ 271
+ ],
+ [
+ 452,
+ 92,
+ 273
+ ],
+ [
+ 451,
+ 94,
+ 274
+ ],
+ [
+ 449,
+ 99,
+ 332
+ ],
+ [
+ 445,
+ 109,
+ 333
+ ],
+ [
+ 443,
+ 114,
+ 337
+ ],
+ [
+ 442,
+ 120,
+ 394
+ ],
+ [
+ 442,
+ 132,
+ 395
+ ],
+ [
+ 442,
+ 144,
+ 455
+ ],
+ [
+ 444,
+ 159,
+ 458
+ ],
+ [
+ 446,
+ 167,
+ 522
+ ],
+ [
+ 448,
+ 175,
+ 524
+ ],
+ [
+ 450,
+ 178,
+ 577
+ ],
+ [
+ 450,
+ 179,
+ 578
+ ],
+ [
+ 451,
+ 180,
+ 640
+ ],
+ [
+ 454,
+ 181,
+ 642
+ ],
+ [
+ 455,
+ 182,
+ 699
+ ],
+ [
+ 456,
+ 183,
+ 701
+ ],
+ [
+ 460,
+ 185,
+ 760
+ ],
+ [
+ 463,
+ 185,
+ 762
+ ],
+ [
+ 466,
+ 186,
+ 823
+ ],
+ [
+ 469,
+ 186,
+ 825
+ ],
+ [
+ 474,
+ 183,
+ 883
+ ],
+ [
+ 487,
+ 179,
+ 884
+ ],
+ [
+ 496,
+ 173,
+ 944
+ ],
+ [
+ 502,
+ 162,
+ 945
+ ],
+ [
+ 509,
+ 144,
+ 1011
+ ],
+ [
+ 514,
+ 133,
+ 1013
+ ],
+ [
+ 514,
+ 124,
+ 1069
+ ],
+ [
+ 514,
+ 118,
+ 1070
+ ],
+ [
+ 514,
+ 113,
+ 1073
+ ],
+ [
+ 512,
+ 108,
+ 1125
+ ],
+ [
+ 509,
+ 100,
+ 1125
+ ],
+ [
+ 507,
+ 97,
+ 1185
+ ],
+ [
+ 506,
+ 94,
+ 1186
+ ],
+ [
+ 506,
+ 92,
+ 1247
+ ],
+ [
+ 505,
+ 90,
+ 1248
+ ],
+ [
+ 504,
+ 89,
+ 1310
+ ],
+ [
+ 504,
+ 88,
+ 1312
+ ],
+ [
+ 504,
+ 90,
+ 1571
+ ],
+ [
+ 506,
+ 95,
+ 1616
+ ],
+ [
+ 507,
+ 101,
+ 1618
+ ],
+ [
+ 511,
+ 117,
+ 1675
+ ],
+ [
+ 512,
+ 130,
+ 1676
+ ],
+ [
+ 514,
+ 145,
+ 1738
+ ],
+ [
+ 514,
+ 158,
+ 1740
+ ],
+ [
+ 514,
+ 165,
+ 1797
+ ],
+ [
+ 514,
+ 177,
+ 1799
+ ],
+ [
+ 514,
+ 182,
+ 1802
+ ],
+ [
+ 514,
+ 187,
+ 1860
+ ],
+ [
+ 513,
+ 193,
+ 1862
+ ],
+ [
+ 513,
+ 198,
+ 1922
+ ],
+ [
+ 512,
+ 200,
+ 1924
+ ],
+ [
+ 512,
+ 202,
+ 1981
+ ],
+ [
+ 512,
+ 206,
+ 1983
+ ],
+ [
+ 511,
+ 207,
+ 2043
+ ],
+ [
+ 511,
+ 209,
+ 2044
+ ],
+ [
+ 511,
+ 211,
+ 2045
+ ],
+ [
+ 511,
+ 212,
+ 2050
+ ],
+ [
+ 511,
+ 214,
+ 2106
+ ],
+ [
+ 510,
+ 217,
+ 2167
+ ],
+ [
+ 510,
+ 218,
+ 2169
+ ],
+ [
+ 508,
+ 220,
+ 2170
+ ],
+ [
+ 507,
+ 222,
+ 2228
+ ],
+ [
+ 503,
+ 226,
+ 2230
+ ],
+ [
+ 500,
+ 227,
+ 2234
+ ],
+ [
+ 499,
+ 229,
+ 2290
+ ],
+ [
+ 491,
+ 232,
+ 2293
+ ],
+ [
+ 480,
+ 233,
+ 2349
+ ],
+ [
+ 466,
+ 234,
+ 2350
+ ],
+ [
+ 458,
+ 235,
+ 2411
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x0069": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 538,
+ 83,
+ 0
+ ],
+ [
+ 538,
+ 86,
+ 83
+ ],
+ [
+ 538,
+ 88,
+ 96
+ ],
+ [
+ 538,
+ 92,
+ 147
+ ],
+ [
+ 538,
+ 105,
+ 148
+ ],
+ [
+ 538,
+ 129,
+ 203
+ ],
+ [
+ 537,
+ 141,
+ 204
+ ],
+ [
+ 534,
+ 170,
+ 264
+ ],
+ [
+ 532,
+ 182,
+ 265
+ ],
+ [
+ 532,
+ 191,
+ 327
+ ],
+ [
+ 532,
+ 197,
+ 329
+ ],
+ [
+ 532,
+ 198,
+ 388
+ ],
+ [
+ 532,
+ 200,
+ 390
+ ],
+ [
+ 532,
+ 198,
+ 764
+ ],
+ [
+ 532,
+ 194,
+ 812
+ ]
+ ],
+ [
+ [
+ 533,
+ 58,
+ 1292
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x006e": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 400,
+ 82,
+ 0
+ ],
+ [
+ 400,
+ 83,
+ 85
+ ],
+ [
+ 400,
+ 85,
+ 96
+ ],
+ [
+ 400,
+ 96,
+ 153
+ ],
+ [
+ 401,
+ 103,
+ 156
+ ],
+ [
+ 402,
+ 113,
+ 157
+ ],
+ [
+ 402,
+ 124,
+ 215
+ ],
+ [
+ 402,
+ 147,
+ 217
+ ],
+ [
+ 402,
+ 161,
+ 221
+ ],
+ [
+ 402,
+ 173,
+ 275
+ ],
+ [
+ 402,
+ 188,
+ 278
+ ],
+ [
+ 400,
+ 198,
+ 342
+ ],
+ [
+ 399,
+ 202,
+ 344
+ ],
+ [
+ 399,
+ 204,
+ 345
+ ],
+ [
+ 399,
+ 205,
+ 396
+ ],
+ [
+ 399,
+ 204,
+ 526
+ ],
+ [
+ 399,
+ 200,
+ 580
+ ],
+ [
+ 399,
+ 191,
+ 582
+ ],
+ [
+ 399,
+ 185,
+ 641
+ ],
+ [
+ 401,
+ 170,
+ 643
+ ],
+ [
+ 402,
+ 162,
+ 644
+ ],
+ [
+ 403,
+ 153,
+ 701
+ ],
+ [
+ 404,
+ 132,
+ 703
+ ],
+ [
+ 407,
+ 118,
+ 761
+ ],
+ [
+ 409,
+ 109,
+ 763
+ ],
+ [
+ 411,
+ 104,
+ 764
+ ],
+ [
+ 414,
+ 99,
+ 824
+ ],
+ [
+ 415,
+ 98,
+ 827
+ ],
+ [
+ 417,
+ 95,
+ 884
+ ],
+ [
+ 418,
+ 93,
+ 886
+ ],
+ [
+ 419,
+ 93,
+ 1125
+ ],
+ [
+ 420,
+ 93,
+ 1183
+ ],
+ [
+ 422,
+ 92,
+ 1185
+ ],
+ [
+ 423,
+ 92,
+ 1216
+ ],
+ [
+ 425,
+ 91,
+ 1277
+ ],
+ [
+ 426,
+ 91,
+ 1337
+ ],
+ [
+ 427,
+ 91,
+ 1338
+ ],
+ [
+ 428,
+ 91,
+ 1340
+ ],
+ [
+ 432,
+ 94,
+ 1399
+ ],
+ [
+ 434,
+ 96,
+ 1400
+ ],
+ [
+ 437,
+ 102,
+ 1430
+ ],
+ [
+ 439,
+ 105,
+ 1460
+ ],
+ [
+ 442,
+ 115,
+ 1461
+ ],
+ [
+ 444,
+ 126,
+ 1520
+ ],
+ [
+ 446,
+ 137,
+ 1521
+ ],
+ [
+ 447,
+ 148,
+ 1581
+ ],
+ [
+ 447,
+ 153,
+ 1582
+ ],
+ [
+ 447,
+ 159,
+ 1642
+ ],
+ [
+ 447,
+ 165,
+ 1643
+ ],
+ [
+ 447,
+ 166,
+ 1645
+ ],
+ [
+ 447,
+ 172,
+ 1703
+ ],
+ [
+ 446,
+ 177,
+ 1764
+ ],
+ [
+ 446,
+ 179,
+ 1765
+ ],
+ [
+ 446,
+ 180,
+ 1853
+ ],
+ [
+ 446,
+ 181,
+ 1891
+ ],
+ [
+ 446,
+ 183,
+ 1947
+ ],
+ [
+ 446,
+ 185,
+ 1950
+ ],
+ [
+ 446,
+ 186,
+ 2007
+ ],
+ [
+ 446,
+ 188,
+ 2008
+ ],
+ [
+ 446,
+ 189,
+ 2069
+ ],
+ [
+ 445,
+ 191,
+ 2070
+ ],
+ [
+ 445,
+ 192,
+ 2131
+ ],
+ [
+ 445,
+ 193,
+ 2193
+ ],
+ [
+ 445,
+ 194,
+ 2195
+ ],
+ [
+ 445,
+ 195,
+ 2413
+ ],
+ [
+ 445,
+ 196,
+ 2477
+ ],
+ [
+ 445,
+ 197,
+ 2527
+ ],
+ [
+ 445,
+ 198,
+ 2528
+ ],
+ [
+ 445,
+ 199,
+ 2587
+ ],
+ [
+ 445,
+ 200,
+ 2588
+ ],
+ [
+ 445,
+ 201,
+ 2648
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x0074": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 639,
+ 167,
+ 0
+ ],
+ [
+ 640,
+ 167,
+ 50
+ ],
+ [
+ 640,
+ 164,
+ 76
+ ],
+ [
+ 645,
+ 154,
+ 136
+ ],
+ [
+ 653,
+ 135,
+ 137
+ ],
+ [
+ 662,
+ 108,
+ 203
+ ],
+ [
+ 666,
+ 87,
+ 205
+ ],
+ [
+ 666,
+ 73,
+ 257
+ ],
+ [
+ 666,
+ 67,
+ 259
+ ],
+ [
+ 666,
+ 62,
+ 318
+ ],
+ [
+ 666,
+ 60,
+ 319
+ ],
+ [
+ 666,
+ 58,
+ 380
+ ],
+ [
+ 665,
+ 57,
+ 381
+ ],
+ [
+ 665,
+ 56,
+ 440
+ ],
+ [
+ 664,
+ 57,
+ 505
+ ],
+ [
+ 664,
+ 58,
+ 507
+ ],
+ [
+ 663,
+ 61,
+ 561
+ ],
+ [
+ 663,
+ 66,
+ 562
+ ],
+ [
+ 662,
+ 75,
+ 622
+ ],
+ [
+ 661,
+ 86,
+ 623
+ ],
+ [
+ 660,
+ 98,
+ 688
+ ],
+ [
+ 659,
+ 111,
+ 689
+ ],
+ [
+ 659,
+ 114,
+ 690
+ ],
+ [
+ 659,
+ 121,
+ 745
+ ],
+ [
+ 659,
+ 132,
+ 746
+ ],
+ [
+ 659,
+ 141,
+ 805
+ ],
+ [
+ 659,
+ 149,
+ 806
+ ],
+ [
+ 659,
+ 158,
+ 868
+ ],
+ [
+ 660,
+ 161,
+ 870
+ ],
+ [
+ 661,
+ 164,
+ 929
+ ],
+ [
+ 661,
+ 165,
+ 990
+ ],
+ [
+ 662,
+ 166,
+ 992
+ ],
+ [
+ 663,
+ 167,
+ 1131
+ ],
+ [
+ 663,
+ 165,
+ 1483
+ ],
+ [
+ 663,
+ 159,
+ 1535
+ ],
+ [
+ 664,
+ 156,
+ 1536
+ ],
+ [
+ 664,
+ 151,
+ 1538
+ ],
+ [
+ 665,
+ 146,
+ 1595
+ ],
+ [
+ 666,
+ 136,
+ 1596
+ ],
+ [
+ 666,
+ 127,
+ 1659
+ ],
+ [
+ 666,
+ 116,
+ 1662
+ ],
+ [
+ 665,
+ 111,
+ 1667
+ ],
+ [
+ 663,
+ 105,
+ 1723
+ ],
+ [
+ 656,
+ 96,
+ 1724
+ ],
+ [
+ 652,
+ 93,
+ 1781
+ ],
+ [
+ 648,
+ 92,
+ 1783
+ ],
+ [
+ 643,
+ 90,
+ 1786
+ ],
+ [
+ 639,
+ 89,
+ 1840
+ ],
+ [
+ 633,
+ 88,
+ 1841
+ ],
+ [
+ 632,
+ 87,
+ 1971
+ ],
+ [
+ 632,
+ 86,
+ 2023
+ ],
+ [
+ 636,
+ 85,
+ 2023
+ ],
+ [
+ 641,
+ 84,
+ 2024
+ ],
+ [
+ 647,
+ 82,
+ 2026
+ ],
+ [
+ 655,
+ 81,
+ 2084
+ ],
+ [
+ 668,
+ 79,
+ 2085
+ ],
+ [
+ 682,
+ 77,
+ 2148
+ ],
+ [
+ 686,
+ 77,
+ 2150
+ ],
+ [
+ 688,
+ 77,
+ 2154
+ ],
+ [
+ 689,
+ 77,
+ 2211
+ ],
+ [
+ 690,
+ 77,
+ 2267
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x1ebf": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 294,
+ 112,
+ 0
+ ],
+ [
+ 297,
+ 112,
+ 117
+ ],
+ [
+ 299,
+ 113,
+ 134
+ ],
+ [
+ 305,
+ 114,
+ 141
+ ],
+ [
+ 311,
+ 115,
+ 176
+ ],
+ [
+ 318,
+ 115,
+ 177
+ ],
+ [
+ 325,
+ 116,
+ 237
+ ],
+ [
+ 330,
+ 116,
+ 238
+ ],
+ [
+ 340,
+ 116,
+ 297
+ ],
+ [
+ 350,
+ 116,
+ 299
+ ],
+ [
+ 352,
+ 116,
+ 358
+ ],
+ [
+ 352,
+ 111,
+ 360
+ ],
+ [
+ 353,
+ 104,
+ 419
+ ],
+ [
+ 353,
+ 98,
+ 420
+ ],
+ [
+ 353,
+ 94,
+ 481
+ ],
+ [
+ 347,
+ 87,
+ 483
+ ],
+ [
+ 337,
+ 81,
+ 541
+ ],
+ [
+ 334,
+ 79,
+ 543
+ ],
+ [
+ 330,
+ 78,
+ 572
+ ],
+ [
+ 329,
+ 78,
+ 606
+ ],
+ [
+ 320,
+ 78,
+ 607
+ ],
+ [
+ 314,
+ 78,
+ 662
+ ],
+ [
+ 303,
+ 80,
+ 663
+ ],
+ [
+ 301,
+ 82,
+ 667
+ ],
+ [
+ 299,
+ 84,
+ 723
+ ],
+ [
+ 292,
+ 93,
+ 725
+ ],
+ [
+ 289,
+ 97,
+ 783
+ ],
+ [
+ 284,
+ 108,
+ 786
+ ],
+ [
+ 282,
+ 114,
+ 788
+ ],
+ [
+ 282,
+ 121,
+ 843
+ ],
+ [
+ 282,
+ 134,
+ 845
+ ],
+ [
+ 285,
+ 145,
+ 903
+ ],
+ [
+ 288,
+ 153,
+ 906
+ ],
+ [
+ 292,
+ 159,
+ 966
+ ],
+ [
+ 293,
+ 161,
+ 968
+ ],
+ [
+ 295,
+ 165,
+ 972
+ ],
+ [
+ 296,
+ 165,
+ 1026
+ ],
+ [
+ 299,
+ 168,
+ 1027
+ ],
+ [
+ 304,
+ 170,
+ 1092
+ ],
+ [
+ 311,
+ 173,
+ 1093
+ ],
+ [
+ 314,
+ 173,
+ 1095
+ ],
+ [
+ 323,
+ 174,
+ 1151
+ ],
+ [
+ 331,
+ 175,
+ 1153
+ ],
+ [
+ 343,
+ 176,
+ 1213
+ ],
+ [
+ 353,
+ 176,
+ 1215
+ ],
+ [
+ 357,
+ 175,
+ 1273
+ ],
+ [
+ 359,
+ 172,
+ 1275
+ ],
+ [
+ 359,
+ 171,
+ 1334
+ ],
+ [
+ 360,
+ 171,
+ 2556
+ ]
+ ],
+ [
+ [
+ 306,
+ 67,
+ 3105
+ ],
+ [
+ 306,
+ 64,
+ 3162
+ ],
+ [
+ 307,
+ 63,
+ 3164
+ ],
+ [
+ 309,
+ 62,
+ 3219
+ ],
+ [
+ 314,
+ 56,
+ 3221
+ ],
+ [
+ 320,
+ 47,
+ 3281
+ ],
+ [
+ 323,
+ 43,
+ 3283
+ ],
+ [
+ 325,
+ 40,
+ 3285
+ ],
+ [
+ 326,
+ 40,
+ 3412
+ ],
+ [
+ 327,
+ 41,
+ 3462
+ ],
+ [
+ 327,
+ 43,
+ 3463
+ ],
+ [
+ 328,
+ 47,
+ 3467
+ ],
+ [
+ 329,
+ 51,
+ 3522
+ ],
+ [
+ 330,
+ 59,
+ 3523
+ ],
+ [
+ 330,
+ 62,
+ 3586
+ ],
+ [
+ 331,
+ 62,
+ 4012
+ ]
+ ],
+ [
+ [
+ 338,
+ 62,
+ 4380
+ ],
+ [
+ 340,
+ 62,
+ 4443
+ ],
+ [
+ 343,
+ 59,
+ 4471
+ ],
+ [
+ 348,
+ 56,
+ 4532
+ ],
+ [
+ 352,
+ 51,
+ 4535
+ ],
+ [
+ 355,
+ 47,
+ 4593
+ ],
+ [
+ 356,
+ 45,
+ 4594
+ ],
+ [
+ 357,
+ 44,
+ 4595
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ },
+ "0x1ec7": {
+ ".COORD": [
+ "X",
+ "Y",
+ "T"
+ ],
+ ".HIERARCHY": "CHARACTER",
+ ".PEN": [
+ [
+ [
+ 561,
+ 107,
+ 0
+ ],
+ [
+ 564,
+ 107,
+ 60
+ ],
+ [
+ 571,
+ 109,
+ 76
+ ],
+ [
+ 583,
+ 109,
+ 128
+ ],
+ [
+ 608,
+ 111,
+ 129
+ ],
+ [
+ 620,
+ 111,
+ 186
+ ],
+ [
+ 632,
+ 109,
+ 187
+ ],
+ [
+ 634,
+ 106,
+ 188
+ ],
+ [
+ 635,
+ 100,
+ 246
+ ],
+ [
+ 632,
+ 93,
+ 246
+ ],
+ [
+ 624,
+ 87,
+ 306
+ ],
+ [
+ 619,
+ 86,
+ 307
+ ],
+ [
+ 614,
+ 85,
+ 308
+ ],
+ [
+ 608,
+ 85,
+ 367
+ ],
+ [
+ 594,
+ 87,
+ 368
+ ],
+ [
+ 587,
+ 90,
+ 371
+ ],
+ [
+ 582,
+ 94,
+ 437
+ ],
+ [
+ 564,
+ 110,
+ 438
+ ],
+ [
+ 559,
+ 117,
+ 489
+ ],
+ [
+ 554,
+ 132,
+ 490
+ ],
+ [
+ 554,
+ 149,
+ 550
+ ],
+ [
+ 559,
+ 161,
+ 551
+ ],
+ [
+ 562,
+ 164,
+ 611
+ ],
+ [
+ 568,
+ 166,
+ 612
+ ],
+ [
+ 576,
+ 167,
+ 672
+ ],
+ [
+ 605,
+ 168,
+ 674
+ ],
+ [
+ 622,
+ 168,
+ 733
+ ],
+ [
+ 625,
+ 167,
+ 794
+ ],
+ [
+ 626,
+ 167,
+ 795
+ ],
+ [
+ 627,
+ 166,
+ 857
+ ],
+ [
+ 628,
+ 166,
+ 1029
+ ]
+ ],
+ [
+ [
+ 583,
+ 57,
+ 4161
+ ],
+ [
+ 584,
+ 57,
+ 4229
+ ],
+ [
+ 588,
+ 53,
+ 4231
+ ],
+ [
+ 592,
+ 49,
+ 4288
+ ],
+ [
+ 595,
+ 45,
+ 4289
+ ],
+ [
+ 599,
+ 42,
+ 4351
+ ],
+ [
+ 600,
+ 42,
+ 4353
+ ],
+ [
+ 601,
+ 41,
+ 4411
+ ],
+ [
+ 602,
+ 40,
+ 4476
+ ],
+ [
+ 603,
+ 39,
+ 4749
+ ],
+ [
+ 604,
+ 38,
+ 4836
+ ],
+ [
+ 605,
+ 38,
+ 4895
+ ],
+ [
+ 606,
+ 38,
+ 4900
+ ],
+ [
+ 607,
+ 38,
+ 5005
+ ],
+ [
+ 608,
+ 38,
+ 5149
+ ],
+ [
+ 609,
+ 38,
+ 5198
+ ],
+ [
+ 609,
+ 39,
+ 5199
+ ],
+ [
+ 613,
+ 51,
+ 5260
+ ],
+ [
+ 615,
+ 59,
+ 5261
+ ],
+ [
+ 616,
+ 65,
+ 5320
+ ],
+ [
+ 617,
+ 68,
+ 5321
+ ],
+ [
+ 617,
+ 69,
+ 5323
+ ],
+ [
+ 617,
+ 70,
+ 5382
+ ],
+ [
+ 618,
+ 71,
+ 5383
+ ]
+ ],
+ [
+ [
+ 594,
+ 188,
+ 6585
+ ]
+ ]
+ ],
+ ".POINTS_PER_SECOND": 60,
+ ".SEGMENT": "CHARACTER",
+ ".VERSION": "1.0",
+ ".X_DIM": 1032,
+ ".X_POINTS_PER_INCH": 94,
+ ".Y_DIM": 263,
+ ".Y_POINTS_PER_INCH": 94
+ }
+}
diff --git a/tests/auto/inputpanel/data/tst_inputpanel.qml b/tests/auto/inputpanel/data/tst_inputpanel.qml
index 10a9b906..91a6e13f 100644
--- a/tests/auto/inputpanel/data/tst_inputpanel.qml
+++ b/tests/auto/inputpanel/data/tst_inputpanel.qml
@@ -78,12 +78,13 @@ Rectangle {
handwritingInputPanel.destroy()
}
- function prepareTest(data) {
+ function prepareTest(data, skipIfFail) {
inputPanel.setWclAutoHideDelay(data !== undefined && data.hasOwnProperty("wclAutoHideDelay") ? data.wclAutoHideDelay : 5000)
inputPanel.setWclAlwaysVisible(data !== undefined && data.hasOwnProperty("wclAlwaysVisible") && data.wclAlwaysVisible)
inputPanel.setWclAutoCommitWord(data !== undefined && data.hasOwnProperty("wclAutoCommitWord") && data.wclAutoCommitWord)
inputPanel.setFullScreenMode(data !== undefined && data.hasOwnProperty("fullScreenMode") && data.fullScreenMode)
inputPanel.setExternalLanguageSwitchEnabled(data !== undefined && data.hasOwnProperty("externalLanguageSwitchEnabled") && data.externalLanguageSwitchEnabled)
+ inputPanel.setLayoutMirroring(data !== undefined && data.hasOwnProperty("layoutMirroring") && data.layoutMirroring)
var window = container.Window.window
verify(window)
@@ -92,6 +93,7 @@ Rectangle {
tryCompare(window, "active", true)
container.forceActiveFocus()
+ waitForRendering(container)
if (data !== undefined && data.hasOwnProperty("initText")) {
textInput.text = data.initText
textInput.cursorPosition = data.hasOwnProperty("initCursorPosition") ? data.initCursorPosition : textInput.text.length
@@ -103,31 +105,40 @@ Rectangle {
}
textInput.inputMethodHints = data !== undefined && data.hasOwnProperty("initInputMethodHints") ? data.initInputMethodHints : Qt.ImhNone
handwritingInputPanel.available = false
- textInput.forceActiveFocus()
inputPanel.setHandwritingMode(false)
+ textInput.forceActiveFocus()
+ waitForRendering(inputPanel)
var activeLocales = data !== undefined && data.hasOwnProperty("activeLocales") ? data.activeLocales : []
inputPanel.setActiveLocales(activeLocales)
var locale = data !== undefined && data.hasOwnProperty("initLocale") ? data.initLocale : "en_GB"
- if (!inputPanel.isLocaleSupported(locale))
+ if (!inputPanel.isLocaleSupported(locale)) {
+ if (skipIfFail)
+ skip("Input locale not available (%1)".arg(locale))
expectFail("", "Input locale not available (%1)".arg(locale))
+ }
var localeChanged = Qt.inputMethod.locale.name !== locale
verify(inputPanel.setLocale(locale))
if (localeChanged && !(textInput.inputMethodHints & Qt.ImhNoPredictiveText))
wait(300)
if (data !== undefined && data.hasOwnProperty("initHwrMode") && data.initHwrMode) {
- if (!inputPanel.setHandwritingMode(true))
+ if (!inputPanel.setHandwritingMode(true)) {
+ if (skipIfFail)
+ skip("Handwriting not enabled")
expectFail("", "Handwriting not enabled")
+ }
verify(inputPanel.handwritingMode === true)
}
if (data !== undefined && data.hasOwnProperty("initInputMode")) {
var inputMode = inputPanel.mapInputMode(data.initInputMode)
- if (!inputPanel.isInputModeSupported(inputMode))
+ if (!inputPanel.isInputModeSupported(inputMode)) {
+ if (skipIfFail)
+ skip("Input mode not available (%1)".arg(data.initInputMode))
expectFail("", "Input mode not available (%1)".arg(data.initInputMode))
+ }
verify(inputPanel.setInputMode(inputMode))
}
- Qt.inputMethod.show()
- waitForRendering(inputPanel)
verify(inputPanel.visible === true)
+ verify(textInput.activeFocus === true)
}
function test_versionCheck_data() {
@@ -216,6 +227,11 @@ Rectangle {
obj.destroy()
}
+ function test_publicEnums() {
+ prepareTest()
+ inputPanel.testPublicEnums()
+ }
+
function test_focusShowKeyboard() {
container.forceActiveFocus()
verify(inputPanel.visible === false)
@@ -329,22 +345,35 @@ Rectangle {
{ initLocale: "de_DE", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hallo", outputText: "Hallo" },
{ initLocale: "el_GR", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "\u03C7\u03B1\u03AF\u03C1\u03B5\u03C4\u03B5", outputText: "\u03A7\u03B1\u03AF\u03C1\u03B5\u03C4\u03B5" },
{ initLocale: "en_GB", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hello", outputText: "Hello" },
+ { initLocale: "en_US", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hello", outputText: "Hello" },
{ initLocale: "es_ES", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hola", outputText: "Hola" },
+ { initLocale: "es_MX", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hola", outputText: "Hola" },
{ initLocale: "et_EE", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "tere", outputText: "Tere" },
{ initLocale: "hi_IN", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "\u0928\u092E\u0938\u094D\u0915\u093E\u0930", outputText: "\u0928\u092E\u0938\u094D\u0915\u093E\u0930" },
{ initLocale: "hr_HR", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "zdravo", outputText: "Zdravo" },
{ initLocale: "hu_HU", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "helló", outputText: "Helló" },
{ initLocale: "fi_FI", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hei", outputText: "Hei" },
+ { initLocale: "fr_CA", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "bonjour", outputText: "Bonjour" },
{ initLocale: "fr_FR", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "bonjour", outputText: "Bonjour" },
+ { initLocale: "id_ID", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "halo", outputText: "Halo" },
{ initLocale: "it_IT", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "ciao", outputText: "Ciao" },
{ initLocale: "ja_JP", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "watashi", outputText: "\u308F\u305F\u3057" },
+ { initLocale: "ms_MY", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hello", outputText: "Hello" },
{ initLocale: "nb_NO", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hallo", outputText: "Hallo" },
{ initLocale: "nl_NL", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hallo", outputText: "Hallo" },
{ initLocale: "pl_PL", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "cze\u015B\u0107", outputText: "Cze\u015B\u0107" },
+ { initLocale: "pt_BR", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "ol\u00E1", outputText: "Ol\u00E1" },
{ initLocale: "pt_PT", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "ol\u00E1", outputText: "Ol\u00E1" },
{ initLocale: "ru_RU", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "\u043F\u0440\u0438\u0432\u0435\u0442", outputText: "\u041F\u0440\u0438\u0432\u0435\u0442" },
+ { initLocale: "ru_RU", initInputMethodHints: Qt.ImhNoPredictiveText, initInputMode: "Latin", inputSequence: "hello", outputText: "Hello" },
{ initLocale: "sr_SP", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "\u0437\u0434\u0440\u0430\u0432\u043E", outputText: "\u0417\u0434\u0440\u0430\u0432\u043E" },
- { initLocale: "sv_SE", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hall\u00E5", outputText: "Hall\u00E5" }
+ { initLocale: "sv_SE", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hall\u00E5", outputText: "Hall\u00E5" },
+ { initLocale: "sq_AL", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "përshëndetje", outputText: "Përshëndetje" },
+ { initLocale: "sk_SK", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "ahoj", outputText: "Ahoj" },
+ { initLocale: "sl_SI", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "zdravo", outputText: "Zdravo" },
+ { initLocale: "th_TH", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "สวัสดี", outputText: "สวัสดี" },
+ { initLocale: "tr_TR", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "merhaba", outputText: "Merhaba" },
+ { initLocale: "uk_UA", initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "здравствуйте", outputText: "Здравствуйте" },
]
}
@@ -580,6 +609,9 @@ Rectangle {
}
function test_soundEffects() {
+ if (!inputPanel.keyboard.soundEffect.available || !inputPanel.keyboard.soundEffect.enabled)
+ skip("Sound effects not enabled")
+
prepareTest({ initInputMethodHints: Qt.ImhNoPredictiveText })
wait(500)
@@ -587,8 +619,7 @@ Rectangle {
verify(inputPanel.virtualKeyClick(Qt.Key_A))
wait(500)
- if (!inputPanel.keyboard.soundEffect.available || !inputPanel.keyboard.soundEffect.enabled)
- expectFail("", "Sound effects not enabled")
+
compare(inputPanel.soundEffectSpy.count, 2)
}
@@ -604,7 +635,8 @@ Rectangle {
prepareTest(data)
if (!inputPanel.activateNavigationKeyMode())
- expectFail("", "Arrow key navigation not enabled")
+ skip("Arrow key navigation not enabled")
+
verify(inputPanel.naviationHighlight.visible)
for (var inputIndex in data.inputSequence) {
@@ -633,10 +665,10 @@ Rectangle {
}
function test_navigationCursorWrap(data) {
- prepareTest()
+ prepareTest(data)
if (!inputPanel.activateNavigationKeyMode())
- expectFail("", "Arrow key navigation not enabled")
+ skip("Arrow key navigation not enabled")
verify(inputPanel.naviationHighlight.visible)
verify(inputPanel.navigateToKey(data.initialKey))
@@ -659,7 +691,7 @@ Rectangle {
prepareTest()
if (!inputPanel.activateNavigationKeyMode())
- expectFail("", "Arrow key navigation not enabled")
+ skip("Arrow key navigation not enabled")
verify(inputPanel.naviationHighlight.visible)
verify(inputPanel.navigationKeyClick("q"))
@@ -674,6 +706,17 @@ Rectangle {
verify(inputPanel.keyboardInputArea.initialKey === focusKey)
verify(inputPanel.wordCandidateView.currentIndex !== -1)
+ // Select alternative key and check word candidates
+ verify(inputPanel.navigationKeyClick("e"))
+ var focusKeyAlt = inputPanel.keyboardInputArea.initialKey
+ verify(inputPanel.navigationKeyClick("ë"))
+ verify(inputPanel.wordCandidateView.count > 1)
+ verify(inputPanel.keyboardInputArea.initialKey === focusKeyAlt)
+ verify(inputPanel.navigationKeyClick(Qt.Key_Backspace))
+ verify(inputPanel.navigationKeyClick(Qt.Key_Backspace))
+ verify(inputPanel.navigationKeyClick(Qt.Key_Backspace))
+ verify(inputPanel.navigationKeyClick("q"))
+
// Move focus to word candidate list
inputPanel.emulateNavigationKeyClick(Qt.Key_Up)
verify(inputPanel.keyboardInputArea.initialKey === null)
@@ -738,6 +781,43 @@ Rectangle {
verify(textInput.text.length > 0)
}
+ function test_navigationKeyLayoutMirroring_data() {
+ return [
+ { layoutMirroring: false },
+ { layoutMirroring: true },
+ ]
+ }
+
+ function test_navigationKeyLayoutMirroring(data) {
+ prepareTest(data)
+
+ if (!inputPanel.activateNavigationKeyMode())
+ skip("Arrow key navigation not enabled")
+ verify(inputPanel.naviationHighlight.visible)
+
+ verify(inputPanel.navigateToKey("q"))
+ var initialKey = inputPanel.keyboardInputArea.initialKey
+
+ var keysTraversed = []
+ do {
+ verify(keysTraversed.indexOf(inputPanel.keyboardInputArea.initialKey) === -1)
+ var currentKey = inputPanel.keyboardInputArea.initialKey
+ keysTraversed.push(currentKey)
+ inputPanel.emulateNavigationKeyClick(Qt.Key_Right)
+ } while (initialKey !== inputPanel.keyboardInputArea.initialKey)
+
+ inputPanel.setLayoutMirroring(!data.layoutMirroring)
+
+ do {
+ var indexOfKey = keysTraversed.indexOf(inputPanel.keyboardInputArea.initialKey)
+ verify(indexOfKey !== -1)
+ keysTraversed.splice(indexOfKey, 1)
+ inputPanel.emulateNavigationKeyClick(Qt.Key_Left)
+ } while (initialKey !== inputPanel.keyboardInputArea.initialKey)
+
+ compare(keysTraversed.length, 0)
+ }
+
function test_spellCorrectionSuggestions_data() {
return [
{ initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "hwllo", unexpectedSuggestion: "Hello", outputText: "Hwllo" },
@@ -792,10 +872,6 @@ Rectangle {
}
function test_spellCorrectionAutomaticSpaceInsertion(data) {
- if (Qt.platform.pluginName === "offscreen") {
- skip("QTBUG-68349");
- }
-
prepareTest(data)
for (var inputIndex in data.inputSequence) {
@@ -843,7 +919,7 @@ Rectangle {
}
function test_pinyinInputMethod(data) {
- prepareTest(data)
+ prepareTest(data, true)
for (var inputIndex in data.inputSequence) {
verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex]))
@@ -892,7 +968,7 @@ Rectangle {
}
function test_cangjieInputMethod(data) {
- prepareTest(data)
+ prepareTest(data, true)
if (data.hasOwnProperty("initSimplified")) {
if (inputPanel.inputMethod.simplified !== data.initSimplified)
@@ -976,7 +1052,7 @@ Rectangle {
}
function test_zhuyinInputMethod(data) {
- prepareTest(data)
+ prepareTest(data, true)
for (var inputIndex in data.inputSequence) {
if (Array.isArray(data.inputSequence)) {
@@ -1046,7 +1122,7 @@ Rectangle {
}
function test_hangulInputMethod(data) {
- prepareTest(data)
+ prepareTest(data, true)
compare(Qt.inputMethod.locale.name, Qt.locale(data.initLocale).name)
@@ -1098,11 +1174,15 @@ Rectangle {
{ initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: ["n","i","h","o","n","g","o"], outputText: "" },
// Latin only
{ initLocale: "ja_JP", initInputMethodHints: Qt.ImhLatinOnly, inputSequence: "hello", outputText: "Hello" },
+ // Cursor test: 1. Enter hiragana input sequence and move cursor in the middle of input.
+ // 2. Change input mode to Katakana.
+ // 3. The input sequence should be committed leaving the cursor in the middle.
+ { initLocale: "ja_JP", initInputMode: "Hiragana", inputSequence: ["n","i","h","o","n","g","o",Qt.Key_Left,Qt.Key_Left,Qt.Key_Left,Qt.Key_Mode_switch], outputText: "\u306B\u307B\u3093\u3054", expectedCursorPosition: 2 },
]
}
function test_japaneseInputModes(data) {
- prepareTest(data)
+ prepareTest(data, true)
for (var inputIndex in data.inputSequence) {
verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex]))
@@ -1110,6 +1190,9 @@ Rectangle {
waitForRendering(inputPanel)
compare(textInput.text, data.outputText)
+
+ if (data.hasOwnProperty("expectedCursorPosition"))
+ compare(textInput.cursorPosition, data.expectedCursorPosition)
}
function test_baseKeyNoModifier() {
@@ -1124,6 +1207,28 @@ Rectangle {
compare(textInput.selectedText, "")
}
+ function test_vietnameseInputMethod_data() {
+ return [
+ { initLocale: "vi_VN", inputSequence: "Xin chào", outputText: "Xin chào" },
+ { initLocale: "vi_VN", inputSequence: "Ảo", outputText: "Ảo" },
+ { initLocale: "vi_VN", inputSequence: "Cũng", outputText: "Cũng" },
+ { initLocale: "vi_VN", inputSequence: "Chiếc", outputText: "Chiếc" },
+ { initLocale: "vi_VN", inputSequence: "Giọt", outputText: "Giọt" },
+ ]
+ }
+
+ function test_vietnameseInputMethod(data) {
+ prepareTest(data, true)
+
+ for (var inputIndex in data.inputSequence) {
+ verify(inputPanel.virtualKeyClick(data.inputSequence[inputIndex]))
+ }
+
+ Qt.inputMethod.commit()
+ waitForRendering(inputPanel)
+ compare(textInput.text, data.outputText)
+ }
+
function test_hwrInputSequence_data() {
return [
{ initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 0, inputSequence: "abcdefghij", outputText: "Abcdefghij" },
@@ -1139,11 +1244,60 @@ Rectangle {
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ar_AR", initInputMode: "Arabic", inputSequence: "\u0643\u062A\u0627\u0628", outputText: "\u0643\u062A\u0627\u0628" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fa_FA", initInputMode: "Arabic", inputSequence: "\u0686\u0627\u06CC", outputText: "\u0686\u0627\u06CC" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", initInputMode: "Hebrew", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "vi_VN", inputSequence: "Ti\u1EBFng vi\u1EC7t", outputText: "Ti\u1EBFng vi\u1EC7t" },
]
}
function test_hwrInputSequence(data) {
- prepareTest(data)
+ prepareTest(data, true)
+
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
+ for (var i = 0; i < data.toggleShiftCount; i++) {
+ inputPanel.toggleShift()
+ }
+ for (var inputIndex in data.inputSequence) {
+ verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
+ }
+
+ if (inputPanel.wordCandidateView.count > 0) {
+ if (inputPanel.selectionListSearchSuggestion(data.outputText)) {
+ inputPanel.selectionListSelectCurrentItem()
+ }
+ }
+
+ Qt.inputMethod.commit()
+ waitForRendering(inputPanel)
+ compare(textInput.text, data.outputText)
+ }
+
+ function test_superimposedHwrInputSequence_data() {
+ return [
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "en_GB", inputSequence: "Hellohowareyou?", outputText: "Hello how are you?" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fr_FR", inputSequence: "Bonjour", outputText: "Bonjour" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "da_DK", inputSequence: "Hej", outputText: "Hej" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "de_DE", inputSequence: "Hallo", outputText: "Hallo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "es_ES", inputSequence: "Hola", outputText: "Hola" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "et_EE", inputSequence: "Tere", outputText: "Tere" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "hr_HR", inputSequence: "Zdravo", outputText: "Zdravo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "it_IT", inputSequence: "Ciao", outputText: "Ciao" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "cs_CZ", inputSequence: "Ahoj", outputText: "Ahoj" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "bg_BG", inputSequence: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", outputText: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "\u4e2d\u6587", outputText: "\u4e2d\u6587" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_TW", inputSequence: "\u570b", outputText: "\u570b" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ja_JP", inputSequence: "\u65E5\u672C\u8A9E", outputText: "\u65E5\u672C\u8A9E" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ko_KR", inputSequence: "\uD55C\uAD6D\uC5B4", outputText: "\uD55C\uAD6D\uC5B4" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "el_GR", inputSequence: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", outputText: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ ]
+ }
+
+ function test_superimposedHwrInputSequence(data) {
+ prepareTest(data, true)
+
+ if (!inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for non-Superimposed Handwriting")
for (var i = 0; i < data.toggleShiftCount; i++) {
inputPanel.toggleShift()
@@ -1151,6 +1305,7 @@ Rectangle {
for (var inputIndex in data.inputSequence) {
verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
}
+ wait(2000)
if (inputPanel.wordCandidateView.count > 0) {
if (inputPanel.selectionListSearchSuggestion(data.outputText)) {
@@ -1177,7 +1332,10 @@ Rectangle {
}
function test_hwrNumericInputSequence(data) {
- prepareTest(data)
+ prepareTest(data, true)
+
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
for (var inputIndex in data.inputSequence) {
verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
@@ -1201,25 +1359,20 @@ Rectangle {
function test_hwrSpellCorrectionSuggestions_data() {
return [
- { initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "bello", unexpectedSuggestion: "Hello", outputText: "Bello" },
- { initInputMethodHints: Qt.ImhNone, inputSequence: "bello", expectedSuggestion: "Hello", outputText: "Hello" },
- { initText: "Hello", initInputMethodHints: Qt.ImhNone, inputSequence: "worla", expectedSuggestion: "world", outputText: "Helloworld" },
- { initText: "isn'", initInputMethodHints: Qt.ImhNone, inputSequence: "t", outputText: "isn't" },
- { initInputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase, inputSequence: "www.example.com", expectedSuggestion: "www.example.com", outputText: "www.example.com" },
- { initInputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase, inputSequence: "user.name@example.com", expectedSuggestion: "user.name@example.com", outputText: "user.name@example.com" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: "bello", unexpectedSuggestion: "Hello", outputText: "Bello" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, inputSequence: "bello", expectedSuggestion: "Hello", outputText: "Hello" },
+ { initHwrMode: true, initText: "Hello", initInputMethodHints: Qt.ImhNone, inputSequence: "worla", expectedSuggestion: "world", outputText: "Helloworld" },
+ { initHwrMode: true, initText: "isn'", initInputMethodHints: Qt.ImhNone, inputSequence: "t", outputText: "isn't" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhUrlCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase, inputSequence: "www.example.com", expectedSuggestion: "www.example.com", outputText: "www.example.com" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase, inputSequence: "user.name@example.com", expectedSuggestion: "user.name@example.com", outputText: "user.name@example.com" },
]
}
function test_hwrSpellCorrectionSuggestions(data) {
- if (Qt.platform.pluginName === "offscreen") {
- skip("QTBUG-65507");
- }
-
- prepareTest(data)
+ prepareTest(data, true)
- if (!inputPanel.setHandwritingMode(true))
- expectFail("", "Handwriting not enabled")
- verify(inputPanel.handwritingMode === true)
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
for (var inputIndex in data.inputSequence) {
verify(inputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
@@ -1245,27 +1398,73 @@ Rectangle {
function test_hwrFullScreenInputSequence_data() {
return [
- { initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 0, inputSequence: "abcdefghij", outputText: "Abcdefghij" },
- { initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 1, inputSequence: "klmnopqrst", outputText: "klmnopqrst" },
- { initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 3, inputSequence: "uvwxyz", outputText: "UVWXYZ" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 0, inputSequence: "abcdefghij", outputText: "Abcdefghij" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 1, inputSequence: "klmnopqrst", outputText: "klmnopqrst" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, toggleShiftCount: 3, inputSequence: "uvwxyz", outputText: "UVWXYZ" },
]
}
function test_hwrFullScreenInputSequence(data) {
- prepareTest(data)
+ prepareTest(data, true)
+
+ handwritingInputPanel.available = true
+ verify(inputPanel.visible === false)
+
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
+ for (var i = 0; i < data.toggleShiftCount; i++) {
+ inputPanel.toggleShift()
+ }
+ for (var inputIndex in data.inputSequence) {
+ verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
+ }
+
+ if (handwritingInputPanel.wordCandidatePopupListSearchSuggestion(data.outputText)) {
+ handwritingInputPanel.wordCandidatePopupListSelectCurrentItem()
+ }
+
+ Qt.inputMethod.commit()
+ compare(textInput.text, data.outputText)
+ }
+
+ function test_superimposedHwrFullScreenInputSequence_data() {
+ return [
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "en_GB", inputSequence: "Hellohowareyou", outputText: "Hello how are you" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "fr_FR", inputSequence: "Bonjour", outputText: "Bonjour" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "da_DK", inputSequence: "Hej", outputText: "Hej" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "de_DE", inputSequence: "Hallo", outputText: "Hallo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "es_ES", inputSequence: "Hola", outputText: "Hola" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "et_EE", inputSequence: "Tere", outputText: "Tere" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "hr_HR", inputSequence: "Zdravo", outputText: "Zdravo" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "it_IT", inputSequence: "Ciao", outputText: "Ciao" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "cs_CZ", inputSequence: "Ahoj", outputText: "Ahoj" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "bg_BG", inputSequence: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", outputText: "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", inputSequence: "\u4e2d\u6587", outputText: "\u4e2d\u6587" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_TW", inputSequence: "\u570b", outputText: "\u570b" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ja_JP", inputSequence: "\u65E5\u672C\u8A9E", outputText: "\u65E5\u672C\u8A9E" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "ko_KR", inputSequence: "\uD55C\uAD6D\uC5B4", outputText: "\uD55C\uAD6D\uC5B4" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "el_GR", inputSequence: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", outputText: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "he_IL", inputSequence: "\u05D0\u05D5\u05D8\u05D5", outputText: "\u05D0\u05D5\u05D8\u05D5" },
+ ]
+ }
+
+ function test_superimposedHwrFullScreenInputSequence(data) {
+ prepareTest(data, true)
- if (!handwritingInputPanel.enabled)
- expectFail("", "Handwriting not enabled")
- verify(handwritingInputPanel.enabled)
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (!inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for non-Superimposed Handwriting")
+
for (var i = 0; i < data.toggleShiftCount; i++) {
inputPanel.toggleShift()
}
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
}
+ wait(2000)
if (handwritingInputPanel.wordCandidatePopupListSearchSuggestion(data.outputText)) {
handwritingInputPanel.wordCandidatePopupListSelectCurrentItem()
@@ -1277,22 +1476,22 @@ Rectangle {
function test_hwrFullScreenNumericInputSequence_data() {
return [
- { initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhPreferNumbers, inputSequence: "0123456789", outputText: "0123456789" },
- { initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhDigitsOnly, inputSequence: "1234567890", outputText: "1234567890" },
- { initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhFormattedNumbersOnly, inputSequence: "1234567890+", outputText: "1234567890+" },
- { initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhDialableCharactersOnly, inputSequence: "1234567890+", outputText: "1234567890+" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhPreferNumbers, inputSequence: "0123456789", outputText: "0123456789" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhDigitsOnly, inputSequence: "1234567890", outputText: "1234567890" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhFormattedNumbersOnly, inputSequence: "1234567890+", outputText: "1234567890+" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhDialableCharactersOnly, inputSequence: "1234567890+", outputText: "1234567890+" },
]
}
function test_hwrFullScreenNumericInputSequence(data) {
- prepareTest(data)
+ prepareTest(data, true)
- if (!handwritingInputPanel.enabled)
- expectFail("", "Handwriting not enabled")
- verify(handwritingInputPanel.enabled)
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence.charAt(inputIndex), true))
}
@@ -1307,20 +1506,20 @@ Rectangle {
function test_hwrFullScreenGestures_data() {
return [
- { initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: ["a","b","c",Qt.Key_Backspace,Qt.Key_Space,"c"], outputText: "Ab c" },
+ { initHwrMode: true, initInputMethodHints: Qt.ImhNoPredictiveText, inputSequence: ["a","b","c",Qt.Key_Backspace,Qt.Key_Space,"c"], outputText: "Ab c" },
{ initHwrMode: true, initInputMethodHints: Qt.ImhNone, initLocale: "zh_CN", initInputMode: "ChineseHandwriting", inputSequence: ["\u4e2d", "\u6587", Qt.Key_Backspace], outputText: "\u4e2d" },
]
}
function test_hwrFullScreenGestures(data) {
- prepareTest(data)
+ prepareTest(data, true)
- if (!handwritingInputPanel.enabled)
- expectFail("", "Handwriting not enabled")
- verify(handwritingInputPanel.enabled)
handwritingInputPanel.available = true
verify(inputPanel.visible === false)
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
for (var inputIndex in data.inputSequence) {
verify(handwritingInputPanel.emulateHandwriting(data.inputSequence[inputIndex], true))
}
@@ -1331,23 +1530,23 @@ Rectangle {
function test_hwrFullScreenWordCandidatePopup_data() {
return [
- { inputSequence: "hello", initLinesToBottom: 0, popupFlipped: true },
- { inputSequence: "hello", initLinesToBottom: 2, popupFlipped: true },
- { inputSequence: "hello", initLinesToBottom: 4, popupFlipped: false },
- { inputSequence: "hello", initLinesToBottom: 5, popupFlipped: false },
+ { initHwrMode: true, inputSequence: "hello", initLinesToBottom: 0, popupFlipped: true },
+ { initHwrMode: true, inputSequence: "hello", initLinesToBottom: 2, popupFlipped: true },
+ { initHwrMode: true, inputSequence: "hello", initLinesToBottom: 4, popupFlipped: false },
+ { initHwrMode: true, inputSequence: "hello", initLinesToBottom: 5, popupFlipped: false },
]
}
function test_hwrFullScreenWordCandidatePopup(data) {
- prepareTest(data)
+ prepareTest(data, true)
- if (!handwritingInputPanel.enabled)
- expectFail("", "Handwriting not enabled")
- verify(handwritingInputPanel.enabled)
handwritingInputPanel.available = true
if (!inputPanel.wordCandidateListVisibleHint)
skip("Word candidates not available (spell correction/hwr suggestions)")
+ if (handwritingInputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
+
var numAddedLines = Math.floor(textInput.height / Qt.inputMethod.cursorRectangle.height - data.initLinesToBottom) - 1
for (var i = 0; i < numAddedLines; i++) {
textInput.insert(textInput.length, "\n")
@@ -1456,41 +1655,41 @@ Rectangle {
function test_hwrWordReselection_data() {
return [
- { initText: "hello", clickPositions: [5], expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hello" },
- { initText: "hello", clickPositions: [4], expectedPreeditText: "hello", expectedCursorPosition: 0, expectedText: "" },
- { initText: "hello", clickPositions: [1], expectedPreeditText: "hello", expectedCursorPosition: 0, expectedText: "" },
- { initText: "hello", clickPositions: [0], expectedPreeditText: "", expectedCursorPosition: 0, expectedText: "hello" },
- { initText: "hello", clickPositions: [4, 3], expectedPreeditText: "hel", expectedCursorPosition: 0, expectedText: "lo" },
+ { initHwrMode: true, initText: "hello", clickPositions: [5], expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hello" },
+ { initHwrMode: true, initText: "hello", clickPositions: [4], expectedPreeditText: "hello", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "hello", clickPositions: [1], expectedPreeditText: "hello", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "hello", clickPositions: [0], expectedPreeditText: "", expectedCursorPosition: 0, expectedText: "hello" },
+ { initHwrMode: true, initText: "hello", clickPositions: [4, 3], expectedPreeditText: "hel", expectedCursorPosition: 0, expectedText: "lo" },
// 5
- { initText: "hello", clickPositions: [4, 2], expectedPreeditText: "he", expectedCursorPosition: 0, expectedText: "llo" },
- { initText: "hello", clickPositions: [4, 1], expectedPreeditText: "h", expectedCursorPosition: 0, expectedText: "ello" },
- { initText: "hello", clickPositions: [4, 0], expectedPreeditText: "", expectedCursorPosition: 0, expectedText: "hello" },
- { initText: "hello", clickPositions: [1, 2], expectedPreeditText: "he", expectedCursorPosition: 0, expectedText: "llo" },
- { initText: "hello", clickPositions: [1, 2, 2], expectedPreeditText: "", expectedCursorPosition: 2, expectedText: "hello" },
+ { initHwrMode: true, initText: "hello", clickPositions: [4, 2], expectedPreeditText: "he", expectedCursorPosition: 0, expectedText: "llo" },
+ { initHwrMode: true, initText: "hello", clickPositions: [4, 1], expectedPreeditText: "h", expectedCursorPosition: 0, expectedText: "ello" },
+ { initHwrMode: true, initText: "hello", clickPositions: [4, 0], expectedPreeditText: "", expectedCursorPosition: 0, expectedText: "hello" },
+ { initHwrMode: true, initText: "hello", clickPositions: [1, 2], expectedPreeditText: "he", expectedCursorPosition: 0, expectedText: "llo" },
+ { initHwrMode: true, initText: "hello", clickPositions: [1, 2, 2], expectedPreeditText: "", expectedCursorPosition: 2, expectedText: "hello" },
// 10
- { initText: "hello", clickPositions: [1, 5], expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hello" },
- { initText: "hel-lo", clickPositions: [3], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
- { initText: "hel-lo", clickPositions: [4], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
- { initText: "hel-lo", clickPositions: [4, 4], expectedPreeditText: "", expectedCursorPosition: 4, expectedText: "hel-lo" },
- { initText: "hel-lo", clickPositions: [5], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "hello", clickPositions: [1, 5], expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hello" },
+ { initHwrMode: true, initText: "hel-lo", clickPositions: [3], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "hel-lo", clickPositions: [4], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "hel-lo", clickPositions: [4, 4], expectedPreeditText: "", expectedCursorPosition: 4, expectedText: "hel-lo" },
+ { initHwrMode: true, initText: "hel-lo", clickPositions: [5], expectedPreeditText: "hel-lo", expectedCursorPosition: 0, expectedText: "" },
// 15
- { initText: "hel-lo", clickPositions: [5], initInputMethodHints: Qt.ImhNoPredictiveText, expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hel-lo" },
- { initText: "isn'", clickPositions: [2], expectedPreeditText: "isn", expectedCursorPosition: 0, expectedText: "'" },
- { initText: "isn't", clickPositions: [2], expectedPreeditText: "isn't", expectedCursorPosition: 0, expectedText: "" },
- { initText: "-hello", clickPositions: [2], expectedPreeditText: "hello", expectedCursorPosition: 1, expectedText: "-" },
- { initText: "aa http://www.example.com bb", clickPositions: [4], expectedPreeditText: "http", expectedCursorPosition: 3, expectedText: "aa ://www.example.com bb" },
+ { initHwrMode: true, initText: "hel-lo", clickPositions: [5], initInputMethodHints: Qt.ImhNoPredictiveText, expectedPreeditText: "", expectedCursorPosition: 5, expectedText: "hel-lo" },
+ { initHwrMode: true, initText: "isn'", clickPositions: [2], expectedPreeditText: "isn", expectedCursorPosition: 0, expectedText: "'" },
+ { initHwrMode: true, initText: "isn't", clickPositions: [2], expectedPreeditText: "isn't", expectedCursorPosition: 0, expectedText: "" },
+ { initHwrMode: true, initText: "-hello", clickPositions: [2], expectedPreeditText: "hello", expectedCursorPosition: 1, expectedText: "-" },
+ { initHwrMode: true, initText: "aa http://www.example.com bb", clickPositions: [4], expectedPreeditText: "http", expectedCursorPosition: 3, expectedText: "aa ://www.example.com bb" },
// 20
- { initText: "aa http://www.example.com bb", initInputMethodHints: Qt.ImhUrlCharactersOnly, clickPositions: [4], expectedPreeditText: "http://www.example.com", expectedCursorPosition: 3, expectedText: "aa bb" },
- { initText: "aa username@example.com bb", clickPositions: [4], expectedPreeditText: "username", expectedCursorPosition: 3, expectedText: "aa @example.com bb" },
- { initText: "aa username@example.com bb", initInputMethodHints: Qt.ImhEmailCharactersOnly, clickPositions: [4], expectedPreeditText: "username@example.com", expectedCursorPosition: 3, expectedText: "aa bb" },
+ { initHwrMode: true, initText: "aa http://www.example.com bb", initInputMethodHints: Qt.ImhUrlCharactersOnly, clickPositions: [4], expectedPreeditText: "http://www.example.com", expectedCursorPosition: 3, expectedText: "aa bb" },
+ { initHwrMode: true, initText: "aa username@example.com bb", clickPositions: [4], expectedPreeditText: "username", expectedCursorPosition: 3, expectedText: "aa @example.com bb" },
+ { initHwrMode: true, initText: "aa username@example.com bb", initInputMethodHints: Qt.ImhEmailCharactersOnly, clickPositions: [4], expectedPreeditText: "username@example.com", expectedCursorPosition: 3, expectedText: "aa bb" },
]
}
function test_hwrWordReselection(data) {
- prepareTest(data)
+ prepareTest(data, true)
- if (!inputPanel.setHandwritingMode(true))
- skip("Handwriting not enabled")
+ if (inputPanel.isSuperimposedHandwriting())
+ skip("Not valid test for Superimposed Handwriting")
var cursorRects = []
for (var i = 0; i < data.clickPositions.length; i++)
@@ -1878,5 +2077,67 @@ Rectangle {
compare(inputPanel.shadowInput.text, "")
}
+ function test_userDictionary_data() {
+ return [
+ { inputSequence: ['a','s','d','f'], initShift: false },
+ { inputSequence: ['a','s','d'], initShift: false, expectedSuggestion: "asdf", suggestionIsFromUserDictionary: true },
+ { inputSequence: ['a','s','d'], initShift: true, expectedSuggestion: "Asdf", suggestionIsFromUserDictionary: true },
+ //
+ { inputSequence: ['s','d','f','a'], initShift: true },
+ { inputSequence: ['s','d','f'], initShift: true, expectedSuggestion: "Sdfa", suggestionIsFromUserDictionary: true },
+ { inputSequence: ['s','d','f'], initShift: false, expectedSuggestion: "sdfa", suggestionIsFromUserDictionary: true, removeSuggestion: true },
+ //
+ { inputSequence: ['d','f','a','s'], initCapsLock: true },
+ { inputSequence: ['d','f','a'], initCapsLock: true, expectedSuggestion: "DFAS", suggestionIsFromUserDictionary: true },
+ { inputSequence: ['d','f','a'], initShift: false, unexpectedSuggestion: "dfas", suggestionIsFromUserDictionary: true },
+ //
+ { inputSequence: ['f','a','s','d'], initShift: false, initInputMethodHints: Qt.ImhSensitiveData },
+ { inputSequence: ['f','a','s'], initShift: false, unexpectedSuggestion: "fasd" },
+ { inputSequence: ['f','a','s'], initShift: true, unexpectedSuggestion: "Fasd"},
+ //
+ { initLocale: "en_GB", inputSequence: "windo", expectedSuggestion: "Window", suggestionIsFromUserDictionary: false, removeSuggestion: true },
+ { initLocale: "en_GB", inputSequence: "window", },
+ { initLocale: "en_GB", inputSequence: "windo", expectedSuggestion: "Window", suggestionIsFromUserDictionary: false },
+ ]
+ }
+
+ function test_userDictionary(data) {
+ prepareTest(data, true)
+
+ if (!inputPanel.wordCandidateListVisibleHint)
+ skip("Prediction/spell correction not enabled")
+
+ if (data.hasOwnProperty("initShift"))
+ inputPanel.setShiftActive(data.initShift)
+ if (data.hasOwnProperty("initCapsLock"))
+ inputPanel.setCapsLockActive(data.initCapsLock)
+
+ for (var inputIndex in data.inputSequence)
+ inputPanel.virtualKeyClick(data.inputSequence[inputIndex])
+
+ if (data.hasOwnProperty("expectedSuggestion")) {
+ tryVerify(function() {return inputPanel.selectionListSearchSuggestion(data.expectedSuggestion)}, 1000, "The expected spell correction suggestion \"%1\" was not found".arg(data.expectedSuggestion))
+ verify(inputPanel.selectionListCurrentIndex() > 0)
+ if (data.hasOwnProperty("suggestionIsFromUserDictionary"))
+ compare(inputPanel.selectionListSuggestionIsFromUserDictionary(), data.suggestionIsFromUserDictionary)
+ if (data.hasOwnProperty("removeSuggestion") && data.removeSuggestion) {
+ verify(inputPanel.openWordCandidateContextMenu())
+ inputPanel.wordCandidateListChangedSpy.clear()
+ verify(inputPanel.selectItemFromWordCandidateContextMenu(0))
+ inputPanel.wordCandidateListChangedSpy.wait()
+ tryVerify(function() {return !inputPanel.selectionListSearchSuggestion(data.expectedSuggestion)}, 1000, "An unexpected spell correction suggestion \"%1\" was found".arg(data.unexpectedSuggestion))
+ } else {
+ inputPanel.selectionListSelectCurrentItem()
+ }
+ } else if (data.hasOwnProperty("unexpectedSuggestion")) {
+ var oldIndex = inputPanel.selectionListCurrentIndex()
+ tryVerify(function() {return !inputPanel.selectionListSearchSuggestion(data.unexpectedSuggestion)}, 1000, "An unexpected spell correction suggestion \"%1\" was found".arg(data.unexpectedSuggestion))
+ compare(inputPanel.selectionListCurrentIndex(), oldIndex)
+ } else {
+ inputPanel.selectionListSelectCurrentItem()
+ }
+
+ Qt.inputMethod.reset()
+ }
}
}
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
index cd2eab9b..16f1285e 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/44397_100_0.txt
@@ -8,114 +8,114 @@
.Y_POINTS_PER_INCH 94
.POINTS_PER_SECOND 60
.PEN_DOWN
-379 53 0
-380 53 155
-382 53 177
-385 53 179
-391 53 243
-400 53 244
-421 55 311
-437 55 313
-441 55 315
-448 55 365
-454 55 366
-461 55 370
-467 54 426
-472 54 427
-475 54 486
-477 54 487
-478 54 490
-479 54 548
-480 54 549
-482 54 610
-485 54 610
-488 54 670
-489 54 731
-489 55 939
-489 56 1003
-489 60 1004
-489 64 1064
-489 66 1065
-489 72 1124
-489 75 1125
-489 79 1131
-489 81 1184
-489 86 1185
-489 91 1245
-489 92 1246
-489 97 1306
-489 99 1307
-489 101 1366
-489 102 1367
-489 103 1427
-489 105 1429
-489 106 1500
-489 107 1549
-489 108 1550
-489 109 1614
+344 53 0
+345 53 155
+347 53 177
+350 53 179
+356 53 243
+365 53 244
+386 55 311
+402 55 313
+406 55 315
+413 55 365
+419 55 366
+426 55 370
+432 54 426
+437 54 427
+440 54 486
+442 54 487
+443 54 490
+444 54 548
+445 54 549
+447 54 610
+450 54 610
+453 54 670
+454 54 731
+454 55 939
+454 56 1003
+454 60 1004
+454 64 1064
+454 66 1065
+454 72 1124
+454 75 1125
+454 79 1131
+454 81 1184
+454 86 1185
+454 91 1245
+454 92 1246
+454 97 1306
+454 99 1307
+454 101 1366
+454 102 1367
+454 103 1427
+454 105 1429
+454 106 1500
+454 107 1549
+454 108 1550
+454 109 1614
.PEN_UP
.PEN_DOWN
-383 113 2999
-384 113 3259
-385 112 3291
-386 112 3360
-399 112 3361
-412 112 3389
-434 112 3449
-440 112 3450
-451 112 3451
-455 112 3510
-479 111 3511
-493 110 3574
-506 109 3576
-513 109 3632
-515 109 3633
-516 109 3636
+348 113 2999
+349 113 3259
+350 112 3291
+351 112 3360
+364 112 3361
+377 112 3389
+399 112 3449
+405 112 3450
+416 112 3451
+420 112 3510
+444 111 3511
+458 110 3574
+471 109 3576
+478 109 3632
+480 109 3633
+481 109 3636
.PEN_UP
.PEN_DOWN
-430 115 5767
-430 116 5851
-432 120 5884
-433 123 5937
-433 127 5938
-434 130 6000
-434 133 6002
-435 139 6058
-435 141 6059
-435 142 6124
-435 143 6523
+395 115 5767
+395 116 5851
+397 120 5884
+398 123 5937
+398 127 5938
+399 130 6000
+399 133 6002
+400 139 6058
+400 141 6059
+400 142 6124
+400 143 6523
.PEN_UP
.PEN_DOWN
-393 151 7943
-394 151 8099
-399 150 8124
-412 150 8184
-422 150 8185
-438 150 8245
-448 150 8246
-465 149 8305
-478 149 8306
-485 149 8366
-487 149 8366
-488 149 8432
-489 149 8490
-491 149 8492
-492 149 8549
-492 150 8835
-492 152 8882
-492 155 8883
-492 159 8944
-492 163 8945
-492 168 9005
-491 173 9005
-491 177 9067
-490 182 9068
-490 188 9126
-490 192 9126
-490 193 9130
-490 196 9188
-490 198 9247
-490 200 9247
-490 202 9307
-490 203 9308
+358 151 7943
+359 151 8099
+364 150 8124
+377 150 8184
+387 150 8185
+403 150 8245
+413 150 8246
+430 149 8305
+443 149 8306
+450 149 8366
+452 149 8366
+453 149 8432
+454 149 8490
+456 149 8492
+457 149 8549
+457 150 8835
+457 152 8882
+457 155 8883
+457 159 8944
+457 163 8945
+457 168 9005
+456 173 9005
+456 177 9067
+455 182 9068
+455 188 9126
+455 192 9126
+455 193 9130
+455 196 9188
+455 198 9247
+455 200 9247
+455 202 9307
+455 203 9308
.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
index fd22d87d..03a24576 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/50612_100_0.txt
@@ -67,27 +67,31 @@
622 121 2840
623 121 2957
624 121 3045
-625 120 3236
+625 121 3096
+626 121 3155
+628 121 3199
+629 121 3254
+631 121 3310
.PEN_UP
.PEN_DOWN
-614 42 3848
-614 45 3896
-614 47 3897
-614 54 3900
-615 63 3958
-617 76 3958
-619 92 4017
-620 100 4018
-620 115 4078
-620 133 4079
-618 141 4084
-616 153 4138
-616 157 4139
-615 169 4200
-614 176 4201
-614 178 4205
-613 184 4260
-613 188 4261
-613 190 4420
-613 191 4540
+626 42 3848
+626 45 3896
+626 47 3897
+626 54 3900
+627 63 3958
+629 76 3958
+631 92 4017
+632 100 4018
+632 115 4078
+632 133 4079
+630 141 4084
+628 153 4138
+628 157 4139
+627 169 4200
+626 176 4201
+626 178 4205
+625 184 4260
+625 188 4261
+625 190 4420
+625 191 4540
.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt b/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
index 99f6f912..25488a30 100644
--- a/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
+++ b/tests/auto/inputpanel/hwr_test_data/korean/54620_100_0.txt
@@ -8,152 +8,152 @@
.Y_POINTS_PER_INCH 94
.POINTS_PER_SECOND 60
.PEN_DOWN
-169 59 0
-171 59 148
-175 59 170
-183 59 228
-197 59 229
-210 59 288
-223 61 289
-233 61 292
-241 61 350
-252 62 350
-260 62 418
-265 62 419
-266 62 748
+224 27 0
+223 27 148
+222 34 170
+222 39 228
+223 46 229
+223 47 288
+223 50 289
+224 53 292
+224 56 350
+224 57 350
+225 59 418
+225 61 419
+225 62 748
.PEN_UP
.PEN_DOWN
-224 27 1367
-223 27 1414
-222 34 1444
-222 39 1502
-223 46 1503
-223 47 1508
-223 50 1566
-224 53 1568
-224 56 1629
-224 57 1630
-225 59 1630
-225 61 1686
-225 62 1687
+169 59 1367
+171 59 1414
+175 59 1444
+183 59 1502
+197 59 1503
+210 59 1508
+223 61 1566
+233 61 1568
+241 61 1629
+252 62 1630
+260 62 1630
+265 62 1686
+266 62 1687
.PEN_UP
.PEN_DOWN
-244 82 3184
-243 81 3259
-242 81 3285
-238 80 3349
-225 80 3350
-210 80 3412
-198 82 3414
-192 84 3474
-186 88 3476
-184 90 3478
-180 95 3532
-178 100 3533
-178 109 3595
-178 117 3598
-181 125 3657
-186 130 3658
-194 136 3716
-197 137 3717
-199 137 3775
-202 137 3776
-204 137 3780
-206 137 3835
-223 135 3836
-234 133 3897
-240 130 3898
-242 129 3900
-244 128 3958
-251 120 3959
-253 117 4017
-253 114 4020
-253 110 4081
-251 104 4083
-249 99 4140
-247 95 4141
-243 89 4205
-242 86 4206
-242 85 4212
-241 84 4284
-240 84 4324
-239 84 4596
+244 82 2184
+243 81 2259
+242 81 2285
+238 80 2349
+225 80 2350
+210 80 2412
+198 82 2414
+192 84 2474
+186 88 2476
+184 90 2478
+180 95 2532
+178 100 2533
+178 109 2595
+178 117 2598
+181 125 2657
+186 130 2658
+194 136 2716
+197 137 2717
+199 137 2775
+202 137 2776
+204 137 2780
+206 137 2835
+223 135 2836
+234 133 2897
+240 130 2898
+242 129 2900
+244 128 2958
+251 120 2959
+253 117 3017
+253 114 3020
+253 110 3081
+251 104 3083
+249 99 3140
+247 95 3141
+243 89 3205
+242 86 3206
+242 85 3212
+241 84 3284
+240 84 3324
+239 84 3596
.PEN_UP
.PEN_DOWN
-177 144 6344
-178 144 6573
-178 146 6600
-179 148 6604
-179 150 6657
-180 153 6658
-181 160 6719
-182 167 6720
-183 176 6779
-184 182 6780
-184 185 6840
-185 189 6841
-186 189 7108
-195 189 7174
-206 187 7234
-213 186 7236
-219 186 7294
-224 186 7296
-233 186 7355
-241 185 7355
-252 185 7417
-262 185 7419
-268 186 7421
-276 186 7475
-281 186 7476
-289 186 7536
-290 186 7537
-291 186 7597
-292 186 7660
-293 186 7724
-294 186 7725
-295 186 8172
+283 25 4344
+283 26 4573
+283 27 4600
+283 33 4604
+283 41 4657
+282 53 4658
+282 65 4719
+282 78 4720
+282 92 4779
+281 115 4780
+280 124 4840
+279 133 4841
+279 135 5108
+278 142 5174
+277 148 5234
+277 150 5236
+277 151 5294
+277 153 5296
+277 154 5355
+277 153 5355
+277 151 5417
.PEN_UP
.PEN_DOWN
-283 25 9136
-283 26 9220
-283 27 9244
-283 33 9299
-283 41 9300
-282 53 9359
-282 65 9359
-282 78 9420
-282 92 9421
-281 115 9481
-280 124 9482
-279 133 9484
-279 135 9542
-278 142 9542
-277 148 9605
-277 150 9607
-277 151 9764
-277 153 9816
-277 154 9876
-277 153 10124
-277 151 10180
+282 89 6136
+283 89 6220
+286 89 6244
+288 88 6299
+291 88 6300
+294 88 6359
+295 88 6359
+297 88 6420
+298 88 6421
+299 88 6481
+300 88 6482
+301 88 6484
+302 88 6542
+303 88 6542
+304 88 6605
+305 88 6607
+306 88 6764
+307 88 6816
+309 89 6876
.PEN_UP
.PEN_DOWN
-282 89 10651
-283 89 10796
-286 89 10821
-288 88 10879
-291 88 10879
-294 88 10941
-295 88 10941
-297 88 11003
-298 88 11004
-299 88 11061
-300 88 11062
-301 88 11121
-302 88 11123
-303 88 11185
-304 88 11187
-305 88 11189
-306 88 11248
-307 88 11249
-309 89 11304
+177 144 7651
+178 144 7796
+178 146 7821
+179 148 7879
+179 150 7879
+180 153 7941
+181 160 7941
+182 167 8003
+183 176 8004
+184 182 8061
+184 185 8062
+185 189 8121
+186 189 8123
+195 189 8185
+206 187 8187
+213 186 8189
+219 186 8248
+224 186 8249
+233 186 8304
+241 185 8304
+252 185 8366
+262 185 8368
+268 186 8370
+276 186 8424
+281 186 8425
+289 186 8485
+290 186 8486
+291 186 8546
+292 186 8609
+293 186 8673
+294 186 8674
+295 186 8738
.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt
new file mode 100644
index 00000000..7208d774
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/103_100_0.txt
@@ -0,0 +1,89 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+493 87 0
+492 86 57
+488 84 87
+484 83 150
+480 83 152
+473 83 212
+462 85 215
+454 89 271
+452 92 273
+451 94 274
+449 99 332
+445 109 333
+443 114 337
+442 120 394
+442 132 395
+442 144 455
+444 159 458
+446 167 522
+448 175 524
+450 178 577
+450 179 578
+451 180 640
+454 181 642
+455 182 699
+456 183 701
+460 185 760
+463 185 762
+466 186 823
+469 186 825
+474 183 883
+487 179 884
+496 173 944
+502 162 945
+509 144 1011
+514 133 1013
+514 124 1069
+514 118 1070
+514 113 1073
+512 108 1125
+509 100 1125
+507 97 1185
+506 94 1186
+506 92 1247
+505 90 1248
+504 89 1310
+504 88 1312
+504 90 1571
+506 95 1616
+507 101 1618
+511 117 1675
+512 130 1676
+514 145 1738
+514 158 1740
+514 165 1797
+514 177 1799
+514 182 1802
+514 187 1860
+513 193 1862
+513 198 1922
+512 200 1924
+512 202 1981
+512 206 1983
+511 207 2043
+511 209 2044
+511 211 2045
+511 212 2050
+511 214 2106
+510 217 2167
+510 218 2169
+508 220 2170
+507 222 2228
+503 226 2230
+500 227 2234
+499 229 2290
+491 232 2293
+480 233 2349
+466 234 2350
+458 235 2411
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt
new file mode 100644
index 00000000..f8df0a97
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_0.txt
@@ -0,0 +1,41 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+255 93 0
+255 95 75
+255 97 92
+255 103 123
+255 105 124
+255 111 184
+255 125 185
+255 131 186
+255 138 245
+255 147 247
+256 153 306
+256 154 308
+256 155 366
+256 156 431
+256 158 432
+256 159 489
+256 160 490
+256 161 836
+256 162 885
+256 164 952
+256 165 954
+256 166 1007
+256 167 1143
+256 168 1188
+256 169 1249
+257 170 1309
+257 171 1400
+.PEN_UP
+.PEN_DOWN
+252 71 2545
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt
new file mode 100644
index 00000000..ce79ff6b
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/105_100_1.txt
@@ -0,0 +1,29 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+538 83 0
+538 86 83
+538 88 96
+538 92 147
+538 105 148
+538 129 203
+537 141 204
+534 170 264
+532 182 265
+532 191 327
+532 197 329
+532 198 388
+532 200 390
+532 198 764
+532 194 812
+.PEN_UP
+.PEN_DOWN
+533 58 1292
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt
new file mode 100644
index 00000000..ead63891
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/110_100_0.txt
@@ -0,0 +1,82 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+400 82 0
+400 83 85
+400 85 96
+400 96 153
+401 103 156
+402 113 157
+402 124 215
+402 147 217
+402 161 221
+402 173 275
+402 188 278
+400 198 342
+399 202 344
+399 204 345
+399 205 396
+399 204 526
+399 200 580
+399 191 582
+399 185 641
+401 170 643
+402 162 644
+403 153 701
+404 132 703
+407 118 761
+409 109 763
+411 104 764
+414 99 824
+415 98 827
+417 95 884
+418 93 886
+419 93 1125
+420 93 1183
+422 92 1185
+423 92 1216
+425 91 1277
+426 91 1337
+427 91 1338
+428 91 1340
+432 94 1399
+434 96 1400
+437 102 1430
+439 105 1460
+442 115 1461
+444 126 1520
+446 137 1521
+447 148 1581
+447 153 1582
+447 159 1642
+447 165 1643
+447 166 1645
+447 172 1703
+446 177 1764
+446 179 1765
+446 180 1853
+446 181 1891
+446 183 1947
+446 185 1950
+446 186 2007
+446 188 2008
+446 189 2069
+445 191 2070
+445 192 2131
+445 193 2193
+445 194 2195
+445 195 2413
+445 196 2477
+445 197 2527
+445 198 2528
+445 199 2587
+445 200 2588
+445 201 2648
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt
new file mode 100644
index 00000000..dc06a8b8
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/116_100_0.txt
@@ -0,0 +1,72 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+639 167 0
+640 167 50
+640 164 76
+645 154 136
+653 135 137
+662 108 203
+666 87 205
+666 73 257
+666 67 259
+666 62 318
+666 60 319
+666 58 380
+665 57 381
+665 56 440
+664 57 505
+664 58 507
+663 61 561
+663 66 562
+662 75 622
+661 86 623
+660 98 688
+659 111 689
+659 114 690
+659 121 745
+659 132 746
+659 141 805
+659 149 806
+659 158 868
+660 161 870
+661 164 929
+661 165 990
+662 166 992
+663 167 1131
+663 165 1483
+663 159 1535
+664 156 1536
+664 151 1538
+665 146 1595
+666 136 1596
+666 127 1659
+666 116 1662
+665 111 1667
+663 105 1723
+656 96 1724
+652 93 1781
+648 92 1783
+643 90 1786
+639 89 1840
+633 88 1841
+632 87 1971
+632 86 2023
+636 85 2023
+641 84 2024
+647 82 2026
+655 81 2084
+668 79 2085
+682 77 2148
+686 77 2150
+688 77 2154
+689 77 2211
+690 77 2267
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt
new file mode 100644
index 00000000..70f7d412
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/7871_100_0.txt
@@ -0,0 +1,88 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+294 112 0
+297 112 117
+299 113 134
+305 114 141
+311 115 176
+318 115 177
+325 116 237
+330 116 238
+340 116 297
+350 116 299
+352 116 358
+352 111 360
+353 104 419
+353 98 420
+353 94 481
+347 87 483
+337 81 541
+334 79 543
+330 78 572
+329 78 606
+320 78 607
+314 78 662
+303 80 663
+301 82 667
+299 84 723
+292 93 725
+289 97 783
+284 108 786
+282 114 788
+282 121 843
+282 134 845
+285 145 903
+288 153 906
+292 159 966
+293 161 968
+295 165 972
+296 165 1026
+299 168 1027
+304 170 1092
+311 173 1093
+314 173 1095
+323 174 1151
+331 175 1153
+343 176 1213
+353 176 1215
+357 175 1273
+359 172 1275
+359 171 1334
+360 171 2556
+.PEN_UP
+.PEN_DOWN
+306 67 3105
+306 64 3162
+307 63 3164
+309 62 3219
+314 56 3221
+320 47 3281
+323 43 3283
+325 40 3285
+326 40 3412
+327 41 3462
+327 43 3463
+328 47 3467
+329 51 3522
+330 59 3523
+330 62 3586
+331 62 4012
+.PEN_UP
+.PEN_DOWN
+338 62 4380
+340 62 4443
+343 59 4471
+348 56 4532
+352 51 4535
+355 47 4593
+356 45 4594
+357 44 4595
+.PEN_UP
diff --git a/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt b/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt
new file mode 100644
index 00000000..c4d988de
--- /dev/null
+++ b/tests/auto/inputpanel/hwr_test_data/vietnamese/7879_100_0.txt
@@ -0,0 +1,71 @@
+.VERSION 1.0
+.HIERARCHY CHARACTER
+.COORD X Y T
+.SEGMENT CHARACTER
+.X_DIM 1032
+.Y_DIM 263
+.X_POINTS_PER_INCH 94
+.Y_POINTS_PER_INCH 94
+.POINTS_PER_SECOND 60
+.PEN_DOWN
+561 107 0
+564 107 60
+571 109 76
+583 109 128
+608 111 129
+620 111 186
+632 109 187
+634 106 188
+635 100 246
+632 93 246
+624 87 306
+619 86 307
+614 85 308
+608 85 367
+594 87 368
+587 90 371
+582 94 437
+564 110 438
+559 117 489
+554 132 490
+554 149 550
+559 161 551
+562 164 611
+568 166 612
+576 167 672
+605 168 674
+622 168 733
+625 167 794
+626 167 795
+627 166 857
+628 166 1029
+.PEN_UP
+.PEN_DOWN
+583 57 4161
+584 57 4229
+588 53 4231
+592 49 4288
+595 45 4289
+599 42 4351
+600 42 4353
+601 41 4411
+602 40 4476
+603 39 4749
+604 38 4836
+605 38 4895
+606 38 4900
+607 38 5005
+608 38 5149
+609 38 5198
+609 39 5199
+613 51 5260
+615 59 5261
+616 65 5320
+617 68 5321
+617 69 5323
+617 70 5382
+618 71 5383
+.PEN_UP
+.PEN_DOWN
+594 188 6585
+.PEN_UP
diff --git a/tests/auto/inputpanel/tst_inputpanel.cpp b/tests/auto/inputpanel/tst_inputpanel.cpp
index 8b84f67b..409383c7 100644
--- a/tests/auto/inputpanel/tst_inputpanel.cpp
+++ b/tests/auto/inputpanel/tst_inputpanel.cpp
@@ -29,7 +29,22 @@
#include <QtQuickTest/quicktest.h>
#include <QByteArray>
+#include <QStandardPaths>
+#include <QFileInfo>
+#include <QDir>
static bool s_configEnv = qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
+static bool initStandardPaths() {
+ QStandardPaths::setTestModeEnabled(true);
+ auto configLocations = QStringList()
+ << QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/qtvirtualkeyboard"
+ << QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/qtvirtualkeyboard";
+ for (const QString &configLocation : configLocations) {
+ if (configLocation != "/qtvirtualkeyboard")
+ QDir(configLocation).removeRecursively();
+ }
+ return true;
+}
+static bool s_initStandardPaths = initStandardPaths();
QUICK_TEST_MAIN(inputpanel)
diff --git a/tests/auto/layoutfilesystem/data/layouts/en_GB/main.qml b/tests/auto/layoutfilesystem/data/layouts/en_GB/main.qml
index e44e57b5..e58b8d66 100644
--- a/tests/auto/layoutfilesystem/data/layouts/en_GB/main.qml
+++ b/tests/auto/layoutfilesystem/data/layouts/en_GB/main.qml
@@ -32,5 +32,5 @@ import QtQuick.VirtualKeyboard 2.1
KeyboardLayout {
objectName: "en_GB"
- inputMode: InputEngine.Latin
+ inputMode: InputEngine.InputMode.Latin
}
diff --git a/tests/auto/layoutresources/data/layouts/en_GB/main.qml b/tests/auto/layoutresources/data/layouts/en_GB/main.qml
index e44e57b5..e58b8d66 100644
--- a/tests/auto/layoutresources/data/layouts/en_GB/main.qml
+++ b/tests/auto/layoutresources/data/layouts/en_GB/main.qml
@@ -32,5 +32,5 @@ import QtQuick.VirtualKeyboard 2.1
KeyboardLayout {
objectName: "en_GB"
- inputMode: InputEngine.Latin
+ inputMode: InputEngine.InputMode.Latin
}