Review Request: KOpenWithDialog: Quote paths selected in the file dialog

Ingomar Wesp ingomar at wesp.name
Mon Jan 2 00:00:48 GMT 2012



> On Jan. 1, 2012, 11:08 p.m., Dawit Alemayehu wrote:
> > Why the need for a new slot that connects to urlChanged ? Would simply quoting the user selected text in KOpenWithDialog::slotSelected not suffice ?

AFAICS, KOpenWithDialog::slotSelected is used for setting the contents of the line edit when picking an item from the KApplicationView rather than the file dialog. Unlike the paths returned by the file dialog, these should already be properly quoted.


- Ingomar


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103602/#review9417
-----------------------------------------------------------


On Jan. 1, 2012, 9:49 p.m., Ingomar Wesp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103602/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2012, 9:49 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> KOpenWithDialog expects the input in its line edit to be shell-quoted. Currently, however, when the user picks a path via the provided file dialog, whitespace and other special characters in the path are inserted verbatim. This leads to an error when the user tries to select an executable whose path contains such characters.
> 
> This tiny patch addresses the issue by adding a private slot that runs all paths coming from the file dialog through KShell::quoteArg().
> 
> I believe this solution is better than the one I originally proposed in the linked bug report, since it avoids the ambiguity of having to guess whether whitespace belongs to the path or an argument to the executable.
> 
> 
> This addresses bug 281952.
>     http://bugs.kde.org/show_bug.cgi?id=281952
> 
> 
> Diffs
> -----
> 
>   kio/kfile/kopenwithdialog.h 86c02ab 
>   kio/kfile/kopenwithdialog.cpp b5ebbbf 
> 
> Diff: http://git.reviewboard.kde.org/r/103602/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ingomar Wesp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120102/d57d39cc/attachment.htm>


More information about the kde-core-devel mailing list