aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
AgeCommit message (Collapse)Author
2016-04-08Simplify code - we now can rely on git_local_only to do the right thingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-08QML UI: change order of cloud backend accessesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06QML UI: break the sync into explicit save local and save cloudGravatar Dirk Hohndel
This makes the code much cleaner and easier to understand and should allow us to then switch back to doing at least the local save right after we make any changes to the data. This commit also tries to make sure that the accessingCloud status stays correct and consistent throughout all the various success and error paths. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06QML UI: after successfully opening storage, store the filenameGravatar Dirk Hohndel
We rely on the filename being valid elsewhere in the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06QML UI: save with unchanged credentials returns to dive listGravatar Dirk Hohndel
If the user is on the credentials page, doesn't change the credentials but simply taps on save, they now get back to the dive list. Fixes #1047 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: more hacking around with git progress reportingGravatar Dirk Hohndel
I gave up on the magic numbers and instead report simply linear progress. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: don't fetch the remote twice when loadingGravatar Dirk Hohndel
We first check the sha to see if we want to load at all. But at that point we already have the repository and the branch and we have synced with the remote. So when we decide that we need to reload from storage, we don't need to repeat those steps, instead we can go directly to the git load. For that to work we need to pass the repository pointer and the branch name back to the caller so that we can directly call git_load_dives(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: restructure (and fix) the saveChanges logicGravatar Dirk Hohndel
We first want to save any exiting unsaved changes to the local repository (and ONLY to the local repository). After that we want to make sure that we are syncing remotely, fetch the remote and then (possibly after a merge) push the changes to the remote. In the end we reset the previous "local git only" preference which we overwrote for this manual forced sync. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: don't try to save again if we are already savingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: simplify code for loading data from the cloudGravatar Dirk Hohndel
We had a redundant check of the server reply hidden in there, and the logic which values were set where didn't really make much sense. This seems clearer to me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05QML UI: simplify git tracking outputGravatar Dirk Hohndel
And don't waste quite as much time on updating the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05DiveListModel: don't add the dives one at a timeGravatar Dirk Hohndel
Most of the time we are adding all the dives, so do this in a single model operation. This makes the case when adding a single dive (in the undo delete function) slightly more complicated, but that seems totally worth it for the speedup in the common case. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Keep the instance in static variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>