diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-28 15:54:09 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-28 15:54:09 +0800 |
| commit | 73851e44295b0a1e1963689036a0f60c4cbb8330 (patch) | |
| tree | ef4433a39bcb5fb9f39f6e58d4e350e1babee749 /client.cxx | |
| parent | 9bdd26b7a36ebb4987ecdca481e48b81d3164a93 (diff) | |
Client triggers catalog to update directly
since getting all products would only be good for catalog.
Besides, emitting there seems to cause crash somehow.
Diffstat (limited to 'client.cxx')
| -rw-r--r-- | client.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -14,11 +14,13 @@ namespace ICClient { icclient_cleanup(); } - void Client::allProducts(size_t (*handler)(void*, size_t, size_t, void*)) + void Client::allProducts(Catalog* qCatalog, size_t (*handler)(void*, size_t + , size_t, void*)) { icclient_catalog* catalog = nullptr; icclient_allproducts(&catalog, handler); - emit gotAllProducts(catalog); + if (catalog) qCatalog->update(catalog); + icclient_product_freecatalog(catalog); } void Client::logIn(QString const& username, QString const& password) |