summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-09-09 13:48:58 +0200
committeraxis <qt-info@nokia.com>2010-09-10 11:51:44 +0200
commit1ecd2d460896959cf3c5654f4cef7e4d3c8f5cf6 (patch)
tree5f3f263d6080e2000562b9b405820b8f08935870 /tests/auto
parent2735bc6759f881c786a1097580a8682e3d28f365 (diff)
downloadqt4-tools-1ecd2d460896959cf3c5654f4cef7e4d3c8f5cf6.tar.gz
Fixed crash in input methods when using symbols menu and numbers only
When inputting only numbers, the symbol menu should not do anything. However in the old code the resource id of the symbol table was still being set, so the symbol key on N97 would look up a table that was not valid for the current input mode and crash. Fixed by setting the symbol table id to zero under those conditions. RevBy: Sami Merila Task: QTBUG-13472 AutoTest: Included (cherry picked from commit 5cef786a651c675d3428060a19bfd9d9ecee6083)
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qinputcontext/tst_qinputcontext.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp
index 8eef2cc794..26b7b00043 100644
--- a/tests/auto/qinputcontext/tst_qinputcontext.cpp
+++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp
@@ -882,6 +882,27 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data()
<< QString("44")
<< QString("");
events.clear();
+
+ // Test that the symbol key successfully does nothing when in number-only mode.
+ events << FepReplayEvent(EEventKeyDown, EStdKeyLeftFunc, 0, 0, 0);
+ events << FepReplayEvent(EEventKeyUp, EStdKeyLeftFunc, 0, 0, 0);
+ QTest::newRow("Dead symbols key")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Normal
+ << events
+ << QString("")
+ << QString("");
+ QTest::newRow("Dead symbols key and password")
+ << true
+ << Qt::InputMethodHints(Qt::ImhDigitsOnly)
+ << 0
+ << QLineEdit::Password
+ << events
+ << QString("")
+ << QString("");
+ events.clear();
#endif
}