[PATCH] Remove useless members of DiveItem
Thiago Macieira
thiago at macieira.org
Thu Apr 25 08:46:20 PDT 2013
On quinta-feira, 25 de abril de 2013 08.33.01, Dirk Hohndel wrote:
> > 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.
I don't think that's necessary.
> I thought about this last night. The only time we ever free a dive is if
> we delete it. So all we need to make sure is that we remove it from the
> model BEFORE we free the memory. That doesn't seem like a tough
> constraint to implement.
Right. The model needs to be told anyway because the model will need to tell
the view (the UI) that something changed. If the dives could change without
notifying the UI, it could keep on happily displaying old data and then lead
to weird conditions later on.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130425/3a4bec34/attachment.sig>
More information about the subsurface
mailing list