WebAssembly: React to AspectContainer::applied

... instead of overriding IOptionsPage::apply()

Change-Id: I00d30de7d604409be753eb8b9f668c24790e0a49
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2023-05-19 12:03:38 +02:00
parent 5ac582a9b6
commit b1957888dd
2 changed files with 2 additions and 7 deletions

View File

@@ -64,6 +64,8 @@ WebAssemblySettings::WebAssemblySettings()
emSdk.setExpectedKind(Utils::PathChooser::ExistingDirectory); emSdk.setExpectedKind(Utils::PathChooser::ExistingDirectory);
emSdk.setDefaultFilePath(FileUtils::homePath()); emSdk.setDefaultFilePath(FileUtils::homePath());
connect(this, &Utils::AspectContainer::applied, &WebAssemblyToolChain::registerToolChains);
setLayouter([this](QWidget *widget) { setLayouter([this](QWidget *widget) {
auto instruction = new QLabel( auto instruction = new QLabel(
Tr::tr("Select the root directory of an installed %1. " Tr::tr("Select the root directory of an installed %1. "
@@ -122,12 +124,6 @@ WebAssemblySettings::WebAssemblySettings()
readSettings(); readSettings();
} }
void WebAssemblySettings::apply()
{
WebAssemblyToolChain::registerToolChains();
Core::IOptionsPage::apply();
}
void WebAssemblySettings::updateStatus() void WebAssemblySettings::updateStatus()
{ {
WebAssemblyEmSdk::clearCaches(); WebAssemblyEmSdk::clearCaches();

View File

@@ -18,7 +18,6 @@ public:
WebAssemblySettings(); WebAssemblySettings();
static WebAssemblySettings *instance(); static WebAssemblySettings *instance();
void apply() final;
Utils::FilePathAspect emSdk; Utils::FilePathAspect emSdk;