Age | Commit message (Collapse) | Author |
|
Replacement was only introduced in Qt 5.14
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
In a total abundance of caution, make sure we don't exit the constructor
leaving fields uninitialized.
Fixes CID 351437
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
While technically the initial value of this variable makes no difference as
it is set when the first dive is displayed, technically Coverity is correct.
Fixes CID 353273
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Fixes CID #353274
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Here the replacement has been around for a very long time.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This seems silly. I don't like that warning and would rather disable the warning.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Newer versions of Qt deprecate using QTime as a timer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Qt5.11 introduced the suggested replacement QFontMetrics::horizontalAdvance().
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The last SIGNAL/SLOT cannot be converted due to a limitation in the
new connect() syntax, it does not "understand" default parameters.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Replace SIGNAL/SLOT in favor of new connect()
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Replace SIGNAL() with QOverload<double>::of() to allow
new connect syntax.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Convert the last convert() statements, that can be
converted just by changing the syntax.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Replace syntax for connect of QShortcut.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Change connect() to new syntax for QDataTime.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Replace SIGNAL/SLOT with QOverload.
Signed-off-by: jan Iversen <jan@casacondor.com>
|
|
Change connect for QAction::triggered(bool) to new syntax.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
Change connect for QSpinBox::valueChange(int) to new syntax.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
Change connect for QAbstractButton::clickedto new syntax.
Change connect for QDialogButtonBox::accepted/rejected to new syntax.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
No need to connect ui.display_variations to the
same signal/slot twice.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
Change connect for QAbstractButton::toogled to new syntax.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
correct SLOT was sec_bottomsac(double), which
is not reported as an error.
correct to set_bottomsac(double)
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
correct SLOT was set_min_swich_duration()(int), which
is not reported as an error.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
correct name mistake in connect()
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
Adjust connect() to use plannerShared, avoiding parameter convert
problem.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
QSignalMapper gives a warning that it is depreciated, and the
doc. states that using a lambda function is more efficient.
Replace use of QSignalMapper.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
QSignalMapper had a parameter convert problem, when mapping to
set_deco_mode in plannerShared.
Use lambda function in connect to avoid parameter convert problem.
Signed-off-by: Jan Iversen <jan@casacondor.com>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
There were two cases that were handled incorrectly:
- if the user hasn't entered a salinity, obviously there shouldn't be a warning
- if this is a manually entered dive, there is no salinity downloaded from a
dive computer, so equally, no warning
Suggested-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We need to show this whenever the value in the dive (which could have been
entered by the user some other time) doesn't correspond to the value in the DC.
This, btw, will point out to the user if different DCs have different values.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We were royally confused when we didn't know the salinity value (e.g., if the
dive computer didn't provide that information). We somehow treated this as the
same as wanting to use the salinity information in the dive computer. Which
makes no sense.
While cleaning this up, this also adds the textual representations of the water
types as a string list that corresponds to the enum values that we use - this
way it's easier to stay consistent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
I'm rather upset that I never noticed this in a review. That's just not how you
print numbers.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Added code for string translation.
Added code to improve UI on Windows.
Added some comments to make the code more understandable.
Enable salinity combobox for manually entered dives
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Both XML and git storage are added.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The user may modify the salinity by selecting a water type from the combobox.
The new datum does not replace the existing salinity value but is stored in a
separate variable within the dive structure. If the dc-based salinity is
overwritten, there is an exclamation mark next to the modified salinity value
to indicate that the salinity has been overwritten. The dc-derived salinity can
always be recovered by selecting the "use dc" option in the combobox.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Create a checkbox in the Preferences: General screen that enables or disables
editing of the salinity data. This preference is saved with all the other
preferences.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Commit dbb504 tried to prevent an uninitialized dc pointer
from being dereferenced. But I screwed up the logic always
setting the event pointer to NULL. This fixes this error.
Reported-by: willemferguson@zoology.up.ac.za
Signed-off-by: Robert C. Helling <helling@atdotde.de>
|
|
When changing METERS <-> FEET, the text change automatically
between "m/min" and "ft/min".
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This allows to update plannermodel etc. and thus avoiding a restart when
changing units for length.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
When using the string setters, the original signal should still be emitted.
Change to call original setter in string setter.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
When changing between METRICS <-> IMPERIAL, all type signals are emitted.
This may cause double sending of some signals, but all signals will be emitted
at least once.
Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
When switching between imperial/metric it is important to change the single
measurements as well (e.g. METER <-> FEET).
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
All unit functions have a string version and a normal version, except
unit_system.
Make a non string version of unit_system.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Do not use a.set_b(value); it works, but it introduces yet another way of using
the QML/C++ interface, furthermore the function might not be called set_b in
some future, which is the reason the function is define in Q_PROPERTY
Use a.b = value, that respects Q_PROPERTY, and is slightly more performant,
most importantly it's like all the other settings so noone starts wondering why
this is special.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Set the text of ascent/descent rates.
This shows the correct speed units when the user switches between metric and imperial.
Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This reverts commit d0e52140e586e4f9537738177d54400a855b7d2b.
TestGitStorage should work again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
As much as I hate having passwords exposed through the source code,
since GitHub wisely prevents reading secrets in pull requests, there
isn't really a sane way to have this use confidential credentials.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
While this appears to work fine when tested individually, when running
as part of the GitHub actions it causes random failures. This needs to
be rethought.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|