diff options
-rw-r--r-- | catalog.cxx | 3 | ||||
-rw-r--r-- | interchange/product.hxx | 4 | ||||
-rw-r--r-- | ord.cxx | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/catalog.cxx b/catalog.cxx index b971525..395412c 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -29,6 +29,8 @@ namespace QInterchange { switch (role) { case Product::SkuRole: return product.sku; + case Product::TitleRole: + return product.title; case Product::DescriptionRole: return product.description; case Product::CommentRole: @@ -56,6 +58,7 @@ namespace QInterchange { { return QHash<int, QByteArray>{ { Product::SkuRole, "sku" }, + { Product::TitleRole, "title" }, { Product::DescriptionRole, "description" }, { Product::CommentRole, "comment" }, { Product::ThumbRole, "thumb" }, diff --git a/interchange/product.hxx b/interchange/product.hxx index 483ee42..63ac63e 100644 --- a/interchange/product.hxx +++ b/interchange/product.hxx @@ -9,6 +9,7 @@ namespace QInterchange { { enum ProductRoles { SkuRole = Qt::UserRole + 1, + TitleRole, DescriptionRole, CommentRole, ThumbRole, @@ -27,6 +28,8 @@ namespace QInterchange { { if (product->sku) sku = QString{product->sku}; + if (product->title) + title = QString{product->title}; if (product->description) description = QString{product->description}; if (product->comment) @@ -47,6 +50,7 @@ namespace QInterchange { } QString sku; + QString title; QString description; QString comment; QString thumb; @@ -36,6 +36,8 @@ namespace QInterchange { switch (role) { case Product::SkuRole: return item.product.sku; + case Product::TitleRole: + return item.product.title; case Product::DescriptionRole: return item.product.description; case Product::ImageRole: @@ -53,6 +55,7 @@ namespace QInterchange { { return QHash<int, QByteArray>{ { Product::SkuRole, "sku" }, + { Product::TitleRole, "title" }, { Product::DescriptionRole, "description" }, { Product::ImageRole, "image" }, { Product::PriceRole, "price" }, |