Use old qt API to use invokeMethod.
This commit is contained in:
parent
9fa57f9602
commit
a2f8c69293
|
@ -363,17 +363,18 @@ void QFcitxPlatformInputContext::setFocusObject(QObject *object) {
|
|||
proxy->focusIn();
|
||||
// We need to delegate this otherwise it may cause self-recursion in
|
||||
// certain application like libreoffice.
|
||||
QMetaObject::invokeMethod(
|
||||
this,
|
||||
[this, window = lastWindow_]() {
|
||||
if (window != lastWindow_) {
|
||||
return;
|
||||
}
|
||||
if (validICByWindow(window.data())) {
|
||||
cursorRectChanged();
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(this, "updateCursorRect",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QPointer<QWindow>, lastWindow_));
|
||||
}
|
||||
}
|
||||
|
||||
void QFcitxPlatformInputContext::updateCursorRect(QPointer<QWindow> window) {
|
||||
if (window != lastWindow_) {
|
||||
return;
|
||||
}
|
||||
if (validICByWindow(window.data())) {
|
||||
cursorRectChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -211,6 +211,8 @@ private:
|
|||
bool filterEventFallback(unsigned int keyval, unsigned int keycode,
|
||||
unsigned int state, bool isRelaese);
|
||||
|
||||
Q_INVOKABLE void updateCursorRect(QPointer<QWindow> window);
|
||||
|
||||
FcitxQtWatcher *watcher_;
|
||||
QString preedit_;
|
||||
QString commitPreedit_;
|
||||
|
|
Loading…
Reference in New Issue