summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Schuette <marcel.schuette@nokia.com>2012-05-25 14:46:29 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-05-30 19:47:09 (GMT)
commit6c20d552b9917ea736c52a7d436dafbf542bff30 (patch)
tree9e8803159831ef9b52c16c24742df9c04eae84b2 /src
parentfc1802a17bc5c074673cbd2778334cc7ddae9cd8 (diff)
downloadQt-6c20d552b9917ea736c52a7d436dafbf542bff30.zip
Qt-6c20d552b9917ea736c52a7d436dafbf542bff30.tar.gz
Qt-6c20d552b9917ea736c52a7d436dafbf542bff30.tar.bz2
Propagate left key presses to the parent item when TextInput is empty.
Don't overwrite the ignore value once it's been set to true. Backport from Qt 5.0 to Qt 4.8 (commit a7017465152d544a4217d5ce4f6f84b80cb9b8b9) Task-number: QTBUG-25447 Change-Id: I2232806b1235b0c901aab21116b5bc70c65d0500 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 4264587..d8d2ac9 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1073,7 +1073,7 @@ void QDeclarativeTextInput::keyPressEvent(QKeyEvent* ev)
int cursorPosition = d->control->cursor();
if (cursorPosition == 0)
ignore = ev->key() == (d->control->layoutDirection() == Qt::LeftToRight ? Qt::Key_Left : Qt::Key_Right);
- if (cursorPosition == d->control->text().length())
+ if (!ignore && cursorPosition == d->control->text().length())
ignore = ev->key() == (d->control->layoutDirection() == Qt::LeftToRight ? Qt::Key_Right : Qt::Key_Left);
}
if (ignore) {