Commit graph

19112 commits

Author SHA1 Message Date
Dirk Hohndel
da4668da40 macOS: fix broken .pc file for libmtp
This has bugged me forever. The existing file creates a warning on every single
compiler invocation. I really need to figure out if I can get this fixed
upstream. But while I'm at it, I submitted it here to make it easier to spot
warnings in the build output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 18:09:33 -08:00
Dirk Hohndel
e92d19ac4f macOS: warn about harmless but annoying errors on M1 Macs
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
f0e4f78b5e Qt6: more QtLocation dependent parts in the CMakeLists.txt
These didn't really cause errors, but they were simply wrong to have there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
aaebb69ddb Qt6: more CMakeLists.txt cleanup
We used yet another version dependent variable. This one is even weirder as it is
an undocumented one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
75fca8c090 Qt6: fully define dive structure
With Qt the forward declaration fails as the export to QML for the statistics requires
the MOC code to be able to determine the sizeof(struct dive).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
2af3da96a7 Qt6: small API changes
A member function had a minute name change.

The SceneGraphBackend is now set via a string argument, not a magic constant.
Thankfully that appears to be backwards compatible.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
da44db1a7e Qt6: add include files to keep QVectorIterator working
The QVectorIterator is only available in Qt6 when you explicitly add the
include files.

Suggested-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
7034d8bd54 Qt6: if we want the QString argument we need the TextChanged slot
I'm surprised this worked correctly in Qt5.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
5654b3fd2e Qt6: move connection into C++ source
This no longer compiles when defined in the .ui file. But functionally this
should be the same and it should work on Qt5 and Qt6.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
4f08d643b9 Qt6: add required QFile header
This worked without that include in Qt5, but having it there doesn't hurt,
either, so instead of yet another conditional compile, let's just include it
everywhere.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
5a023c953b Qt6: the help button is now opt in instead of opt out
This seems much more reasonable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
214cd63836 Qt6: add missing includes
This class is only available via Qt5 compatibility and for that we need the
explicit include.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
cabc33a689 Qt6: deal with changed QtConcurrent::run API
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:47 -08:00
Dirk Hohndel
e5f62bcd62 Qt6: adjust for changed argument types
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:46 -08:00
Dirk Hohndel
7574d8c04a Qt6: deal with changes to window and layout geometry APIs
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:46 -08:00
Dirk Hohndel
a9777f2980 Qt6: update to newer APIs for QDateTime
Fortunately, these were already available in Qt5.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:46 -08:00
Dirk Hohndel
55992bc975 Qt6: Bluetooth API changes
Use the explicit QBluetoothUuid instead of just QUuid and deal with new
constants and signal names.
At least with Qt6 we no longer need the ugly QOverload hack.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:46 -08:00
Dirk Hohndel
04b26d31c8 Qt6: deal with changes from QStringRef to QStringView
QStringRef is gone in Qt6 and mostly replaced by QStringView.  The one major
difference is that direct comparisons with string literals are no longer
possible.

Thanks to Thiago Macieira for helping me avoid more conditional compilation
here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 17:03:46 -08:00
Dirk Hohndel
14362c2f55 Qt6: don't build MapWidget
Since Qt6 doesn't include QtLocation anymore, we can't build MapWidget.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 09:00:40 -08:00
Dirk Hohndel
caf06f9ae7 cleanup: fix incorrect QFuture return value
I'm a abit confused why that didn't cause an error with Qt5.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 09:00:35 -08:00
Dirk Hohndel
fd38204b81 cleanup: don't add QKeySequence values
These should be handled as logical OR operations as they are bits.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 09:00:30 -08:00
Dirk Hohndel
3f3da0cf75 cleanup: remove duplicate connections in .ui files
These no longer compile with Qt6 - but they are already duplicated in C++ code,
anyway. So we can simply remove them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:29 -08:00
Dirk Hohndel
82d52b28f8 cleanup: remove unused argument and private member
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:29 -08:00
Dirk Hohndel
baa0e99285 build-system: update cmake to allow Qt5 and Qt6
Qt6 builds of course still fail, but now they are at least possible.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:29 -08:00
Dirk Hohndel
82c6843092 build-system: small cleanups for the CMakeLists.txt
Simply removing outdated things that will be in the way.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:29 -08:00
Dirk Hohndel
e6996ce366 build-system: Qt6 so far is missing Qt Location
So don't try to find the private headers and don't try to build the googlemaps
map plugin.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:16 -08:00
Dirk Hohndel
5cbee7710d build-system: take Qt6 into account
We should find qmake - but in case there's only a qmake-qt6 binary,
try to use that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:16 -08:00
Dirk Hohndel
fe7fd65f74 build-system: correctly build OpenSSL on ARM Macs
The OpenSSL configure script requires us to pass in the correct build spec.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:16 -08:00
Dirk Hohndel
b753eba40b build-system: update to current OpenSSL version
This is required to compile it on ARM64 Macs (and of course also is
the right thing to do overall).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:58:12 -08:00
Dirk Hohndel
6a3618395f build-system: update libusb version
If we are building our own version of libusb, let's build a current one
(because current libmtp relies on that).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:57:54 -08:00
Dirk Hohndel
2480431b65 cleanup: use already defined constant
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:51:57 -08:00
Dirk Hohndel
5e7a121c1f macOS: remove unused Info.plist
This was confusing - the file in packaging macos hasn't been used since we
switched to building with cmake something like seven years ago.
Also add missing keys to the actual Info.plist skeleton.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-02-10 08:51:57 -08:00
Jef Driesen
3a77d15eef Add support for the new OSTC hardware
In the latest OSTC hardware, the Telit/Stollman bluetooth module has
been replaced with a u-Blox Nina B2 bluetooth module. The BLE
communication protocol remains roughly the same, except for a few minor
differences:

 - New UUIDs for services and characteristics
 - Only one common characteristic for Rx and Tx
 - Credit based flow control is optional
 - Credit value of 255 corresponds to a disconnect

