don't waste bandwidth with spaces or default-value items

This commit is contained in:
Max-Wilhelm Bruker 2011-01-13 15:02:13 +01:00
parent f07bb38e4a
commit 714a0eee50
7 changed files with 15 additions and 9 deletions

View file

@ -25,6 +25,9 @@ bool SerializableItem::readElement(QXmlStreamReader *xml)
void SerializableItem::write(QXmlStreamWriter *xml)
{
if (isEmpty())
return;
xml->writeStartElement(itemType);
if (!itemSubType.isEmpty())
xml->writeAttribute("type", itemSubType);