Review Request: Replacing QPointer with QWeakPointer

Milian Wolff mail at milianw.de
Fri May 27 14:50:32 UTC 2011


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


some more changes from my side then it's ok to be committed - thanks!


util/activetooltip.cpp
<http://git.reviewboard.kde.org/r/101420/#comment2967>

    QWeakPointer has a copy ctor, i.e.:
    
    QWeakPointer<...> w = (*it).first;
    
    (no .data() required)
    
    but to make it even better, if you check the code below you could rewrite it like this:
    
    if (ActiveToolTip* w = (*it).first.data()) {
    
    }
    
    and then get rid of the .data() calls in the conditional



util/activetooltip.cpp
<http://git.reviewboard.kde.org/r/101420/#comment2968>

    similar to above:
    
    if (ActiveToolTip* w = (*it).first.data()) {
      w->move(w->pos() + offset);
    }



util/activetooltip.cpp
<http://git.reviewboard.kde.org/r/101420/#comment2969>

    unrequired .data() (see Aleix's comment)


- Milian


On May 24, 2011, 8:28 p.m., Glen Kaukola wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101420/
> -----------------------------------------------------------
> 
> (Updated May 24, 2011, 8:28 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> Replaced a number off occurrences of QPointer with QWeakPointer.
> 
> 
> This addresses bug 260586.
>     http://bugs.kde.org/show_bug.cgi?id=260586
> 
> 
> Diffs
> -----
> 
>   debugger/variable/variablecollection.h ca7546c 
>   util/activetooltip.cpp 3d14f77 
>   vcs/widgets/vcsdiffpatchsources.h ca74323 
>   vcs/widgets/vcsdiffpatchsources.cpp 7b67c97 
> 
> Diff: http://git.reviewboard.kde.org/r/101420/diff
> 
> 
> Testing
> -------
> 
> Compiled and installed kdevplatform.  Compiled kdevelop.  Ran kdevelop and verified popups still come up when hovering over variable names.  Still not sure if that's what variabletooltip.cpp is doing however.
> 
> 
> Thanks,
> 
> Glen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110527/50990643/attachment.html>


More information about the KDevelop-devel mailing list