From 6cff40c1959a57b52bf0be6b427b0f807e0e82b4 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 17 Feb 2017 12:50:24 +0100 Subject: Build fix for -no-feature-shortcut Change-Id: I99144b114b3c2eacb56b522b3059aa53a6bbd969 Reviewed-by: Lars Knoll --- src/widgets/dialogs/qfiledialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/dialogs/qfiledialog.cpp') diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index a552746385..78e304950a 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3813,12 +3813,12 @@ void QFileDialogPrivate::_q_nativeEnterDirectory(const QUrl &directory) bool QFileDialogPrivate::itemViewKeyboardEvent(QKeyEvent *event) { Q_Q(QFileDialog); - +#if QT_CONFIG(shortcut) if (event->matches(QKeySequence::Cancel)) { q->reject(); return true; } - +#endif switch (event->key()) { case Qt::Key_Backspace: _q_navigateToParent(); @@ -4020,7 +4020,9 @@ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e) int key = e->key(); QLineEdit::keyPressEvent(e); +#if QT_CONFIG(shortcut) if (!e->matches(QKeySequence::Cancel) && key != Qt::Key_Back) +#endif e->accept(); } -- cgit v1.2.3