summaryrefslogtreecommitdiffstats
path: root/src/gui/text
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/text
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/text')
-rw-r--r--src/gui/text/qtextcontrol.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index f96f66b..f523226 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1938,7 +1938,11 @@ void QTextControlPrivate::focusEvent(QFocusEvent *e)
emit q->updateRequest(q->selectionRect());
if (e->gotFocus()) {
#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
cursorOn = (interactionFlags & Qt::TextSelectableByKeyboard);
if (interactionFlags & Qt::TextEditable) {