Fix missing cover after updating the comics flow

This commit is contained in:
Luis Ángel San Martín 2024-01-27 10:26:36 +01:00
parent d353bf8014
commit 1280918bfe

View File

@ -384,8 +384,8 @@ void ClassicComicsView::addItemsToFlow(const QModelIndex &parent, int from, int
{
Q_UNUSED(parent);
for (int i = from; i <= to; i++) {
auto coverPath = model->index(i, 0).data(ComicModel::CoverPathRole).toString();
comicFlow->add(coverPath.remove("file:"), i); // TODO: find a better way to get the path, file:+the_path is the way the URL is created for QML
auto coverPath = model->index(i, 0).data(ComicModel::CoverPathRole).toUrl().toLocalFile();
comicFlow->add(coverPath, i);
}
}