In the 'Download from dive computer' dialogue, make it possible to
select the source directory for the import.
Signed-off-by: Michael Keller <github@ike.ch>
Currently editing of planned dives that have been merged with actual
(logged) dives only works if the 'Planned dive' divecomputer is the
first divecomputer, and this divecomputer is selected when clicking
'Edit planned dive'. In other cases the profile of the first
divecomputer is overlaid with the profile of the planned dive, and the
first divecomputer's profile is overwritten when saving the dive plan.
Fix this problem.
Triggered by @SeppoTakalo's comment (https://github.com/subsurface/subsurface/issues/1913#issuecomment-2075562119): Users don't like that planned dives show up as their own entries in the dive list, so being able to merge them with the actual dive after it has been executed is a good feature - but this wasn't working well until now.
Signed-off-by: Michael Keller <github@ike.ch>
Do a few things:
- add a build for Debian trixie (as discussed in #4182);
- add a build for Ubuntu 24.04;
- rename the build definitions to match the build names;
- update the artifact uploads to use a non-deprecated version of the
action, and name the artifact appropriately;
- remove a stale workflow file.
Signed-off-by: Michael Keller <github@ike.ch>
Add auto-sizing to the extra info table - resize the columns so that all
rows are shown in full whenever the data is updated.
Signed-off-by: Michael Keller <github@ike.ch>
Convert some C-style strings in uemis-downloader.cpp to std::string.
This has the side effect of fixing builds on Debian Trixie, which
currently fail with the (rather silly) error:
/build/subsurface-beta-202405060411/core/uemis-downloader.cpp: In function 'char* build_ans_path(const char*, int)':
/build/subsurface-beta-202405060411/core/uemis-downloader.cpp:290:32: error: '%s' directive output between 0 and 12 bytes may cause result to exceed 'INT_MAX' [-Werror=format-truncation=]
290 | snprintf(buf, len, "%s/%s", path, name);
| ^~
......
529 | ans_path = build_filename(intermediate, fl);
| ~~
cc1plus: some warnings being treated as errors
Signed-off-by: Richard Fuchs <dfx@dfx.at>
Add instructions for using Qt 5.15.13 on MacOS, which seems to have
better support for Apple silicon.`
Provided-by: jme <32236882+notrege@users.noreply.github.com>
Signed-off-by: Michael Keller <github@ike.ch>
Update the version of Qt that is used in the CICD build for MacOS to
5.15.13. This version is showing promise for building binaries that work
on Apple silicon.
Signed-off-by: Michael Keller <github@ike.ch>
Fix a bug causing the 'Download from dive computer' dialogue to hang
when the user attempts to cancel the dialogue after successfully
downloading one or more dives.
Fixes#4176.
Signed-off-by: Michael Keller <github@ike.ch>
Add a script for building the Android APK in the docker container.
Also make some improvements to the Windows build scripts, and update the
documentation for both builds.
Signed-off-by: Michael Keller <mikeller@042.ch>
ae299d5e66 introduced a format-
string bug by splitting a format-string in two and splitting
the arguments at the wrong place.
The compiler doesn't warn in this case, because the format-
string is passed through translate(...).
This should have crashed, but for some reason didn't, at least
on Linux.
Fix the arguments.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Add logging of the libdivecomputer return code for errors. Also, switch
logging of errors in the background thread to callback based logging to
make it visible.
Signed-off-by: Michael Keller <github@ike.ch>
Fix the filters for planned (i.e. has at least one dive plan attached)
and logged (i.e. has at least one dive computer log attached) dives.
Also refactor the respective functions for improved readability.
Signed-off-by: Michael Keller <github@ike.ch>
Do some housekeeping and cleanup on the build scripts for Windows:
- remove Windows 32bit builds as support for this has been removed from
the mxe container;
- fix some warnings in the smtk2ssrf installer configuration;
- sanitise the output colour of the smtk2ssrf build script;
- add a docker based build script for the Windows installers;
- remove outdated and deprecated documentation and scripts.
Signed-off-by: Michael Keller <mikeller@042.ch>
Remove preferences "Dive Download" window. Delete all dive computers no longer needed now that they can be deleted on the import window.
Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
Remove preferences "Dive Download" window. Delete all dive computers no longer needed now that they can be deleted on the import window.
Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
Remove preferences "Dive Download" window. Delete all dive computers no longer needed now that they can be deleted on the import window.
Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
Remove preferences "Dive Download" window. Delete all dive computers no longer needed now that they can be dleted on the import window.
Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
Remove preferences "Dive Download" window. Delete all dive computers no longer needed now that they can be dleted on the import window.
Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
Fix some findings in a Coverity scan in `core/planner.cpp` and
`core/profile.cpp`, that were reported as new after the changes
in #4126 (likely because of the rename from .c to .cpp).
Results: https://scan4.scan.coverity.com/#/project-view/60459/13160
Signed-off-by: Michael Keller <mikeller@042.ch>
Allows us to remove the strndup.h header. This code will be
even more simple, once core is fully converted away from C-strings.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Code such as `report_info("msg: %s", i)` may crash if `i` is
not a string type. To avoid such problems make format-warnings
hard compile errors.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The old code was leaking memory. Use std::unique_ptr<> for
ownership management.
This is still very primitive and divetags are kept during
application lifetime. There should probably be some form
of reference counting. And the taglist should not be global,
but attached to the divelog.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The only case left is in android.cpp, though that is only compiled
when compiling the full desktop app on Android. I.e. never. So
don't bother for now.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Remove those that are commented out, since this part of the code
will not be ported to QtQuick. So why bother?
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Let's use std::string in the core. Notably, I'd like to make
the numerous main() functions mostly independent of Qt. Some
things will have to remain, such as argument parsing, of course.
This changes the API: instead of returning an error code and
taking a pointer to the actual return-value, return an
std::optional<std::string>> that is set if the function succeeds.
Returning an empty string in the error case might be simpler,
but oh well...
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Use the C++-version of membuffer.
This fixes two memory leaks: report_info() on every(!) invocation
and report_error() before the error callback is set.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In C++ files, replace MIN and MAX by std::min and std::max,
respectively. There are still a few C files using these
macros. Convert them in due course.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The code was crashing if it couldn't reach the cloud, because then
info.repo is NULL. Skip the test if that happens.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>