diff options
author | hjk <hjk@qt.io> | 2023-12-13 12:29:46 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-12-13 13:00:00 +0000 |
commit | b442ca38731e007ff57b7fb84461f758989b686f (patch) | |
tree | b78477cb9d8b862638078f631f15d780522f6af0 /src/plugins/texteditor/texteditorplugin.cpp | |
parent | 3b7d29d2a12429fe61f510c73e03b3048163d9d3 (diff) |
Core: Rename ActionBuilder::setOn* to addOn*
There could be multiple connections.
Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditorplugin.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditorplugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 1c121f7315..f30dac4118 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -128,7 +128,7 @@ TextEditorPluginPrivate::TextEditorPluginPrivate() toggleAction.setTouchBarIcon(Icons::MACOS_TOUCHBAR_BOOKMARK.icon()); toggleAction.addToContainer(bookmarkMenuId); toggleAction.bindContextAction(&m_toggleAction); - toggleAction.setOnTriggered(this, [this] { + toggleAction.addOnTriggered(this, [this] { IEditor *editor = EditorManager::currentEditor(); auto widget = TextEditorWidget::fromEditor(editor); if (widget && editor && !editor->document()->isTemporary()) @@ -141,7 +141,7 @@ TextEditorPluginPrivate::TextEditorPluginPrivate() editAction.setDefaultKeySequence(Tr::tr("Meta+Shift+M"), Tr::tr("Ctrl+Shift+M")); editAction.addToContainer(bookmarkMenuId); editAction.bindContextAction(&m_editAction); - editAction.setOnTriggered(this, [this] { + editAction.addOnTriggered(this, [this] { IEditor *editor = EditorManager::currentEditor(); auto widget = TextEditorWidget::fromEditor(editor); if (widget && editor && !editor->document()->isTemporary()) { @@ -163,7 +163,7 @@ TextEditorPluginPrivate::TextEditorPluginPrivate() prevAction.setIcon(Icons::PREV_TOOLBAR.icon()); prevAction.setIconVisibleInMenu(false); prevAction.bindContextAction(&m_prevAction); - prevAction.setOnTriggered(this, [this] { m_bookmarkManager.prev(); }); + prevAction.addOnTriggered(this, [this] { m_bookmarkManager.prev(); }); ActionBuilder nextAction(this, BOOKMARKS_NEXT_ACTION); nextAction.setContext(editorManagerContext); @@ -173,7 +173,7 @@ TextEditorPluginPrivate::TextEditorPluginPrivate() nextAction.setDefaultKeySequence(Tr::tr("Meta+."), Tr::tr("Ctrl+.")); nextAction.addToContainer(bookmarkMenuId); nextAction.bindContextAction(&m_nextAction); - nextAction.setOnTriggered(this, [this] { m_bookmarkManager.next(); }); + nextAction.addOnTriggered(this, [this] { m_bookmarkManager.next(); }); m_bookmarkMenu.addSeparator(); @@ -182,14 +182,14 @@ TextEditorPluginPrivate::TextEditorPluginPrivate() docPrevAction.setText(Tr::tr("Previous Bookmark in Document")); docPrevAction.addToContainer(bookmarkMenuId); docPrevAction.bindContextAction(&m_docPrevAction); - docPrevAction.setOnTriggered(this, [this] { m_bookmarkManager.prevInDocument(); }); + docPrevAction.addOnTriggered(this, [this] { m_bookmarkManager.prevInDocument(); }); ActionBuilder docNextAction(this, "Bookmarks.NextDocument"); docNextAction.setContext(Core::Constants::C_EDITORMANAGER); docNextAction.setText(Tr::tr("Next Bookmark in Document")); docNextAction.addToContainer(bookmarkMenuId); docNextAction.bindContextAction(&m_docNextAction); - docNextAction.setOnTriggered(this, [this] { m_bookmarkManager.nextInDocument(); }); + docNextAction.addOnTriggered(this, [this] { m_bookmarkManager.nextInDocument(); }); connect(&m_editBookmarkAction, &QAction::triggered, this, [this] { m_bookmarkManager.editByFileAndLine(m_marginActionFileName, m_marginActionLineNumber); |