Fixing KPageView selection bug

Rafael Fernández López ereslibre at kde.org
Tue Jun 10 17:48:43 BST 2008


Hi all,

I created some time ago a new task on TT's task tracker:
http://trolltech.com/developer/task-tracker/index_html?id=202842&method=entry

On our config dialogs, which uses KPageView for showing the left icon view, 
this was specially annoying, at least for me. You were reading a config 
dialog, while if you clicked on the blank part of the viewport on the left, 
that item became unselected, while the config dialog still was the same.

I told them the behavior of QAbstractItemView::SingleSelection wasn't 
following their docs. On 4.4.0 docs it is said 
(http://doc.trolltech.com/4.4/qabstractitemview.html#SelectionMode-enum):
"When the user selects an item, any already-selected item becomes unselected, 
and the user cannot unselect the selected item.".

So, they told me that they fixed THE DOCS (http://doc.trolltech.com/4.4-
snapshot/qabstractitemview.html#SelectionMode-enum) becoming:
"When the user selects an item, any already-selected item becomes unselected, 
and the user cannot unselect the selected item BY CLICKING ON IT."

So, now that I know that this won't be fixed automagically, I wrote a patch 
for our KPageView which won't allow the current selection become cleared.

Is the attached patch OK to commit ?


Regards,
Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-kdeui.diff
Type: text/x-patch
Size: 2365 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080610/a523b76e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080610/a523b76e/attachment.sig>


More information about the kde-core-devel mailing list