Use override
This commit is contained in:
@@ -41,13 +41,13 @@ class AsxIniParser : public ParserBase {
|
||||
public:
|
||||
explicit AsxIniParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "ASX/INI"; }
|
||||
QStringList file_extensions() const { return QStringList() << "asxini"; }
|
||||
QString name() const override { return "ASX/INI"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "asxini"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
};
|
||||
|
||||
#endif // ASXINIPARSER_H
|
||||
|
||||
@@ -43,13 +43,13 @@ class ASXParser : public XMLParser {
|
||||
public:
|
||||
explicit ASXParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "ASX"; }
|
||||
QStringList file_extensions() const { return QStringList() << "asx"; }
|
||||
QString name() const override { return "ASX"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "asx"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
|
||||
private:
|
||||
Song ParseTrack(QXmlStreamReader *reader, const QDir &dir) const;
|
||||
|
||||
@@ -60,14 +60,14 @@ class CueParser : public ParserBase {
|
||||
|
||||
explicit CueParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "CUE"; }
|
||||
QStringList file_extensions() const { return QStringList() << "cue"; }
|
||||
QString mime_type() const { return "application/x-cue"; }
|
||||
QString name() const override { return "CUE"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "cue"; }
|
||||
QString mime_type() const override { return "application/x-cue"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
|
||||
private:
|
||||
// A single TRACK entry in .cue file.
|
||||
|
||||
@@ -43,14 +43,14 @@ class M3UParser : public ParserBase {
|
||||
public:
|
||||
explicit M3UParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "M3U"; }
|
||||
QStringList file_extensions() const { return QStringList() << "m3u" << "m3u8"; }
|
||||
QString mime_type() const { return "text/uri-list"; }
|
||||
QString name() const override { return "M3U"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "m3u" << "m3u8"; }
|
||||
QString mime_type() const override { return "text/uri-list"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
|
||||
private:
|
||||
enum M3UType {
|
||||
|
||||
@@ -41,14 +41,14 @@ class PLSParser : public ParserBase {
|
||||
public:
|
||||
explicit PLSParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "PLS"; }
|
||||
QStringList file_extensions() const { return QStringList() << "pls"; }
|
||||
QString mime_type() const { return "audio/x-scpls"; }
|
||||
QString name() const override { return "PLS"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "pls"; }
|
||||
QString mime_type() const override { return "audio/x-scpls"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
};
|
||||
|
||||
#endif // PLSPARSER_H
|
||||
|
||||
@@ -43,14 +43,14 @@ class WplParser : public XMLParser {
|
||||
public:
|
||||
explicit WplParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "WPL"; }
|
||||
QStringList file_extensions() const { return QStringList() << "wpl"; }
|
||||
QString mime_type() const { return "application/vnd.ms-wpl"; }
|
||||
QString name() const override { return "WPL"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "wpl"; }
|
||||
QString mime_type() const override { return "application/vnd.ms-wpl"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
|
||||
private:
|
||||
void ParseSeq(const QDir &dir, QXmlStreamReader *reader, SongList *songs) const;
|
||||
|
||||
@@ -43,13 +43,13 @@ class XSPFParser : public XMLParser {
|
||||
public:
|
||||
explicit XSPFParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "XSPF"; }
|
||||
QStringList file_extensions() const { return QStringList() << "xspf"; }
|
||||
QString name() const override { return "XSPF"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "xspf"; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const;
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const;
|
||||
SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
|
||||
private:
|
||||
Song ParseTrack(QXmlStreamReader *reader, const QDir &dir) const;
|
||||
|
||||
Reference in New Issue
Block a user