aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-13Dive pictures: Convert thumbnailHash to individual filesGravatar Berthold Stoeger
On startup, convert an old-style thumbnailHash to individual thumbnail files. Show a modal progress bar while doing so. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13Dive pictures: save thumbnails to individual filesGravatar Berthold Stoeger
The old code loaded all thumbnails into memory at once. This does not scale to logs with thousands of pictures. Therefore, save the pictures to individual files and only load the currently needed pictures. Currently, this will make changing switching between dives slower, because the thumbnails are loaded from disk. In the future, it is planned to do this in a background thread without blocking the user interface. A notable difference to the old code: Thumbnails are now indexed by the image-hash (i.e. the content of the raw image) and not by the filename of the image. Thus, different paths to the same image should only be saved once. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13Dive pictures: Scale thumbnails on demandGravatar Berthold Stoeger
To potentially conserve memory, don't keep copies of scaled thumbnails. Scale the thumbnails on demand. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13mobile: fix next icon prefixGravatar Murillo Bernardes
Icons used directly by Kirigami use /org/kde/kirigami as prefix. Ex: previous and next icons on header. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-13iOS: fix "previous" button iconGravatar Murillo Bernardes
Icons used directly by Kirigami use /org/kde/kirigami as prefix. Ex: previous button on the GlobalDrawer. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-13Update CHANGELOG.mdGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13Desktop: On dive edit from the dive list or map, switch to new stateGravatar Berthold Stoeger
If "Edit dive" is selected from the dive list or the map view, switch to a new mode, which shows the dive infos and the profile. After the edit, switch back to the previous state. Fixes #1213 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13Desktop: Make "Edit dive" menu entry work for downloaded divesGravatar Berthold Stoeger
Confusingly, "Edit dive" did only work for planned / manually entered dives. Change this, but only start profile-editing for planned / manually entered dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-13mobile: prevent Action buttons hijack after deleteGravatar Murillo Bernardes
This gets delete dive working properly. Kirigami passive notification ends up hijacking area where the "Add dive" or "Delete" or "Discard" buttons are shown. So after deleting a dive the "Undo" button from the notification keeps handling the touch events even when not visible. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-12Update libdivecomputer submoduleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-12Add Qt header so Q_OS_xxx macros workGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-12DC transport debugging messagesGravatar Dirk Hohndel
Show the transport types we support for each of the supported dive computers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-12Simplier way to get QT_VERSIONGravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-05-11BLE: add EON Core and Mares Bluelink to detectionGravatar Dirk Hohndel
Detection isn't required, but it makes things easier. For the Mares dive computers we only see the Bluelink, so we can't tell which dive computer is connected to it. We guess "Quad", but the user can pick a different one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-11iOS: only DC_TRANSPORT_BLE is supportedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-11Mac: update build.sh to hack around autotools problemGravatar Dirk Hohndel
For reasons I cannot explain, running configure for libdivecomputer claims that certain feature tests pass, even though those features demonstrably aren't there. This is happening for two compiler warning flags (-Wrestrict & -Wno-unused-but-set-variable) as well as the test for clock_gettime. To work around this, we manually edit the config.h file and the created Makefile before building libdivecomputer. This happened on macOS 10.11.6 with clang-800.0.42.1 (part of Xcode 8.2.1). Tangentially related to: See #1263 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-11Add script to download/clone 3rd party libsGravatar jan Iversen
Using one script instead of having the downloads in all build.sh ensures consistency and lowers maintenance. Note: this script is not intented to be run directly, it is intented to be integrated in the various build.sh Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-11iOS: update weigth... weight to avoid warningGravatar jan Iversen
Seems the pro file was forgotten with the rename of weightsysteminfomodel.h Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11iOS: corrected ^space to tabGravatar jan Iversen
Corrected to use correct code style. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10WhitespaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10iOS: cleaned/bumped versionsGravatar jan Iversen
Made versioning identical to scripts/build.sh Having the same version of 3rd party libraries across platforms secures a more stable product. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10iOS: removed local build of libxml2Gravatar jan Iversen
script/build.sh uses the builtin libxml2 and do not build locally, updated build.sh and Subsurface-mobile.pro to to the same. sadly enough xslt is not distributed for iOS so it must be built. Apart from simplifying the script it saves build time Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10iOS: removed local build of sqllite3Gravatar jan Iversen
script/build.sh uses the builtin sqllite3 and do not build locally, updated build.sh and Subsurface-mobile.pro to to the same. Apart from simplifying the script it saves build time Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10iOS: build.sh does not run configure for libdivecomputerGravatar jan Iversen
In a "virgin" repo incl. libdivecomputer, starting by running ios/build.sh caused an error in libdivecomputer, because autoreconf was never run. Changed build.sh to check if libdivecomputer/configure exist, if not run autoreconf Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10Travis: remove flag for iOS that is no longer necessaryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10iOS: Allow change of bundle identifierGravatar jan Iversen
This patch allows users to set a bundle identifier, without opening Xcode (set as env. variable). If the env. variable is not set (like e.g. on Travis) it defaults to org.... Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11Fixed erroneous comparison of cylinders and weight systems.Gravatar Oliver Schwaneberg
Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
2018-05-11Corrected file name "weigthsysteminfomodel" to "weightsysteminfomodel"Gravatar Oliver Schwaneberg
Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
2018-05-10Removed a duplicate include in maintab.cppGravatar Oliver Schwaneberg
Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
2018-05-10Added Info.plist and Qt to .gitignoreGravatar jan Iversen
This prevents the generated Info.plist and user defined Qt from being accidently committed. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10Updated .gitignore to silence ios dirsGravatar jan Iversen
e.g. <repo>/build is already silenced, so it is natural to do the same for the iOS builds. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10iOS: use recommended variable for bundle IDGravatar Murillo Bernardes
We used to hard-code the bundle ID which meant that developers always had to manually override the bundle ID in order to be able to sign the iOS app for local testing. With this change, the official builds will continue to work without manually opening the project in Xcode, yet other developers will use the Apple-recommended format in order to set their own bundle ID. This is based on a suggestion by Murillo Bernardes. See #1246 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09iOS: update build scriptGravatar jan Iversen
Use git repos and checkout corresponding tags where possible. Use more reliable servers to download source from. [Dirk Hohndel: refactored Jan's original commit in #1241] Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09iOS: update build instractionsGravatar jan Iversen
Updated INSTALL to point at packaging/ios/README Updated README to 'facts' Deleted ios_build_instructions as they are covered in README [Dirk Hohndel: refactored Jan's original commit in #1241] Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09mobile: show selected dive on details viewGravatar Murillo Bernardes
Call positionViewAtIndex in order to make the selected dive visible. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-09iOS, set lowest deployment target to 8.0Gravatar jan Iversen
Define deployment target, instead of using user default. iOS 8.0 is the oldest supported platform Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-08Add a comment on building option -mobileGravatar Robert C. Helling
...to explain the difference between building the mobile version to run on desktop and crossbuild for a mobile OS. This should address #1247 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-07Planner: Unify final ascent rates in plan() and fake_dc()Gravatar Berthold Stoeger
When generating fake profiles for manually entered dives, fake_dc() and plan() used different final ascent rates of 5 m/min and 4.5 m/min, respectively. This led to dives that were 6 seconds longer than entered by the user and to confusion. See #554. Therefore, use the same ascent rate taken from the preferences field flag.ascratelast6m in both cases. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-07Fix CCR setpoint display bugGravatar Willem Ferguson
1) The connection for the display of CCR-setpoint o2SetpointGasItem was erroneous, being connected to partialpressuregasSettings. It is now correctly connected to technicalDetailsSettings. 2) The colour of the setpoint graph is changed from PO2_ALERT (red) to an orange colour in order to show setpoint in red only when it exceeds 1.6. This emphasises the visibility of red parts of the gas pressure graphs whenever gas limits are exceeed. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
2018-05-07Planner: Correctly fill out last_manual_time in fake_dc()Gravatar Berthold Stoeger
By not filling out this value, entering of manual dives was broken for dive lengths starting with a digit 5 or higher. Fixes #1211 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-07Planner: don't return static data in fake_dc()Gravatar Berthold Stoeger
fake_dc() used to return a statically allocated dc with statically allocated samples. This is of course a questionable practice in the light of multi-threading / resource ownership. Once these problems were recognized, the parameter "alloc" was added. If set to true, the function would still return a statically allocated dc, but heap-allocated samples, which could then be copied in a different dc. All in all an ownership nightmare and a recipie for disaster. The returned static dc was only used as a pointer to the samples anyway. There are four callers of fake_dc() and they all have access to a dc-structure without samples. Therefore, change the semantics of fake_dc() to fill out the passed in dc. If the caller does not care about the samples, it can simply reset the sample number to zero after work. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-07Travis: fix Android build by forcing Ubuntu:xenial for containerGravatar Dirk Hohndel
The build fails with newer versions and Ubuntu:latest switched to bionic a few weeks ago. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-04Desktop: fix time format in main tabGravatar Dirk Hohndel
Fixes #1234 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-03Profile: Fix crash on addition of dive to fresh logbookGravatar Berthold Stoeger
If there is no current dive, the macro current_dc returns NULL. This led to a null-pointer dereference. Reported-by: Martin Měřinský <mermar@centrum.cz> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-01CSV import: include visibility and rating in importGravatar Miika Turkia
Add support for visibility and rating to CSV import dialog. Fixes #1212 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-05-01CSV import: parse (unit) style headersGravatar Miika Turkia
Commit fc010456 introduced the units to column headers. Thus the matching of these labels must take the unit into account when doing automatic matching of the header line with our field naming. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-29Ubuntu build script updateGravatar Dirk Hohndel
Make sure we list the currently supported releases. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-29When looking for gas change events only use thoseGravatar Robert C. Helling
This function looks for the last gas change before a given time. We should initialize it with a gaschange event as we might later use this event to read a gasmix from it. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-04-29cmake: add the GCC_OPTIMIZATION_FLAGS variableGravatar Lubomir I. Ivanov
Instead of always adding -O2 for CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG allow the user to pass a custom value via GCC_OPTIMIZATION_FLAGS. Passing -DGCC_OPTIMIZATION_FLAGS:STRING=-O0 would disable all optimizations. Suggested-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-28Plot OC-pO2 graph for SCR divesGravatar Willem Ferguson
This commit allows plotting the OC-equivalent pO2 graph for PSCR dives. This happens in both the cases where there is no external O2-monitoring AND when there is external pO2 monitoring. The calculations are only done for PSCR dives and is achieved as follows: 1) Within plot-info create a pressure-t called OC_pO2 in profile.h and populate this variable with the open-circuit pO2 values in profile.c. 2) Create a new partialPressureGasItem ocpo2GasItem in profilewidget2.h and, in profilewidget2.cpp, initialise it to read the plot-info OC_pO2 values and enable its display by using the setVisible method. The diveplotdatamodel was also touched in order to achieve this. 3) Create a pref button that controls the display of OC-pO2 for SCR dives 4) Change the colour of the OC-pO2 grpah to orange 5) Change the connection of the crr_OC_pO2 signal to be appropriate 6) rename the OC_pO2 attribute to scr_OC-pO2 Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>