From a9e0879ee16932d8155850b52162ee5429164982 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 25 Apr 2017 15:36:48 +0900 Subject: Fix build without features.shortcut Change-Id: I87a7ba1a77b0671559616a3ea4722bcc233af32d Reviewed-by: Oswald Buddenhagen Reviewed-by: Paul Olav Tvete --- src/widgets/dialogs/qfiledialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/widgets/dialogs/qfiledialog.cpp') diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 78e304950a..98f8147236 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -3812,8 +3812,8 @@ void QFileDialogPrivate::_q_nativeEnterDirectory(const QUrl &directory) */ bool QFileDialogPrivate::itemViewKeyboardEvent(QKeyEvent *event) { - Q_Q(QFileDialog); #if QT_CONFIG(shortcut) + Q_Q(QFileDialog); if (event->matches(QKeySequence::Cancel)) { q->reject(); return true; @@ -4018,7 +4018,9 @@ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e) } #endif // QT_KEYPAD_NAVIGATION +#if QT_CONFIG(shortcut) int key = e->key(); +#endif QLineEdit::keyPressEvent(e); #if QT_CONFIG(shortcut) if (!e->matches(QKeySequence::Cancel) && key != Qt::Key_Back) -- cgit v1.2.3