aboutsummaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-28 15:21:28 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-31 14:48:14 +0100
commit494ad2654082d85846cb902556921ab62a6dbb14 (patch)
treefc130087b7c90cf38b8bbf6513f1ed08cf05755f /core/subsurface-qt
parent83259008e763d3cc120c826f58f91a0ff62b6b92 (diff)
downloadsubsurface-494ad2654082d85846cb902556921ab62a6dbb14.tar.gz
mobile cleanup: restyle construction of locationlist
See also e6e1473e6. The construction of the locationlist was not the same as the 3 previous lists, and it needs the inclusion of a new model file (divelocationmodel.cpp) in the mobile app. In addition, as the mobile app is mainly interested in a simple stringList (model) to populate a HintsText field (or maybe later a combobox), this stringlist is added to the model, to easy interfacing with QML. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/subsurface-qt')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp18
-rw-r--r--core/subsurface-qt/DiveObjectHelper.h2
2 files changed, 0 insertions, 20 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 9372f422f..1d1bb2f00 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -410,21 +410,3 @@ QString DiveObjectHelper::firstGas() const
gas = get_gas_string(m_dive->cylinder[0].gasmix);
return gas;
}
-
-QStringList DiveObjectHelper::locationList() const
-{
- QStringList locations;
- struct dive *d;
- struct dive_site *ds;
- int i = 0;
- for_each_dive (i, d) {
- if ((ds = get_dive_site_by_uuid(d->dive_site_uuid)) != NULL) {
- QString temp = ds->name;
- if (!temp.isEmpty())
- locations << temp;
- }
- }
- locations.removeDuplicates();
- locations.sort();
- return locations;
-}
diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h
index 5da82c29e..766c20fa5 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -47,7 +47,6 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
Q_PROPERTY(QString firstGas READ firstGas CONSTANT)
- Q_PROPERTY(QStringList locationList READ locationList CONSTANT)
public:
DiveObjectHelper(struct dive *dive = NULL);
~DiveObjectHelper();
@@ -90,7 +89,6 @@ public:
QString startPressure() const;
QString endPressure() const;
QString firstGas() const;
- QStringList locationList() const;
private:
struct dive *m_dive;