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

David Faure faure at kde.org
Thu Oct 29 08:01:10 UTC 2015



> On Oct. 27, 2015, 8 a.m., David Faure wrote:
> > src/widgets/kopenwithdialog.cpp, line 970
> > <https://git.reviewboard.kde.org/r/125691/diff/1/?file=411558#file411558line970>
> >
> >     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 Rosca wrote:
>     Yes, it's for quicklaunch.
>     
>     Because m_pService is created in addToMimeAppsList(menuId). Indeed it looks weird, so maybe just if !m_pService (but in that case the assert in addToMimeAppsList already failed when mimeType is set).

Oh I see. Unintuitive, but necessary because of the sycoca rebuild in that method. Well, OK then.


- David


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


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/20151029/e05d609f/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list