forked from qt-creator/qt-creator
ProjectExplorer: Do not kill applications when deploying
Only kill applications when adding build-steps, not for deploy-steps. This is more in line with what the documentation says. Task-number: QTCREATORBUG-15281 Change-Id: Iaa8cfb3efb79645ff29d0c67b24636aefa1d7d3e Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
@@ -1161,10 +1161,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
dd->m_projectExplorerSettings.environmentId = QUuid::createUuid();
|
||||
int tmp = s->value(QLatin1String("ProjectExplorer/Settings/StopBeforeBuild"),
|
||||
Utils::HostOsInfo::isWindowsHost() ? 1 : 0).toInt();
|
||||
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
|
||||
if (tmp < 0 || tmp > ProjectExplorerSettings::StopAll)
|
||||
tmp = Utils::HostOsInfo::isWindowsHost() ? 1 : 0;
|
||||
|
||||
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
|
||||
|
||||
connect(dd->m_sessionManagerAction, &QAction::triggered,
|
||||
@@ -2294,14 +2292,13 @@ int ProjectExplorerPluginPrivate::queue(QList<Project *> projects, QList<Id> ste
|
||||
if (!m_instance->saveModifiedFiles())
|
||||
return -1;
|
||||
|
||||
if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone) {
|
||||
QList<RunControl *> toStop;
|
||||
foreach (RunControl *rc, m_outputPane->allRunControls()) {
|
||||
if (rc->isRunning()
|
||||
&& (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll
|
||||
|| projects.contains(rc->project())))
|
||||
toStop << rc;
|
||||
}
|
||||
if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone
|
||||
&& stepIds.contains(Constants::BUILDSTEPS_BUILD)) {
|
||||
bool stopAll = (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll);
|
||||
const QList<RunControl *> toStop
|
||||
= Utils::filtered(m_outputPane->allRunControls(), [&projects, stopAll](RunControl *rc) {
|
||||
return rc->isRunning() && (stopAll || projects.contains(rc->project()));
|
||||
});
|
||||
|
||||
if (!toStop.isEmpty()) {
|
||||
bool stopThem = true;
|
||||
|
Reference in New Issue
Block a user