Skip to content

Commit

Permalink
Use trimmed() where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Sep 29, 2024
1 parent bdba150 commit d98d7c4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/importexport/musicxml/internal/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3083,7 +3083,7 @@ void MusicXMLParserPass2::staffTuning(StringData* t)
int octave = 0;
while (m_e.readNextStartElement()) {
if (m_e.name() == "tuning-alter") {
alter = m_e.readInt();
alter = m_e.readText().trimmed().toInt();
} else if (m_e.name() == "tuning-octave") {
octave = m_e.readInt();
} else if (m_e.name() == "tuning-step") {
Expand Down Expand Up @@ -5704,7 +5704,7 @@ void MusicXMLParserPass2::key(const String& partId, Measure* measure, const Frac
flushAlteredTone(key, keyStep, keyAlter, keyAccidental, smufl);
keyStep = m_e.readText();
} else if (m_e.name() == "key-alter") {
keyAlter = m_e.readText();
keyAlter = m_e.readText().trimmed();
} else if (m_e.name() == "key-accidental") {
smufl = m_e.attribute("smufl");
keyAccidental = m_e.readText();
Expand Down Expand Up @@ -7391,8 +7391,7 @@ void MusicXMLParserPass2::harmony(const String& partId, Measure* measure, const
} else if (m_e.name() == "root-alter") {
// attributes: print-object, print-style
// location (left-right)
// Cubase exports this value with a trailing newline
alter = m_e.readText().simplified().toInt();
alter = m_e.readText().trimmed().toInt();
} else {
skipLogCurrElem();
}
Expand Down Expand Up @@ -7434,8 +7433,7 @@ void MusicXMLParserPass2::harmony(const String& partId, Measure* measure, const
} else if (m_e.name() == "bass-alter") {
// attributes: print-object, print-style
// location (left-right)
// Cubase exports this value with a trailing newline
alter = m_e.readText().simplified().toInt();
alter = m_e.readText().trimmed().toInt();
} else {
skipLogCurrElem();
}
Expand All @@ -7449,7 +7447,7 @@ void MusicXMLParserPass2::harmony(const String& partId, Measure* measure, const
if (m_e.name() == "degree-value") {
degreeValue = m_e.readInt();
} else if (m_e.name() == "degree-alter") {
degreeAlter = m_e.readInt();
degreeAlter = m_e.readText().trimmed().toInt();
} else if (m_e.name() == "degree-type") {
degreeType = m_e.readText();
} else {
Expand Down

0 comments on commit d98d7c4

Please sign in to comment.