From 1280918bfe50d89e01b8f8ccd4aa568957e07a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 27 Jan 2024 10:26:36 +0100 Subject: [PATCH] Fix missing cover after updating the comics flow --- YACReaderLibrary/classic_comics_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/classic_comics_view.cpp b/YACReaderLibrary/classic_comics_view.cpp index c6279e39..5af869a2 100644 --- a/YACReaderLibrary/classic_comics_view.cpp +++ b/YACReaderLibrary/classic_comics_view.cpp @@ -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); } }