From fd7b9f3004c1e3d8bf7075380ea3389f6be60555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 26 Sep 2019 22:21:37 +0800 Subject: Change price type to double --- qicclient/catalog.hxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'qicclient') diff --git a/qicclient/catalog.hxx b/qicclient/catalog.hxx index 07b4c81..27b4c8e 100644 --- a/qicclient/catalog.hxx +++ b/qicclient/catalog.hxx @@ -2,7 +2,6 @@ #define QICCLIENT_CATALOG_HXX #include -#include #include struct icclient_catalog; @@ -21,23 +20,23 @@ namespace ICClient { m_comment = QString{product->comment}; if (product->image) m_image = QString{product->image}; - QLocale locale; - if (product->price) - m_price = locale.toCurrencyString - (product->price, "Rp"); + m_price = product->price; } QString const& sku() const { return m_sku; } - QString const& description() const { return m_description; } + QString const& description() const + { + return m_description; + } QString const& comment() const { return m_comment; } QString const& image() const { return m_image; } - QString const& price() const { return m_price; } + double price() const { return m_price; } private: QString m_sku; QString m_description; QString m_comment; QString m_image; - QString m_price; + double m_price; }; class Catalog : public QAbstractListModel -- cgit v1.2.3