summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-11-11 08:38:53 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-16 15:19:55 (GMT)
commitfcd4552bc92d1c198a5b3f5e0fe820bfc7ac554d (patch)
tree3b78ffd0994ecebefe288ca3d2ee09f1aba38105
parent40a52597ef94e320f31ccb2cd7545a4ed19cc90c (diff)
downloadQt-fcd4552bc92d1c198a5b3f5e0fe820bfc7ac554d.zip
Qt-fcd4552bc92d1c198a5b3f5e0fe820bfc7ac554d.tar.gz
Qt-fcd4552bc92d1c198a5b3f5e0fe820bfc7ac554d.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> (cherry picked from commit fe23fd01b4fc61b109bc81bcbac2f832929fb482)
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp8
-rw-r--r--src/gui/kernel/qwidget_s60.cpp1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index 2c65b4c..6bbae25 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 19f296c..304de33 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -733,6 +733,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 67bbd9f..c98147d 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