core: make shared prepareDives identical to desktop prepare_dives_for_divelogs

In order to replace DivelogsDeWebServices::prepare_dives_for_divelogs with
uploadDiveLogsDE::prepareDives, first step is to make the functions identical.

amount_selected is not maintained for mobile, add #ifdef SUBSURFACE_MOBILE

Add comment, to make code more readable

add white line to make code more readable

change to use variable ds (created a couple of lines earlier

Avoid "goto" by adding close code

Remove label and close code (it was only called in 1 place)

Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2019-12-09 08:28:09 +01:00 committed by Dirk Hohndel
parent 738d3057da
commit 49e6330399
2 changed files with 30 additions and 18 deletions

View file

@ -26,7 +26,7 @@ signals:
private:
uploadDiveLogsDE();
bool prepareDives(bool selected, const QString &filename);
bool prepareDives(const QString &tempfile, const bool selected);
void uploadDives(const QString &filename, const QString &userid, const QString &password);
QNetworkReply *reply;