diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-28 10:26:45 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:48:14 +0100 |
commit | 572fc470718e4a11d5df60b37e7a2a91639285c7 (patch) | |
tree | 012052da9ce773463550741c33e33a00626c3434 /core/subsurface-qt/DiveObjectHelper.cpp | |
parent | fed2c5b6a1c71649bcb310c0bd118cb1abcf9ea0 (diff) | |
download | subsurface-572fc470718e4a11d5df60b37e7a2a91639285c7.tar.gz |
mobile cleanup: unduplicate code and do not loop over dives (2)
See e6e1473e6. Exact same commit but here for the
list of buddies.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 4a7bc70f9..2e18b8f0a 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -429,28 +429,6 @@ QStringList DiveObjectHelper::locationList() const return locations; } -QStringList DiveObjectHelper::buddyList() const -{ - QStringList buddies; - struct dive *d; - int i = 0; - for_each_dive (i, d) { - QString temp = d->buddy; - if (!temp.isEmpty() && !temp.contains(",")){ - buddies << d->buddy; - } - else if (!temp.isEmpty()){ - QRegExp sep("(,\\s)"); - QStringList tempList = temp.split(sep); - buddies << tempList; - buddies << tr("Multiple Buddies"); - } - } - buddies.removeDuplicates(); - buddies.sort(); - return buddies; -} - QStringList DiveObjectHelper::divemasterList() const { QStringList divemasters; |