> On July 24, 2016, 2:18 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> > core/document.cpp, line 4018
> > <https://git.reviewboard.kde.org/r/128507/diff/2/?file=472240#file472240line4018>
> >
> >     instead use something like:
> >         if (url.scheme() == "http" && url.host().isEmpty() && 
> > url.fileName().endsWith(".pdf"))
> >     
> >     is a bit easier to read, and handles corner cases better (with 
> > fragments and paths etc).
> >     
> >     can probably drop the scheme() check as well?
> 
> Olivier Churlaud wrote:
>     i'm not sure the scheme works: we want to fit http:text and not 
> http://text and I think that scheme only works with XXX://

I tested it with the PDF from the bug report, and the code I suggested works 
with it. For «http://text» host() will not be empty, it should return «text». 
But you should probably also check url.isRelative() (that does not match with 
«http:text», however, because it is not a relative URL according to the 
standard).

But the current code will fail for relative URLs with #fragments, for example, 
so it should be fixed.


> On July 24, 2016, 2:18 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> > core/document.cpp, line 4025
> > <https://git.reviewboard.kde.org/r/128507/diff/2/?file=472240#file472240line4025>
> >
> >     why create a new QUrl?
> 
> Olivier Churlaud wrote:
>     It was like this in master.

No need to keep bad code from master. :-)


- Martin Tobias Holmedahl


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


On July 23, 2016, 11:24 a.m., Olivier Churlaud wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128507/
> -----------------------------------------------------------
> 
> (Updated July 23, 2016, 11:24 a.m.)
> 
> 
> Review request for Okular, Albert Astals Cid and Martin Tobias Holmedahl 
> Sandsmark.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> This brings back the opening of files with relative path.
> 
> However it was written "correct this mess", and I just did a port of what was 
> there. Do I push it anyway?
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt d999cbe 
>   core/document.cpp 2f99a8c 
> 
> Diff: https://git.reviewboard.kde.org/r/128507/diff/
> 
> 
> Testing
> -------
> 
> Compiled and Tested
> 
> 
> Thanks,
> 
> Olivier Churlaud
> 
>

_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to