Commit 1a0c0a82 authored by Daniel Teske's avatar Daniel Teske
Browse files

Fix disabling of Deploy All action



Change-Id: I3571fb3535451ef3f569b670ae1e1a93b787c096
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 7019a51f
......@@ -2208,7 +2208,6 @@ void ProjectExplorerPlugin::updateDeployActions()
const QString projectName = project ? project->displayName() : QString();
const QString projectNameContextMenu = d->m_currentProject ? d->m_currentProject->displayName() : QString();
bool hasProjects = !d->m_session->projects().isEmpty();
bool building = d->m_buildManager->isBuilding();
d->m_deployAction->setParameter(projectName);
d->m_deployAction->setEnabled(enableDeployActions);
......@@ -2218,7 +2217,24 @@ void ProjectExplorerPlugin::updateDeployActions()
d->m_deployProjectOnlyAction->setEnabled(enableDeployActions);
d->m_deploySessionAction->setEnabled(hasProjects && !building);
bool enableDeploySessionAction = true;
if (d->m_projectExplorerSettings.buildBeforeDeploy) {
const QList<Project *> & projects = d->m_session->projectOrder(0);
foreach (Project *project, projects) {
if (project
&& project->activeTarget()
&& project->activeTarget()->activeBuildConfiguration()
&& !project->activeTarget()->activeBuildConfiguration()->isEnabled()) {
enableDeploySessionAction = false;
break;
}
}
}
if (!hasProjects
|| !hasDeploySettings(0)
|| d->m_buildManager->isBuilding())
enableDeploySessionAction = false;
d->m_deploySessionAction->setEnabled(enableDeploySessionAction);
emit updateRunActions();
}
......
Markdown is supported
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