avoid crash with vnc plugin
This commit is contained in:
parent
d42e27af5d
commit
a1d60803f2
@ -183,13 +183,12 @@ static QPointer< QskInputContext > qskInputContext;
|
|||||||
|
|
||||||
static void qskSendToPlatformContext( QEvent::Type type )
|
static void qskSendToPlatformContext( QEvent::Type type )
|
||||||
{
|
{
|
||||||
const auto platformInputContext =
|
const auto integration = QGuiApplicationPrivate::platformIntegration();
|
||||||
QGuiApplicationPrivate::platformIntegration()->inputContext();
|
|
||||||
|
|
||||||
if ( platformInputContext )
|
if ( const auto inputContext = integration->inputContext() )
|
||||||
{
|
{
|
||||||
QEvent event( type );
|
QEvent event( type );
|
||||||
QCoreApplication::sendEvent( platformInputContext, &event );
|
QCoreApplication::sendEvent( inputContext, &event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,9 +207,12 @@ void QskInputContext::setInstance( QskInputContext* inputContext )
|
|||||||
qskInputContext = inputContext;
|
qskInputContext = inputContext;
|
||||||
|
|
||||||
if ( oldContext && oldContext->parent() == nullptr )
|
if ( oldContext && oldContext->parent() == nullptr )
|
||||||
|
{
|
||||||
delete oldContext;
|
delete oldContext;
|
||||||
|
|
||||||
qskSendToPlatformContext( QEvent::PlatformPanel );
|
// still needed with > Qt 5.15 ?
|
||||||
|
qskSendToPlatformContext( QEvent::PlatformPanel );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user