[Kde-games-devel] bug ? in libkdegames

Anarky anarky at ifrance.com
Tue May 15 21:51:13 CEST 2007


Hi,

I think I've spotted a bug in libkdegames.
In KGameCanvasGroup::paint(QPainter*) (libkdegames/kgamecanvas.cpp:588)
I would remove the assertion Q_ASSERT(!"This function should never be 
called"); 

In fact, this function is called, at least in kbattleship ...

The call trace is as follow :
 - The KGameCanvasGroup's parent is painted, it calls paintInternal on the 
KGameCanvasGroup
 - since KGameCanvasGroup doesn't reimplement this method, the default 
KGameCanvasItem's version is called
 - This method, then calls paint on itself 
(libkdegames/kgamecanvas.cpp:288) ...
 - this method is overwritten ... it's the one that calls the assertion.

This trace seems ok to me, the paint method should just do nothing instead of 
asserting ...

Regards,

Julien


More information about the kde-games-devel mailing list