summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-26 22:21:37 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-26 22:21:37 +0800
commitfd7b9f3004c1e3d8bf7075380ea3389f6be60555 (patch)
tree287a0b385416837f5bafd3b827bda3bdf45575cf
parenta1892e161693409406d7ce06c977699a06e61920 (diff)
Change price type to double
-rw-r--r--qicclient/catalog.hxx15
1 files changed, 7 insertions, 8 deletions
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 <QAbstractListModel>
-#include <QLocale>
#include <icclient/product.h>
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