diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-22 18:08:56 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-22 18:08:56 +0800 |
commit | 560a47463ec705715b4ce5f53a39030feb48e305 (patch) | |
tree | a00f752859accc00bc4b4f28a9480ef17ed53821 | |
parent | 0a94e177d28a1257dbe9cd4b8ff3c97fba3dfd46 (diff) |
order is not a slot and takes a catalog argument
-rw-r--r-- | catalog.cxx | 1 | ||||
-rw-r--r-- | client.cxx | 6 | ||||
m--------- | libicclient | 10 | ||||
-rw-r--r-- | qicclient/client.hxx | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/catalog.cxx b/catalog.cxx index ecc01a0..8cdc64a 100644 --- a/catalog.cxx +++ b/catalog.cxx @@ -57,7 +57,6 @@ namespace ICClient { if (catalog) { for (size_t i = 0; i < catalog->length; i++) addProduct(Product{catalog->products[i]}); - icclient_freecatalog(catalog); emit updated(); } } @@ -21,6 +21,12 @@ namespace ICClient { emit gotAllProducts(catalog); } + void Client::order(QString const& sku, icclient_catalog* catalog) + { + icclient_ord_order* order = nullptr; + icclient_order(&order, sku.toLatin1().constData(), catalog); + } + void Client::logIn(QString const& username, QString const& password) { icclient_login(username.toLatin1().constData() diff --git a/libicclient b/libicclient -Subproject 6fa0df3c46986b15dec3be672f41eb7ea62c20e +Subproject e8ae8fbeab89beb43138e26465965d3510edd1c diff --git a/qicclient/client.hxx b/qicclient/client.hxx index 6121c5e..470018a 100644 --- a/qicclient/client.hxx +++ b/qicclient/client.hxx @@ -19,10 +19,10 @@ namespace ICClient { void allProducts(size_t (*handler)(void* contents , size_t size, size_t nmemb , void* userdata)); + void order(QString const& sku, icclient_catalog* catalog); public slots: /* - void order(QString const& sku); void remove(unsigned int const& indices); void checkout(); */ |