[PATCH] KEditListBox::setCustomEditor

David Faure faure at kde.org
Fri Jan 18 12:14:07 GMT 2008


On Friday 18 January 2008, Sebastian TrĂ¼g wrote:
> Please find attached the overhauled patch.
> 
> I did some more cleaning up:
> 
>  * moved the setEditor method to the Private class
>  * moved the init method into the Private class

OK.

>  * Removed the "m_" prefixes from all private members. This is just
>    confusing

Hmm, I'm not sure this is a good change; the prefix helps differenciating
member vars from local vars when reading the code of the methods of
the private class.

> But I also changed the behavior a bit and hope this gets your OK since I think 
> my changes finally make KEditListBox really usable.
> Basically what I did was to replace the handling of the current item with the 
> selected item. The result is:
> 
>  * The user can see their selection now (like they are used to anyway).  The 
>    current item is not always visible in all styles and if you have to know 
>    what to look for.
>  * Action buttons are enabled and disabled based on the selection instead of
>    the current item.
>  * After adding an item (or changing it via return) the selection is cleared
>    which allows to add a new item (in the old version after selecting an item
>    it is impossible to ever add a new one again since there is no way for the
>    user to change the current item)
>  * The same is true for removing an item. The selection is cleared and the 
>    user can add new items or change others.

Sounds good.

>  * Whenever the selection changes the lineedit gets the focus. This is very
>    convenient as it saves one click and there is no real use for the keyboard
>    focus in the listview.

Are you sure? What about users without a mouse? Can they still use Key_Up/Key_Down
in the listview?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list