aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-03-12planner.c: fix a couple of float -> int cast warningsGravatar Lubomir I. Ivanov
Use lrint() to fix both: 1) core\planner.c:902:23: warning: conversion to 'int' from 'doub le' may alter its value [-Wfloat-conversion] 2) core\planner.c:907:21: warning: conversion to 'int32_t' from ' double' may alter its value [-Wfloat-conversion] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-12templateedit.ui: give the layout for "Border width" unique nameGravatar Lubomir I. Ivanov
Warning introduced in e8c918622fb: desktop-widgets\templateedit.ui: Warning: The name 'horizontal Layout_3' (QHBoxLayout) is already in use, defaulting to 'horizontalLayout_31'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-12Only enable -Wmissing-field-initializers for ClangGravatar Lubomir I. Ivanov
The following pragma is Clang specific: It produces a warning: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] Only enable it for Clang by checking the __clang__ macro. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Update ReleaseNotesGravatar Dirk Hohndel
Just to make sure we keep track of what has changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Sync unit system to Subsurface-mobile (part 2)Gravatar Dirk Hohndel
Missed a spot. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Correct trash or trashforbidden icon and tooltip in cylinder tableGravatar Stefan Fuchs
Display the correct trash or trashforbidden icon and tooltip in the cylinder table. This should fit together with if it is really possible to remove a cylinder. Search for "same gas" based on used cylinders only. Otherwise one could remove a used cylinder because there is an unused cylinder with same gas. ToDo: In planner update trash icon on change of planner points. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Add units (m or ft) for MOD and MND in cylinder table in plannerGravatar Stefan Fuchs
We do display the unit for "Gas change at" today so we should also display it for MOD and MND. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Correctly sync unit system to Subsurface-mobileGravatar Dirk Hohndel
We were doing the right thing switching from metric to imperial, but in order to swtich back you had to restart. Now it works both ways. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Undo one lrint changeGravatar Dirk Hohndel
As here we actually do want the rounded floatingpoint value. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Silence warning about unused parameterGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Remove unused static functionsGravatar Dirk Hohndel
These became obsolete with commit e2bbd0ceecff ("Rewrite cylinder merging code from scratch"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Remove unused variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Merge branch 'master' of https://github.com/dje29/subsurfaceGravatar Dirk Hohndel
2017-03-11Fix build after mergesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11PO2 > pO₂Gravatar Martin Měřinský
2017-03-11O2 > O₂Gravatar Martin Měřinský
2017-03-11Dive No. > Dive #Gravatar Martin Měřinský
2017-03-11divespot > dive spotGravatar Martin Měřinský
2017-03-11divelog > dive logGravatar Martin Měřinský
2017-03-11divemode > dive modeGravatar Martin Měřinský
2017-03-11We use 'setpoint' in UI. Use it also for documentation and comments. No ↵Gravatar Martin Měřinský
semantic change.
2017-03-11Use abbreviations with dots.Gravatar Martin Měřinský
2017-03-11Use 'Temp.' for abbreviations.Gravatar Martin Měřinský
2017-03-11Time is not an abbreviation.Gravatar Martin Měřinský
2017-03-11Cyl > CylinderGravatar Martin Měřinský
2017-03-11unkn > unknownGravatar Martin Měřinský
2017-03-11SAC: %.*f%s/min versus SAC:%.*f %sGravatar Martin Měřinský
2017-03-11Add tooltip for add cylinder button in plannerGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Add missing dependencies for Windows run of testsGravatar Jeremie Guichard
Qt plugins and some other dependencies cannot be copied by CMake install targets. They need to be manually deployed to staging_tests directory too. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-11Fix error in install target for tests on WindowsGravatar Jeremie Guichard
The rule was working when called from the fake test used as preparation step in check target on Windows, but did not work for the normal install target. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-11Fix failures in TestPreferences for Windows runGravatar Jeremie Guichard
QSettings needs OrganizationName and ApplicationName to be set to work properly under Windows. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-11Change type of divedatepoint.depth to depth_tGravatar Robert C. Helling
... for consistency, while we are at it. There are still some internal depth variables which are ints somebody might take a go at those. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-11Make depth conversion work for negative depthsGravatar Robert C. Helling
This is needed in the altitude pressure conversion as there negative altitudes are possible (for diving in the netherlands or the Dead Sea). Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-11Minimum gas calculation: Ducumentation in user manual (EN)Gravatar Stefan Fuchs
Small paragraph in EN user manual added. Planner screen shots changed and renamed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Disable minimum gas calculation for recreational modeGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Minimum gas calculation - Calculations and UI parametersGravatar Stefan Fuchs
Add minimum gas calculation to planner output. Add the two UI parameters prefs.sacfactor and prefs.problemsolvingtime. Connect UI signals and slots for recalculation of diveplan. Disable minimum gas calculation if there was already a warning before. If minimum gas result is larger then cylinder start pressure give warning message instead of result. Add line break before pO2 warnings but only if warnings exist. Signed-off-by: Joachim Ritter <jritter@bitsenke.de> Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Don't erroneously mark the cylinder pressure red and set font italicGravatar Stefan Fuchs
In the cylinder table today the cylinder start and end pressure fields are marked red and the end pressure font is set to italic if cyl->end is 0. But sometimes with planned dives there is no cyl->end but only cyl->sample_end. This is taken into account now. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Fix cyclinder table issue "workingpressure" in plannerGravatar Stefan Fuchs
Fixes the issue that the cylinder table in the planner is messed up after changing the table header. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-09Fix potential double/float to int rounding errorsGravatar Jeremie Guichard
Not using lrint(f) when converting double/float to int creates rounding errors. This error was detected by TestParse::testParseDM4 failure on Windows. It was creating rounding inconsistencies on Linux too, see change in TestDiveDM4.xml. Enable -Wfloat-conversion for gcc version greater than 4.9.0 Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-08Change calls to rint into lrint avoiding conversion warningsGravatar Jeremie Guichard
Using gcc option "-Wfloat-conversion" is useful to catch potential conversion errors (where lrint should be used). rint returns double and still raises the same warning, this is why this change updates all rint calls to lrint. In few places, where input type is a float, corresponding lrinf is used. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-07For About UI window layout, use SetFixedSize.Gravatar Martin Měřinský
Window is resized according to its content. There is no need for user to resize this window.
2017-03-07In weights table 'weight' is redundant and no used for other types.Gravatar Martin Měřinský
2017-03-07Enable translate 'All' in yearly statistics.Gravatar Martin Měřinský
2017-03-07Enable bottom pO2 option also for recreational dives in plannerGravatar Stefan Fuchs
Bottom pO2 gas option in planner should be always enabled because also recreational dives can use nitrox and produce "high pO2" warnings. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-06Printing: support the "Border width" setting for templatesGravatar Lubomir I. Ivanov
Going to "Template -> Edit" now has a field to enter the border width (in pixels as only that makes sense in CSS as a flexible unit, TMK). This field modifies the template_options.borderwidth Grantlee property which is part of the bundled templates already and allows the users to modify the borders of tables. The C++ implementation was missing, while the HTML (template) implementation was already in place. Overlooked during GSoC. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-06fix: User survey UI.Gravatar Martin Měřinský
Enable window resize (Lay Out in a Grid). Center first label and it's text.
2017-03-05Update to the Hebrew translationGravatar Shachar Snapiri
Fixed new and old translations, typos and phrasing Signed-off-by: Shachar Snapiri <shachar@snapiri.net>
2017-03-05Don't clear plan when (re-) planningGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Initialize cylinder indexGravatar Dirk Hohndel
Otherwise it's possible for an uninitialized value to be used in addStop which can cause crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Get initial depth/duration correct when manually adding diveGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>