diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-03-10 16:55:04 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-03-14 05:29:22 +0000 |
commit | c2c3452ba5b4c32d0c2d5df9193bf89986623ab5 (patch) | |
tree | 66b567681989e166bc429f477ae7f13f9c844f75 /src/gui/kernel/qplatformintegration.cpp | |
parent | b6e3fd8ced2ae3629b73b78bf436d1a3ac4bccda (diff) |
Add new API to control whether shortcuts are shown in context menus
Shortcuts are universally not shown on macOS or mobile platforms, making
applications look very obviously out of place.
Windows and GNOME desktop environments almost never use them.
Only KDE appears to do so commonly; default accordingly.
Task-number: QTBUG-49435
Change-Id: Ieac4cee57b15a02be5258f3d07749af6316af62b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 0af3295430..9673ad673a 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -392,6 +392,8 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const return false; case ShowIsMaximized: return false; + case ShowShortcutsInContextMenus: + return QPlatformTheme::defaultThemeHint(QPlatformTheme::ShowShortcutsInContextMenus); case PasswordMaskDelay: return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay); case PasswordMaskCharacter: |