McuSupport: Use new runconfiguration aspect update mechanism

And do not connect to buildConfigurationChanged. It's not needed,
and listens to the wrong BuildConfiguration after the first change.

Change-Id: I9d5dc8593ed5610aaf64e6717a694710a137b344
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2019-11-25 18:25:10 +01:00
parent e5f8d81fc8
commit d0c5577a7b

View File

@@ -70,17 +70,13 @@ FlashAndRunConfiguration::FlashAndRunConfiguration(Target *target, Core::Id id)
effectiveFlashAndRunCall->setLabelText(tr("Effective flash and run call:"));
effectiveFlashAndRunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay);
auto updateConfiguration = [target, effectiveFlashAndRunCall] {
setUpdater([target, effectiveFlashAndRunCall] {
effectiveFlashAndRunCall->setValue(flashAndRunCommand(target).toUserOutput());
};
});
updateConfiguration();
update();
connect(target->activeBuildConfiguration(),
&BuildConfiguration::buildDirectoryChanged,
this,
updateConfiguration);
connect(target->project(), &Project::displayNameChanged, this, updateConfiguration);
connect(target->project(), &Project::displayNameChanged, this, &RunConfiguration::update);
}
class FlashAndRunWorker : public SimpleTargetRunner