summaryrefslogtreecommitdiff
path: root/worker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'worker.cxx')
-rw-r--r--worker.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/worker.cxx b/worker.cxx
index d5d3197..e21ef6b 100644
--- a/worker.cxx
+++ b/worker.cxx
@@ -1,3 +1,6 @@
+#ifdef DEBUG
+#include <QDebug>
+#endif // DEBUG
#include "rtclient.h"
#include "worker.hxx"
@@ -19,7 +22,18 @@ void Worker::search(QString const& owner)
QString query{"Owner='"};
query.append(owner);
query.append("'");
- rtclient_search(query.toLatin1().constData());
+ rt_ticketlist *tasks = NULL;
+ rtclient_search(&tasks, query.toLatin1().constData());
+ if (tasks) {
+#ifdef DEBUG
+ for (unsigned short i = 0; i < tasks->length; i++) {
+ auto task = tasks->tickets[i];
+ qDebug() << "Task: " << task;
+ if (task) free(task);
+ }
+#endif // DEBUG
+ free(tasks);
+ }
}
Worker::~Worker()