mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
[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:
parent
1b8df5c20f
commit
23b31aba89
@ -185,9 +185,9 @@ void
|
|||||||
QJsonObject obj = doc.object();
|
QJsonObject obj = doc.object();
|
||||||
|
|
||||||
foreach(QString key, obj.keys()) {
|
foreach(QString key, obj.keys()) {
|
||||||
qint32* val;
|
{{returnBaseType}} val;
|
||||||
setValue(&val, obj[key], "{{returnBaseType}}", QString());
|
setValue(&val, obj[key], "{{returnBaseType}}", QString());
|
||||||
output->insert(key, *val);
|
output->insert(key, val);
|
||||||
}
|
}
|
||||||
{{/isMapContainer}}
|
{{/isMapContainer}}
|
||||||
{{^isMapContainer}}
|
{{^isMapContainer}}
|
||||||
|
@ -126,9 +126,9 @@ SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) {
|
|||||||
QJsonObject obj = doc.object();
|
QJsonObject obj = doc.object();
|
||||||
|
|
||||||
foreach(QString key, obj.keys()) {
|
foreach(QString key, obj.keys()) {
|
||||||
qint32* val;
|
qint32 val;
|
||||||
setValue(&val, obj[key], "qint32", QString());
|
setValue(&val, obj[key], "qint32", QString());
|
||||||
output->insert(key, *val);
|
output->insert(key, val);
|
||||||
}
|
}
|
||||||
worker->deleteLater();
|
worker->deleteLater();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user