Welcome: Use ActionBuilder to set up the UI Tour action

Change-Id: I6b7590d7923da7dc5cd92c59a678fe031f6752c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2024-07-08 12:50:31 +02:00
parent 0ca17351d4
commit c0d86751dd

View File

@@ -91,12 +91,10 @@ public:
{
m_welcomeMode = new WelcomeMode;
auto introAction = new QAction(Tr::tr("UI Tour"), this);
connect(introAction, &QAction::triggered, &runUiTour);
Command *cmd = ActionManager::registerAction(introAction, "Welcome.UITour");
ActionContainer *mhelp = ActionManager::actionContainer(Core::Constants::M_HELP);
if (QTC_GUARD(mhelp))
mhelp->addAction(cmd, Core::Constants::G_HELP_HELP);
ActionBuilder(this, "Welcome.UITour")
.setText(Tr::tr("UI Tour"))
.addToContainer(Core::Constants::M_HELP, Core::Constants::G_HELP_HELP, true)
.addOnTriggered(&runUiTour);
if (!arguments.contains("-notour")) {
connect(ICore::instance(), &ICore::coreOpened, this, [] { askUserAboutIntroduction(); },