forked from qt-creator/qt-creator
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 <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -141,7 +141,12 @@ public:
|
|||||||
void beginElement(const Object<T> &object)
|
void beginElement(const Object<T> &object)
|
||||||
{
|
{
|
||||||
_stream.writeStartElement(object.getQualifiedName());
|
_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 &)
|
void endElement(const End &)
|
||||||
|
Reference in New Issue
Block a user