diff options
author | Tomi Vihria <tomi.vihria@nokia.com> | 2011-07-11 10:06:21 (GMT) |
---|---|---|
committer | Tomi Vihria <tomi.vihria@nokia.com> | 2011-07-11 10:06:21 (GMT) |
commit | b05a513e1427dacc4c3de1b6d507616764248b96 (patch) | |
tree | b04583de50302d7741b607694d58c7e784e90986 /src/gui/inputmethod | |
parent | 59b2938758ebf563bedf943ddd4636176ca8d15e (diff) | |
download | Qt-b05a513e1427dacc4c3de1b6d507616764248b96.zip Qt-b05a513e1427dacc4c3de1b6d507616764248b96.tar.gz Qt-b05a513e1427dacc4c3de1b6d507616764248b96.tar.bz2 |
Backporting fix for QTBUG-18716
Provide internal API to avoid automatic translation of input widget
There will be cases when client will want to disable splitview
automatic view translation, so that keyboard is just brought on top of
the application and no other actions happen. There will be no new
public Qt GUI API to cover the cases (the public API will come from
QML Components), but the implementation is done with new private API.
Task-number: QTBUG-20171
Reviewed-by: Honglei Zhang
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 9fd2703..9857015 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -170,6 +170,7 @@ private: }; Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable); +Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable); QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 567f83b..c3d293b 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -95,6 +95,11 @@ Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable) ic->update(); } +Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable) +{ + S60->partial_keyboardAutoTranslation = enable; +} + QCoeFepInputContext::QCoeFepInputContext(QObject *parent) : QInputContext(parent), m_fepState(q_check_ptr(new CAknEdwinState)), // CBase derived object needs check on new @@ -612,12 +617,13 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget) widget->resize(widget->width(), splitViewRect.height() - windowTop); } - if (gv->scene()) { + if (gv->scene() && S60->partial_keyboardAutoTranslation) { const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF(); gv->ensureVisible(microFocusRect); } } else { - translateInputWidget(); + if (S60->partial_keyboardAutoTranslation) + translateInputWidget(); } if (alwaysResize) |