ibus: avoid a crash when context is not ready

This amends 84cf0e2be5

Pick-to: 6.7 6.6 6.5
Change-Id: Ia560f785764d4ba0e4aa66943effb9f16a38e699
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
bb10
Aleix Pol Gonzalez 2024-01-18 12:10:35 +01:00 committed by Liang Qi
parent 85108e1938
commit 0d923c2097
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,6 @@ QIBusPlatformInputContext::QIBusPlatformInputContext ()
if (ok && enableSync == 1)
m_eventFilterUseSynchronousMode = true;
}
d->context->setClientCommitPreedit(QIBusPropTypeClientCommitPreedit(true));
}
QIBusPlatformInputContext::~QIBusPlatformInputContext (void)
@ -719,6 +718,8 @@ void QIBusPlatformInputContextPrivate::createBusProxy()
};
context->SetCapabilities(IBUS_CAP_PREEDIT_TEXT|IBUS_CAP_FOCUS|IBUS_CAP_SURROUNDING_TEXT);
context->setClientCommitPreedit(QIBusPropTypeClientCommitPreedit(true));
if (debug)
qDebug(">>>> bus connected!");
busConnected = true;