Commit graph

19788 commits

Author SHA1 Message Date
Michael Keller
84e8937787 Documentation: Restructure the 'CONTRIBUTING.md' Page.
Restructure 'CONTRIBUTING.md' to show the different ways to contribute
more clearly, and to add a specific section about joining the
contributors' community.

[skip ci]

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-23 17:29:23 -08:00
Robert C. Helling
e794efaba6 Allow for more O2 sensors
The Divesoft Liberty has four O2 sensors. So far, we had a hard coded
limit of three sensors and crashed with a failed assert when we
encoutered more than three. This allows for up to
MAX_O2_SENSORS which is currently 6. The voting logic is adapted
accordingly: We sort the values and we keep deleting the values that
differ more than 20% by value from the closest. This follows what
Shearwater implements on their computers.

In some of the import/export functions the value is still hard
coded to 6 thanks to explicit field names.

Signed-off-by: Robert C. Helling <helling@lmu.de>
2024-01-23 19:24:53 +01:00
Richard Fuchs
e00e1bb9f7 Downloader: fix segfault
With no files given and no config present, the downloader segfaults due
to empty `files`. Print a message instead.

Signed-off-by: Richard Fuchs <dfx@dfx.at>
2024-01-23 10:08:21 -08:00
Michael Keller
05ef933ff7 CICD: Move Windows Build to New Container.
Move the GitHub Action that builds the Windows artefacts to use the new
subsurface/mxe-build:3.1.0 container.
Also rename references to the old container in scripts and
documantation.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-24 00:05:26 +13:00
Michael Keller
89506d9782 Update libdivecomputer to latest on Subsurface-DS9.
Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-23 11:10:02 +13:00
Dirk Hohndel
bd1763680e Ubuntu: remove obsolete dependency
It appears that this dependency is no longer provided (as of Mantis), but also
no longer needed (as a build without it appears to completed). Let's see if
that fixes our Mantis build issue.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-21 13:37:33 -08:00
Michael Keller
c1bfded4a7 CICD: Add GitHub Action to build the Windows (MXE) Builder Docker Image.
Add a GitHub action that builds the docker image to run builds for the
Windows (MXE) version of Subsurface.
Also update the MXE image Dockerfile to the latest version of MXE, and
add a patch to use a current version of mdbtools.
Configure GitHub actions that do not build docker images to not trigger
on changes to the contents of `scripts/docker/`.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-20 21:30:12 -08:00
Simeon
eea75fc1c4 Removed section about GPS recording from user-manual
The GPS tracker functionality was removed from Subsurface-Mobile a while ago. This commit changes the documentation to reflect the current state of the Subsurface-Mobile application.

Reported-by: Simeon Geiger
Signed-off-by: Simeon Geiger <simeon.geiger@gmail.com>
2024-01-20 09:38:22 -08:00
Simeon
24c1cb5b09 Update to use AUTOMOC
When trying to build the integrated user manual,
the linker stopped with the error message "undefined reference to vtable ...".
This is a subtle bug, connected to the qt preprocessor MOC.
Adding "set(CMAKE_AUTOMOC ON)" to the desktop-widgets/CMakeLists.txt fixed the problem.

For more information, see:
https://github.com/bincrafters/community/issues/466
https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html

Signed-off-by: Simeon Geiger <simeon.geiger@gmail.com>
2024-01-20 09:38:22 -08:00
Jason Bramwell
9e2f7571f9 Removing reference to qt5-default for Raspberry Pi
Signed-off-by: Jason Bramwell <jb2cool@gmail.com>
2024-01-20 08:04:38 -08:00
Michael Keller
6dd5922d15 CICD: Improve the Android Docker Image Build.
Introduce proper reuse of intermediary stages in the multi-stage build.

Signed-off-by: Michael Keller <github@ike.ch>
2024-01-19 16:14:35 -08:00
Berthold Stoeger
bef21ff5eb code consistency: replace qMin/qMax by std::min/std::max
We use the latter pretty consistently, so let's remove the few
left instances of the former.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-17 14:23:19 -08:00
Berthold Stoeger
429230ced1 saving: fix resource leak found by coverity
fp_get_data() returns a copy of a string that must be freed.
Fix this in save-git.c. The analogous function in save-xml.c
has already been fixed. However, change the code to be more
idiomatic: since we own the pointer, make it "char *" instead
of "const char *". Then we don't have to cast on free().

Ultimately, we really should change string manipulation code
to C++.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-17 14:23:19 -08:00
Berthold Stoeger
91e4fb4769 cleanup: more Coverity silencing
Mostly irrelevant std::move() stuff of copy-on-write Qt objects,
a few real bugs, a timestamp_t downconversion and some codingsyle
adaptation.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-17 14:23:19 -08:00
Berthold Stoeger
35ff6eea35 desktop: block signals when setting combobox-indexes
On the InformationTab a signal is emitted when programatically
setting the index of the dive mode combobox which in turn then
edits the dive.

Usually not a problem, because the editing code realizes that
the value is not changed. It is however a problem when multiple
dives are selected.

Therefore, block the signals when setting the index. Same for
the other comboboxes on the same page.

Fixes #3960.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-16 14:52:36 -08:00
Berthold Stoeger
bdade9e499 planner: initialize subobject of PlannerWidgets in correct order
The DivePlannerWidget was initialized before the planner models.
However, it attaches these (non existing) models to the comboboxes.
That can't work. Initialize in correct order.

