RemoteLinux: Fix updating of command line for temporary local install

E.g. in case of CMake projects the command contains the build directory,
so it needs to update whenever the build directory (or build configuration)
changes.

Fixes: QTCREATORBUG-26103
Change-Id: I02ea3bd47f4a502adc485dfffbed6a14ebefb0bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2021-08-17 14:10:52 +02:00
parent cd40514010
commit e54cbc69d8

View File

@@ -103,15 +103,17 @@ MakeInstallStep::MakeInstallStep(BuildStepList *parent, Utils::Id id) : MakeStep
customCommandLineAspect->makeCheckable(StringAspect::CheckBoxPlacement::Top, customCommandLineAspect->makeCheckable(StringAspect::CheckBoxPlacement::Top,
tr("Use custom command line instead:"), tr("Use custom command line instead:"),
"RemoteLinux.MakeInstall.EnableCustomCommandLine"); "RemoteLinux.MakeInstall.EnableCustomCommandLine");
connect(customCommandLineAspect, &StringAspect::checkedChanged, const auto updateCommand = [this] {
this, &MakeInstallStep::updateCommandFromAspect); updateCommandFromAspect();
connect(customCommandLineAspect, &StringAspect::checkedChanged, updateArgsFromAspect();
this, &MakeInstallStep::updateArgsFromAspect); updateFromCustomCommandLineAspect();
connect(customCommandLineAspect, &StringAspect::checkedChanged, };
this, &MakeInstallStep::updateFromCustomCommandLineAspect); connect(customCommandLineAspect, &StringAspect::checkedChanged, this, updateCommand);
connect(customCommandLineAspect, &StringAspect::changed, connect(customCommandLineAspect, &StringAspect::changed,
this, &MakeInstallStep::updateFromCustomCommandLineAspect); this, &MakeInstallStep::updateFromCustomCommandLineAspect);
connect(target(), &Target::buildSystemUpdated, this, updateCommand);
QTemporaryDir tmpDir; QTemporaryDir tmpDir;
installRootAspect->setFilePath(FilePath::fromString(tmpDir.path())); installRootAspect->setFilePath(FilePath::fromString(tmpDir.path()));
const MakeInstallCommand cmd = target()->makeInstallCommand(tmpDir.path()); const MakeInstallCommand cmd = target()->makeInstallCommand(tmpDir.path());