[qt5cpp] Fix crash when API return a map container (#7933)

* [qt5cpp] Fix crash when API return a map container

* qint32 => {{returnBaseType}}
This commit is contained in:
Martin Delille 2018-04-02 10:24:57 +02:00 committed by William Cheng
parent 1b8df5c20f
commit 23b31aba89
2 changed files with 4 additions and 4 deletions

View File

@ -185,9 +185,9 @@ void
QJsonObject obj = doc.object();
foreach(QString key, obj.keys()) {
qint32* val;
{{returnBaseType}} val;
setValue(&val, obj[key], "{{returnBaseType}}", QString());
output->insert(key, *val);
output->insert(key, val);
}
{{/isMapContainer}}
{{^isMapContainer}}

View File

@ -126,9 +126,9 @@ SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) {
QJsonObject obj = doc.object();
foreach(QString key, obj.keys()) {
qint32* val;
qint32 val;
setValue(&val, obj[key], "qint32", QString());
output->insert(key, *val);
output->insert(key, val);
}
worker->deleteLater();