diff options
author | David Edmundson <davidedmundson@kde.org> | 2013-08-08 17:33:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-20 22:22:21 +0200 |
commit | 725bdc3fd2f88c7f49f59a151579fd128cf543dc (patch) | |
tree | c9b472af22114805a5e6a132989e0d98920e4bea /src/gui/kernel/qplatformtheme.h | |
parent | e2322c885f6dd67834c5110c6b7e2b63ea8b6186 (diff) |
Fetch StandardKey shortcuts from QPlatformTheme
This allows platforms to dynamically alter their keyboard
shortcuts, for example if they are user-configurable on that
platform. Current behavior remains the same.
QEvent previously used the hardcoded values in QKeySequencePrivate so
this was modified to use QKeySequence::keyBindings().
In order to keep the speed of QEvent's former binary search, we moved
this code to QPlatformTheme::keyBindings(), making it faster for all
keyBinding lookups.
As we now need to search by StandardKey instead of by shortcut the list
is reordered and a test is changed to reflect that.
Change-Id: Iefb402fbbe8768be2208ce036f3c2deed72dcc6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.h')
-rw-r--r-- | src/gui/kernel/qplatformtheme.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index 1d7a1ccffa..fd2bb19f2a 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -53,6 +53,7 @@ #include <QtCore/QtGlobal> #include <QtCore/QScopedPointer> +#include <QtGui/QKeySequence> QT_BEGIN_NAMESPACE @@ -285,6 +286,8 @@ public: virtual QIconEngine *createIconEngine(const QString &iconName) const; + virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const; + static QVariant defaultThemeHint(ThemeHint hint); protected: |