Use Qt::endl

This commit is contained in:
Jonas Kvinge 2020-05-29 17:47:26 +02:00
parent 4479d97e90
commit 046512eb3d
2 changed files with 8 additions and 8 deletions

View File

@ -65,11 +65,11 @@ SongList AsxIniParser::Load(QIODevice *device, const QString &playlist_path, con
void AsxIniParser::Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type) const {
QTextStream s(device);
s << "[Reference]" << endl;
s << "[Reference]" << Qt::endl;
int n = 1;
for (const Song &song : songs) {
s << "Ref" << n << "=" << URLOrFilename(song.url(), dir, path_type) << endl;
s << "Ref" << n << "=" << URLOrFilename(song.url(), dir, path_type) << Qt::endl;
++n;
}

View File

@ -81,15 +81,15 @@ SongList PLSParser::Load(QIODevice *device, const QString &playlist_path, const
void PLSParser::Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type) const {
QTextStream s(device);
s << "[playlist]" << endl;
s << "Version=2" << endl;
s << "NumberOfEntries=" << songs.count() << endl;
s << "[playlist]" << Qt::endl;
s << "Version=2" << Qt::endl;
s << "NumberOfEntries=" << songs.count() << Qt::endl;
int n = 1;
for (const Song &song : songs) {
s << "File" << n << "=" << URLOrFilename(song.url(), dir, path_type) << endl;
s << "Title" << n << "=" << song.title() << endl;
s << "Length" << n << "=" << song.length_nanosec() / kNsecPerSec << endl;
s << "File" << n << "=" << URLOrFilename(song.url(), dir, path_type) << Qt::endl;
s << "Title" << n << "=" << song.title() << Qt::endl;
s << "Length" << n << "=" << song.length_nanosec() / kNsecPerSec << Qt::endl;
++n;
}