From 0d474d9483b797e2ff6996f752d057bc144f2311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Mon, 20 Feb 2023 09:28:41 +0800 Subject: Add product category and reorder title & description. --- catalog.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'catalog.cxx') diff --git a/catalog.cxx b/catalog.cxx index 395412c..164811f 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -29,10 +29,10 @@ namespace QInterchange { switch (role) { case Product::SkuRole: return product.sku; - case Product::TitleRole: - return product.title; case Product::DescriptionRole: return product.description; + case Product::TitleRole: + return product.title; case Product::CommentRole: return product.comment; case Product::ThumbRole: @@ -43,6 +43,8 @@ namespace QInterchange { return product.price; case Product::ProdGroupRole: return product.prodGroup; + case Product::CategoryRole: + return product.category; case Product::WeightRole: return product.weight; case Product::AuthorRole: @@ -58,13 +60,14 @@ namespace QInterchange { { return QHash{ { Product::SkuRole, "sku" }, - { Product::TitleRole, "title" }, { Product::DescriptionRole, "description" }, + { Product::TitleRole, "title" }, { Product::CommentRole, "comment" }, { Product::ThumbRole, "thumb" }, { Product::ImageRole, "image" }, { Product::PriceRole, "price" }, { Product::ProdGroupRole, "prodGroup" }, + { Product::CategoryRole, "category" }, { Product::WeightRole, "weight" }, { Product::AuthorRole, "author" }, { Product::CrossSellRole, "crossSell" } -- cgit v1.2.3