summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-09-08 21:43:36 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-08 21:45:29 +0200
commit2cdd7886bf424a4986cfa1e08462cf9689c4c3d3 (patch)
tree6916063370571e78812c25bc078b2f3c7c1ee846 /src/plugins/platforms
parent8be11227100498d7098eb7f39bbbe1e7ac6b01cf (diff)
Fixup a few minor errors in the previous commit
Methods need to be Q_INVOKABLE to be able to call them with QMetaObject::invokeMethod(). Also use the correct return type. This makes the IBUS input context work again. Change-Id: If7ed6dd8fb99f3363c4ecebb98f889ed9eeeff00 Reviewed-on: http://codereview.qt-project.org/4486 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 316d28ea3f..db3bcf90a8 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -105,9 +105,9 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters)
#if defined(XCB_USE_IBUS)
QPlatformInputContext *platformInputContext = QPlatformInputContextFactory::create("ibus");
if (platformInputContext) {
- QVariant value;
- QMetaObject::invokeMethod(platformInputContext, "isValid", Qt::DirectConnection, Q_RETURN_ARG(QVariant, value));
- if (value.toBool())
+ bool retval;
+ QMetaObject::invokeMethod(platformInputContext, "isValid", Qt::DirectConnection, Q_RETURN_ARG(bool, retval));
+ if (retval)
m_inputContext = platformInputContext;
}
if (platformInputContext && !m_inputContext)
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 18080dbb0c..c445dbfe2a 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -1032,14 +1032,14 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
#if defined(XCB_USE_IBUS)
if (QObject* inputContext = QGuiApplicationPrivate::platformIntegration()->inputContext()) {
- QVariant value;
+ bool retval;
QMetaObject::invokeMethod(inputContext, "x11FilterEvent", Qt::DirectConnection,
- Q_RETURN_ARG(QVariant, value),
+ Q_RETURN_ARG(bool, retval),
Q_ARG(uint, sym),
Q_ARG(uint, code),
Q_ARG(uint, state),
Q_ARG(bool, type == QEvent::KeyPress));
- if (value.toBool())
+ if (retval)
return;
}
#endif