Cleanup: use getDiveSelection() for shifting time

There are two cases where dive-times are shifted: in an explicit
dialog and when editing the date/time of a dive.

In each of these cases, the selected dives were collected manually.
Instead use the getDiveSelection() function. Since this returns
a std::vector, change the argument of Command::ShiftTime() to
such a std::vector.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-01-03 16:04:54 +01:00 committed by bstoeger
parent 62adc24d15
commit c495a49b1b
6 changed files with 14 additions and 30 deletions

View file

@ -133,14 +133,14 @@ private:
class ShiftTime : public DiveListBase {
public:
ShiftTime(const QVector<dive *> &changedDives, int amount);
ShiftTime(std::vector<dive *> changedDives, int amount);
private:
void undoit() override;
void redoit() override;
bool workToBeDone() override;
// For redo and undo
QVector<dive *> diveList;
std::vector<dive *> diveList;
int timeChanged;
};