summaryrefslogtreecommitdiff
path: root/qicclient
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-10 19:05:53 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-10 19:05:53 +0800
commite872a7af320b51328e286cd8c60a383d771a5bbd (patch)
tree67c0c7ffbf0c32fbbb3c39ca8f43eeb7439ff703 /qicclient
parentbd56a1c9ccd132aad386bf51dde5ef5cde77d2cf (diff)
Add author role to product model
Diffstat (limited to 'qicclient')
-rw-r--r--qicclient/product.hxx15
1 files changed, 9 insertions, 6 deletions
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;
};
}