Review Request 111158: Fix KLinkItemSelectionModel handling of QItemSelectionModel::Toggle flag
Commit Hook
null at kde.org
Mon Jun 24 10:08:17 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111158/
-----------------------------------------------------------
(Updated June 24, 2013, 9:08 a.m.)
Status
------
This change has been marked as submitted.
Review request for kdelibs and Stephen Kelly.
Description
-------
Summarizing the comment block: KLISM::select(QModelIndex,...) was calling QISM::select(QModelIndex,...) but QISM::select(QModelIndex,...) calls QISM::select(QItemSelection,...) which is virtual, so it ends up calling KLISM::select(QItemSelection,...). When using the Toggle selection flag, this ends up toggling the selection twice.
This was breaking image multi-selection in Gwenview:
- open an image Gwenview
- show the thumbnail bar
- click on the [+] button to select a second image => without the patch, image 2 does not get selected
With the patch it gets selected and... Gwenview crashes as soon as you deselect image 2, but that is a bug in Gwenview. Fix for it is going to be pushed.
Diffs
-----
kdeui/itemviews/klinkitemselectionmodel.cpp 3c57c18239580497f659ef343c65be39998c2cb7
kdeui/tests/CMakeLists.txt 235e31e826ab8331f30c6e15c874bdc647d9efac
kdeui/tests/klinkitemselectionmodeltest.h PRE-CREATION
kdeui/tests/klinkitemselectionmodeltest.cpp PRE-CREATION
Diff: http://git.reviewboard.kde.org/r/111158/diff/
Testing
-------
Added a unit-test. Tested in Gwenview.
Thanks,
Aurélien Gâteau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130624/cbd42d12/attachment.htm>
More information about the kde-core-devel
mailing list