[bt-devel] Search Analysis

Martin Gruner mg.pub at gmx.net
Mon Dec 1 00:58:08 MST 2008


Great, thank you, Gary!

mg

am Montag, 1. Dezember 2008 um 02:01 schrieben Sie:

> Martin Gruner wrote:
>> Hi Gary,

>> thank you so much for your work! It looks good.

>> I noticed that when I'm moving the mouse over the analysis, one CPU is being 
>> used at 100%. I guess that there are too many events being fired of which all 
>> result in some calculation being done. Can you try to improve that, maybe with 
>> some QTimers which make sure that updates are only performed once in a while?

>> mg
>>   
> I looked and found it happens without the mouse being over the dialog. 
> It also happened in the Qt3 BibleTime. I found the issue in the paint() 
> function of CSearchAnalysisItem and CSearchAnalysisLegendItem. I found 
> lines like the following in each:

>     setPen( QPen(Qt::black,2) );
>     setBrush( QBrush(Qt::white) );

> Notice that these are not setting the pen or brush for the QPainter 
> object, but for the widget. So the paint event was modifying the widget 
> which causes a repaint to be scheduled. This was happening continuously 
> so that the dialog was always repainting.

> The lines were serving no useful purpose. After I deleted these lines 
> the problem was gone.

> Gary

> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel





More information about the bt-devel mailing list