#include "workerthread.h" WorkerThread::WorkerThread() { workerThread = new WorkerThreadPrivate(); connect(workerThread, SIGNAL(started()), this, SLOT(threadStarted())); } void WorkerThread::startThread(AbstractWorkType* workType) { workerThread->setWorkType(workType); workerThread->start(); } void WorkerThread::threadStarted() { workerThread->moveToThread( workerThread->getThreadAffinityObject()->thread()); workerThread->setupWorkConnection(); emit ready(); }