diff options
author | hjk <hjk@qt.io> | 2023-12-12 18:40:21 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-12-13 08:27:49 +0000 |
commit | 5e2bc6f39873688f8af62589a7ea482d478d3fbb (patch) | |
tree | 2e10e0574f8712a77f4be3cf2c3042bf355550d0 /src/plugins/terminal | |
parent | 1cea4ea42e0b0522e2e8447997dd178dd0906d42 (diff) |
Terminal: Restrict shortcuts
Amends a0c05cabcc3df0. 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>
Diffstat (limited to 'src/plugins/terminal')
-rw-r--r-- | src/plugins/terminal/terminalpane.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/terminal/terminalpane.cpp b/src/plugins/terminal/terminalpane.cpp index 3e4ce3e8b79..f1561a17c72 100644 --- a/src/plugins/terminal/terminalpane.cpp +++ b/src/plugins/terminal/terminalpane.cpp @@ -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+]") |