From 462c75be9e9cfde6263e85fd846f7b5b3fae0b0a Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Wed, 7 Jun 2017 12:24:56 +0300 Subject: Add support for input contexts to offscreen platform This is needed to use qtvirtualkeyboard with offscreen platform [ChangeLog][Platform Specific Changes] Input context support to offscreen platform Task-number: QTBUG-60268 Change-Id: Id24dc8b0461036923df2c1624bcb913d28e0819e Reviewed-by: Simon Hausmann --- src/plugins/platforms/offscreen/qoffscreenintegration.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration.cpp') diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp index 0c39950019..3eb8675d77 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp @@ -59,6 +59,8 @@ #include #include +#include +#include #include @@ -118,6 +120,16 @@ QOffscreenIntegration::~QOffscreenIntegration() { } +void QOffscreenIntegration::initialize() +{ + m_inputContext.reset(QPlatformInputContextFactory::create()); +} + +QPlatformInputContext *QOffscreenIntegration::inputContext() const +{ + return m_inputContext.data(); +} + bool QOffscreenIntegration::hasCapability(QPlatformIntegration::Capability cap) const { switch (cap) { -- cgit v1.2.3