aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-03-17Core: remove variable name conflictGravatar Dirk Hohndel
Having a parameter with the same name as a global variable is potentially confusing. Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17Core: remove function list commentGravatar Dirk Hohndel
We don't do this anywhere else. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17Core: remove variable name conflictGravatar Dirk Hohndel
Having a char parameter with the same name as a global char * variable is confusing. Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17Core: cast before multiplication to avoid potential overflowGravatar Dirk Hohndel
Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17Core: cast to the correct typeGravatar Dirk Hohndel
While in the specific calculations here there isn't really a risk that float might overflow, it seems odd to cast to float in order to assign to double. This caused an Alert via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17[snap] pull the `desktop-qt5` part inGravatar Michał Sawicz
snapcraft doesn't support remote parts any more, and there's no extension (the replacement for remote parts) for Qt yet. Signed-off-by: Michał Sawicz <michal.sawicz@canonical.com>
2019-03-17[snap] add missing `source:` stanzasGravatar Michał Sawicz
snapcfraft no longer defaults to `source: .` Signed-off-by: Michał Sawicz <michal.sawicz@canonical.com>
2019-03-17Bluetooth: don't free a resource created by newGravatar Dirk Hohndel
Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-17Core: fix missing argument to report_errorGravatar Dirk Hohndel
The format requires a string argument. Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16build-system: add script to build only libdivecomputerGravatar Dirk Hohndel
This is used on LGTM (and initially got lost when I merged those changes). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16Cleanup: deal with lgtm.com AlertsGravatar Dirk Hohndel
Small, obvious fixes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16build-system: add LGTM yaml fileGravatar Dirk Hohndel
This should allow LGTM.com to build the C/C++ code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16build-system: explicitly add libgit2 dependencies for LGTMGravatar Dirk Hohndel
For some reason on LGTM these two libraries aren't automatically added to the link line for Subsurface. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16build-system: try to find libdivecomputer on LGTMGravatar Dirk Hohndel
On LGTM we end up installing in /opt/out. Also, fix a silly error in the existing code - don't look for libraries in include directories. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-16JavaScript: remove needless variable assignmentsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-16mark JavaScript variables as localGravatar Rolf Eike Beer
Found by LGTM. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-16simplfy scriptsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-16TravisCI: there are only VM builds nowGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-15Map: create correct index in updateMapLocationCoordinates()Gravatar Berthold Stoeger
When updating the coordinates of a dive site, the MapLocationModel is updated. The code created a (col, row) index with col = 0. [The idea of course being col = x, row = y]. Alas, that's not how Qt works - its models want (row, col) indices. The code worked, because the only time when the dive site locations were updated was in dive site edit mode, when only one site is visible, i.e. there is only one row leading to the correct (0, 0) index. Fix this so that we can also change dive site positions if more than one site is displayed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-14Update CHANGELOG.md to show depth and temp stats featureGravatar Doug Junkins
Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-03-13Desktop: ensure cloud storage email address is all lower caseGravatar Dirk Hohndel
We already do that on mobile and I was certain we used to do this for desktop as well, but apparently that got lost somewhere... This should solve the problems we are seeing for people with mixed case email addresses. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-12Update to our latest libdivecomputerGravatar Dirk Hohndel
- ignore empty pressure samples from OSTC - skip empty Oceanic logbook entries - update Ratio parsing - Shearwater: fix (again) per-cell ppO2 reporting Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-12Display statistics by depth and temperature in Yearly statisticsGravatar Doug Junkins
Create a label for each line added for the depth and temperature statistics buckets Add line to statistics widget for each bucket to be displayed Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-03-12Add backend support for statistics by depth and temperatureGravatar Doug Junkins
Added stats_t structures to summarize dive statistics by depth and by temperature. Process each dive to add the dive stats to the proper depth and temperature bucket. Buckets are defined using constants STATS_MAX_DEPTH, STATS_DEPTH_BUCKET, STATS_MAX_TEMP, and STATS_TEMP_BUCKET which are defined in statistics.h Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-03-09CMake: get rid of QT_EXTRA_LIBRARIESGravatar Rolf Eike Beer
This can be easily derived from QT_EXTRA_COMPONENTS. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-09remove obsolete workaround for libdivecomputer includes of libusbGravatar Rolf Eike Beer
This has been fixed in revision b1d434f0ea9a2958613da9bed32ff3ff3318065e there. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05Android: factor out duplicate version string searchGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: just tell CMake to not find HTTP_ParserGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05simplify sed hacking of Qt CMake filesGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: simplify check if library was foundGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: simplify writing qt.conf on WindowsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: tell the Intel compiler to use the correct C/C++ standardsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: do not expand variables in if-expressionsGravatar Rolf Eike Beer
CMake will do the expansion internally itself. Not doing it here is not only less code, it also makes sure one does not accidentially get a double expansion. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: simplify checking if policy can be setGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05Import: fix infinite loopGravatar Berthold Stoeger
Owing to a variable reuse in a nested loop, importing dive logs with new trips could lead to an infinite loop. Use a fresh index "j". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-05User manual: Text for Filter ToolGravatar willemferguson
The description of the Filter tool is brought up to date. One image is replaced elsewhere in the manual to reflect the new Subsurface window top bar that indicates number of dives. In total, 4 images added and text for user-manual updated. The location of the filter text in the usermanual has been changed. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-03-05Add support to compile from source on a Raspberry PiGravatar Doug Junkins
Update CMakeLists.txt to test if the CMAKE_SYSTEM_PROCESSOR variable is either armv6l or armv7l. If so, add libGLESv2 to the list of libraries to be linked to support openGL on embedded systems. Update INSTALL file to list the packages needed to be installed on Raspian Stretch or Ubuntu Mate to successfully compile subsurface from source. Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-02-28Filter panel: add suit and notes search fieldsGravatar Willem Ferguson
All the field in the Notes Panel of the main window are now supported. This needs some testing especially for the Notes field that may contain markup. It appears ok to me for single term searches. One would like to think about the default search option for the Notes. There is a vertical spacer in the Filter panel that I moved downwards and whose function I am not quite sure of. [Dirk Hohndel: small adjustments] Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-02-28Cleanup: remove DownloadFromDCThread::tripTableGravatar Berthold Stoeger
Since ff9506b21bbb9910256841dcb577bcb2e19047e8 the downloaders don't add dives to a new trip and therefore the tripTable field of DownloadFromDCThread became pointless. Remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: remove outdated comment in libdivecomputer.hGravatar Berthold Stoeger
The comment was mentioning a "progressbar_t", which doesn't exist anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: remove dc_user_device_t::preexistingGravatar Berthold Stoeger
This field appears to be unused for a long time. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: remove dc_user_device_t::tripGravatar Berthold Stoeger
Since ff9506b21bbb9910256841dcb577bcb2e19047e8 the downloaders don't add dives to a new trip and therefore the trip field of dc_user_device_t became pointless. Remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Uemis: remove trip deletion on dive deletionGravatar Berthold Stoeger
Since ff9506b21bbb9910256841dcb577bcb2e19047e8 the downloaders don't add dives to a new trip, but the import code does. Remove the code in the Uemis downloader that would remove a dive from the trip. The code has been broken recently anyway (instead of testing for trip, it tested for the notrip flag, which make no sense whatsoever). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Append the dive mode as a tag that is seen by the filter tool.Gravatar willemferguson
This allows one to filter dives by divemode, e.g. by typing "CCR" or "Open circuit" in the tags textbox of the filter tool. Quite useful if one dives using more than one dive mode. For the purpose of the filter tool only the dive mode attribute is added to the list of tags for the specific dive being considered. The tag list for the same dive (in the XML dive log) is not affected in any way. Provide for translation in alternative languages (Response to bstoeger's suggestion). Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-02-28Update appdata screenshotsGravatar Alexander Wilms
Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2019-02-28Cleanup: put all function declarations in file.h in extern "C"Gravatar Berthold Stoeger
Some of the functions declarations were not in 'extern "C"', despite being C functions. This worked only because they weren't called from C++. Nevertheless, it seems like a dangerous proposition to have the same function declared once as C and once as C++. Therefore, always put them in extern "C" (if compiling in C++ mode, evidently). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: make dt_dive_parser() local to datatrak.cGravatar Berthold Stoeger
The function is only used in this translation unit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: remove deletion of webservice dive sitesGravatar Berthold Stoeger
In the XML and git savers, unchanged webservice-dive sites were deleted. Since the webservice is not functional anymore, remove this code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: move get_divesite_idx() to divesite.cGravatar Berthold Stoeger
This function was defined in divelist.c, whereas it's better located in divesite.c. Move it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-28Cleanup: make dive_set_geodata_from_picture() local to dive.cGravatar Berthold Stoeger
The function dive_set_geodata_from_picture() is only used in dive.c. Make it local to that translation unit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>