Review Request: Add Switch to buddy plugin which always swichting between cpp and header file [1/2]

Andreas Pakulat apaku at gmx.de
Tue Nov 13 16:15:00 UTC 2012


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



plugins/switchtobuddy/CMakeLists.txt
<http://git.reviewboard.kde.org/r/107310/#comment16875>

    I think this plugin is overlinking, looking at the included headers you should only need the interfaces and the language libraries. Everything else should be pulled in via interface-libs and if its not thats a bug elsewhere



plugins/switchtobuddy/switchtobuddyplugin.cpp
<http://git.reviewboard.kde.org/r/107310/#comment16876>

    I'd drop the unused argument from the slot and use the triggered-overload not providing an argument instead.



plugins/switchtobuddy/switchtobuddyplugin.cpp
<http://git.reviewboard.kde.org/r/107310/#comment16877>

    Hmm, you could use a QSignalMapper for this instead of relying on sender() yourself. Would make the whole code a bit nicer even though it would mean storing the url as a string instead of as a KUrl.


- Andreas Pakulat


On Nov. 13, 2012, 3:16 p.m., André Stein wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107310/
> -----------------------------------------------------------
> 
> (Updated Nov. 13, 2012, 3:16 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> This request adds a new plugin "Switch to buddy" which enables in the c++ language plugin a new context menu action to switch to corresponding header or implementation file. This request is split in two parts because it needs changes in kdevelop too (see Request 107311).
> 
> Changes made:
> - A new function has been added to IBuddyDocumentFinder to allow language plugins to implement logic to find buddy or related files.
> - The new plugin "switch to buddy" implements a context menu extension which is only trigged if at least one buddy can be found. To get possible buddies IBuddyDocumentFinder is used using the editor's current document's mime type.
> - See plugin
> 
> This implements a feature known from many IDEs. Using the Buddy interface and a separate plugin I think it's rather clean and generic.
> 
> 
> Diffs
> -----
> 
>   interfaces/ibuddydocumentfinder.h 7807df7 
>   plugins/CMakeLists.txt 8aac3ae 
>   plugins/switchtobuddy/CMakeLists.txt PRE-CREATION 
>   plugins/switchtobuddy/Messages.sh PRE-CREATION 
>   plugins/switchtobuddy/kdevswitchtobuddy.desktop PRE-CREATION 
>   plugins/switchtobuddy/switchtobuddyplugin.h PRE-CREATION 
>   plugins/switchtobuddy/switchtobuddyplugin.cpp PRE-CREATION 
>   shell/tests/shellbuddytest.cpp 981daa3 
> 
> Diff: http://git.reviewboard.kde.org/r/107310/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> 
> Screenshots
> -----------
> 
> Context menu in action
>   http://git.reviewboard.kde.org/r/107310/s/829/
> 
> 
> Thanks,
> 
> André Stein
> 
>

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


More information about the KDevelop-devel mailing list