summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2009-12-21 11:28:47 (GMT)
committerSami Merila <sami.merila@nokia.com>2009-12-21 11:28:47 (GMT)
commit71ee64f5a44dc310272b14fe6cd913b2e75672ed (patch)
treef38b4617a0d886d802e8bb33aa2e3db02053519c /src/gui/widgets
parent3e45dbcc89a9f2284d8ab89e0c75bd7b275e6b61 (diff)
downloadQt-71ee64f5a44dc310272b14fe6cd913b2e75672ed.zip
Qt-71ee64f5a44dc310272b14fe6cd913b2e75672ed.tar.gz
Qt-71ee64f5a44dc310272b14fe6cd913b2e75672ed.tar.bz2
Edit focus should not be lost unless by explicit action
Currently non-touch devices lose edit focus if window switch happens. I.e. in cases when screensaver activates, an incoming call occurs, a global notification is shown... With this fix, edit focus remain active, until user removes the focus explicitly. Task-number: 4792 Reviewed-by: axis
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlineedit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 15dcda2..573b2b5 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1761,7 +1761,11 @@ void QLineEdit::focusInEvent(QFocusEvent *e)
d->clickCausedFocus = 1;
}
#ifdef QT_KEYPAD_NAVIGATION
- if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && e->reason() == Qt::PopupFocusReason)){
+ if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && ( e->reason() == Qt::PopupFocusReason
+#ifdef Q_OS_SYMBIAN
+ || e->reason() == Qt::ActiveWindowFocusReason
+#endif
+ ))) {
#endif
d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime());
QStyleOptionFrameV2 opt;