From 2e06e1e4b69008ee2e70b80d5422d8bffcb277be Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 11 Sep 2024 11:03:15 +0200 Subject: [PATCH] Axivion: Wrap initialization of fetchProjectInfo inside onSetup handler Change-Id: I7245701a8e64d3f47eddf54c8c758937a8936a4c Reviewed-by: Christian Stenger --- src/plugins/axivion/axivionplugin.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/plugins/axivion/axivionplugin.cpp b/src/plugins/axivion/axivionplugin.cpp index c670b6a2f55..5887a94cebf 100644 --- a/src/plugins/axivion/axivionplugin.cpp +++ b/src/plugins/axivion/axivionplugin.cpp @@ -873,13 +873,16 @@ void AxivionPluginPrivate::fetchDashboardInfo(const DashboardInfoHandler &handle void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName) { - clearAllMarks(); - m_currentProjectInfo = {}; - m_analysisVersion = {}; - if (projectName.isEmpty()) { + const auto onSetup = [this, projectName] { + clearAllMarks(); + m_currentProjectInfo = {}; + m_analysisVersion = {}; + if (!projectName.isEmpty()) + return SetupResult::Continue; + updateDashboard(); - return; - } + return SetupResult::StopWithSuccess; + }; const auto onTaskTreeSetup = [this, projectName](TaskTree &taskTree) { if (!m_dashboardInfo) { @@ -908,6 +911,7 @@ void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName) }; const Group root { + onGroupSetup(onSetup), authorizationRecipe(), TaskTreeTask(onTaskTreeSetup) };