aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-03-29Show a bit of surface degassing in the plannerGravatar Robert C. Helling
to display the deco parameters at the surface, in particular tissue saturation and heat map. Suggeted-by: Matthias Heinrichs <info@heinrichsweikamp.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-03-27CMake: add headers to targetsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27CMake: use function instead of macroGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27ConfigureDiveComputer::saveXMLBackup(): factor out writing gas detailsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27print a reason when dup() failsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27avoid duplicate and inconsistent applying of QDir::separator()Gravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27slightly optimize ConnectionListModelGravatar Rolf Eike Beer
-avoid object copies -use some more bullet proof C++11 constructs -avoid using a QRegExp, simple string matches are faster Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27drop support for Qt 5.4 and beforeGravatar Rolf Eike Beer
The oldest version tested on TravisCI is Qt 5.5, which is also what is in Ubuntu 16.04. Drop all the older cruft, noone should use that anymore. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27Cleanup: unconstify string argument to add_to_string()Gravatar Berthold Stoeger
add_to_string() frees the original string that is passed in. This should therefore not be of "const char *" type, as the contents of the string *will* be modified (or more precisely: destroyed). Same for the congener smtk_concat_str(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-27Cleanup: provide printGPSCoords in C and C++ versionsGravatar Berthold Stoeger
printGPSCoords() returned a newly allocated C-style string. Most callers simply made a QString out of it and freed the C-style string. This is paradoxical, as printGPSCoords internally works with QStrings and converts them to C-style on return. Therefore, let printGPSCoords() return a QString and create a printGPSCoordsC() wrapper for the two C-callers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-24Cleanup: fix printGPSCoords signature and leaksGravatar Berthold Stoeger
The printGPSCoords() function returns a copied C-style string. Since the owndership is transferred to the caller, the correct return type is "char *" instead of "const char *". Thus a number of casts when calling free can be removed. Moreover a number of callers didn't free the string and thus were leaking memory. Fix them. Ultimately we might want two versions of the function: one for QString, one for C-style strings. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-22Ubuntu 18.10 LGTM buildGravatar Jonas Jensen
I'm about to update the build environment on lgtm.com from Ubuntu 18.04 to 18.10, and this breaks your project. It appears that [libgit2 now depends on libmbedtls](https://packages.ubuntu.com/cosmic/libgit2-dev), and it [didn't do this before](https://packages.ubuntu.com/bionic/libgit2-dev). By default, your project links statically with libgit2, but static linking requires specifying all dependencies of the library, and your builds doesn't specify libmbedtls. I'm working around the problem here by passing the `LIBGIT2_DYNAMIC` option to your CMake script, which makes libgit2 dynamically linked, and dynamically linked libraries don't need to have their transitive dependencies specified. I'm taking this opportunity to make a few more changes to `.lgtm.yml` to prevent problems in the future when we upgrade the build environment. 1. Pass `-DNO_DOCS=ON` to avoid building things we don't need. 2. Pass `DCMAKE_VERBOSE_MAKEFILE=ON` for ease of debugging build problems. 3. Remove the manual list of dependency packages and instead rely on LGTM's automatic dependency detection. The manual dependency list contained version numbers and was therefore not likely to keep working over time. The automatic dependency detection only works in the `configure` and `index` steps, so I moved some lines from `after_prepare` to `configure`. Signed-off-by: Jonas Jensen <jonas@semmle.com>
2019-03-21CMake: use builtin method to not use BZip2Gravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-21CMake: clean up hints for finding librariesGravatar Rolf Eike Beer
HINTS should be dynamically introspected, static entries should be in PATHS. There is also a platform dependent list of things where CMake always looks if not explicitely forbidden, so remove any entries that are usually in those default lists. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-21CMake: simplify code in HandleFindGit2Gravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-20Profile: ensure the correct settingsChanged() function is calledGravatar Dirk Hohndel
Found via LGTM. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-20Core: simplify ConnectionListModelGravatar Dirk Hohndel
The complicated setup with the AddressRole is unnecessary. All we want to be able to do is get the index of a specific text in the list. In hindsight I am puzzled why I implemented this in such a complex fashion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-20Remove partial support for QWebEngineGravatar Dirk Hohndel
Printing never worked, none of this was ever included in test builds. Also, now that there are official releases of QtWebKit again, this just doesn't seem worth carrying along anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-19Cleanup: make argument to YearStatisticsItem constructor a referenceGravatar Berthold Stoeger
The LGTM checker complained about passing large objects. Instead of passing pointers, keep the old semantics and pass a reference. This is more idiomatic C++. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-19Cleanup: pass const-reference to RulerItem2::setPlotInfo()Gravatar Berthold Stoeger
Instead of passing a pointer, pass a cons reference. This is more idiomatic and consistent with RulerNodeItem2::setPlotInfo(). Also make the reference passed to RulerNodeItem2::setPlotInfo() const, to make clear that the argument is copied. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-19CMake: call cmake_minimim_required() before project()Gravatar Rolf Eike Beer
Some policies can affect how project() works. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-19CMake: let CMake set the needed flags for C and C++ standardsGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-19Misc: replace some FIXME commentsGravatar Dirk Hohndel
All these aren't actually things that need fixing, they are observations about the code. Given that LGTM.com reports FIXME comments as Alerts, let's change the ones that aren't about things that need fixing to something more harmless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Profile: pass by reference rather than by value for large structGravatar Robert C. Helling
Addresses LGTM.com suggestion. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Desktop: fix another variable name conflictGravatar Robert C. Helling
Addresses LGTM.com issue. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Desktop: fix yet another variable name conflictGravatar Robert C. Helling
Addresses LGTM.com issue. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Core: let TTS calculation use correct ascent velocitiesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Core: change FIXME languageGravatar Robert C. Helling
Addresses LGTM.com issue. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Core: fix another variable name conflictGravatar Robert C. Helling
Addresses LGTM.com issue. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Core: remove variable name conflictGravatar Robert C. Helling
Addresses LGTM.com issue. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Cleanup: remove bit field demux in datatrak.cGravatar Berthold Stoeger
To test single bits, datatrak.c would transform bytes into malloc()ed char[8] buffers. Instead, simply introduce a function to test individual bits. This should make it distinctly easier for the compiler to optimize away. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-18Cleanup: unglobalize variables in datatrak.cGravatar Berthold Stoeger
It's a drop in the bucket, but let's remove some unnecessary global variables. With one exception these variables were only used in one function anyway. The other one can be passed as a parameter. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-18Cleanup: remove unused global variables from datatrak.cGravatar Berthold Stoeger
lector_bytes and lector_word were used nowhere. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-03-18build-system: LGTM: don't warn about short global namesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Travis: don't build all branchesGravatar Dirk Hohndel
Otherwise PRs from people who create branches in the main repo will always trigger two builds. The second entry should ensure that we do build releases. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-03-18Leak fix: make ostcFirmwareCheck a unique_ptrGravatar Berthold Stoeger
ostcFirmwareCheck in DownloadFromDCWidget was neither freed in the destructor, not freed if a new object was allocated. Simply make it a unique_ptr<> to do all the work for us. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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 variable name conflictGravatar Dirk Hohndel
Having a parameter representing a location with the same name as a global variable representing our locale is confusing. Found via LGTM.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>