mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: replace dive master by dive guide
In general, replace "dive master" by "dive guide". However, do not change written dive logs for now. On reading, accept both versions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
889827aadb
commit
9e0712d5dc
38 changed files with 141 additions and 133 deletions
|
@ -1429,7 +1429,7 @@ struct PeopleBinner : public StringBinner<PeopleBinner, StringBin> {
|
|||
std::vector<QString> dive_people;
|
||||
for (const QString &s: QString(d->buddy).split(",", SKIP_EMPTY))
|
||||
dive_people.push_back(s.trimmed());
|
||||
for (const QString &s: QString(d->divemaster).split(",", SKIP_EMPTY))
|
||||
for (const QString &s: QString(d->diveguide).split(",", SKIP_EMPTY))
|
||||
dive_people.push_back(s.trimmed());
|
||||
return dive_people;
|
||||
}
|
||||
|
@ -1442,10 +1442,10 @@ struct PeopleVariable : public StatsVariableTemplate<StatsVariable::Type::Discre
|
|||
}
|
||||
QString diveCategories(const dive *d) const override {
|
||||
QString buddy = QString(d->buddy).trimmed();
|
||||
QString divemaster = QString(d->divemaster).trimmed();
|
||||
if (!buddy.isEmpty() && !divemaster.isEmpty())
|
||||
QString diveguide = QString(d->diveguide).trimmed();
|
||||
if (!buddy.isEmpty() && !diveguide.isEmpty())
|
||||
buddy += ", ";
|
||||
return buddy + divemaster;
|
||||
return buddy + diveguide;
|
||||
}
|
||||
std::vector<const StatsBinner *> binners() const override {
|
||||
return { &people_binner };
|
||||
|
@ -1477,7 +1477,7 @@ struct BuddyVariable : public StatsVariableTemplate<StatsVariable::Type::Discret
|
|||
struct DiveGuideBinner : public StringBinner<DiveGuideBinner, StringBin> {
|
||||
std::vector<QString> to_bin_values(const dive *d) const {
|
||||
std::vector<QString> dive_guides;
|
||||
for (const QString &s: QString(d->divemaster).split(",", SKIP_EMPTY))
|
||||
for (const QString &s: QString(d->diveguide).split(",", SKIP_EMPTY))
|
||||
dive_guides.push_back(s.trimmed());
|
||||
return dive_guides;
|
||||
}
|
||||
|
@ -1489,7 +1489,7 @@ struct DiveGuideVariable : public StatsVariableTemplate<StatsVariable::Type::Dis
|
|||
return StatsTranslations::tr("Dive guides");
|
||||
}
|
||||
QString diveCategories(const dive *d) const override {
|
||||
return QString(d->divemaster).trimmed();
|
||||
return QString(d->diveguide).trimmed();
|
||||
}
|
||||
std::vector<const StatsBinner *> binners() const override {
|
||||
return { &dive_guide_binner };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue