| 35 | } |
| 36 | |
| 37 | void |
| 38 | CancellableTaskContext::connectAll(void) |
| 39 | { |
| 40 | // Thread start triggers processing |
| 41 | QObject::connect( |
| 42 | this->mThread, |
| 43 | SIGNAL(started()), |
| 44 | this->mTask, |
| 45 | SLOT(onWorkRequested())); |
| 46 | |
| 47 | // And thread quit trigger deleteLater() |
| 48 | QObject::connect( |
| 49 | this->mThread, |
| 50 | SIGNAL(finished()), |
| 51 | this->mThread, |
| 52 | SLOT(deleteLater())); |
| 53 | |
| 54 | // Task is deleted after finalization |
| 55 | QObject::connect( |
| 56 | this->mThread, |
| 57 | SIGNAL(finished()), |
| 58 | this->mTask, |
| 59 | SLOT(deleteLater())); |
| 60 | } |
| 61 | |
| 62 | CancellableTaskContext::~CancellableTaskContext() |
| 63 | { |
no outgoing calls
no test coverage detected