Review Request 119165: store the containment as a qpointer
David Edmundson
david at davidedmundson.co.uk
Tue Jul 8 08:53:38 UTC 2014
> On July 7, 2014, 10:37 p.m., David Edmundson wrote:
> > src/scriptengines/qml/plasmoid/containmentinterface.cpp, line 99
> > <https://git.reviewboard.kde.org/r/119165/diff/1/?file=288560#file288560line99>
> >
> > If the containment is removed before the containmentInterface (the cause of this crash) why do we need this slot at all?
>
> Marco Martin wrote:
> The qml part, if still alive a that point (thing that sometimes is tru, sometime isn't) will still react ro appletremoved, (and you don't know how the qml part will react, since it's completely up to it)
> so disconnecting, just prevents any of that from happening
Personally I'd just put the guard if(QCoreApplication::closingDown) around the emit in ContainmentPrivate::appletDeleted rather than having a slot to disconnect things, especially if that now needs lots of guarding.
I'll give you a ship it here, you can choose which you prefer.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119165/#review61861
-----------------------------------------------------------
On July 8, 2014, 8:36 a.m., Marco Martin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119165/
> -----------------------------------------------------------
>
> (Updated July 8, 2014, 8:36 a.m.)
>
>
> Review request for KDE Frameworks, Plasma and Aleix Pol Gonzalez.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> This solves the crash
> http://pastebin.com/tMYdgpUT
>
> the problem is that sometimes when QCoreApplication::aboutToQuit the containment is already deleted (the order is not really deterministic), therefore appletScript::applet() will hit an assert.
> using a qpointer should solve it, its data being already 0ed in the cases the containment is already deleted at :aboutToquit time.
>
>
> Diffs
> -----
>
> src/scriptengines/qml/plasmoid/containmentinterface.h 3ecdddf
> src/scriptengines/qml/plasmoid/containmentinterface.cpp f1762fe
>
> Diff: https://git.reviewboard.kde.org/r/119165/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Marco Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140708/fd1db541/attachment.html>
More information about the Kde-frameworks-devel
mailing list