diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 11:43:30 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-02-02 11:43:30 +0800 |
commit | 1109e60984fe411f2f75cceb6e53966286c833aa (patch) | |
tree | 013912a319701d9188f480a81880e3dbaedf4cf3 /ticket.cxx | |
parent | 5b650c5f483ff98cea125606372ef433c53fc2a7 (diff) |
Reindent
Diffstat (limited to 'ticket.cxx')
-rw-r--r-- | ticket.cxx | 53 |
1 files changed, 26 insertions, 27 deletions
@@ -3,36 +3,35 @@ namespace RTClient { - int TicketList::rowCount(QModelIndex const& parent) const - { - Q_UNUSED(parent) - return tickets.count(); - } +int TicketList::rowCount(QModelIndex const& parent) const +{ + Q_UNUSED(parent) + return tickets.count(); +} - QVariant TicketList::data(QModelIndex const& index, int role) const - { - auto row = index.row(); - - if (row < 0 || row >= tickets.count()) return QVariant(); - - auto ticket = tickets[row]; - switch (role) { - case IdRole: - return ticket.id(); - case SubjectRole: - return ticket.subject(); - default: - return QVariant(); - } - } +QVariant TicketList::data(QModelIndex const& index, int role) const +{ + auto row = index.row(); - QHash<int, QByteArray> TicketList::roleNames() const - { - return QHash<int, QByteArray>{ - {IdRole, "id"} - , {SubjectRole, "subject"} - }; + if (row < 0 || row >= tickets.count()) return QVariant(); + + auto ticket = tickets[row]; + switch (role) { + case IdRole: + return ticket.id(); + case SubjectRole: + return ticket.subject(); + default: + return QVariant(); } +} + +QHash<int, QByteArray> TicketList::roleNames() const +{ + return QHash<int, QByteArray>{{IdRole, "id"}, + {SubjectRole, "subject"} + }; +} void TicketList::addTicket(Ticket const& ticket) { |