From 4790ab735f96a13027e7292ff5b49195224f0af9 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 16 Feb 2010 09:19:20 +0100 Subject: Enabled commit 2b60b542a for all platforms. Task: QTBUG-5892 RevBy: Trust me --- src/gui/widgets/qlineedit.cpp | 12 ++---------- src/gui/widgets/qtextedit.cpp | 13 +++---------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 141f844..0ba8b9f 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1637,12 +1637,8 @@ void QLineEdit::keyPressEvent(QKeyEvent *event) if (!hasEditFocus() && !(event->modifiers() & Qt::ControlModifier)) { if (!event->text().isEmpty() && event->text().at(0).isPrint() && !isReadOnly()) - { setEditFocus(true); -#ifndef Q_OS_SYMBIAN - clear(); -#endif - } else { + else { event->ignore(); return; } @@ -1698,12 +1694,8 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) // commit text as they focus out without interfering with focus if (QApplication::keypadNavigationEnabled() && hasFocus() && !hasEditFocus() - && !e->preeditString().isEmpty()) { + && !e->preeditString().isEmpty()) setEditFocus(true); -#ifndef Q_OS_SYMBIAN - selectAll(); // so text is replaced rather than appended to -#endif - } #endif d->control->processInputMethodEvent(e); diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index b6886b4..4541730 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -1212,12 +1212,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e) default: if (QApplication::keypadNavigationEnabled()) { if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) { - if (e->text()[0].isPrint()) { + if (e->text()[0].isPrint()) setEditFocus(true); -#ifndef Q_OS_SYMBIAN - clear(); -#endif - } else { + else { e->ignore(); return; } @@ -1677,12 +1674,8 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e) #ifdef QT_KEYPAD_NAVIGATION if (d->control->textInteractionFlags() & Qt::TextEditable && QApplication::keypadNavigationEnabled() - && !hasEditFocus()) { + && !hasEditFocus()) setEditFocus(true); -#ifndef Q_OS_SYMBIAN - selectAll(); // so text is replaced rather than appended to -#endif - } #endif d->sendControlEvent(e); ensureCursorVisible(); -- cgit v0.12