ProjectExplorer: Remove now unused RunWorkerFactory setup functions

Change-Id: Ibac853d2ecaf8e22a64e17d54a1e82121257c655
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-01-20 15:36:17 +01:00
parent 83a86bc4fe
commit d995b650ab
2 changed files with 4 additions and 29 deletions

View File

@@ -74,24 +74,6 @@ RunWorkerFactory::RunWorkerFactory()
g_runWorkerFactories.append(this);
}
RunWorkerFactory::RunWorkerFactory(const WorkerCreator &producer,
const QList<Utils::Id> &runModes,
const QList<Utils::Id> &runConfigs,
const QList<Utils::Id> &deviceTypes)
: m_producer(producer),
m_supportedRunModes(runModes),
m_supportedRunConfigurations(runConfigs),
m_supportedDeviceTypes(deviceTypes)
{
g_runWorkerFactories.append(this);
// Debugging only.
for (Utils::Id runMode : runModes)
g_runModes.insert(runMode);
for (Utils::Id runConfig : runConfigs)
g_runConfigs.insert(runConfig);
}
RunWorkerFactory::~RunWorkerFactory()
{
g_runWorkerFactories.removeOne(this);
@@ -104,16 +86,20 @@ void RunWorkerFactory::setProducer(const WorkerCreator &producer)
void RunWorkerFactory::setSupportedRunConfigs(const QList<Utils::Id> &runConfigs)
{
for (Id runConfig : runConfigs)
g_runConfigs.insert(runConfig); // Debugging only.
m_supportedRunConfigurations = runConfigs;
}
void RunWorkerFactory::addSupportedRunMode(Utils::Id runMode)
{
g_runModes.insert(runMode); // Debugging only.
m_supportedRunModes.append(runMode);
}
void RunWorkerFactory::addSupportedRunConfig(Utils::Id runConfig)
{
g_runConfigs.insert(runConfig); // Debugging only.
m_supportedRunConfigurations.append(runConfig);
}

View File

@@ -114,22 +114,11 @@ public:
using WorkerCreator = std::function<RunWorker *(RunControl *)>;
RunWorkerFactory();
RunWorkerFactory(const WorkerCreator &producer,
const QList<Utils::Id> &runModes,
const QList<Utils::Id> &runConfigs = {},
const QList<Utils::Id> &deviceTypes = {});
~RunWorkerFactory();
bool canRun(Utils::Id runMode, Utils::Id deviceType, const QString &runConfigId) const;
WorkerCreator producer() const { return m_producer; }
template <typename Worker>
static WorkerCreator make()
{
return [](RunControl *runControl) { return new Worker(runControl); };
}
// For debugging only.
static void dumpAll();