From 9aea7c06c3702b313aea183e841df94a27b8c06a 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: Tue, 30 Jun 2020 18:02:59 +0800 Subject: Catalog uses similar term as previous commit --- catalog.cxx | 4 ++-- client.cxx | 2 +- qicclient/catalog.hxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/catalog.cxx b/catalog.cxx index 61fd0fd..6415de7 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -6,7 +6,7 @@ namespace ICClient { Catalog::Catalog(icclient_catalog* catalog, QObject* parent) : - catalog{catalog}, + m_data{catalog}, QAbstractListModel{parent} { for (size_t i = 0; i < catalog->length; i++) @@ -92,7 +92,7 @@ namespace ICClient { product.crossSell = catalog->data(index, Product::CrossSellRole).toStringList(); addProduct(product); } - this->catalog = const_cast(catalog->c_catalog()); + this->m_data = const_cast(catalog->constData()); emit updated(); } diff --git a/client.cxx b/client.cxx index 8140365..893ef84 100644 --- a/client.cxx +++ b/client.cxx @@ -45,7 +45,7 @@ namespace ICClient { void Client::order(QString const& sku, Catalog const& catalog, Basket& order) { auto c_order = order.data(); - icclient_order(sku.toLatin1().constData(), catalog.c_catalog(), &c_order); + icclient_order(sku.toLatin1().constData(), catalog.constData(), &c_order); order.setData(c_order); } diff --git a/qicclient/catalog.hxx b/qicclient/catalog.hxx index 7f1dcfd..d643d2e 100644 --- a/qicclient/catalog.hxx +++ b/qicclient/catalog.hxx @@ -17,7 +17,7 @@ namespace ICClient { Catalog(QObject* parent = nullptr) : QAbstractListModel{parent} {} int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; - icclient_catalog const* c_catalog() const { return catalog; } + icclient_catalog const* constData() const { return m_data; } public slots: void update(Catalog* catalog); @@ -31,7 +31,7 @@ namespace ICClient { private: void addProduct(Product const& product); QList products; - icclient_catalog* catalog; + icclient_catalog* m_data; }; } -- cgit v1.2.3