comparison base/XmlExportable.cpp @ 314:70a232b1f12a

* Make XmlExportable::toXml the function that is universally overridden (and pure virtual) instead of toXmlString. Tidies up some classes, notably the model classes, significantly. Closes #1794561.
author Chris Cannam
date Thu, 18 Oct 2007 10:15:07 +0000
parents 0f37e92e1782
children 7a4bd2c8585c
comparison
equal deleted inserted replaced
313:29485aa03da4 314:70a232b1f12a
17 #include <map> 17 #include <map>
18 #include <QMutex> 18 #include <QMutex>
19 #include <QMutexLocker> 19 #include <QMutexLocker>
20 #include <QTextStream> 20 #include <QTextStream>
21 21
22 void 22 QString
23 XmlExportable::toXml(QTextStream &stream, QString indent, 23 XmlExportable::toXmlString(QString indent,
24 QString extraAttributes) const 24 QString extraAttributes) const
25 { 25 {
26 stream << toXmlString(indent, extraAttributes); 26 QString s;
27
28 {
29 QTextStream out(&s);
30 toXml(out, indent, extraAttributes);
31 }
32
33 return s;
27 } 34 }
28 35
29 QString 36 QString
30 XmlExportable::encodeEntities(QString s) 37 XmlExportable::encodeEntities(QString s)
31 { 38 {