From ac8541c6cf3b5dc6936e458dde83e1eebf0ce9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 18 Jun 2021 10:08:22 +0800 Subject: Change results emitted class --- client.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client.cxx') diff --git a/client.cxx b/client.cxx index a77c956..7932ac8 100644 --- a/client.cxx +++ b/client.cxx @@ -14,7 +14,6 @@ static void responseHandler(icclient_response* response) static void catalogCallback(icclient_catalog* catalog) { client->emitCatalog(catalog); - icclient_free_catalog(catalog); } namespace QICClient { @@ -52,12 +51,14 @@ namespace QICClient { void Client::emitResponse(icclient_response* response) { - emit gotResponse(response); + emit gotResults(QString{response->data}); + icclient_free_response(response); } void Client::emitCatalog(icclient_catalog* catalog) { emit gotCatalog(new Catalog{catalog}); + icclient_free_catalog(catalog); } void Client::flyPage(QString const& sku,void (*handler)(icclient_response*)) -- cgit v1.2.3