From d7b7252da7f110d8903250c83109cd73e6b2de34 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, 4 Nov 2019 19:17:53 +0700 Subject: order function takes a pointer to order argument --- client.cxx | 7 ++++--- libicclient | 2 +- qicclient/client.hxx | 3 ++- 3 files changed, 7 insertions(+), 5 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 index 0bef9b7..e26a6b8 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 0bef9b7717ecff9544284f5ba4b7576dadad4892 +Subproject commit e26a6b81a2b489a177e5916c54a3a9c59edd3a12 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: /* -- cgit v1.2.3