Aurelien,

Excellent.

Since then, I've spent some time trying to understand the flashing that
happens whenever presence status changes for any contact (in the contact
list).

Here's what I found (which will hopefully point in the direction of a
solution):

QTContactManager::redrawContacts is called a number of times(from the
contactChangedEvent) after a contact changes presence. By the end of this
call, the _tree object is properly populated with contacts.

After the that call, a call (through various events) to
QTreeView::paintEvent occurs on the _tree object (I've checked the pointers
match). At this point, the tree view has an object 'd' which is not
correctly updated:
    const int c = d->viewItems.count();

'c' will be 0, meaning the object should be painted blank (has no lines). So
now the contact list is painted blank. This code is part of Qt.

Now the cycle repeats: 
QTContactManager::redrawContacts
QTreeView::paintEvent
However this time 
    const int c = d->viewItems.count();

'c' is 35 (in my case, will be different in yours). Now the contact list is
correctly painted.

I did quite a bit of checking, but my assumption is that some piece of code
that updates the d->viewItems is not called in the first instance, but then
called in the second. I could not find that piece of code, and I'm pretty
sure the QTreeView '_tree' is correct in both cases, only it's internal
representation is messed up.

Good luck hunting this down!

-Lukas

-----Original Message-----
From: Aurélien Gâteau [mailto:[EMAIL PROTECTED] 
Sent: 02 March 2007 09:40
To: Lukas Oberhuber
Cc: wengophone-devel@lists.openwengo.com
Subject: Re: [Wengophone-devel] Avatar File Loading optimization

Lukas Oberhuber wrote:
> This patch optimizes the file loading of avatars. I noticed that the 
> default avatar was being loaded over and over and at a minimum this 
> reduces the number of console messages, if not speeding up the loading.

Hello Lukas.

Thanks for the patch. I reworked it so that the picture is cached in 
AvatarList (which is a bit more generic than ContactProfile) and 
modified all references to the default avatar in the code to use this 
cached picture.

You will find it in r10063.

Aurélien

_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to