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

List:       kde-core-devel
Subject:    Re: Review Request: Avoid setting a style that is already set
From:       "Olivier Goffart" <ogoffart () kde ! org>
Date:       2010-05-30 1:10:35
Message-ID: 20100530011035.13215.35732 () localhost
[Download RAW message or body]


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

Ship it!


Looks good,  but please do not compare to NULL. Use 0, or better if (!qApp->style() \
|| ... (OR remove it completely, as Christoph said, it is unnecessary.)

- Olivier


On 2010-05-29 20:28:39, Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4178/
> -----------------------------------------------------------
> 
> (Updated 2010-05-29 20:28:39)
> 
> 
> Review request for kdelibs and Olivier Goffart.
> 
> 
> Summary
> -------
> 
> Qt is not smart enough not to avoid loading a style that is already set. This \
> avoids a unneeded creation and deletion of the current style for me. It works for \
> all styles since QStyleFactory::create does if(ret)
> ret->setObjectName(style);
> 
> 
> Diffs
> -----
> 
> trunk/KDE/kdebase/workspace/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp \
> 1132095  
> Diff: http://reviewboard.kde.org/r/4178/diff
> 
> 
> Testing
> -------
> 
> Started an app, it worked, Oxygen destructor was not called like it was before
> 
> 
> Thanks,
> 
> Albert
> 
> 


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

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