summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.cxx5
-rw-r--r--qicclient.hxx2
2 files changed, 4 insertions, 3 deletions
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*))
diff --git a/qicclient.hxx b/qicclient.hxx
index d44b1a4..df9da45 100644
--- a/qicclient.hxx
+++ b/qicclient.hxx
@@ -61,7 +61,7 @@ namespace QICClient {
void strapAllProducts();
signals:
- void gotResponse(icclient_response* response);
+ void gotResults(QString const& results);
void gotCatalog(Catalog* catalog);
void gotFlyPage(shared_ptr<Product> product);
};