Add an option "Stop before build" for windows users

On windows, users frequently get compile errors because the application
binaries/libraries are locked while the application is still running.

A good solution would require actually knowing which builds output files
that are used by the currently running applications, and would
distinguish
between locally running applications and remote applications.

This solution in this patch is far simpler, it offers a option to
stop all runcontrols or stop all runcontrols from the project, that the
user
wants to build. Those options don't take into account whether stopping
those applications is actually needed and is global.

Change-Id: I75b0b6c450898bb29c1e4f9c18c3199aeed696fe
Task-number: QTCREATORBUG-13188
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-09-17 15:24:32 +02:00
parent cd92b3cd1a
commit a5952658b2
12 changed files with 285 additions and 5 deletions

View File

@@ -521,7 +521,11 @@ RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode)
if (runConfiguration) {
m_displayName = runConfiguration->displayName();
m_outputFormatter = runConfiguration->createOutputFormatter();
if (runConfiguration->target())
m_project = m_runConfiguration->target()->project();
}
// We need to ensure that there's always a OutputFormatter
if (!m_outputFormatter)
m_outputFormatter = new Utils::OutputFormatter();
@@ -559,6 +563,11 @@ RunConfiguration *RunControl::runConfiguration() const
return m_runConfiguration.data();
}
Project *RunControl::project() const
{
return m_project.data();
}
ProcessHandle RunControl::applicationProcessHandle() const
{
return m_applicationProcessHandle;