diff --git a/src/covermanager/albumcoverexport.cpp b/src/covermanager/albumcoverexport.cpp index a92b56af7..6dcd47a52 100644 --- a/src/covermanager/albumcoverexport.cpp +++ b/src/covermanager/albumcoverexport.cpp @@ -84,9 +84,9 @@ AlbumCoverExport::DialogResult AlbumCoverExport::Exec() { s.setValue("export_downloaded", ui_->export_downloaded->isChecked()); s.setValue("export_embedded", ui_->export_embedded->isChecked()); - result.fileName_ = fileName; + result.filename_ = fileName; result.overwrite_ = overwrite; - result.forceSize_ = forceSize; + result.forcesize_ = forceSize; result.width_ = width.toInt(); result.height_ = height.toInt(); result.export_downloaded_ = ui_->export_downloaded->isChecked(); diff --git a/src/covermanager/albumcoverexport.h b/src/covermanager/albumcoverexport.h index 555e07b37..87362a554 100644 --- a/src/covermanager/albumcoverexport.h +++ b/src/covermanager/albumcoverexport.h @@ -46,19 +46,20 @@ class AlbumCoverExport : public QDialog { }; struct DialogResult { + DialogResult() : cancelled_(false), export_downloaded_(false), export_embedded_(false), forcesize_(false), width_(0), height_(0) {} bool cancelled_; bool export_downloaded_; bool export_embedded_; - QString fileName_; + QString filename_; OverwriteMode overwrite_; - bool forceSize_; + bool forcesize_; int width_; int height_; bool IsSizeForced() const { - return forceSize_ && width_ > 0 && height_ > 0; + return forcesize_ && width_ > 0 && height_ > 0; } bool RequiresCoverProcessing() const { diff --git a/src/covermanager/coverexportrunnable.cpp b/src/covermanager/coverexportrunnable.cpp index 276ef9126..8bcee2244 100644 --- a/src/covermanager/coverexportrunnable.cpp +++ b/src/covermanager/coverexportrunnable.cpp @@ -119,7 +119,7 @@ void CoverExportRunnable::ProcessAndExportCover() { QString dir = song_.url().toLocalFile().section('/', 0, -2); QString extension = cover_path.section('.', -1); - QString new_file = dir + '/' + dialog_result_.fileName_ + '.' + (cover_path == Song::kEmbeddedCover ? "jpg" : extension); + QString new_file = dir + '/' + dialog_result_.filename_ + '.' + (cover_path == Song::kEmbeddedCover ? "jpg" : extension); // If the file exists, do not override! if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None && QFile::exists(new_file)) { @@ -163,7 +163,7 @@ void CoverExportRunnable::ExportCover() { QString dir = song_.url().toLocalFile().section('/', 0, -2); QString extension = cover_path.section('.', -1); - QString new_file = dir + '/' + dialog_result_.fileName_ + '.' + (cover_path == Song::kEmbeddedCover ? "jpg" : extension); + QString new_file = dir + '/' + dialog_result_.filename_ + '.' + (cover_path == Song::kEmbeddedCover ? "jpg" : extension); // If the file exists, do not override! if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None && QFile::exists(new_file)) {