diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-28 11:28:01 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:48:14 +0100 |
commit | 83259008e763d3cc120c826f58f91a0ff62b6b92 (patch) | |
tree | c78b2d3cd2e390858a38787c97a130d55f5c9458 /core/subsurface-qt/DiveObjectHelper.cpp | |
parent | 572fc470718e4a11d5df60b37e7a2a91639285c7 (diff) | |
download | subsurface-83259008e763d3cc120c826f58f91a0ff62b6b92.tar.gz |
mobile cleanup: unduplicate code and do not loop over dives (3)
See e6e1473e6. Exact same commit but here for the
list of divemaster. The careful reader will spot a
small addition to the clearDetailsEdit() QML function.
Two more field are cleared.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 2e18b8f0a..9372f422f 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -428,18 +428,3 @@ QStringList DiveObjectHelper::locationList() const locations.sort(); return locations; } - -QStringList DiveObjectHelper::divemasterList() const -{ - QStringList divemasters; - struct dive *d; - int i = 0; - for_each_dive (i, d) { - QString temp = d->divemaster; - if (!temp.isEmpty()) - divemasters << d->divemaster; - } - divemasters.removeDuplicates(); - divemasters.sort(); - return divemasters; -} |