diff 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
line wrap: on
line diff
--- a/base/XmlExportable.cpp	Wed Oct 17 12:58:45 2007 +0000
+++ b/base/XmlExportable.cpp	Thu Oct 18 10:15:07 2007 +0000
@@ -19,11 +19,18 @@
 #include <QMutexLocker>
 #include <QTextStream>
 
-void
-XmlExportable::toXml(QTextStream &stream, QString indent,
-                     QString extraAttributes) const
+QString
+XmlExportable::toXmlString(QString indent,
+                           QString extraAttributes) const
 {
-    stream << toXmlString(indent, extraAttributes);
+    QString s;
+
+    {
+        QTextStream out(&s);
+        toXml(out, indent, extraAttributes);
+    }
+
+    return s;
 }
 
 QString