Review Request: Achievements 2: LongLongPropertyWidgetItem

Laszlo Papp lpapp at kde.org
Tue Jul 12 16:54:51 CEST 2011


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



creator/plugins/docks/propertiesdock/propertywidgetitems/longlongpropertywidgetitem.cpp
<http://git.reviewboard.kde.org/r/101908/#comment4079>

    1) 
    a) QVariant::fromValue(1e100); will cause an undefined behaviour here with the overflow. This is not a performance critical part one condition check with a debug message would not hurt. I know it is unneccesary in this case since you explicitely set the range, but this slot is public now. Someone starts using it at some point for one reason and it can cause issues.
    
    b) The other way is to make this slot private, if you do not use it outside of this class and you do not need to check it. In that case: private Q_SLOTS might help for now.
    
    2) I personally like the qVariantFromValue macrousage since that provides the same functionality and also MSVC6 support (even though that is a bit old compiler).
    
    Please do not change it though, it is just more like a comment, advise for future reference :), because the other classes work this way.


- Laszlo


On July 12, 2011, 2:10 p.m., Felix Rohrbach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101908/
> -----------------------------------------------------------
> 
> (Updated July 12, 2011, 2:10 p.m.)
> 
> 
> Review request for Gluon.
> 
> 
> Summary
> -------
> 
> Add a PropertyWidgetItem to edit qlonglong values in the creator. Needed by the Achievement class.
> 
> 
> Diffs
> -----
> 
>   creator/plugins/docks/propertiesdock/CMakeLists.txt 05c5242 
>   creator/plugins/docks/propertiesdock/propertywidgetitems/longlongpropertywidgetitem.h PRE-CREATION 
>   creator/plugins/docks/propertiesdock/propertywidgetitems/longlongpropertywidgetitem.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/101908/diff
> 
> 
> Testing
> -------
> 
> Tested with the Achievement and Statistic class. When the value is out of the limit, it is set to 0.
> 
> 
> Thanks,
> 
> Felix
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/gluon/attachments/20110712/669aad5e/attachment.htm 


More information about the Gluon mailing list