blob: 4e518f4e78d69128fdf4aea82269665afb566d3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "worker.hxx"
#include "controller.hxx"
Controller::Controller(QObject* parent) :
QObject{parent}
{
Worker* worker = new Worker{};
worker->moveToThread(&thread);
connect(&thread, &QThread::finished, worker, &QObject::deleteLater);
connect(parent, SIGNAL(logIn(QString, QString)),
worker, SLOT(logIn(QString, QString)));
thread.start();
}
Controller::~Controller()
{
thread.quit();
thread.wait();
}
|