Ms::Rest' has no member named 'notes'
While I have added part of the code to line 2500 in this source file
https://github.com/musescore/MuseScore/blob/bdbaf5a27e8b45f1f193303fd35…
and attempt compile with mingw, an error occurred with Ms::Rest' has no member named 'notes', what functions does Ms::Rest contain?
void ExportMusicXml::rest(Rest* rest, int staff)
{
static char table2[] = "CDEFGAB";
#ifdef DEBUG_TICK
qDebug("ExportMusicXml::rest() oldtick=%d", tick);
#endif
QList nl = rest->notes();
const PageFormat* pf = _score->pageFormat();
const double pageHeight = getTenthsFromInches(pf->size().height());
//foreach(Note* rest, nl) {
QString val;
attr.doAttr(xml, false);
QString noteTag = QString("note");
if (preferences.musicxmlExportLayout && pf) {
double measureX = getTenthsFromDots(rest->measure()->pagePos().x());
double measureY = pageHeight - getTenthsFromDots(rest->measure()->pagePos().y());
double noteX = getTenthsFromDots(rest->pagePos().x());
double noteY = pageHeight - getTenthsFromDots(rest->pagePos().y());
noteTag += QString(" default-x=\"%1\"").arg(QString::number(noteX - measureX,'f',2));
noteTag += QString(" default-y=\"%1\"").arg(QString::number(noteY - measureY,'f',2));
}
//}/////////////////////////////////////////
if (!rest->visible() ) {
noteTag += QString(" print-object=\"no\"");
}
Command line output:
[ 49%] Building CXX object mscore/CMakeFiles/mscore.dir/exportxml.cpp.obj
C:\Users\yanli\Desktop\MuseScore-master\mscore\exportxml.cpp: In member function
'void Ms::ExportMusicXml::rest(Ms::Rest*, int)':
C:\Users\yanli\Desktop\MuseScore-master\mscore\exportxml.cpp:2500:28: error: 'cl
ass Ms::Rest' has no member named 'notes'
QList nl = rest->notes();
^
mscore\CMakeFiles\mscore.dir\build.make:6656: recipe for target 'mscore/CMakeFil
es/mscore.dir/exportxml.cpp.obj' failed
mingw32-make[3]: *** [mscore/CMakeFiles/mscore.dir/exportxml.cpp.obj] Error 1
mingw32-make[3]: Leaving directory 'C:/Users/yanli/Desktop/MuseScore-master/buil
d.release'
CMakeFiles\Makefile2:232: recipe for target 'mscore/CMakeFiles/mscore.dir/all' f
ailed
mingw32-make[2]: *** [mscore/CMakeFiles/mscore.dir/all] Error 2
mingw32-make[2]: Leaving directory 'C:/Users/yanli/Desktop/MuseScore-master/buil
d.release'
Makefile:136: recipe for target 'all' failed
mingw32-make[1]: *** [all] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/yanli/Desktop/MuseScore-master/buil
d.release'
Makefile.mingw:27: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
Comments
Of course a rest doesn't contain notes, why should they? But chords do.
This is not something for the issue tracker, but for the forum, probably teckh preview. Or maybe something for the developer IRC.