summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--catalog.cxx3
m---------libicclient0
-rw-r--r--qicclient/product.hxx15
3 files changed, 12 insertions, 6 deletions
diff --git a/catalog.cxx b/catalog.cxx
index 8cdc64a..5180b23 100644
--- a/catalog.cxx
+++ b/catalog.cxx
@@ -29,6 +29,8 @@ namespace ICClient {
return product.image;
case Product::PriceRole:
return product.price;
+ case Product::AuthorRole:
+ return product.author;
default:
return QVariant();
}
@@ -42,6 +44,7 @@ namespace ICClient {
, {Product::CommentRole, "comment"}
, {Product::ImageRole, "image"}
, {Product::PriceRole, "price"}
+ , {Product::AuthorRole, "author"}
};
}
diff --git a/libicclient b/libicclient
-Subproject a9eac750ab758d279dc97fc4bc5075ddc6f2289
+Subproject 3f83bf24fd3d1f359b149d094fd86f795a3beed
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;
};
}