diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-04-25 15:36:48 +0900 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-04-27 15:38:31 +0000 |
commit | a9e0879ee16932d8155850b52162ee5429164982 (patch) | |
tree | b967dd908968721dc502c5275c9818c684779bb9 /src/widgets/dialogs | |
parent | c1e19a2ecb182ec95eb06de1a35969ac5f56ffd6 (diff) |
Fix build without features.shortcut
Change-Id: I87a7ba1a77b0671559616a3ea4722bcc233af32d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
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) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index fe32611ed8..7a98fae99c 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1404,8 +1404,8 @@ void QMessageBox::changeEvent(QEvent *ev) */ void QMessageBox::keyPressEvent(QKeyEvent *e) { - Q_D(QMessageBox); #if QT_CONFIG(shortcut) + Q_D(QMessageBox); if (e->matches(QKeySequence::Cancel)) { if (d->detectedEscapeButton) { #ifdef Q_OS_MAC |