diff options
Diffstat (limited to 'controller.cxx')
-rw-r--r-- | controller.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/controller.cxx b/controller.cxx index b9bdf5e..42b1ece 100644 --- a/controller.cxx +++ b/controller.cxx @@ -1,6 +1,8 @@ #include <QQmlApplicationEngine> +#include <QtQml> #include "worker.hxx" #include "user.hxx" +#include "tasklist.hxx" #include "controller.hxx" Controller::Controller(QObject* parent) : QObject{parent} @@ -22,6 +24,11 @@ Controller::Controller(QObject* parent) : QObject{parent} auto user = engine->singletonInstance<User*>(User::typeId); connect(worker, SIGNAL(logged(rt_user*)), user, SLOT(update(rt_user*))); + auto taskList = engine->singletonInstance<TaskList*>(TaskList::typeId); + engine->rootContext()->setContextProperty("taskList", taskList); + connect(worker, SIGNAL(foundTasks(rt_ticketlist*)) + , taskList, SLOT(addTasks(rt_ticketlist*))); + thread.start(); } |