Review Request: Convert QPointer in QWeakPointer (Bug 260586)

Milian Wolff mail at milianw.de
Wed Dec 29 15:53:06 UTC 2010


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


a few small changes then I'm fine with this. Thanks already. Care to give kdevplatform a shot at this next?

Btw: I'll merge this only into master (i.e. what will become 4.3) to give it some testing.


debuggers/gdb/debugsession.cpp
<http://git.reviewboard.kde.org/r/100252/#comment477>

    rewrite this as:
    
    GDB* gdb = new GDB(this);
    m_gdb = gdb;
    
    and then use gdb in the connect statements below, I find that nicer than going to .data() route repeatedly



debuggers/gdb/debugsession.cpp
<http://git.reviewboard.kde.org/r/100252/#comment476>

    please change it here as well



debuggers/gdb/gdbvariable.cpp
<http://git.reviewboard.kde.org/r/100252/#comment478>

    variable = m_variable.data();
    
    then use it below to make it nicer (imo)



languages/cpp/codegen/unresolvedincludeassistant.cpp
<http://git.reviewboard.kde.org/r/100252/#comment479>

    that should be rewritten to not use a QPointer/QWeakPointer at all
    
    Instead the dialog should be created on stack:
    
    KDialog dialog(....);
    ...
    dialog.exec();
    // no delete
    }


- Milian


On 2010-12-28 12:22:17, Nathanaël Restori wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100252/
> -----------------------------------------------------------
> 
> (Updated 2010-12-28 12:22:17)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> The patch convert every QPointer in QWeakPointer
> In the bug report, Millan Wolff says : "it shows that in GDB the pointer was used quite a lot without being checked,
> you should do that at the start of each function, or at least Q_ASSERT on it." but for hardly every function, there is a "Q_ASSERT(thePointer)", a "if (thePointer)" or a "if (!thePointer)"
> 
> 
> This addresses bug 260586.
>     http://bugs.kde.org/show_bug.cgi?id=260586
> 
> 
> Diffs
> -----
> 
>   debuggers/gdb/debuggerplugin.h 9144d25 
>   debuggers/gdb/debugsession.h 4abbc11 
>   debuggers/gdb/debugsession.cpp b050db2 
>   debuggers/gdb/gdbcommand.h 63c4c34 
>   debuggers/gdb/gdbcommand.cpp c46f0ec 
>   debuggers/gdb/gdbvariable.cpp 8e47f6e 
>   debuggers/gdb/unittests/gdbtest.cpp 41980e9 
>   languages/cpp/codecompletion/model.h 84c1e1e 
>   languages/cpp/codegen/codeassistant.h a5cbeb8 
>   languages/cpp/codegen/codeassistant.cpp c9a3673 
>   languages/cpp/codegen/unresolvedincludeassistant.cpp 9c5872b 
> 
> Diff: http://git.reviewboard.kde.org/r/100252/diff
> 
> 
> Testing
> -------
> 
> Only try to compile.
> 
> 
> Thanks,
> 
> Nathanaël
> 
>

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


More information about the KDevelop-devel mailing list