diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-05 21:21:52 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-05 21:21:52 +0800 |
commit | 89bff3fa5d58aeb0d507d633aa058d781f06a8c0 (patch) | |
tree | a3b23ad8052601e75b1c7e317d6b469c745b36a8 /controller.cxx | |
parent | 3df0c7543d9b1a63af736acc490a27f18ef6de7a (diff) |
Connected a more straightforward signal to login
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(); |