diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-09-10 18:06:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-12 12:26:06 +0200 |
commit | 96c711fed2463e49f3d7e92063a0b6b596910336 (patch) | |
tree | 17a90590b3e5325f18654d893e455f87fec3e5ba | |
parent | b7b573ad6d9f50ebff87f5c6204225366a1675bd (diff) |
QMessageBox: shortcuts for selectAll, copy don't conflict with buttons
You can hit a key with no modifier to select a dialog button that has
the corresponding mnemonic, but it doesn't make sense to do that if
the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C
to select all the message detail text and copy it to the clipboard,
even if the dialog has buttons with mnemonics like &Continue and
Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select
the mnemonic buttons on the dialog.
Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 995d279e13..87f2748c92 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1428,7 +1428,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) #endif // !QT_NO_CLIPBOARD && !QT_NO_SHORTCUT #ifndef QT_NO_SHORTCUT - if (!(e->modifiers() & Qt::AltModifier)) { + if (!(e->modifiers() & (Qt::AltModifier | Qt::ControlModifier | Qt::MetaModifier))) { int key = e->key() & ~Qt::MODIFIER_MASK; if (key) { const QList<QAbstractButton *> buttons = d->buttonBox->buttons(); |