From e1293b49e3adbcff8eade91dc64901d40aeb5099 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 21 Jun 2011 15:41:09 +0200 Subject: add a platform interface for input method support add QPlatformInputContext to help supporting complex text input. Communication with the focus objects/widgets will happen slightly different then before, through events instead of methods one can query on QWidget. --- src/widgets/kernel/qapplication_qpa.cpp | 17 +---------------- src/widgets/kernel/qwidget.cpp | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'src/widgets/kernel') diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index 649e0ad2b7..dcda20138d 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -420,21 +420,6 @@ QPlatformNativeInterface *QApplication::platformNativeInterface() return pi->nativeInterface(); } -#ifndef QT_NO_QWS_INPUTMETHODS -class QDummyInputContext : public QInputContext -{ -public: - explicit QDummyInputContext(QObject* parent = 0) : QInputContext(parent) {} - ~QDummyInputContext() {} - QString identifierName() { return QString(); } - QString language() { return QString(); } - - void reset() {} - bool isComposing() const { return false; } - -}; -#endif // QT_NO_QWS_INPUTMETHODS - void qt_init(QApplicationPrivate *, int type) { Q_UNUSED(type); @@ -445,7 +430,7 @@ void qt_init(QApplicationPrivate *, int type) qApp->setObjectName(appName); #ifndef QT_NO_QWS_INPUTMETHODS - qApp->setInputContext(new QDummyInputContext(qApp)); + qApp->setInputContext(new QInputContext(qApp)); #endif } diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 9889a66aa6..0646983150 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -80,7 +80,7 @@ #include "qdebug.h" #include "private/qstylesheetstyle_p.h" #include "private/qstyle_p.h" -#include "private/qinputcontext_p.h" +#include "qinputcontext.h" #include "qfileinfo.h" #include "private/qsoftkeymanager_p.h" -- cgit v1.2.3