diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-31 14:29:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-31 08:51:20 -0700 |
commit | 82f6c608566838bbfe134e336e687a5d50e0f128 (patch) | |
tree | 70f27d55e2228c56152f16edc4df6cb0a9b7d990 /mobile-widgets/qmlmanager.cpp | |
parent | 6dbc9ca4b01a1e776f90a2f6337d19418ca0c365 (diff) | |
download | subsurface-82f6c608566838bbfe134e336e687a5d50e0f128.tar.gz |
mobile: don't call saveChangesLocal() twice on non-iOS
QMLManager::changesNeedSaving() behaves differently on iOS:
it only saves locally with saveChangesLocal(), whereas all
other OS save to cloud with saveChangesCloud(). Nevertheless,
even for other OS saveChangesLocal() is called even though
that will be called in saveChancesCloud anyway. Therefore,
compile the saveChangesLocal() call in changesNeedSaving
conditionally.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 6b4e99e89..177d0126e 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1267,8 +1267,9 @@ void QMLManager::changesNeedSaving() // on iOS // on all other platforms we just save the changes and be done with it mark_divelist_changed(true); +#if defined(Q_OS_IOS) saveChangesLocal(); -#if !defined(Q_OS_IOS) +#else saveChangesCloud(false); #endif updateAllGlobalLists(); |