From 228307e324190e760dc298ef84c3ffb29d4c8237 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, 29 Jun 2020 15:38:47 +0800 Subject: C++ instances keep a pointer to the C version --- client.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index 7f74127..5ca3ce6 100644 --- a/client.cxx +++ b/client.cxx @@ -4,6 +4,7 @@ #include #include #include "qicclient/catalog.hxx" +#include "qicclient/basket.hxx" #include "qicclient/client.hxx" namespace ICClient { @@ -43,12 +44,11 @@ namespace ICClient { if (product) emit gotFlyPage(shared_ptr{new Product{product}}); } - void Client::order(icclient_ord_order** orderPtr, QString const& sku - , icclient_catalog* catalog) + void Client::order(QString const& sku, Catalog const& catalog, Basket& order) { - icclient_order(orderPtr, sku.toLatin1().constData(), catalog); - icclient_ord_order* order = *orderPtr; - emit ordered(order); + auto c_order = order.c_order(); + icclient_order(sku.toLatin1().constData(), catalog.c_catalog(), + &c_order); } void Client::logIn(size_t (*handler)(void*, size_t, size_t, void*) -- cgit v1.2.3