[Okular-devel] Review Request 125500: [okular] epub: Add "file" scheme for resourceUrl

Martin Tobias Holmedahl Sandsmark martin.sandsmark at kde.org
Wed Jul 13 02:34:12 UTC 2016



> On Oct. 4, 2015, 10:32 p.m., Albert Astals Cid wrote:
> > This patch does not give me an image for the first page of the linked document. Any idea what may be wrong?
> 
> Boris Egorov wrote:
>     Do you have warnings like this in terminal?
>     
>     OEBPS//@public at vhost@g at gutenberg@html at files@50080 at 50080-h@images at cover.jpg - No such file
>     
>     It can be a problem with non-canonical path in libepub. I fixed it in my fork of library and totally forgot about that testing this issue.
> 
> Albert Astals Cid wrote:
>     Yeah i have that problem. Is there a way we can workaround without forking libepub? Maybe use string and not urls?
> 
> Boris Egorov wrote:
>     Hm, looks like it is possible to omit "+ '/'" part of the line and fix this issue. I'm not sure if it works for other files though.
>     
>     As for libepub, I noticed it is not maintained for more than 2 years and decided to fix some issues. In particular, some of the problems described in https://bugs.kde.org/show_bug.cgi?id=334711. Some of the problems can't be solved in okular..
> 
> Albert Astals Cid wrote:
>     Maybe you can try contacting the mintainer of libepub and asking if he wants to hand down the project to you instead of doing a fork?
> 
> Boris Egorov wrote:
>     I'll try to do that. For now it is the same library with a few fixes. More 'local clone' than 'fork'.

is it this?: https://github.com/JIghtuse/ebook-tools


- Martin Tobias Holmedahl


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125500/#review86356
-----------------------------------------------------------


On Oct. 3, 2015, 8:27 a.m., Boris Egorov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125500/
> -----------------------------------------------------------
> 
> (Updated Oct. 3, 2015, 8:27 a.m.)
> 
> 
> Review request for Okular and Albert Astals Cid.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> Since Qt 5.0, QUrl::toLocalFile() returns empty path for URLs where the
> scheme is not "file"[1].
> 
> You can see how it fails if you open some epub with images. For example,
> http://www.gutenberg.org/ebooks/50080, "EPUB (with images)". There will
> be lots of warnings like this:
> 
> libepub (II):   OEBPS/ - No such file
> 
> And no images will be loaded. This patch fixes a problem by adding a
> scheme "file".
> 
>     1: http://doc.qt.io/qt-4.8/qurl.html#toLocalFile
> 
> 
> Diffs
> -----
> 
>   generators/epub/epubdocument.cpp 3b0ef56 
> 
> Diff: https://git.reviewboard.kde.org/r/125500/diff/
> 
> 
> Testing
> -------
> 
> Open metioned file with patch applied. There is no warnings and images loaded successfully.
> 
> 
> Thanks,
> 
> Boris Egorov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20160713/b26296f3/attachment.html>


More information about the Okular-devel mailing list