Review Request 123562: Add outlineview plugin

Alex Richardson arichardson.kde at gmail.com
Wed Apr 29 19:30:53 UTC 2015



> On April 29, 2015, 2:36 p.m., Milian Wolff wrote:
> > plugins/outlineview/outlinenode.h, line 33
> > <https://git.reviewboard.kde.org/r/123562/diff/1/?file=364552#file364552line33>
> >
> >     why disable copying? why not make this a simple struct and Q_DECLARE_TYPEINFO(OutlineNode, Q_MOVABLE_TYPE) as well as storing the stuff directly in a QVector? instead of storing pointers to objects in a vector?

Very good idea, I don't think I knew about that stuff when I initially wrote the code. I've now made it use std::vector and added a move constructor since we don't need implicit sharing here.


> On April 29, 2015, 2:36 p.m., Milian Wolff wrote:
> > plugins/outlineview/outlinemodel.cpp, line 62
> > <https://git.reviewboard.kde.org/r/123562/diff/1/?file=364551#file364551line62>
> >
> >     just asking: did you test this new model with a ModelTest hooked to it? i.e. add a
> >     
> >         #include <tests/modeltest.h>
> >         ...
> >         OutlineModel::OutlineModel(...)
> >         {
> >             new ModelTest(this);
> >         }
> >     
> >     if this does not lead to assertions, then you implement the model correctly.

Works (even after storing the nodes by value).


- Alex


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


On April 29, 2015, 8:30 p.m., Alex Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123562/
> -----------------------------------------------------------
> 
> (Updated April 29, 2015, 8:30 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This plugin provides an outline view for the current document. It is
> very similar to the outline view from eclipse and should also work for
> any language.
> 
> I initially wrote this plugin in 2010 and then forgot about it. I've now
> ported it to KF5 and it seems to work without any major issues. The only
> major thing that is missing is that it updates once the document has been
> reparsed and not whenever it is saved.
> 
> 
> Diffs
> -----
> 
>   plugins/CMakeLists.txt 2c004f22976f513eab607762b4e04fc1b5b048fa 
>   plugins/outlineview/CMakeLists.txt PRE-CREATION 
>   plugins/outlineview/debug_outline.h PRE-CREATION 
>   plugins/outlineview/kdevoutlineview.json PRE-CREATION 
>   plugins/outlineview/outlinemodel.h PRE-CREATION 
>   plugins/outlineview/outlinemodel.cpp PRE-CREATION 
>   plugins/outlineview/outlinenode.h PRE-CREATION 
>   plugins/outlineview/outlinenode.cpp PRE-CREATION 
>   plugins/outlineview/outlineproxymodel.h PRE-CREATION 
>   plugins/outlineview/outlineproxymodel.cpp PRE-CREATION 
>   plugins/outlineview/outlineviewplugin.h PRE-CREATION 
>   plugins/outlineview/outlineviewplugin.cpp PRE-CREATION 
>   plugins/outlineview/outlinewidget.h PRE-CREATION 
>   plugins/outlineview/outlinewidget.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/123562/diff/
> 
> 
> Testing
> -------
> 
> works without crashes sofar.
> 
> Is sometimes empty initially, switching to other document and back fixes that
> 
> 
> File Attachments
> ----------------
> 
> outline1.png
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/04/29/08b90a88-1cbf-4f98-94e8-d7ea1ad02586__outline1.png
> outline2.png
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/04/29/d8ee18c4-495a-44db-a346-803389462c42__outline2.png
> 
> 
> Thanks,
> 
> Alex Richardson
> 
>

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


More information about the KDevelop-devel mailing list