adding comments for clarity
This commit is contained in:
parent
88698a9a6c
commit
968776d04b
1 changed files with 5 additions and 1 deletions
|
@ -210,7 +210,7 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
vtitle = line;
|
vtitle = line;
|
||||||
continue;
|
continue;
|
||||||
} else if (rawLyrics.endsWith(line)) {
|
} else if (rawLyrics.endsWith(line)) {
|
||||||
qDebug() << vtitle;
|
// qDebug() << vtitle;
|
||||||
verse.append(line.trimmed() + "\n");
|
verse.append(line.trimmed() + "\n");
|
||||||
verses.insert(vtitle, verse);
|
verses.insert(vtitle, verse);
|
||||||
break;
|
break;
|
||||||
|
@ -233,6 +233,10 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this function appends the verse that matches the verse order from the map
|
// this function appends the verse that matches the verse order from the map
|
||||||
|
// first we run through every line and check to see if the line matches
|
||||||
|
// an item in vorder, then we append lyrics from the verse that matches
|
||||||
|
// the verse map we created earlier. It's a multi map so we need to append
|
||||||
|
// them in reverse as they are added in last in first out order.
|
||||||
foreach (const QString &vstr, vorder) {
|
foreach (const QString &vstr, vorder) {
|
||||||
foreach (line, rawLyrics) {
|
foreach (line, rawLyrics) {
|
||||||
if (line.startsWith(vstr.at(0)) && line.endsWith(vstr.at(1))) {
|
if (line.startsWith(vstr.at(0)) && line.endsWith(vstr.at(1))) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue