summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformtheme.cpp
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2016-11-09 17:33:00 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2016-12-19 11:02:01 +0000
commitde63bbd2f806b0219a60775017899cedb121581f (patch)
tree9396c1d51fa31ffcb9e02df22bc40430c1295663 /src/gui/kernel/qplatformtheme.cpp
parent2f103bde11e2f63b1f079101806754f04d067716 (diff)
Add QPlatformTheme::standardButtonShortcut()
It allows to set shortcuts for the standard buttons in QDialogButtonBox. Restore Qt4's behavior for the "Don't Save" button on macOS by setting a shortcut for it (it was Cmd-D before Lion, now it's Cmd-Delete). Change-Id: I6b56f68f37670962178693a8983d9fe550540856 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.cpp')
-rw-r--r--src/gui/kernel/qplatformtheme.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index eef8b817fd..931c784d08 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -671,6 +671,19 @@ QString QPlatformTheme::standardButtonText(int button) const
return QPlatformTheme::defaultStandardButtonText(button);
}
+/*!
+ Returns the mnemonic that should be used for a standard \a button.
+
+ \since 5.9
+ \sa QPlatformDialogHelper::StandardButton
+ */
+
+QKeySequence QPlatformTheme::standardButtonShortcut(int button) const
+{
+ Q_UNUSED(button)
+ return QKeySequence();
+}
+
QString QPlatformTheme::defaultStandardButtonText(int button)
{
switch (button) {