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

@@ -51,8 +51,7 @@
using namespace ProjectExplorer;
namespace QmlProjectManager {
namespace Internal {
namespace QmlProjectManager::Internal {
static bool isQmlDesigner(const ExtensionSystem::PluginSpec *spec)
{
@@ -90,9 +89,7 @@ class QmlProjectPluginPrivate
{
public:
QmlProjectRunConfigurationFactory runConfigFactory;
RunWorkerFactory runWorkerFactory{RunWorkerFactory::make<SimpleTargetRunner>(),
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
{runConfigFactory.runConfigurationId()}};
SimpleTargetRunnerFactory runWorkerFactory{{runConfigFactory.runConfigurationId()}};
QPointer<QMessageBox> lastMessageBox;
QdsLandingPage *landingPage = nullptr;
QdsLandingPageWidget *landingPageWidget = nullptr;
@@ -457,5 +454,4 @@ Utils::FilePath QmlProjectPlugin::projectFilePath()
return {};
}
} // namespace Internal
} // namespace QmlProjectManager
} // QmlProjectManager::Internal