diff options
Diffstat (limited to 'src/widgets/widgets/qabstractbutton.cpp')
-rw-r--r-- | src/widgets/widgets/qabstractbutton.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index 1a5b8db33c..c0bd8bce5a 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -1058,7 +1058,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) break; case Qt::Key_Up: next = false; - // fall through + Q_FALLTHROUGH(); case Qt::Key_Left: case Qt::Key_Right: case Qt::Key_Down: { @@ -1100,6 +1100,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) break; } default: +#ifndef QT_NO_SHORTCUT if (e->matches(QKeySequence::Cancel) && d->down) { setDown(false); repaint(); //flush paint event before invoking potentially expensive operation @@ -1107,6 +1108,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) d->emitReleased(); return; } +#endif e->ignore(); } } |