1
0
forked from pool/libqt5-qtbase
libqt5-qtbase/de63bbd2f806b0219a60775017899cedb121581f.patch
Dominique Leuenberger 048abb8e9c Accepting request 505943 from KDE:Qt5
- Use the correct (edited) version of the revert to not break ABI:
  * de63bbd2f806b0219a60775017899cedb121581f.patch
(Ironically this change breaks private ABI yet again...)

- Add upstream patch to fix version string of CMake modules (boo#1045102)
  * fix-cmake-module-version.patch

OBS-URL: https://build.opensuse.org/request/show/505943
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=60
2017-06-29 12:59:43 +00:00

37 lines
1.4 KiB
Diff

From de63bbd2f806b0219a60775017899cedb121581f Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Wed, 9 Nov 2016 17:33:00 +0300
Subject: [PATCH] Add QPlatformTheme::standardButtonShortcut()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
---
src/widgets/widgets/qdialogbuttonbox.cpp | 7 +------
5 files changed, 22 insertions(+), 6 deletions(-)
Index: qtbase-opensource-src-5.9.0/src/widgets/widgets/qdialogbuttonbox.cpp
===================================================================
--- qtbase-opensource-src-5.9.0.orig/src/widgets/widgets/qdialogbuttonbox.cpp
+++ qtbase-opensource-src-5.9.0/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -410,9 +410,7 @@ QPushButton *QDialogButtonBoxPrivate::cr
qWarning("QDialogButtonBox::createButton: Invalid ButtonRole, button not added");
else
addButton(button, static_cast<QDialogButtonBox::ButtonRole>(role), doLayout);
-#if QT_CONFIG(shortcut)
- button->setShortcut(QGuiApplicationPrivate::platformTheme()->standardButtonShortcut(sbutton));
-#endif
+
return button;
}