[Kde-games-devel] Review Request: Port KLines to KGameRenderer

Stefan Majewsky majewsky at gmx.net
Sat Sep 25 14:39:44 CEST 2010



> On 2010-09-21 14:42:32, Parker Coates wrote:
> > /trunk/KDE/kdegames/klines/renderer.h, lines 41-50
> > <http://svn.reviewboard.kde.org/r/5399/diff/1/?file=36713#file36713line41>
> >
> >     Why not make KLinesRenderer inherit from KGameRenderer? This is the approach used by most of the other games. It would remove the need for the renderer() method.
> 
> Lindsay Mathieson wrote:
>     Because I'm not keen on static initialisers - no guarantee on the order their going to be called ect. For example KGameRenderer requires the name of a default theme, there's no guarantee that Prefs will be initialised before the KLinesRenderer is constructed.

"there's no guarantee that Prefs will be initialised before the KLinesRenderer is constructed."

That's not correct. The Prefs singleton is created with K_GLOBAL_STATIC, which means that it is created on first use (i.e. on first call to Prefs::instance()).


- Stefan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5399/#review7705
-----------------------------------------------------------


On 2010-09-25 12:16:31, Lindsay Mathieson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5399/
> -----------------------------------------------------------
> 
> (Updated 2010-09-25 12:16:31)
> 
> 
> Review request for KDE Games.
> 
> 
> Summary
> -------
> 
> Updates klines to use KGameRenderer and KGameRenderedItem in place of QSvgRenderer and QGraphicsPixmapItem
> Removes KPixmapCache usage
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdegames/klines/animator.cpp 1177731 
>   /trunk/KDE/kdegames/klines/ballitem.h 1177731 
>   /trunk/KDE/kdegames/klines/ballitem.cpp 1177731 
>   /trunk/KDE/kdegames/klines/klines.cpp 1177731 
>   /trunk/KDE/kdegames/klines/previewitem.cpp 1177731 
>   /trunk/KDE/kdegames/klines/renderer.h 1177731 
>   /trunk/KDE/kdegames/klines/renderer.cpp 1177731 
>   /trunk/KDE/kdegames/klines/scene.cpp 1177731 
> 
> Diff: http://svn.reviewboard.kde.org/r/5399/diff
> 
> 
> Testing
> -------
> 
> Playing game
> Changing themes
> Resizing game
> Comparison with original
> 
> 
> Thanks,
> 
> Lindsay
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100925/1fe00cd1/attachment.htm 


More information about the kde-games-devel mailing list