Use QPlaftormInputContextFactory to load input context in Wayland plugin
authorJoona Petrell <joona.t.petrell@nokia.com>
Tue, 13 Sep 2011 08:32:41 +0000 (11:32 +0300)
committerPaul Olav Tvete <paul.tvete@nokia.com>
Fri, 16 Sep 2011 08:13:34 +0000 (10:13 +0200)
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>
Reviewed-on: http://codereview.qt-project.org/5068
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
src/plugins/platforms/wayland/qwaylandintegration.cpp
src/plugins/platforms/wayland/qwaylandintegration.h

index e17c2f8..57baa57 100644 (file)
@@ -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;
+}
index 61e8559..b891cdc 100644 (file)
@@ -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