forked from qt-creator/qt-creator
QbsProjectManager: Re-retrieve project data after build.
This fixes the bug that the "run" action fails if the project has not been built before (because the path to the executable is still unknown after the build due to the missing project data update). Change-Id: I953cbb85051a1de78fcb0490abf58ebc9fcec6e7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -502,6 +502,8 @@ void QbsProject::cancelParsing()
|
||||
|
||||
void QbsProject::updateAfterBuild()
|
||||
{
|
||||
QTC_ASSERT(m_qbsProject.isValid(), return);
|
||||
m_projectData = m_qbsProject.projectData();
|
||||
updateBuildTargetData();
|
||||
}
|
||||
|
||||
@@ -763,7 +765,7 @@ void QbsProject::updateDeploymentInfo(const qbs::Project &project)
|
||||
qbs::InstallOptions installOptions;
|
||||
installOptions.setInstallRoot(QLatin1String("/"));
|
||||
foreach (const qbs::InstallableFile &f,
|
||||
project.installableFilesForProject(project.projectData(), installOptions)) {
|
||||
project.installableFilesForProject(m_projectData, installOptions)) {
|
||||
deploymentData.addFile(f.sourceFilePath(), f.targetDirectory(), f.isExecutable()
|
||||
? ProjectExplorer::DeployableFile::TypeExecutable
|
||||
: ProjectExplorer::DeployableFile::TypeNormal);
|
||||
@@ -774,7 +776,7 @@ void QbsProject::updateDeploymentInfo(const qbs::Project &project)
|
||||
|
||||
void QbsProject::updateBuildTargetData()
|
||||
{
|
||||
updateApplicationTargets(m_qbsProject.projectData());
|
||||
updateApplicationTargets(m_projectData);
|
||||
updateDeploymentInfo(m_qbsProject);
|
||||
foreach (Target *t, targets())
|
||||
t->updateDefaultRunConfigurations();
|
||||
|
||||
Reference in New Issue
Block a user