Merge pull request #6505 from jonaski/fallthrough

Add fallthrough comment where fallthrough is intended
This commit is contained in:
John Maguire 2020-01-05 00:30:24 +00:00 committed by GitHub
commit 5123d1dd37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -145,20 +145,25 @@ QStandardItem* GlobalSearchModel::BuildContainers(const Song& s,
case LibraryModel::GroupBy_Composer: case LibraryModel::GroupBy_Composer:
display_text = s.composer(); display_text = s.composer();
// fallthrough
case LibraryModel::GroupBy_Performer: case LibraryModel::GroupBy_Performer:
display_text = s.performer(); display_text = s.performer();
// fallthrough
case LibraryModel::GroupBy_Disc: case LibraryModel::GroupBy_Disc:
display_text = s.disc(); display_text = s.disc();
// fallthrough
case LibraryModel::GroupBy_Grouping: case LibraryModel::GroupBy_Grouping:
display_text = s.grouping(); display_text = s.grouping();
// fallthrough
case LibraryModel::GroupBy_Genre: case LibraryModel::GroupBy_Genre:
if (display_text.isNull()) display_text = s.genre(); if (display_text.isNull()) display_text = s.genre();
// fallthrough
case LibraryModel::GroupBy_Album: case LibraryModel::GroupBy_Album:
unique_tag = s.album_id(); unique_tag = s.album_id();
if (display_text.isNull()) { if (display_text.isNull()) {
display_text = s.album(); display_text = s.album();
} }
// fallthrough // fallthrough
case LibraryModel::GroupBy_AlbumArtist: case LibraryModel::GroupBy_AlbumArtist:
if (display_text.isNull()) display_text = s.effective_albumartist(); if (display_text.isNull()) display_text = s.effective_albumartist();
display_text = LibraryModel::TextOrUnknown(display_text); display_text = LibraryModel::TextOrUnknown(display_text);

View File

@ -1104,14 +1104,19 @@ LibraryItem* LibraryModel::ItemFromSong(GroupBy type, bool signal,
case GroupBy_Composer: case GroupBy_Composer:
item->key = s.composer(); item->key = s.composer();
// fallthrough
case GroupBy_Performer: case GroupBy_Performer:
item->key = s.performer(); item->key = s.performer();
// fallthrough
case GroupBy_Grouping: case GroupBy_Grouping:
item->key = s.grouping(); item->key = s.grouping();
// fallthrough
case GroupBy_Genre: case GroupBy_Genre:
if (item->key.isNull()) item->key = s.genre(); if (item->key.isNull()) item->key = s.genre();
// fallthrough
case GroupBy_Album: case GroupBy_Album:
if (item->key.isNull()) item->key = s.album(); if (item->key.isNull()) item->key = s.album();
// fallthrough
case GroupBy_AlbumArtist: case GroupBy_AlbumArtist:
if (item->key.isNull()) item->key = s.effective_albumartist(); if (item->key.isNull()) item->key = s.effective_albumartist();
item->display_text = TextOrUnknown(item->key); item->display_text = TextOrUnknown(item->key);