how to backport without breaking ABI?
Milian Wolff
mail at milianw.de
Tue Feb 15 09:44:49 UTC 2011
David Nolden, 13.02.2011:
> You will have to find another solution for this problem anyway.
> Normally, when a new navigation context is opened, it is registered at
> the parent context using AbstractNavigationContext::registerChild(),
> where the child is referenced permanently using a KSharedPtr.
>
> By making the m_previousContext a KSharedPtr too, you create a cyclic
> dependency, and thus, all navigation contexts will be leaked!
True, thanks for the notification. I'll try to find out how to do this
properly. What I spotted even now though:
when hovering a macro (or something that calls
ILanguageSupport::specialLanguageWidget), we currently leak if the context
browser tool view is hidden:
In Cpp the specialLanguageWidget just returns:
return new Cpp::NavigationWidget(*m.second, preprocessedBody);
But ContextBrowserView::setSpecialNavigationWidget(QWidget* widget) only does
something with the widget if it's neither locked nor visible. In all other
cases the widget is "lost". I'd propose to delete the incoming widget
otherwise? Or at least deleteLater()?
Seems to work fine for me.
> Normally, everything that would need to be done, is keeping a pointer
> to the original navigation context alive as long as the navigation
> widget is open. I don't exactly remember how/where this was supposed
> to take place though.
Maybe it was supposed to work with m_startContext in AbstractNavigationWidget?
Bye
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110215/729622a2/attachment.sig>
More information about the KDevelop-devel
mailing list