Fix limitting shortcuts to keypad only
authorJani Honkonen <jani.honkonen@digia.com>
Mon, 6 Aug 2012 09:02:51 +0000 (12:02 +0300)
committerQt by Nokia <qt-info@nokia.com>
Mon, 27 Aug 2012 08:27:30 +0000 (10:27 +0200)
commit547a1bea492954d828aa0798be93384669812489
tree82805efa24f9f454830a19f83a0c52ed835e4819
parent2ef52ca12416baa96feb64e02186aae04f883a12
Fix limitting shortcuts to keypad only

The Qt::KeypadModifier modifier is internally masked away from all
shortcuts. So it is not possible to set a keypad only shortcut.
Changed the implementation so that first a full keysequence match is
searched. Then if no match is found the same sequence is tried
without the keypad modifer.

Added a autotest for this also to cover the basic use cases relating
to this.

Task-number: QTBUG-20191

Change-Id: Ibe7740c705fd0ab1eece4809b9a0b48882172933
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/gui/kernel/qshortcutmap.cpp
tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp