summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2014-03-13 15:11:22 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-14 22:39:39 +0100
commit08ba111719c8c4809e80e1dc8a1956dcfdd9d80d (patch)
tree9c5f0b470f5115a710fb939f4f09a98fcd8a1c31 /src/widgets/dialogs/qfiledialog.cpp
parent61f865be00e18111348641eff35cf34f83e70c13 (diff)
Don't block Key_Back in file dialog
Update the 10 year old FIXME hack to allow Key_Back (which will close the dialog on Android). Also clean up nearby code that has been dead for seven years. Task-number: QTBUG-35784 Change-Id: I609858afb2caefe7025e421406288ae56717fea5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.cpp')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 3e4490e890..bea92e9f84 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -3904,13 +3904,8 @@ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e)
int key = e->key();
QLineEdit::keyPressEvent(e);
- if (key != Qt::Key_Escape)
+ if (key != Qt::Key_Escape && key != Qt::Key_Back)
e->accept();
- if (hideOnEsc && (key == Qt::Key_Escape || key == Qt::Key_Return || key == Qt::Key_Enter)) {
- e->accept();
- hide();
- d_ptr->currentView()->setFocus(Qt::ShortcutFocusReason);
- }
}
#ifndef QT_NO_FSCOMPLETER