Bug 278473

Summary: PersonSetModel::rowCount countinues to load contacts over and over again
Product: [Frameworks and Libraries] telepathy Reporter: Francesco Nwokeka <francesco.nwokeka>
Component: libktelepathyAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: grundleborg, kde
Priority: NOR    
Version: git-latest   
Target Milestone: 0.4.0   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Francesco Nwokeka 2011-07-25 13:43:06 UTC
Version:           git-latest (using Devel) 
OS:                Linux

PersonSetModel::rowCount is continuously called and continues to load all contacts

Reproducible: Always

Steps to Reproduce:
add debug line in the function and use the test tool grundelborg made here : kde:scratch/gberg/telepathy-kde-models-test-ui



Expected Results:  
The method should not be called once finished loading all contacts
Comment 1 David Edmundson 2011-07-25 13:45:10 UTC
Why do you think that?

rowcount gets called all the time by the ListView every time you resize and such so it knows how big to draw scollbars and such.
Comment 2 George Goldberg 2011-07-25 13:52:04 UTC
As David Said.

the view can call rowCount() whenever it wants. It does this regularly when redrawing (ie. the contents of the view change, you mouseover the view, you scroll the view etc). It's out of the model's control anyway - just a fact of how Qt itemviews work.