cleanup: add DivePlannerPointsModel::addDefaultStop() function

When clicking on "+" in the planner, a default stop point was
added using a signal/slot connection. This used the archaic
string-based connect syntax, because it was realized with
default parameters passed to "addStop()". Instead, add a
"addDefaultStop()" slot, which passes the default parameters.
Since all other callers do not use callbacks, unslotify
"addStop()". The slot was the only user of the default parameters,
so they can be removed alltogether.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-23 11:41:42 +01:00 committed by Dirk Hohndel
parent 5196ea6149
commit d68c3d8ab5
3 changed files with 8 additions and 8 deletions

View file

@ -750,6 +750,11 @@ int DivePlannerPointsModel::lastEnteredPoint() const
return -1;
}
void DivePlannerPointsModel::addDefaultStop()
{
addStop(0, 0, -1, 0, true, UNDEF_COMP_TYPE);
}
// cylinderid_in == -1 means same gas as before.
// divemode == UNDEF_COMP_TYPE means determine from previous point.
int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_in, int ccpoint, bool entered, enum divemode_t divemode)