Fix compile with Qt 5

Forgot to test the changes from the last commit with Qt 5
This commit is contained in:
Jonas Kvinge 2021-02-26 22:01:45 +01:00
parent 133f094d72
commit e15e7f0942
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ void AlbumCoverChoiceController::SaveCoverToFileManual(const Song &song, const A
fileinfo.setFile(save_filename);
}
if (!QImageWriter::supportedImageFormats().contains(fileinfo.completeSuffix())) {
if (!QImageWriter::supportedImageFormats().contains(fileinfo.completeSuffix().toUtf8())) {
save_filename = Utilities::PathWithoutFilenameExtension(save_filename) + ".jpg";
fileinfo.setFile(save_filename);
}
@ -653,7 +653,7 @@ void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const Song &song, co
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QFuture<SongList> future = QtConcurrent::run(&CollectionBackend::GetAlbumSongs, app_->collection_backend(), song.effective_albumartist(), song.effective_album(), QueryOptions());
#else
QFuture<SongList> future = QtConcurrent::run(app_->collection_backend(), &CollectionBackend::GetAlbumSongs, song->effective_albumartist(), song->effective_album(), QueryOptions());
QFuture<SongList> future = QtConcurrent::run(app_->collection_backend(), &CollectionBackend::GetAlbumSongs, song.effective_albumartist(), song.effective_album(), QueryOptions());
#endif
QFutureWatcher<SongList> *watcher = new QFutureWatcher<SongList>();
watcher->setFuture(future);

View File

@ -368,7 +368,7 @@ void AlbumCoverManager::Reset() {
}
if (ui_->artists->selectedItems().isEmpty()) {
ui_->artists->selectionModel()->setCurrentIndex(ui_->artists->indexFromItem(all_artists_), QItemSelectionModel::Clear);
ui_->artists->setCurrentItem(all_artists_);
}
}