diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-30 18:34:36 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-30 22:24:07 +0000 |
commit | dec9401f48f922c1d8fc6ae40f4f5e50cf781ced (patch) | |
tree | 6128429026af5a6458c686e55f0bb0c39cb811b3 | |
parent | 3e838ee74d197d86fdee275f2ecf5b5ac6671d64 (diff) | |
download | subsurface-dec9401f48f922c1d8fc6ae40f4f5e50cf781ced.tar.gz |
Dive site: fix oversight in 920eb7576f
In commit 920eb7576ff3c5fab19c12b7b291042817422ac5 "dive_site *"
was included in Qt's "metatype" system to be able to pass it
through QVariants. One instance was forgotten and a "void *"
was passed in. On readout NULL was returned, which made it
impossible to add new dive-sites under certain circumstances.
Convert this one instance to a proper "dive_site *" QVariant.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 69ecbc9b2..2d0807474 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -381,7 +381,7 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const if (index.row() <= 1) { // two special cases. if (index.column() == LocationInformationModel::DIVESITE) - return QVariant::fromValue<void *>(RECENTLY_ADDED_DIVESITE); + return QVariant::fromValue<dive_site *>(RECENTLY_ADDED_DIVESITE); switch (role) { case Qt::DisplayRole: return new_ds_value[index.row()]; |