diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-01-07 11:57:20 +0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-07 12:10:19 +0800 |
commit | c3fe1a9e9f79c77c533642df4f986238ef08452b (patch) | |
tree | 38236bef570eb5e955a6b8470e62a2917b706b34 /qt-ui/profilegraphics.h | |
parent | 9c617534a050ec0a0afd84ef578d7c6d0e800a59 (diff) | |
download | subsurface-c3fe1a9e9f79c77c533642df4f986238ef08452b.tar.gz |
Get rid of pointers to dive structures in the UI
The assumption that the pointer will keep pointing to a valid structure is
fundamentally flawed. And even if that is true today, it might change in
the future - just don't do it. Use the diveId instead.
The exception is when you own the structure and use it within one UI
interaction during which any way to change the dive_table is disabled
(e.g., while adding / editing a dive).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r-- | qt-ui/profilegraphics.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index 064b4478d..b8e939ff8 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -190,7 +190,7 @@ private: QBrush defaultBrush; ToolTipItem *toolTip; graphics_context gc; - struct dive *dive; + int diveId; struct divecomputer *diveDC; int zoomLevel; |