From af94f21ea18f1a97b53b1c6fbf3fb79a5ee48391 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 28 Feb 2024 19:55:30 +0100 Subject: [PATCH] divetripmodel: explicitly convert char * to QString The automatic conversion from char * to QVariant failed to compile for me. Let's hint that this should be interpreted as a string. No idea, why this happens for me, but apparently not on CI. Signed-off-by: Berthold Stoeger --- qt-models/divetripmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 84e95099c..76209f4b7 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -287,13 +287,13 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) formatDiveDuration(d)); case MobileListModel::RatingRole: return d->rating; case MobileListModel::VizRole: return d->visibility; - case MobileListModel::SuitRole: return d->suit; + case MobileListModel::SuitRole: return QString(d->suit); case MobileListModel::AirTempRole: return get_temperature_string(d->airtemp, true); case MobileListModel::WaterTempRole: return get_temperature_string(d->watertemp, true); case MobileListModel::SacRole: return formatSac(d); case MobileListModel::SumWeightRole: return formatSumWeight(d); - case MobileListModel::DiveGuideRole: return d->diveguide; - case MobileListModel::BuddyRole: return d->buddy; + case MobileListModel::DiveGuideRole: return QString(d->diveguide); + case MobileListModel::BuddyRole: return QString(d->buddy); case MobileListModel::TagsRole: return get_taglist_string(d->tag_list); case MobileListModel::NotesRole: return formatNotes(d); case MobileListModel::GpsRole: return formatDiveGPS(d);