summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-10-06 16:05:17 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-10-06 16:05:17 (GMT)
commit28cdb974cce58111a19e8691f4dd929a5c9f74ea (patch)
tree1bbf9841f509ac648b501c59cd2d3b8e329264dd /src/gui/dialogs
parent2a18238357e3442a2e9a6eb2fe8b9ff78704c174 (diff)
downloadQt-28cdb974cce58111a19e8691f4dd929a5c9f74ea.zip
Qt-28cdb974cce58111a19e8691f4dd929a5c9f74ea.tar.gz
Qt-28cdb974cce58111a19e8691f4dd929a5c9f74ea.tar.bz2
Prevent OK key being processed twice in file dialog (keypad navigation)
All key events were being explicitly ignored by the file dialog when key navigation is enabled, and it doesn't have edit focus. When a file is opened by pressing the OK key, there is no edit focus after returning from accept() and the OK key can propagate outside the modal dialog. This causes the parent widget to receive and act upon the OK key as well which makes problems - e.g. in QTBUG-4724, recursive menu activation Task-number: QTBUG-4724 Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfiledialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index eb5fed0..eab842f 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -3149,7 +3149,7 @@ void QFileDialogListView::keyPressEvent(QKeyEvent *e)
QListView::keyPressEvent(e);
}
#ifdef QT_KEYPAD_NAVIGATION
- if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder
+ else if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder
|| QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional)
&& !hasEditFocus()) {
e->ignore();