Use override
This commit is contained in:
@@ -48,8 +48,6 @@ TidalBaseRequest::TidalBaseRequest(TidalService *service, NetworkAccessManager *
|
||||
network_(network)
|
||||
{}
|
||||
|
||||
TidalBaseRequest::~TidalBaseRequest() {}
|
||||
|
||||
QNetworkReply *TidalBaseRequest::CreateRequest(const QString &ressource_name, const QList<Param> ¶ms_provided) {
|
||||
|
||||
ParamList params = ParamList() << params_provided
|
||||
|
||||
@@ -58,7 +58,6 @@ class TidalBaseRequest : public QObject {
|
||||
};
|
||||
|
||||
TidalBaseRequest(TidalService *service, NetworkAccessManager *network, QObject *parent);
|
||||
~TidalBaseRequest();
|
||||
|
||||
typedef QPair<QString, QString> Param;
|
||||
typedef QList<Param> ParamList;
|
||||
|
||||
@@ -39,7 +39,7 @@ class TidalFavoriteRequest : public TidalBaseRequest {
|
||||
|
||||
public:
|
||||
TidalFavoriteRequest(TidalService *service, NetworkAccessManager *network, QObject *parent);
|
||||
~TidalFavoriteRequest();
|
||||
~TidalFavoriteRequest() override;
|
||||
|
||||
enum FavoriteType {
|
||||
FavoriteType_Artists,
|
||||
@@ -49,7 +49,7 @@ class TidalFavoriteRequest : public TidalBaseRequest {
|
||||
|
||||
bool need_login() { return need_login_; }
|
||||
|
||||
void NeedLogin() { need_login_ = true; }
|
||||
void NeedLogin() override { need_login_ = true; }
|
||||
|
||||
signals:
|
||||
void ArtistsAdded(const SongList &songs);
|
||||
@@ -72,7 +72,7 @@ class TidalFavoriteRequest : public TidalBaseRequest {
|
||||
void RemoveFavoritesReply(QNetworkReply *reply, const FavoriteType type, const SongList &songs);
|
||||
|
||||
private:
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
QString FavoriteText(const FavoriteType type);
|
||||
void AddFavorites(const FavoriteType type, const SongList &songs);
|
||||
void RemoveFavorites(const FavoriteType type, const SongList songs);
|
||||
|
||||
@@ -52,12 +52,12 @@ class TidalRequest : public TidalBaseRequest {
|
||||
public:
|
||||
|
||||
TidalRequest(TidalService *service, TidalUrlHandler *url_handler, Application *app, NetworkAccessManager *network, QueryType type, QObject *parent);
|
||||
~TidalRequest();
|
||||
~TidalRequest() override;
|
||||
|
||||
void ReloadSettings();
|
||||
|
||||
void Process();
|
||||
void NeedLogin() { need_login_ = true; }
|
||||
void NeedLogin() override { need_login_ = true; }
|
||||
void Search(const int query_id, const QString &search_text);
|
||||
|
||||
signals:
|
||||
@@ -142,7 +142,7 @@ class TidalRequest : public TidalBaseRequest {
|
||||
|
||||
void FinishCheck();
|
||||
void Warn(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
static const char *kResourcesUrl;
|
||||
static const int kMaxConcurrentArtistsRequests;
|
||||
|
||||
@@ -60,22 +60,22 @@ class TidalService : public InternetService {
|
||||
|
||||
public:
|
||||
TidalService(Application *app, QObject *parent);
|
||||
~TidalService();
|
||||
~TidalService() override;
|
||||
|
||||
static const Song::Source kSource;
|
||||
|
||||
void Exit();
|
||||
void ReloadSettings();
|
||||
void Exit() override;
|
||||
void ReloadSettings() override;
|
||||
|
||||
void Logout();
|
||||
int Search(const QString &text, InternetSearchView::SearchType type);
|
||||
void CancelSearch();
|
||||
int Search(const QString &text, InternetSearchView::SearchType type) override;
|
||||
void CancelSearch() override;
|
||||
|
||||
int max_login_attempts() { return kLoginAttempts; }
|
||||
|
||||
Application *app() { return app_; }
|
||||
|
||||
bool oauth() { return oauth_; }
|
||||
bool oauth() override { return oauth_; }
|
||||
QString client_id() { return client_id_; }
|
||||
QString api_token() { return api_token_; }
|
||||
quint64 user_id() { return user_id_; }
|
||||
@@ -94,23 +94,23 @@ class TidalService : public InternetService {
|
||||
QString access_token() { return access_token_; }
|
||||
QString session_id() { return session_id_; }
|
||||
|
||||
bool authenticated() { return (!access_token_.isEmpty() || !session_id_.isEmpty()); }
|
||||
bool authenticated() override { return (!access_token_.isEmpty() || !session_id_.isEmpty()); }
|
||||
bool login_sent() { return login_sent_; }
|
||||
bool login_attempts() { return login_attempts_; }
|
||||
|
||||
void GetStreamURL(const QUrl &url);
|
||||
|
||||
CollectionBackend *artists_collection_backend() { return artists_collection_backend_; }
|
||||
CollectionBackend *albums_collection_backend() { return albums_collection_backend_; }
|
||||
CollectionBackend *songs_collection_backend() { return songs_collection_backend_; }
|
||||
CollectionBackend *artists_collection_backend() override { return artists_collection_backend_; }
|
||||
CollectionBackend *albums_collection_backend() override { return albums_collection_backend_; }
|
||||
CollectionBackend *songs_collection_backend() override { return songs_collection_backend_; }
|
||||
|
||||
CollectionModel *artists_collection_model() { return artists_collection_model_; }
|
||||
CollectionModel *albums_collection_model() { return albums_collection_model_; }
|
||||
CollectionModel *songs_collection_model() { return songs_collection_model_; }
|
||||
CollectionModel *artists_collection_model() override { return artists_collection_model_; }
|
||||
CollectionModel *albums_collection_model() override { return albums_collection_model_; }
|
||||
CollectionModel *songs_collection_model() override { return songs_collection_model_; }
|
||||
|
||||
QSortFilterProxyModel *artists_collection_sort_model() { return artists_collection_sort_model_; }
|
||||
QSortFilterProxyModel *albums_collection_sort_model() { return albums_collection_sort_model_; }
|
||||
QSortFilterProxyModel *songs_collection_sort_model() { return songs_collection_sort_model_; }
|
||||
QSortFilterProxyModel *artists_collection_sort_model() override { return artists_collection_sort_model_; }
|
||||
QSortFilterProxyModel *albums_collection_sort_model() override { return albums_collection_sort_model_; }
|
||||
QSortFilterProxyModel *songs_collection_sort_model() override { return songs_collection_sort_model_; }
|
||||
|
||||
enum QueryType {
|
||||
QueryType_Artists,
|
||||
@@ -124,15 +124,15 @@ class TidalService : public InternetService {
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void ShowConfig();
|
||||
void ShowConfig() override;
|
||||
void TryLogin();
|
||||
void SendLogin(const QString &api_token, const QString &username, const QString &password);
|
||||
void GetArtists();
|
||||
void GetAlbums();
|
||||
void GetSongs();
|
||||
void ResetArtistsRequest();
|
||||
void ResetAlbumsRequest();
|
||||
void ResetSongsRequest();
|
||||
void GetArtists() override;
|
||||
void GetAlbums() override;
|
||||
void GetSongs() override;
|
||||
void ResetArtistsRequest() override;
|
||||
void ResetAlbumsRequest() override;
|
||||
void ResetSongsRequest() override;
|
||||
|
||||
private slots:
|
||||
void ExitReceived();
|
||||
|
||||
@@ -42,11 +42,11 @@ class TidalStreamURLRequest : public TidalBaseRequest {
|
||||
|
||||
public:
|
||||
TidalStreamURLRequest(TidalService *service, NetworkAccessManager *network, const QUrl &original_url, QObject *parent);
|
||||
~TidalStreamURLRequest();
|
||||
~TidalStreamURLRequest() override;
|
||||
|
||||
void GetStreamURL();
|
||||
void Process();
|
||||
void NeedLogin() { need_login_ = true; }
|
||||
void NeedLogin() override { need_login_ = true; }
|
||||
void Cancel();
|
||||
|
||||
bool oauth() { return service_->oauth(); }
|
||||
@@ -64,7 +64,7 @@ class TidalStreamURLRequest : public TidalBaseRequest {
|
||||
void StreamURLReceived();
|
||||
|
||||
private:
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
TidalService *service_;
|
||||
QNetworkReply *reply_;
|
||||
|
||||
@@ -39,8 +39,8 @@ class TidalUrlHandler : public UrlHandler {
|
||||
public:
|
||||
TidalUrlHandler(Application *app, TidalService *service);
|
||||
|
||||
QString scheme() const { return service_->url_scheme(); }
|
||||
LoadResult StartLoading(const QUrl &url);
|
||||
QString scheme() const override { return service_->url_scheme(); }
|
||||
LoadResult StartLoading(const QUrl &url) override;
|
||||
|
||||
void CancelTask();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user