diff options
Diffstat (limited to 'controller.cxx')
-rw-r--r-- | controller.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/controller.cxx b/controller.cxx index 015d4ac..4e518f4 100644 --- a/controller.cxx +++ b/controller.cxx @@ -1,20 +1,17 @@ #include "worker.hxx" #include "controller.hxx" -Controller::Controller() +Controller::Controller(QObject* parent) : + QObject{parent} { Worker* worker = new Worker{}; worker->moveToThread(&thread); connect(&thread, &QThread::finished, worker, &QObject::deleteLater); - connect(this, &Controller::credentialsObtained, worker, &Worker::logIn); + connect(parent, SIGNAL(logIn(QString, QString)), + worker, SLOT(logIn(QString, QString))); thread.start(); } -void Controller::logIn(QString const& name, QString const& password) -{ - emit credentialsObtained(name, password); -} - Controller::~Controller() { thread.quit(); |