summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.vuorela@jollamobile.com>2014-08-21 14:52:45 +0300
committerGatis Paeglis <gatis.paeglis@digia.com>2014-08-23 15:27:16 +0200
commit4a6772a587c8fe86f3f674a1d1164ad6659fbfca (patch)
tree436da2131662dc6b0aedaf9fac75235470cba242
parent07c34fcc8a721ffe989eb8882b75ecb95600516c (diff)
Fix handling QT_IM_MODULE=none
Was added with 19a39a4 to allow no input context to be created. Broken by commit 24c10b0. Especially if compose input context didn't get compiled, the first input context found was loaded. Also made Xcb integration use compose plugin by default. Change-Id: I992eaa8b383320e4ab725bb7b79f561f4f841458 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
-rw-r--r--src/gui/kernel/qplatforminputcontextfactory.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp
index ee80a70939..3e2f234d99 100644
--- a/src/gui/kernel/qplatforminputcontextfactory.cpp
+++ b/src/gui/kernel/qplatforminputcontextfactory.cpp
@@ -83,7 +83,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create()
QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE"));
if (icString == QLatin1String("none"))
- icString = QStringLiteral("compose");
+ return 0;
ic = create(icString);
if (ic && ic->isValid())
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 5345d930a8..f100f2d2e9 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -384,6 +384,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
qunsetenv("DESKTOP_STARTUP_ID");
sync();
+
+ if (qEnvironmentVariableIsEmpty("QT_IM_MODULE"))
+ qputenv("QT_IM_MODULE", QByteArray("compose"));
}
QXcbConnection::~QXcbConnection()