diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-04-06 17:58:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-09 07:50:21 -0700 |
commit | f1830cd44e75ac552e09dfd79f6ec9e0d90f8808 (patch) | |
tree | 54798135ab086854b6837902260e4df1eed2715a /tests | |
parent | f633cb81ae095ea128a406e69b5eecab23be92a9 (diff) | |
download | subsurface-f1830cd44e75ac552e09dfd79f6ec9e0d90f8808.tar.gz |
Profile: On dataChanged() only update pictures that actually changed
Only update those pictures of the DivePictureModel that actually changed.
This will be useful once pictures are loaded incrementally.
To do so, replace the pictures array by an array with stable ids. Before
this commit, not-shown pictures are left out of the pictures array, which
makes the mapping from DivePictureModel-ids to the picture array index
non-trivial.
Replace the QList<DivePictureItem *> by a std::vector<std::unique_ptr<DivePictureItem>>
to ease memory management. Sadly, owing to COW semantics, QVector is incompatible
with QScopedPointer.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions