From 8107effd171ffb5285e4e6d79ff9a2b7e4669c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Wed, 2 Feb 2022 11:51:44 +0800 Subject: Conform to updated librtclient commit 12cde42c929b63a1ef1b2ad7f3482336419980b2 --- qrtclient/tickethistory.hxx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'qrtclient/tickethistory.hxx') diff --git a/qrtclient/tickethistory.hxx b/qrtclient/tickethistory.hxx index effe9f1..bfc77ac 100644 --- a/qrtclient/tickethistory.hxx +++ b/qrtclient/tickethistory.hxx @@ -5,8 +5,6 @@ #include #include -struct rtclient_ticket_history_list; - namespace RTClient { class TicketHistory @@ -63,7 +61,6 @@ class TicketHistory class TicketHistoryList : public QAbstractListModel { Q_OBJECT - Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged) public: enum TicketHistoryRoles { @@ -82,8 +79,15 @@ class TicketHistoryList : public QAbstractListModel AttachmentsRole*/ }; - explicit TicketHistoryList(QObject* parent = nullptr) - : QAbstractListModel{parent} {} + TicketHistoryList(QObject* parent = nullptr) + : QAbstractListModel{parent} {} + TicketHistoryList(struct rtclient_ticket_history** list, + QObject* parent = nullptr); + TicketHistoryList(TicketHistoryList const& list) + { + histories = list.histories; + } + ~TicketHistoryList() {} int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE; @@ -91,20 +95,15 @@ class TicketHistoryList : public QAbstractListModel int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; - public slots: - void update(rtclient_ticket_history_list* list); - protected: QHash roleNames() const Q_DECL_OVERRIDE; - signals: - void rowCountChanged(); - void updated(); - private: QList histories; }; } +Q_DECLARE_METATYPE(RTClient::TicketHistoryList) + #endif -- cgit v1.2.3