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

@@ -35,7 +35,7 @@
#include <QList>
#include <QVariant>
#include <QString>
#include <QRegExp>
#include <QRegularExpression>
#include <QUrl>
#include <QImage>
#include <QImageWriter>
@@ -163,7 +163,7 @@ void AlbumCoverChoiceController::SaveCoverToFileManual(const Song &song, const Q
}
initial_file_name = initial_file_name + "-" + (song.effective_album().isEmpty() ? tr("unknown") : song.effective_album()) + ".jpg";
initial_file_name = initial_file_name.toLower();
initial_file_name.replace(QRegExp("\\s"), "-");
initial_file_name.replace(QRegularExpression("\\s"), "-");
initial_file_name.remove(OrganiseFormat::kInvalidFatCharacters);
QString save_filename = QFileDialog::getSaveFileName(this, tr("Save album cover"), GetInitialPathForFileDialog(song, initial_file_name), tr(kSaveImageFileFilter) + ";;" + tr(kAllFilesFilter));