diff options
m--------- | librtclient | 0 | ||||
-rw-r--r-- | worker.cxx | 16 |
2 files changed, 15 insertions, 1 deletions
diff --git a/librtclient b/librtclient -Subproject a7526494614abd16a8871b665704e2bda05440b +Subproject 2e207d07a6416d7ccb32040c3f9e43c3a48aeed @@ -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() |