Replace QRegExp with QRegularExpression
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegExp>
|
||||
#include <QTextCodec>
|
||||
#include <QTextStream>
|
||||
@@ -62,7 +63,9 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
SongList ret;
|
||||
|
||||
QTextStream text_stream(device);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
text_stream.setCodec(QTextCodec::codecForUtfText(device->peek(1024), QTextCodec::codecForName("UTF-8")));
|
||||
#endif
|
||||
|
||||
QString dir_path = dir.absolutePath();
|
||||
// read the first line already
|
||||
@@ -234,7 +237,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
|
||||
// Cue song has mtime equal to qMax(media_file_mtime, cue_sheet_mtime)
|
||||
if (cue_mtime.isValid()) {
|
||||
song.set_mtime(qMax(cue_mtime.toTime_t(), song.mtime()));
|
||||
song.set_mtime(qMax(static_cast<quint64>(cue_mtime.toSecsSinceEpoch()), song.mtime()));
|
||||
}
|
||||
song.set_cue_path(playlist_path);
|
||||
|
||||
@@ -275,7 +278,7 @@ QStringList CueParser::SplitCueLine(const QString &line) const {
|
||||
}
|
||||
|
||||
// Let's remove the empty entries while we're at it
|
||||
return line_regexp.capturedTexts().filter(QRegExp(".+")).mid(1, -1);
|
||||
return line_regexp.capturedTexts().filter(QRegularExpression(".+")).mid(1, -1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user