Commit 4a6772a5 authored by Pekka Vuorela's avatar Pekka Vuorela Committed by Gatis Paeglis
Browse files

Fix handling QT_IM_MODULE=none

Was added with 19a39a4e to allow no input context to be created.
Broken by commit 24c10b0b

. 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: default avatarGatis Paeglis <gatis.paeglis@digia.com>
No related merge requests found
Showing with 4 additions and 1 deletion
...@@ -83,7 +83,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create() ...@@ -83,7 +83,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create()
QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE")); QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE"));
if (icString == QLatin1String("none")) if (icString == QLatin1String("none"))
icString = QStringLiteral("compose"); return 0;
ic = create(icString); ic = create(icString);
if (ic && ic->isValid()) if (ic && ic->isValid())
......
...@@ -384,6 +384,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra ...@@ -384,6 +384,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
qunsetenv("DESKTOP_STARTUP_ID"); qunsetenv("DESKTOP_STARTUP_ID");
sync(); sync();
if (qEnvironmentVariableIsEmpty("QT_IM_MODULE"))
qputenv("QT_IM_MODULE", QByteArray("compose"));
} }
QXcbConnection::~QXcbConnection() QXcbConnection::~QXcbConnection()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment