forked from qt-creator/qt-creator
Core: Rename ActionBuilder::setOn* to addOn*
There could be multiple connections. Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -235,7 +235,7 @@ void TerminalPane::initActions()
|
||||
newTerminalAction.setContext(m_selfContext);
|
||||
newTerminalAction.setDefaultKeySequences({QKeySequence(
|
||||
HostOsInfo::isMacHost() ? QLatin1String("Ctrl+T") : QLatin1String("Ctrl+Shift+T"))});
|
||||
newTerminalAction.setOnTriggered(this, [this] { openTerminal({}); });
|
||||
newTerminalAction.addOnTriggered(this, [this] { openTerminal({}); });
|
||||
m_newTerminalAction = newTerminalAction.commandAction();
|
||||
|
||||
ActionBuilder closeTerminalAction(this, CLOSETERMINAL);
|
||||
@@ -243,7 +243,7 @@ void TerminalPane::initActions()
|
||||
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()); });
|
||||
closeTerminalAction.addOnTriggered(this, [this] { removeTab(m_tabWidget.currentIndex()); });
|
||||
m_closeTerminalAction = closeTerminalAction.commandAction();
|
||||
|
||||
ActionBuilder nextTerminalAction(this, NEXTTERMINAL);
|
||||
@@ -253,7 +253,7 @@ void TerminalPane::initActions()
|
||||
{QKeySequence("Alt+Tab"),
|
||||
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+[")
|
||||
: QLatin1String("Ctrl+PgUp"))});
|
||||
nextTerminalAction.setOnTriggered(this, [this] {
|
||||
nextTerminalAction.addOnTriggered(this, [this] {
|
||||
if (canNavigate())
|
||||
goToNext();
|
||||
});
|
||||
@@ -265,7 +265,7 @@ void TerminalPane::initActions()
|
||||
{QKeySequence("Alt+Shift+Tab"),
|
||||
QKeySequence(HostOsInfo::isMacHost() ? QLatin1String("Ctrl+Shift+]")
|
||||
: QLatin1String("Ctrl+PgDown"))});
|
||||
prevTerminalAction.setOnTriggered(this, [this] {
|
||||
prevTerminalAction.addOnTriggered(this, [this] {
|
||||
if (canPrevious())
|
||||
goToPrev();
|
||||
});
|
||||
|
||||
@@ -271,42 +271,42 @@ void TerminalWidget::setupActions()
|
||||
|
||||
ActionBuilder copyAction(this, Constants::COPY);
|
||||
copyAction.setContext(m_context);
|
||||
copyAction.setOnTriggered(this, &TerminalWidget::copyToClipboard);
|
||||
copyAction.addOnTriggered(this, &TerminalWidget::copyToClipboard);
|
||||
m_copy = make_registered(copyAction);
|
||||
|
||||
ActionBuilder pasteAction(this, Constants::PASTE);
|
||||
pasteAction.setContext(m_context);
|
||||
pasteAction.setOnTriggered(this, &TerminalWidget::pasteFromClipboard);
|
||||
pasteAction.addOnTriggered(this, &TerminalWidget::pasteFromClipboard);
|
||||
m_paste = make_registered(pasteAction);
|
||||
|
||||
ActionBuilder closeAction(this, Core::Constants::CLOSE);
|
||||
closeAction.setContext(m_context);
|
||||
closeAction.setOnTriggered(this, &TerminalWidget::closeTerminal);
|
||||
closeAction.addOnTriggered(this, &TerminalWidget::closeTerminal);
|
||||
m_close = make_registered(closeAction);
|
||||
|
||||
ActionBuilder clearTerminalAction(this, Constants::CLEAR_TERMINAL);
|
||||
clearTerminalAction.setContext(m_context);
|
||||
clearTerminalAction.setOnTriggered(this, &TerminalWidget::clearContents);
|
||||
clearTerminalAction.addOnTriggered(this, &TerminalWidget::clearContents);
|
||||
m_clearTerminal = make_registered(clearTerminalAction);
|
||||
|
||||
ActionBuilder clearSelectionAction(this, Constants::CLEARSELECTION);
|
||||
clearSelectionAction.setContext(m_context);
|
||||
clearSelectionAction.setOnTriggered(this, &TerminalWidget::clearSelection);
|
||||
clearSelectionAction.addOnTriggered(this, &TerminalWidget::clearSelection);
|
||||
m_clearSelection = make_registered(clearSelectionAction);
|
||||
|
||||
ActionBuilder moveCursorWordLeftAction(this, Constants::MOVECURSORWORDLEFT);
|
||||
moveCursorWordLeftAction.setContext(m_context);
|
||||
moveCursorWordLeftAction.setOnTriggered(this, &TerminalWidget::moveCursorWordLeft);
|
||||
moveCursorWordLeftAction.addOnTriggered(this, &TerminalWidget::moveCursorWordLeft);
|
||||
m_moveCursorWordLeft = make_registered(moveCursorWordLeftAction);
|
||||
|
||||
ActionBuilder moveCursorWordRightAction(this, Constants::MOVECURSORWORDRIGHT);
|
||||
moveCursorWordRightAction.setContext(m_context);
|
||||
moveCursorWordRightAction.setOnTriggered(this, &TerminalWidget::moveCursorWordRight);
|
||||
moveCursorWordRightAction.addOnTriggered(this, &TerminalWidget::moveCursorWordRight);
|
||||
m_moveCursorWordRight = make_registered(moveCursorWordRightAction);
|
||||
|
||||
ActionBuilder selectAllAction(this, Constants::SELECTALL);
|
||||
selectAllAction.setContext(m_context);
|
||||
selectAllAction.setOnTriggered(this, &TerminalWidget::selectAll);
|
||||
selectAllAction.addOnTriggered(this, &TerminalWidget::selectAll);
|
||||
m_selectAll = make_registered(selectAllAction);
|
||||
|
||||
// Ctrl+Q, the default "Quit" shortcut, is a useful key combination in a shell.
|
||||
|
||||
Reference in New Issue
Block a user