Use override
This commit is contained in:
@@ -58,7 +58,7 @@ class AlbumCoverChoiceController : public QWidget {
|
||||
static const char *kAllFilesFilter;
|
||||
|
||||
explicit AlbumCoverChoiceController(QWidget *parent = nullptr);
|
||||
~AlbumCoverChoiceController();
|
||||
~AlbumCoverChoiceController() override;
|
||||
|
||||
void Init(Application *app);
|
||||
void ReloadSettings();
|
||||
|
||||
@@ -36,7 +36,7 @@ class AlbumCoverExport : public QDialog {
|
||||
|
||||
public:
|
||||
explicit AlbumCoverExport(QWidget *parent = nullptr);
|
||||
~AlbumCoverExport();
|
||||
~AlbumCoverExport() override;
|
||||
|
||||
enum OverwriteMode {
|
||||
OverwriteMode_None = 0,
|
||||
|
||||
@@ -38,7 +38,6 @@ class AlbumCoverExporter : public QObject {
|
||||
|
||||
public:
|
||||
explicit AlbumCoverExporter(QObject *parent = nullptr);
|
||||
virtual ~AlbumCoverExporter() {}
|
||||
|
||||
static const int kMaxConcurrentRequests;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class AlbumCoverFetcher : public QObject {
|
||||
|
||||
public:
|
||||
explicit AlbumCoverFetcher(CoverProviders *cover_providers, QObject *parent = nullptr, QNetworkAccessManager *network = 0);
|
||||
~AlbumCoverFetcher();
|
||||
~AlbumCoverFetcher() override;
|
||||
|
||||
static const int kMaxConcurrentRequests;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class AlbumCoverFetcherSearch : public QObject {
|
||||
|
||||
public:
|
||||
explicit AlbumCoverFetcherSearch(const CoverSearchRequest &request, QNetworkAccessManager *network, QObject *parent);
|
||||
~AlbumCoverFetcherSearch();
|
||||
~AlbumCoverFetcherSearch() override;
|
||||
|
||||
void Start(CoverProviders *cover_providers);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class AlbumCoverManager : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AlbumCoverManager(Application *app, CollectionBackend *collection_backend, QMainWindow *mainwindow, QWidget *parent = nullptr);
|
||||
~AlbumCoverManager();
|
||||
~AlbumCoverManager() override;
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -83,11 +83,11 @@ class AlbumCoverManager : public QMainWindow {
|
||||
SongMimeData *GetMimeDataForAlbums(const QModelIndexList &indexes) const;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent*);
|
||||
void closeEvent(QCloseEvent*);
|
||||
void showEvent(QShowEvent*) override;
|
||||
void closeEvent(QCloseEvent*) override;
|
||||
|
||||
// For the album view context menu events
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
private:
|
||||
enum ArtistItemType {
|
||||
|
||||
@@ -43,8 +43,8 @@ class AlbumCoverManagerList : public QListWidget {
|
||||
void set_cover_manager(AlbumCoverManager *manager) { manager_ = manager; }
|
||||
|
||||
protected:
|
||||
QMimeData *mimeData(const QList<QListWidgetItem*> items) const;
|
||||
void dropEvent(QDropEvent *event);
|
||||
QMimeData *mimeData(const QList<QListWidgetItem*> items) const override;
|
||||
void dropEvent(QDropEvent *event) override;
|
||||
|
||||
private:
|
||||
AlbumCoverManager* manager_;
|
||||
|
||||
@@ -60,7 +60,7 @@ class SizeOverlayDelegate : public QStyledItemDelegate {
|
||||
|
||||
explicit SizeOverlayDelegate(QObject *parent = nullptr);
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
};
|
||||
|
||||
// This is a dialog that lets the user search for album covers
|
||||
@@ -69,7 +69,7 @@ class AlbumCoverSearcher : public QDialog {
|
||||
|
||||
public:
|
||||
explicit AlbumCoverSearcher(const QIcon &no_cover_icon, Application *app, QWidget *parent);
|
||||
~AlbumCoverSearcher();
|
||||
~AlbumCoverSearcher() override;
|
||||
|
||||
enum Role {
|
||||
Role_ImageURL = Qt::UserRole + 1,
|
||||
@@ -84,7 +84,7 @@ class AlbumCoverSearcher : public QDialog {
|
||||
QImage Exec(const QString &artist, const QString &album);
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent*);
|
||||
void keyPressEvent(QKeyEvent*) override;
|
||||
|
||||
private slots:
|
||||
void Search();
|
||||
|
||||
@@ -35,11 +35,10 @@ class CoverExportRunnable : public QObject, public QRunnable {
|
||||
|
||||
public:
|
||||
explicit CoverExportRunnable(const AlbumCoverExport::DialogResult &dialog_result, const Song &song);
|
||||
virtual ~CoverExportRunnable() {}
|
||||
|
||||
void run();
|
||||
void run() override;
|
||||
|
||||
signals:
|
||||
signals:
|
||||
void CoverExported();
|
||||
void CoverSkipped();
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ class CoverFromURLDialog : public QDialog {
|
||||
|
||||
public:
|
||||
explicit CoverFromURLDialog(QWidget *parent = nullptr);
|
||||
~CoverFromURLDialog();
|
||||
~CoverFromURLDialog() override;
|
||||
|
||||
// Opens the dialog. This returns an image found at the URL chosen by user or null image if the dialog got rejected.
|
||||
QImage Exec();
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
void accept() override;
|
||||
void LoadCoverFromURLFinished();
|
||||
|
||||
private:
|
||||
|
||||
@@ -41,7 +41,7 @@ class CoverProviders : public QObject {
|
||||
|
||||
public:
|
||||
explicit CoverProviders(QObject *parent = nullptr);
|
||||
~CoverProviders();
|
||||
~CoverProviders() override;
|
||||
|
||||
void ReloadSettings();
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class CoverSearchStatisticsDialog : public QDialog {
|
||||
|
||||
public:
|
||||
explicit CoverSearchStatisticsDialog(QWidget *parent = nullptr);
|
||||
~CoverSearchStatisticsDialog();
|
||||
~CoverSearchStatisticsDialog() override;
|
||||
|
||||
void Show(const CoverSearchStatistics& statistics);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class CurrentAlbumCoverLoader : public QObject {
|
||||
|
||||
public:
|
||||
explicit CurrentAlbumCoverLoader(Application *app, QObject *parent = nullptr);
|
||||
~CurrentAlbumCoverLoader();
|
||||
~CurrentAlbumCoverLoader() override;
|
||||
|
||||
const AlbumCoverLoaderOptions &options() const { return options_; }
|
||||
const Song &last_song() const { return last_song_; }
|
||||
|
||||
@@ -41,10 +41,10 @@ class DeezerCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit DeezerCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~DeezerCoverProvider();
|
||||
~DeezerCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
private slots:
|
||||
void HandleSearchReply(QNetworkReply *reply, const int id);
|
||||
@@ -52,7 +52,7 @@ class DeezerCoverProvider : public JsonCoverProvider {
|
||||
private:
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
QJsonValue ExtractData(const QByteArray &data);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
static const char *kApiUrl;
|
||||
|
||||
@@ -50,10 +50,10 @@ class DiscogsCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit DiscogsCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~DiscogsCoverProvider();
|
||||
~DiscogsCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
enum DiscogsCoverType {
|
||||
DiscogsCoverType_Master,
|
||||
@@ -86,7 +86,7 @@ class DiscogsCoverProvider : public JsonCoverProvider {
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
void StartReleaseRequest(std::shared_ptr<DiscogsCoverSearchContext> search, const quint64 release_id, const QUrl &url);
|
||||
void EndSearch(std::shared_ptr<DiscogsCoverSearchContext> search, const quint64 release_id = 0);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private slots:
|
||||
void FlushRequests();
|
||||
|
||||
@@ -40,9 +40,9 @@ class LastFmCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit LastFmCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~LastFmCoverProvider();
|
||||
~LastFmCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
|
||||
private slots:
|
||||
void QueryFinished(QNetworkReply *reply, const int id, const QString &type);
|
||||
@@ -58,7 +58,7 @@ class LastFmCoverProvider : public JsonCoverProvider {
|
||||
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
LastFmImageSize ImageSizeFromString(const QString &size);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
static const char *kUrl;
|
||||
|
||||
@@ -42,9 +42,9 @@ class MusicbrainzCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit MusicbrainzCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~MusicbrainzCoverProvider();
|
||||
~MusicbrainzCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
|
||||
private slots:
|
||||
void FlushRequests();
|
||||
@@ -60,7 +60,7 @@ class MusicbrainzCoverProvider : public JsonCoverProvider {
|
||||
|
||||
void SendSearchRequest(const SearchRequest &request);
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
static const char *kReleaseSearchUrl;
|
||||
|
||||
@@ -38,13 +38,13 @@ class MusixmatchCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit MusixmatchCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~MusixmatchCoverProvider();
|
||||
~MusixmatchCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
private:
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private slots:
|
||||
void HandleSearchReply(QNetworkReply *reply, const int id, const QString &artist, const QString &album);
|
||||
|
||||
@@ -40,17 +40,17 @@ class QobuzCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit QobuzCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~QobuzCoverProvider();
|
||||
~QobuzCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
private slots:
|
||||
void HandleSearchReply(QNetworkReply *reply, const int id);
|
||||
|
||||
private:
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
static const char *kApiUrl;
|
||||
|
||||
@@ -46,14 +46,14 @@ class SpotifyCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit SpotifyCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~SpotifyCoverProvider();
|
||||
~SpotifyCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
void Authenticate();
|
||||
void Deauthenticate();
|
||||
bool IsAuthenticated() const { return !access_token_.isEmpty(); }
|
||||
void Authenticate() override;
|
||||
void Deauthenticate() override;
|
||||
bool IsAuthenticated() const override { return !access_token_.isEmpty(); }
|
||||
|
||||
private slots:
|
||||
void HandleLoginSSLErrors(QList<QSslError> ssl_errors);
|
||||
@@ -65,7 +65,7 @@ class SpotifyCoverProvider : public JsonCoverProvider {
|
||||
private:
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
void AuthError(const QString &error = QString(), const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
typedef QPair<QString, QString> Param;
|
||||
|
||||
@@ -44,20 +44,20 @@ class TidalCoverProvider : public JsonCoverProvider {
|
||||
|
||||
public:
|
||||
explicit TidalCoverProvider(Application *app, QObject *parent = nullptr);
|
||||
~TidalCoverProvider();
|
||||
~TidalCoverProvider() override;
|
||||
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id);
|
||||
void CancelSearch(const int id);
|
||||
bool StartSearch(const QString &artist, const QString &album, const QString &title, const int id) override;
|
||||
void CancelSearch(const int id) override;
|
||||
|
||||
bool IsAuthenticated() const { return service_ && service_->authenticated(); }
|
||||
void Deauthenticate() { if (service_) service_->Logout(); }
|
||||
bool IsAuthenticated() const override { return service_ && service_->authenticated(); }
|
||||
void Deauthenticate() override { if (service_) service_->Logout(); }
|
||||
|
||||
private slots:
|
||||
void HandleSearchReply(QNetworkReply *reply, const int id);
|
||||
|
||||
private:
|
||||
QByteArray GetReplyData(QNetworkReply *reply);
|
||||
void Error(const QString &error, const QVariant &debug = QVariant());
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
private:
|
||||
static const char *kApiUrl;
|
||||
|
||||
Reference in New Issue
Block a user