summaryrefslogtreecommitdiffstats
path: root/src/plugins
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
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')
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
index 322eca4b89..b6e40489c0 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
@@ -53,13 +53,13 @@ public:
QIBusPlatformInputContext();
~QIBusPlatformInputContext();
- bool isValid() const;
+ Q_INVOKABLE bool isValid() const;
void invokeAction(QInputPanel::Action a, int x);
void reset(void);
void update(Qt::InputMethodQueries);
- bool x11FilterEvent(uint keyval, uint keycode, uint state, bool press);
+ Q_INVOKABLE bool x11FilterEvent(uint keyval, uint keycode, uint state, bool press);
public Q_SLOTS:
void commitText(const QDBusVariant &text);
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