src/gui/kernel/qapplication.cpp
changeset 22 79de32ba3296
parent 19 fcece45ef507
child 23 89e065397ea6
equal deleted inserted replaced
19:fcece45ef507 22:79de32ba3296
   136 
   136 
   137 }
   137 }
   138 
   138 
   139 QT_BEGIN_NAMESPACE
   139 QT_BEGIN_NAMESPACE
   140 
   140 
   141 extern void qt_call_post_routines();
   141 Q_DECL_IMPORT extern void qt_call_post_routines();
   142 
   142 
   143 int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0
   143 int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0
   144 
   144 
   145 QApplication::Type qt_appType=QApplication::Tty;
   145 QApplication::Type qt_appType=QApplication::Tty;
   146 QApplicationPrivate *QApplicationPrivate::self = 0;
   146 QApplicationPrivate *QApplicationPrivate::self = 0;
  5253         // fallback to default X Input Method.
  5253         // fallback to default X Input Method.
  5254         if (!qic)
  5254         if (!qic)
  5255             qic = QInputContextFactory::create(QLatin1String("xim"), that);
  5255             qic = QInputContextFactory::create(QLatin1String("xim"), that);
  5256         that->d_func()->inputContext = qic;
  5256         that->d_func()->inputContext = qic;
  5257     }
  5257     }
  5258 #elif defined(Q_WS_S60)
  5258 #elif defined(Q_OS_SYMBIAN)
  5259     if (!d->inputContext) {
  5259     if (!d->inputContext) {
  5260         QApplication *that = const_cast<QApplication *>(this);
  5260         QApplication *that = const_cast<QApplication *>(this);
  5261         that->d_func()->inputContext = QInputContextFactory::create(QString::fromLatin1("coefep"), that);
  5261         const QStringList keys = QInputContextFactory::keys();
       
  5262         // Try hbim and coefep first, then try others.
       
  5263         if (keys.contains("hbim")) {
       
  5264             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
       
  5265         } else if (keys.contains("coefep")) {
       
  5266             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
       
  5267         } else {
       
  5268             for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
       
  5269                 that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
       
  5270             }
       
  5271         }
  5262     }
  5272     }
  5263 #endif
  5273 #endif
  5264     return d->inputContext;
  5274     return d->inputContext;
  5265 }
  5275 }
  5266 
  5276