diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-11-11 08:38:53 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-11-11 08:50:56 (GMT) |
commit | fe23fd01b4fc61b109bc81bcbac2f832929fb482 (patch) | |
tree | 28c2033ff151e166aff1b33a3c670ad931a9b715 /src | |
parent | 96be57930fece00bbe6cbfef6327043ff68c30b2 (diff) | |
download | Qt-fe23fd01b4fc61b109bc81bcbac2f832929fb482.zip Qt-fe23fd01b4fc61b109bc81bcbac2f832929fb482.tar.gz Qt-fe23fd01b4fc61b109bc81bcbac2f832929fb482.tar.bz2 |
Add edit menu support for phones with a 'pencil' key.
The native FEP handles the 'pencil' key on some platforms by opening an
edit menu on the screen that contains things like 'Insert Symbol' and
'Writing Language' for text input widgets. This was previously not
working in the Qt input method implementation because in order for the
FEP system to open the menu, it must be able to access the menu bar
(CBA). This is done my using the object provider mechanism (MOP) and
an implementation of the MopNext() function was missing. Adding this
and also setting the AppUi as the MOP parent for top level widgets
allowed the FEP framework to find it's way to the menubar and thus
open a menu.
Task-number: QTBUG-5606
Reviewed-by: axis <qt-info@nokia.com>
Reviewed-by: mread <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 28c1c67..6aee669 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -132,6 +132,7 @@ public: // From MObjectProvider public: TTypeUid::Ptr MopSupplyObject(TTypeUid id); + MObjectProvider *MopNext(); private: QSymbianControl *m_parent; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 5db6f0d..0ed3cc0 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -752,6 +752,14 @@ TTypeUid::Ptr QCoeFepInputContext::MopSupplyObject(TTypeUid /*id*/) return TTypeUid::Null(); } +MObjectProvider *QCoeFepInputContext::MopNext() +{ + QWidget *w = focusWidget(); + if (w) + return w->effectiveWinId(); + return 0; +} + QT_END_NAMESPACE #endif // QT_NO_IM diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 88cd63d..915d308 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -359,6 +359,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de QScopedPointer<QSymbianControl> control( q_check_ptr(new QSymbianControl(q)) ); QT_TRAP_THROWING(control->ConstructL(true, desktop)); + control->SetMopParent(static_cast<CEikAppUi*>(S60->appUi())); // Symbian windows are always created in an inactive state // We perform this assignment for the case where the window is being re-created |