From e872a7af320b51328e286cd8c60a383d771a5bbd 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: Wed, 10 Jun 2020 19:05:53 +0800 Subject: Add author role to product model --- qicclient/product.hxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'qicclient') diff --git a/qicclient/product.hxx b/qicclient/product.hxx index 7271fe9..4fe67ac 100644 --- a/qicclient/product.hxx +++ b/qicclient/product.hxx @@ -12,20 +12,22 @@ namespace ICClient { DescriptionRole, CommentRole, ImageRole, - PriceRole + PriceRole, + AuthorRole }; - Product(icclient_product* product) - : sku{product->sku} - , price{product->price} + Product(icclient_product* product) : sku{product->sku} { if (product->description) - description - = QString{product->description}; + description = QString{product->description}; if (product->comment) comment = QString{product->comment}; if (product->image) image = QString{product->image}; + if (product->price) + price = product->price; + if (product->author) + author = QString{product->author}; } QString sku; @@ -33,6 +35,7 @@ namespace ICClient { QString comment; QString image; double price; + QString author; }; } -- cgit v1.2.3