diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-05 14:51:36 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-05 14:51:36 +0800 |
commit | 232dd5211cd30774274cbbfc971b3489a8bcf200 (patch) | |
tree | 6d289eb4b51951922476012fad275ae98e87f6a8 /ticket.cxx | |
parent | 697ef5940faa71d96207d532a885d20e7b0494cc (diff) |
updated signal is emitted only when the list *is* updated
Diffstat (limited to 'ticket.cxx')
-rw-r--r-- | ticket.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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(); } } |