Use C++11 enum class

This commit is contained in:
Jonas Kvinge
2023-02-18 14:09:27 +01:00
parent e6c5f76872
commit dd72fb4ca5
237 changed files with 2915 additions and 2840 deletions

View File

@@ -420,14 +420,15 @@ QByteArray ScrobblingAPI20::GetReplyData(QNetworkReply *reply) {
error = QString("Received HTTP code %1").arg(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt());
}
}
const ScrobbleErrorCode lastfm_error_code = static_cast<ScrobbleErrorCode>(error_code);
if (reply->error() == QNetworkReply::ContentAccessDenied ||
reply->error() == QNetworkReply::ContentOperationNotPermittedError ||
reply->error() == QNetworkReply::AuthenticationRequiredError ||
error_code == ScrobbleErrorCode::InvalidSessionKey ||
error_code == ScrobbleErrorCode::UnauthorizedToken ||
error_code == ScrobbleErrorCode::LoginRequired ||
error_code == ScrobbleErrorCode::AuthenticationFailed ||
error_code == ScrobbleErrorCode::APIKeySuspended
lastfm_error_code == ScrobbleErrorCode::InvalidSessionKey ||
lastfm_error_code == ScrobbleErrorCode::UnauthorizedToken ||
lastfm_error_code == ScrobbleErrorCode::LoginRequired ||
lastfm_error_code == ScrobbleErrorCode::AuthenticationFailed ||
lastfm_error_code == ScrobbleErrorCode::APIKeySuspended
){
// Session is probably expired
Logout();