summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-12-13Coding style: use std::equal_to instead of lambdaGravatar Berthold Stoeger
Use std::equal_to instead of lambdas that compare two dive pointers. One could argue over which version is more readable. For whatever it's worth, std::equal_to is more compact and expressive. This removes an old erroneous comment that stated that std::equal_to is only available since C++14. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-13core: remove LOG_STP from mobileGravatar jan Iversen
LOG_STP is on longer providing the data needed, since a lot of the startup is indirectly in QML, furthermore using the xcode project and running profiler gives much more detailed information Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-13qt-models: remove LOG_STP from mobile/desktopGravatar jan Iversen
LOG_STP is on longer providing the data needed, since a lot of the startup is indirectly in QML, furthermore using the xcode project and running profiler gives much more detailed information Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-12release doc: add to CHANGELOG.mdGravatar jan Iversen
Upload to dive-share is now available in mobile Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile/qml: Integrate/activate diveshare in ExportGravatar jan Iversen
Integrate diveshare in Export Activate diveshare radio button Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile-widgets: activate uploadDiveShare in qmlmanagerGravatar jan Iversen
Remove "TO BE IMPLEMENTED" and add call doUpload Connect signal to signal in QMLManager to avoid registring the upload class. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile/qml: Clear status field in ExportGravatar jan Iversen
When opening the saveAsDialog a second time, it contains the last status from first time. Clear statusText before calling saveAsDialog Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12core: divehare avoid race problem.Gravatar jan Iversen
Do reply->readAll() before reply-deleteLater() With UI deleteLater() seems to happen after the function exist, but with QML it causes problems. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12core: divehare change slot namesGravatar jan Iversen
change slot names from slot_* to *Slot Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile/qml: make close dialog in Connect workGravatar jan Iversen
When using Connect, the context is switched, so close() might or might not work. Change unqualified close() to qualified uploadDialog.close() Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile/qml: remove empty lineGravatar jan Iversen
Remove empty line that does not make sense. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12core/settings: qPrefCloudStorage, correct diveshare_uid namingGravatar jan Iversen
The variable in Q_PROPERTY was wrongly named diveshare_userid change diveshare_userid to diveshare_uid Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12core: uploadDiveLogsDE::prepareDives no longer need to be publicGravatar jan Iversen
Integration into desktop-widgets is complete. Move prepareDives() from public to private Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12build system: make INSTALL_ROOT depend on BUILD_PREFIX as wellGravatar Dirk Hohndel
This makes things more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build system: fix most shellcheck warningsGravatar Dirk Hohndel
A couple are still there, but this was the low hanging fruit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build system: do something more reasonable if subsurface is a symlinkGravatar Dirk Hohndel
This actually changes behavior compared to what we did before. But it seems reasonabel. If ./subsurface is a link to a different directory, then assume that we want a true out of tree build in the current directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-12build-system: allow shared source across multiple hostsGravatar Dirk Hohndel
This attempts to allow sharing a host directory across multiple builds, target use case is to have a shared source directory on a VM host and be able to build from that in a number of VMs without those builds stepping on top of each other. Instead of subsurface/build, subsurface/mobile-build, subsurface/libdivecomputer/build, use a prefix path to allow having true out of tree builds. The one shortcoming is that the autotools need to be run in the libdivecomputer directory - that means this will be run on the first system that starts a build. But that seems to cause no harm in my testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-11mobile/qml: close upload dialog if successGravatar jan Iversen
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: corrected timeout and error text problem in uploadDiveLogsDEGravatar jan Iversen
incorrectly stopped timer before the upload was started. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: divelogsDE: integrate shared backendGravatar jan Iversen
Use doUpload() from uploadDiveLogsDE Connect signals from uploadDiveLogsDE to do UI part. Clean slots to only contain UI. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: add uploadStatus signal to uploadDiveLogsDEGravatar jan Iversen
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-11desktop-widgets: divelogsDE: delay handling until user select uploadGravatar jan Iversen
Do not prepare zip file, just because user selected the divelogs.de radiobutton Move prepareDives to startUpload (slot handling user clicking on upload button). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: split UI and network in DivelogsDeWebServices (prepare)Gravatar jan Iversen
Clean prepareDivesForUpload() and uploadDives() so that uploadDives() only contain network handling no UI. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: make uploadDiveLogsDE slots workable for desktopGravatar jan Iversen
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-11desktop-widgets: use qPrefCloudStorage instead of QSettingsGravatar jan Iversen
Use qPrefCloudStorage for divelogde_user/password to secure same handling as other settings, as well as same handling as used in shared uploadDiveLogsDE class Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: remove code under RM_OBSOLETE_CODE ifdefGravatar jan Iversen
history, and it is disturbing in "diff". Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: rename slot in uploadDiveLogsDEGravatar jan Iversen
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-11desktop-widgets: use uploadDiveLogsDE::prepareDivesGravatar jan Iversen
Remove local implementation (prepare_dives_for_divelog) and call uploadDiveLogsDE::prepareDives, which are shared between mobile and desktop Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: make prepareDives public in uploadDiveLogsDEGravatar jan Iversen
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-11core: make shared prepareDives identical to desktop prepare_dives_for_divelogsGravatar jan Iversen
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-11core: correct QString arg problemGravatar jan Iversen
use report_error directly, instead of making a QString first, argument syntax are different (%s vs. %1) Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11release doc: add to CHANGELOG.mdGravatar jan Iversen
Upload to divelogs.de now possible with limited error/success reporting. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: add timeout.stop() if upload successfulGravatar jan Iversen
Stop timeout not only in case of errors, but also in positive case. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: handle upload signalsGravatar jan Iversen
Add uploadFinish and uploadProgress to Export page Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile-widgets: make upload signals available to QMLGravatar jan Iversen
Connect signal to signal in QMLManager to avoid registring the upload class. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: close export page after uploadGravatar jan Iversen
pop from pagestack. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: add pref suppport for userid in ExportGravatar jan Iversen
Handle reading/writing of userid/password settings in the saveAsDialog and set field to visible when needed. Activate divelogsde radio button Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile-widgets: activate uploadDiveLogsDE in qmlmanagerGravatar jan Iversen
Remove "TO BE IMPLEMENTED" and add call doUpload Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11build-system: add uploadDiveLogsDE to iOS buildGravatar jan Iversen
Update iOS project solution file Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: add upload divelogs.de classGravatar jan Iversen
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-11core/settings: extend qPrefCloudStorage with divelogsde user infoGravatar jan Iversen
Add divelogsde_userid and divelogsde_password to qPrefCloudStorage to be used in Export.qml Extending qPrefCloudStorage is more logical than adding QSettings (and securing the same behaviour) outside qPref. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: correct typo in Export.qmlGravatar jan Iversen
Correct default value for export type. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile-widgets/qml: add divelogsde stylesheet to resourcesGravatar jan Iversen
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: diveDiveShareExportDialog add signal handlingGravatar jan Iversen
connect signals from uploadDiveShare and remove reply variable Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: change uploadFinish() to include htmlGravatar jan Iversen
diveshareexport wants to show the HTML received in a positive response, so signal cannot be compatible with diveLogsDE Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: use shared uploadDiveShare for diveshare.Gravatar jan Iversen
Remove shared code from DiveShareExportDialog::doUpload() and add call to uploadDiveShare::doUpload() Remark signal handling is not implemented. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core: copy doUpload from desktop-widgets to coreGravatar jan Iversen
Add DiveShareExportDialog::do_upload() to uploadDiveShare::do_upload(), while cleaning it from UI. Add signal connections as used in uploadDiveLogsDE Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11desktop-widgets: use qPrefCloudStorage for diveshare.Gravatar jan Iversen
Diveshare upload in mobile is using qPrefCloudStorage, so change diveshareexportdialog as well, to keep consistency. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11core/settings: extend qPrefCloudStorage with diveshare uid/privateGravatar jan Iversen
Add diveshare/uid and diveshare/private to qPrefCloudStorage to be used in Export.qml as well as diveshareexportdialog Extending qPrefCloudStorage is more logical than adding QSettings (and securing the same behaviour) outside qPref. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11build-system: add uploadDiveShare to iOS buildGravatar jan Iversen
Update iOS project solution file Signed-off-by: Jan Iversen <jan@casacondor.com>