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()
if (saveModifiedFiles()) {
QList<BuildConfiguration *> configurations;
foreach (Project *pro, d->m_session->projectOrder(d->m_currentProject))
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->buildProjects(configurations);
......@@ -1472,6 +1473,7 @@ void ProjectExplorerPlugin::buildSession()
if (saveModifiedFiles()) {
QList<BuildConfiguration *> configurations;
foreach (Project *pro, d->m_session->projectOrder())
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->buildProjects(configurations);
}
......@@ -1497,6 +1499,7 @@ void ProjectExplorerPlugin::rebuildProject()
const QList<Project *> &projects = d->m_session->projectOrder(d->m_currentProject);
QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations);
......@@ -1513,6 +1516,7 @@ void ProjectExplorerPlugin::rebuildSession()
const QList<Project *> & projects = d->m_session->projectOrder();
QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations);
......@@ -1538,6 +1542,7 @@ void ProjectExplorerPlugin::cleanProject()
const QList<Project *> & projects = d->m_session->projectOrder(d->m_currentProject);
QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations);
}
......@@ -1552,6 +1557,7 @@ void ProjectExplorerPlugin::cleanSession()
const QList<Project *> & projects = d->m_session->projectOrder();
QList<BuildConfiguration *> configurations;
foreach (Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
d->m_buildManager->cleanProjects(configurations);
}
......@@ -1584,6 +1590,7 @@ void ProjectExplorerPlugin::runProjectImpl(Project *pro, QString mode)
const QList<Project *> & projects = d->m_session->projectOrder(pro);
QList<BuildConfiguration *> configurations;
foreach(Project *pro, projects)
if (pro->activeTarget()->activeBuildConfiguration())
configurations << pro->activeTarget()->activeBuildConfiguration();
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