summaryrefslogtreecommitdiff
path: root/ticket.cxx
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-05 14:51:36 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-05 14:51:36 +0800
commit232dd5211cd30774274cbbfc971b3489a8bcf200 (patch)
tree6d289eb4b51951922476012fad275ae98e87f6a8 /ticket.cxx
parent697ef5940faa71d96207d532a885d20e7b0494cc (diff)
updated signal is emitted only when the list *is* updated
Diffstat (limited to 'ticket.cxx')
-rw-r--r--ticket.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/ticket.cxx b/ticket.cxx
index 4693225..7b21bc8 100644
--- a/ticket.cxx
+++ b/ticket.cxx
@@ -42,14 +42,14 @@ namespace RTClient {
emit rowCountChanged();
}
- void TicketList::update(rtclient_search_ticket_list* ticketList)
+ void TicketList::update(rtclient_search_ticket_list* list)
{
- if (ticketList) {
- for (size_t i = 0; i < ticketList->length; i++)
- addTicket(Ticket{ticketList->tickets[i]});
- rtclient_search_ticket_free(ticketList);
+ if (list) {
+ for (size_t i = 0; i < list->length; i++)
+ addTicket(Ticket{list->tickets[i]});
+ rtclient_search_ticket_free(list);
+ emit updated();
}
- emit updated();
}
}