Don't try to use IBUS when dbus is not configured.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 10 Aug 2011 12:14:22 +0000 (14:14 +0200)
committerMatthew Cattell <matthew.cattell@nokia.com>
Wed, 10 Aug 2011 12:31:13 +0000 (14:31 +0200)
Change-Id: I315ef3d834e923b649e4306866666549852c254f
Reviewed-on: http://codereview.qt.nokia.com/2825
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
src/plugins/platforms/xcb/qxcbintegration.cpp
src/plugins/platforms/xcb/xcb.pro

index 7982f8d..3053cba 100644 (file)
@@ -64,7 +64,6 @@
 #include <EGL/egl.h>
 #endif
 
-#define XCB_USE_IBUS
 #if defined(XCB_USE_IBUS)
 #include "QtPlatformSupport/qibusplatforminputcontext.h"
 #endif
@@ -100,7 +99,11 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters)
     m_fontDatabase = new QGenericUnixFontDatabase();
     m_nativeInterface = new QXcbNativeInterface;
 
+#if defined(XCB_USE_IBUS)
     m_inputContext = new QIBusPlatformInputContext;
+#else
+    m_inputContext = 0;
+#endif
 }
 
 QXcbIntegration::~QXcbIntegration()
index ff0ad6d..cf03f8b 100644 (file)
@@ -85,6 +85,7 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
 CONFIG += qpa/genericunixfontdatabase
 
 contains(QT_CONFIG, dbus) {
+DEFINES += XCB_USE_IBUS
 QT += dbus
 LIBS += -ldbus-1
 }