diff options
Diffstat (limited to 'src/widgets/dialogs/qdialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index d04241fee0..5124960ab4 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -651,11 +651,9 @@ void QDialog::keyPressEvent(QKeyEvent *e) // Calls reject() if Escape is pressed. Simulates a button // click for the default button if Enter is pressed. Move focus // for the arrow keys. Ignore the rest. -#ifdef Q_OS_MAC - if(e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period) { + if (e->matches(QKeySequence::Cancel)) { reject(); } else -#endif if (!e->modifiers() || (e->modifiers() & Qt::KeypadModifier && e->key() == Qt::Key_Enter)) { switch (e->key()) { case Qt::Key_Enter: @@ -671,9 +669,6 @@ void QDialog::keyPressEvent(QKeyEvent *e) } } break; - case Qt::Key_Escape: - reject(); - break; default: e->ignore(); return; |