internet services: consistently use 'override'
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
This commit is contained in:
parent
63208b4e1f
commit
8e47ab59e5
@ -41,16 +41,16 @@ class DigitallyImportedServiceBase : public InternetService {
|
|||||||
const QString& api_service_name,
|
const QString& api_service_name,
|
||||||
Application* app, InternetModel* model,
|
Application* app, InternetModel* model,
|
||||||
bool has_premium, QObject* parent = nullptr);
|
bool has_premium, QObject* parent = nullptr);
|
||||||
~DigitallyImportedServiceBase();
|
~DigitallyImportedServiceBase() override;
|
||||||
|
|
||||||
static const char* kSettingsGroup;
|
static const char* kSettingsGroup;
|
||||||
static const int kStreamsCacheDurationSecs;
|
static const int kStreamsCacheDurationSecs;
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* parent);
|
void LazyPopulate(QStandardItem* parent) override;
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
bool is_premium_account() const;
|
bool is_premium_account() const;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class IcecastService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
IcecastService(Application* app, InternetModel* parent);
|
IcecastService(Application* app, InternetModel* parent);
|
||||||
~IcecastService();
|
~IcecastService() override;
|
||||||
|
|
||||||
static const char* kServiceName;
|
static const char* kServiceName;
|
||||||
static const char* kDirectoryUrl;
|
static const char* kDirectoryUrl;
|
||||||
@ -51,12 +51,12 @@ class IcecastService : public InternetService {
|
|||||||
Type_Genre,
|
Type_Genre,
|
||||||
};
|
};
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
|
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
QWidget* HeaderWidget() const;
|
QWidget* HeaderWidget() const override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void LoadDirectory();
|
void LoadDirectory();
|
||||||
|
@ -39,7 +39,7 @@ class IntergalacticFMServiceBase : public InternetService {
|
|||||||
const QString& name, const QUrl& channel_list_url,
|
const QString& name, const QUrl& channel_list_url,
|
||||||
const QUrl& homepage_url,
|
const QUrl& homepage_url,
|
||||||
const QUrl& donate_page_url, const QIcon& icon);
|
const QUrl& donate_page_url, const QIcon& icon);
|
||||||
~IntergalacticFMServiceBase();
|
~IntergalacticFMServiceBase() override;
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType {
|
||||||
Type_Stream = 2000,
|
Type_Stream = 2000,
|
||||||
@ -59,14 +59,14 @@ class IntergalacticFMServiceBase : public InternetService {
|
|||||||
const QString& url_scheme() const { return url_scheme_; }
|
const QString& url_scheme() const { return url_scheme_; }
|
||||||
const QIcon& icon() const { return icon_; }
|
const QIcon& icon() const { return icon_; }
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
PlaylistItem::Options playlistitem_options() const;
|
PlaylistItem::Options playlistitem_options() const override;
|
||||||
QNetworkAccessManager* network() const { return network_; }
|
QNetworkAccessManager* network() const { return network_; }
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
bool IsStreamListStale() const { return streams_.IsStale(); }
|
bool IsStreamListStale() const { return streams_.IsStale(); }
|
||||||
StreamList Streams();
|
StreamList Streams();
|
||||||
|
@ -34,7 +34,7 @@ class SavedRadio : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SavedRadio(Application* app, InternetModel* parent);
|
SavedRadio(Application* app, InternetModel* parent);
|
||||||
~SavedRadio();
|
~SavedRadio() override;
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType {
|
||||||
Type_Stream = 2000,
|
Type_Stream = 2000,
|
||||||
@ -57,10 +57,10 @@ class SavedRadio : public InternetService {
|
|||||||
static const char* kServiceName;
|
static const char* kServiceName;
|
||||||
static const char* kSettingsGroup;
|
static const char* kSettingsGroup;
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
|
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
void Add(const QUrl& url, const QString& name = QString(),
|
void Add(const QUrl& url, const QString& name = QString(),
|
||||||
const QUrl& url_logo = QUrl());
|
const QUrl& url_logo = QUrl());
|
||||||
|
@ -43,14 +43,14 @@ class JamendoService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
JamendoService(Application* app, InternetModel* parent);
|
JamendoService(Application* app, InternetModel* parent);
|
||||||
~JamendoService();
|
~JamendoService() override;
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
|
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
QWidget* HeaderWidget() const;
|
QWidget* HeaderWidget() const override;
|
||||||
|
|
||||||
LibraryBackend* library_backend() const { return library_backend_.get(); }
|
LibraryBackend* library_backend() const { return library_backend_.get(); }
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MagnatuneService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
MagnatuneService(Application* app, InternetModel* parent);
|
MagnatuneService(Application* app, InternetModel* parent);
|
||||||
~MagnatuneService();
|
~MagnatuneService() override;
|
||||||
|
|
||||||
// Values are saved in QSettings and are indices into the combo box in
|
// Values are saved in QSettings and are indices into the combo box in
|
||||||
// MagnatuneConfig
|
// MagnatuneConfig
|
||||||
@ -71,14 +71,14 @@ class MagnatuneService : public InternetService {
|
|||||||
|
|
||||||
static QString ReadElementText(QXmlStreamReader& reader);
|
static QString ReadElementText(QXmlStreamReader& reader);
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
|
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
QWidget* HeaderWidget() const;
|
QWidget* HeaderWidget() const override;
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
// Magnatune specific stuff
|
// Magnatune specific stuff
|
||||||
MembershipType membership_type() const { return membership_; }
|
MembershipType membership_type() const { return membership_; }
|
||||||
@ -99,7 +99,7 @@ class MagnatuneService : public InternetService {
|
|||||||
|
|
||||||
void Download();
|
void Download();
|
||||||
void Homepage();
|
void Homepage();
|
||||||
void ShowConfig();
|
void ShowConfig() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EnsureMenuCreated();
|
void EnsureMenuCreated();
|
||||||
|
@ -44,7 +44,7 @@ class PodcastService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PodcastService(Application* app, InternetModel* parent);
|
PodcastService(Application* app, InternetModel* parent);
|
||||||
~PodcastService();
|
~PodcastService() override;
|
||||||
|
|
||||||
static const char* kServiceName;
|
static const char* kServiceName;
|
||||||
static const char* kSettingsGroup;
|
static const char* kSettingsGroup;
|
||||||
@ -57,12 +57,12 @@ class PodcastService : public InternetService {
|
|||||||
|
|
||||||
enum Role { Role_Podcast = InternetModel::RoleCount, Role_Episode };
|
enum Role { Role_Podcast = InternetModel::RoleCount, Role_Episode };
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* parent);
|
void LazyPopulate(QStandardItem* parent) override;
|
||||||
bool has_initial_load_settings() const { return true; }
|
bool has_initial_load_settings() const override { return true; }
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
void InitialLoadSettings();
|
void InitialLoadSettings() override;
|
||||||
// Called by SongLoader when the user adds a Podcast URL directly. Adds a
|
// Called by SongLoader when the user adds a Podcast URL directly. Adds a
|
||||||
// subscription to the podcast and displays it in the UI. If the QVariant
|
// subscription to the podcast and displays it in the UI. If the QVariant
|
||||||
// contains an OPML file then this displays it in the Add Podcast dialog.
|
// contains an OPML file then this displays it in the Add Podcast dialog.
|
||||||
@ -81,7 +81,7 @@ class PodcastService : public InternetService {
|
|||||||
void DeleteDownloadedData();
|
void DeleteDownloadedData();
|
||||||
void SetNew();
|
void SetNew();
|
||||||
void SetListened();
|
void SetListened();
|
||||||
void ShowConfig();
|
void ShowConfig() override;
|
||||||
|
|
||||||
void SubscriptionAdded(const Podcast& podcast);
|
void SubscriptionAdded(const Podcast& podcast);
|
||||||
void SubscriptionRemoved(const Podcast& podcast);
|
void SubscriptionRemoved(const Podcast& podcast);
|
||||||
|
@ -35,7 +35,7 @@ class RadioBrowserService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RadioBrowserService(Application* app, InternetModel* parent);
|
RadioBrowserService(Application* app, InternetModel* parent);
|
||||||
~RadioBrowserService(){};
|
~RadioBrowserService() override{};
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType {
|
||||||
Type_Stream = 2000,
|
Type_Stream = 2000,
|
||||||
|
@ -39,7 +39,7 @@ class SomaFMServiceBase : public InternetService {
|
|||||||
const QString& name, const QUrl& channel_list_url,
|
const QString& name, const QUrl& channel_list_url,
|
||||||
const QUrl& homepage_url, const QUrl& donate_page_url,
|
const QUrl& homepage_url, const QUrl& donate_page_url,
|
||||||
const QIcon& icon);
|
const QIcon& icon);
|
||||||
~SomaFMServiceBase();
|
~SomaFMServiceBase() override;
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType {
|
||||||
Type_Stream = 2000,
|
Type_Stream = 2000,
|
||||||
@ -59,14 +59,14 @@ class SomaFMServiceBase : public InternetService {
|
|||||||
const QString& url_scheme() const { return url_scheme_; }
|
const QString& url_scheme() const { return url_scheme_; }
|
||||||
const QIcon& icon() const { return icon_; }
|
const QIcon& icon() const { return icon_; }
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
|
|
||||||
PlaylistItem::Options playlistitem_options() const;
|
PlaylistItem::Options playlistitem_options() const override;
|
||||||
QNetworkAccessManager* network() const { return network_; }
|
QNetworkAccessManager* network() const { return network_; }
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
bool IsStreamListStale() const { return streams_.IsStale(); }
|
bool IsStreamListStale() const { return streams_.IsStale(); }
|
||||||
StreamList Streams();
|
StreamList Streams();
|
||||||
|
@ -42,7 +42,7 @@ class SubsonicService : public InternetService {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SubsonicService(Application* app, InternetModel* parent);
|
SubsonicService(Application* app, InternetModel* parent);
|
||||||
~SubsonicService();
|
~SubsonicService() override;
|
||||||
|
|
||||||
enum LoginState {
|
enum LoginState {
|
||||||
LoginState_Loggedin,
|
LoginState_Loggedin,
|
||||||
@ -90,11 +90,11 @@ class SubsonicService : public InternetService {
|
|||||||
bool IsConfigured() const;
|
bool IsConfigured() const;
|
||||||
bool IsAmpache() const;
|
bool IsAmpache() const;
|
||||||
|
|
||||||
QStandardItem* CreateRootItem();
|
QStandardItem* CreateRootItem() override;
|
||||||
void LazyPopulate(QStandardItem* item);
|
void LazyPopulate(QStandardItem* item) override;
|
||||||
void ShowContextMenu(const QPoint& global_pos);
|
void ShowContextMenu(const QPoint& global_pos) override;
|
||||||
QWidget* HeaderWidget() const;
|
QWidget* HeaderWidget() const override;
|
||||||
void ReloadSettings();
|
void ReloadSettings() override;
|
||||||
|
|
||||||
void Login();
|
void Login();
|
||||||
void Login(const QString& server, const QString& username,
|
void Login(const QString& server, const QString& username,
|
||||||
@ -175,7 +175,7 @@ class SubsonicService : public InternetService {
|
|||||||
void OnLoginStateChanged(SubsonicService::LoginState newstate);
|
void OnLoginStateChanged(SubsonicService::LoginState newstate);
|
||||||
void OnPingFinished(QNetworkReply* reply);
|
void OnPingFinished(QNetworkReply* reply);
|
||||||
|
|
||||||
void ShowConfig();
|
void ShowConfig() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SubsonicLibraryScanner : public QObject {
|
class SubsonicLibraryScanner : public QObject {
|
||||||
@ -184,7 +184,7 @@ class SubsonicLibraryScanner : public QObject {
|
|||||||
public:
|
public:
|
||||||
explicit SubsonicLibraryScanner(SubsonicService* service,
|
explicit SubsonicLibraryScanner(SubsonicService* service,
|
||||||
QObject* parent = nullptr);
|
QObject* parent = nullptr);
|
||||||
~SubsonicLibraryScanner();
|
~SubsonicLibraryScanner() override;
|
||||||
|
|
||||||
void Scan();
|
void Scan();
|
||||||
const SongList& GetSongs() const { return songs_; }
|
const SongList& GetSongs() const { return songs_; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user