Use override

This commit is contained in:
Jonas Kvinge 2020-06-15 21:55:05 +02:00
parent 72ede666d4
commit 651020388d
271 changed files with 1199 additions and 1231 deletions

View File

@ -108,65 +108,65 @@ class ASF::File::FilePrivate::UnknownObject : public ASF::File::FilePrivate::Bas
public: public:
explicit UnknownObject(const ByteVector &guid); explicit UnknownObject(const ByteVector &guid);
ByteVector guid() const; ByteVector guid() const override;
}; };
class ASF::File::FilePrivate::FilePropertiesObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::FilePropertiesObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
}; };
class ASF::File::FilePrivate::StreamPropertiesObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::StreamPropertiesObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
}; };
class ASF::File::FilePrivate::ContentDescriptionObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::ContentDescriptionObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
ByteVector render(ASF::File *file); ByteVector render(ASF::File *file) override;
}; };
class ASF::File::FilePrivate::ExtendedContentDescriptionObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::ExtendedContentDescriptionObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVectorList attributeData; ByteVectorList attributeData;
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
ByteVector render(ASF::File *file); ByteVector render(ASF::File *file) override;
}; };
class ASF::File::FilePrivate::MetadataObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::MetadataObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVectorList attributeData; ByteVectorList attributeData;
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
ByteVector render(ASF::File *file); ByteVector render(ASF::File *file) override;
}; };
class ASF::File::FilePrivate::MetadataLibraryObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::MetadataLibraryObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVectorList attributeData; ByteVectorList attributeData;
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
ByteVector render(ASF::File *file); ByteVector render(ASF::File *file) override;
}; };
class ASF::File::FilePrivate::HeaderExtensionObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::HeaderExtensionObject : public ASF::File::FilePrivate::BaseObject {
public: public:
List<ASF::File::FilePrivate::BaseObject *> objects; List<ASF::File::FilePrivate::BaseObject *> objects;
HeaderExtensionObject(); HeaderExtensionObject();
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
ByteVector render(ASF::File *file); ByteVector render(ASF::File *file) override;
}; };
class ASF::File::FilePrivate::CodecListObject : public ASF::File::FilePrivate::BaseObject { class ASF::File::FilePrivate::CodecListObject : public ASF::File::FilePrivate::BaseObject {
public: public:
ByteVector guid() const; ByteVector guid() const override;
void parse(ASF::File *file, unsigned int size); void parse(ASF::File *file, unsigned int size) override;
private: private:
enum CodecType { enum CodecType {

View File

@ -276,7 +276,7 @@ class FileRef::FileRefPrivate : public RefCounter {
public: public:
FileRefPrivate() : file(nullptr), stream(nullptr) {} FileRefPrivate() : file(nullptr), stream(nullptr) {}
~FileRefPrivate() { ~FileRefPrivate() override {
delete file; delete file;
delete stream; delete stream;
} }

View File

@ -85,9 +85,9 @@ class AdapterFile : public Strawberry_TagLib::TagLib::File {
public: public:
explicit AdapterFile(IOStream *stream) : File(stream) {} explicit AdapterFile(IOStream *stream) : File(stream) {}
Tag *tag() const { return nullptr; } Tag *tag() const override { return nullptr; }
AudioProperties *audioProperties() const { return nullptr; } AudioProperties *audioProperties() const override { return nullptr; }
bool save() { return false; } bool save() override { return false; }
}; };
} // namespace } // namespace

View File

@ -37,7 +37,7 @@ using namespace Strawberry_TagLib::TagLib;
namespace { namespace {
class DefaultListener : public DebugListener { class DefaultListener : public DebugListener {
public: public:
virtual void printMessage(const String &msg) { void printMessage(const String &msg) override {
#ifdef _WIN32 #ifdef _WIN32
const wstring wstr = msg.toWString(); const wstring wstr = msg.toWString();

View File

@ -84,13 +84,13 @@ class SkipReader : public Reader {
public: public:
explicit SkipReader(unsigned int size) : m_size(size) {} explicit SkipReader(unsigned int size) : m_size(size) {}
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
unsigned int count = std::min(m_size, limit); unsigned int count = std::min(m_size, limit);
file.seek(count, Strawberry_TagLib::TagLib::File::Current); file.seek(count, Strawberry_TagLib::TagLib::File::Current);
return count; return count;
} }
unsigned int size() const { unsigned int size() const override {
return m_size; return m_size;
} }
@ -111,7 +111,7 @@ class StringReader : public ValueReader<String> {
public: public:
StringReader(String &string, unsigned int size) : ValueReader<String>(string), m_size(size) {} StringReader(String &string, unsigned int size) : ValueReader<String>(string), m_size(size) {}
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
ByteVector data = file.readBlock(std::min(m_size, limit)); ByteVector data = file.readBlock(std::min(m_size, limit));
unsigned int count = data.size(); unsigned int count = data.size();
@ -125,7 +125,7 @@ class StringReader : public ValueReader<String> {
} }
unsigned int size() const { unsigned int size() const override {
return m_size; return m_size;
} }
@ -137,7 +137,7 @@ class ByteReader : public ValueReader<unsigned char> {
public: public:
explicit ByteReader(unsigned char &_byte) : ValueReader<unsigned char>(_byte) {} explicit ByteReader(unsigned char &_byte) : ValueReader<unsigned char>(_byte) {}
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
ByteVector data = file.readBlock(std::min(1U, limit)); ByteVector data = file.readBlock(std::min(1U, limit));
if (data.size() > 0) { if (data.size() > 0) {
value = data[0]; value = data[0];
@ -145,7 +145,7 @@ class ByteReader : public ValueReader<unsigned char> {
return data.size(); return data.size();
} }
unsigned int size() const { unsigned int size() const override {
return 1; return 1;
} }
}; };
@ -165,13 +165,13 @@ class U16Reader : public NumberReader<unsigned short> {
U16Reader(unsigned short &_value, bool _bigEndian) U16Reader(unsigned short &_value, bool _bigEndian)
: NumberReader<unsigned short>(_value, _bigEndian) {} : NumberReader<unsigned short>(_value, _bigEndian) {}
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
ByteVector data = file.readBlock(std::min(2U, limit)); ByteVector data = file.readBlock(std::min(2U, limit));
value = data.toUShort(bigEndian); value = data.toUShort(bigEndian);
return data.size(); return data.size();
} }
unsigned int size() const { unsigned int size() const override {
return 2; return 2;
} }
}; };
@ -181,13 +181,13 @@ class U32Reader : public NumberReader<unsigned long> {
U32Reader(unsigned long &_value, bool _bigEndian = true) : NumberReader<unsigned long>(_value, _bigEndian) { U32Reader(unsigned long &_value, bool _bigEndian = true) : NumberReader<unsigned long>(_value, _bigEndian) {
} }
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
ByteVector data = file.readBlock(std::min(4U, limit)); ByteVector data = file.readBlock(std::min(4U, limit));
value = data.toUInt(bigEndian); value = data.toUInt(bigEndian);
return data.size(); return data.size();
} }
unsigned int size() const { unsigned int size() const override {
return 4; return 4;
} }
}; };
@ -276,7 +276,7 @@ class StructReader : public Reader {
return u32(number, true); return u32(number, true);
} }
unsigned int size() const { unsigned int size() const override {
unsigned int size = 0; unsigned int size = 0;
for (List<Reader *>::ConstIterator i = m_readers.begin(); for (List<Reader *>::ConstIterator i = m_readers.begin();
i != m_readers.end(); i != m_readers.end();
@ -286,7 +286,7 @@ class StructReader : public Reader {
return size; return size;
} }
unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) { unsigned int read(Strawberry_TagLib::TagLib::File &file, unsigned int limit) override {
unsigned int sumcount = 0; unsigned int sumcount = 0;
for (List<Reader *>::ConstIterator i = m_readers.begin(); for (List<Reader *>::ConstIterator i = m_readers.begin();
limit > 0 && i != m_readers.end(); limit > 0 && i != m_readers.end();

View File

@ -101,7 +101,7 @@ class FileRefFactory {
class TagLibFileRefFactory : public FileRefFactory { class TagLibFileRefFactory : public FileRefFactory {
public: public:
virtual TagLib::FileRef *GetFileRef(const QString &filename) { TagLib::FileRef *GetFileRef(const QString &filename) override {
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
return new TagLib::FileRef(filename.toStdWString().c_str()); return new TagLib::FileRef(filename.toStdWString().c_str());
#else #else

View File

@ -55,7 +55,7 @@ class Base : public QWidget {
Q_OBJECT Q_OBJECT
public: public:
~Base() { delete fht_; } ~Base() override { delete fht_; }
uint timeout() const { return timeout_; } uint timeout() const { return timeout_; }
@ -74,10 +74,10 @@ class Base : public QWidget {
protected: protected:
explicit Base(QWidget*, uint scopeSize = 7); explicit Base(QWidget*, uint scopeSize = 7);
void hideEvent(QHideEvent*); void hideEvent(QHideEvent*) override;
void showEvent(QShowEvent*); void showEvent(QShowEvent*) override;
void paintEvent(QPaintEvent*); void paintEvent(QPaintEvent*) override;
void timerEvent(QTimerEvent*); void timerEvent(QTimerEvent*) override;
void polishEvent(); void polishEvent();

View File

@ -44,7 +44,7 @@ class AnalyzerContainer : public QWidget {
Q_OBJECT Q_OBJECT
public: public:
AnalyzerContainer(QWidget* parent); explicit AnalyzerContainer(QWidget *parent);
void SetEngine(EngineBase *engine); void SetEngine(EngineBase *engine);
void SetActions(QAction *visualisation); void SetActions(QAction *visualisation);
@ -52,12 +52,12 @@ class AnalyzerContainer : public QWidget {
static const char *kSettingsGroup; static const char *kSettingsGroup;
static const char *kSettingsFramerate; static const char *kSettingsFramerate;
signals: signals:
void WheelEvent(int delta); void WheelEvent(int delta);
protected: protected:
void mouseReleaseEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*) override;
void wheelEvent(QWheelEvent *e); void wheelEvent(QWheelEvent *e) override;
private slots: private slots:
void ChangeAnalyzer(int id); void ChangeAnalyzer(int id);

View File

@ -67,8 +67,6 @@ BlockAnalyzer::BlockAnalyzer(QWidget *parent)
} }
BlockAnalyzer::~BlockAnalyzer() {}
void BlockAnalyzer::resizeEvent(QResizeEvent *e) { void BlockAnalyzer::resizeEvent(QResizeEvent *e) {
QWidget::resizeEvent(e); QWidget::resizeEvent(e);

View File

@ -39,9 +39,9 @@ class QResizeEvent;
class BlockAnalyzer : public Analyzer::Base { class BlockAnalyzer : public Analyzer::Base {
Q_OBJECT Q_OBJECT
public: public:
Q_INVOKABLE BlockAnalyzer(QWidget*); Q_INVOKABLE BlockAnalyzer(QWidget*);
~BlockAnalyzer();
static const uint kHeight; static const uint kHeight;
static const uint kWidth; static const uint kWidth;
@ -53,11 +53,11 @@ class BlockAnalyzer : public Analyzer::Base {
static const char *kName; static const char *kName;
protected: protected:
virtual void transform(Analyzer::Scope&); void transform(Analyzer::Scope&) override;
virtual void analyze(QPainter &p, const Analyzer::Scope&, bool new_frame); void analyze(QPainter &p, const Analyzer::Scope&, bool new_frame) override;
virtual void resizeEvent(QResizeEvent*); void resizeEvent(QResizeEvent*) override;
virtual void paletteChange(const QPalette&); virtual void paletteChange(const QPalette&);
virtual void framerateChanged(); void framerateChanged() override;
void drawBackground(); void drawBackground();
void determineStep(); void determineStep();

View File

@ -44,15 +44,15 @@ class BoomAnalyzer : public Analyzer::Base {
static const char* kName; static const char* kName;
virtual void transform(Analyzer::Scope& s); void transform(Analyzer::Scope& s) override;
virtual void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame); void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame) override;
public slots: public slots:
void changeK_barHeight(int); void changeK_barHeight(int);
void changeF_peakSpeed(int); void changeF_peakSpeed(int);
protected: protected:
void resizeEvent(QResizeEvent* e); void resizeEvent(QResizeEvent* e) override;
static const uint kColumnWidth; static const uint kColumnWidth;
static const uint kMaxBandCount; static const uint kMaxBandCount;

View File

@ -53,11 +53,11 @@ class RainbowAnalyzer : public Analyzer::Base {
RainbowAnalyzer(const RainbowType& rbtype, QWidget* parent); RainbowAnalyzer(const RainbowType& rbtype, QWidget* parent);
protected: protected:
void transform(Analyzer::Scope&); void transform(Analyzer::Scope&) override;
void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame); void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame) override;
void timerEvent(QTimerEvent* e); void timerEvent(QTimerEvent* e) override;
void resizeEvent(QResizeEvent* e); void resizeEvent(QResizeEvent* e) override;
private: private:
static const int kHeight[]; static const int kHeight[];

View File

@ -44,7 +44,7 @@ class SCollection : public QObject {
public: public:
explicit SCollection(Application *app, QObject *parent); explicit SCollection(Application *app, QObject *parent);
~SCollection(); ~SCollection() override;
static const char *kSongsTable; static const char *kSongsTable;
static const char *kDirsTable; static const char *kDirsTable;

View File

@ -61,8 +61,6 @@ CollectionBackend::CollectionBackend(QObject *parent) :
} }
CollectionBackend::~CollectionBackend() {}
void CollectionBackend::Init(Database *db, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table, const QString &fts_table) { void CollectionBackend::Init(Database *db, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table, const QString &fts_table) {
db_ = db; db_ = db;
source_ = source; source_ = source;

View File

@ -46,7 +46,6 @@ class CollectionBackendInterface : public QObject {
public: public:
explicit CollectionBackendInterface(QObject *parent = nullptr) : QObject(parent) {} explicit CollectionBackendInterface(QObject *parent = nullptr) : QObject(parent) {}
virtual ~CollectionBackendInterface() {}
struct Album { struct Album {
Album() {} Album() {}
@ -120,8 +119,7 @@ class CollectionBackend : public CollectionBackendInterface {
public: public:
static const char *kSettingsGroup; static const char *kSettingsGroup;
Q_INVOKABLE CollectionBackend(QObject *parent = nullptr); Q_INVOKABLE explicit CollectionBackend(QObject *parent = nullptr);
~CollectionBackend();
void Init(Database *db, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table, const QString &fts_table); void Init(Database *db, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table, const QString &fts_table);
void Close(); void Close();
@ -130,49 +128,49 @@ class CollectionBackend : public CollectionBackendInterface {
Database *db() const { return db_; } Database *db() const { return db_; }
QString songs_table() const { return songs_table_; } QString songs_table() const override { return songs_table_; }
QString dirs_table() const { return dirs_table_; } QString dirs_table() const { return dirs_table_; }
QString subdirs_table() const { return subdirs_table_; } QString subdirs_table() const { return subdirs_table_; }
// Get a list of directories in the collection. Emits DirectoriesDiscovered. // Get a list of directories in the collection. Emits DirectoriesDiscovered.
void LoadDirectoriesAsync(); void LoadDirectoriesAsync() override;
void UpdateTotalSongCountAsync(); void UpdateTotalSongCountAsync() override;
void UpdateTotalArtistCountAsync(); void UpdateTotalArtistCountAsync() override;
void UpdateTotalAlbumCountAsync(); void UpdateTotalAlbumCountAsync() override;
SongList FindSongsInDirectory(const int id); SongList FindSongsInDirectory(const int id) override;
SubdirectoryList SubdirsInDirectory(const int id); SubdirectoryList SubdirsInDirectory(const int id) override;
DirectoryList GetAllDirectories(); DirectoryList GetAllDirectories() override;
void ChangeDirPath(const int id, const QString &old_path, const QString &new_path); void ChangeDirPath(const int id, const QString &old_path, const QString &new_path) override;
QStringList GetAll(const QString &column, const QueryOptions &opt = QueryOptions()); QStringList GetAll(const QString &column, const QueryOptions &opt = QueryOptions());
QStringList GetAllArtists(const QueryOptions &opt = QueryOptions()); QStringList GetAllArtists(const QueryOptions &opt = QueryOptions()) override;
QStringList GetAllArtistsWithAlbums(const QueryOptions &opt = QueryOptions()); QStringList GetAllArtistsWithAlbums(const QueryOptions &opt = QueryOptions()) override;
SongList GetSongsByAlbum(const QString &album, const QueryOptions &opt = QueryOptions()); SongList GetSongsByAlbum(const QString &album, const QueryOptions &opt = QueryOptions()) override;
SongList GetSongs(const QString &artist, const QString &album, const QueryOptions &opt = QueryOptions()); SongList GetSongs(const QString &artist, const QString &album, const QueryOptions &opt = QueryOptions()) override;
SongList GetCompilationSongs(const QString &album, const QueryOptions &opt = QueryOptions()); SongList GetCompilationSongs(const QString &album, const QueryOptions &opt = QueryOptions()) override;
AlbumList GetAllAlbums(const QueryOptions &opt = QueryOptions()); AlbumList GetAllAlbums(const QueryOptions &opt = QueryOptions()) override;
AlbumList GetCompilationAlbums(const QueryOptions &opt = QueryOptions()); AlbumList GetCompilationAlbums(const QueryOptions &opt = QueryOptions()) override;
AlbumList GetAlbumsByArtist(const QString &artist, const QueryOptions &opt = QueryOptions()); AlbumList GetAlbumsByArtist(const QString &artist, const QueryOptions &opt = QueryOptions()) override;
void UpdateManualAlbumArtAsync(const QString &artist, const QString &albumartist, const QString &album, const QUrl &cover_url); void UpdateManualAlbumArtAsync(const QString &artist, const QString &albumartist, const QString &album, const QUrl &cover_url) override;
Album GetAlbumArt(const QString &artist, const QString &albumartist, const QString &album); Album GetAlbumArt(const QString &artist, const QString &albumartist, const QString &album) override;
Song GetSongById(const int id); Song GetSongById(const int id) override;
SongList GetSongsById(const QList<int> &ids); SongList GetSongsById(const QList<int> &ids);
SongList GetSongsById(const QStringList &ids); SongList GetSongsById(const QStringList &ids);
SongList GetSongsByForeignId(const QStringList &ids, const QString &table, const QString &column); SongList GetSongsByForeignId(const QStringList &ids, const QString &table, const QString &column);
SongList GetSongsByUrl(const QUrl &url); SongList GetSongsByUrl(const QUrl &url) override;
Song GetSongByUrl(const QUrl &url, qint64 beginning = 0); Song GetSongByUrl(const QUrl &url, qint64 beginning = 0) override;
void AddDirectory(const QString &path); void AddDirectory(const QString &path) override;
void RemoveDirectory(const Directory &dir); void RemoveDirectory(const Directory &dir) override;
bool ExecQuery(CollectionQuery *q); bool ExecQuery(CollectionQuery *q) override;
SongList ExecCollectionQuery(CollectionQuery *query); SongList ExecCollectionQuery(CollectionQuery *query);
void IncrementPlayCountAsync(const int id); void IncrementPlayCountAsync(const int id);

View File

@ -45,7 +45,7 @@ CollectionDirectoryModel::CollectionDirectoryModel(CollectionBackend *backend, Q
} }
CollectionDirectoryModel::~CollectionDirectoryModel() {} CollectionDirectoryModel::~CollectionDirectoryModel() = default;
void CollectionDirectoryModel::DirectoryDiscovered(const Directory &dir) { void CollectionDirectoryModel::DirectoryDiscovered(const Directory &dir) {

View File

@ -43,13 +43,13 @@ class CollectionDirectoryModel : public QStandardItemModel {
public: public:
explicit CollectionDirectoryModel(CollectionBackend* backend, QObject *parent = nullptr); explicit CollectionDirectoryModel(CollectionBackend* backend, QObject *parent = nullptr);
~CollectionDirectoryModel(); ~CollectionDirectoryModel() override;
// To be called by GUIs // To be called by GUIs
void AddDirectory(const QString &path); void AddDirectory(const QString &path);
void RemoveDirectory(const QModelIndex &index); void RemoveDirectory(const QModelIndex &index);
QVariant data(const QModelIndex &index, int role) const; QVariant data(const QModelIndex &index, int role) const override;
private slots: private slots:
// To be called by the backend // To be called by the backend

View File

@ -49,7 +49,7 @@ class CollectionFilterWidget : public QWidget {
public: public:
explicit CollectionFilterWidget(QWidget *parent = nullptr); explicit CollectionFilterWidget(QWidget *parent = nullptr);
~CollectionFilterWidget(); ~CollectionFilterWidget() override;
static const int kFilterDelay = 500; // msec static const int kFilterDelay = 500; // msec
@ -83,14 +83,14 @@ class CollectionFilterWidget : public QWidget {
void SetQueryMode(QueryOptions::QueryMode query_mode); void SetQueryMode(QueryOptions::QueryMode query_mode);
void FocusOnFilter(QKeyEvent *e); void FocusOnFilter(QKeyEvent *e);
signals: signals:
void UpPressed(); void UpPressed();
void DownPressed(); void DownPressed();
void ReturnPressed(); void ReturnPressed();
void Filter(const QString &text); void Filter(const QString &text);
protected: protected:
void keyReleaseEvent(QKeyEvent *e); void keyReleaseEvent(QKeyEvent *e) override;
private slots: private slots:
void GroupingChanged(const CollectionModel::Grouping &g); void GroupingChanged(const CollectionModel::Grouping &g);

View File

@ -37,10 +37,10 @@ class CollectionItemDelegate : public QStyledItemDelegate {
public: public:
explicit CollectionItemDelegate(QObject *parent); explicit CollectionItemDelegate(QObject *parent);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
public slots: public slots:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index); bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
}; };
#endif // COLLECTIONITEMDELEGATE_H #endif // COLLECTIONITEMDELEGATE_H

View File

@ -64,7 +64,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
public: public:
explicit CollectionModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr); explicit CollectionModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
~CollectionModel(); ~CollectionModel() override;
static const char *kSavedGroupingsSettingsGroup; static const char *kSavedGroupingsSettingsGroup;
@ -146,11 +146,11 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
int total_album_count() const { return total_album_count_; } int total_album_count() const { return total_album_count_; }
// QAbstractItemModel // QAbstractItemModel
QVariant data(const QModelIndex &idx, const int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &idx, const int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &idx) const; Qt::ItemFlags flags(const QModelIndex &idx) const override;
QStringList mimeTypes() const; QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const; QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool canFetchMore(const QModelIndex &parent) const; bool canFetchMore(const QModelIndex &parent) const override;
// Whether or not to use album cover art, if it exists, in the collection view // Whether or not to use album cover art, if it exists, in the collection view
void set_pretty_covers(const bool use_pretty_covers); void set_pretty_covers(const bool use_pretty_covers);
@ -199,7 +199,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
void ResetAsync(); void ResetAsync();
protected: protected:
void LazyPopulate(CollectionItem *item) { LazyPopulate(item, true); } void LazyPopulate(CollectionItem *item) override { LazyPopulate(item, true); }
void LazyPopulate(CollectionItem *parent, const bool signal); void LazyPopulate(CollectionItem *parent, const bool signal);
private slots: private slots:

View File

@ -36,25 +36,25 @@ class CollectionPlaylistItem : public PlaylistItem {
explicit CollectionPlaylistItem(); explicit CollectionPlaylistItem();
explicit CollectionPlaylistItem(const Song &song); explicit CollectionPlaylistItem(const Song &song);
bool InitFromQuery(const SqlRow &query); bool InitFromQuery(const SqlRow &query) override;
void Reload(); void Reload() override;
Song Metadata() const; Song Metadata() const override;
void SetMetadata(const Song &song) { song_ = song; } void SetMetadata(const Song &song) { song_ = song; }
QUrl Url() const; QUrl Url() const override;
bool IsLocalCollectionItem() const { return true; } bool IsLocalCollectionItem() const override { return true; }
void SetArtManual(const QUrl &cover_url); void SetArtManual(const QUrl &cover_url) override;
protected: protected:
QVariant DatabaseValue(DatabaseColumn column) const; QVariant DatabaseValue(DatabaseColumn column) const override;
Song DatabaseSongMetadata() const { return Song(Song::Source_Collection); } Song DatabaseSongMetadata() const override { return Song(Song::Source_Collection); }
protected: protected:
Song song_; Song song_;
}; };
#endif // COLLECTIONPLAYLISTITEM_H #endif // COLLECTIONPLAYLISTITEM_H

View File

@ -88,7 +88,7 @@ CollectionView::CollectionView(QWidget *parent)
} }
CollectionView::~CollectionView() {} CollectionView::~CollectionView() = default;
void CollectionView::SaveFocus() { void CollectionView::SaveFocus() {

View File

@ -52,7 +52,7 @@ class CollectionView : public AutoExpandingTreeView {
public: public:
explicit CollectionView(QWidget *parent = nullptr); explicit CollectionView(QWidget *parent = nullptr);
~CollectionView(); ~CollectionView() override;
// Returns Songs currently selected in the collection view. // Returns Songs currently selected in the collection view.
// Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs. // Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs.
@ -62,8 +62,8 @@ class CollectionView : public AutoExpandingTreeView {
void SetFilter(CollectionFilterWidget *filter); void SetFilter(CollectionFilterWidget *filter);
// QTreeView // QTreeView
void keyboardSearch(const QString &search); void keyboardSearch(const QString &search) override;
void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible); void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
int TotalSongs(); int TotalSongs();
int TotalArtists(); int TotalArtists();
@ -92,9 +92,9 @@ class CollectionView : public AutoExpandingTreeView {
protected: protected:
// QWidget // QWidget
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event) override;
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *e) override;
private slots: private slots:
void Load(); void Load();

View File

@ -35,7 +35,7 @@ class CollectionViewContainer : public QWidget {
public: public:
explicit CollectionViewContainer(QWidget *parent = nullptr); explicit CollectionViewContainer(QWidget *parent = nullptr);
~CollectionViewContainer(); ~CollectionViewContainer() override;
CollectionFilterWidget *filter() const; CollectionFilterWidget *filter() const;
CollectionView *view() const; CollectionView *view() const;

View File

@ -108,7 +108,7 @@ GroupByDialog::GroupByDialog(QWidget *parent) : QDialog(parent), ui_(new Ui_Grou
} }
GroupByDialog::~GroupByDialog() {} GroupByDialog::~GroupByDialog() = default;
void GroupByDialog::Reset() { void GroupByDialog::Reset() {
ui_->combobox_first->setCurrentIndex(2); // Album Artist ui_->combobox_first->setCurrentIndex(2); // Album Artist

View File

@ -30,24 +30,24 @@
#include <QString> #include <QString>
#include "collectionmodel.h" #include "collectionmodel.h"
#include "ui_groupbydialog.h"
class QWidget; class QWidget;
class GroupByDialogPrivate; class GroupByDialogPrivate;
class Ui_GroupByDialog;
class GroupByDialog : public QDialog { class GroupByDialog : public QDialog {
Q_OBJECT Q_OBJECT
public: public:
explicit GroupByDialog(QWidget *parent = nullptr); explicit GroupByDialog(QWidget *parent = nullptr);
~GroupByDialog(); ~GroupByDialog() override;
public slots: public slots:
void CollectionGroupingChanged(const CollectionModel::Grouping &g); void CollectionGroupingChanged(const CollectionModel::Grouping &g);
void accept(); void accept() override;
signals: signals:
void Accepted(const CollectionModel::Grouping &g); void Accepted(const CollectionModel::Grouping &g);
private slots: private slots:

View File

@ -40,7 +40,7 @@ class SavedGroupingManager : public QDialog {
public: public:
explicit SavedGroupingManager(QWidget *parent = nullptr); explicit SavedGroupingManager(QWidget *parent = nullptr);
~SavedGroupingManager(); ~SavedGroupingManager() override;
void UpdateModel(); void UpdateModel();
void SetFilter(CollectionFilterWidget* filter) { filter_ = filter; } void SetFilter(CollectionFilterWidget* filter) { filter_ = filter; }

View File

@ -52,9 +52,9 @@ class ContextAlbum : public QWidget {
void SetImage(QImage image = QImage()); void SetImage(QImage image = QImage());
protected: protected:
void paintEvent(QPaintEvent*); void paintEvent(QPaintEvent*) override;
void contextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e); void mouseDoubleClickEvent(QMouseEvent *e) override;
private: private:
void DrawImage(QPainter *p); void DrawImage(QPainter *p);

View File

@ -58,7 +58,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
public: public:
explicit ContextAlbumsModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr); explicit ContextAlbumsModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
~ContextAlbumsModel(); ~ContextAlbumsModel() override;
static const int kPrettyCoverSize; static const int kPrettyCoverSize;
@ -81,11 +81,11 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
SongList GetChildSongs(const QModelIndex &index) const; SongList GetChildSongs(const QModelIndex &index) const;
SongList GetChildSongs(const QModelIndexList &indexes) const; SongList GetChildSongs(const QModelIndexList &indexes) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const; Qt::ItemFlags flags(const QModelIndex &index) const override;
QStringList mimeTypes() const; QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const; QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool canFetchMore(const QModelIndex &parent) const; bool canFetchMore(const QModelIndex &parent) const override;
static QString TextOrUnknown(const QString &text); static QString TextOrUnknown(const QString &text);
static QString SortText(QString text); static QString SortText(QString text);
@ -96,7 +96,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
void AddSongs(const SongList &songs); void AddSongs(const SongList &songs);
protected: protected:
void LazyPopulate(CollectionItem *item) { LazyPopulate(item, true); } void LazyPopulate(CollectionItem *item) override { LazyPopulate(item, true); }
void LazyPopulate(CollectionItem *parent, const bool signal); void LazyPopulate(CollectionItem *parent, const bool signal);
private slots: private slots:

View File

@ -134,7 +134,7 @@ ContextAlbumsView::ContextAlbumsView(QWidget *parent)
} }
ContextAlbumsView::~ContextAlbumsView() {} ContextAlbumsView::~ContextAlbumsView() = default;
void ContextAlbumsView::SaveFocus() { void ContextAlbumsView::SaveFocus() {

View File

@ -46,9 +46,9 @@ class QMouseEvent;
class QPaintEvent; class QPaintEvent;
class Application; class Application;
class ContextAlbumsModel;
class EditTagDialog; class EditTagDialog;
class OrganiseDialog; class OrganiseDialog;
class ContextAlbumsModel;
class ContextItemDelegate : public QStyledItemDelegate { class ContextItemDelegate : public QStyledItemDelegate {
Q_OBJECT Q_OBJECT
@ -57,7 +57,7 @@ class ContextItemDelegate : public QStyledItemDelegate {
explicit ContextItemDelegate(QObject *parent); explicit ContextItemDelegate(QObject *parent);
public slots: public slots:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index); bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
}; };
class ContextAlbumsView : public AutoExpandingTreeView { class ContextAlbumsView : public AutoExpandingTreeView {
@ -65,7 +65,7 @@ class ContextAlbumsView : public AutoExpandingTreeView {
public: public:
ContextAlbumsView(QWidget *parent = nullptr); ContextAlbumsView(QWidget *parent = nullptr);
~ContextAlbumsView(); ~ContextAlbumsView() override;
// Returns Songs currently selected in the collection view. // Returns Songs currently selected in the collection view.
// Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs. // Please note that the selection is recursive meaning that if for example an album is selected this will return all of it's songs.
@ -74,7 +74,7 @@ class ContextAlbumsView : public AutoExpandingTreeView {
void Init(Application *app); void Init(Application *app);
// QTreeView // QTreeView
void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible); void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
ContextAlbumsModel *albums_model() { return model_; } ContextAlbumsModel *albums_model() { return model_; }
@ -84,9 +84,9 @@ class ContextAlbumsView : public AutoExpandingTreeView {
protected: protected:
// QWidget // QWidget
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event) override;
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *e) override;
private slots: private slots:
void Load(); void Load();

View File

@ -65,10 +65,10 @@ class ContextView : public QWidget {
Song song_playing() const { return song_playing_; } Song song_playing() const { return song_playing_; }
protected: protected:
void resizeEvent(QResizeEvent*); void resizeEvent(QResizeEvent*) override;
void contextMenuEvent(QContextMenuEvent*); void contextMenuEvent(QContextMenuEvent*) override;
void dragEnterEvent(QDragEnterEvent*); void dragEnterEvent(QDragEnterEvent*) override;
void dropEvent(QDropEvent*); void dropEvent(QDropEvent*) override;
private: private:
void AddActions(); void AddActions();

View File

@ -67,7 +67,7 @@ class Application : public QObject {
public: public:
explicit Application(QObject *parent = nullptr); explicit Application(QObject *parent = nullptr);
~Application(); ~Application() override;
TagReaderClient *tag_reader_client() const; TagReaderClient *tag_reader_client() const;
Database *database() const; Database *database() const;

View File

@ -43,7 +43,7 @@ class Database : public QObject {
public: public:
explicit Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString()); explicit Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString());
~Database(); ~Database() override;
struct AttachedDatabase { struct AttachedDatabase {
AttachedDatabase() {} AttachedDatabase() {}
@ -131,7 +131,7 @@ class MemoryDatabase : public Database {
public: public:
MemoryDatabase(Application *app, QObject *parent = nullptr) MemoryDatabase(Application *app, QObject *parent = nullptr)
: Database(app, parent, ":memory:") {} : Database(app, parent, ":memory:") {}
~MemoryDatabase() { ~MemoryDatabase() override {
// Make sure Qt doesn't reuse the same database // Make sure Qt doesn't reuse the same database
QSqlDatabase::removeDatabase(Connect().connectionName()); QSqlDatabase::removeDatabase(Connect().connectionName());
} }

View File

@ -32,8 +32,8 @@ class DBusScreensaver : public Screensaver {
public: public:
explicit DBusScreensaver(const QString &service, const QString &path, const QString &interface); explicit DBusScreensaver(const QString &service, const QString &path, const QString &interface);
void Inhibit(); void Inhibit() override;
void Uninhibit(); void Uninhibit() override;
private: private:
QString service_; QString service_;

View File

@ -44,7 +44,7 @@ DeleteFiles::DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage
original_thread_ = thread(); original_thread_ = thread();
} }
DeleteFiles::~DeleteFiles() {} DeleteFiles::~DeleteFiles() = default;
void DeleteFiles::Start(const SongList &songs) { void DeleteFiles::Start(const SongList &songs) {

View File

@ -39,7 +39,7 @@ class DeleteFiles : public QObject {
public: public:
explicit DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage); explicit DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage);
~DeleteFiles(); ~DeleteFiles() override;
static const int kBatchSize; static const int kBatchSize;

View File

@ -31,12 +31,11 @@
class FilesystemMusicStorage : public virtual MusicStorage { class FilesystemMusicStorage : public virtual MusicStorage {
public: public:
explicit FilesystemMusicStorage(const QString &root); explicit FilesystemMusicStorage(const QString &root);
~FilesystemMusicStorage() {}
QString LocalPath() const { return root_; } QString LocalPath() const override { return root_; }
bool CopyToStorage(const CopyJob &job); bool CopyToStorage(const CopyJob &job) override;
bool DeleteFromStorage(const DeleteJob &job); bool DeleteFromStorage(const DeleteJob &job) override;
private: private:
QString root_; QString root_;

View File

@ -28,8 +28,10 @@
class FileSystemWatcherInterface : public QObject { class FileSystemWatcherInterface : public QObject {
Q_OBJECT Q_OBJECT
public: public:
explicit FileSystemWatcherInterface(QObject *parent = nullptr); explicit FileSystemWatcherInterface(QObject *parent = nullptr);
virtual void Init() {} virtual void Init() {}
virtual void AddPath(const QString &path) = 0; virtual void AddPath(const QString &path) = 0;
virtual void RemovePath(const QString &path) = 0; virtual void RemovePath(const QString &path) = 0;
@ -37,7 +39,7 @@ class FileSystemWatcherInterface : public QObject {
static FileSystemWatcherInterface *Create(QObject *parent = nullptr); static FileSystemWatcherInterface *Create(QObject *parent = nullptr);
signals: signals:
void PathChanged(const QString &path); void PathChanged(const QString &path);
}; };

View File

@ -101,7 +101,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
public: public:
explicit MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr); explicit MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr);
~MainWindow(); ~MainWindow() override;
static const char *kSettingsGroup; static const char *kSettingsGroup;
static const char *kAllFilesFilterSpec; static const char *kAllFilesFilterSpec;
@ -117,13 +117,13 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void CommandlineOptionsReceived(const CommandlineOptions& options); void CommandlineOptionsReceived(const CommandlineOptions& options);
protected: protected:
void keyPressEvent(QKeyEvent *event); void keyPressEvent(QKeyEvent *event) override;
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event) override;
bool nativeEvent(const QByteArray &eventType, void *message, long *result); bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
// PlatformInterface // PlatformInterface
void Activate(); void Activate() override;
bool LoadUrl(const QString& url); bool LoadUrl(const QString& url) override;
signals: signals:
void AlbumCoverReady(const Song &song, const QImage &image); void AlbumCoverReady(const Song &song, const QImage &image);

View File

@ -45,7 +45,7 @@ class MergedProxyModel : public QAbstractProxyModel {
public: public:
explicit MergedProxyModel(QObject *parent = nullptr); explicit MergedProxyModel(QObject *parent = nullptr);
~MergedProxyModel(); ~MergedProxyModel() override;
// Make another model appear as a child of the given item in the source model. // Make another model appear as a child of the given item in the source model.
void AddSubModel(const QModelIndex &source_parent, QAbstractItemModel *submodel); void AddSubModel(const QModelIndex &source_parent, QAbstractItemModel *submodel);
@ -56,33 +56,33 @@ class MergedProxyModel : public QAbstractProxyModel {
QModelIndex FindSourceParent(const QModelIndex &proxy_index) const; QModelIndex FindSourceParent(const QModelIndex &proxy_index) const;
// QAbstractItemModel // QAbstractItemModel
QModelIndex index(int row, int column, const QModelIndex &parent) const; QModelIndex index(int row, int column, const QModelIndex &parent) const override;
QModelIndex parent(const QModelIndex &child) const; QModelIndex parent(const QModelIndex &child) const override;
int rowCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const override;
int columnCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const override;
QVariant data(const QModelIndex &proxy_index, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &proxy_index, int role = Qt::DisplayRole) const override;
bool hasChildren(const QModelIndex &parent) const; bool hasChildren(const QModelIndex &parent) const override;
QMap<int, QVariant> itemData(const QModelIndex &proxy_index) const; QMap<int, QVariant> itemData(const QModelIndex &proxy_index) const override;
Qt::ItemFlags flags(const QModelIndex &index) const; Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role); bool setData(const QModelIndex &index, const QVariant &value, int role) override;
QStringList mimeTypes() const; QStringList mimeTypes() const override;
QMimeData *mimeData(const QModelIndexList &indexes) const; QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
bool canFetchMore(const QModelIndex &parent) const; bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent); void fetchMore(const QModelIndex &parent) override;
// QAbstractProxyModel // QAbstractProxyModel
// Note that these implementations of map{To,From}Source will not always give you an index in sourceModel(), // Note that these implementations of map{To,From}Source will not always give you an index in sourceModel(),
// you might get an index in one of the child models instead. // you might get an index in one of the child models instead.
QModelIndex mapFromSource(const QModelIndex &source_index) const; QModelIndex mapFromSource(const QModelIndex &source_index) const override;
QModelIndex mapToSource(const QModelIndex &proxy_index) const; QModelIndex mapToSource(const QModelIndex &proxy_index) const override;
void setSourceModel(QAbstractItemModel *source_model); void setSourceModel(QAbstractItemModel *source_model) override;
// Convenience functions that call map{To,From}Source multiple times. // Convenience functions that call map{To,From}Source multiple times.
QModelIndexList mapFromSource(const QModelIndexList &source_indexes) const; QModelIndexList mapFromSource(const QModelIndexList &source_indexes) const;
QModelIndexList mapToSource(const QModelIndexList &proxy_indexes) const; QModelIndexList mapToSource(const QModelIndexList &proxy_indexes) const;
signals: signals:
void SubModelReset(const QModelIndex &root, QAbstractItemModel *model); void SubModelReset(const QModelIndex &root, QAbstractItemModel *model);
private slots: private slots:

View File

@ -37,7 +37,7 @@ class MultiSortFilterProxy : public QSortFilterProxyModel {
void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder); void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder);
protected: protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
private: private:
int Compare(const QVariant &left, const QVariant &right) const; int Compare(const QVariant &left, const QVariant &right) const;

View File

@ -20,4 +20,4 @@
#include "musicstorage.h" #include "musicstorage.h"
MusicStorage::MusicStorage() {} MusicStorage::MusicStorage() = default;

View File

@ -37,7 +37,7 @@
class MusicStorage { class MusicStorage {
public: public:
explicit MusicStorage(); explicit MusicStorage();
virtual ~MusicStorage() {} virtual ~MusicStorage() = default;
enum Role { enum Role {
Role_Storage = Qt::UserRole + 100, Role_Storage = Qt::UserRole + 100,

View File

@ -44,23 +44,23 @@ class NetworkAccessManager : public QNetworkAccessManager {
explicit NetworkAccessManager(QObject *parent = nullptr); explicit NetworkAccessManager(QObject *parent = nullptr);
protected: protected:
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData); QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) override;
}; };
class ThreadSafeNetworkDiskCache : public QAbstractNetworkCache { class ThreadSafeNetworkDiskCache : public QAbstractNetworkCache {
public: public:
explicit ThreadSafeNetworkDiskCache(QObject *parent); explicit ThreadSafeNetworkDiskCache(QObject *parent);
~ThreadSafeNetworkDiskCache(); ~ThreadSafeNetworkDiskCache() override;
qint64 cacheSize() const; qint64 cacheSize() const override;
QIODevice *data(const QUrl &url); QIODevice *data(const QUrl &url) override;
void insert(QIODevice *device); void insert(QIODevice *device) override;
QNetworkCacheMetaData metaData(const QUrl &url); QNetworkCacheMetaData metaData(const QUrl &url) override;
QIODevice *prepare(const QNetworkCacheMetaData &metaData); QIODevice *prepare(const QNetworkCacheMetaData &metaData) override;
bool remove(const QUrl &url); bool remove(const QUrl &url) override;
void updateMetaData(const QNetworkCacheMetaData &metaData); void updateMetaData(const QNetworkCacheMetaData &metaData) override;
void clear(); void clear() override;
private: private:
static QMutex sMutex; static QMutex sMutex;

View File

@ -41,7 +41,7 @@ class NetworkProxyFactory : public QNetworkProxyFactory {
// These methods are thread-safe // These methods are thread-safe
void ReloadSettings(); void ReloadSettings();
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query); QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query) override;
private: private:
explicit NetworkProxyFactory(); explicit NetworkProxyFactory();

View File

@ -40,7 +40,7 @@ class NetworkTimeouts : public QObject {
void SetTimeout(int msec) { timeout_msec_ = msec; } void SetTimeout(int msec) { timeout_msec_ = msec; }
protected: protected:
void timerEvent(QTimerEvent *e); void timerEvent(QTimerEvent *e) override;
private slots: private slots:
void ReplyFinished(); void ReplyFinished();

View File

@ -130,23 +130,23 @@ class Player : public PlayerInterface {
Q_OBJECT Q_OBJECT
public: public:
Player(Application *app, QObject *parent); explicit Player(Application *app, QObject *parent);
~Player(); ~Player() override;
static const char *kSettingsGroup; static const char *kSettingsGroup;
Engine::EngineType CreateEngine(Engine::EngineType enginetype); Engine::EngineType CreateEngine(Engine::EngineType enginetype);
void Init(); void Init();
EngineBase *engine() const { return engine_.get(); } EngineBase *engine() const override { return engine_.get(); }
Engine::State GetState() const { return last_state_; } Engine::State GetState() const override{ return last_state_; }
int GetVolume() const; int GetVolume() const override;
PlaylistItemPtr GetCurrentItem() const { return current_item_; } PlaylistItemPtr GetCurrentItem() const override { return current_item_; }
PlaylistItemPtr GetItemAt(int pos) const; PlaylistItemPtr GetItemAt(int pos) const override;
void RegisterUrlHandler(UrlHandler *handler); void RegisterUrlHandler(UrlHandler *handler) override;
void UnregisterUrlHandler(UrlHandler *handler); void UnregisterUrlHandler(UrlHandler *handler) override;
const UrlHandler *HandlerForUrl(const QUrl &url) const; const UrlHandler *HandlerForUrl(const QUrl &url) const;
@ -156,29 +156,29 @@ class Player : public PlayerInterface {
void SetEqualizer(Equalizer *equalizer) { equalizer_ = equalizer; } void SetEqualizer(Equalizer *equalizer) { equalizer_ = equalizer; }
public slots: public slots:
void ReloadSettings(); void ReloadSettings() override;
void PlayAt(int i, Engine::TrackChangeFlags change, bool reshuffle); void PlayAt(int i, Engine::TrackChangeFlags change, bool reshuffle) override;
void PlayPause(); void PlayPause() override;
void RestartOrPrevious(); void RestartOrPrevious() override;
void Next(); void Next() override;
void Previous(); void Previous() override;
void SetVolume(int value); void SetVolume(int value) override;
void VolumeUp() { SetVolume(GetVolume() + 5); } void VolumeUp() override { SetVolume(GetVolume() + 5); }
void VolumeDown() { SetVolume(GetVolume() - 5); } void VolumeDown() override { SetVolume(GetVolume() - 5); }
void SeekTo(int seconds); void SeekTo(int seconds) override;
void SeekForward(); void SeekForward() override;
void SeekBackward(); void SeekBackward() override;
void CurrentMetadataChanged(const Song &metadata); void CurrentMetadataChanged(const Song &metadata) override;
void Mute(); void Mute() override;
void Pause(); void Pause() override;
void Stop(bool stop_after = false); void Stop(bool stop_after = false) override;
void StopAfterCurrent(); void StopAfterCurrent();
void IntroPointReached(); void IntroPointReached();
void Play(); void Play() override;
void ShowOSD(); void ShowOSD() override;
void TogglePrettyOSD(); void TogglePrettyOSD();
void HandleAuthentication(); void HandleAuthentication();

View File

@ -28,7 +28,7 @@
class PoTranslator : public QTranslator { class PoTranslator : public QTranslator {
public: public:
QString translate(const char *context, const char *source_text, const char *disambiguation = 0, int n = -1) const { QString translate(const char *context, const char *source_text, const char *disambiguation = 0, int n = -1) const override {
Q_UNUSED(n); Q_UNUSED(n);
QString ret = QTranslator::translate(context, source_text, disambiguation); QString ret = QTranslator::translate(context, source_text, disambiguation);
if (!ret.isEmpty()) return ret; if (!ret.isEmpty()) return ret;

View File

@ -31,11 +31,12 @@
class QtFSListener : public FileSystemWatcherInterface { class QtFSListener : public FileSystemWatcherInterface {
Q_OBJECT Q_OBJECT
public: public:
explicit QtFSListener(QObject *parent); explicit QtFSListener(QObject *parent);
virtual void AddPath(const QString &path); void AddPath(const QString &path) override;
virtual void RemovePath(const QString &path); void RemovePath(const QString &path) override;
virtual void Clear(); void Clear() override;
private: private:
QFileSystemWatcher watcher_; QFileSystemWatcher watcher_;

View File

@ -44,32 +44,32 @@ class QtSystemTrayIcon : public SystemTrayIcon {
public: public:
QtSystemTrayIcon(QObject *parent = nullptr); QtSystemTrayIcon(QObject *parent = nullptr);
~QtSystemTrayIcon(); ~QtSystemTrayIcon() override;
void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit); void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit) override;
bool IsVisible() const; bool IsVisible() const override;
void SetVisible(bool visible); void SetVisible(bool visible) override;
void ShowPopup(const QString &summary, const QString &message, int timeout); void ShowPopup(const QString &summary, const QString &message, int timeout) override;
void SetNowPlaying(const Song &song, const QUrl &cover_url); void SetNowPlaying(const Song &song, const QUrl &cover_url) override;
void ClearNowPlaying(); void ClearNowPlaying() override;
bool MuteEnabled() { return action_mute_->isVisible(); } bool MuteEnabled() const override { return action_mute_->isVisible(); }
void SetMuteEnabled(bool enabled) { action_mute_->setVisible(enabled); } void SetMuteEnabled(bool enabled) override { action_mute_->setVisible(enabled); }
protected: protected:
// SystemTrayIcon // SystemTrayIcon
void UpdateIcon(); void UpdateIcon() override;
void SetPaused(); void SetPaused() override;
void SetPlaying(bool enable_play_pause = false); void SetPlaying(bool enable_play_pause = false) override;
void SetStopped(); void SetStopped() override;
void MuteButtonStateChanged(bool value); void MuteButtonStateChanged(bool value) override;
void LoveVisibilityChanged(bool value); void LoveVisibilityChanged(bool value) override;
void LoveStateChanged(bool value); void LoveStateChanged(bool value) override;
// QObject // QObject
bool eventFilter(QObject *, QEvent *); bool eventFilter(QObject*, QEvent*) override;
private slots: private slots:
void Clicked(QSystemTrayIcon::ActivationReason); void Clicked(QSystemTrayIcon::ActivationReason);

View File

@ -46,17 +46,17 @@ class DefaultSettingsProvider : public SettingsProvider {
public: public:
DefaultSettingsProvider(); DefaultSettingsProvider();
void set_group(const char* group); void set_group(const char* group) override;
QVariant value(const QString &key, const QVariant &default_value = QVariant()) const; QVariant value(const QString &key, const QVariant &default_value = QVariant()) const override;
void setValue(const QString &key, const QVariant &value); void setValue(const QString &key, const QVariant &value) override;
int beginReadArray(const QString &prefix); int beginReadArray(const QString &prefix) override;
void beginWriteArray(const QString &prefix, int size = -1); void beginWriteArray(const QString &prefix, int size = -1) override;
void setArrayIndex(int i); void setArrayIndex(int i) override;
void endArray(); void endArray() override;
private: private:
QSettings backend_; QSettings backend_;
}; };
#endif // SETTINGSPROVIDER_H #endif // SETTINGSPROVIDER_H

View File

@ -29,17 +29,17 @@
template <typename T> template <typename T>
class SimpleTreeModel : public QAbstractItemModel { class SimpleTreeModel : public QAbstractItemModel {
public: public:
explicit SimpleTreeModel(T *root = 0, QObject *parent = nullptr); explicit SimpleTreeModel(T *root = nullptr, QObject *parent = nullptr);
virtual ~SimpleTreeModel() {} ~SimpleTreeModel() override {}
// QAbstractItemModel // QAbstractItemModel
int columnCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const override;
QModelIndex index(int row, int, const QModelIndex &parent = QModelIndex()) const; QModelIndex index(int row, int, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const; QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const override;
bool hasChildren(const QModelIndex &parent) const; bool hasChildren(const QModelIndex &parent) const override;
bool canFetchMore(const QModelIndex &parent) const; bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent); void fetchMore(const QModelIndex &parent) override;
T *IndexToItem(const QModelIndex &index) const; T *IndexToItem(const QModelIndex &index) const;
QModelIndex ItemToIndex(T *item) const; QModelIndex ItemToIndex(T *item) const;

View File

@ -58,7 +58,7 @@ class SongLoader : public QObject {
Q_OBJECT Q_OBJECT
public: public:
explicit SongLoader(CollectionBackendInterface *collection, const Player *player, QObject *parent = nullptr); explicit SongLoader(CollectionBackendInterface *collection, const Player *player, QObject *parent = nullptr);
~SongLoader(); ~SongLoader() override;
enum Result { enum Result {
Success, Success,

View File

@ -46,7 +46,7 @@ class StyleSheetLoader : public QObject {
void SetStyleSheet(QWidget *widget, const QString& filename); void SetStyleSheet(QWidget *widget, const QString& filename);
protected: protected:
bool eventFilter(QObject *obj, QEvent *event); bool eventFilter(QObject *obj, QEvent *event) override;
private: private:
struct StyleSheetData { struct StyleSheetData {

View File

@ -50,7 +50,7 @@ class SystemTrayIcon : public QObject {
virtual void SetNowPlaying(const Song &song, const QUrl &cover_url) { Q_UNUSED(song); Q_UNUSED(cover_url); } virtual void SetNowPlaying(const Song &song, const QUrl &cover_url) { Q_UNUSED(song); Q_UNUSED(cover_url); }
virtual void ClearNowPlaying() {} virtual void ClearNowPlaying() {}
virtual bool MuteEnabled() { return false; } virtual bool MuteEnabled() const { return false; }
virtual void SetMuteEnabled(bool enabled) { Q_UNUSED(enabled); } virtual void SetMuteEnabled(bool enabled) { Q_UNUSED(enabled); }
static SystemTrayIcon *CreateSystemTrayIcon(QObject *parent = nullptr); static SystemTrayIcon *CreateSystemTrayIcon(QObject *parent = nullptr);

View File

@ -34,7 +34,7 @@ class Thread : public QThread {
void SetIoPriority(Utilities::IoPriority priority) { void SetIoPriority(Utilities::IoPriority priority) {
io_priority_ = priority; io_priority_ = priority;
} }
virtual void run() override; void run() override;
private: private:
Utilities::IoPriority io_priority_; Utilities::IoPriority io_priority_;

View File

@ -28,7 +28,7 @@ class QTranslator;
class Translations : public QObject { class Translations : public QObject {
public: public:
explicit Translations(); explicit Translations();
~Translations(); ~Translations() override;
void LoadTranslation(const QString &prefix, const QString &path, const QString &language); void LoadTranslation(const QString &prefix, const QString &path, const QString &language);
private: private:

View File

@ -58,7 +58,7 @@ class AlbumCoverChoiceController : public QWidget {
static const char *kAllFilesFilter; static const char *kAllFilesFilter;
explicit AlbumCoverChoiceController(QWidget *parent = nullptr); explicit AlbumCoverChoiceController(QWidget *parent = nullptr);
~AlbumCoverChoiceController(); ~AlbumCoverChoiceController() override;
void Init(Application *app); void Init(Application *app);
void ReloadSettings(); void ReloadSettings();

View File

@ -36,7 +36,7 @@ class AlbumCoverExport : public QDialog {
public: public:
explicit AlbumCoverExport(QWidget *parent = nullptr); explicit AlbumCoverExport(QWidget *parent = nullptr);
~AlbumCoverExport(); ~AlbumCoverExport() override;
enum OverwriteMode { enum OverwriteMode {
OverwriteMode_None = 0, OverwriteMode_None = 0,

View File

@ -38,7 +38,6 @@ class AlbumCoverExporter : public QObject {
public: public:
explicit AlbumCoverExporter(QObject *parent = nullptr); explicit AlbumCoverExporter(QObject *parent = nullptr);
virtual ~AlbumCoverExporter() {}
static const int kMaxConcurrentRequests; static const int kMaxConcurrentRequests;

View File

@ -89,7 +89,7 @@ class AlbumCoverFetcher : public QObject {
public: public:
explicit AlbumCoverFetcher(CoverProviders *cover_providers, QObject *parent = nullptr, QNetworkAccessManager *network = 0); explicit AlbumCoverFetcher(CoverProviders *cover_providers, QObject *parent = nullptr, QNetworkAccessManager *network = 0);
~AlbumCoverFetcher(); ~AlbumCoverFetcher() override;
static const int kMaxConcurrentRequests; static const int kMaxConcurrentRequests;

View File

@ -50,7 +50,7 @@ class AlbumCoverFetcherSearch : public QObject {
public: public:
explicit AlbumCoverFetcherSearch(const CoverSearchRequest &request, QNetworkAccessManager *network, QObject *parent); explicit AlbumCoverFetcherSearch(const CoverSearchRequest &request, QNetworkAccessManager *network, QObject *parent);
~AlbumCoverFetcherSearch(); ~AlbumCoverFetcherSearch() override;
void Start(CoverProviders *cover_providers); void Start(CoverProviders *cover_providers);

View File

@ -64,7 +64,7 @@ class AlbumCoverManager : public QMainWindow {
Q_OBJECT Q_OBJECT
public: public:
explicit AlbumCoverManager(Application *app, CollectionBackend *collection_backend, QMainWindow *mainwindow, QWidget *parent = nullptr); explicit AlbumCoverManager(Application *app, CollectionBackend *collection_backend, QMainWindow *mainwindow, QWidget *parent = nullptr);
~AlbumCoverManager(); ~AlbumCoverManager() override;
static const char *kSettingsGroup; static const char *kSettingsGroup;
@ -83,11 +83,11 @@ class AlbumCoverManager : public QMainWindow {
SongMimeData *GetMimeDataForAlbums(const QModelIndexList &indexes) const; SongMimeData *GetMimeDataForAlbums(const QModelIndexList &indexes) const;
protected: protected:
void showEvent(QShowEvent*); void showEvent(QShowEvent*) override;
void closeEvent(QCloseEvent*); void closeEvent(QCloseEvent*) override;
// For the album view context menu events // For the album view context menu events
bool eventFilter(QObject *obj, QEvent *event); bool eventFilter(QObject *obj, QEvent *event) override;
private: private:
enum ArtistItemType { enum ArtistItemType {

View File

@ -43,8 +43,8 @@ class AlbumCoverManagerList : public QListWidget {
void set_cover_manager(AlbumCoverManager *manager) { manager_ = manager; } void set_cover_manager(AlbumCoverManager *manager) { manager_ = manager; }
protected: protected:
QMimeData *mimeData(const QList<QListWidgetItem*> items) const; QMimeData *mimeData(const QList<QListWidgetItem*> items) const override;
void dropEvent(QDropEvent *event); void dropEvent(QDropEvent *event) override;
private: private:
AlbumCoverManager* manager_; AlbumCoverManager* manager_;

View File

@ -60,7 +60,7 @@ class SizeOverlayDelegate : public QStyledItemDelegate {
explicit SizeOverlayDelegate(QObject *parent = nullptr); 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 // This is a dialog that lets the user search for album covers
@ -69,7 +69,7 @@ class AlbumCoverSearcher : public QDialog {
public: public:
explicit AlbumCoverSearcher(const QIcon &no_cover_icon, Application *app, QWidget *parent); explicit AlbumCoverSearcher(const QIcon &no_cover_icon, Application *app, QWidget *parent);
~AlbumCoverSearcher(); ~AlbumCoverSearcher() override;
enum Role { enum Role {
Role_ImageURL = Qt::UserRole + 1, Role_ImageURL = Qt::UserRole + 1,
@ -84,7 +84,7 @@ class AlbumCoverSearcher : public QDialog {
QImage Exec(const QString &artist, const QString &album); QImage Exec(const QString &artist, const QString &album);
protected: protected:
void keyPressEvent(QKeyEvent*); void keyPressEvent(QKeyEvent*) override;
private slots: private slots:
void Search(); void Search();

View File

@ -35,11 +35,10 @@ class CoverExportRunnable : public QObject, public QRunnable {
public: public:
explicit CoverExportRunnable(const AlbumCoverExport::DialogResult &dialog_result, const Song &song); explicit CoverExportRunnable(const AlbumCoverExport::DialogResult &dialog_result, const Song &song);
virtual ~CoverExportRunnable() {}
void run(); void run() override;
signals: signals:
void CoverExported(); void CoverExported();
void CoverSkipped(); void CoverSkipped();

View File

@ -39,13 +39,13 @@ class CoverFromURLDialog : public QDialog {
public: public:
explicit CoverFromURLDialog(QWidget *parent = nullptr); 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. // Opens the dialog. This returns an image found at the URL chosen by user or null image if the dialog got rejected.
QImage Exec(); QImage Exec();
private slots: private slots:
void accept(); void accept() override;
void LoadCoverFromURLFinished(); void LoadCoverFromURLFinished();
private: private:

View File

@ -41,7 +41,7 @@ class CoverProviders : public QObject {
public: public:
explicit CoverProviders(QObject *parent = nullptr); explicit CoverProviders(QObject *parent = nullptr);
~CoverProviders(); ~CoverProviders() override;
void ReloadSettings(); void ReloadSettings();

View File

@ -38,7 +38,7 @@ class CoverSearchStatisticsDialog : public QDialog {
public: public:
explicit CoverSearchStatisticsDialog(QWidget *parent = nullptr); explicit CoverSearchStatisticsDialog(QWidget *parent = nullptr);
~CoverSearchStatisticsDialog(); ~CoverSearchStatisticsDialog() override;
void Show(const CoverSearchStatistics& statistics); void Show(const CoverSearchStatistics& statistics);

View File

@ -43,7 +43,7 @@ class CurrentAlbumCoverLoader : public QObject {
public: public:
explicit CurrentAlbumCoverLoader(Application *app, QObject *parent = nullptr); explicit CurrentAlbumCoverLoader(Application *app, QObject *parent = nullptr);
~CurrentAlbumCoverLoader(); ~CurrentAlbumCoverLoader() override;
const AlbumCoverLoaderOptions &options() const { return options_; } const AlbumCoverLoaderOptions &options() const { return options_; }
const Song &last_song() const { return last_song_; } const Song &last_song() const { return last_song_; }

View File

@ -41,10 +41,10 @@ class DeezerCoverProvider : public JsonCoverProvider {
public: public:
explicit DeezerCoverProvider(Application *app, QObject *parent = nullptr); explicit DeezerCoverProvider(Application *app, QObject *parent = nullptr);
~DeezerCoverProvider(); ~DeezerCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
private slots: private slots:
void HandleSearchReply(QNetworkReply *reply, const int id); void HandleSearchReply(QNetworkReply *reply, const int id);
@ -52,7 +52,7 @@ class DeezerCoverProvider : public JsonCoverProvider {
private: private:
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
QJsonValue ExtractData(const QByteArray &data); 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: private:
static const char *kApiUrl; static const char *kApiUrl;

View File

@ -50,10 +50,10 @@ class DiscogsCoverProvider : public JsonCoverProvider {
public: public:
explicit DiscogsCoverProvider(Application *app, QObject *parent = nullptr); explicit DiscogsCoverProvider(Application *app, QObject *parent = nullptr);
~DiscogsCoverProvider(); ~DiscogsCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
enum DiscogsCoverType { enum DiscogsCoverType {
DiscogsCoverType_Master, DiscogsCoverType_Master,
@ -86,7 +86,7 @@ class DiscogsCoverProvider : public JsonCoverProvider {
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
void StartReleaseRequest(std::shared_ptr<DiscogsCoverSearchContext> search, const quint64 release_id, const QUrl &url); 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 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: private slots:
void FlushRequests(); void FlushRequests();

View File

@ -40,9 +40,9 @@ class LastFmCoverProvider : public JsonCoverProvider {
public: public:
explicit LastFmCoverProvider(Application *app, QObject *parent = nullptr); 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: private slots:
void QueryFinished(QNetworkReply *reply, const int id, const QString &type); void QueryFinished(QNetworkReply *reply, const int id, const QString &type);
@ -58,7 +58,7 @@ class LastFmCoverProvider : public JsonCoverProvider {
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
LastFmImageSize ImageSizeFromString(const QString &size); 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: private:
static const char *kUrl; static const char *kUrl;

View File

@ -42,9 +42,9 @@ class MusicbrainzCoverProvider : public JsonCoverProvider {
public: public:
explicit MusicbrainzCoverProvider(Application *app, QObject *parent = nullptr); 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: private slots:
void FlushRequests(); void FlushRequests();
@ -60,7 +60,7 @@ class MusicbrainzCoverProvider : public JsonCoverProvider {
void SendSearchRequest(const SearchRequest &request); void SendSearchRequest(const SearchRequest &request);
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
void Error(const QString &error, const QVariant &debug = QVariant()); void Error(const QString &error, const QVariant &debug = QVariant()) override;
private: private:
static const char *kReleaseSearchUrl; static const char *kReleaseSearchUrl;

View File

@ -38,13 +38,13 @@ class MusixmatchCoverProvider : public JsonCoverProvider {
public: public:
explicit MusixmatchCoverProvider(Application *app, QObject *parent = nullptr); explicit MusixmatchCoverProvider(Application *app, QObject *parent = nullptr);
~MusixmatchCoverProvider(); ~MusixmatchCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
private: private:
void Error(const QString &error, const QVariant &debug = QVariant()); void Error(const QString &error, const QVariant &debug = QVariant()) override;
private slots: private slots:
void HandleSearchReply(QNetworkReply *reply, const int id, const QString &artist, const QString &album); void HandleSearchReply(QNetworkReply *reply, const int id, const QString &artist, const QString &album);

View File

@ -40,17 +40,17 @@ class QobuzCoverProvider : public JsonCoverProvider {
public: public:
explicit QobuzCoverProvider(Application *app, QObject *parent = nullptr); explicit QobuzCoverProvider(Application *app, QObject *parent = nullptr);
~QobuzCoverProvider(); ~QobuzCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
private slots: private slots:
void HandleSearchReply(QNetworkReply *reply, const int id); void HandleSearchReply(QNetworkReply *reply, const int id);
private: private:
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
void Error(const QString &error, const QVariant &debug = QVariant()); void Error(const QString &error, const QVariant &debug = QVariant()) override;
private: private:
static const char *kApiUrl; static const char *kApiUrl;

View File

@ -46,14 +46,14 @@ class SpotifyCoverProvider : public JsonCoverProvider {
public: public:
explicit SpotifyCoverProvider(Application *app, QObject *parent = nullptr); explicit SpotifyCoverProvider(Application *app, QObject *parent = nullptr);
~SpotifyCoverProvider(); ~SpotifyCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
void Authenticate(); void Authenticate() override;
void Deauthenticate(); void Deauthenticate() override;
bool IsAuthenticated() const { return !access_token_.isEmpty(); } bool IsAuthenticated() const override { return !access_token_.isEmpty(); }
private slots: private slots:
void HandleLoginSSLErrors(QList<QSslError> ssl_errors); void HandleLoginSSLErrors(QList<QSslError> ssl_errors);
@ -65,7 +65,7 @@ class SpotifyCoverProvider : public JsonCoverProvider {
private: private:
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
void AuthError(const QString &error = QString(), const QVariant &debug = QVariant()); 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: private:
typedef QPair<QString, QString> Param; typedef QPair<QString, QString> Param;

View File

@ -44,20 +44,20 @@ class TidalCoverProvider : public JsonCoverProvider {
public: public:
explicit TidalCoverProvider(Application *app, QObject *parent = nullptr); explicit TidalCoverProvider(Application *app, QObject *parent = nullptr);
~TidalCoverProvider(); ~TidalCoverProvider() 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;
void CancelSearch(const int id); void CancelSearch(const int id) override;
bool IsAuthenticated() const { return service_ && service_->authenticated(); } bool IsAuthenticated() const override { return service_ && service_->authenticated(); }
void Deauthenticate() { if (service_) service_->Logout(); } void Deauthenticate() override { if (service_) service_->Logout(); }
private slots: private slots:
void HandleSearchReply(QNetworkReply *reply, const int id); void HandleSearchReply(QNetworkReply *reply, const int id);
private: private:
QByteArray GetReplyData(QNetworkReply *reply); QByteArray GetReplyData(QNetworkReply *reply);
void Error(const QString &error, const QVariant &debug = QVariant()); void Error(const QString &error, const QVariant &debug = QVariant()) override;
private: private:
static const char *kApiUrl; static const char *kApiUrl;

View File

@ -42,8 +42,6 @@ CddaDevice::CddaDevice(const QUrl &url, DeviceLister *lister, const QString &uni
} }
CddaDevice::~CddaDevice() {}
bool CddaDevice::Init() { bool CddaDevice::Init() {
song_count_ = 0; // Reset song count, in case it was already set song_count_ = 0; // Reset song count, in case it was already set

View File

@ -45,17 +45,16 @@ class CddaDevice : public ConnectedDevice {
Q_OBJECT Q_OBJECT
public: public:
Q_INVOKABLE CddaDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time); Q_INVOKABLE explicit CddaDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time);
~CddaDevice();
bool Init(); bool Init() override;
void Refresh(); void Refresh() override;
bool CopyToStorage(const MusicStorage::CopyJob&) { return false; } bool CopyToStorage(const MusicStorage::CopyJob&) override { return false; }
bool DeleteFromStorage(const MusicStorage::DeleteJob&) { return false; } bool DeleteFromStorage(const MusicStorage::DeleteJob&) override { return false; }
static QStringList url_schemes() { return QStringList() << "cdda"; } static QStringList url_schemes() { return QStringList() << "cdda"; }
signals: signals:
void SongsDiscovered(const SongList &songs); void SongsDiscovered(const SongList &songs);
private slots: private slots:

View File

@ -39,20 +39,20 @@ class CddaLister : public DeviceLister {
public: public:
explicit CddaLister() {} explicit CddaLister() {}
QStringList DeviceUniqueIDs(); QStringList DeviceUniqueIDs() override;
QVariantList DeviceIcons(const QString &id); QVariantList DeviceIcons(const QString &id) override;
QString DeviceManufacturer(const QString &id); QString DeviceManufacturer(const QString &id) override;
QString DeviceModel(const QString &id); QString DeviceModel(const QString &id) override;
quint64 DeviceCapacity(const QString &id); quint64 DeviceCapacity(const QString &id) override;
quint64 DeviceFreeSpace(const QString &id); quint64 DeviceFreeSpace(const QString &id) override;
QVariantMap DeviceHardwareInfo(const QString &id); QVariantMap DeviceHardwareInfo(const QString &id) override;
bool AskForScan(const QString&) const { return false; } bool AskForScan(const QString&) const override { return false; }
QString MakeFriendlyName(const QString&); QString MakeFriendlyName(const QString&) override;
QList<QUrl> MakeDeviceUrls(const QString&); QList<QUrl> MakeDeviceUrls(const QString&) override;
void UnmountDevice(const QString&); void UnmountDevice(const QString&) override;
void UpdateDeviceFreeSpace(const QString&); void UpdateDeviceFreeSpace(const QString&) override;
bool Init(); bool Init() override;
bool CopyMusic() { return false; } bool CopyMusic() override { return false; }
private: private:
QStringList devices_list_; QStringList devices_list_;

View File

@ -45,7 +45,7 @@ class CddaSongLoader : public QObject {
public: public:
explicit CddaSongLoader(const QUrl &url = QUrl(), QObject *parent = nullptr); explicit CddaSongLoader(const QUrl &url = QUrl(), QObject *parent = nullptr);
~CddaSongLoader(); ~CddaSongLoader() override;
// Load songs. Signals declared below will be emitted anytime new information will be available. // Load songs. Signals declared below will be emitted anytime new information will be available.
void LoadSongs(); void LoadSongs();

View File

@ -44,7 +44,7 @@ class ConnectedDevice : public QObject, public virtual MusicStorage, public std:
public: public:
explicit ConnectedDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time); explicit ConnectedDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time);
~ConnectedDevice(); ~ConnectedDevice() override;
virtual bool Init() = 0; virtual bool Init() = 0;
virtual bool IsLoading() { return false; } virtual bool IsLoading() { return false; }
@ -54,8 +54,8 @@ class ConnectedDevice : public QObject, public virtual MusicStorage, public std:
// we can call this method to refresh device's state // we can call this method to refresh device's state
virtual void Refresh() {} virtual void Refresh() {}
virtual TranscodeMode GetTranscodeMode() const; TranscodeMode GetTranscodeMode() const override;
virtual Song::FileType GetTranscodeFormat() const; Song::FileType GetTranscodeFormat() const override;
DeviceLister *lister() const { return lister_; } DeviceLister *lister() const { return lister_; }
QString unique_id() const { return unique_id_; } QString unique_id() const { return unique_id_; }
@ -63,10 +63,10 @@ class ConnectedDevice : public QObject, public virtual MusicStorage, public std:
QUrl url() const { return url_; } QUrl url() const { return url_; }
int song_count() const { return song_count_; } int song_count() const { return song_count_; }
virtual void FinishCopy(bool success); void FinishCopy(bool success) override;
virtual void FinishDelete(bool success); void FinishDelete(bool success) override;
virtual void Eject(); void Eject() override;
virtual void Close(); virtual void Close();
public slots: public slots:

View File

@ -49,8 +49,6 @@ DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent) :
} }
DeviceDatabaseBackend::~DeviceDatabaseBackend() {}
void DeviceDatabaseBackend::Init(Database* db) { db_ = db; } void DeviceDatabaseBackend::Init(Database* db) { db_ = db; }
void DeviceDatabaseBackend::Close() { void DeviceDatabaseBackend::Close() {

View File

@ -39,7 +39,6 @@ class DeviceDatabaseBackend : public QObject {
public: public:
Q_INVOKABLE DeviceDatabaseBackend(QObject *parent = nullptr); Q_INVOKABLE DeviceDatabaseBackend(QObject *parent = nullptr);
~DeviceDatabaseBackend();
struct Device { struct Device {
Device() : id_(-1) {} Device() : id_(-1) {}

View File

@ -38,7 +38,7 @@ class DeviceLister : public QObject {
public: public:
DeviceLister(); DeviceLister();
virtual ~DeviceLister(); ~DeviceLister() override;
// Tries to start the thread and initialise the engine. This object will be moved to the new thread. // Tries to start the thread and initialise the engine. This object will be moved to the new thread.
void Start(); void Start();

View File

@ -59,7 +59,7 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
public: public:
explicit DeviceManager(Application *app, QObject *parent = nullptr); explicit DeviceManager(Application *app, QObject *parent = nullptr);
~DeviceManager(); ~DeviceManager() override;
enum Role { enum Role {
Role_State = CollectionModel::LastRole, Role_State = CollectionModel::LastRole,
@ -113,7 +113,7 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
void SetDeviceOptions(QModelIndex idx, const QString &friendly_name, const QString &icon_name, MusicStorage::TranscodeMode mode, Song::FileType format); void SetDeviceOptions(QModelIndex idx, const QString &friendly_name, const QString &icon_name, MusicStorage::TranscodeMode mode, Song::FileType format);
// QAbstractItemModel // QAbstractItemModel
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const; QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const override;
public slots: public slots:
void Unmount(QModelIndex idx); void Unmount(QModelIndex idx);
@ -140,11 +140,10 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
void DeviceDestroyed(); void DeviceDestroyed();
protected: protected:
void LazyPopulate(DeviceInfo *item) { LazyPopulate(item, true); } void LazyPopulate(DeviceInfo *item) override { LazyPopulate(item, true); }
void LazyPopulate(DeviceInfo *parent, const bool signal); void LazyPopulate(DeviceInfo *parent, const bool signal);
private: private:
void AddLister(DeviceLister *lister); void AddLister(DeviceLister *lister);
template <typename T> void AddDeviceClass(); template <typename T> void AddDeviceClass();

View File

@ -43,13 +43,13 @@ class DeviceProperties : public QDialog {
public: public:
explicit DeviceProperties(QWidget *parent = nullptr); explicit DeviceProperties(QWidget *parent = nullptr);
~DeviceProperties(); ~DeviceProperties() override;
void SetDeviceManager(DeviceManager *manager); void SetDeviceManager(DeviceManager *manager);
void ShowDevice(QModelIndex idx); void ShowDevice(QModelIndex idx);
public slots: public slots:
void accept(); void accept() override;
private: private:
void UpdateHardwareInfo(); void UpdateHardwareInfo();

View File

@ -38,13 +38,13 @@ class DeviceStateFilterModel : public QSortFilterProxyModel {
public: public:
explicit DeviceStateFilterModel(QObject *parent, DeviceManager::State state = DeviceManager::State_Remembered); explicit DeviceStateFilterModel(QObject *parent, DeviceManager::State state = DeviceManager::State_Remembered);
void setSourceModel(QAbstractItemModel *sourceModel); void setSourceModel(QAbstractItemModel *sourceModel) override;
signals: signals:
void IsEmptyChanged(bool is_empty); void IsEmptyChanged(bool is_empty);
protected: protected:
bool filterAcceptsRow(int row, const QModelIndex &parent) const; bool filterAcceptsRow(int row, const QModelIndex &parent) const override;
private slots: private slots:
void ProxyRowCountChanged(); void ProxyRowCountChanged();

View File

@ -189,7 +189,7 @@ DeviceView::DeviceView(QWidget *parent)
setSelectionMode(QAbstractItemView::ExtendedSelection); setSelectionMode(QAbstractItemView::ExtendedSelection);
} }
DeviceView::~DeviceView() {} DeviceView::~DeviceView() = default;
void DeviceView::SetApplication(Application *app) { void DeviceView::SetApplication(Application *app) {

View File

@ -57,7 +57,7 @@ class DeviceItemDelegate : public CollectionItemDelegate {
static const int kIconPadding; static const int kIconPadding;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
}; };
@ -66,13 +66,13 @@ class DeviceView : public AutoExpandingTreeView {
public: public:
explicit DeviceView(QWidget *parent = nullptr); explicit DeviceView(QWidget *parent = nullptr);
~DeviceView(); ~DeviceView() override;
void SetApplication(Application *app); void SetApplication(Application *app);
protected: protected:
void contextMenuEvent(QContextMenuEvent*); void contextMenuEvent(QContextMenuEvent*) override;
void mouseDoubleClickEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event) override;
private slots: private slots:
// Device menu actions // Device menu actions
@ -94,7 +94,7 @@ class DeviceView : public AutoExpandingTreeView {
void DeleteFinished(const SongList &songs_with_errors); void DeleteFinished(const SongList &songs_with_errors);
// AutoExpandingTreeView // AutoExpandingTreeView
bool CanRecursivelyExpand(const QModelIndex &idx) const; bool CanRecursivelyExpand(const QModelIndex &idx) const override;
private: private:
QModelIndex MapToDevice(const QModelIndex &merged_model_index) const; QModelIndex MapToDevice(const QModelIndex &merged_model_index) const;

View File

@ -35,7 +35,7 @@ class DeviceViewContainer : public QWidget {
public: public:
explicit DeviceViewContainer(QWidget *parent = nullptr); explicit DeviceViewContainer(QWidget *parent = nullptr);
~DeviceViewContainer(); ~DeviceViewContainer() override;
DeviceView *view() const; DeviceView *view() const;

View File

@ -47,15 +47,15 @@ public:
const QString &unique_id, DeviceManager *manager, const QString &unique_id, DeviceManager *manager,
Application *app, Application *app,
int database_id, bool first_time); int database_id, bool first_time);
~FilesystemDevice(); ~FilesystemDevice() override;
bool Init(); bool Init() override;
void CloseAsync(); void CloseAsync();
static QStringList url_schemes() { return QStringList() << "file"; } static QStringList url_schemes() { return QStringList() << "file"; }
private slots: private slots:
void Close(); void Close() override;
void ExitFinished(); void ExitFinished();
private: private:

View File

@ -50,29 +50,29 @@ class GioLister : public DeviceLister {
public: public:
explicit GioLister() {} explicit GioLister() {}
~GioLister(); ~GioLister() override;
int priority() const { return 50; } int priority() const override { return 50; }
QStringList DeviceUniqueIDs(); QStringList DeviceUniqueIDs() override;
QVariantList DeviceIcons(const QString &id); QVariantList DeviceIcons(const QString &id) override;
QString DeviceManufacturer(const QString &id); QString DeviceManufacturer(const QString &id) override;
QString DeviceModel(const QString &id); QString DeviceModel(const QString &id) override;
quint64 DeviceCapacity(const QString &id); quint64 DeviceCapacity(const QString &id) override;
quint64 DeviceFreeSpace(const QString &id); quint64 DeviceFreeSpace(const QString &id) override;
QVariantMap DeviceHardwareInfo(const QString &id); QVariantMap DeviceHardwareInfo(const QString &id) override;
bool DeviceNeedsMount(const QString &id); bool DeviceNeedsMount(const QString &id) override;
QString MakeFriendlyName(const QString &id); QString MakeFriendlyName(const QString &id) override;
QList<QUrl> MakeDeviceUrls(const QString &id); QList<QUrl> MakeDeviceUrls(const QString &id) override;
public slots: public slots:
void MountDevice(const QString &id, const int request_id); void MountDevice(const QString &id, const int request_id) override;
void UnmountDevice(const QString &id); void UnmountDevice(const QString &id) override;
void UpdateDeviceFreeSpace(const QString &id); void UpdateDeviceFreeSpace(const QString &id) override;
protected: protected:
bool Init(); bool Init() override;
private: private:
struct DeviceInfo { struct DeviceInfo {

View File

@ -37,7 +37,7 @@
class MtpConnection : public QObject, public std::enable_shared_from_this<MtpConnection> { class MtpConnection : public QObject, public std::enable_shared_from_this<MtpConnection> {
public: public:
explicit MtpConnection(const QUrl &url); explicit MtpConnection(const QUrl &url);
~MtpConnection(); ~MtpConnection() override;
bool is_valid() const { return device_; } bool is_valid() const { return device_; }
LIBMTP_mtpdevice_t *device() const { return device_; } LIBMTP_mtpdevice_t *device() const { return device_; }

View File

@ -49,26 +49,26 @@ class MtpDevice : public ConnectedDevice {
public: public:
Q_INVOKABLE MtpDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time); Q_INVOKABLE MtpDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time);
~MtpDevice(); ~MtpDevice() override;
static QStringList url_schemes() { return QStringList() << "mtp"; } static QStringList url_schemes() { return QStringList() << "mtp"; }
bool Init(); bool Init() override;
void ConnectAsync(); void ConnectAsync() override;
void Close(); void Close() override;
bool IsLoading() { return loader_; } bool IsLoading() override { return loader_; }
bool GetSupportedFiletypes(QList<Song::FileType>* ret); bool GetSupportedFiletypes(QList<Song::FileType>* ret) override;
int GetFreeSpace(); int GetFreeSpace();
int GetCapacity(); int GetCapacity();
bool StartCopy(QList<Song::FileType>* supported_types); bool StartCopy(QList<Song::FileType>* supported_types) override;
bool CopyToStorage(const CopyJob& job); bool CopyToStorage(const CopyJob& job) override;
void FinishCopy(bool success); void FinishCopy(bool success) override;
void StartDelete(); void StartDelete() override;
bool DeleteFromStorage(const DeleteJob& job); bool DeleteFromStorage(const DeleteJob& job) override;
void FinishDelete(bool success); void FinishDelete(bool success) override;
private slots: private slots:
void LoadFinished(bool success, MtpConnection *connection); void LoadFinished(bool success, MtpConnection *connection);

View File

@ -40,7 +40,7 @@ class MtpLoader : public QObject {
public: public:
explicit MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBackend *backend); explicit MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBackend *backend);
~MtpLoader(); ~MtpLoader() override;
bool Init(); bool Init();
void Abort() { abort_ = true; } void Abort() { abort_ = true; }

View File

@ -50,7 +50,7 @@ class Udisks2Lister : public DeviceLister {
public: public:
explicit Udisks2Lister(); explicit Udisks2Lister();
~Udisks2Lister(); ~Udisks2Lister() override;
QStringList DeviceUniqueIDs() override; QStringList DeviceUniqueIDs() override;
QVariantList DeviceIcons(const QString &id) override; QVariantList DeviceIcons(const QString &id) override;

View File

@ -32,13 +32,13 @@ class AddStreamDialog : public QDialog {
public: public:
AddStreamDialog(QWidget *parent = nullptr); AddStreamDialog(QWidget *parent = nullptr);
~AddStreamDialog(); ~AddStreamDialog() override;
QUrl url() const { return QUrl(ui_->url->text()); } QUrl url() const { return QUrl(ui_->url->text()); }
void set_url(const QUrl &url) { ui_->url->setText(url.toString());} void set_url(const QUrl &url) { ui_->url->setText(url.toString());}
protected: protected:
void showEvent(QShowEvent*); void showEvent(QShowEvent*) override;
private slots: private slots:
void TextChanged(const QString &text); void TextChanged(const QString &text);

Some files were not shown because too many files have changed in this diff Show More