Review Request 111158: Fix KLinkItemSelectionModel handling of QItemSelectionModel::Toggle flag

Commit Hook null at
Mon Jun 24 10:08:17 BST 2013

This is an automatically generated e-mail. To reply, visit:

(Updated June 24, 2013, 9:08 a.m.)


This change has been marked as submitted.

Review request for kdelibs and Stephen Kelly.


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.


  kdeui/itemviews/klinkitemselectionmodel.cpp 3c57c18239580497f659ef343c65be39998c2cb7 
  kdeui/tests/CMakeLists.txt 235e31e826ab8331f30c6e15c874bdc647d9efac 
  kdeui/tests/klinkitemselectionmodeltest.h PRE-CREATION 
  kdeui/tests/klinkitemselectionmodeltest.cpp PRE-CREATION 



Added a unit-test. Tested in Gwenview.


Aurélien Gâteau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list