Review Request 115383: Reuse code in Refactor widget. Changes in kdevplatform

Milian Wolff mail at milianw.de
Thu Jan 30 15:30:21 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115383/#review48636
-----------------------------------------------------------


besides the lock issue below - good work!


language/codegen/basicrefactoring.cpp
<https://git.reviewboard.kde.org/r/115383/#comment34350>

    considering you acquire the lock in here anyways, keep it while calling it and also add to the apidox that newNameForDeclaration should be called while holding the duchain lock.
    
    Then remove the DUChainReadLocker from the newNameForDeclaration.
    
    Also, note that otherwise this code is potentially crashy as the Declaration* might get deleted between lock.unlock() above and DUChainReadLocker lock; in newNameForDeclaration. To guard against that you'd need to use DeclarationPointer - or keep the lock alive.


- Milian Wolff


On Jan. 30, 2014, 8:42 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115383/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2014, 8:42 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> Refactore code out a little bit so that language plugins can reuse even more code if they want to reimplement startInteractiveRename function.
> 
> 
> Diffs
> -----
> 
>   language/duchain/navigation/useswidget.h f52d868 
>   language/codegen/basicrefactoring.cpp d5e8c67 
>   language/codegen/basicrefactoring.h 06606a5 
>   language/duchain/navigation/useswidget.cpp 2fd0bd9 
> 
> Diff: https://git.reviewboard.kde.org/r/115383/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140130/91ffbbbf/attachment-0001.html>


More information about the KDevelop-devel mailing list