ProjectModel broken since 91da12250193e51197c982d57984228e29b27870

Milian Wolff mail at milianw.de
Thu Oct 11 13:47:19 UTC 2012


Hey David / All.

I just stumbled upon rev 91da12250 and notice that it is severly abusing the 
Qt model/view system. Just running the unit tests shows this (asserts in 
ModelTest).

Generally, this commit renders the ProjectModel unusable when used without the 
ProjectProxyModel. While the functionality is certainly cool, I must say that 
it is very unfortunate that I didn't review this sooner... The test was 
failing for quite some time now...

Anyhow, what must be done (question is, whether it *can* be done properly):

- revert all related changes in projectmodel.cpp
- move functionality completely over to the ProjectProxyModel, probably 
requires overloads of rowCount, mapFromSource, mapToSource as well as proper 
signal emission whenever the filter changes and the "show/hide X filtered 
items..." row gets added/removed from a folder.

This should be fixed. I think we could ask for help from e.g. Stephen Kelly if 
we want to know how this should be implemented properly.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121011/78b500c5/attachment.sig>


More information about the KDevelop-devel mailing list