summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-09-05 12:53:33 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-07 14:59:18 +0200
commita30d4162ddb30b62b8d003b099d3ca8ae0b0ed0b (patch)
tree69ad5c873027e5445710a7c339ed5353a01e8b96 /src/widgets/kernel/qapplication.cpp
parenta796eda7c4267f19f30db6c2c787d0f65b340013 (diff)
Refactor the input framework
Results of the ongoing workshop in Oslo: QInputPanel will be the application facing interface for controlling the input context as well as querying things like the position of the virtual keyboard. QInputContext is significantly cleaned up and only there as a compatibility API for existing code. Change-Id: Ie8e2ee480930763f414bfaae63247b1fb6500c82 Reviewed-on: http://codereview.qt.nokia.com/4357 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Vesa Rantanen <vesa.rantanen@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 043b114c64..c9ef2e79d8 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -69,7 +69,7 @@
#include "qmessagebox.h"
#include <QtWidgets/qgraphicsproxywidget.h>
#include <QtGui/qstylehints.h>
-
+#include <QtGui/qinputpanel.h>
#include "qinputcontext.h"
#include "private/qkeymapper_p.h"
@@ -3754,13 +3754,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
QPoint relpos = mouse->pos();
if (e->spontaneous()) {
-#ifndef QT_NO_IM
- QInputContext *ic = w->inputContext();
- if (ic
- && w->testAttribute(Qt::WA_InputMethodEnabled)
- && ic->filterEvent(mouse))
- return true;
-#endif
if (e->type() == QEvent::MouseButtonPress) {
QApplicationPrivate::giveFocusAccordingToFocusPolicy(w,
@@ -4117,17 +4110,10 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
}
case QEvent::RequestSoftwareInputPanel:
+ inputPanel()->open();
+ break;
case QEvent::CloseSoftwareInputPanel:
-#ifndef QT_NO_IM
- if (receiver->isWidgetType()) {
- QWidget *w = static_cast<QWidget *>(receiver);
- QInputContext *ic = w->inputContext();
- if (ic && ic->filterEvent(e)) {
- break;
- }
- }
-#endif
- res = d->notify_helper(receiver, e);
+ inputPanel()->close();
break;
#ifndef QT_NO_GESTURES