The extra trailing 'dot' broke the cmake build on Rawhide.
This also tries to give more consistent Summary and Description text for
the Subsurface and Subsurface-test repos on copr.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even on platforms that don't have the new git version, yet.
And using the convoluted way to create an environment variable that should
point to our checked out tree in the GitHub Action. The more obvious ways
have resulted in failed builds for obscure reasons.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Seac importer was getting samples based only on dive number,
which was causing samples from different computers but with the
same dive number to become interleaved.
To correct this, the SQL statement was updated to use the
dive_id to query for samples. The table schema uses dive_id
as a primary key, which will enforce uniqueness.
Additionally, deviceid is hashed from the the device_id string.
Reported-by: David Brebera <david.brebera@gmail.com>
Signed-off-by: Jim Wobser <james.wobser@gmail.com>
The calculation of the deco steps shown in the profile
infobox is somewhat independent of the planner. When
set to imperial units, the distance between deco stops
should be 10ft rather than 3m as 15m is only 49ft.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
The cylinder_with_sensor_sample() function only tests "do we have a mapping to
this cylinder for this sample". It also needs to test if there are any tank
pressure readings for that cylinder.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While I clearly recall that in the past the couple of cmake modules
that were installed when building the dependencies were found, in my
latest tests on macOS 12 with the latest cmake this seems to fail.
This seems like a cheap quick way to ensure that things behave as
expected.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It does seem a bit odd, but the arch command actually doesn't
return a reasonable architecture on macOS. So let's use the
uname -m command to get the right answer that makes this script
work both on an m1 and an Intel Mac.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Arguably every dive should at least have one cylinder, but an imported
dive from divelogs.de might end up without one. Sadly, that breaks
assumptions that we make in the cylinder remapping.
To work around it, force at least on cylinder to be assumed in the merge
code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As some Linux distros start to ship both Qt5 and Qt6, it actually makes more
sense to build only against Qt6 when the user explicitly asks for it. Having it
preferred over Qt5 seems completely wrong in hind sight.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
.. at least if the local repository exists and can be opened.
If the local repo cannot be directly opened, we will still try to sync
with the remote first, but this way the *common* git save situation is
that we save locally before we then try to sync with the remote.
That means that if we have network problems, the save will happen before
we possibly hang due to really really slow networking.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We had various random "free parts of the git info" left-overs from when
we passed down the git repo data ad-hoc. Get rid of it, and replace it
with just doing a 'cleanup_git_info()' that does the final cleanup of it
all.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
That function name was incomprehensible. What did it check? And what
did the return value mean?
So let's rename it to something that actually describes what it does,
and reverse the meaning of the return value while at it.
So now it's called 'remote_repo_uptodate()', and it returns true if the
remote repository branch has the same value as our 'saved_git_id'.
It's still a bit obscure, but at least within the context of the only
user, the code now makes _more_ sense than it used to:
if (remote_repo_uptodate(fileNamePrt.data(), &info)) {
appendTextToLog("Cloud sync shows local cache was current");
but maybe we could come up with even better semantics and naming, and
make it even clearer.
Requested-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We currently only have one single caller of update_local_repo(), and
instead of that caller checking whether the existing repo is a
directory, just make it open the git repository.
This avoids duplicate error handling and simplifies the code.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I couldn't make this to work as a single pass build, so we again do a dual pass
and manually assemble the dylib. This is then copied to a sane spot which
required another attempt to copy it in the CMakeLists.txt - which I added
comments to in order to make sense of the weirdness.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Because of the old connect syntax used the incorrect signal names weren't
caught at compile time. To switch to the new syntax we had to make two
functions pure virtual in the WebServices class - let's hope I got that right.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The create-dmg script changed repo name - let's support either version.
On newer Macs the SDKs are elsewhere - let's look there, too.
Let's be far more flexible when finding SDK versions.
Let's not assume that we are linking against QtWebKit (we're not with Qt6).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a flag to explicitly enable a build against maps, which is
only needed for Qt6 (as we always assume that Qt5 has maps installed).
It also includes a quick fix to fail gracefully if libmtp was already
patched.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There is an initial build of the C++ classes that seems to work, but the QML
integration is still missing. Still, progress is being made.
Unfortunately with Qt6 we can't forward declare the MapLocationModel class (one
of the operators needs to be able to determine the size of the class), so we
need to include the header file.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Making this simply depend on Qt5 or Qt6 was short-sighted as work on QtLocation
upstream continues. Instead break this out as its own option.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just like the rest of the git repo related information, this is already
included in the git_info struct.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We have this nasty habit of randomly passing down all the different
things that we use to look up the local and remote git repository, and
the information associated with it.
Start collecting the data into a 'struct git_info' instead, so that it
is easier to manage, and easier and more logical to just look up
different parts of the puzzle.
This is a fairly mechanical conversion, but has moved all the basic
information collection to the 'is_git_repository()' function. That
function no longer actually opens the repository (so the 'dry_run'
argument is gone, and instead a successful 'is_git_repository()' is
followed by 'opn_git_repository()' if you actually want the old
non-dry_run semantics.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It appears to send a first sample with a water temperature of 0 C. If the next
sample contains a more likely water temperature, overwrite the first one.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This suddenly started. A couple of build would fail because the git submodule
checkout fails because of directory ownership issues. Hopefully this will fix
it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
libdivecomputer tries to be super careful in what it tells us. It only offers a
density value if that is something that the dive computer explicitly supports,
otherwise it just offers back a flag. We need to then update the density value
ourselves.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- Genesis React Pro: fix serial number
- OSTC: use deco model instead of dive mode for deco model information
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The undo stack is only relevant to the dives that were loaded at the
time the command was executed. If a file is closed, by specifically
closing it or opening another file, then the undo commands will
reference dives that aren't available anymore. Clearing the undo stack
ensures that we don't crash or accidentally do some undefined
modifications to the currently open file.
Signed-off-by: Michael Andreen <michael@andreen.dev>
dc_number is a global variable indicating the currently displayed
dive on desktop. It makes no sense on mobile, since multiple
profiles can be active at the same time. Therefore, the profile
code should not access this global, but use the dc number that
is passed in.
This removes the last access.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
To import media files from the web, increas the size of the
dialog box and allow several URLs separated by newlines.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Way back in time, in HwOS 1.86 a CCR mode was added which automatically
switched between setpoints based on depth.
This entry was never added in our system to configure the dc, and caused
the issue seen in #3304
This adds the Auto SP mode, to the dropdown, thus fixing #3304.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
I forgot to clean up the CHANGELOG file for the previous release, and some of
the commits in this release were missing CHANGELOG entries.
This should make sense now.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I didn't pay attention and entered the wrong flavor of Portuguese as the
parent translation. The one for Portugal is complete and should be the
parent, back-filling the one for Brazil where needed.
Suggested-by: Christof Arnosti <charno@charno.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Tweak the Lat/Long coordinate parser to allow coordinates of the form:
12.1049° N, 68.2296° W
The coordinate parser works by tokenizing coordinates one at a time.
Consequently it is invoked twice on user input to get latitude and then
longitude. Normally, after parsing the first coordinate, intervening
characters such as , or ; and any whitespace would be discarded from the
input before parsing the second coordinate. Prior to this patch, if the
coordinate format was in degrees followed by a sign (N is a sign in this
example), the parser would skip the bit of code that fast forwards past
any intervening separators and whitespace (, in this example). This
resulted in coordinates of this form not being accepted, because the
second parse would start with , 68.2296° W and reject this as an invalid
coordinate.
To rectify this, the bit of code that fast forwards past separators and
whitespace has been broken out from the tokenization loop and performed
as a final step after a single coordinate has been completely parsed and
validated. Doing it this way makes it independent of the state of the
tokenizer, so that the fast-forward code will always execute once a
coordinate has been successfully parsed.
I've also centralized the list of allowed separators into its own static
string; this is necessary as part of the patch but should also make
allowing additional separator characters between coordinates trivial in
the future, if needed.
Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
Many language have country specific differences. We recognize different
flavors of English (US, UK (and South Africa)), German (Germany and
Switzerland), and Portuguese (Brazil and Portugal). For many other
flavors of the languages that we have translations for we have no
support and the way we hard-coded the fallbacks in the past was odd and
meant that in the cases where we do have two flavors, missing strings in
one weren't taken from the other (English as the default language being
the exception).
This tries to do a better job of recognizing some of those parent
languages and loading translators for them, first. Which means if we
then find a translator for the specific language (i.e., de_CH), strings
missing in that translation are next searched in the parent language
(de_DE), before finally providing the source language string (en_US).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>