summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/qlineedit.cpp4
-rw-r--r--src/gui/widgets/qtextedit.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index f5dbe1c..9372ddd 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1594,7 +1594,9 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
&& !isReadOnly())
{
setEditFocus(true);
+#ifndef Q_OS_SYMBIAN
clear();
+#endif
} else {
event->ignore();
return;
@@ -1651,7 +1653,9 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e)
&& hasFocus() && !hasEditFocus()
&& !e->preeditString().isEmpty()) {
setEditFocus(true);
+#ifndef Q_OS_SYMBIAN
selectAll(); // so text is replaced rather than appended to
+#endif
}
#endif
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index 88502e3..14de719 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -1210,7 +1210,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e)
if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) {
if (e->text()[0].isPrint()) {
setEditFocus(true);
+#ifndef Q_OS_SYMBIAN
clear();
+#endif
} else {
e->ignore();
return;
@@ -1672,7 +1674,9 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e)
&& QApplication::keypadNavigationEnabled()
&& !hasEditFocus()) {
setEditFocus(true);
+#ifndef Q_OS_SYMBIAN
selectAll(); // so text is replaced rather than appended to
+#endif
}
#endif
d->sendControlEvent(e);