comparison data/model/SparseOneDimensionalModel.h @ 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 82d03c9661f9
children 0d89abd631ac
comparison
equal deleted inserted replaced
1676:3b51df7695a4 1677:f97d64b8674f
283 QString("type=\"sparse\" dimensions=\"1\" resolution=\"%1\" " 283 QString("type=\"sparse\" dimensions=\"1\" resolution=\"%1\" "
284 "notifyOnAdd=\"%2\" dataset=\"%3\" %4") 284 "notifyOnAdd=\"%2\" dataset=\"%3\" %4")
285 .arg(m_resolution) 285 .arg(m_resolution)
286 .arg("true") // always true after model reaches 100% - 286 .arg("true") // always true after model reaches 100% -
287 // subsequent events are always notified 287 // subsequent events are always notified
288 .arg(getObjectExportId(&m_events)) 288 .arg(m_events.getExportId())
289 .arg(extraAttributes)); 289 .arg(extraAttributes));
290 290
291 m_events.toXml(out, indent, QString("dimensions=\"1\"")); 291 m_events.toXml(out, indent, QString("dimensions=\"1\""));
292 } 292 }
293 293