diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2011-09-13 11:32:41 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-14 21:30:42 +0200 |
commit | 486f1c284c5c795fd440cde600db70c200c229c5 (patch) | |
tree | 1a9cc6a5f68c6ef4f1d716278b8cca169dc5c8df | |
parent | 5227ca6ffee3afa2e5c5d7450d80a6ebda44470b (diff) |
Use QPlaftormInputContextFactory to load input context in Wayland plugin
Change-Id: Icd1d934463b550f0fcdf7d58df7c4fd1acb77ad8
Reviewed-on: http://codereview.qt-project.org/4740
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index e17c2f8d95..57baa57684 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -58,6 +58,9 @@ #include <QtGui/QSurfaceFormat> #include <QtGui/QOpenGLContext> +#include <private/qplatforminputcontextfactory_qpa_p.h> +#include <qplatforminputcontext_qpa.h> + #ifdef QT_WAYLAND_GL_SUPPORT #include "gl_integration/qwaylandglintegration.h" #endif @@ -72,6 +75,8 @@ QWaylandIntegration::QWaylandIntegration() foreach (QPlatformScreen *screen, mDisplay->screens()) screenAdded(screen); + + mInputContext = QPlatformInputContextFactory::create(); } QPlatformNativeInterface * QWaylandIntegration::nativeInterface() const @@ -139,3 +144,8 @@ QPlatformDrag *QWaylandIntegration::drag() const { return QWaylandDrag::instance(mDisplay); } + +QPlatformInputContext *QWaylandIntegration::inputContext() const +{ + return mInputContext; +} diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index 61e8559a7d..b891cdc1fc 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -70,11 +70,14 @@ public: QPlatformDrag *drag() const; + QPlatformInputContext *inputContext() const; + private: QPlatformFontDatabase *mFontDb; QAbstractEventDispatcher *mEventDispatcher; QWaylandDisplay *mDisplay; QPlatformNativeInterface *mNativeInterface; + QPlatformInputContext *mInputContext; }; QT_END_NAMESPACE |