src/hbcore/inputfw/hbinputmodecache.cpp
changeset 3 11d3954df52a
parent 1 f7ac710697a9
child 5 627c4a0fd0e7
equal deleted inserted replaced
2:06ff229162e9 3:11d3954df52a
   370 HbInputMethod* HbInputModeCache::findStateHandler(const HbInputState& state)
   370 HbInputMethod* HbInputModeCache::findStateHandler(const HbInputState& state)
   371 {
   371 {
   372     Q_D(HbInputModeCache);
   372     Q_D(HbInputModeCache);
   373 
   373 
   374     HbInputModeProperties stateProperties = d->propertiesFromState(state);
   374     HbInputModeProperties stateProperties = d->propertiesFromState(state);
   375     int languageRangeIndex = -1;
   375     int languageRangeIndex = -1;    
   376 
   376 
   377     // First check if there is a method that matches excatly (ie. also specifies
   377     // First check if there is a method that matches excatly (ie. also specifies
   378     // the language).
   378     // the language).
   379     for (int i = 0; i < d->mMethods.count(); i++) {
   379     for (int i = 0; i < d->mMethods.count(); i++) {
   380         foreach (QString language, d->mMethods[i].languages) {
   380         foreach (QString language, d->mMethods[i].languages) {
   387                 languageRangeIndex = i;
   387                 languageRangeIndex = i;
   388             }
   388             }
   389 
   389 
   390             if (properties.inputMode() != HbInputModeCustom) {
   390             if (properties.inputMode() != HbInputModeCustom) {
   391                 if (properties == stateProperties) {
   391                 if (properties == stateProperties) {
   392                         return d->cachedMethod(d->mMethods[i]);
   392                     return d->cachedMethod(d->mMethods[i]);
   393                 }
   393                 }
   394             }
   394             }
   395         }
   395         }
   396     }
   396     }
   397 
   397