Review Request 124145: Added current path to QUrl::fromUserInput for file sharing in kdeconnect-cli

Vineet Garg grg.vineet at gmail.com
Mon Jun 22 09:31:12 UTC 2015



> On June 21, 2015, 11:56 p.m., Aleix Pol Gonzalez wrote:
> > cli/kdeconnect-cli.cpp, line 108
> > <https://git.reviewboard.kde.org/r/124145/diff/1/?file=380939#file380939line108>
> >
> >     QDir::currentPath is already the default. What we probably want is QUrl::AssumeLocalFile.

QUrl::AssumeLocalFile will assume that file exists even if it does not. Which is not what we want.

In QUrl::fromUserInput(const QString & userInput), "In the case the string corresponds to a valid file path on the system, a file:// URL is constructed, using QUrl::fromLocalFile()" which only happens when absolute path is supplied as arguement.

Also in QUrl::fromUserInput(const QString & userInput, const QString & workingDirectory, UserInputResolutionOptions options = DefaultResolution), it is not mentioned that currentPath is default.


- Vineet


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


On June 21, 2015, 10:05 p.m., Vineet Garg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124145/
> -----------------------------------------------------------
> 
> (Updated June 21, 2015, 10:05 p.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Repository: kdeconnect-kde
> 
> 
> Description
> -------
> 
> kdeconnect-cli needed absolute path to share files, a relative path causes a link to be received with link content equals relative path. Now current path if also passed to QUrl::fromUserInput so that it automatically decodes relative path and if file does not exists, link is sent.
> 
> 
> Diffs
> -----
> 
>   cli/kdeconnect-cli.cpp d29b2bd 
> 
> Diff: https://git.reviewboard.kde.org/r/124145/diff/
> 
> 
> Testing
> -------
> 
> Works fine
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150622/01b18c71/attachment.html>


More information about the KDEConnect mailing list