The -O0 default is useless owing to extremely convoluted assembly.
Moreover, many warnings depending on data analysis are ineffective
with -O0.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
It just doesn't seem to make sense. Why would you do that.
Allowing this options makes things more complicated as we need to
test for that in various places.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The native Windows build does not use the MXE tools
and call such as `i686-w64-mingw32.shared-objcopy`
can fail.
Attempt to first find if the program exists using
`find_program()` and only then call it.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The objcopy calls to strip the debug symbols out of
subsurface.exe need to happen before the installer is
created (staged).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
I only ran into this a couple of times and can't figure out why it
picked the order in which it tried to build things - but hard coding the
dependency seems to have fixed it (then again, since I didn't always run
into this, I'm not sure).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 893ff019dbabf356a477da0bdf7d954123759018.
Thanks to the amazing support from Marco Martin the theming issue in
Kirigami master has been fixed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Different flavors of Linux put this in different subdirectories. Just
have cmake find the plugin for us.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With this change, when running Subsurface from the build directory, it
should find a googlemaps plugin that was installed into the
install_root.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is some very early and hacky code to be able to access BLE-enabled
dive computers that use the GATT protocol to send packets back and forth
(which seems to be pretty much all of them: a vendor-specific GATT
service with a write characteristic and a notification characteristic
for reading).
For testing only. But it does successfully let me download dives from
my EON Steel and my Scubapro G2.
NOTE! There are several very hacky pieces in here, including just
"knowing" that the write characteristic is the first one, and the
notification characteristic is second. The code should actually check
the properties rather than have those kinds of hardcoded assumptions.
It also checks "vendor specific" by looking at the UUID string
representation, and knowing that the standard ones start with zero.
Crazily, there doesn't seem to be any normal way to test for this,
although I guess that maybe the uuid.minimumSize() function could be
used.
There are other nasty corners. Don't complain, send me patches.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The *_VERSION_STRING variable has been deprecated in Qt since 5.1.0. Use
the non-deprecated variable instead (which is not a string).
Qt 5.9.0 has a bug in the deprecated variable. Since it's deprecated,
it's probably not going to be fixed until 5.9.1. See
https://bugreports.qt.io/browse/QTBUG-60936
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The used cmake toolkit for building the Android Subsurface-mobile app
(qt-android-cmake) recently moved away from compiling with Ant in favor
of Gradle. The most recent Android SDK will not support Ant any more.
This calls for the addition of the Android SDK BUILDTOOLS_REVISION define
to the cmake of Subsurface-mobile. Without this, the build will fail.
The value has to be set to an existing directory in
.../android-sdk/build-tools/
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1
Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type
Signed-off-by: Marco Martin <notmart@gmail.com>
Wfloat-conversion enabled for C++ part of the code
Fix warnings raised by the flag using lrint
Original issue reported on the mailing list:
The ascent/descent rates are sometimes not what is expected.
E.g. setting the ascent rate to 10m/min results in an actual
ascent rate of 9m/min.
This is due to truncating the ascent rate preference,
then effectively rounding up the time to reach each stop to 2s intervals.
The result being that setting the ascent rate to 10m/min
results in 20s to ascend 3m (9m/min), when it should be exactly 18s.
Reported-by: John Smith <noseygit@hotmail.com>
Reported-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Not using lrint(f) when converting double/float to int
creates rounding errors.
This error was detected by TestParse::testParseDM4 failure
on Windows. It was creating rounding inconsistencies
on Linux too, see change in TestDiveDM4.xml.
Enable -Wfloat-conversion for gcc version greater than 4.9.0
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Update tests with a (compile time) option SUBSURFACE_TEST_DATA,
pointing to test data base path. It is needed for cross compilation cases.
SUBSURFACE_TEST_DATA is set to SUBSURFACE_SOURCE by default,
or configurable via cmake option -DSUBSURFACE_TEST_DATA="...".
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
In order to get the translations right for Windows we now explicitly
pull in a lot more translation files - some of which don't exist in
earlier Qt versions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we manually track Kirigami we need to compile the desktopicon.cpp
file when not building on Android or iOS.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now this is only designed for Linux where current distros all should have
a new enough libgit2 (and our instructions tell people to install this with
system tools, so we should also use it).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems the CMake versions on Linux and Mac disagree about what might
be the correct way to use parenthesis in a mixed AND/OR conditional.
This may seem overkill, but it made both CMake versions happy.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This removes all references to WebKit if cmake option USE_WEBKIT is enabled.
For the user manual it changes it to WebEngine (seems to work for me).
Similar for the Facebook connection (minus a reference to a cookie jar).
This I could not test at the moment, as I wrote this on a train.
Printing does not work, it is a null operation at the moment. Currently,
large parts of of the printing code are commented out as there is no direct
way to access page elements in WebEngine. It seems this needs to be done
via Javascript (with a callback invoked). There is new functionality in
WebEngine to render a view to a PDF file but this needs more work (and
probably some thoughts towards page breaks).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
No idea when this got broken. Fix seems like a hack as that variable
should get set in the plugin CMakeLists.txt. But it seems to work, so
"whatever".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a simple cp2130 userspace driver. Its probably unusable in the
real world but its a great base to build upon.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>