aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/inputpanel/data/inputpanel
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-11-17 09:33:53 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-11-27 11:02:45 +0000
commit8177619e003eaf6097a27bc9e3abd7e8fcdd7d1d (patch)
tree67cf3cb0fdf794e64447012956d61f2b151b225e /tests/auto/inputpanel/data/inputpanel
parent52cd240a4d11e297f67e620f3516064105cc0de1 (diff)
Add Zhuyin input method for Traditional Chinese
Zhuyin can be enabled with CONFIG+=tcime or CONFIG+=zhuyin qmake flags. Note that CONFIG+=tcime enables both Cangjie and Zhuyin input methods. You can also enable the Cangjie input method with CONFIG+=cangjie, in which case the Zhuyin input method will not be activated, unless the config contains CONFIG+=zhuyin also. Change-Id: Iddea01f3e3d7f1dafff80e17da5b7cf89d4cfc55 Task-number: QTRD-3726 Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/auto/inputpanel/data/inputpanel')
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index 2ecbba66..6aee4b26 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -198,8 +198,10 @@ InputPanel {
return InputEngine.Dialable
else if (inputModeName === "Pinyin")
return InputEngine.Pinyin
- else if (inputModeName === "Canjie")
- return InputEngine.Canjie
+ else if (inputModeName === "Cangjie")
+ return InputEngine.Cangjie
+ else if (inputModeName === "Zhuyin")
+ return InputEngine.Zhuyin
else if (inputModeName === "Hangul")
return InputEngine.Hangul
else if (inputModeName === "Hiragana")
@@ -212,8 +214,12 @@ InputPanel {
return -1
}
+ function isInputModeSupported(inputMode) {
+ return InputContext.inputEngine.inputModes.indexOf(inputMode) !== -1
+ }
+
function setInputMode(inputMode) {
- if (InputContext.inputEngine.inputModes.indexOf(inputMode) === -1)
+ if (!isInputModeSupported(inputMode))
return false
if (InputContext.inputEngine.inputMode !== inputMode)
InputContext.inputEngine.inputMode = inputMode
@@ -296,7 +302,7 @@ InputPanel {
success = keyActionOnCurrentLayoutCb(key)
}
if (!success)
- console.warn("Key not found '%1'".arg(key))
+ console.warn("Key not found \\u%1".arg(key.charCodeAt(0).toString(16)))
return success
}