Terminal: Restrict shortcuts

Amends a0c05cabcc. Specifically Ctrl+Shift+T conflicts with
opening the type hiearchy pane when in a C++-editor.

Change-Id: Id4da738162ad9c90d6b45c4142a207ea22511d18
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-12-12 18:40:21 +01:00
parent 1cea4ea42e
commit 5e2bc6f398

View File

@@ -232,6 +232,7 @@ void TerminalPane::initActions()
newTerminalAction.setText(Tr::tr("New Terminal"));
newTerminalAction.setIcon(NEW_TERMINAL_ICON.icon());
newTerminalAction.setToolTip(Tr::tr("Create a new Terminal."));
newTerminalAction.setContext(m_selfContext);
newTerminalAction.setDefaultKeySequences({QKeySequence(
HostOsInfo::isMacHost() ? QLatin1String("Ctrl+T") : QLatin1String("Ctrl+Shift+T"))});
newTerminalAction.setOnTriggered(this, [this] { openTerminal({}); });
@@ -241,11 +242,13 @@ void TerminalPane::initActions()
closeTerminalAction.setText(Tr::tr("Close Terminal"));
closeTerminalAction.setIcon(CLOSE_TERMINAL_ICON.icon());
closeTerminalAction.setToolTip(Tr::tr("Close the current Terminal."));
closeTerminalAction.setContext(m_selfContext);
closeTerminalAction.setOnTriggered(this, [this] { removeTab(m_tabWidget.currentIndex()); });
m_closeTerminalAction = closeTerminalAction.commandAction();
ActionBuilder nextTerminalAction(this, NEXTTERMINAL);
nextTerminalAction.setText(Tr::tr("Next Terminal"));
nextTerminalAction.setContext(m_selfContext);
nextTerminalAction.setDefaultKeySequences(
{QKeySequence("Alt+Tab"),
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+[")
@@ -257,6 +260,7 @@ void TerminalPane::initActions()
ActionBuilder prevTerminalAction(this, PREVTERMINAL);
prevTerminalAction.setText(Tr::tr("Previous Terminal"));
prevTerminalAction.setContext(m_selfContext);
prevTerminalAction.setDefaultKeySequences(
{QKeySequence("Alt+Shift+Tab"),
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+]")