Showing the changes to assignment-client/src/AssignmentClient.cpp (1 of 3 files). Show all
Unified · Split
| @@ -93,13 +93,13 @@ void AssignmentClient::readPendingDatagrams() { · 92 unmodified lines | ||
| 93 | 93 | nodeList->getDomainIP().toString().toStdString().c_str()); |
| 94 | 94 | |
| 95 | 95 | // start the deployed assignment |
| 96 | − QThread *workerThread = new QThread(this); | |
| 96 | + QThread* workerThread = new QThread(this); | |
| 97 | 97 | |
| 98 | 98 | connect(workerThread, SIGNAL(started()), _currentAssignment, SLOT(setup())); |
| 99 | 99 | |
| 100 | 100 | connect(_currentAssignment, SIGNAL(finished()), this, SLOT(assignmentCompleted())); |
| 101 | 101 | connect(_currentAssignment, SIGNAL(finished()), workerThread, SLOT(quit())); |
| 102 | − connect(workerThread, SIGNAL(finished()), _currentAssignment, SLOT(deleteLater())); | |
| 102 | + connect(_currentAssignment, SIGNAL(finished()), _currentAssignment, SLOT(deleteLater())); | |
| 103 | 103 | connect(workerThread, SIGNAL(finished()), workerThread, SLOT(deleteLater())); |
| 104 | 104 | |
| 105 | 105 | _currentAssignment->moveToThread(workerThread); |
| @@ -129,7 +129,6 @@ void AssignmentClient::assignmentCompleted() { · 23 unmodified lines | ||
| 129 | 129 | |
| 130 | 130 | qDebug("Assignment finished or never started - waiting for new assignment\n"); |
| 131 | 131 | |
| 132 | − // the _currentAssignment is being deleted, set our pointer to NULL | |
| 133 | 132 | _currentAssignment = NULL; |
| 134 | 133 | |
| 135 | 134 | NodeList* nodeList = NodeList::getInstance(); |