aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Ui
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-04-26 20:28:13 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-04-26 20:28:13 +0000
commitaec22304b3293d7b1f9f554c74b735fc1593479f (patch)
tree000980219f9a306fe447a5e5dcc0f22d2e4679c8 /src/plugins/Ui
parente76365263cfea56e02e17e31f555abb918a1b177 (diff)
downloadqmmp-aec22304b3293d7b1f9f554c74b735fc1593479f.tar.gz
qmmp-aec22304b3293d7b1f9f554c74b735fc1593479f.tar.bz2
qmmp-aec22304b3293d7b1f9f554c74b735fc1593479f.zip
show shortcuts in context menus (QTBUG-69452)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8794 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui')
-rw-r--r--src/plugins/Ui/qsui/actionmanager.cpp6
-rw-r--r--src/plugins/Ui/skinned/actionmanager.cpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/Ui/qsui/actionmanager.cpp b/src/plugins/Ui/qsui/actionmanager.cpp
index 5e7eb8977..51399d1ca 100644
--- a/src/plugins/Ui/qsui/actionmanager.cpp
+++ b/src/plugins/Ui/qsui/actionmanager.cpp
@@ -147,6 +147,9 @@ ActionManager* ActionManager::instance()
QAction *ActionManager::createAction(QString name, QString confKey, QString key, QString iconName)
{
QAction *action = new QAction(name, this);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
+ action->setShortcutVisibleInContextMenu(true);
+#endif
action->setShortcut(m_settings->value(confKey, key).toString());
action->setObjectName(confKey);
action->setProperty("defaultShortcut", key);
@@ -219,6 +222,9 @@ void ActionManager::registerAction(int id, QAction *action, QString confKey, QSt
action->setShortcut(settings.value(confKey, key).toString());
action->setProperty("defaultShortcut", key);
action->setObjectName(confKey);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
+ action->setShortcutVisibleInContextMenu(true);
+#endif
m_actions[id] = action;
settings.endGroup();
}
diff --git a/src/plugins/Ui/skinned/actionmanager.cpp b/src/plugins/Ui/skinned/actionmanager.cpp
index 02158089c..8ee1fb667 100644
--- a/src/plugins/Ui/skinned/actionmanager.cpp
+++ b/src/plugins/Ui/skinned/actionmanager.cpp
@@ -139,6 +139,9 @@ ActionManager* ActionManager::instance()
QAction *ActionManager::createAction(QString name, QString confKey, QString key, QString iconName)
{
QAction *action = new QAction(name, this);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
+ action->setShortcutVisibleInContextMenu(true);
+#endif
action->setShortcut(m_settings->value(confKey, key).toString());
action->setProperty("defaultShortcut", key);
action->setObjectName(confKey);