forked from qt-creator/qt-creator
Axivion: Load projectInfo with taken from DashboardInfo
Task tree variant. Change-Id: Ie42573f78caa180ad9669e63bab8a6b920515927 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -384,23 +384,38 @@ void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QUrl url = urlForProject(projectName);
|
const auto onTaskTreeSetup = [this, projectName](TaskTree &taskTree) {
|
||||||
|
if (!m_dashboardInfo)
|
||||||
|
return SetupResult::StopWithError;
|
||||||
|
|
||||||
const auto handler = [this](const Dto::ProjectInfoDto &data) {
|
const auto it = m_dashboardInfo->projectUrls.constFind(projectName);
|
||||||
m_currentProjectInfo = data;
|
if (it == m_dashboardInfo->projectUrls.constEnd())
|
||||||
m_axivionOutputPane.updateDashboard();
|
return SetupResult::StopWithError;
|
||||||
// handle already opened documents
|
|
||||||
if (auto buildSystem = ProjectExplorer::ProjectManager::startupBuildSystem();
|
const auto handler = [this](const Dto::ProjectInfoDto &data) {
|
||||||
!buildSystem || !buildSystem->isParsing()) {
|
m_currentProjectInfo = data;
|
||||||
handleOpenedDocs(nullptr);
|
m_axivionOutputPane.updateDashboard();
|
||||||
} else {
|
// handle already opened documents
|
||||||
connect(ProjectExplorer::ProjectManager::instance(),
|
if (auto buildSystem = ProjectExplorer::ProjectManager::startupBuildSystem();
|
||||||
&ProjectExplorer::ProjectManager::projectFinishedParsing,
|
!buildSystem || !buildSystem->isParsing()) {
|
||||||
this, &AxivionPluginPrivate::handleOpenedDocs);
|
handleOpenedDocs(nullptr);
|
||||||
}
|
} else {
|
||||||
|
connect(ProjectExplorer::ProjectManager::instance(),
|
||||||
|
&ProjectExplorer::ProjectManager::projectFinishedParsing,
|
||||||
|
this, &AxivionPluginPrivate::handleOpenedDocs);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const QUrl url(settings().server.dashboard);
|
||||||
|
taskTree.setRecipe(fetchDataRecipe<Dto::ProjectInfoDto>(url.resolved(*it), handler));
|
||||||
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
m_taskTreeRunner.start(fetchDataRecipe<Dto::ProjectInfoDto>(url, handler));
|
const Group root {
|
||||||
|
dashboardInfoRecipe(),
|
||||||
|
TaskTreeTask(onTaskTreeSetup)
|
||||||
|
};
|
||||||
|
m_taskTreeRunner.start(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxivionPluginPrivate::fetchIssueTableLayout(const QString &prefix)
|
void AxivionPluginPrivate::fetchIssueTableLayout(const QString &prefix)
|
||||||
|
Reference in New Issue
Block a user