Skip to content

Commit

Permalink
[musicxml] Replaced QPair to std::pair
Browse files Browse the repository at this point in the history
Backport of musescore#21236, part 3
  • Loading branch information
igorkorsukov authored and Jojo-Schmitz committed Jan 30, 2024
1 parent 4b96a09 commit 1436e90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ static void handleSpannerStart(SLine* new_sp, int track, QString placement, cons
//qDebug("handleSpannerStart(sp %p, track %d, tick %s (%d))", new_sp, track, qPrintable(tick.print()), tick.ticks());
new_sp->setTrack(track);
setSLinePlacement(new_sp, placement);
spanners[new_sp] = QPair<int, int>(tick.ticks(), -1);
spanners[new_sp] = std::pair<int, int>(tick.ticks(), -1);
}

//---------------------------------------------------------
Expand Down Expand Up @@ -3863,7 +3863,7 @@ double MusicXMLParserDirection::convertTextToNotes()
QRegularExpression notesRegex("(?<note>[yxeqhwW]\\.{0,2})(\\s*=)");
QString notesSubstring = notesRegex.match(_wordsText).captured("note");

QList<QPair<QString, QString>> noteSyms{{"q", QString("<sym>metNoteQuarterUp</sym>")}, // note4_Sym
QList<std::pair<QString, QString>> noteSyms{{"q", QString("<sym>metNoteQuarterUp</sym>")}, // note4_Sym
{"e", QString("<sym>metNote8thUp</sym>")}, // note8_Sym
{"h", QString("<sym>metNoteHalfUp</sym>")}, // note2_Sym
{"y", QString("<sym>metNote32ndUp</sym>")}, // note32_Sym
Expand Down Expand Up @@ -7220,7 +7220,7 @@ static void addGlissandoSlide(const Notation& notation, Note* note,
gliss->setLineColor(glissandoColor);
gliss->setText(glissandoText);
gliss->setGlissandoType(glissandoTag == 0 ? GlissandoType::STRAIGHT : GlissandoType::WAVY);
spanners[gliss] = QPair<int, int>(tick.ticks(), -1);
spanners[gliss] = std::pair<int, int>(tick.ticks(), -1);
// qDebug("glissando/slide=%p inserted at first tick %d", gliss, tick);
}
}
Expand Down Expand Up @@ -7361,11 +7361,11 @@ static void addWavyLine(ChordRest* cr, const Fraction& tick,
trill = new Trill(cr->score());
trill->setTrack(trk);
if (wavyLineType == "start") {
spanners[trill] = QPair<int, int>(tick.ticks(), -1);
spanners[trill] = std::pair<int, int>(tick.ticks(), -1);
// qDebug("trill=%p inserted at first tick %d", trill, tick);
}
if (wavyLineType == "startstop") {
spanners[trill] = QPair<int, int>(tick.ticks(), tick.ticks() + ticks.ticks());
spanners[trill] = std::pair<int, int>(tick.ticks(), tick.ticks() + ticks.ticks());
trill = nullptr;
// qDebug("trill=%p inserted at first tick %d second tick %d", trill, tick, tick);
}
Expand Down
2 changes: 1 addition & 1 deletion importexport/musicxml/musicxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class SlurDesc {
//---------------------------------------------------------

typedef std::vector<MusicXmlPartGroup*> MusicXmlPartGroupList;
typedef std::map<SLine*, QPair<int, int> > MusicXmlSpannerMap;
typedef std::map<SLine*, std::pair<int, int> > MusicXmlSpannerMap;

} // namespace Ms
#endif
2 changes: 1 addition & 1 deletion importexport/musicxml/musicxmlsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Ms {
List of note start/stop times in a voice in a single staff.
*/

typedef QPair<int, int> StartStop;
typedef std::pair<int, int> StartStop;
typedef std::vector<StartStop> StartStopList;

//---------------------------------------------------------
Expand Down

0 comments on commit 1436e90

Please sign in to comment.