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/ticket.hxx | 17 ++++++++--------- qrtclient/tickethistory.hxx | 23 +++++++++++------------ qrtclient/user.hxx | 4 ---- 3 files changed, 19 insertions(+), 25 deletions(-) (limited to 'qrtclient') diff --git a/qrtclient/ticket.hxx b/qrtclient/ticket.hxx index 080a296..6e3d0eb 100644 --- a/qrtclient/ticket.hxx +++ b/qrtclient/ticket.hxx @@ -3,9 +3,6 @@ #include #include -#include - -struct rtclient_search_ticket_list; namespace RTClient { @@ -34,8 +31,12 @@ class TicketList : public QAbstractListModel SubjectRole }; - explicit TicketList(QObject* parent = nullptr) - : QAbstractListModel{parent} {} + TicketList(QObject* parent = nullptr) + : QAbstractListModel{parent} {} + TicketList(struct rtclient_ticket** list, + QObject* parent = nullptr); + TicketList(TicketList const& list) { tickets = list.tickets; } + ~TicketList() {} int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE; @@ -46,14 +47,12 @@ class TicketList : public QAbstractListModel protected: QHash roleNames() const Q_DECL_OVERRIDE; - signals: - void updated(); - void rowCountChanged(); - private: QList tickets; }; } +Q_DECLARE_METATYPE(RTClient::TicketList) + #endif 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 diff --git a/qrtclient/user.hxx b/qrtclient/user.hxx index d258820..d76b8e4 100644 --- a/qrtclient/user.hxx +++ b/qrtclient/user.hxx @@ -4,8 +4,6 @@ #include #include -struct rtclient_user; - namespace RTClient { class User : public QObject @@ -121,8 +119,6 @@ class User : public QObject void setTimeZone(rtclient_user_timezone timezone); void setPrivileged(bool privileged); void setDisabled(bool disabled); - public slots: - void update(rtclient_user* user); signals: void idChanged(); -- cgit v1.2.3