Review Request: Close the outline menu in case the parent moves

Kevin Funk krf at gmx.de
Mon Dec 24 01:02:29 UTC 2012



> On Dec. 23, 2012, 4:54 p.m., Milian Wolff wrote:
> > plugins/quickopen/quickopenplugin.cpp, line 90
> > <http://git.reviewboard.kde.org/r/107882/diff/1/?file=100850#file100850line90>
> >
> >     Could you please rewrite this as a loop?
> >     
> >     while (widget) {
> >       if (ancestor == widget->parentWidget()) {
> >         return true;
> >       }
> >       widget = widget->parentWidget();
> >     }
> >     return false;
> 
> Milian Wolff wrote:
>     and you could make the signature like this:
>     
>     static bool isParentWidgetOf(const QWidget* widget, const QWidget* const ancestor)
>

Used QWidget::isAncestorOf instead (which also uses a loop internally). I actually didn't know it existed before.


- Kevin


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


On Dec. 23, 2012, 3:25 p.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107882/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2012, 3:25 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> Close the outline menu in case the parent moves
> 
> Also works in case the outline toolbar is detached.
> 
> BUG: 260657
> 
> 
> Diffs
> -----
> 
>   plugins/quickopen/quickopenplugin.cpp edc743fa95a7a7edbb59d2076c76f470e12fa95a 
> 
> Diff: http://git.reviewboard.kde.org/r/107882/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Funk
> 
>

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


More information about the KDevelop-devel mailing list