Fixes #4014

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-16 14:22:16 -08:00
Berthold Stoeger
13b894a756 gases: fill result of isobaric_counterdiffusion() on early return
If prefs.show_icd is false, this function does nothing, but
the output parameter is checked by the calling function
DiveEventItem::setupToolTipString().

Let's reset the strucvture to 0.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-16 14:22:16 -08:00
Michael Keller
4bab38b8df CICD: Make it Possible to Run CICD Builds in a Fork.
Use the project name to resolve the target repository to create the release in.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-15 19:53:54 -08:00
Dirk Hohndel
2db8b51eed build-system: missed one release note mention without .md
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-15 17:42:03 -08:00
Michael Keller
6c8afabedf CICD: Improve the Release Note Generation
Use .md suffix to get the files displayed as markdown.
Ignore generated artefacts.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-15 17:32:57 -08:00
Berthold Stoeger
249b82f6dc pictures: make delta-time a 64-bit int
When adjusting picture times, the offset in seconds is stored in a
32-bit int. Make it a 64-bit int. Sounds crazy, because why would
you want to move the pictures by more than 70 years?

Well, suppose it is the year 2039, for some strange reason your
camera was set to unix epoch and you want to adjust the pictures
to current time.

Ok - that's a far-fetched scenario. The real reason is that this
hopefully silences a Coverity warning and avoids integer casting.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-15 15:11:36 -08:00
Berthold Stoeger
8a3a0edb83 cleanup: silence std::move()-related Coverity warnings
Unfortunately Coverity doesn't understand that most Qt data
structures are copy-on-write. It's a mis-feature of Qt, but
it is the way it is. Thus, passing by value is not an issue.

Out of ca. 25 warnings only two were legit. Let's silence
the others by either std::move()ing or passing by reference,
as would be idiomatic C++, which Qt is not.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-15 15:11:36 -08:00
Alexander Wilms
ac0d44bccf Update AppStream metainfo
Add more information to metainfo file and update it to the AppStream 1.0
standard

* Added screenshot caption, more URLs and a <launchable/> tag
* Replaced <developer_name/> with <developer/>

Now the file conforms to the AppStream 1.0 specification

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2024-01-14 15:59:29 -08:00
Alexander Wilms
c92ebd1f3b Change AppStream metainfo file extension and path
The legacy /usr/share/appdata/*.appdata.xml path has been superseded by
/usr/share/metainfo/*.metainfo.xml

https://freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2024-01-14 15:59:29 -08:00
Berthold Stoeger
798e426926 cleanup: fix enum in profile.c
There are two enums related to the type of dive.
There is the global

enum divemode_t {OC, CCR, PSCR, FREEDIVE, NUM_DIVEMODE,
                 UNDEF_COMP_TYPE};

and the anonymous

enum {AIR, NITROX, TRIMIX, FREEDIVING} dive_type;

in struct plot_info.

In profile.c FREEDIVE (of divemode_t) is assigned to dive_type.
This only works because by chance(?) FREEDIVE and FREEDIVING are
the fourth element of each enum.

Fix this. C truly is a bad language when it comes to types
(very weak) and namespaces (non existing).

Contains whitespace fix.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-01-13 09:14:32 -08:00
Dirk Hohndel
1b7daeee22 CICD: improve release notice
This should make it clearer what the various files are. I wish we could sort by
file extension.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-12 14:17:39 -08:00
transifex-integration[bot]
4aafc304a1 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
fb567fe00b Removing subsurface_source.ts in de_DE
99% of minimum 100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
8173ebaf36 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
6d120cde59 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
bbd810367a Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
55c751e219 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
f4186dc076 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
e81a2b480f Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
21b5a58eda Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
ff82441946 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
2450080725 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
bdf40f02f3 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
8c60657ec8 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
d6d65fa673 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
c6f3a5bd47 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
transifex-integration[bot]
ef47d03478 Translate subsurface_source.ts in de_DE
100% translated source file: 'subsurface_source.ts'
on 'de_DE'.
2024-01-12 13:14:29 -08:00
Salvador Cuñat
5bae033f07 [scripts - docker] Fix build instructions
Current instruction to get the installer out the container will fail
with bash complaining about cp being a binary. Then would fail too
because subsurface-installer.exe doesn't exist any more.

Proposed instruction should work.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2024-01-10 21:10:31 -08:00
Dirk Hohndel
7d918aeef1 CICD: gracefully handle non merge pushes
Also improve the spacing of the merge text a tiny bit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:24:36 -08:00
Dirk Hohndel
9bf79c460a CICD: don't increment build number for pull requests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:24:01 -08:00
Dirk Hohndel
eb4f3121bc CICD: clean up the noisy scripts
This all is way too verbose now that it apparently is working.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 19:14:25 -08:00
Dirk Hohndel
2f464c114d CICD: attempt to read file content in GH yaml
It is very strange that in some yaml files the $(<release-version) construct
works just fine, but in others it evaluates to an empty string, even though the
file is there an has the correct content.

Attempting to get more debugging info and also use a different expression to
extract the information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 17:13:53 -08:00
Dirk Hohndel
8fb504941e the path confusion is vert annoying
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 16:58:08 -08:00
Dirk Hohndel
c2acdafcdf build-system: fix the APK filename for release upload
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 16:58:08 -08:00
Michael Keller
506a96f1f6 CICD: Fix GitHub Actions.
Fix the setting of environment variables in the android build.
Also fix a typo in the AppImage build.

Signed-off-by: Michael Keller <mikeller@042.ch>
2024-01-10 13:44:06 -08:00