summaryrefslogtreecommitdiffstats
path: root/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-04-13 12:28:05 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-04-13 12:28:05 (GMT)
commite090c7ff6c36557e3b0f739308147234978e9d2a (patch)
tree4d2832471e1bde8e64ecdeea5658125c6a740b6c /src/gui/inputmethod/qcoefepinputcontext_s60.cpp
parentf9fdac19aff44f5c6d868a8e8dfa59c0ab6e3c20 (diff)
downloadQt-e090c7ff6c36557e3b0f739308147234978e9d2a.zip
Qt-e090c7ff6c36557e3b0f739308147234978e9d2a.tar.gz
Qt-e090c7ff6c36557e3b0f739308147234978e9d2a.tar.bz2
Not possible to show selected text in virtual keyboard
In Sym^3 when virtual keyboard is opened, text selection is not carried over from editor-like widget to the VKB. This is due that new implementation of AVKON FEP manager requires that clients indicate with editor flags that they can handle text selection. Task-number: QT-3277 Reviewed-by: Janne Anttila
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index cc60246..94036d0 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -58,6 +58,11 @@
// MAknEdStateObserver::EAknActivatePenInputRequest
#define QT_EAknActivatePenInputRequest MAknEdStateObserver::EAknEdwinStateEvent(7)
+// EAknEditorFlagSelectionVisible is only valid from 3.2 onwards.
+// Sym^3 AVKON FEP manager expects that this flag is used for FEP-aware editors
+// that support text selection.
+#define QT_EAknEditorFlagSelectionVisible 0x100000
+
QT_BEGIN_NAMESPACE
QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
@@ -75,7 +80,10 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_hasTempPreeditString(false)
{
m_fepState->SetObjectProvider(this);
- m_fepState->SetFlags(EAknEditorFlagDefault);
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
+ m_fepState->SetFlags(EAknEditorFlagDefault | QT_EAknEditorFlagSelectionVisible);
+ else
+ m_fepState->SetFlags(EAknEditorFlagDefault);
m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
m_fepState->SetDefaultCase( EAknEditorLowerCase );
@@ -432,7 +440,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
m_fepState->SetPermittedCases(flags);
ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateCaseModeUpdate);
- flags = 0;
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0)
+ flags = QT_EAknEditorFlagSelectionVisible;
+ else
+ flags = 0;
if (hints & ImhUppercaseOnly && !(hints & ImhLowercaseOnly)
|| hints & ImhLowercaseOnly && !(hints & ImhUppercaseOnly)) {
flags |= EAknEditorFlagFixedCase;