mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +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();
|
||||
|
||||
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}}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user