From 73769d85ec13ed6b57f1eccd3618616fd03d7cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 10 Aug 2011 14:14:22 +0200 Subject: Don't try to use IBUS when dbus is not configured. Change-Id: I315ef3d834e923b649e4306866666549852c254f Reviewed-on: http://codereview.qt.nokia.com/2825 Reviewed-by: Qt Sanity Bot Reviewed-by: Matthew Cattell --- src/plugins/platforms/xcb/qxcbintegration.cpp | 5 ++++- src/plugins/platforms/xcb/xcb.pro | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 7982f8dc0e..3053cba81e 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -64,7 +64,6 @@ #include #endif -#define XCB_USE_IBUS #if defined(XCB_USE_IBUS) #include "QtPlatformSupport/qibusplatforminputcontext.h" #endif @@ -100,7 +99,11 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters) m_fontDatabase = new QGenericUnixFontDatabase(); m_nativeInterface = new QXcbNativeInterface; +#if defined(XCB_USE_IBUS) m_inputContext = new QIBusPlatformInputContext; +#else + m_inputContext = 0; +#endif } QXcbIntegration::~QXcbIntegration() diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index ff0ad6d152..cf03f8ba91 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -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 } -- cgit v1.2.3