summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-12-15 16:10:08 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-17 13:03:56 -0800
commit1037c15b98bf9e2e4734e9e6ee2d5c6387f131a9 (patch)
tree0b9c8800f405893c18e8ea74242ddc3b6e8dae21 /mobile-widgets/qmlmanager.h
parentcc5ebd741486c3231b50974959de2f5d842b8fa5 (diff)
downloadsubsurface-1037c15b98bf9e2e4734e9e6ee2d5c6387f131a9.tar.gz
mobile: remove DiveObjectHelper code
When editing a dive, a DiveObjectHelper of the unmodified dive was created to compare the edited with the old values. Since the DiveObjectHelper is used here only as a pointless wrapper around the formatting functions, call these functions directly. However, note that the code is in principle wrong since the change to the mobile-models, which do not use the DiveObjectHelper. The real fix would be to reload the data from the model to prevent going out-of-sync with respect to the formatting routines! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r--mobile-widgets/qmlmanager.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 59cf37cab..cbb451d8a 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -261,10 +261,10 @@ private:
QString m_notificationText;
qreal m_lastDevicePixelRatio;
QElapsedTimer timer;
- bool checkDate(const DiveObjectHelper &myDive, struct dive *d, QString date);
- bool checkLocation(DiveSiteChange &change, const DiveObjectHelper &myDive, struct dive *d, QString location, QString gps);
- bool checkDuration(const DiveObjectHelper &myDive, struct dive *d, QString duration);
- bool checkDepth(const DiveObjectHelper &myDive, struct dive *d, QString depth);
+ bool checkDate(struct dive *d, QString date);
+ bool checkLocation(DiveSiteChange &change, struct dive *d, QString location, QString gps);
+ bool checkDuration(struct dive *d, QString duration);
+ bool checkDepth(struct dive *d, QString depth);
bool currentGitLocalOnly;
bool localChanges;
QString m_progressMessage;