[Dirk Hohndel: small edit to a comment]

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-31 12:28:32 -08:00
Miika Turkia
f8c794e11c DM5 import: Add dive mode support (OC and CCR)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2022-01-31 09:35:21 -08:00
Dirk Hohndel
f1740358a7 mobile: update version to 3.4.3
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-27 09:23:25 -08:00
Dirk Hohndel
5929b0786d Update README and ReleaseNotes for 5.0.6
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-27 09:21:14 -08:00
Dirk Hohndel
8bfc0ba27b Pull latest translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-27 09:11:58 -08:00
Berthold Stoeger
e8698d615b profile: call plotProfile() with correct parameters in draw()
The signature of draw() was changed to include "keepPlotData"
as an optimization.

The caller in draw() was not changed and now the plot data
is not recalculated, which means no plot data at all in
prints and exports.

The various boolean parameters should be replaced by flags.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-20 15:45:51 +01:00
Dirk Hohndel
50bf8705bc Sync translation strings with Transifex
The updates to the copyright year plus new strings introduced or moved
recently.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-17 14:24:41 -08:00
Dirk Hohndel
a4438c2d07 update copyright year...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-17 14:18:59 -08:00
Dirk Hohndel
542ed04a90 buildsystem: update translation script
Running this on a different system I found a few problems...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-17 14:18:59 -08:00
Berthold Stoeger
1af4032dad planner: properly keep track of cylinder count in model
In a40b40a the cylinder-hiding functionality was changed,
which made it necessary to keep track of the number of
cylinders. Ironically, that code was removed previously,
as it was redundant. The count was not readded to the
functions called by the planner, making editing of cylinders
in the planner impossible.

I wonder more and more if the models for planner and the
equipment tab should be changed. They are too different.

Fixes #3375

Reported-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-17 13:08:46 -08:00
Berthold Stoeger
ab830fcfd7 profile: fix tankbar
The logic has just been completely broken when implementing
zooming.

Fixes #3376

Reported-by: Anton Lundin glance@acc.umu.se

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-17 13:05:38 -08:00
Dirk Hohndel
b56eacbaec add two small libdivecomputer bugfixes
- Restore the original standard gravity factor for Uwatec/Scubapro dive computers
- Garmin: Fix gas change event parsing

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-10 13:42:13 -08:00
Dirk Hohndel
f6a1340a29 buildsystem: remove Ubuntu Groovy build
This GitHub Action started failing. Groovy was EOL'ed six months ago and
downloads from the Ubuntu servers of Groovy components are no longer
supported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-04 19:50:05 -08:00
Dirk Hohndel
10d39e1b98 Android: build updates
Builds were failing because gradle tried to download libraries from
bintray. JCenter is shutting down in a few weeks.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-04 19:50:05 -08:00
Berthold Stoeger
db0f8ba045 statistics: add sort mode on mobile UI
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-04 11:14:24 -08:00
Berthold Stoeger
1e5191e33e statistics: add a sort mode for categorical bar charts
This was a user request: Sort bar charts by height of the bars.
Obviously, this can only work for categorical charts, not for
histograms.

The UI is a break from the old concept: the sorting is chosen
based on the chart, whereas for the rest of the features, the
viable charts are presented based on the binning, etc.

I found it confusing to have the possible charts be selected
based on sorting. I.e. if a non-bin sort mode is selected,
the histogram charts disappear. On the flip side, this would
be more consistent. We can change it later.

For value-based bar charts, there are three sort modes: by
bin, by count (i.e. number of dives in that bar) and by
value (i.e. length of the bar). This hopefully satisfies all
needs.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-04 11:14:24 -08:00
Berthold Stoeger
f76752ee03 cleanup: fix typos in comments in statistics code
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2022-01-04 11:14:24 -08:00
Dirk Hohndel
4fdbb116ef tests: fix integer constants
In TestUnitConversion we used casts instead of the more common suffix
designations to indicate the type of those integer constants.
Worse, in commit efab955d85 ("cleanup: make feet_to_mm signed") the
return type of feet_to_mm() changed, but the value it is compared to
wasn't adjusted in the test which caused some builds with more
aggressive compiler flags to fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-01-04 19:48:35 +01:00