forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user