From 4212c19b7f096239278e102b6a0b3e03e27e9102 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: Sat, 11 Jul 2020 11:49:00 +0800 Subject: order function moved to ord namespace --- basket.cxx | 2 +- client.cxx | 3 ++- libicclient | 2 +- qicclient/basket.hxx | 8 +++----- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/basket.cxx b/basket.cxx index ed8d78f..ffbecf4 100644 --- a/basket.cxx +++ b/basket.cxx @@ -61,7 +61,7 @@ namespace QICClient { emit rowCountChanged(); } - void Basket::setData(icclient_ord_order* order) + void Basket::setData(struct icclient_ord_order* order) { if (order) { this->m_data = order; diff --git a/client.cxx b/client.cxx index 1279818..3b406ad 100644 --- a/client.cxx +++ b/client.cxx @@ -45,7 +45,8 @@ namespace QICClient { void Client::order(QString const& sku, Catalog const& catalog, Basket& order) { auto c_order = order.data(); - icclient_order(sku.toLatin1().constData(), catalog.constData(), &c_order); + icclient_ord_order(sku.toLatin1().constData(), catalog.constData(), + &c_order); order.setData(c_order); } diff --git a/libicclient b/libicclient index 1a1f3c0..c0fba9d 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 1a1f3c047d36dd59958d3dba6e4fa690d2178fec +Subproject commit c0fba9db9290fb30884b9c4f8d847212164e3b50 diff --git a/qicclient/basket.hxx b/qicclient/basket.hxx index 9e0d4f1..8930821 100644 --- a/qicclient/basket.hxx +++ b/qicclient/basket.hxx @@ -5,8 +5,6 @@ #include #include "product.hxx" -struct icclient_ord_order; - namespace QICClient { struct Item @@ -52,8 +50,8 @@ namespace QICClient { int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; - icclient_ord_order* data() { return m_data; } - void setData(icclient_ord_order* order); + struct icclient_ord_order* data() { return m_data; } + void setData(struct icclient_ord_order* order); double subtotal() const { return m_subtotal; } double shipping() const { return m_shipping; } double totalCost() const { return m_totalCost; } @@ -70,7 +68,7 @@ namespace QICClient { private: void addItem(Item const& item); QList items; - icclient_ord_order* m_data; + struct icclient_ord_order* m_data; double m_subtotal; double m_shipping; double m_totalCost; -- cgit v1.2.3