words: strange code KWFrame dtor

C. Boemann cbo at boemann.dk
Fri Jun 17 22:13:55 BST 2011


On Friday 17 June 2011 19:42:31 Sebastian Sauer wrote:
> Dag Andersen wrote:
> > The code indicates that the last frame should delete its frameset. This
> > never happens though, as when the frame removes itself from the frameset,
> > the frames framset pointer is reset.
> 
> The detaching only happens if the frameset still knows about the frame so
> it seems...
> 
> > So the question is: is it ok to leave the frameset around?
> 
> Good question. That logic was there beforer I touched it and it indeed is a
> very hacky "design". What is "funny" is that the KWFrameLayout keeps
> pointers to the frameset and seems on deleting a frameset they are not
> detached from the KWFrameLayout what would result in dangling pointers...
> 
> If we compare that with KWDocument::removeShape which has a simlar logic
> (remove frameset if the last frame is removed) then there we detach it
> explicit from the KWFrameLayout.
> 
> The problem is that while I cleaned all that up already quit a lot the
> logic is still rather hacky and somehow unpredictable.
> 
> Sicne I am very happy with every line of that logic we can get removed I
> would go as far as to say let's commit and see if we run into new crashes
> over the time. Then we at least have a document/case which we can debug
> and try to understand why it's needed + add some lines of comments to make
> sure others don't run into it again. If it doesn't crash then we got right
> of some of the confusion the code can provide :-)
> 
> > If yes, the code should be cleaned up,
> > if no, something like the att patch should be applied.
> 
> I honestly don't know what is the reason that code is still there :-/
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
well sebastian, you are the words part guru right now so you just do as you 
wish. but let's try and not break too much at a time. I mean i'd like us to 
remain usable all the time as otherwise we keep hiding other bugs from being 
found.

so your call, but let's not break more than one area before we have like fixed 
something else.



More information about the calligra-devel mailing list