[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] KDE/kdegames/libkdegames
From:       Ian Wadham <iandw.au () gmail ! com>
Date:       2009-11-26 2:02:34
Message-ID: 200911261302.34307.iandw.au () gmail ! com
[Download RAW message or body]

On Thursday 26 November 2009 8:48:48 am Stefan Majewsky wrote:
> SVN commit 1054334 by majewsky:
> 
> QGraphicsTextItem::setDefaultTextColor does not check whether the given
> color is equal to the color that was previously set, and issues an
> update even then. Because we're calling setDefaultTextColor from the
> item's paint event, this behavior sometimes results in an infinite loop
> paintEvent -> setDefaultTextColor -> update -> paintEvent.
> 
> This commit fixes the weird problem that KGamePopupItem::showMessage
> destroys (on some systems) all running timers.
> 
Well spotted, Stefan!  Nice catch!

Just one niggle, though.

> +    if (textColor != defaultTextColor())
> +        setDefaultTextColor(textColor);
> 
According to http://techbase.kde.org/Policies/Kdelibs_Coding_Style#Braces
the above lines should have braces.

Speaking personally, I prefer to use braces around 1-line conditionals,
because if someone (including me) comes along later and wants to insert
a debug or something, they can not accidentally wreck the program logic.

All the best, Ian W.
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic