Fix warnings received when xcb platform is ran without ibus platforminputcontext
Warnings like QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) Ibus is not always available and QPlatformInputContextFactory is allowed to load different input methods. Change-Id: Id498a5e024e6646e73ed4db2efe5b007e6601698 Reviewed-on: http://codereview.qt-project.org/4738 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
2aaa8a28d4
commit
5926e4041a
@ -1029,13 +1029,14 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
|
||||
|
||||
|
||||
if (QObject* inputContext = QGuiApplicationPrivate::platformIntegration()->inputContext()) {
|
||||
bool retval;
|
||||
QMetaObject::invokeMethod(inputContext, "x11FilterEvent", Qt::DirectConnection,
|
||||
Q_RETURN_ARG(bool, retval),
|
||||
Q_ARG(uint, sym),
|
||||
Q_ARG(uint, code),
|
||||
Q_ARG(uint, state),
|
||||
Q_ARG(bool, type == QEvent::KeyPress));
|
||||
bool retval = false;
|
||||
if (inputContext->metaObject()->indexOfMethod("x11FilterEvent") != -1)
|
||||
QMetaObject::invokeMethod(inputContext, "x11FilterEvent", Qt::DirectConnection,
|
||||
Q_RETURN_ARG(bool, retval),
|
||||
Q_ARG(uint, sym),
|
||||
Q_ARG(uint, code),
|
||||
Q_ARG(uint, state),
|
||||
Q_ARG(bool, type == QEvent::KeyPress));
|
||||
if (retval)
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user