← Back to team overview

gtg-contributors team mailing list archive

refactoring the refactorisation

 

Hi guys,

I finally understood why we add so much bugs in GTk.treemodel. FT was a
translation layer and thus, the result you got depend on the time you
made the request.

You then might have an illogical answer because you ask for the number
of children of task X, you get 3, you ask for the first, the second and,
when you ask for the third, it has been removed for some reason but you
didn't receive the signal yet.

I then rewrote completely filteredtree to make it a "statefull virtual
tree". Then, you modify it and only when the modification is complete,
the state is changed and the signal is sent.

This made me realize how complex it was to handle tree operations that
way : if you delete the first node, you have in fact to remove the whole
tree and to re-add it (because path has changed for every node ).


This new FT pass all the tests currently (Luca, can you have a look ?
There are some crashes in the tests although the report says it's fine).
It's fun to rewrite code with test, you feel a lot more confident ;-)

But there are still a lot of bugs but they are way easier to catch
because I have no mercy and raise exception everywhere, crosschecking
any output.


I also hope that it's a lot more readable.

Lionel




Follow ups