diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index 390300bea..378727cec 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -511,8 +511,7 @@ QString CollectionModel::DividerDisplayText(const GroupBy type, const QString &k case GroupBy_None: case GroupByCount: - // fallthrough - ; + break; } qLog(Error) << "Unknown GroupBy type" << type << "for divider key" << key; return QString(); diff --git a/src/core/mainwindow.cpp b/src/core/mainwindow.cpp index 8e2b9bb94..c31ce9ea9 100644 --- a/src/core/mainwindow.cpp +++ b/src/core/mainwindow.cpp @@ -963,7 +963,7 @@ MainWindow::MainWindow(Application *app, std::shared_ptr tray_ic if (tray_icon_->IsSystemTrayAvailable() && tray_icon_->isVisible()) { break; } - // fallthrough + [[fallthrough]]; case BehaviourSettingsPage::Startup_Remember: default: { diff --git a/src/core/player.cpp b/src/core/player.cpp index 02b6adbea..f7834ee6a 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -624,7 +624,7 @@ void Player::EngineStateChanged(const Engine::State state) { break; case Engine::Error: emit Error(); - // fallthrough + [[fallthrough]]; case Engine::Empty: case Engine::Idle: pause_time_ = QDateTime(); diff --git a/src/core/songloader.cpp b/src/core/songloader.cpp index 803261a6f..16c207d04 100644 --- a/src/core/songloader.cpp +++ b/src/core/songloader.cpp @@ -646,7 +646,7 @@ void SongLoader::EndOfStreamReached() { if (state_ == Finished) break; // It looks like a playlist, so parse it - // fallthrough + [[fallthrough]]; case WaitingForData: // It's a playlist and we've got all the data - finish and parse it StopTypefindAsync(true); diff --git a/src/covermanager/albumcoverchoicecontroller.cpp b/src/covermanager/albumcoverchoicecontroller.cpp index add1be759..6db6d92b8 100644 --- a/src/covermanager/albumcoverchoicecontroller.cpp +++ b/src/covermanager/albumcoverchoicecontroller.cpp @@ -217,7 +217,7 @@ QUrl AlbumCoverChoiceController::LoadCoverFromFile(Song *song) { SaveCoverEmbeddedAutomatic(*song, cover_file); return QUrl::fromLocalFile(Song::kEmbeddedCover); } - // fallthrough + [[fallthrough]]; case CollectionSettingsPage::SaveCoverType_Cache: case CollectionSettingsPage::SaveCoverType_Album:{ QUrl cover_url = QUrl::fromLocalFile(cover_file); @@ -789,7 +789,7 @@ QUrl AlbumCoverChoiceController::SaveCoverAutomatic(Song *song, const AlbumCover break; } } - // fallthrough + [[fallthrough]]; case CollectionSettingsPage::SaveCoverType_Cache: case CollectionSettingsPage::SaveCoverType_Album:{ cover_url = SaveCoverToFileAutomatic(song, result); diff --git a/src/covermanager/albumcoverloader.cpp b/src/covermanager/albumcoverloader.cpp index 12397302c..054461411 100644 --- a/src/covermanager/albumcoverloader.cpp +++ b/src/covermanager/albumcoverloader.cpp @@ -186,14 +186,14 @@ QString AlbumCoverLoader::CoverFilenameFromSource(const Song::Source source, con filename = album_id + "-" + cover_url.fileName(); break; } - // fallthrough + [[fallthrough]]; case Song::Source_Subsonic: case Song::Source_Qobuz: if (!album_id.isEmpty()) { filename = album_id; break; } - // fallthrough + [[fallthrough]]; case Song::Source_Collection: case Song::Source_LocalFile: case Song::Source_CDDA: diff --git a/src/osd/osdbase.cpp b/src/osd/osdbase.cpp index 7ece11f29..e2f091df2 100644 --- a/src/osd/osdbase.cpp +++ b/src/osd/osdbase.cpp @@ -306,7 +306,7 @@ void OSDBase::ShowMessage(const QString &summary, const QString &message, const case Native: #ifdef Q_OS_WIN32 Q_UNUSED(icon) - // fallthrough + [[fallthrough]]; #else if (image.isNull()) { ShowMessageNative(summary, message, icon, QImage()); @@ -318,7 +318,7 @@ void OSDBase::ShowMessage(const QString &summary, const QString &message, const #endif case TrayPopup: #ifdef Q_OS_MACOS - // fallthrough + [[fallthrough]]; #else if (tray_icon_) tray_icon_->ShowPopup(summary, message, timeout_msec_); break; @@ -326,7 +326,7 @@ void OSDBase::ShowMessage(const QString &summary, const QString &message, const case Disabled: if (!force_show_next_) break; force_show_next_ = false; - // fallthrough + [[fallthrough]]; case Pretty: pretty_popup_->ShowMessage(summary, message, image); break; @@ -401,7 +401,7 @@ QString OSDBase::ReplaceMessage(const MessageType type, const QString &message, } break; #elif defined(Q_OS_WIN32) - // fallthrough + [[fallthrough]]; #else // Other OSes doesn't support native notifications. qLog(Debug) << "Native notifications are not supported on this OS."; diff --git a/src/scrobbler/scrobblingapi20.cpp b/src/scrobbler/scrobblingapi20.cpp index 77920d2e5..8ee9d0524 100644 --- a/src/scrobbler/scrobblingapi20.cpp +++ b/src/scrobbler/scrobblingapi20.cpp @@ -178,7 +178,7 @@ void ScrobblingAPI20::Authenticate(const bool https) { messagebox_error.setTextFormat(Qt::RichText); messagebox_error.exec(); } - // fallthrough + [[fallthrough]]; case QMessageBox::Save: QApplication::clipboard()->setText(url.toString()); break; diff --git a/src/settings/behavioursettingspage.cpp b/src/settings/behavioursettingspage.cpp index 1c40e1e8f..dc0ae8107 100644 --- a/src/settings/behavioursettingspage.cpp +++ b/src/settings/behavioursettingspage.cpp @@ -196,7 +196,7 @@ void BehaviourSettingsPage::Load() { break; } ; - // fallthrough + [[fallthrough]]; case BehaviourSettingsPage::Startup_Remember: default: ui_->radiobutton_remember->setChecked(true); diff --git a/src/tidal/tidalrequest.cpp b/src/tidal/tidalrequest.cpp index c2d126a1c..34cef8868 100644 --- a/src/tidal/tidalrequest.cpp +++ b/src/tidal/tidalrequest.cpp @@ -913,7 +913,7 @@ void TidalRequest::SongsFinishCheck(const QString &artist_id, const QString &alb AddSongsSearchRequest(offset_next); break; } - // fallthrough + [[fallthrough]]; case QueryType_Artists: case QueryType_SearchArtists: case QueryType_Albums: