Fix minor code issues

This commit is contained in:
Jonas Kvinge
2019-09-15 20:27:32 +02:00
parent 83e10aac27
commit 2d67279180
147 changed files with 644 additions and 329 deletions

View File

@@ -39,6 +39,8 @@ bool AsxIniParser::TryMagic(const QByteArray &data) const {
SongList AsxIniParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
SongList ret;
while (!device->atEnd()) {

View File

@@ -41,6 +41,8 @@ ASXParser::ASXParser(CollectionBackendInterface *collection, QObject *parent)
SongList ASXParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
// We have to load everything first so we can munge the "XML".
QByteArray data = device->readAll();
@@ -129,7 +131,7 @@ return_song:
}
void ASXParser::Save(const SongList &songs, QIODevice *device, const QDir&, Playlist::Path path_type) const {
void ASXParser::Save(const SongList &songs, QIODevice *device, const QDir&, Playlist::Path) const {
QXmlStreamWriter writer(device);
writer.setAutoFormatting(true);

View File

@@ -352,7 +352,14 @@ qint64 CueParser::IndexToMarker(const QString &index) const {
}
void CueParser::Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type) const {
Q_UNUSED(songs);
Q_UNUSED(device);
Q_UNUSED(dir);
Q_UNUSED(path_type);
// TODO
}
// Looks for a track starting with one of the .cue's keywords.

View File

@@ -44,6 +44,8 @@ M3UParser::M3UParser(CollectionBackendInterface *collection, QObject *parent)
SongList M3UParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
SongList ret;
M3UType type = STANDARD;

View File

@@ -39,6 +39,8 @@ PLSParser::PLSParser(CollectionBackendInterface *collection, QObject *parent)
SongList PLSParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
QMap<int, Song> songs;
QRegExp n_re("\\d+$");

View File

@@ -42,6 +42,8 @@ bool WplParser::TryMagic(const QByteArray &data) const {
SongList WplParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
SongList ret;
QXmlStreamReader reader(device);

View File

@@ -46,7 +46,7 @@ class XMLParser : public ParserBase {
private:
QXmlStreamWriter *stream_;
Q_DISABLE_COPY(StreamElement);
Q_DISABLE_COPY(StreamElement)
};
};

View File

@@ -43,6 +43,9 @@ XSPFParser::XSPFParser(CollectionBackendInterface *collection, QObject *parent)
: XMLParser(collection, parent) {}
SongList XSPFParser::Load(QIODevice *device, const QString &playlist_path, const QDir &dir) const {
Q_UNUSED(playlist_path);
SongList ret;
QXmlStreamReader reader(device);