Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 400:5fd0dd4ed984 beta
Merge from the default branch
author | Chris Cannam |
---|---|
date | Mon, 01 Sep 2014 13:41:03 +0100 |
parents | 81e41a430b58 |
children | eb84b06301da |
comparison
equal
deleted
inserted
replaced
398:7373a8c262ca | 400:5fd0dd4ed984 |
---|---|
366 break; | 366 break; |
367 } | 367 } |
368 } | 368 } |
369 if (hasButton) continue; | 369 if (hasButton) continue; |
370 QKeySequence sc = a->shortcut(); | 370 QKeySequence sc = a->shortcut(); |
371 if (sc.count() == 1 && !(sc[0] & Qt::KeyboardModifierMask)) { | 371 |
372 // Note that the set of "single-key shortcuts" that aren't | |
373 // working and that we need to handle here includes those | |
374 // with the Shift modifier mask as well as those with no | |
375 // modifier at all | |
376 if (sc.count() == 1 && | |
377 ((sc[0] & Qt::KeyboardModifierMask) == Qt::NoModifier || | |
378 (sc[0] & Qt::KeyboardModifierMask) == Qt::ShiftModifier)) { | |
372 QShortcut *newSc = new QShortcut(sc, a->parentWidget()); | 379 QShortcut *newSc = new QShortcut(sc, a->parentWidget()); |
373 QObject::connect(newSc, SIGNAL(activated()), | 380 QObject::connect(newSc, SIGNAL(activated()), |
374 m_menuShortcutMapper, SLOT(map())); | 381 m_menuShortcutMapper, SLOT(map())); |
375 m_menuShortcutMapper->setMapping(newSc, a); | 382 m_menuShortcutMapper->setMapping(newSc, a); |
376 m_appShortcuts.push_back(newSc); | 383 m_appShortcuts.push_back(newSc); |