From a01bfc11355f041eb4225d5d104fee83e17db444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 18 Jun 2021 15:33:05 +0800 Subject: Simplify catalog and product --- qicclient/catalog.hxx | 10 ++-------- qicclient/product.hxx | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'qicclient') diff --git a/qicclient/catalog.hxx b/qicclient/catalog.hxx index 7d4dda2..244f4f0 100644 --- a/qicclient/catalog.hxx +++ b/qicclient/catalog.hxx @@ -14,17 +14,11 @@ namespace QICClient { public: Catalog(icclient_catalog* catalog, QObject* parent = nullptr); - Catalog(QObject* parent = nullptr) : QAbstractListModel{parent} {} + ~Catalog(); 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* constData() const { return m_data; } - public slots: - void update(Catalog* catalog); - - signals: - void updated(); - protected: QHash roleNames() const Q_DECL_OVERRIDE; @@ -36,4 +30,4 @@ namespace QICClient { } -#endif // QICCLIENT_CATALOG_HXX +#endif diff --git a/qicclient/product.hxx b/qicclient/product.hxx index 5d19d41..18b850a 100644 --- a/qicclient/product.hxx +++ b/qicclient/product.hxx @@ -20,7 +20,6 @@ namespace QICClient { CrossSellRole }; - Product() {} Product(icclient_product* product) : price{product->price}, weight{product->weight} @@ -60,4 +59,4 @@ namespace QICClient { } -#endif // QICCLIENT_PRODUCT_HXX +#endif -- cgit v1.2.3