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();
|
dd->m_projectExplorerSettings.environmentId = QUuid::createUuid();
|
||||||
int tmp = s->value(QLatin1String("ProjectExplorer/Settings/StopBeforeBuild"),
|
int tmp = s->value(QLatin1String("ProjectExplorer/Settings/StopBeforeBuild"),
|
||||||
Utils::HostOsInfo::isWindowsHost() ? 1 : 0).toInt();
|
Utils::HostOsInfo::isWindowsHost() ? 1 : 0).toInt();
|
||||||
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
|
|
||||||
if (tmp < 0 || tmp > ProjectExplorerSettings::StopAll)
|
if (tmp < 0 || tmp > ProjectExplorerSettings::StopAll)
|
||||||
tmp = Utils::HostOsInfo::isWindowsHost() ? 1 : 0;
|
tmp = Utils::HostOsInfo::isWindowsHost() ? 1 : 0;
|
||||||
|
|
||||||
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
|
dd->m_projectExplorerSettings.stopBeforeBuild = ProjectExplorerSettings::StopBeforeBuild(tmp);
|
||||||
|
|
||||||
connect(dd->m_sessionManagerAction, &QAction::triggered,
|
connect(dd->m_sessionManagerAction, &QAction::triggered,
|
||||||
@@ -2294,14 +2292,13 @@ int ProjectExplorerPluginPrivate::queue(QList<Project *> projects, QList<Id> ste
|
|||||||
if (!m_instance->saveModifiedFiles())
|
if (!m_instance->saveModifiedFiles())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone) {
|
if (m_projectExplorerSettings.stopBeforeBuild != ProjectExplorerSettings::StopNone
|
||||||
QList<RunControl *> toStop;
|
&& stepIds.contains(Constants::BUILDSTEPS_BUILD)) {
|
||||||
foreach (RunControl *rc, m_outputPane->allRunControls()) {
|
bool stopAll = (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll);
|
||||||
if (rc->isRunning()
|
const QList<RunControl *> toStop
|
||||||
&& (m_projectExplorerSettings.stopBeforeBuild == ProjectExplorerSettings::StopAll
|
= Utils::filtered(m_outputPane->allRunControls(), [&projects, stopAll](RunControl *rc) {
|
||||||
|| projects.contains(rc->project())))
|
return rc->isRunning() && (stopAll || projects.contains(rc->project()));
|
||||||
toStop << rc;
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (!toStop.isEmpty()) {
|
if (!toStop.isEmpty()) {
|
||||||
bool stopThem = true;
|
bool stopThem = true;
|
||||||
|
Reference in New Issue
Block a user