summaryrefslogtreecommitdiff
path: root/tasklist.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tasklist.cxx')
-rw-r--r--tasklist.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/tasklist.cxx b/tasklist.cxx
index 6bc7c4b..fd7e4b5 100644
--- a/tasklist.cxx
+++ b/tasklist.cxx
@@ -1,4 +1,4 @@
-#include "rtticket.h"
+#include "rtclient.h"
#include "tasklist.hxx"
int TaskList::rowCount(QModelIndex const& parent) const
@@ -39,10 +39,7 @@ void TaskList::addTask(Task const& task)
void TaskList::addTasks(rt_ticketlist* taskList)
{
- for (unsigned int i = 0; i < taskList->length; i++) {
- auto task = taskList->tickets[i];
- addTask(Task{task});
- free(task);
- }
- free(taskList);
+ for (unsigned int i = 0; i < taskList->length; i++)
+ addTask(Task{taskList->tickets[i]});
+ rtclient_ticketsfree(taskList);
}