From dec9401f48f922c1d8fc6ae40f4f5e50cf781ced Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 30 Oct 2018 18:34:36 +0100 Subject: 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 --- desktop-widgets/locationinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(RECENTLY_ADDED_DIVESITE); + return QVariant::fromValue(RECENTLY_ADDED_DIVESITE); switch (role) { case Qt::DisplayRole: return new_ds_value[index.row()]; -- cgit v1.2.3-70-g09d2