Review Request: Fix on KShortcutEditorDelegate, when opening a new editor, and closing the already opened one. If they are in different "groups" they will crash

Michael Jansen info at michael-jansen.biz
Tue May 19 21:55:01 BST 2009


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

Ship it!


Solves the crash. One Bug is left.

Open Kate's "COnfigure Shortcuts" Dialog, collapse the kate group. open the editor for a shortcut from the Kate Part group near the bottom of the dialog, uncollapse the kate group. See an artifact.

- Michael


On 2009-05-19 09:27:40, Darío Andrés wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/717/
> -----------------------------------------------------------
> 
> (Updated 2009-05-19 09:27:40)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> When a new shortcut is going to be opened for editing, if there is already an "opened" one, it should be closed.
> 
> The following code was used for look for the currently opened shortcut item: 
> 
> index.sibling(m_editingIndex.row(), Name);
> KShortcutsEditorItem *oldItem = KShortcutsEditorPrivate::itemFromIndex(view, idx);
> 
> when "index" is the index of the new shorcut to be opened
> and "m_editingIndex" the currently opened index (which should be closed now)
> 
> However, in some cases, the new index may be part of a diffent group (in bug 181024 it has the "Kate" group and the "Find in Files" group)
> so calling "index.sibling" will return an invalid index, therefore an invalid item will be fetched leading to the crash when trying to collapse that currently opened shortcut editor.
> (( It doesn't crash in all the cases. In the Kate report one, you need to first click in the second item of the second group , and then in the Find In Files" item in the "Find in Files" group )) 
> 
> My proposal is just using m_editingIndex. (which already contains the current index of the opened item)
> I don't know if there is some drawback for not doing it this way.
> 
> Regards
> 
> 
> This addresses bug 181024.
>     https://bugs.kde.org/show_bug.cgi?id=181024
> 
> 
> Diffs
> -----
> 
>   svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/kdeui/dialogs/kshortcutseditordelegate.cpp 969788 
> 
> Diff: http://reviewboard.kde.org/r/717/diff
> 
> 
> Testing
> -------
> 
> I have tested it at it works. I could not find any regression.
> Also, this fixes a graphical bug, when opening shortcuts of different groups (one on groupA, one on groupB, one on groupA, and so on), it will leave the action name in bold
> 
> 
> Thanks,
> 
> Darío
> 
>





More information about the kde-core-devel mailing list