summaryrefslogtreecommitdiff
path: root/src/projectrenderer.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-09-29 16:29:21 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-09-29 16:29:21 +0200
commit46efa2def1212dcb2610c545a78c8ab81bb22bbf (patch)
tree5bf8e1991126ba5795cdde44578a370a7a1b4a1f /src/projectrenderer.cc
parentc975247f9742bd7fcf5ae7d8ab174ed8728bb64c (diff)
Add main attribute to the filelist. Use QHash random seed hack in all places where QDomDocument is being used.
Diffstat (limited to 'src/projectrenderer.cc')
-rw-r--r--src/projectrenderer.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/projectrenderer.cc b/src/projectrenderer.cc
index e1856cb..885b9f1 100644
--- a/src/projectrenderer.cc
+++ b/src/projectrenderer.cc
@@ -33,6 +33,8 @@
#include "project.h"
#include "audioextractor.h"
+extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
+
ProjectRenderer::ProjectRenderer(Project& project)
: project(project)
{
@@ -40,6 +42,10 @@ ProjectRenderer::ProjectRenderer(Project& project)
void ProjectRenderer::render()
{
+ // Ugly hack to ensure the xml attribute order is the same each time a save
+ // or export is performed.
+ qt_qhash_seed.store(0);
+
QDomDocument doc;
QDomProcessingInstruction header =
doc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
@@ -107,6 +113,10 @@ void ProjectRenderer::render()
channelmap.setAttribute("in", audiofile.getName());
const auto& channel = project.getChannel(audiofile.getChannelMapId());
channelmap.setAttribute("out", channel.getChannelName());
+ if(audiofile.getMainChannel())
+ {
+ channelmap.setAttribute("main", "true");
+ }
instrument_node.appendChild(channelmap);
}