Commit graph

10 commits

Author SHA1 Message Date
Berthold Stoeger
03b910ee7f core: remove __cplusplus ifdefs
Since all source files are now C++, this is redundant.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-08-13 19:28:30 +02:00
Richard Fuchs
f308a6b57b export: clean up temp file after divelogs.de upload
This adds a cleanup function to be called after a divelogs.de upload
finishes (successful or not) to make sure the temporary zip file is
closed and removed.

Signed-off-by: Richard Fuchs <dfx@dfx.at>
2021-08-06 11:05:06 -07:00
Berthold Stoeger
8391d926c7 Cleanup: remove const bool parameters and return types
These just make no sense. Since the value is copied, it
has no meaning to the caller whether the function can
change the value (and vice versa for return types).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-09 12:13:18 -08:00
jan Iversen
85e6e90559 core: uploadDiveLogsDE::prepareDives no longer need to be public
Integration into desktop-widgets is complete.

Move prepareDives() from public to private

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 10:10:01 -05:00
jan Iversen
5a4128a8f2 core: add uploadStatus signal to uploadDiveLogsDE
The uploadStatus signal can be used to inform the user about
the process e.g.
- preparing zip file
- starting actual upload

It is a suplement to uploadProgress, that only informs about
the network part.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
10ab833d7d core: make uploadDiveLogsDE slots workable for desktop
Secure that the slots/signals in uploadDiveLogsDE, which are without
UI, can be used in DivelogsDeWebServices (to add the UI part).

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
fa8acc0f40 core: rename slot in uploadDiveLogsDE
The difference between slot names and signal names was to insignificant
e.g. uploadFinish (signal) uploadFinished (slot).

Change slot names to slot_<name> should clear any confusion.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
d9f637a815 core: make prepareDives public in uploadDiveLogsDE
prepareDives needs to be public, in order to be used in
subsurfacewebservices.

"friend" is another option, but that gives subsurfacewebservices
too much freedom.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
49e6330399 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>
2019-12-11 12:36:43 -05:00
jan Iversen
eb08f17a03 core: add upload divelogs.de class
The implementation is based on class DivelogsDeWebServices in
desktop-widgets but without the UI entanglement

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00