summaryrefslogtreecommitdiff
path: root/qicclient
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-16 18:15:10 +0700
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-16 18:15:10 +0700
commit501f86b2313538dec63834421806127383424771 (patch)
tree02879dae14017f02f70ca084f7d6b1cc53414330 /qicclient
parent87bf926c60712be2d6076c96bc9da659023f37bf (diff)
Same item in basket, gets removed and then inserted with new quantity
Diffstat (limited to 'qicclient')
-rw-r--r--qicclient/basket.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/qicclient/basket.hxx b/qicclient/basket.hxx
index b3b5e11..7b3de2a 100644
--- a/qicclient/basket.hxx
+++ b/qicclient/basket.hxx
@@ -22,6 +22,11 @@ namespace ICClient {
Product product;
unsigned int quantity;
+
+ bool operator==(Item const& item)
+ {
+ return product.sku == item.product.sku;
+ }
};
class Basket : public QAbstractListModel