From 9fc5d176c20d28cda8debaa0bd6c043432a2b1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sun, 29 Sep 2019 09:05:31 +0800 Subject: librtclient update --- librtclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librtclient b/librtclient index 0aff874..739bcbb 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 0aff874caec82d8188057d9566e1292678d7a78b +Subproject commit 739bcbbd83115cb8cf3f5b60fd7e73056a0c7293 -- cgit v1.2.3 From 5811ed952f1d4e0887c619d6fafeadd11a11821f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 11:03:22 +0800 Subject: ticketlist is renamed to ticket_list --- client.cxx | 2 +- librtclient | 2 +- qrtclient/client.hxx | 7 ++++--- qrtclient/ticket.hxx | 4 ++-- ticket.cxx | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client.cxx b/client.cxx index fab3195..33c4226 100644 --- a/client.cxx +++ b/client.cxx @@ -115,7 +115,7 @@ namespace RTClient { void Client::ticketSearch(QString const& owner) { QString query{"Owner='" % owner % "'"}; - rtclient_ticketlist* ticketList = nullptr; + rtclient_ticket_list* ticketList = nullptr; rtclient_ticket_search(&ticketList, query.toLatin1().constData()); emit ticketSearched(ticketList); } diff --git a/librtclient b/librtclient index 739bcbb..3ba5669 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 739bcbbd83115cb8cf3f5b60fd7e73056a0c7293 +Subproject commit 3ba566924ebb019b084b3d0714ee51250828c4ce diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index cf7cba9..8876f4c 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -5,7 +5,7 @@ #include struct rtclient_user; -struct rtclient_ticketlist; +struct rtclient_ticket_list; namespace RTClient { @@ -40,7 +40,8 @@ namespace RTClient { , QString const& signature = nullptr , QString const& gecos = nullptr , rtclient_lang lang = RTCLIENT_LANG_NONE - , rtclient_timezone timeZone = RTCLIENT_TIMEZONE_NONE + , rtclient_timezone timeZone + = RTCLIENT_TIMEZONE_NONE , bool disabled = false , bool privileged = false); void userShow(unsigned int id); @@ -65,7 +66,7 @@ namespace RTClient { signals: void loggedIn(QString const& name); void userShown(rtclient_user* user); - void ticketSearched(rtclient_ticketlist* list); + void ticketSearched(rtclient_ticket_list* list); }; } diff --git a/qrtclient/ticket.hxx b/qrtclient/ticket.hxx index 25c067f..5af995a 100644 --- a/qrtclient/ticket.hxx +++ b/qrtclient/ticket.hxx @@ -4,7 +4,7 @@ #include #include -struct rtclient_ticketlist; +struct rtclient_ticket_list; namespace RTClient { @@ -44,7 +44,7 @@ namespace RTClient { ) const Q_DECL_OVERRIDE; public slots: - void update(rtclient_ticketlist* ticketList); + void update(rtclient_ticket_list* ticketList); protected: QHash roleNames() const Q_DECL_OVERRIDE; diff --git a/ticket.cxx b/ticket.cxx index 93eb066..3d00b71 100644 --- a/ticket.cxx +++ b/ticket.cxx @@ -42,7 +42,7 @@ namespace RTClient { emit rowCountChanged(); } - void TicketList::update(rtclient_ticketlist* ticketList) + void TicketList::update(rtclient_ticket_list* ticketList) { if (ticketList) { for (size_t i = 0; i < ticketList->length; i++) -- cgit v1.2.3 From 52c4146d5f228347ddbafdcd977166c89551112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 11:41:49 +0800 Subject: Make ticket new parameter names more consistent --- client.cxx | 16 ++++++++-------- librtclient | 2 +- qrtclient/client.hxx | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client.cxx b/client.cxx index 33c4226..0a1d68f 100644 --- a/client.cxx +++ b/client.cxx @@ -85,13 +85,13 @@ namespace RTClient { , QString const& requestor , QString const& subject , QString const& cc - , QString const& admincc + , QString const& adminCc , QString const& owner , QString const& status , QString const& priority - , QString const& initialpriority - , QString const& finalpriority - , QString const& timeestimated + , QString const& initialPriority + , QString const& finalPriority + , QString const& timeEstimated , QString const& starts , QString const& due , QString const& text) @@ -100,13 +100,13 @@ namespace RTClient { , requestor.toLatin1().constData() , subject.toLatin1().constData() , cc.toLatin1().constData() - , admincc.toLatin1().constData() + , adminCc.toLatin1().constData() , owner.toLatin1().constData() , status.toLatin1().constData() , priority.toLatin1().constData() - , initialpriority.toLatin1().constData() - , finalpriority.toLatin1().constData() - , timeestimated.toLatin1().constData() + , initialPriority.toLatin1().constData() + , finalPriority.toLatin1().constData() + , timeEstimated.toLatin1().constData() , starts.toLatin1().constData() , due.toLatin1().constData() , text.toLatin1().constData()); diff --git a/librtclient b/librtclient index 3ba5669..dfa12d6 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 3ba566924ebb019b084b3d0714ee51250828c4ce +Subproject commit dfa12d6b50e7af934095448daee8b99e2855afdd diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index 8876f4c..1f6b3fe 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -50,13 +50,13 @@ namespace RTClient { , QString const& requestor = nullptr , QString const& subject = nullptr , QString const& cc = nullptr - , QString const& admincc = nullptr + , QString const& adminCc = nullptr , QString const& owner = nullptr , QString const& status = nullptr , QString const& priority = nullptr - , QString const& initialpriority = nullptr - , QString const& finalpriority = nullptr - , QString const& timeestimated = nullptr + , QString const& initialPriority = nullptr + , QString const& finalPriority = nullptr + , QString const& timeEstimated = nullptr , QString const& starts = nullptr , QString const& due = nullptr , QString const& text = nullptr); -- cgit v1.2.3 From 8df77978203d33015c3a01fec1f4725add079919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 11:55:19 +0800 Subject: User namespace is given to lang and timezone --- client.cxx | 4 ++-- librtclient | 2 +- qrtclient/client.hxx | 7 ++++--- qrtclient/user.hxx | 20 ++++++++++---------- user.cxx | 8 ++++---- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/client.cxx b/client.cxx index 0a1d68f..2a8d3fc 100644 --- a/client.cxx +++ b/client.cxx @@ -36,8 +36,8 @@ namespace RTClient { , QString const& comments , QString const& signature , QString const& gecos - , rtclient_lang lang - , rtclient_timezone timeZone + , rtclient_user_lang lang + , rtclient_user_timezone timeZone , bool disabled , bool privileged) { diff --git a/librtclient b/librtclient index dfa12d6..0d42b38 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit dfa12d6b50e7af934095448daee8b99e2855afdd +Subproject commit 0d42b3819bd7830061a9f0a3d2ac9cc473811f6f diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index 1f6b3fe..408e174 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -39,9 +39,10 @@ namespace RTClient { , QString const& comments = nullptr , QString const& signature = nullptr , QString const& gecos = nullptr - , rtclient_lang lang = RTCLIENT_LANG_NONE - , rtclient_timezone timeZone - = RTCLIENT_TIMEZONE_NONE + , rtclient_user_lang lang + = RTCLIENT_USER_LANG_NONE + , rtclient_user_timezone timeZone + = RTCLIENT_USER_TIMEZONE_NONE , bool disabled = false , bool privileged = false); void userShow(unsigned int id); diff --git a/qrtclient/user.hxx b/qrtclient/user.hxx index 5b692a6..39287a1 100644 --- a/qrtclient/user.hxx +++ b/qrtclient/user.hxx @@ -32,8 +32,8 @@ namespace RTClient { Q_PROPERTY(QString comments READ comments WRITE setComments NOTIFY commentsChanged) Q_PROPERTY(QString signature READ signature WRITE setSignature NOTIFY signatureChanged) Q_PROPERTY(QString gecos READ gecos WRITE setGecos NOTIFY gecosChanged) - Q_PROPERTY(rtclient_lang lang READ lang WRITE setLang NOTIFY langChanged) - Q_PROPERTY(rtclient_timezone timeZone READ timeZone WRITE setTimeZone NOTIFY timeZoneChanged) + Q_PROPERTY(rtclient_user_lang lang READ lang WRITE setLang NOTIFY langChanged) + Q_PROPERTY(rtclient_user_timezone timeZone READ timeZone WRITE setTimeZone NOTIFY timeZoneChanged) Q_PROPERTY(bool privileged READ privileged WRITE setPrivileged NOTIFY privilegedChanged) Q_PROPERTY(bool disabled READ disabled WRITE setDisabled NOTIFY disabledChanged) @@ -61,8 +61,8 @@ namespace RTClient { , m_comments{""} , m_signature{""} , m_gecos{""} - , m_lang{RTCLIENT_LANG_NONE} - , m_timeZone{RTCLIENT_TIMEZONE_NONE} + , m_lang{RTCLIENT_USER_LANG_NONE} + , m_timeZone{RTCLIENT_USER_TIMEZONE_NONE} , m_privileged{false} , m_disabled{true} {} @@ -89,8 +89,8 @@ namespace RTClient { QString const& comments() const { return m_comments; } QString const& signature() const { return m_signature; } QString const& gecos() const { return m_gecos; } - rtclient_lang lang() const { return m_lang; } - rtclient_timezone timeZone() const { return m_timeZone; } + rtclient_user_lang lang() const { return m_lang; } + rtclient_user_timezone timeZone() const { return m_timeZone; } bool privileged() const { return m_privileged; } bool disabled() const { return m_disabled; } @@ -115,8 +115,8 @@ namespace RTClient { void setComments(QString const& comments); void setSignature(QString const& signature); void setGecos(QString const& gecos); - void setLang(rtclient_lang lang); - void setTimeZone(rtclient_timezone timeZone); + void setLang(rtclient_user_lang lang); + void setTimeZone(rtclient_user_timezone timeZone); void setPrivileged(bool privileged); void setDisabled(bool disabled); @@ -172,8 +172,8 @@ namespace RTClient { QString m_comments; QString m_signature; QString m_gecos; - rtclient_lang m_lang; - rtclient_timezone m_timeZone; + rtclient_user_lang m_lang; + rtclient_user_timezone m_timeZone; bool m_privileged; bool m_disabled; }; diff --git a/user.cxx b/user.cxx index 1a50046..872b863 100644 --- a/user.cxx +++ b/user.cxx @@ -172,7 +172,7 @@ namespace RTClient { } } - void User::setLang(rtclient_lang lang) + void User::setLang(rtclient_user_lang lang) { if (m_lang != lang) { m_lang = lang; @@ -180,7 +180,7 @@ namespace RTClient { } } - void User::setTimeZone(rtclient_timezone timeZone) + void User::setTimeZone(rtclient_user_timezone timeZone) { if (m_timeZone != timeZone) { m_timeZone = timeZone; @@ -310,8 +310,8 @@ namespace RTClient { m_comments = ""; m_signature = ""; m_gecos = ""; - m_lang = RTCLIENT_LANG_NONE; - m_timeZone = RTCLIENT_TIMEZONE_NONE; + m_lang = RTCLIENT_USER_LANG_NONE; + m_timeZone = RTCLIENT_USER_TIMEZONE_NONE; m_privileged = false; m_disabled = true; } -- cgit v1.2.3 From eba11889c757985b164c82da4d4b9b1a850c4c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 11:59:42 +0800 Subject: Rename timeZone to timezone --- client.cxx | 4 ++-- qrtclient/client.hxx | 2 +- qrtclient/user.hxx | 12 ++++++------ user.cxx | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client.cxx b/client.cxx index 2a8d3fc..16b1a09 100644 --- a/client.cxx +++ b/client.cxx @@ -37,7 +37,7 @@ namespace RTClient { , QString const& signature , QString const& gecos , rtclient_user_lang lang - , rtclient_user_timezone timeZone + , rtclient_user_timezone timezone , bool disabled , bool privileged) { @@ -62,7 +62,7 @@ namespace RTClient { , signature.toLatin1().constData() , gecos.toLatin1().constData() , lang - , timeZone + , timezone , disabled , privileged); } diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index 408e174..e29d273 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -41,7 +41,7 @@ namespace RTClient { , QString const& gecos = nullptr , rtclient_user_lang lang = RTCLIENT_USER_LANG_NONE - , rtclient_user_timezone timeZone + , rtclient_user_timezone timezone = RTCLIENT_USER_TIMEZONE_NONE , bool disabled = false , bool privileged = false); diff --git a/qrtclient/user.hxx b/qrtclient/user.hxx index 39287a1..e4a1c45 100644 --- a/qrtclient/user.hxx +++ b/qrtclient/user.hxx @@ -33,7 +33,7 @@ namespace RTClient { Q_PROPERTY(QString signature READ signature WRITE setSignature NOTIFY signatureChanged) Q_PROPERTY(QString gecos READ gecos WRITE setGecos NOTIFY gecosChanged) Q_PROPERTY(rtclient_user_lang lang READ lang WRITE setLang NOTIFY langChanged) - Q_PROPERTY(rtclient_user_timezone timeZone READ timeZone WRITE setTimeZone NOTIFY timeZoneChanged) + Q_PROPERTY(rtclient_user_timezone timezone READ timezone WRITE setTimeZone NOTIFY timezoneChanged) Q_PROPERTY(bool privileged READ privileged WRITE setPrivileged NOTIFY privilegedChanged) Q_PROPERTY(bool disabled READ disabled WRITE setDisabled NOTIFY disabledChanged) @@ -62,7 +62,7 @@ namespace RTClient { , m_signature{""} , m_gecos{""} , m_lang{RTCLIENT_USER_LANG_NONE} - , m_timeZone{RTCLIENT_USER_TIMEZONE_NONE} + , m_timezone{RTCLIENT_USER_TIMEZONE_NONE} , m_privileged{false} , m_disabled{true} {} @@ -90,7 +90,7 @@ namespace RTClient { QString const& signature() const { return m_signature; } QString const& gecos() const { return m_gecos; } rtclient_user_lang lang() const { return m_lang; } - rtclient_user_timezone timeZone() const { return m_timeZone; } + rtclient_user_timezone timezone() const { return m_timezone; } bool privileged() const { return m_privileged; } bool disabled() const { return m_disabled; } @@ -116,7 +116,7 @@ namespace RTClient { void setSignature(QString const& signature); void setGecos(QString const& gecos); void setLang(rtclient_user_lang lang); - void setTimeZone(rtclient_user_timezone timeZone); + void setTimeZone(rtclient_user_timezone timezone); void setPrivileged(bool privileged); void setDisabled(bool disabled); @@ -146,7 +146,7 @@ namespace RTClient { void signatureChanged(); void gecosChanged(); void langChanged(); - void timeZoneChanged(); + void timezoneChanged(); void privilegedChanged(); void disabledChanged(); @@ -173,7 +173,7 @@ namespace RTClient { QString m_signature; QString m_gecos; rtclient_user_lang m_lang; - rtclient_user_timezone m_timeZone; + rtclient_user_timezone m_timezone; bool m_privileged; bool m_disabled; }; diff --git a/user.cxx b/user.cxx index 872b863..906a36d 100644 --- a/user.cxx +++ b/user.cxx @@ -180,11 +180,11 @@ namespace RTClient { } } - void User::setTimeZone(rtclient_user_timezone timeZone) + void User::setTimeZone(rtclient_user_timezone timezone) { - if (m_timeZone != timeZone) { - m_timeZone = timeZone; - emit timeZoneChanged(); + if (m_timezone != timezone) { + m_timezone = timezone; + emit timezoneChanged(); } } @@ -272,8 +272,8 @@ namespace RTClient { emit gecosChanged(); } if (user->timezone) { - m_timeZone = user->timezone; - emit timeZoneChanged(); + m_timezone = user->timezone; + emit timezoneChanged(); } if (user->lang) { m_lang = user->lang; @@ -311,7 +311,7 @@ namespace RTClient { m_signature = ""; m_gecos = ""; m_lang = RTCLIENT_USER_LANG_NONE; - m_timeZone = RTCLIENT_USER_TIMEZONE_NONE; + m_timezone = RTCLIENT_USER_TIMEZONE_NONE; m_privileged = false; m_disabled = true; } -- cgit v1.2.3 From f3d5e7754d0be9bd0f076ad26a57dd7c93e0d064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 12:09:59 +0800 Subject: Make user member names more consistent --- librtclient | 2 +- user.cxx | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/librtclient b/librtclient index 0d42b38..806ee61 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 0d42b3819bd7830061a9f0a3d2ac9cc473811f6f +Subproject commit 806ee6152735a38da0dbde949a5f7947d8931db5 diff --git a/user.cxx b/user.cxx index 906a36d..2f031e8 100644 --- a/user.cxx +++ b/user.cxx @@ -211,16 +211,16 @@ namespace RTClient { m_id = user->id; emit idChanged(); } - if (user->emailaddress) { - m_emailAddress = user->emailaddress; + if (user->email_address) { + m_emailAddress = user->email_address; emit emailAddressChanged(); } - if (user->realname) { - m_realName = user->realname; + if (user->real_name) { + m_realName = user->real_name; emit realNameChanged(); } - if (user->nickname) { - m_nickName = user->nickname; + if (user->nick_name) { + m_nickName = user->nick_name; emit nickNameChanged(); } if (user->organization) { @@ -251,20 +251,20 @@ namespace RTClient { m_country = user->country; emit countryChanged(); } - if (user->homephone) { - m_homePhone = user->homephone; + if (user->home_phone) { + m_homePhone = user->home_phone; emit homePhoneChanged(); } - if (user->workphone) { - m_workPhone = user->workphone; + if (user->work_phone) { + m_workPhone = user->work_phone; emit workPhoneChanged(); } - if (user->mobilephone) { - m_mobilePhone = user->mobilephone; + if (user->mobile_phone) { + m_mobilePhone = user->mobile_phone; emit mobilePhoneChanged(); } - if (user->pagerphone) { - m_pagerPhone = user->pagerphone; + if (user->pager_phone) { + m_pagerPhone = user->pager_phone; emit pagerPhoneChanged(); } if (user->gecos) { -- cgit v1.2.3 From 36acad91cc9d9ba4eb00b6361b68cdbae2f5d932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 12:32:11 +0800 Subject: ticket_search is changed to search_ticket --- client.cxx | 5 +++-- librtclient | 2 +- qrtclient/client.hxx | 4 ++-- qrtclient/ticket.hxx | 5 +++-- ticket.cxx | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/client.cxx b/client.cxx index 16b1a09..e972126 100644 --- a/client.cxx +++ b/client.cxx @@ -1,6 +1,7 @@ #include #include #include +#include #include "qrtclient/client.hxx" namespace RTClient { @@ -115,8 +116,8 @@ namespace RTClient { void Client::ticketSearch(QString const& owner) { QString query{"Owner='" % owner % "'"}; - rtclient_ticket_list* ticketList = nullptr; - rtclient_ticket_search(&ticketList, query.toLatin1().constData()); + rtclient_search_ticket_list* ticketList = nullptr; + rtclient_search_ticket(&ticketList, query.toLatin1().constData()); emit ticketSearched(ticketList); } diff --git a/librtclient b/librtclient index 806ee61..0588263 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 806ee6152735a38da0dbde949a5f7947d8931db5 +Subproject commit 0588263c5283c85cd4751c2251f3eb7881d7f87f diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index e29d273..99ded5e 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -5,7 +5,7 @@ #include struct rtclient_user; -struct rtclient_ticket_list; +struct rtclient_search_ticket_list; namespace RTClient { @@ -67,7 +67,7 @@ namespace RTClient { signals: void loggedIn(QString const& name); void userShown(rtclient_user* user); - void ticketSearched(rtclient_ticket_list* list); + void ticketSearched(rtclient_search_ticket_list* list); }; } diff --git a/qrtclient/ticket.hxx b/qrtclient/ticket.hxx index 5af995a..d02954b 100644 --- a/qrtclient/ticket.hxx +++ b/qrtclient/ticket.hxx @@ -3,8 +3,9 @@ #include #include +#include -struct rtclient_ticket_list; +struct rtclient_search_ticket_list; namespace RTClient { @@ -44,7 +45,7 @@ namespace RTClient { ) const Q_DECL_OVERRIDE; public slots: - void update(rtclient_ticket_list* ticketList); + void update(rtclient_search_ticket_list* ticketList); protected: QHash roleNames() const Q_DECL_OVERRIDE; diff --git a/ticket.cxx b/ticket.cxx index 3d00b71..4693225 100644 --- a/ticket.cxx +++ b/ticket.cxx @@ -42,12 +42,12 @@ namespace RTClient { emit rowCountChanged(); } - void TicketList::update(rtclient_ticket_list* ticketList) + void TicketList::update(rtclient_search_ticket_list* ticketList) { if (ticketList) { for (size_t i = 0; i < ticketList->length; i++) addTicket(Ticket{ticketList->tickets[i]}); - rtclient_ticket_freelist(ticketList); + rtclient_search_ticket_free(ticketList); } emit updated(); } -- cgit v1.2.3 From cb249baa8d8dcc54dd575f82d5cb3134957c71b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 17:20:39 +0800 Subject: Pass the history list struct --- client.cxx | 3 ++- librtclient | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client.cxx b/client.cxx index e972126..15d573f 100644 --- a/client.cxx +++ b/client.cxx @@ -123,7 +123,8 @@ namespace RTClient { void Client::ticketHistory(int id) { - rtclient_ticket_history(id); + rtclient_ticket_history_list* historyList = nullptr; + rtclient_ticket_history(&historyList, id); } Client::~Client() diff --git a/librtclient b/librtclient index 0588263..ad1be67 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit 0588263c5283c85cd4751c2251f3eb7881d7f87f +Subproject commit ad1be67d05d65664c22099ada17351a78e1fd27b -- cgit v1.2.3 From 3046c72a604df00cf54982a0985b3a70bdd6d994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 18:03:18 +0800 Subject: Adjust search ticket term --- client.cxx | 4 ++-- qrtclient/client.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.cxx b/client.cxx index 15d573f..1dba383 100644 --- a/client.cxx +++ b/client.cxx @@ -113,12 +113,12 @@ namespace RTClient { , text.toLatin1().constData()); } - void Client::ticketSearch(QString const& owner) + void Client::searchTicket(QString const& owner) { QString query{"Owner='" % owner % "'"}; rtclient_search_ticket_list* ticketList = nullptr; rtclient_search_ticket(&ticketList, query.toLatin1().constData()); - emit ticketSearched(ticketList); + emit searchedTicket(ticketList); } void Client::ticketHistory(int id) diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index 99ded5e..809a508 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -61,13 +61,13 @@ namespace RTClient { , QString const& starts = nullptr , QString const& due = nullptr , QString const& text = nullptr); - void ticketSearch(QString const& owner); + void searchTicket(QString const& owner); void ticketHistory(int id); signals: void loggedIn(QString const& name); void userShown(rtclient_user* user); - void ticketSearched(rtclient_search_ticket_list* list); + void searchedTicket(rtclient_search_ticket_list* list); }; } -- cgit v1.2.3 From bd0e74d11e666126c97c34c5b508dbe811b128c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 30 Sep 2019 19:16:09 +0800 Subject: gotTicketHistory signal --- client.cxx | 1 + librtclient | 2 +- qrtclient/client.hxx | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client.cxx b/client.cxx index 1dba383..b91c10b 100644 --- a/client.cxx +++ b/client.cxx @@ -125,6 +125,7 @@ namespace RTClient { { rtclient_ticket_history_list* historyList = nullptr; rtclient_ticket_history(&historyList, id); + emit gotTicketHistory(historyList); } Client::~Client() diff --git a/librtclient b/librtclient index ad1be67..494a461 160000 --- a/librtclient +++ b/librtclient @@ -1 +1 @@ -Subproject commit ad1be67d05d65664c22099ada17351a78e1fd27b +Subproject commit 494a46196ade016b606716b36045f6b08a3234bc diff --git a/qrtclient/client.hxx b/qrtclient/client.hxx index 809a508..b672620 100644 --- a/qrtclient/client.hxx +++ b/qrtclient/client.hxx @@ -6,6 +6,7 @@ struct rtclient_user; struct rtclient_search_ticket_list; +struct rtclient_ticket_history_list; namespace RTClient { @@ -68,6 +69,7 @@ namespace RTClient { void loggedIn(QString const& name); void userShown(rtclient_user* user); void searchedTicket(rtclient_search_ticket_list* list); + void gotTicketHistory(rtclient_ticket_history_list* list); }; } -- cgit v1.2.3