diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-09-22 21:48:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-02 08:04:49 -0700 |
commit | 087a80194a54554ab0510a3c2ccc906a448d36ba (patch) | |
tree | 85d52ff0cda47c3c2937ef8e5b1014ad36f7ee66 /qt-models/treemodel.h | |
parent | a353bcb2961b5c9104097ecf57eeeda4b9e37a9f (diff) | |
download | subsurface-087a80194a54554ab0510a3c2ccc906a448d36ba.tar.gz |
Import: keep dive and dive site tables in DiveImportedModel
The DiveImportedModel and DownloadThread used the same table
of dives and dive sites. This made it very hard to keep the
model consistent: Every modification of the download thread
would make the model inconsistent and could lead to memory
corruption owing to dangling pointers.
Therefore, keep a copy in the model. When updating the model,
use move-semantics, i.e. move the data and reset the tables
of the thread to zero elements.
Since the DiveImportedModel and the DownloadThread are very
tightly integrated, remove the accessor-functions of the
dive and dive-site tables. They fulfilled no purpose
whatsoever as they gave the same access-rights as a public
field.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/treemodel.h')
0 files changed, 0 insertions, 0 deletions