Review Request: Generate accessors (getters/setters) for C++

Milian Wolff mail at milianw.de
Thu Jan 19 01:22:25 UTC 2012


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


pretty good, a few minor things then this is ready I think.

thanks!


languages/cpp/codegen/simplerefactoring.cpp
<http://git.reviewboard.kde.org/r/103613/#comment8203>

    this looks wrong :) probably you need to "git reset" after your "git stash pop"



languages/cpp/codegen/simplerefactoring.cpp
<http://git.reviewboard.kde.org/r/103613/#comment8204>

    here as well



languages/cpp/codegen/simplerefactoring.cpp
<http://git.reviewboard.kde.org/r/103613/#comment8205>

    just DUChainWriteLocker lock; please



languages/cpp/cppduchain/sourcemanipulation.h
<http://git.reviewboard.kde.org/r/103613/#comment8207>

    please const& this while you are at it



languages/cpp/cppduchain/sourcemanipulation.h
<http://git.reviewboard.kde.org/r/103613/#comment8206>

    this is probably unintended



languages/cpp/tests/projectmock.h
<http://git.reviewboard.kde.org/r/103613/#comment8208>

    we have kdevplatform/tests/testproject.cpp already - please use that (or is this not enough - if so, why?)



languages/cpp/tests/testcppgenerateaccessors.h
<http://git.reviewboard.kde.org/r/103613/#comment8209>

    does this work with compilers that don't yet support c++11?



languages/cpp/tests/testcppgenerateaccessors.h
<http://git.reviewboard.kde.org/r/103613/#comment8210>

    const& the QString



languages/cpp/tests/testcppgenerateaccessors.h
<http://git.reviewboard.kde.org/r/103613/#comment8211>

    const&



languages/cpp/tests/testcppgenerateaccessors.h
<http://git.reviewboard.kde.org/r/103613/#comment8212>

    const&



languages/cpp/tests/testcppgenerateaccessors.h
<http://git.reviewboard.kde.org/r/103613/#comment8213>

    const&


- Milian Wolff


On Jan. 19, 2012, 12:03 a.m., Jonas Jacobi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103613/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2012, 12:03 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> Generate accessors (getters/setters) for C++.
> 
> This patch adds the possibility to create accessor methods for class member variables via the gui.
> The dialog offers the following features:
> - shows all members of a selected class in a tree view (with getters/setters as children), if it was opened on a class member that one is pre-selected
> - only shows setters if applicable (non-const member)
> - accessor method definitions can be created inline or separate (in the fitting source file, if applicable)
> - configurable automatic creation of method names with manual override for each accessor method
> - access policy (visibility) setting global and individualy for each accessor method
> - configurable default setter parameter name with manual override for each setter (void setFoo(int myParamterName))
> - selectable getter return type (e.g. Type, Type&, const Type& for a member of type Type)
> - create setters as slots for QObject subclasses
> 
> The code is in a usable state and i would like to get some feedback on the dialog, especially on usability improvements.
> 
> Regards,
> Jonas
> 
> 
> Diffs
> -----
> 
>   languages/cpp/CMakeLists.txt a1fb97c 
>   languages/cpp/codegen/accessors/cppgenerateaccessors.ui PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsconfiguration.h PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsconfiguration.cpp PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsdialog.h PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsdialog.cpp PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorseditor.h PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorseditor.cpp PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsitem.h PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorsitem.cpp PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorssettings.h PRE-CREATION 
>   languages/cpp/codegen/accessors/generateaccessorssettings.cpp PRE-CREATION 
>   languages/cpp/codegen/makeimplementationprivate.cpp 9e38a87 
>   languages/cpp/codegen/simplerefactoring.h b2187c3 
>   languages/cpp/codegen/simplerefactoring.cpp fd62ccf 
>   languages/cpp/cppduchain/sourcemanipulation.h 6f8a79b 
>   languages/cpp/cppduchain/sourcemanipulation.cpp 3f40eb2 
>   languages/cpp/cppduchain/tests/test_duchain.cpp fc85587 
>   languages/cpp/cppduchain/typeutils.h a686c3b 
>   languages/cpp/cppduchain/typeutils.cpp a801d47 
>   languages/cpp/tests/CMakeLists.txt 24d9597 
>   languages/cpp/tests/projectmock.h PRE-CREATION 
>   languages/cpp/tests/projectmock.cpp PRE-CREATION 
>   languages/cpp/tests/testaccessorsettings.h PRE-CREATION 
>   languages/cpp/tests/testaccessorsettings.cpp PRE-CREATION 
>   languages/cpp/tests/testcppgenerateaccessors.h PRE-CREATION 
>   languages/cpp/tests/testcppgenerateaccessors.cpp PRE-CREATION 
>   pics/mini/private_slot.png PRE-CREATION 
>   pics/mini/protected_slot.png PRE-CREATION 
>   pics/mini/public_slot.png PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/103613/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> 
>   http://git.reviewboard.kde.org/r/103613/s/412/
> 
>   http://git.reviewboard.kde.org/r/103613/s/413/
> 
> 
> Thanks,
> 
> Jonas Jacobi
> 
>

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


More information about the KDevelop-devel mailing list