diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-08-20 12:44:52 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-08-21 08:52:44 +0000 |
commit | 7b6ea357f65012b3d5d405a2e3bd55173558d265 (patch) | |
tree | acd7855e56b236b5e31f27b49697f27fce940c9f /src/plugins/projectexplorer/projecttreewidget.cpp | |
parent | ee9745e3daa8daa6e9f38cf38bc2991fd7f75467 (diff) |
Avoid shortcuts with "Alt" on macOS
On macOS shortcuts with "Alt" are used for entering special
characters, where "special" depends on keyboard layout and can
mean e.g. '|' or '~'.
Task-number: QTCREATORBUG-20873
Change-Id: Ifa70b95381ef48d2ba3b15a528a5dcfe43d53bfd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projecttreewidget.cpp')
-rw-r--r-- | src/plugins/projectexplorer/projecttreewidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 688c7b245c..7f8bc423a1 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -259,9 +259,11 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent) : QWidget(parent) if (!ActionManager::command(focusActionId)) { auto focusDocumentInProjectTree = new QAction(tr("Focus Document in Project Tree"), this); Command *cmd = ActionManager::registerAction(focusDocumentInProjectTree, focusActionId); - cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+L"))); - connect(focusDocumentInProjectTree, &QAction::triggered, - this, [this]() { syncFromDocumentManager(); }); + cmd->setDefaultKeySequence( + QKeySequence(useMacShortcuts ? tr("Meta+Shift+L") : tr("Alt+Shift+L"))); + connect(focusDocumentInProjectTree, &QAction::triggered, this, [this]() { + syncFromDocumentManager(); + }); } m_trimEmptyDirectoriesAction = new QAction(tr("Hide Empty Directories"), this); |