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:
Christian Kandeler
2014-07-28 09:53:06 +02:00
parent 4c7f1c5ea9
commit fb09f5cc01

View File

@@ -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();