Skip to content

Commit

Permalink
Merge pull request #176 from mgavioli/Fix_profile_XML_read
Browse files Browse the repository at this point in the history
Align the code reading an XML profile to the new XML reader
  • Loading branch information
mgavioli committed Jan 20, 2013
2 parents 4d34280 + 7c6fe71 commit be89586
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions libmscore/bend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ void Bend::read(XmlReader& e)
pv.pitch = e.intAttribute("pitch");
pv.vibrato = e.intAttribute("vibrato");
_points.append(pv);
e.readNext();
}
else
e.unknown();
Expand Down
1 change: 1 addition & 0 deletions libmscore/tremolobar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ void TremoloBar::read(XmlReader& e)
pv.pitch = e.intAttribute("pitch");
pv.vibrato = e.intAttribute("vibrato");
_points.append(pv);
e.readNext();
}
else
e.unknown();
Expand Down
2 changes: 1 addition & 1 deletion mscore/palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ void Palette::write(const QString& p)

void Palette::read(XmlReader& e)
{
QString name = e.attribute("name");
// QString name = e.attribute("name");
while (e.readNextStartElement()) {
const QStringRef& t(e.name());
if (t == "gridWidth")
Expand Down
5 changes: 3 additions & 2 deletions mscore/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ void Profile::read()
if (rootfile.isEmpty())
rootfile = e.attribute("full-path");
e.readNext();
e.readNext();
}
else if (tag == "file")
images.append(e.readElementText());
Expand All @@ -328,8 +329,8 @@ void Profile::read()

while (e.readNextStartElement()) {
if (e.name() == "museScore") {
QString version = e.attribute("version");
QStringList sl = version.split('.');
// QString version = e.attribute("version");
// QStringList sl = version.split('.');
// _mscVersion = sl[0].toInt() * 100 + sl[1].toInt();
while (e.readNextStartElement()) {
if (e.name() == "Profile")
Expand Down

0 comments on commit be89586

Please sign in to comment.