forked from qt-creator/qt-creator
Project: Add a option to synchronize kits and build/deploy across projects
This is far from perfect but seems to work. Further work could add more fine grained control over which projects are affected by the automatic synchronize. Also there might be a few cases where the switching is over zealous or missing. Change-Id: I26ad3d59431251564917e4b408c66695dc454823 Task-number: QTCREATORBUG-5823 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "editorconfiguration.h"
|
||||
#include "projectexplorer.h"
|
||||
#include "target.h"
|
||||
#include "session.h"
|
||||
#include "settingsaccessor.h"
|
||||
|
||||
#include <coreplugin/idocument.h>
|
||||
@@ -200,11 +201,11 @@ bool Project::removeTarget(Target *target)
|
||||
|
||||
if (target == activeTarget()) {
|
||||
if (d->m_targets.size() == 1)
|
||||
setActiveTarget(0);
|
||||
SessionManager::setActiveTarget(this, 0, SetActive::Cascade);
|
||||
else if (d->m_targets.first() == target)
|
||||
setActiveTarget(d->m_targets.at(1));
|
||||
SessionManager::setActiveTarget(this, d->m_targets.at(1), SetActive::Cascade);
|
||||
else
|
||||
setActiveTarget(d->m_targets.at(0));
|
||||
SessionManager::setActiveTarget(this, d->m_targets.at(0), SetActive::Cascade);
|
||||
}
|
||||
|
||||
emit aboutToRemoveTarget(target);
|
||||
|
||||
Reference in New Issue
Block a user