diff options
author | 2021-01-24 09:13:56 +0100 | |
---|---|---|
committer | 2021-04-02 13:53:23 -0700 | |
commit | 396758d4896197be9dd9f6d71e094068203e52a6 (patch) | |
tree | 5f87c0f5dd2c7362be06d1626ffdfe8601a02481 /profile-widget/divehandler.cpp | |
parent | 1b14a211f0719aa3a46bf0584d5652bc7c7a4b6f (diff) | |
download | subsurface-396758d4896197be9dd9f6d71e094068203e52a6.tar.gz |
profile use unique_ptr to manage dive handler objects
Instead of manually deleting them (and the gases). Currently
there is only one point where these are deleted, but if
we implement proper Qt model/view semantics, this makes things
less headachy.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/divehandler.cpp')
-rw-r--r-- | profile-widget/divehandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/divehandler.cpp b/profile-widget/divehandler.cpp index 4a5088964..2f06ea661 100644 --- a/profile-widget/divehandler.cpp +++ b/profile-widget/divehandler.cpp @@ -22,7 +22,7 @@ DiveHandler::DiveHandler(const struct dive *d) : dive(d) int DiveHandler::parentIndex() { ProfileWidget2 *view = qobject_cast<ProfileWidget2 *>(scene()->views().first()); - return view->handles.indexOf(this); + return view->handleIndex(this); } void DiveHandler::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) |