Add support for "none" QT_IM_MODULE
authorJan Arne Petersen <jpetersen@openismus.com>
Fri, 10 Feb 2012 13:52:32 +0000 (14:52 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 10 Feb 2012 18:32:41 +0000 (19:32 +0100)
Do not try to load any input method when QT_IM_MODULE is set to "none".

Change-Id: I695cb76d616bb2ce5021979bae2790b2f286122d
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp

index 9e38e4c..ca3673f 100644 (file)
@@ -83,8 +83,11 @@ QPlatformInputContext *QPlatformInputContextFactory::create()
     QPlatformInputContext *ic = 0;
 
     QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE"));
     QPlatformInputContext *ic = 0;
 
     QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE"));
-    ic = create(icString);
 
 
+    if (icString == QStringLiteral("none"))
+        return 0;
+
+    ic = create(icString);
     if (ic && ic->isValid())
         return ic;
 
     if (ic && ic->isValid())
         return ic;