Review Request 111272: Correctly handle executable names typed into KOpenWithDialog

Dawit Alemayehu adawit at kde.org
Tue Jul 2 02:29:19 BST 2013



> On July 1, 2013, 6:17 p.m., David Faure wrote:
> > This will create further trouble, I would say.
> > 
> > What if an application installs several .desktop files, like:
> >   kmail --attach %U
> >   kmail --view %U
> >   kmail --check
> >   kmail --erase-my-harddisk
> > 
> > By typing "kmail" in the open-with dialog, you would now randomly pick any of these? That doesn't sound like it will do what one would expect.
> > Either we can "kmail %U" (directly or via a .desktop file), or we can't, but we certainly shouldn't take any existing .desktop file with any sort of stuff in the Exec line.
> >

That is indeed a problem. I did not think about that when I wrote the fix. The reason for this bug is actually simple. The service that currently gets created, when the typed in executable does not match the one from the service "Exec=" line, does not have the necessary property for KIO to be able to tell it is a KDE application. More specifically "Categories=" is not set. Hence, KIO thinks it is opening the file with a non KDE application. Anyhow, I will see if I can fix this as correctly as I can. I will probably need to add a new ctor to KService though.


- Dawit


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


On June 27, 2013, 1:05 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111272/
> -----------------------------------------------------------
> 
> (Updated June 27, 2013, 1:05 p.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Description
> -------
> 
> The attached patch addresses a bug where a user enters the name of a KDE application in OpenWith dialog to open a remote file and the file is opened as if the user requested to open it with a non KDE application. That is a local copy of the file is created first. Currently this problem can be reproduced with kate because the "Exec=" line in its desktop file contains an additional option, "-b".
> 
> Note that this patch only addresses the specific condition where the user only typed in the KDE executable name. Other scenarios, like the user typing in not only the name of the KDE app but also additional command line options, will still produce this same issue.
> 
> 
> This addresses bug 222519.
>     http://bugs.kde.org/show_bug.cgi?id=222519
> 
> 
> Diffs
> -----
> 
>   kio/kfile/kopenwithdialog.cpp 84465cd 
> 
> Diff: http://git.reviewboard.kde.org/r/111272/diff/
> 
> 
> Testing
> -------
> 
> Try to open a remote text or source file by typing "kate" in the open with dialog.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

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


More information about the kde-core-devel mailing list