When computing the variations in a background thread, the
code has to work on a copy of the dive plan and the deco
state. Instead of passing a copy via a unique_ptr<>, simply
use value semantics when calling computeVariations().
This does an unnecessary copy of the deco state, when
computeVariations is not run in the background, but so what.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In 8704a8b the code in cloneDiveplan() was replaced by a simple
assignment statement.
Alas, the original code was more complex: it copied only up
to a certain point (it stopped at automatically generated
steps).
The new behavior made the calculations of variations fail,
because a call to plan() adds deco stops.
Therefore, copy the plan _before_ calling plan().
Fixes#4368
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
A dive without events could lead to json with extra closing brackets that
prevents browsers from rendering the dive log.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix a bug in the edit divesite country command preventing the
country of the divesite from ever being saved.
Fixes#4357.
Signed-off-by: Michael Keller <github@ike.ch>
Previously, the subtitle generation was hardcoded, making it unsuitable
if you didn't want all of the displayed values. This has been replaced
by a format string that is configurable in the settings, using predefined
tags that are replaced with the values. The default value for this has
been set to (mostly) match the currently generated subtitle string. This
also provides a good starting point for users that want to modify the string.
Signed-off-by: Victor Arvidsson <victarv@gmail.com>
When using the current version of Subsurface-mobile, you cannot scroll
the dive details (i.e. you cannot see the bottom of the dive
information, depending on the size of your screen), nor can you scroll
the notes editor.
I'm not sure how I didn't stumble across this earlier, but a git bisect
appears to pinpoint commit a39f0e2891 ("Mobile: Fix QML Warnings.")
which is quite old.
Partially reverting this seems sufficient to get scrolling for the dive
details and dive notes edit working again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Build in by default if libraw is found, but make it optional for builds
were it's not needed, like smtk2ssrf or subsurface-downloader.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Add scanning and updates of dependencies with Dependabot where this is
possible.
While this isn't currently available for the majority of our code that
is in C / C++, there are some things 'around the edges' where we can
offload some of the dependency management:
- GitHub actions
- docker images
- the gradle build for android
Signed-off-by: Michael Keller <github@ike.ch>
In certain situations git merge-base would report errors if the branch
you are working in is older than the latest CICD builds. This simply
hides those pointless errors.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Especially when adding new optional dependencies, you might want to have
neither REQUIRED nor QUIET there - this way we can see in the CICD where the
library is found and tested against.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I have not idea if this is enough to make parsing of raw files
work for the Ubuntu/Debian package.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The distinguished photographer shoots raw images. There is a
comprehensive library that can extract metadata and thumbnails
from these images. Let's use it if available.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Fixes build failing on Debian Buster (gcc 8.3.0) with:
/build/subsurface-beta-202409160411/./core/units.h: In function 'duration_t operator""_sec(long long unsigned int)':
/build/subsurface-beta-202409160411/./core/units.h:149:48: error: could not convert '{((int32_t)sec)}' from '<brace-enclosed initializer list>' to 'duration_t'
return { .seconds = static_cast<int32_t>(sec) };
Signed-off-by: Richard Fuchs <dfx@dfx.at>