| 54 | } |
| 55 | |
| 56 | void 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 | |
| 82 | void Flow::removeTask(BaseTask *task) |
| 83 | { |
nothing calls this directly
no test coverage detected