Debian Codegraph @

debian/patches/gh9000/08aaeea07b5781ca421219d9bbe629d4f2fc166e.diff

raw symbols SCIP
1 Forwardedscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/patches/`gh9000/08aaeea07b5781ca421219d9bbe629d4f2fc166e.diff`#Forwarded.: part of Origin PR by Jojo-Schmitz
2 Originscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/patches/`gh9000/08aaeea07b5781ca421219d9bbe629d4f2fc166e.diff`#Origin.: https://github.com/musescore/MuseScore/pull/9000
3 Authorscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/patches/`gh9000/08aaeea07b5781ca421219d9bbe629d4f2fc166e.diff`#Author.: juerg-mueller <[email protected]scip-debian . . . identity/`[email protected]`.>
4 Descriptionscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/patches/`gh9000/08aaeea07b5781ca421219d9bbe629d4f2fc166e.diff`#Description.: Fix #326259: Keep kar format on import
5 i.e. don't remove slashes from lyrics on MIDI import
6 .
7 Those slashes are apparently used by Karaoke software to show one phrase
8 (delimited by those slashes) at a time. They don't really harm in
9 MuseScore, but are needed/wanted for MIDI export including
10 (which MuseScore can't do currently, but an external tool can, see
11 https://github.com/juerg-mueller/InsertLyrics) and the lyrics most
12 probably need to get amended anyway (to add lyrics dashes and melismas)
13
14 --- a/mscore/importmidi/importmidi_lyrics.cppscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/upstream/`mscore/importmidi/importmidi_lyrics.cpp`:
15 +++ b/mscore/importmidi/importmidi_lyrics.cppscip-debian debian musescore3 3.2.3+dfsg2-21 musescore3/upstream/`mscore/importmidi/importmidi_lyrics.cpp`:
16 @@ -159,25 +159,6 @@ void addTitleToScore(Score *score, const
17 measure->add(text);
18 }
19
20 -// remove slashes in kar format
21 -
22 -QString removeSlashes(const QString &text)
23 - {
24 - QString newText = text;
25 - newText = newText.replace("/", "");
26 - newText = newText.replace("\\", "");
27 - return newText;
28 - }
29 -
30 -std::string removeSlashes(const std::string &text)
31 - {
32 - std::string str = text;
33 - char chars[] = "/\\";
34 - for (unsigned int i = 0; i != strlen(chars); ++i)
35 - str.erase(std::remove(str.begin(), str.end(), chars[i]), str.end());
36 - return str;
37 - }
38 -
39 void addTitleIfAny(const std::multimap<ReducedFraction, std::string> &lyricTrack, Score *score)
40 {
41 int textCounter = 0;
42 @@ -214,7 +195,7 @@ void addLyricsToScore(
43
44 QString text = MidiCharset::convertToCharset(it->second);
45 if (originalTime != ReducedFraction(0, 1) || !isTitlePrefix(text)) { // not title
46 - score->addLyrics(quantizedTime.fraction(), staffAddTo->idx(), removeSlashes(text).toHtmlEscaped());
47 + score->addLyrics(quantizedTime.fraction(), staffAddTo->idx(), text.toHtmlEscaped());
48 }
49 }
50 }
51 @@ -307,7 +288,7 @@ QList<std::string> makeLyricsListForUI()
52 std::string lyricText;
53
54 for (const auto &lyric: trackLyric) {
55 - const auto &text = removeSlashes(lyric.second);
56 + const auto &text = lyric.second;
57 if (isMetaText(text))
58 continue;
59 if (!lyricText.empty())