From e5f8d81fc86460a95a9aaf30aae6b56a7a0f1911 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 25 Nov 2019 17:13:26 +0100 Subject: [PATCH] WebAssembly: Use new runconfiguration aspect update mechanism And some questions. Change-Id: Ibedf4ffaa77390c43b36c53ff80c571a47e7ec29 Reviewed-by: Christian Kandeler --- .../webassembly/webassemblyrunconfiguration.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index 9e0b3185471..2bb8861b714 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -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(), "").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); } };