summaryrefslogtreecommitdiff
path: root/controller.cxx
blob: d1271b913b0d0bcd69e8272f83ccbd46ba0e8b57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "worker.hxx"
#include "controller.hxx"

Controller::Controller()
{
	Worker* worker = new Worker{};
	worker->moveToThread(&thread);
	connect(&thread, &QThread::finished, worker, &QObject::deleteLater);
	thread.start();
}

Controller::~Controller()
{
	thread.quit();
	thread.wait();
}