aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-24 16:34:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-29 00:09:31 +0000
commitab29f6416b619c141de979b82dde24cee4d5cb1b (patch)
tree1786b6dab3bd7b0c2e4b9517bc09b2c8b145cedc /desktop-widgets
parentd674c5028f45a5c3bc67a2aafa637c798c3874f0 (diff)
downloadsubsurface-ab29f6416b619c141de979b82dde24cee4d5cb1b.tar.gz
Dive site: replace UUID_ROLE by DIVESITE_ROLE
Access to dive-sites in the LocationInformationModel was via UUID. Replace this by a direct access to the struct dive_site pointer. Accordingly, rename the UUID_ROLE to DIVESITE_ROLE. This is a small step in replacing dive-site UUIDs by pointers throughout the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/locationinformation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index e24da5f7f..acafcfe7b 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -84,7 +84,7 @@ void LocationInformationWidget::mergeSelectedDiveSites()
std::vector<struct dive_site *> selected_dive_sites;
selected_dive_sites.reserve(selection.count());
Q_FOREACH (const QModelIndex &idx, selection) {
- struct dive_site *ds = get_dive_site_by_uuid(idx.data(LocationInformationModel::UUID_ROLE).toUInt());
+ struct dive_site *ds = (struct dive_site *)idx.data(LocationInformationModel::DIVESITE_ROLE).value<void *>();
if (ds)
selected_dive_sites.push_back(ds);
}