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

Method removeTask

TaskFlow/core/Flow.cpp:56–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void Flow::removeTask(const QString &taskId)
57{
58 QMutexLocker locker(&m_flowMutex);
59
60 BaseTask *task = m_tasks.value(taskId);
61 if (!task) {
62 return;
63 }
64
65 auto it = m_connections.begin();
66 while (it != m_connections.end()) {
67 TaskConnection *connection = *it;
68 if (connection->sourceTask() == task || connection->targetTask() == task) {
69 it = m_connections.erase(it);
70 emit connectionRemoved(connection);
71 delete connection;
72 } else {
73 ++it;
74 }
75 }
76
77 m_tasks.remove(taskId);
78 emit taskRemoved(taskId);
79 delete task;
80}
81
82void Flow::removeTask(BaseTask *task)
83{

Callers

nothing calls this directly

Calls 4

valueMethod · 0.80
sourceTaskMethod · 0.80
targetTaskMethod · 0.80
taskIdMethod · 0.45

Tested by

no test coverage detected