But only functions that operate only on gases. Functions concerning
cylinders or dives remain in dive.c or are moved to equipment.c
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
These functions were spread out over dive.c and divelist.c.
Move them into their own file to make all this a bit less monolithic.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Make dive.h a bit slimmer. It's only a drop in the bucket - but at
least when modifying tag functions not the *whole* application is
rebuilt anymore.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The application state was encoded in a QByteArray. Thus, there was
no compile-time checking. Typos would lead to silent failures.
Turn the application state into an enum. Use the enum-class construct,
so that the values don't polute the global namespace. Moreover,
this makes them strongly typed, i.e. they don't auto-convert to
integers.
A disadvantage is that the enums now have to be cast to int
explicitly when used to index an array.
Replace two hash-maps in MainWindow to arrays of fixed sizes.
Move the application-state details into their own files.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In the future, we will need DiveListNotifier.cpp in mobile builds.
Therefore, add it to the qmake project file for iOS.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This really is mostly for my scripting and how I build the official packages.
But there isn't much harm having it in the repo. And it makes my life easier.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should fix the current Travis build failures for Android.
It is odd how we have ANDROID_PLATFORM and ANDROID_PLATFORMS,
buf for now all I care about is that the Travis build completes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This fix makes no difference from usage of this script in Travis
context, as every build starts from a clean VM, but the very few
developers that build for Android locally, and that want to use the new
style docker container builds as well, things are broken.
libdivecomputer has build artifacts in its source tree (and that source
tree is shared between local and docker run). So it happens that
libdivecomputer is configured locally, and afterwards fails to build
in docker build as its already configured, but not for the docker
image its now running in.
The fix is simple. Always reconfigure libdivecomputer when using this
script.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
So we don't need the pre-built binaries anymore, and we don't need the
travis_wait hack anymore for potentially slow downloads as that is all
installed in the container already.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This had to be embedded in the build process (or better, solved for
real).
Using Cmake, Clang, NDK 18b, Qt 5.12 beta 4, some Subsurface code does
not compile. At this point in time, its fully unclear to me why we see the
error as it is.
Thing fail deep down in Qt and NDK headers on #include <cmath>. Error like
"::signbit is not in the global namespace". The most logic reason is an
improper order in which include paths are constructed in the build process.
Any attempt to find the real reason failed. Even very similar command lines
from a qmake build that succeed fail with a cmake style build.
The very very dirty hack is commenting out some lines in NDK 18b:
"./android-ndk-r18b/sources/cxx-stl/llvm-libc++/include/cmath
Comment lines 313-325, and all build, links and runs with no errors
related to this known at this point.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
make sure that all lib code is compiled with -fPIC as things will not
link due to error "requires unsupported dynamic reloc R_ARM_REL32" (for
arm build).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
On very clean builds not using the wrapper script, the compile of libzip
simply fails because it depend on openssl include files. Simply swap them
around.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Mysteriously, openssl does not compile with clang with a
sha256-armv4.S:2638:2: error: invalid instruction, did you mean: adr?
The easiest way out is compiling without no_asm. This obviously lowers
the bandwidth on the SSL link (as the asm code is there for performance
reasons), but it has no visible performance loss in my tests.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
With a preparation done in the 4 commits before, now add the arm64 and
use clang instead of gcc as compiler infrastructure.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Very annoyingly, openssl is re-build and downloaded numerous times
when doing partial builds. Reason for this, is that the original checked
out git repo is moved away, and build in source (as openssl does ...).
So, this simple change leaves the checked out repo in place, and
copies the tree to build in.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
A subtle one. When compiling for arm64, libzip is the only package we
use in mobile that installs its product in lib64. There is no reason for
this given the way our build process is. So, simply force the library to
reside in lib, independent if we are building arm or arm64
architectures.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Simple cleanup. Do not hard code armv7 as we have QT_ARCH. This
allows, in the future, for arm64 builds as well.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Hard coding desired ANDROID_PLATFORM on multiple places is simply bad.
Fix this. Further, set the variables to a much newer state.
CAVEAT: this will likely break android build, so be careful on
bisecting. All fixed in next, related commits.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Make sure all required Android SDK components are explicitly installed
before starting the actual build.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
With commit 0d8fc7ef970e of qt-android-cmake, the buildtools version
is automatically detected. So do not try to pass it any more, as
this breaks the build.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
And use that to have our Travis build still work with the existing MXE
build container as well as the even older, pre-compiled MXE binaries
used in the windows build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
That's the minimum platform that we have used for a while now,
corresponding to Android 4.1 and newer (i.e., quite ancient).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add libftdi1 in comments in MXE build script.
[Dirk Hohndel: and mention that it is possible to build without it]
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
mdbver.h is created on the fly by configure script and placed in our
$BUILDDIR/include, while the compiler search for it in
$SOURCEDIR/include. This could probably be achieved fine-tunning
configure script but ... well, it works.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
This still doesn't seem to work as expected and needs more testing.
Also, it can be turned off via command line argument
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 53341c037d.
The commit isn't wrong, but it breaks Travis and I can't seem to get the
newer MXE build to work on Travis. So while I figure out how to work
around THAT, let's just revert this and come back to it once Travis is
ready.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This currently requires the wip/win branch of qtconnectivity. Eventually
this should be merged into upstream Qt.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We are not OpenGL heavy so this saves battery life.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Build systems that run from tar balls and not git fail to create valid
.appdata.xml This solves the problem for tar balls that we create for
OBS via our own make-package script. It doesn't solve the problem for
Arch or Gentoo who I believe take our tar files created via git archive.
One way to fix this would be to change the process by which I create
those tar files, I guess.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
update testgitstorage.cpp to use qPrefProxy and qPrefCloudStorage
remove core/prefs-macros.h since it is unused
Signed-off-by: Jan Iversen <jani@apache.org>