diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divetripmodel.cpp | 9 | ||||
-rw-r--r-- | qt-models/mobilelistmodel.h | 10 |
2 files changed, 5 insertions, 14 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 6b700a92e..52ad937f5 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -3,6 +3,7 @@ #include "core/divefilter.h" #ifdef SUBSURFACE_MOBILE #include "qt-models/mobilelistmodel.h" +#include "core/string-format.h" #endif #include "core/gettextfromc.h" #include "core/metrics.h" @@ -225,11 +226,11 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) case MobileListModel::DiveSiteRole: return QVariant::fromValue(d->dive_site); case MobileListModel::CylinderRole: return formatGetCylinder(d).join(", "); case MobileListModel::GetCylinderRole: return formatGetCylinder(d); - case MobileListModel::CylinderListRole: return getFullCylinderList(); + case MobileListModel::CylinderListRole: return formatFullCylinderList(); case MobileListModel::SingleWeightRole: return d->weightsystems.nr <= 1; - case MobileListModel::StartPressureRole: return getStartPressure(d); - case MobileListModel::EndPressureRole: return getEndPressure(d); - case MobileListModel::FirstGasRole: return getFirstGas(d); + case MobileListModel::StartPressureRole: return formatStartPressure(d); + case MobileListModel::EndPressureRole: return formatEndPressure(d); + case MobileListModel::FirstGasRole: return formatFirstGas(d); case MobileListModel::SelectedRole: return d->selected; case MobileListModel::DiveInTripRole: return d->divetrip != NULL; case MobileListModel::IsInvalidRole: return d->invalid; diff --git a/qt-models/mobilelistmodel.h b/qt-models/mobilelistmodel.h index e18481efc..5c03a02a7 100644 --- a/qt-models/mobilelistmodel.h +++ b/qt-models/mobilelistmodel.h @@ -186,14 +186,4 @@ private: MobileSwipeModel sm; }; -// Helper functions - these are actually defined in DiveObjectHelper.cpp. Why declare them here? -QString formatSac(const dive *d); -QString formatNotes(const dive *d); -QString format_gps_decimal(const dive *d); -QStringList formatGetCylinder(const dive *d); -QStringList getStartPressure(const dive *d); -QStringList getEndPressure(const dive *d); -QStringList getFirstGas(const dive *d); -QStringList getFullCylinderList(); - #endif |