summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-16 08:19:20 (GMT)
committeraxis <qt-info@nokia.com>2010-02-16 08:24:32 (GMT)
commit4790ab735f96a13027e7292ff5b49195224f0af9 (patch)
treec5d34ab330f8f22579e114451c5c2ff2aa154b63 /src/gui/widgets
parentcc278c905839cd7dc4469dee3264fa80a622494e (diff)
downloadQt-4790ab735f96a13027e7292ff5b49195224f0af9.zip
Qt-4790ab735f96a13027e7292ff5b49195224f0af9.tar.gz
Qt-4790ab735f96a13027e7292ff5b49195224f0af9.tar.bz2
Enabled commit 2b60b542a for all platforms.
Task: QTBUG-5892 RevBy: Trust me
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlineedit.cpp12
-rw-r--r--src/gui/widgets/qtextedit.cpp13
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();