summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-19 21:20:01 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-20 10:01:50 -0800
commite79ac9c7ed2e2516a2601afbff2193633b3a8e73 (patch)
tree279cef9cbe6d92ffad1e8a31227b0be53aa8ccfb
parent98594c18d11e619de05fc05cbd7ca006a01d184f (diff)
downloadsubsurface-e79ac9c7ed2e2516a2601afbff2193633b3a8e73.tar.gz
cleanup: make a few DivePlannerModel functions private
It simplifies reasoning about control flow a lot if it is known that functions can't be invoked from a different part of the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--qt-models/diveplannermodel.cpp2
-rw-r--r--qt-models/diveplannermodel.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index d94b728ae..54f46111d 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -732,7 +732,7 @@ void DivePlannerPointsModel::setStartDate(const QDate &date)
void DivePlannerPointsModel::setStartTime(const QTime &t)
{
startTime.setTime(t);
- diveplan.when = dateTimeToTimestamp(startTime);
+ diveplan.when = dateTimeToTimestamp(startTime);
displayed_dive.when = diveplan.when;
emitDataChanged();
}
diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h
index 0f3a423db..0a51a240b 100644
--- a/qt-models/diveplannermodel.h
+++ b/qt-models/diveplannermodel.h
@@ -40,14 +40,11 @@ public:
void setPlanMode(Mode mode);
bool isPlanner();
void createSimpleDive();
- void setupStartTime();
void clear();
Mode currentMode() const;
bool setRecalc(bool recalc);
bool recalcQ();
bool tankInUse(int cylinderid);
- void setupCylinders();
- bool updateMaxDepth();
CylindersModel *cylindersModel();
int ascrate75Display();
@@ -63,7 +60,6 @@ public:
divedatapoint at(int row);
int size();
struct diveplan &getDiveplan();
- int lastEnteredPoint();
void removeDeco();
static bool addingDeco;
struct deco_state final_deco_state;
@@ -122,6 +118,10 @@ signals:
private:
explicit DivePlannerPointsModel(QObject *parent = 0);
+ void setupStartTime();
+ void setupCylinders();
+ int lastEnteredPoint();
+ bool updateMaxDepth();
void createPlan(bool replanCopy);
struct diveplan diveplan;
struct divedatapoint *cloneDiveplan(struct diveplan *plan_src, struct diveplan *plan_copy);