summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-09-08 22:09:33 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-08 22:12:46 +0200
commit970df646691f1fd1f710156af7ddf10abd72df07 (patch)
tree660758c46ab3346c17d0e9f5c27175b3056d0397 /src/plugins/platforms/xcb/qxcbintegration.cpp
parent2cdd7886bf424a4986cfa1e08462cf9689c4c3d3 (diff)
Make inputcontext plugin loading a bit more generic
Add a create() method to the inputcontext factory that takes no arguments. Add a virtual isValid() to QPlatformInputContext to determine whether it actually works. Remove IBUS dependencies in the xcb code so that it can also load other plugins. Change-Id: I6345a845f48fd4b3cacf6d8652711b16835a235c Reviewed-on: http://codereview.qt-project.org/4487 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index db3bcf90a8..b0d377bcac 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -62,10 +62,8 @@
#include <EGL/egl.h>
#endif
-#if defined(XCB_USE_IBUS)
#include <private/qplatforminputcontextfactory_qpa_p.h>
#include <qplatforminputcontext_qpa.h>
-#endif
#if defined(XCB_USE_GLX)
#include "qglxintegration.h"
@@ -101,18 +99,7 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters)
m_fontDatabase = new QGenericUnixFontDatabase();
m_nativeInterface = new QXcbNativeInterface;
- m_inputContext = 0;
-#if defined(XCB_USE_IBUS)
- QPlatformInputContext *platformInputContext = QPlatformInputContextFactory::create("ibus");
- if (platformInputContext) {
- bool retval;
- QMetaObject::invokeMethod(platformInputContext, "isValid", Qt::DirectConnection, Q_RETURN_ARG(bool, retval));
- if (retval)
- m_inputContext = platformInputContext;
- }
- if (platformInputContext && !m_inputContext)
- delete platformInputContext;
-#endif
+ m_inputContext = QPlatformInputContextFactory::create();
}
QXcbIntegration::~QXcbIntegration()