Review Request 125691: KOpenWithDialog: Fix creating desktop file with empty mimetype

David Faure faure at kde.org
Tue Oct 27 08:00:08 UTC 2015


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


Ah OK. When creating a KOpenWithDialog without a mimetype argument, and then calling KOpenWithDialog::setSaveNewApplications(true), it's not because you want to remember a mimetype association, but because you want a .desktop file to be created (I suppose this is about http://lxr.kde.org/source/kde/workspace/kdeplasma-addons/applets/quicklaunch/plugin/quicklaunch_p.cpp ?).
Now I understand the use case ;)


src/widgets/kopenwithdialog.cpp (line 970)
<https://git.reviewboard.kde.org/r/125691/#comment60066>

    This else should be removed, then.
    
    There's no reason to only set m_pService when mimetype is empty. It's your use case, but why not set it consistently for all use cases, mimetype or no mimetype set?


- David Faure


On Oct. 18, 2015, 4:09 p.m., David Rosca wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125691/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2015, 4:09 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> If qMimeType is empty, addToMimeAppsList shouldn't be called.
> 
> 
> Diffs
> -----
> 
>   src/widgets/kopenwithdialog.cpp c60a193 
> 
> Diff: https://git.reviewboard.kde.org/r/125691/diff/
> 
> 
> Testing
> -------
> 
> opening new KOpenWithDialog() without mimeType and typing eg "dolphin" to exec line now correctly returns valid KService.
> 
> 
> Thanks,
> 
> David Rosca
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151027/98394ecd/attachment.html>


More information about the Kde-frameworks-devel mailing list