diff --git a/src/qobuz/qobuzbaserequest.h b/src/qobuz/qobuzbaserequest.h index d25f63d03..6dc47026e 100644 --- a/src/qobuz/qobuzbaserequest.h +++ b/src/qobuz/qobuzbaserequest.h @@ -72,24 +72,24 @@ class QobuzBaseRequest : public QObject { virtual void Error(const QString &error, const QVariant &debug = QVariant()) = 0; static QString ErrorsToHTML(const QStringList &errors); - QString app_id() { return service_->app_id(); } - QString app_secret() { return service_->app_secret(); } - QString username() { return service_->username(); } - QString password() { return service_->password(); } - int format() { return service_->format(); } - int artistssearchlimit() { return service_->artistssearchlimit(); } - int albumssearchlimit() { return service_->albumssearchlimit(); } - int songssearchlimit() { return service_->songssearchlimit(); } + QString app_id() const { return service_->app_id(); } + QString app_secret() const { return service_->app_secret(); } + QString username() const { return service_->username(); } + QString password() const { return service_->password(); } + int format() const { return service_->format(); } + int artistssearchlimit() const { return service_->artistssearchlimit(); } + int albumssearchlimit() const { return service_->albumssearchlimit(); } + int songssearchlimit() const { return service_->songssearchlimit(); } - qint64 user_id() { return service_->user_id(); } - QString user_auth_token() { return service_->user_auth_token(); } - QString device_id() { return service_->device_id(); } - qint64 credential_id() { return service_->credential_id(); } + qint64 user_id() const { return service_->user_id(); } + QString user_auth_token() const { return service_->user_auth_token(); } + QString device_id() const { return service_->device_id(); } + qint64 credential_id() const { return service_->credential_id(); } - bool authenticated() { return service_->authenticated(); } - bool login_sent() { return service_->login_sent(); } - int max_login_attempts() { return service_->max_login_attempts(); } - int login_attempts() { return service_->login_attempts(); } + bool authenticated() const { return service_->authenticated(); } + bool login_sent() const { return service_->login_sent(); } + int max_login_attempts() const { return service_->max_login_attempts(); } + int login_attempts() const { return service_->login_attempts(); } private slots: void HandleSSLErrors(const QList &ssl_errors); diff --git a/src/qobuz/qobuzstreamurlrequest.h b/src/qobuz/qobuzstreamurlrequest.h index 97a44ffb8..d1dce5356 100644 --- a/src/qobuz/qobuzstreamurlrequest.h +++ b/src/qobuz/qobuzstreamurlrequest.h @@ -49,9 +49,9 @@ class QobuzStreamURLRequest : public QobuzBaseRequest { void NeedLogin() { need_login_ = true; } void Cancel(); - QUrl media_url() { return media_url_; } - int song_id() { return song_id_; } - bool need_login() { return need_login_; } + QUrl media_url() const { return media_url_; } + int song_id() const { return song_id_; } + bool need_login() const { return need_login_; } signals: void TryLogin(); diff --git a/src/spotify/spotifybaserequest.h b/src/spotify/spotifybaserequest.h index faa43626e..a8de6ff8f 100644 --- a/src/spotify/spotifybaserequest.h +++ b/src/spotify/spotifybaserequest.h @@ -71,13 +71,13 @@ class SpotifyBaseRequest : public QObject { virtual void Error(const QString &error, const QVariant &debug = QVariant()) = 0; static QString ErrorsToHTML(const QStringList &errors); - int artistssearchlimit() { return service_->artistssearchlimit(); } - int albumssearchlimit() { return service_->albumssearchlimit(); } - int songssearchlimit() { return service_->songssearchlimit(); } + int artistssearchlimit() const { return service_->artistssearchlimit(); } + int albumssearchlimit() const { return service_->albumssearchlimit(); } + int songssearchlimit() const { return service_->songssearchlimit(); } - QString access_token() { return service_->access_token(); } + QString access_token() const { return service_->access_token(); } - bool authenticated() { return service_->authenticated(); } + bool authenticated() const { return service_->authenticated(); } private slots: void HandleSSLErrors(const QList &ssl_errors); diff --git a/src/spotify/spotifyservice.h b/src/spotify/spotifyservice.h index 55c0b586e..7498cadd4 100644 --- a/src/spotify/spotifyservice.h +++ b/src/spotify/spotifyservice.h @@ -73,13 +73,13 @@ class SpotifyService : public StreamingService { Application *app() { return app_; } - int artistssearchlimit() { return artistssearchlimit_; } - int albumssearchlimit() { return albumssearchlimit_; } - int songssearchlimit() { return songssearchlimit_; } - bool fetchalbums() { return fetchalbums_; } - bool download_album_covers() { return download_album_covers_; } + int artistssearchlimit() const { return artistssearchlimit_; } + int albumssearchlimit() const { return albumssearchlimit_; } + int songssearchlimit() const { return songssearchlimit_; } + bool fetchalbums() const { return fetchalbums_; } + bool download_album_covers() const { return download_album_covers_; } - QString access_token() { return access_token_; } + QString access_token() const { return access_token_; } bool authenticated() const override { return !access_token_.isEmpty(); } diff --git a/src/tidal/tidalbaserequest.h b/src/tidal/tidalbaserequest.h index 3f669aa97..3064b57b8 100644 --- a/src/tidal/tidalbaserequest.h +++ b/src/tidal/tidalbaserequest.h @@ -72,25 +72,25 @@ class TidalBaseRequest : public QObject { virtual void Error(const QString &error, const QVariant &debug = QVariant()) = 0; static QString ErrorsToHTML(const QStringList &errors); - bool oauth() { return service_->oauth(); } - QString client_id() { return service_->client_id(); } - QString api_token() { return service_->api_token(); } - quint64 user_id() { return service_->user_id(); } - QString country_code() { return service_->country_code(); } - QString username() { return service_->username(); } - QString password() { return service_->password(); } - QString quality() { return service_->quality(); } - int artistssearchlimit() { return service_->artistssearchlimit(); } - int albumssearchlimit() { return service_->albumssearchlimit(); } - int songssearchlimit() { return service_->songssearchlimit(); } + bool oauth() const { return service_->oauth(); } + QString client_id() const { return service_->client_id(); } + QString api_token() const { return service_->api_token(); } + quint64 user_id() const { return service_->user_id(); } + QString country_code() const { return service_->country_code(); } + QString username() const { return service_->username(); } + QString password() const { return service_->password(); } + QString quality() const { return service_->quality(); } + int artistssearchlimit() const { return service_->artistssearchlimit(); } + int albumssearchlimit() const { return service_->albumssearchlimit(); } + int songssearchlimit() const { return service_->songssearchlimit(); } - QString access_token() { return service_->access_token(); } - QString session_id() { return service_->session_id(); } + QString access_token() const { return service_->access_token(); } + QString session_id() const { return service_->session_id(); } - bool authenticated() { return service_->authenticated(); } - bool login_sent() { return service_->login_sent(); } - int max_login_attempts() { return service_->max_login_attempts(); } - int login_attempts() { return service_->login_attempts(); } + bool authenticated() const { return service_->authenticated(); } + bool login_sent() const { return service_->login_sent(); } + int max_login_attempts() const { return service_->max_login_attempts(); } + int login_attempts() const { return service_->login_attempts(); } virtual void set_need_login() = 0; diff --git a/src/tidal/tidalfavoriterequest.h b/src/tidal/tidalfavoriterequest.h index fc5377488..2cc890f67 100644 --- a/src/tidal/tidalfavoriterequest.h +++ b/src/tidal/tidalfavoriterequest.h @@ -43,7 +43,7 @@ class TidalFavoriteRequest : public TidalBaseRequest { explicit TidalFavoriteRequest(TidalService *service, SharedPtr network, QObject *parent = nullptr); ~TidalFavoriteRequest() override; - bool need_login() { return need_login_; } + bool need_login() const { return need_login_; } void set_need_login() override { need_login_ = true; } private: diff --git a/src/tidal/tidalstreamurlrequest.h b/src/tidal/tidalstreamurlrequest.h index 031c8a988..e10f613af 100644 --- a/src/tidal/tidalstreamurlrequest.h +++ b/src/tidal/tidalstreamurlrequest.h @@ -49,13 +49,13 @@ class TidalStreamURLRequest : public TidalBaseRequest { void Process(); void Cancel(); - bool oauth() { return service_->oauth(); } - TidalSettingsPage::StreamUrlMethod stream_url_method() { return service_->stream_url_method(); } - QUrl media_url() { return media_url_; } - int song_id() { return song_id_; } + bool oauth() const { return service_->oauth(); } + TidalSettingsPage::StreamUrlMethod stream_url_method() const { return service_->stream_url_method(); } + QUrl media_url() const { return media_url_; } + int song_id() const { return song_id_; } void set_need_login() override { need_login_ = true; } - bool need_login() { return need_login_; } + bool need_login() const { return need_login_; } signals: void TryLogin();