[PATCH] Fix assert conditions in KOpenWithDialog
Will Stephenson
wstephenson at kde.org
Wed Jun 25 23:44:03 BST 2008
While looking for the cause of #164888 I found that it is possible to get
KOpenWithDialog to assert from 'kcmshell4 filetypes' while creating a new
service type (enter the path to an app instead of choosing an existing one) by
cancelling the kbuildsycoca run. This means that the following
KService::serviceByStorageById() call returns 0, causing the assert.
The attached patch detects this case and reverts any changes to mimeapps.list
and filetypesrc, and makes the dialog return Rejected. It's a minor fix
because Q_ASSERT is not fatal in release builds but it does tidy up the files.
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kopenwithdialog-164888.diff
Type: text/x-patch
Size: 4442 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080626/9b264056/attachment.bin>
More information about the kde-core-devel
mailing list