From caf1bec76f65ebf3dfffffbb19c7083289e2b8ae Mon Sep 17 00:00:00 2001 From: Jochen Becher Date: Tue, 6 Oct 2015 23:25:21 +0200 Subject: [PATCH] ModelEditor: Simplify file format The file format does not longer contain object IDs because references are not used. This simplifies the file format, leads to shorter files and supportes merges between model files much better - changes in model are reflected by minimal changes in the file. Change-Id: I8c76b7899306eec9a493c6cf61add02111229760 Reviewed-by: Tobias Hunger --- .../modeling/qtserialization/inc/qark/qxmloutarchive.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h index e5299f16b53..bc00e512a31 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h @@ -141,7 +141,12 @@ public: void beginElement(const Object &object) { _stream.writeStartElement(object.getQualifiedName()); - _stream.writeAttribute(QLatin1String("id"), QString::number(_saving_ref_map.getRef(object.getObject(), true).get())); + // TODO implement key attribute + // Currently qmodel files do not use references at all + // so writing reference keys are not needed. If this + // changes keys should be implemented as a generic + // concept getting key from object (e.g. with a function + // registered per type in typeregistry) } void endElement(const End &)