Commit 3840f861 authored by dt's avatar dt
Browse files

Fix buildSession if some projects have no active buildconfiguration

parent c5cac927
...@@ -1458,6 +1458,7 @@ void ProjectExplorerPlugin::buildProject() ...@@ -1458,6 +1458,7 @@ void ProjectExplorerPlugin::buildProject()
if (saveModifiedFiles()) { if (saveModifiedFiles()) {
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, d->m_session->projectOrder(d->m_currentProject)) foreach (Project *pro, d->m_session->projectOrder(d->m_currentProject))
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->buildProjects(configurations); d->m_buildManager->buildProjects(configurations);
...@@ -1472,6 +1473,7 @@ void ProjectExplorerPlugin::buildSession() ...@@ -1472,6 +1473,7 @@ void ProjectExplorerPlugin::buildSession()
if (saveModifiedFiles()) { if (saveModifiedFiles()) {
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, d->m_session->projectOrder()) foreach (Project *pro, d->m_session->projectOrder())
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->buildProjects(configurations); d->m_buildManager->buildProjects(configurations);
} }
...@@ -1497,6 +1499,7 @@ void ProjectExplorerPlugin::rebuildProject() ...@@ -1497,6 +1499,7 @@ void ProjectExplorerPlugin::rebuildProject()
const QList<Project *> &projects = d->m_session->projectOrder(d->m_currentProject); const QList<Project *> &projects = d->m_session->projectOrder(d->m_currentProject);
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects) foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations); d->m_buildManager->cleanProjects(configurations);
...@@ -1513,6 +1516,7 @@ void ProjectExplorerPlugin::rebuildSession() ...@@ -1513,6 +1516,7 @@ void ProjectExplorerPlugin::rebuildSession()
const QList<Project *> & projects = d->m_session->projectOrder(); const QList<Project *> & projects = d->m_session->projectOrder();
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects) foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations); d->m_buildManager->cleanProjects(configurations);
...@@ -1538,6 +1542,7 @@ void ProjectExplorerPlugin::cleanProject() ...@@ -1538,6 +1542,7 @@ void ProjectExplorerPlugin::cleanProject()
const QList<Project *> & projects = d->m_session->projectOrder(d->m_currentProject); const QList<Project *> & projects = d->m_session->projectOrder(d->m_currentProject);
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects) foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations); d->m_buildManager->cleanProjects(configurations);
} }
...@@ -1552,6 +1557,7 @@ void ProjectExplorerPlugin::cleanSession() ...@@ -1552,6 +1557,7 @@ void ProjectExplorerPlugin::cleanSession()
const QList<Project *> & projects = d->m_session->projectOrder(); const QList<Project *> & projects = d->m_session->projectOrder();
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects) foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations); d->m_buildManager->cleanProjects(configurations);
} }
...@@ -1584,6 +1590,7 @@ void ProjectExplorerPlugin::runProjectImpl(Project *pro, QString mode) ...@@ -1584,6 +1590,7 @@ void ProjectExplorerPlugin::runProjectImpl(Project *pro, QString mode)
const QList<Project *> & projects = d->m_session->projectOrder(pro); const QList<Project *> & projects = d->m_session->projectOrder(pro);
QList<BuildConfiguration *> configurations; QList<BuildConfiguration *> configurations;
foreach(Project *pro, projects) foreach(Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration(); configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->buildProjects(configurations); d->m_buildManager->buildProjects(configurations);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment