Use Qt::Literals::StringLiterals

This commit is contained in:
Jonas Kvinge
2024-10-18 20:17:23 +02:00
parent 6931538ebf
commit 0e330b81db
156 changed files with 160 additions and 172 deletions

View File

@@ -31,7 +31,7 @@
#include "parserbase.h"
#include "asxiniparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -50,7 +50,7 @@ class AsxIniParser : public ParserBase {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
};

View File

@@ -35,7 +35,7 @@
#include "xmlparser.h"
#include "asxparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -52,7 +52,7 @@ class ASXParser : public XMLParser {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
private:

View File

@@ -40,7 +40,7 @@
#include "parserbase.h"
#include "cueparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -36,8 +36,6 @@
#include "settings/playlistsettingspage.h"
#include "parserbase.h"
using namespace Qt::Literals::StringLiterals;
class QIODevice;
class CollectionBackendInterface;
@@ -57,7 +55,7 @@ class CueParser : public ParserBase {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
static QString FindCueFilename(const QString &filename);

View File

@@ -35,7 +35,7 @@
#include "parserbase.h"
#include "m3uparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -52,7 +52,7 @@ class M3UParser : public ParserBase {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
private:

View File

@@ -34,7 +34,7 @@
#include "settings/playlistsettingspage.h"
#include "parserbase.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
ParserBase::ParserBase(SharedPtr<CollectionBackendInterface> collection_backend, QObject *parent)
: QObject(parent), collection_backend_(collection_backend) {}

View File

@@ -36,8 +36,6 @@
#include "core/song.h"
#include "settings/playlistsettingspage.h"
using namespace Qt::Literals::StringLiterals;
class QIODevice;
class CollectionBackendInterface;
@@ -60,7 +58,7 @@ class ParserBase : public QObject {
// This method might not return all the songs found in the playlist.
// Any playlist parser may decide to leave out some entries if it finds them incomplete or invalid.
// This means that the final resulting SongList should be considered valid (at least from the parser's point of view).
virtual SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const = 0;
virtual SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const = 0;
virtual void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const = 0;
Q_SIGNALS:

View File

@@ -42,7 +42,7 @@
#include "wplparser.h"
#include "xspfparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
const int PlaylistParser::kMagicSize = 512;

View File

@@ -34,7 +34,7 @@
#include "parserbase.h"
#include "plsparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -51,7 +51,7 @@ class PLSParser : public ParserBase {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
};

View File

@@ -35,7 +35,7 @@
#include "xmlparser.h"
#include "wplparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -37,7 +37,7 @@
#include "xmlparser.h"
#include "xspfparser.h"
using namespace Qt::StringLiterals;
using namespace Qt::Literals::StringLiterals;
class CollectionBackendInterface;

View File

@@ -51,7 +51,7 @@ class XSPFParser : public XMLParser {
bool TryMagic(const QByteArray &data) const override;
SongList Load(QIODevice *device, const QString &playlist_path = ""_L1, const QDir &dir = QDir(), const bool collection_lookup = true) const override;
SongList Load(QIODevice *device, const QString &playlist_path = QLatin1String(""), const QDir &dir = QDir(), const bool collection_lookup = true) const override;
void Save(const SongList &songs, QIODevice *device, const QDir &dir = QDir(), const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType::Automatic) const override;
private: