Mercurial > hg > svcore
comparison data/model/Model.cpp @ 1677:f97d64b8674f single-point
Make XmlExportables store their export IDs and always obtain a new one, avoiding reuse when an object is allocated at the same heap location as a previous one. This makes the ID system stable enough to be used in the export tests.
author | Chris Cannam |
---|---|
date | Thu, 28 Mar 2019 11:55:02 +0000 |
parents | dfcd05e8bd2f |
children | 187c76c40c6f |
comparison
equal
deleted
inserted
replaced
1676:3b51df7695a4 | 1677:f97d64b8674f |
---|---|
200 Model::toXml(QTextStream &stream, QString indent, | 200 Model::toXml(QTextStream &stream, QString indent, |
201 QString extraAttributes) const | 201 QString extraAttributes) const |
202 { | 202 { |
203 stream << indent; | 203 stream << indent; |
204 stream << QString("<model id=\"%1\" name=\"%2\" sampleRate=\"%3\" start=\"%4\" end=\"%5\" %6/>\n") | 204 stream << QString("<model id=\"%1\" name=\"%2\" sampleRate=\"%3\" start=\"%4\" end=\"%5\" %6/>\n") |
205 .arg(getObjectExportId(this)) | 205 .arg(getExportId()) |
206 .arg(encodeEntities(objectName())) | 206 .arg(encodeEntities(objectName())) |
207 .arg(getSampleRate()) | 207 .arg(getSampleRate()) |
208 .arg(getStartFrame()) | 208 .arg(getStartFrame()) |
209 .arg(getEndFrame()) | 209 .arg(getEndFrame()) |
210 .arg(extraAttributes); | 210 .arg(extraAttributes); |