--- a/src/hbplugins/inputmethods/common/hbinputabstractbase.cpp Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbplugins/inputmethods/common/hbinputabstractbase.cpp Thu Sep 02 20:44:51 2010 +0300
@@ -41,6 +41,7 @@
HbInputAbstractMethod::HbInputAbstractMethod()
{
mVanillQwertySwitch = new HbAction(QString("QTY"));
+ mIsFocusOnVanillaQtEditor = false;
}
// ---------------------------------------------------------------------------
@@ -163,7 +164,7 @@
bool HbInputAbstractMethod::isSctModeActive() const
{
- return false;
+ return false;
}
@@ -174,16 +175,16 @@
void HbInputAbstractMethod::focusReceived()
{
- bool isVannilaApp = false;
+ mIsFocusOnVanillaQtEditor = false;
QInputContext* context = qApp->inputContext();
if (context && context->focusWidget()) {
QWidget *focusedWidget = context->focusWidget();
if (!focusedWidget->inherits("HbMainWindow")) {
- isVannilaApp = true;
+ mIsFocusOnVanillaQtEditor = true;
}
}
- if(isVannilaApp && focusObject() ) {
+ if(mIsFocusOnVanillaQtEditor && focusObject() ) {
QList<HbAction*> customActions= focusObject()->editorInterface().actions();
if(!customActions.contains(mVanillQwertySwitch)) {
disconnect(mVanillQwertySwitch, SIGNAL(triggered(bool)));
@@ -196,16 +197,8 @@
void HbInputAbstractMethod::focusLost()
{
- bool isVannilaApp = false;
- QInputContext* context = qApp->inputContext();
- if (context && context->focusWidget()) {
- QWidget *focusedWidget = context->focusWidget();
- if (!focusedWidget->inherits("HbMainWindow")) {
- isVannilaApp = true;
- }
- }
- if(isVannilaApp && focusObject()) {
+ if(mIsFocusOnVanillaQtEditor && focusObject()) {
QList<HbAction*> customActions= focusObject()->editorInterface().actions();
if(customActions.contains(mVanillQwertySwitch)) {
disconnect(mVanillQwertySwitch, SIGNAL(triggered(bool)));
@@ -235,7 +228,7 @@
QChar HbInputAbstractMethod ::previousChar()
{
- return QChar();
+ return QChar();
}