From 3ee30003e4ba237575c23ba9f585c9ca40d003e5 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, 14 Jun 2020 17:03:51 +0800 Subject: Add weight member to product struct --- catalog.cxx | 3 +++ libicclient | 2 +- qicclient/product.hxx | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/catalog.cxx b/catalog.cxx index 5180b23..8f73565 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -29,6 +29,8 @@ namespace ICClient { return product.image; case Product::PriceRole: return product.price; + case Product::WeightRole: + return product.weight; case Product::AuthorRole: return product.author; default: @@ -44,6 +46,7 @@ namespace ICClient { , {Product::CommentRole, "comment"} , {Product::ImageRole, "image"} , {Product::PriceRole, "price"} + , {Product::WeightRole, "weight"} , {Product::AuthorRole, "author"} }; } diff --git a/libicclient b/libicclient index b81dde0..6622502 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit b81dde02f6d31b559331f813102fd2d24d9efb85 +Subproject commit 66225020d3ef1e3825adfc9d4f9e38420f68546c diff --git a/qicclient/product.hxx b/qicclient/product.hxx index 7ab2f99..97b13b2 100644 --- a/qicclient/product.hxx +++ b/qicclient/product.hxx @@ -13,12 +13,14 @@ namespace ICClient { CommentRole, ImageRole, PriceRole, + WeightRole, AuthorRole }; Product(icclient_product* product) : sku{product->sku}, - price{product->price} + price{product->price}, + weight{product->weight} { if (product->description) description = QString{product->description}; @@ -35,6 +37,7 @@ namespace ICClient { QString comment; QString image; double price; + double weight; QString author; }; -- cgit v1.2.3