summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:17:53 +0700
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:17:53 +0700
commitd7b7252da7f110d8903250c83109cd73e6b2de34 (patch)
tree8d244596c03733d8d33f5dfe9f35d0cb0458436e
parent29857eef59c6a7bd6958743c83c05932678f2855 (diff)
order function takes a pointer to order argument
-rw-r--r--client.cxx7
m---------libicclient12
-rw-r--r--qicclient/client.hxx3
3 files changed, 13 insertions, 9 deletions
diff --git a/client.cxx b/client.cxx
index 74a64ba..1dad6fe 100644
--- a/client.cxx
+++ b/client.cxx
@@ -21,10 +21,11 @@ namespace ICClient {
emit gotAllProducts(catalog);
}
- void Client::order(QString const& sku, icclient_catalog* catalog)
+ void Client::order(icclient_ord_order** orderPtr, QString const& sku
+ , icclient_catalog* catalog)
{
- icclient_ord_order* order = nullptr;
- icclient_order(&order, sku.toLatin1().constData(), catalog);
+ icclient_order(orderPtr, sku.toLatin1().constData(), catalog);
+ icclient_ord_order* order = *orderPtr;
emit ordered(order);
}
diff --git a/libicclient b/libicclient
-Subproject 0bef9b7717ecff9544284f5ba4b7576dadad489
+Subproject e26a6b81a2b489a177e5916c54a3a9c59edd3a1
diff --git a/qicclient/client.hxx b/qicclient/client.hxx
index 470018a..893e47b 100644
--- a/qicclient/client.hxx
+++ b/qicclient/client.hxx
@@ -19,7 +19,8 @@ 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);
+ void order(icclient_ord_order** orderPtr, QString const& sku
+ , icclient_catalog* catalog);
public slots:
/*