I'm suspecting that I have a misconception about xml-in and xml-out in musescore. Can someone help me understand better?
Someone reported that he cannot compile a commit which I uploaded. However, I can compile it just fine. https://musescore.org/en/node/56281#comment-265571 errors are logged here: https://musescore.org/sites/musescore.org/files/compile_errors_0.zip When I look at his compiler errors, they are indeed related to places in the code which I changed. I'm trying to guess why he's getting the errors, even though I'm not. The first issue is /home/peter/src/MuseScore/libmscore/articulation.cpp:311:46: error: call of overloaded ‘tag(const char [17], bool)’ is ambiguous xml.tag("playArticulation", false); One thing I don't understand is how does musescore decide how to xml-out and in particular structures. There seems to be contradictory code. For example, the file property.cpp defines an array static const PropertyData propertyList[] = { ....}. This array defines a mapping from musescore property id to xml tag and default value. However the file articulation.cpp defines a function perhaps redundantly with the function definition below. Is this correct? Why should it be that propertyList[] define the mapping, but the write() method needs to duplicate the logic? I would guess naively that properties declared correctly in propertyList[] need not be mentioned in the write() or read() methods. void Articulation::write(Xml& xml) const { if (!xml.canWrite(this)) return; xml.stag("Articulation"); if (!_channelName.isEmpty()) xml.tagE(QString("channel name=\"%1\"").arg(_channelName)); writeProperty(xml, P_ID::DIRECTION); xml.tag("subtype", subtypeName()); if (_timeStretch != 1.0) xml.tag("timeStretch", _timeStretch); if (ornamentStyle() != MScore::OrnamentStyle::DEFAULT) xml.tag("ornamentStyle", int(_ornamentStyle)); xml.tag("playArticulation", playArticulation(), true); Element::writeProperties(xml); if (anchorStyle == PropertyStyle::UNSTYLED) xml.tag("anchor", int(_anchor)); xml.etag(); } -- View this message in context: http://dev-list.musescore.org/need-help-cannot-reproduce-compilation-error-tp7579197.html Sent from the MuseScore Developer mailing list archive at Nabble.com. ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Mscore-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mscore-developer
