From 725bdc3fd2f88c7f49f59a151579fd128cf543dc Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 8 Aug 2013 17:33:35 +0100 Subject: 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 --- src/gui/kernel/qplatformtheme_p.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/kernel/qplatformtheme_p.h') diff --git a/src/gui/kernel/qplatformtheme_p.h b/src/gui/kernel/qplatformtheme_p.h index 2b965819c6..217c284a9e 100644 --- a/src/gui/kernel/qplatformtheme_p.h +++ b/src/gui/kernel/qplatformtheme_p.h @@ -52,6 +52,7 @@ // #include +#include "private/qkeysequence_p.h" QT_BEGIN_NAMESPACE @@ -66,6 +67,11 @@ public: void initializeSystemPalette(); + static const QKeyBinding keyBindings[]; + static const uint numberOfKeyBindings; + + static unsigned currentKeyPlatforms(); + QPalette *systemPalette; }; -- cgit v1.2.3