diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2012-02-26 10:56:49 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-27 22:24:00 +0100 |
commit | bc6ad75d18a029da363afc4f6007aefc7962a8ad (patch) | |
tree | 1713717e5c074b070b62da90bf7d54cbcfcd6746 /src/widgets/dialogs/qmessagebox.cpp | |
parent | 05e24901a14f1a656359bc649686674a9bca1473 (diff) |
Remove use of deprecated conversion from QKeySequence
Note: UNICODE_ACCEL is Qt3 compatibility and is equal to 0
Change-Id: I808a66772abceb3822d515d69386728264eb1b40
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 634e911cd1..a737584e3f 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1365,13 +1365,13 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) #ifndef QT_NO_SHORTCUT if (!(e->modifiers() & Qt::AltModifier)) { - int key = e->key() & ~((int)Qt::MODIFIER_MASK|(int)Qt::UNICODE_ACCEL); + int key = e->key() & ~Qt::MODIFIER_MASK; if (key) { const QList<QAbstractButton *> buttons = d->buttonBox->buttons(); for (int i = 0; i < buttons.count(); ++i) { QAbstractButton *pb = buttons.at(i); - int acc = pb->shortcut() & ~((int)Qt::MODIFIER_MASK|(int)Qt::UNICODE_ACCEL); - if (acc == key) { + QKeySequence shortcut = pb->shortcut(); + if (!shortcut.isEmpty() && key == (shortcut[0] & ~Qt::MODIFIER_MASK)) { pb->animateClick(); return; } |