From 4ad73fb80756eb7509efd19962994ebfeb2a219b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 29 Apr 2016 06:28:09 -0700 Subject: QML UI: when switching from no cloud to cloud usage, don't drop local data This is rather simplistic, it just imports the local data into the remote repository and therefore loses the git history of the local data - but I wasn't able to make the git merge without shared base commit work, so I went this much easier to implement route instead. One thing we need to be careful about is that contacting the remote server could fail. If we don't manage to merge the dives from cloud server and local storage, we need to revery to no cloud status in order not to lose the local data. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mobile-widgets/qmlmanager.h') diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 2bd2ee240..965a68d40 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -128,11 +128,13 @@ public slots: void clearGpsData(); void finishSetup(); void openLocalThenRemote(QString url); + void mergeLocalRepo(); QString getNumber(const QString& diveId); QString getDate(const QString& diveId); QString getCurrentPosition(); QString getVersion() const; void deleteGpsFix(quint64 when); + void revertToNoCloudIfNeeded(); void consumeFinishedLoad(timestamp_t currentDiveTimestamp); void refreshDiveList(); void screenChanged(QScreen *screen); -- cgit v1.2.3-70-g09d2