forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user