Review Request: SortFilterModel: add mapRowToSource() and mapRowFromSource()

Aurélien Gâteau agateau at kde.org
Fri May 25 15:12:25 UTC 2012


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

Review request for Plasma.


Description
-------

When using a SortFilterModel, it is useful to be able to get the row of the source model. These two simple methods are the row-equivalents of the QModelIndex-oriented mapToSource() and mapFromSource() methods.


Diffs
-----

  plasma/declarativeimports/core/datamodel.h 780ea61 
  plasma/declarativeimports/core/datamodel.cpp 97d129e 

Diff: http://git.reviewboard.kde.org/r/105044/diff/


Testing
-------

- Download map-to-source.{cpp,pro,qml}
- qmake ; make
- run ./map-to-source => type in the input field, the row number of the source model matching the first visible row will be printed on stdout


Thanks,

Aurélien Gâteau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120525/0410fa79/attachment.html>


More information about the Plasma-devel mailing list