Clang-Tidy and Clazy fixes
This commit is contained in:
@@ -113,9 +113,9 @@ QNetworkReply *SubsonicBaseRequest::CreateGetRequest(const QString &ressource_na
|
||||
|
||||
}
|
||||
|
||||
void SubsonicBaseRequest::HandleSSLErrors(QList<QSslError> ssl_errors) {
|
||||
void SubsonicBaseRequest::HandleSSLErrors(const QList<QSslError> &ssl_errors) {
|
||||
|
||||
for (QSslError &ssl_error : ssl_errors) {
|
||||
for (const QSslError &ssl_error : ssl_errors) {
|
||||
Error(ssl_error.errorString());
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class SubsonicBaseRequest : public QObject {
|
||||
bool download_album_covers() const { return service_->download_album_covers(); }
|
||||
|
||||
private slots:
|
||||
void HandleSSLErrors(QList<QSslError> ssl_errors);
|
||||
void HandleSSLErrors(const QList<QSslError> &ssl_errors);
|
||||
|
||||
private:
|
||||
SubsonicService *service_;
|
||||
|
||||
@@ -355,7 +355,7 @@ void SubsonicRequest::FlushAlbumSongsRequests() {
|
||||
|
||||
}
|
||||
|
||||
void SubsonicRequest::AlbumSongsReplyReceived(QNetworkReply *reply, const QString artist_id, const QString album_id, const QString album_artist) {
|
||||
void SubsonicRequest::AlbumSongsReplyReceived(QNetworkReply *reply, const QString &artist_id, const QString &album_id, const QString &album_artist) {
|
||||
|
||||
if (!replies_.contains(reply)) return;
|
||||
replies_.removeAll(reply);
|
||||
@@ -753,7 +753,7 @@ void SubsonicRequest::FlushAlbumCoverRequests() {
|
||||
|
||||
}
|
||||
|
||||
void SubsonicRequest::AlbumCoverReceived(QNetworkReply *reply, const QUrl url, const QString filename) {
|
||||
void SubsonicRequest::AlbumCoverReceived(QNetworkReply *reply, const QUrl &url, const QString &filename) {
|
||||
|
||||
if (album_cover_replies_.contains(reply)) {
|
||||
album_cover_replies_.removeAll(reply);
|
||||
|
||||
@@ -68,8 +68,8 @@ class SubsonicRequest : public SubsonicBaseRequest {
|
||||
|
||||
private slots:
|
||||
void AlbumsReplyReceived(QNetworkReply *reply, const int offset_requested);
|
||||
void AlbumSongsReplyReceived(QNetworkReply *reply, const QString artist_id, const QString album_id, const QString album_artist);
|
||||
void AlbumCoverReceived(QNetworkReply *reply, const QUrl url, const QString filename);
|
||||
void AlbumSongsReplyReceived(QNetworkReply *reply, const QString &artist_id, const QString &album_id, const QString &album_artist);
|
||||
void AlbumCoverReceived(QNetworkReply *reply, const QUrl &url, const QString &filename);
|
||||
|
||||
private:
|
||||
typedef QPair<QString, QString> Param;
|
||||
|
||||
@@ -58,7 +58,7 @@ SubsonicScrobbleRequest::~SubsonicScrobbleRequest() {
|
||||
|
||||
}
|
||||
|
||||
void SubsonicScrobbleRequest::CreateScrobbleRequest(const QString song_id, const bool submission, const QDateTime start_time) {
|
||||
void SubsonicScrobbleRequest::CreateScrobbleRequest(const QString &song_id, const bool submission, const QDateTime &start_time) {
|
||||
|
||||
Request request;
|
||||
request.song_id = song_id;
|
||||
|
||||
@@ -48,7 +48,7 @@ class SubsonicScrobbleRequest : public SubsonicBaseRequest {
|
||||
explicit SubsonicScrobbleRequest(SubsonicService *service, SubsonicUrlHandler *url_handler, Application *app, QObject *parent);
|
||||
~SubsonicScrobbleRequest() override;
|
||||
|
||||
void CreateScrobbleRequest(const QString song_id, const bool submission, const QDateTime start_time);
|
||||
void CreateScrobbleRequest(const QString &song_id, const bool submission, const QDateTime &start_time);
|
||||
|
||||
private slots:
|
||||
void ScrobbleReplyReceived(QNetworkReply *reply);
|
||||
|
||||
@@ -212,9 +212,9 @@ void SubsonicService::SendPingWithCredentials(QUrl url, const QString &username,
|
||||
|
||||
}
|
||||
|
||||
void SubsonicService::HandlePingSSLErrors(QList<QSslError> ssl_errors) {
|
||||
void SubsonicService::HandlePingSSLErrors(const QList<QSslError> &ssl_errors) {
|
||||
|
||||
for (QSslError &ssl_error : ssl_errors) {
|
||||
for (const QSslError &ssl_error : ssl_errors) {
|
||||
errors_ += ssl_error.errorString();
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ void SubsonicService::CheckConfiguration() {
|
||||
|
||||
}
|
||||
|
||||
void SubsonicService::Scrobble(const QString &song_id, const bool submission, const QDateTime time) {
|
||||
void SubsonicService::Scrobble(const QString &song_id, const bool submission, const QDateTime &time) {
|
||||
|
||||
if (!server_url().isValid() || username().isEmpty() || password().isEmpty()) {
|
||||
return;
|
||||
|
||||
@@ -82,7 +82,7 @@ class SubsonicService : public InternetService {
|
||||
QSortFilterProxyModel *songs_collection_sort_model() override { return collection_sort_model_; }
|
||||
|
||||
void CheckConfiguration();
|
||||
void Scrobble(const QString &song_id, const bool submission, const QDateTime time);
|
||||
void Scrobble(const QString &song_id, const bool submission, const QDateTime &time);
|
||||
|
||||
public slots:
|
||||
void ShowConfig() override;
|
||||
@@ -92,7 +92,7 @@ class SubsonicService : public InternetService {
|
||||
void ResetSongsRequest() override;
|
||||
|
||||
private slots:
|
||||
void HandlePingSSLErrors(QList<QSslError> ssl_errors);
|
||||
void HandlePingSSLErrors(const QList<QSslError> &ssl_errors);
|
||||
void HandlePingReply(QNetworkReply *reply, const QUrl &url, const QString &username, const QString &password);
|
||||
void SongsResultsReceived(const SongList &songs, const QString &error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user