Review Request 118017: Fix expansion of ~

Alexander Richardson arichardson.kde at googlemail.com
Tue May 6 13:11:06 UTC 2014



> On May 6, 2014, 2:51 p.m., David Faure wrote:
> > kurifilter-plugins/shorturi/kshorturifilter.cpp, line 374
> > <https://git.reviewboard.kde.org/r/118017/diff/1/?file=271779#file271779line374>
> >
> >     Better use QUrl u = QUrl::fromLocalFile(path) then.
> 
> Alexander Richardson wrote:
>     Doesn't pass before
> 
> Alexander Richardson wrote:
>     isMalformed is found by calling !uri().isValid(), which is !QUrl::fromUserInput("~").isValid().
>     
>     Without removing the isMalformed check, it will never attempt to determine whether the file exists and therefore exists will always be false and the result is an empty URL then.

This is the test I am using in KIO: http://paste.kde.org/ptyzmefz6


- Alexander


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


On May 6, 2014, 2:42 p.m., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118017/
> -----------------------------------------------------------
> 
> (Updated May 6, 2014, 2:42 p.m.)
> 
> 
> Review request for Plasma and David Faure.
> 
> 
> Repository: kio-extras
> 
> 
> Description
> -------
> 
> With QUrl we have to set the scheme manually, seems like KUrl defaulted to
> file://.
> 
> Also removed the !isMalformed in the codition, QUrl("~") is malformed,
> whereas KUrl("~") was not
> 
> 
> Diffs
> -----
> 
>   kurifilter-plugins/shorturi/kshorturifilter.cpp 58f3435f7599acf692a082d216a0c58684bcf8b6 
> 
> Diff: https://git.reviewboard.kde.org/r/118017/diff/
> 
> 
> Testing
> -------
> 
> Added unit test in KIO, works now
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140506/b5a6a3d9/attachment.html>


More information about the Plasma-devel mailing list