diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-06-07 12:24:56 +0300 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-06-20 14:48:22 +0000 |
commit | 462c75be9e9cfde6263e85fd846f7b5b3fae0b0a (patch) | |
tree | bf8422d8be52f219a5792699f4c7ef3c4d90fae4 /src/plugins/platforms/offscreen/qoffscreenintegration.cpp | |
parent | c24ad1896a7e877383505daccdc9db56d32709ff (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration.cpp')
-rw-r--r-- | src/plugins/platforms/offscreen/qoffscreenintegration.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <QtGui/private/qpixmap_raster_p.h> #include <QtGui/private/qguiapplication_p.h> +#include <qpa/qplatforminputcontextfactory_p.h> +#include <qpa/qplatforminputcontext.h> #include <qpa/qplatformservices.h> @@ -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) { |