From 01acd8b6d0679677790a6e644c1f82d880c05dbd Mon Sep 17 00:00:00 2001 From: Igor Korsukov Date: Fri, 26 Jan 2024 18:46:36 +0100 Subject: [PATCH] [musicxml] Replaced QPair to std::pair Backport of #21236, part 3 --- importexport/musicxml/importmxmlpass2.cpp | 10 +++++----- importexport/musicxml/musicxml.h | 2 +- importexport/musicxml/musicxmlsupport.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index ac194bfa87a93..cc00ee31a7578 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -1401,7 +1401,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(tick.ticks(), -1); + spanners[new_sp] = std::pair(tick.ticks(), -1); } //--------------------------------------------------------- @@ -4067,7 +4067,7 @@ double MusicXMLParserDirection::convertTextToNotes() QRegularExpression notesRegex("(?[yxeqhwW]\\.{0,2})(\\s*=)"); QString notesSubstring = notesRegex.match(_wordsText).captured("note"); - std::vector> noteSyms{{"q", QString("metNoteQuarterUp")}, // note4_Sym + std::vector> noteSyms{{"q", QString("metNoteQuarterUp")}, // note4_Sym {"e", QString("metNote8thUp")}, // note8_Sym {"h", QString("metNoteHalfUp")}, // note2_Sym {"y", QString("metNote32ndUp")}, // note32_Sym @@ -7581,7 +7581,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(tick.ticks(), -1); + spanners[gliss] = std::pair(tick.ticks(), -1); // qDebug("glissando/slide=%p inserted at first tick %d", gliss, tick); } } @@ -7741,11 +7741,11 @@ static void addWavyLine(ChordRest* cr, const Fraction& tick, trill = new Trill(cr->score()); trill->setTrack(trk); if (wavyLineType == "start") { - spanners[trill] = QPair(tick.ticks(), -1); + spanners[trill] = std::pair(tick.ticks(), -1); // qDebug("trill=%p inserted at first tick %d", trill, tick); } if (wavyLineType == "startstop") { - spanners[trill] = QPair(tick.ticks(), tick.ticks() + ticks.ticks()); + spanners[trill] = std::pair(tick.ticks(), tick.ticks() + ticks.ticks()); trill = nullptr; // qDebug("trill=%p inserted at first tick %d second tick %d", trill, tick, tick); } diff --git a/importexport/musicxml/musicxml.h b/importexport/musicxml/musicxml.h index e12cc1e89ac36..bf0b7cd3984dc 100644 --- a/importexport/musicxml/musicxml.h +++ b/importexport/musicxml/musicxml.h @@ -126,7 +126,7 @@ class SlurDesc { //--------------------------------------------------------- typedef std::vector MusicXmlPartGroupList; -typedef std::map > MusicXmlSpannerMap; +typedef std::map > MusicXmlSpannerMap; } // namespace Ms #endif diff --git a/importexport/musicxml/musicxmlsupport.h b/importexport/musicxml/musicxmlsupport.h index 6fb7c09f1325a..fccc63e3168af 100644 --- a/importexport/musicxml/musicxmlsupport.h +++ b/importexport/musicxml/musicxmlsupport.h @@ -36,7 +36,7 @@ namespace Ms { List of note start/stop times in a voice in a single staff. */ -typedef QPair StartStop; +typedef std::pair StartStop; typedef std::vector StartStopList; //---------------------------------------------------------