diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2011-09-08 12:09:22 +0300 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2011-09-08 13:40:50 +0200 |
commit | f034d804b76eacbf59a2dbb1f240d741fee0957a (patch) | |
tree | efc17a9b9300baf6faedd8235fd1a6714c576fdf /src/declarative/items/qsgtextinput.cpp | |
parent | 01f94b710bd66f3289f545e3ac97433ce8419043 (diff) |
Fix TextInput and TextEdit open/closeSoftwareInputPanel functions
Change-Id: I69bac4d1ce55271685dcddcc4c8ad2f6598e7630
Reviewed-on: http://codereview.qt-project.org/4439
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/declarative/items/qsgtextinput.cpp')
-rw-r--r-- | src/declarative/items/qsgtextinput.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/declarative/items/qsgtextinput.cpp b/src/declarative/items/qsgtextinput.cpp index 7a58698089..42105cf9ce 100644 --- a/src/declarative/items/qsgtextinput.cpp +++ b/src/declarative/items/qsgtextinput.cpp @@ -1732,12 +1732,8 @@ void QSGTextInput::moveCursorSelection(int pos, SelectionMode mode) */ void QSGTextInput::openSoftwareInputPanel() { - if (qApp) { - if (canvas()) { - QEvent event(QEvent::RequestSoftwareInputPanel); - QCoreApplication::sendEvent(canvas(), &event); - } - } + if (qGuiApp) + qGuiApp->inputPanel()->show(); } /*! @@ -1781,12 +1777,8 @@ void QSGTextInput::openSoftwareInputPanel() */ void QSGTextInput::closeSoftwareInputPanel() { - if (qApp) { - if (canvas()) { - QEvent event(QEvent::CloseSoftwareInputPanel); - QCoreApplication::sendEvent(canvas(), &event); - } - } + if (qGuiApp) + qGuiApp->inputPanel()->hide(); } void QSGTextInput::focusInEvent(QFocusEvent *event) |