[Bug 31195] Implement models

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 12 00:52:54 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=31195

--- Comment #14 from David Edmundson <kde at davidedmundson.co.uk> 2011-03-11 15:52:51 PST ---
Expanding on Martin's comments

2) The bug in number 2 is a bug in the model, currently if someone deletes a
row (any row, account or contact) and then looks at the model again before
hitting the event loop the model size and data were out of sync and it could
crash.

The cause of this is that we call startRemoveRows() - then remove() on the
TreeItem, then endRemoveRows().

The method remove() in TreeItem, doesn't update the parents list of row
information. Instead it calls deleteLater(). The code to remove the row from
the parent happens in the destructor. So there is a short time when it's all
out of sync

This became prominent and caused crashes because of the earlier change Martin
made at 1, however it could happen at other points.

There is also another quite important fix.
4) In the model in Tp-yell when you start the model but are already online no
contacts are shown. Contacts are only listed when the connection status
changed.
To resolve this, addKnownContacts() is called in the constructor of the account
item.

I had to use a single shot timer to do this as without it it starts emitting
signals (new contact) before the parent code can connect to it.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list