summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qaction_p.h
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2009-04-20 12:24:08 (GMT)
committerjasplin <qt-info@nokia.com>2009-04-20 13:02:05 (GMT)
commit031adeaf42ddaef8d01338f6c59ba97170be5d53 (patch)
treee6eb11ed75e2d9015f51000c138399593c6a4af9 /src/gui/kernel/qaction_p.h
parentbeb6912526766edd7e8a9f9876d82272f798dbc3 (diff)
downloadQt-031adeaf42ddaef8d01338f6c59ba97170be5d53.zip
Qt-031adeaf42ddaef8d01338f6c59ba97170be5d53.tar.gz
Qt-031adeaf42ddaef8d01338f6c59ba97170be5d53.tar.bz2
Fixed key sequence eating behavior for QShortcut and QAction.
A disabled QShortcut should eat its key sequence even for complex sequences like "Ctrl-E 1". For example, a line edit with such a shortcut should not display 1 after typing "Ctrl-E" and then "1". The patch achieves this essentially by moving more of the decision making (of whether to eat the key secuence) from shortcutmap.cpp to qhortcut.cpp. Moreover, an invisible QAction should not eat any of its key sequences (primary nor alternates). In the example above, the line edit would display 1 when typing this sequence for an invisible action. The patch achieves this by temporarily unregistering all of the action's shortcuts while the action is invisible. Reviewed-by: mariusSO Task-number: 251246
Diffstat (limited to 'src/gui/kernel/qaction_p.h')
-rw-r--r--src/gui/kernel/qaction_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qaction_p.h b/src/gui/kernel/qaction_p.h
index 0617ef5..a5b3731 100644
--- a/src/gui/kernel/qaction_p.h
+++ b/src/gui/kernel/qaction_p.h
@@ -111,6 +111,7 @@ public:
void redoGrab(QShortcutMap &map);
void redoGrabAlternate(QShortcutMap &map);
void setShortcutEnabled(bool enable, QShortcutMap &map);
+ void removeAll(QShortcutMap &map);
static QShortcutMap *globalMap;
#endif // QT_NO_SHORTCUT