aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-06-06 23:55:02 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-06-07 18:08:39 +0000
commit7c770c6e510d6c2274fd10a10e6f812672e3a6d1 (patch)
tree51ff3231b3347898414f46e30a7c7460b177077e /tests/auto
parentf40397c05c76d81c23cac4b2c5f28413b30f20c3 (diff)
tests: Fix test execution if only one language is configured
test_languagePopupListActiveLocales test will fail with unhandled exception if only Korean (for example) is configured. In this case the language button is not found, and calling virtualKeyClick() function with null parameter causes an unhandled exception. Change-Id: Idc5d57fe56423d7a49947f6c02e75d28b7e4ec90 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/inputpanel/data/inputpanel/inputpanel.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
index d1b3cae6..f082115a 100644
--- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
+++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml
@@ -368,6 +368,8 @@ InputPanel {
}
function virtualKeyPress(key) {
+ if (!key)
+ return false
return multiLayoutKeyActionHelper(key, virtualKeyPressOnCurrentLayout)
}