fix baking

This commit is contained in:
SamGondelman 2019-04-25 16:00:05 -07:00
parent 7753a9dfa1
commit 0f3d755cb0

View file

@ -752,10 +752,11 @@ void DomainBaker::writeNewEntitiesFile() {
// time to write out a main models.json.gz file
// first setup a document with the entities array below the entities key
_json.object()[ENTITIES_OBJECT_KEY] = _entities;
QJsonObject json = _json.object();
json[ENTITIES_OBJECT_KEY] = _entities;
// turn that QJsonDocument into a byte array ready for compression
QByteArray jsonByteArray = _json.toJson();
QByteArray jsonByteArray = QJsonDocument(json).toJson();
// compress the json byte array using gzip
QByteArray compressedJson;