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

@@ -27,8 +27,7 @@ using namespace Core;
using namespace ProjectExplorer;
using namespace Utils;
namespace MesonProjectManager {
namespace Internal {
namespace MesonProjectManager::Internal {
class MesonProjectPluginPrivate : public QObject
{
@@ -56,10 +55,8 @@ private:
MesonRunConfigurationFactory m_runConfigurationFactory;
MesonActionsManager m_actions;
MachineFileManager m_machineFilesManager;
RunWorkerFactory
m_mesonRunWorkerFactory{RunWorkerFactory::make<ProjectExplorer::SimpleTargetRunner>(),
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
{m_runConfigurationFactory.runConfigurationId()}};
SimpleTargetRunnerFactory m_mesonRunWorkerFactory{{m_runConfigurationFactory.runConfigurationId()}};
void saveAll()
{
m_toolsSettings.saveMesonTools(MesonTools::tools(), ICore::dialogParent());
@@ -85,7 +82,6 @@ bool MesonProjectPlugin::initialize(const QStringList & /*arguments*/, QString *
return true;
}
} // namespace Internal
} // namespace MesonProjectManager
} // MesonProjectManager::Internal
#include "mesonprojectplugin.moc"