WebAssembly: use a dedicated class to create EmrunRunWorker

Change-Id: Idbeece82d8b59f02148207b0459a76aae162bb51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-06 14:32:11 +01:00
parent 57adf73a89
commit 82c1a3a934
4 changed files with 22 additions and 27 deletions

View File

@@ -11,14 +11,14 @@
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runcontrol.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
using namespace Utils;
namespace WebAssembly {
namespace Internal {
namespace WebAssembly::Internal {
static FilePath pythonInterpreter(const Environment &env)
{
@@ -111,11 +111,6 @@ public:
}
};
RunWorkerFactory::WorkerCreator makeEmrunWorker()
{
return RunWorkerFactory::make<EmrunRunWorker>();
}
// Factories
EmrunRunConfigurationFactory::EmrunRunConfigurationFactory()
@@ -124,5 +119,11 @@ EmrunRunConfigurationFactory::EmrunRunConfigurationFactory()
addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE);
}
} // namespace Internal
} // namespace Webassembly
EmrunRunWorkerFactory::EmrunRunWorkerFactory()
{
setProduct<EmrunRunWorker>();
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
addSupportedRunConfig(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
}
} // Webassembly::Internal