From 228307e324190e760dc298ef84c3ffb29d4c8237 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: Mon, 29 Jun 2020 15:38:47 +0800 Subject: C++ instances keep a pointer to the C version --- qicclient/catalog.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qicclient/catalog.hxx') diff --git a/qicclient/catalog.hxx b/qicclient/catalog.hxx index dfa7a7c..7f1dcfd 100644 --- a/qicclient/catalog.hxx +++ b/qicclient/catalog.hxx @@ -17,6 +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; } public slots: void update(Catalog* catalog); @@ -30,6 +31,7 @@ namespace ICClient { private: void addProduct(Product const& product); QList products; + icclient_catalog* catalog; }; } -- cgit v1.2.3