ProjectExplorer: Introduce and use convenience factory class

... to create SimpleTargetRunner runners for a single run config.

Change-Id: I8af3d7cdcaf54f0584af948aa6e0fa015d1a3077
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-01-06 13:56:00 +01:00
parent c7884a2b17
commit f08b5727dc
8 changed files with 40 additions and 54 deletions

View File

@@ -20,8 +20,7 @@
using namespace ProjectExplorer;
namespace Python {
namespace Internal {
namespace Python::Internal {
static PythonPlugin *m_instance = nullptr;
@@ -33,13 +32,7 @@ public:
PythonRunConfigurationFactory runConfigFactory;
PySideBuildStepFactory buildStepFactory;
PySideBuildConfigurationFactory buildConfigFactory;
RunWorkerFactory runWorkerFactory{
RunWorkerFactory::make<SimpleTargetRunner>(),
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
{runConfigFactory.runConfigurationId()}
};
SimpleTargetRunnerFactory runWorkerFactory{{runConfigFactory.runConfigurationId()}};
PythonSettings settings;
};
@@ -81,5 +74,4 @@ void PythonPlugin::extensionsInitialized()
TaskHub::addCategory(PythonErrorTaskCategory, "Python", true);
}
} // namespace Internal
} // namespace Python
} // Python::Internal