diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 15:38:47 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 15:38:47 +0800 |
| commit | 228307e324190e760dc298ef84c3ffb29d4c8237 (patch) | |
| tree | 36f97ddb46c12ac98fb81b5969dbf6c64b474702 /catalog.cxx | |
| parent | a2a5964bddaf61c830f9a2a2a9bf6226c0168e64 (diff) | |
C++ instances keep a pointer to the C version
Diffstat (limited to 'catalog.cxx')
| -rw-r--r-- | catalog.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/catalog.cxx b/catalog.cxx index 0fe8a20..61fd0fd 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -6,6 +6,7 @@ namespace ICClient { Catalog::Catalog(icclient_catalog* catalog, QObject* parent) : + catalog{catalog}, QAbstractListModel{parent} { for (size_t i = 0; i < catalog->length; i++) @@ -90,8 +91,9 @@ namespace ICClient { product.author = catalog->data(index, Product::AuthorRole).toString(); product.crossSell = catalog->data(index, Product::CrossSellRole).toStringList(); addProduct(product); - emit updated(); } + this->catalog = const_cast<icclient_catalog*>(catalog->c_catalog()); + emit updated(); } } |