Core: Rename ActionBuilder::setContainer to addToContainer

An action/command can be used in several places.

Change-Id: Ifa26f64f7d200d93ada13f272de0fa833f886997
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-12-13 09:02:02 +01:00
parent 5e2bc6f398
commit e17f0b6164
22 changed files with 131 additions and 131 deletions

View File

@@ -216,20 +216,20 @@ HelpPluginPrivate::HelpPluginPrivate()
ActionBuilder helpContents(this, "Help.ContentsMenu");
helpContents.setText(Tr::tr(Constants::SB_CONTENTS));
helpContents.setIcon(QIcon::fromTheme("help-contents"));
helpContents.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpContents.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpContents.setOnTriggered(this, &HelpPluginPrivate::activateContents);
ActionBuilder helpIndex(this, "Help.IndexMenu");
helpIndex.setText(Tr::tr(Constants::SB_INDEX));
helpIndex.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpIndex.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpIndex.setOnTriggered(this, &HelpPluginPrivate::activateIndex);
ActionBuilder helpContext(this, Help::Constants::CONTEXT_HELP);
helpContext.setText(Tr::tr("Context Help"));
helpContext.setContext(Context(kToolTipHelpContext, Core::Constants::C_GLOBAL));
helpContext.setTouchBarIcon(Icons::MACOS_TOUCHBAR_HELP.icon());
helpContext.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpContext.setContainer(Core::Constants::TOUCH_BAR, Core::Constants::G_TOUCHBAR_HELP);
helpContext.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP);
helpContext.addToContainer(Core::Constants::TOUCH_BAR, Core::Constants::G_TOUCHBAR_HELP);
helpContext.setDefaultKeySequence(Qt::Key_F1);
helpContext.setOnTriggered(this, &HelpPluginPrivate::requestContextHelp);
@@ -239,12 +239,12 @@ HelpPluginPrivate::HelpPluginPrivate()
textEditorContextMenu->insertGroup(TextEditor::Constants::G_BOM,
Core::Constants::G_HELP);
textEditorContextMenu->addSeparator(Core::Constants::G_HELP);
helpContext.setContainer(TextEditor::Constants::M_STANDARDCONTEXTMENU, Core::Constants::G_HELP);
helpContext.addToContainer(TextEditor::Constants::M_STANDARDCONTEXTMENU, Core::Constants::G_HELP);
}
ActionBuilder techSupport(this, "Help.TechSupport");
techSupport.setText(Tr::tr("Technical Support..."));
techSupport.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
techSupport.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
techSupport.setOnTriggered(this, [this] {
showHelpUrl(QUrl("qthelp://org.qt-project.qtcreator/doc/technical-support.html"),
Core::HelpManager::HelpModeAlways);
@@ -255,7 +255,7 @@ HelpPluginPrivate::HelpPluginPrivate()
ActionBuilder reportBug(this, "Help.ReportBug");
reportBug.setText(Tr::tr("Report Bug..."));
reportBug.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
reportBug.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
reportBug.setOnTriggered(this, [isDesigner] {
const QUrl bugreportUrl = isDesigner ? QString("https://bugreports.qt.io/secure/CreateIssue.jspa?pid=11740") //QDS
: QString("https://bugreports.qt.io/secure/CreateIssue.jspa?pid=10512"); //QtC
@@ -264,7 +264,7 @@ HelpPluginPrivate::HelpPluginPrivate()
ActionBuilder systemInformation(this, "Help.SystemInformation");
systemInformation.setText(Tr::tr("System Information..."));
systemInformation.setContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
systemInformation.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_SUPPORT);
systemInformation.setOnTriggered(this, &HelpPluginPrivate::slotSystemInformation);
connect(ModeManager::instance(), &ModeManager::currentModeChanged,