WebAssembly: Use new runconfiguration aspect update mechanism

And some questions.

Change-Id: Ibedf4ffaa77390c43b36c53ff80c571a47e7ec29
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-11-25 17:13:26 +01:00
parent 6cc1519964
commit e5f8d81fc8

View File

@@ -72,20 +72,23 @@ public:
effectiveEmrunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay);
effectiveEmrunCall->setReadOnly(true);
auto updateConfiguration = [target, effectiveEmrunCall, webBrowserAspect] {
setUpdater([target, effectiveEmrunCall, webBrowserAspect] {
effectiveEmrunCall->setValue(emrunCommand(target,
webBrowserAspect->currentBrowser(),
"<port>").toUserOutput());
};
});
updateConfiguration();
update(); // FIXME: Looks spurious
// FIXME: A case for acquaintSiblings?
connect(webBrowserAspect, &WebBrowserSelectionAspect::changed,
this, updateConfiguration);
this, &RunConfiguration::update);
// FIXME: Is wrong after active build config changes, but probably
// not needed anyway.
connect(target->activeBuildConfiguration(), &BuildConfiguration::buildDirectoryChanged,
this, updateConfiguration);
this, &RunConfiguration::update);
connect(target->project(), &Project::displayNameChanged,
this, updateConfiguration);
this, &RunConfiguration::update);
}
};