castano / qshaderedit

Automatically exported from code.google.com/p/qshaderedit
GNU General Public License v2.0
9 stars 3 forks source link

Patch (lol) to the 100% cpu hogging bug, present in the svn 210. #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile qshaderedit with profiling info and you'll see that 
TitleBar::paintEvent and TitleBar::draw_close_btn are hogging the cpu.
If you read "void QWidget::paintEvent ( QPaintEvent * event )   [virtual 
protected]": 
http://doc.trolltech.com/4.6/qwidget.html
"Note: Generally, you should refrain from calling update() or repaint() 
inside a paintEvent(). For example, calling update() or repaint() on 
children inside a paintevent() results in undefined behavior; the child may 
or may not get a paint event."

What is the expected output? What do you see instead?
No 100% cpu hogging. 100% cpu hogging.

What version of the product are you using? On what operating system?
svn 210. sabayon GNU/Linux Qt 4.6.2

Please provide any additional information below.
While debugging this I also noticed that [at least] in minimumSizeHint: 
centerPm/rightPm.width() are returning trash. It didn't have influence in 
this matter so I'm leaving it alone for now.

Cheers

PS: I didn't want my previous submission to be a defect but a Enhancement, 
but I could not see how to do this.

Original issue reported on code.google.com by paulo.fe...@gmail.com on 6 Apr 2010 at 5:07

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. Turns out that this was a third party contribution. 
I've reverted his changes, since they made the app practically unusable.

Original comment by cast...@gmail.com on 18 Jun 2010 at 8:01