summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qshortcut.cpp')
-rw-r--r--src/gui/kernel/qshortcut.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/kernel/qshortcut.cpp b/src/gui/kernel/qshortcut.cpp
index f3c93c6..50b6e59 100644
--- a/src/gui/kernel/qshortcut.cpp
+++ b/src/gui/kernel/qshortcut.cpp
@@ -385,21 +385,19 @@ bool QShortcut::event(QEvent *e)
{
Q_D(QShortcut);
bool handled = false;
- if (e->type() == QEvent::Shortcut) {
+ if (d->sc_enabled && e->type() == QEvent::Shortcut) {
QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
if (se->shortcutId() == d->sc_id && se->key() == d->sc_sequence){
- if (d->sc_enabled) {
#ifndef QT_NO_WHATSTHIS
- if (QWhatsThis::inWhatsThisMode()) {
- QWhatsThis::showText(QCursor::pos(), d->sc_whatsthis);
- handled = true;
- } else
+ if (QWhatsThis::inWhatsThisMode()) {
+ QWhatsThis::showText(QCursor::pos(), d->sc_whatsthis);
+ handled = true;
+ } else
#endif
- if (se->isAmbiguous())
- emit activatedAmbiguously();
- else
- emit activated();
- }
+ if (se->isAmbiguous())
+ emit activatedAmbiguously();
+ else
+ emit activated();
handled = true;
}
}