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>
We had a pattern where doubles were converted to long with
lrint() and then down-cast to a narrower int type.
Because this is unwieldy, introduce a function encapsulating
this.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Now that we have defined addition and subtraction on unit
classes, let's use them in a few examples.
Yes, some of these are a bit pointless, because they are
of the kind
a.mbar - b.mbar => (a-b).mbar
However, these probably should be further simplified
by storing the result in a unit type.
This commit is mostly a proof-of-concept.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
When adding / subtracting unit objects it is completely
irrelevant with respect to which unit the data is stored.
Why should the user know this?
Therefore add addition / subtraction functions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The goal here is to add general addition and scalar multiplication
functions to the unit types.
Thereto, we need a CRTP
(https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)
base class.
However, this breaks compound initialization, so we have to use
named initializers:
weight_t { 2000 } -> weight_t { .grams = 2000 }
The good thing is that this is exactly how these classes were
supposed to be used: make the unit explicit!
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Declaring everything at the begin of the function is a K&R
disease, that makes code very hard to follow.
Remove the last assignment to gaschange_after since that is
a noop (found by Coverity).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
It wants us to test for end of container when finding elements.
That is of course reasonable in "production" code, but a bit
pointless in the testing code. Oh well.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>