Add explicit
This commit is contained in:
@@ -39,7 +39,7 @@ class AsxIniParser : public ParserBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AsxIniParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit AsxIniParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "ASX/INI"; }
|
||||
QStringList file_extensions() const { return QStringList() << "asxini"; }
|
||||
|
||||
@@ -41,7 +41,7 @@ class ASXParser : public XMLParser {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ASXParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit ASXParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "ASX"; }
|
||||
QStringList file_extensions() const { return QStringList() << "asx"; }
|
||||
|
||||
@@ -58,7 +58,7 @@ class CueParser : public ParserBase {
|
||||
static const char *kDate;
|
||||
static const char *kDisc;
|
||||
|
||||
CueParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit CueParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "CUE"; }
|
||||
QStringList file_extensions() const { return QStringList() << "cue"; }
|
||||
|
||||
@@ -41,7 +41,7 @@ class M3UParser : public ParserBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
M3UParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit M3UParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "M3U"; }
|
||||
QStringList file_extensions() const { return QStringList() << "m3u" << "m3u8"; }
|
||||
|
||||
@@ -40,7 +40,7 @@ class ParserBase : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ParserBase(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit ParserBase(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
virtual QString name() const = 0;
|
||||
virtual QStringList file_extensions() const = 0;
|
||||
@@ -56,7 +56,7 @@ class ParserBase : public QObject {
|
||||
virtual SongList Load(QIODevice *device, const QString &playlist_path = "", const QDir &dir = QDir()) const = 0;
|
||||
virtual void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), Playlist::Path path_type = Playlist::Path_Automatic) const = 0;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// Loads a song. If filename_or_url is a URL (with a scheme other than "file") then it is set on the song and the song marked as a stream.
|
||||
// If it is a filename or a file:// URL then it is made absolute and canonical and set as a file:// url on the song.
|
||||
// Also sets the song's metadata by searching in the Collection, or loading from the file as a fallback.
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
// Otherwise returns the URL as is. This function should always be used when saving a playlist.
|
||||
QString URLOrFilename(const QUrl &url, const QDir &dir, Playlist::Path path_type) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
CollectionBackendInterface *collection_;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class PlaylistParser : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PlaylistParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit PlaylistParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
static const int kMagicSize;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class PLSParser : public ParserBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PLSParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit PLSParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "PLS"; }
|
||||
QStringList file_extensions() const { return QStringList() << "pls"; }
|
||||
|
||||
@@ -39,8 +39,9 @@ class QXmlStreamWriter;
|
||||
class CollectionBackendInterface;
|
||||
|
||||
class WplParser : public XMLParser {
|
||||
|
||||
public:
|
||||
WplParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit WplParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "WPL"; }
|
||||
QStringList file_extensions() const { return QStringList() << "wpl"; }
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
class CollectionBackendInterface;
|
||||
|
||||
class XMLParser : public ParserBase {
|
||||
|
||||
protected:
|
||||
XMLParser(CollectionBackendInterface *collection, QObject *parent);
|
||||
explicit XMLParser(CollectionBackendInterface *collection, QObject *parent);
|
||||
|
||||
class StreamElement {
|
||||
public:
|
||||
|
||||
@@ -41,7 +41,7 @@ class XSPFParser : public XMLParser {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
XSPFParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
explicit XSPFParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
|
||||
QString name() const { return "XSPF"; }
|
||||
QStringList file_extensions() const { return QStringList() << "xspf"; }
|
||||
|
||||
Reference in New Issue
Block a user