Fix various clazy warnings
This commit is contained in:
@@ -125,12 +125,12 @@ QByteArray TidalBaseRequest::GetReplyData(QNetworkReply *reply, const bool send_
|
||||
}
|
||||
}
|
||||
if (status == 401 && sub_status == 6001) { // User does not have a valid session
|
||||
emit service_->Logout();
|
||||
service_->Logout();
|
||||
if (!oauth() && send_login && login_attempts() < max_login_attempts() && !api_token().isEmpty() && !username().isEmpty() && !password().isEmpty()) {
|
||||
qLog(Error) << "Tidal:" << error;
|
||||
qLog(Info) << "Tidal:" << "Attempting to login.";
|
||||
NeedLogin();
|
||||
emit service_->Login();
|
||||
service_->Login();
|
||||
}
|
||||
else {
|
||||
Error(error);
|
||||
|
||||
@@ -60,8 +60,8 @@ class TidalFavoriteRequest : public TidalBaseRequest {
|
||||
void SongsRemoved(SongList);
|
||||
|
||||
private slots:
|
||||
void AddFavoritesReply(QNetworkReply *reply, const FavoriteType type, const SongList &songs);
|
||||
void RemoveFavoritesReply(QNetworkReply *reply, const FavoriteType type, const SongList &songs);
|
||||
void AddFavoritesReply(QNetworkReply *reply, const TidalFavoriteRequest::FavoriteType type, const SongList &songs);
|
||||
void RemoveFavoritesReply(QNetworkReply *reply, const TidalFavoriteRequest::FavoriteType type, const SongList &songs);
|
||||
|
||||
public slots:
|
||||
void AddArtists(const SongList &songs);
|
||||
|
||||
@@ -183,7 +183,7 @@ TidalService::TidalService(Application *app, QObject *parent)
|
||||
QObject::connect(favorite_request_, &TidalFavoriteRequest::AlbumsRemoved, albums_collection_backend_, &CollectionBackend::DeleteSongs);
|
||||
QObject::connect(favorite_request_, &TidalFavoriteRequest::SongsRemoved, songs_collection_backend_, &CollectionBackend::DeleteSongs);
|
||||
|
||||
ReloadSettings();
|
||||
TidalService::ReloadSettings();
|
||||
LoadSession();
|
||||
|
||||
}
|
||||
@@ -351,7 +351,6 @@ void TidalService::AuthorizationUrlReceived(const QUrl &url) {
|
||||
else if (url_query.hasQueryItem("code") && url_query.hasQueryItem("state")) {
|
||||
|
||||
QString code = url_query.queryItemValue("code");
|
||||
QString state = url_query.queryItemValue("state");
|
||||
|
||||
RequestAccessToken(code);
|
||||
|
||||
|
||||
@@ -249,7 +249,8 @@ void TidalStreamURLRequest::StreamURLReceived() {
|
||||
|
||||
QString mimetype = json_obj["mimeType"].toString();
|
||||
QMimeDatabase mimedb;
|
||||
for (QString suffix : mimedb.mimeTypeForName(mimetype.toUtf8()).suffixes()) {
|
||||
QStringList suffixes = mimedb.mimeTypeForName(mimetype.toUtf8()).suffixes();
|
||||
for (const QString &suffix : suffixes) {
|
||||
filetype = Song::FiletypeByExtension(suffix);
|
||||
if (filetype != Song::FileType_Unknown) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user