instead of crashing, musescore should ignore unknown xml tags in input files.
This gives some form of upward/downward compatibility between musescore versions.
However that change doesn't compile, at least not on Mac:
/Users/build/build-bot/musescore_nightly/libmscore/xml.cpp:181:7: error: member function 'skipCurrentElement' not viable: 'this' argument has type 'const Ms::XmlReader', but function is not marked const
skipCurrentElement();
^~~~~~~~~~~~~~~~~~
/Users/build/build-bot/musescore_nightly/thirdparty/xmlstream/xmlstream.h:263:10: note: 'skipCurrentElement' declared here
void skipCurrentElement();
^
Travis (and therefor Linux) isn't happy with it either:
/home/travis/build/musescore/MuseScore/libmscore/xml.cpp: In member function ‘void Ms::XmlReader::unknown() const’:
/home/travis/build/musescore/MuseScore/libmscore/xml.cpp:181:26: error: passing ‘const Ms::XmlReader’ as ‘this’ argument of ‘void XmlStreamReader::skipCurrentElement()’ discards qualifiers [-fpermissive]
For now the answer is no, as the typical user does not see a console window. However it would be very annoying to get a warning for every XML tag ignored. A generic message that "some" tags were ignored is useless without knowing which ones. And an aggregate message showing all ignored tags would be complex and overwhelming. What to do...
qDebug is silent as far as most of the world will be concerned - they only show up when starting MuseScore from a console window. And we generate those many places for other less interesting reasons anyhow.
Comments
Fixed in cbd0e55360
Is a warning displayed to give the user a heads-up?
on the console an error message is printed, via qDebug()
Before the change MuseScore aborted at that spot
However that change doesn't compile, at least not on Mac:
/Users/build/build-bot/musescore_nightly/libmscore/xml.cpp:181:7: error: member function 'skipCurrentElement' not viable: 'this' argument has type 'const Ms::XmlReader', but function is not marked const
skipCurrentElement();
^~~~~~~~~~~~~~~~~~
/Users/build/build-bot/musescore_nightly/thirdparty/xmlstream/xmlstream.h:263:10: note: 'skipCurrentElement' declared here
void skipCurrentElement();
^
Travis (and therefor Linux) isn't happy with it either:
/home/travis/build/musescore/MuseScore/libmscore/xml.cpp: In member function ‘void Ms::XmlReader::unknown() const’:
/home/travis/build/musescore/MuseScore/libmscore/xml.cpp:181:26: error: passing ‘const Ms::XmlReader’ as ‘this’ argument of ‘void XmlStreamReader::skipCurrentElement()’ discards qualifiers [-fpermissive]
skipCurrentElement();
For now the answer is no, as the typical user does not see a console window. However it would be very annoying to get a warning for every XML tag ignored. A generic message that "some" tags were ignored is useless without knowing which ones. And an aggregate message showing all ignored tags would be complex and overwhelming. What to do...
Windows compile fails too.
ugh, it looked so simple!
If you open a score file which is created with a newer version of musescore you get a warning.
Unknown xml tags are then silently ignored.
the devil 's in the details ;-)
Not so silent, there is a qDebug() message, or am I missing something?
No Alertbox or anything in the GUI though.
qDebug is silent as far as most of the world will be concerned - they only show up when starting MuseScore from a console window. And we generate those many places for other less interesting reasons anyhow.
well, guess it is the difference between silent and quiet, qDebug() being the latter :-)
Automatically closed -- issue fixed for 2 weeks with no activity.