MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / createTask

Method createTask

TaskFlow/core/TaskRegistry.cpp:17–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{}
16
17BaseTask *TaskRegistry::createTask(const QString &taskType, QObject *parent) const
18{
19 LOG_MESSAGE(QString("Trying to create task: %1").arg(taskType));
20
21 if (m_creators.contains(taskType)) {
22 LOG_MESSAGE(QString("Found creator for task type: %1").arg(taskType));
23 try {
24 BaseTask *task = m_creators[taskType](parent);
25 if (task) {
26 LOG_MESSAGE(QString("Successfully created task: %1").arg(taskType));
27 return task;
28 }
29 } catch (...) {
30 LOG_MESSAGE(QString("Exception while creating task of type: %1").arg(taskType));
31 }
32 } else {
33 LOG_MESSAGE(QString("No creator found for task type: %1").arg(taskType));
34 }
35
36 return nullptr;
37}
38
39QStringList TaskRegistry::getAvailableTypes() const
40{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected