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>
This commit is contained in:
parent
3e838ee74d
commit
dec9401f48
@ -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()];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user