diff --git a/YACReaderLibrary/db/comic_model.cpp b/YACReaderLibrary/db/comic_model.cpp index cc195970..7c820cfb 100644 --- a/YACReaderLibrary/db/comic_model.cpp +++ b/YACReaderLibrary/db/comic_model.cpp @@ -1208,9 +1208,10 @@ void ComicModel::notifyCoverChange(const ComicDB &comic) // this doesn't work in QML -> emit dataChanged(index(itemIndex, 0), index(itemIndex, 0), QVector() << CoverPathRole); } +// ???? QUrl ComicModel::getCoverUrlPathForComicHash(const QString &hash) const { - return QUrl("file:" + _databasePath + "/covers/" + hash + ".jpg"); + return QUrl::fromLocalFile(_databasePath + "/covers/" + hash + ".jpg"); } void ComicModel::addComicsToFavorites(const QList &comicIds) diff --git a/YACReaderLibrary/db/folder_model.cpp b/YACReaderLibrary/db/folder_model.cpp index 801b9899..ba7fdcce 100644 --- a/YACReaderLibrary/db/folder_model.cpp +++ b/YACReaderLibrary/db/folder_model.cpp @@ -784,7 +784,7 @@ QModelIndex FolderModel::addFolderAtParent(const QString &folderName, const QMod QUrl FolderModel::getCoverUrlPathForComicHash(const QString &hash) const { - return QUrl("file:" + _databasePath + "/covers/" + hash + ".jpg"); + return QUrl::fromLocalFile(_databasePath + "/covers/" + hash + ".jpg"); } void FolderModel::setShowRecent(bool showRecent)