diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-08-06 09:56:44 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-08-06 10:06:30 (GMT) |
commit | 6b61a2787759673f246493453c0809d24c9d6ae5 (patch) | |
tree | d5a8ac8d43851d58fda666a0af2da3451eda64c0 /src/gui/inputmethod | |
parent | c17c9b4c0a62ca63d7c7647e7c8ef8a4c719da2f (diff) | |
download | Qt-6b61a2787759673f246493453c0809d24c9d6ae5.zip Qt-6b61a2787759673f246493453c0809d24c9d6ae5.tar.gz Qt-6b61a2787759673f246493453c0809d24c9d6ae5.tar.bz2 |
Make input methods work correctly with Symbian^3 FEP in numeric mode
Enable alphanumeric modes to use EAknEditorFlagUseSCTNumericCharmap flag
so that all symbols are shown when you press the * key when the FEP
is in portrait mode (traditional 4x3 mobile phone keypad emulation)
Enable text input mode as well as numeric input mode for
ImhFormattedNumbersOnly or ImhDialableCharactersOnly, as the '*' key on
the virtual keypad does not work to launch the symbols menu otherwise.
Task-number: QT-3681
Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 999edda..cd05e38 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -359,10 +359,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) commitTemporaryPreeditString(); - bool numbersOnly = hints & ImhDigitsOnly || hints & ImhFormattedNumbersOnly - || hints & ImhDialableCharactersOnly; - bool noOnlys = !(numbersOnly || hints & ImhUppercaseOnly - || hints & ImhLowercaseOnly); + bool numbersOnly = (hints & ImhDigitsOnly) || (hints & ImhFormattedNumbersOnly) + || (hints & ImhDialableCharactersOnly); + bool noOnlys = !(numbersOnly || (hints & ImhUppercaseOnly) + || (hints & ImhLowercaseOnly)); TInt flags; Qt::InputMethodHints oldHints = hints; @@ -388,8 +388,7 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) hints |= ImhPreferLowercase; } else if (hints & ImhUppercaseOnly) { hints |= ImhPreferUppercase; - } else if (hints & ImhDigitsOnly || hints & ImhFormattedNumbersOnly - || hints & ImhDialableCharactersOnly) { + } else if (numbersOnly) { hints |= ImhPreferNumbers; } } @@ -406,6 +405,11 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) if (numbersOnly) { flags |= EAknEditorNumericInputMode; } + if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 + && ((hints & ImhFormattedNumbersOnly) || (hints & ImhDialableCharactersOnly)) { + //workaround - the * key does not launch the symbols menu, making it impossible to use these modes unless text mode is enabled. + flags |= EAknEditorTextInputMode; + } if (hints & ImhUppercaseOnly || hints & ImhLowercaseOnly) { flags |= EAknEditorTextInputMode; } @@ -456,6 +460,9 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) if (hints & ImhNoPredictiveText || hints & ImhHiddenText) { flags |= EAknEditorFlagNoT9; } + // if alphanumeric input, then make all symbols available in numeric mode too. + if (!numbersOnly) + flags |= EAknEditorFlagUseSCTNumericCharmap; m_fepState->SetFlags(flags); ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateFlagsUpdate); |