[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kopete/kopete/contactlist
From:       Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date:       2004-07-19 20:23:51
Message-ID: 20040719202351.C6D5A9985 () office ! kde ! org
[Download RAW message or body]

CVS commit by wstephens: 

Make it possible to do incremental search again.

Justification for importing a ton of code from Qt:

The root of the problem is that QListView uses *LVI::text(int column) const to 
perform the incremental search, but Richard's code bypasses this data 
altogether, so text() always returns an empty string.

You can fix this quite easily by adding the missing functions, but then the 
list drawing is corrupted - text is rendered twice.

The reason for this is Richard's classes rely on Q|KLVI to draw their 
backgrounds and treeview paraphernalia.  If text() returns something, they 
render that as well. 

The patch pulls all of the background drawing code into 
Kopete::UI::ListView::Item, making it fully responsible for drawing itself.

The alternative, 2 line hack that sets the LVI's text to an empty 
string before calling the parent's paintCell, and restores it before carrying 
out the LVI's own paint routine, doesn't work because setText() makes QListView \
redraw and you end up busy-waiting.


  M +18 -0     kopetegroupviewitem.cpp   1.25
  M +6 -0      kopetegroupviewitem.h   1.7
  M +79 -1     kopetelistviewitem.cpp   1.11
  M +1 -1      kopetelistviewitem.h   1.6
  M +20 -3     kopetemetacontactlvi.cpp   1.79
  M +6 -0      kopetemetacontactlvi.h   1.24


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic