src/gui/inputmethod/qinputcontextfactory.cpp
changeset 30 5dc02b23752f
parent 25 e24348a560a6
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
    71 #ifdef Q_WS_MAC
    71 #ifdef Q_WS_MAC
    72 #include "qmacinputcontext_p.h"
    72 #include "qmacinputcontext_p.h"
    73 #endif
    73 #endif
    74 #ifdef Q_WS_S60
    74 #ifdef Q_WS_S60
    75 #include "qcoefepinputcontext_p.h"
    75 #include "qcoefepinputcontext_p.h"
    76 #include "AknInputLanguageInfo.h"
    76 #include "akninputlanguageinfo.h"
    77 #endif
    77 #endif
    78 
    78 
    79 #include "private/qfactoryloader_p.h"
    79 #include "private/qfactoryloader_p.h"
    80 #include "qmutex.h"
    80 #include "qmutex.h"
    81 
    81 
    82 QT_BEGIN_NAMESPACE
    82 QT_BEGIN_NAMESPACE
    83 
    83 
    84 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
    84 #ifndef QT_NO_LIBRARY
    85 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
    85 Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
    86     (QInputContextFactoryInterface_iid, QLatin1String("/inputmethods")))
    86     (QInputContextFactoryInterface_iid, QLatin1String("/inputmethods")))
    87 #endif
    87 #endif
    88 
    88 
    89 /*!
    89 /*!
   151 #if defined(Q_WS_S60)
   151 #if defined(Q_WS_S60)
   152     if (key == QLatin1String("coefep")) {
   152     if (key == QLatin1String("coefep")) {
   153         result = new QCoeFepInputContext;
   153         result = new QCoeFepInputContext;
   154     }
   154     }
   155 #endif
   155 #endif
   156 #if defined(QT_NO_LIBRARY) || defined(QT_NO_SETTINGS)
   156 #ifdef QT_NO_LIBRARY
   157     Q_UNUSED(key);
   157     Q_UNUSED(key);
   158 #else
   158 #else
   159     if (QInputContextFactoryInterface *factory =
   159     if (QInputContextFactoryInterface *factory =
   160         qobject_cast<QInputContextFactoryInterface*>(loader()->instance(key))) {
   160         qobject_cast<QInputContextFactoryInterface*>(loader()->instance(key))) {
   161         result = factory->create(key);
   161         result = factory->create(key);
   191     result << QLatin1String("mac");
   191     result << QLatin1String("mac");
   192 #endif
   192 #endif
   193 #if defined(Q_WS_S60)
   193 #if defined(Q_WS_S60)
   194     result << QLatin1String("coefep");
   194     result << QLatin1String("coefep");
   195 #endif
   195 #endif
   196 #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
   196 #ifndef QT_NO_LIBRARY
   197     result += loader()->keys();
   197     result += loader()->keys();
   198 #endif // QT_NO_LIBRARY
   198 #endif // QT_NO_LIBRARY
   199     return result;
   199     return result;
   200 }
   200 }
   201 
   201