From 84649f74f16f9a733846dc3839933656f6f1c351 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 6 Apr 2018 09:00:41 +0200 Subject: [PATCH] for some reason accessing QMethodInputPrivate makes the sanitizer complaining --- src/controls/QskControl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index b35f7aa9..56a233e5 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -18,12 +18,15 @@ QSK_QT_PRIVATE_BEGIN #include -#include +#include #if defined( QT_DEBUG ) #include #endif QSK_QT_PRIVATE_END +#include +#include + #include #include #include @@ -153,8 +156,13 @@ void qskUpdateInputMethod( const QQuickItem* item, Qt::InputMethodQueries querie if ( !doUpdate ) { + /* + We could also get the inputContext from QInputMethodPrivate + but for some reason the gcc sanitizer reports errors + when using it. So let's go with QGuiApplicationPrivate. + */ const auto inputContext = - QInputMethodPrivate::get( inputMethod )->platformInputContext(); + QGuiApplicationPrivate::platformIntegration()->inputContext(); if ( inputContext && inputContext->isInputPanelVisible() ) {