#include "workerthreadprivate.h" WorkerThreadPrivate::WorkerThreadPrivate() { } void WorkerThreadPrivate::setupWorkConnection() { connect(this, SIGNAL(scheduleWork()), this, SLOT(processWork()), Qt::QueuedConnection); emit scheduleWork(); } void WorkerThreadPrivate::setWorkType(AbstractWorkType* workType) { work = workType; } void WorkerThreadPrivate::run() { qDebug() << "WorkerThreadPrivate::run() in Thread:" << QThread::currentThreadId(); threadAffinityObject = new DummyThreadAffinityType(); exec(); } void WorkerThreadPrivate::processWork() { qDebug() << "WorkerThreadPrivate::processWork() in Thread:" << QThread::currentThreadId(); if (work != 0) { work->processWork(); } emit scheduleWork(); }