aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/treemodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-22 21:48:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-10-02 08:04:49 -0700
commit087a80194a54554ab0510a3c2ccc906a448d36ba (patch)
tree85d52ff0cda47c3c2937ef8e5b1014ad36f7ee66 /qt-models/treemodel.h
parenta353bcb2961b5c9104097ecf57eeeda4b9e37a9f (diff)
downloadsubsurface-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