[Kst] 92610 - new view philosophy
George Staikos
staikos at kde.org
Thu Nov 4 15:07:31 CET 2004
On Thursday 04 November 2004 05:42, George Staikos wrote:
> On Thursday 04 November 2004 05:06, George Staikos wrote:
> > On Wednesday 03 November 2004 22:09, Andrew Walker wrote:
> > > This one is even better as it also works for nested plot groups.
> >
> > Why is it better? You need to explain this in order to review it
> > properly...
> >
> > Furthermore, deleting the child objects in deleteObject() is wrong.
> > It promotes the _parent problem that I'm constantly trying to remove.
> > (It assumes that there is exactly one parent of each child.)
>
> This whole thing is messy and needs a rethink and reworking. Most
> importantly these two methods (removeChild() and deleteObject() need to be
> clearly defined). I'll try to come up with something over the next few
> hours.
The parent pointer has become quite a pain, and is the root of all these
problems. This patch changes the parent pointer to a raw pointer instead of
a shared/smart pointer. This is somewhat dangerous in general, but I think
it's relatively safe since all parents must have a parent anyway, which will
have a smart child pointer. I tested it quite thoroughly here and haven't
seen any problems. Users are having issues with crashes with the current
code in CVS, so this patch is quite urgent. I think this is the right design
to solve the [real] problem.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kstviewobjects.patch
Type: text/x-diff
Size: 4001 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20041104/a9a8db97/kstviewobjects.bin
More information about the Kst
mailing list