[PATCH] Remove useless members of DiveItem

Linus Torvalds torvalds at linux-foundation.org
Thu Apr 25 08:29:05 PDT 2013


On Thu, Apr 25, 2013 at 8:25 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> So the reason we did it like we did in the gtk version was that all
> the cell renderer and treeview stuff is %$#! confusing, and I started
> out without specialty renderers. I'm not sure it's the only way to do
> it, though.

Btw, when it comes to the Qt interface, I'm not at all sure that it's
a great idea to embed the dive pointer into the qt data structures.
When we delete dives, how do we guarantee that the qt data structures
are all gone and forgotten before we've free'd the dive data
structure.

So I wonder if the qt data structures shouldn't contain the index to
the dive table, and then the accessor functions would look up the dive
from that. That way we wouldn't have (potentially stale) pointers in
the Qt data structures.

           Linus


More information about the subsurface mailing list