summaryrefslogtreecommitdiff
path: root/controller.cxx
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-14 06:51:44 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-14 06:51:44 +0800
commit58be31e2d8098c5ce8b8406a9e96f88dcc0dcf9c (patch)
tree739da8c1662163f6fb3e42d51c3dbcafef8d9ed7 /controller.cxx
parent4ceea1de7eccc623fe33d823ba4446f6323d5248 (diff)
No need for task list to be instantiated as a singleton
Diffstat (limited to 'controller.cxx')
-rw-r--r--controller.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/controller.cxx b/controller.cxx
index 42b1ece..6be4f40 100644
--- a/controller.cxx
+++ b/controller.cxx
@@ -24,7 +24,7 @@ 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);
+ taskList = new TaskList;
engine->rootContext()->setContextProperty("taskList", taskList);
connect(worker, SIGNAL(foundTasks(rt_ticketlist*))
, taskList, SLOT(addTasks(rt_ticketlist*)));
@@ -36,4 +36,5 @@ Controller::~Controller()
{
thread.quit();
thread.wait();
+ delete taskList;
}