MCPcopy Create free account
hub / github.com/GilesBathgate/RapCAD / writeProject

Method writeProject

src/project.cpp:78–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void Project::writeProject(const QString& filename)
79{
80 auto* file=new QFile(filename);
81 if(!file->open(QIODevice::WriteOnly)) {
82 return;
83 }
84 QXmlStreamWriter xml(file);
85 xml.setAutoFormatting(true);
86 xml.writeStartDocument();
87 xml.writeStartElement("project");
88 xml.writeAttribute("version","0.1");
89 xml.writeTextElement("name",name);
90 for(const auto& source: getSources())
91 xml.writeTextElement("source",source);
92 xml.writeEndElement();
93 xml.writeEndDocument();
94 delete file;
95}
96
97void Project::setName(const QString& value)
98{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected