Replace QRegExp with QRegularExpression

This commit is contained in:
Jonas Kvinge
2020-07-18 04:05:07 +02:00
parent cf5259e218
commit e5b3df41e9
25 changed files with 102 additions and 96 deletions

View File

@@ -32,6 +32,7 @@
#include <QQueue>
#include <QVariant>
#include <QString>
#include <QRegularExpression>
#include <QUrl>
#include <QImage>
#include <QPixmap>
@@ -150,7 +151,7 @@ QString AlbumCoverLoader::CoverFilePath(const Song::Source source, const QString
filename = CoverFilenameFromVariable(artist, album);
filename.remove(OrganiseFormat::kInvalidFatCharacters);
if (cover_lowercase_) filename = filename.toLower();
if (cover_replace_spaces_) filename.replace(QRegExp("\\s"), "-");
if (cover_replace_spaces_) filename.replace(QRegularExpression("\\s"), "-");
if (!extension.isEmpty()) {
filename.append('.');
filename.append(extension);