In the old code a combination of removeRows()/insertRows() was used
to signal a model reset.
Replace this by a single, modelReset signal. This saves a call to
plotPictures() and will allow us to be smarter in the future,
when removing pictures.
Reset-model and remove-items are semantically different.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Read libdivecomputer.log file and append to clipboard
Remark, subsurface_open is not available in iOS so using
QFile instead.
Signed-off-by: Jan Iversen <jani@apache.org>
Users need a simple way to report download problems. Asking them
to go into settings, activate logging, and repeat the download
is too much.
libdivecomputer.log will always be generated, but overwritten, with every
download, so the latest log is ready.
The download is very slow due to BT, so there are no impact of having the log
active, neither in terms of size (a concern on small mobiles) or write time.
Signed-off-by: Jan Iversen <jani@apache.org>
Having a split between ios and ios/Subsurface-mobile is just confusing
and without a practical reason
Move files from ios/Subsurface-mobile to ios and update .gitignore
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When downloading with bluetooth, changing connection did not work.
The new selection was not passed to the download thread.
Fixes#1274
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems that sometimes the AppImage tooling gets confused and doesn't
create a .zsync file. That should cause Travis to fail.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When building with -builddeps on a "virgin" mac, configure
of libgit2 could not find libcurl and libssh2
moved building of libcurl and libssh2 in front of libgit2
Signed-off-by: Jan Iversen <jani@apache.org>
Specifically, don't conflate needing libgit2 with the Mac -builddep
argument, and when determining if we need to build libgit2 on Linux,
make sure to also check for a version that we may have built in a
previous run of the build.sh script.
This commit is much easier to understand with
git show -w
as it contains quite a bit of simple indentation change.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The goal is to reduce the overall wall clock time of our test builds.
This secondary Linux target uses the no-sudo container setup with a Qt
5.10.1 backport and tests the build without BT support as well as the
mobile build (but not the full desktop build and doesn't create an
AppImage as the pre-built Qt5.10.1 is missing QtWebKit).
In exchange we remove the no-bt and mobile build from the existing linux
target.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These are the latest, supported versions for OpenSSL. I have not tested
if Android would work with OpenSSL 1.1.
The lower versio for libzip is still required as libzip 1.2.0 doesn't
compile for Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't affect the minimum we support, but a target level of at
least 26 will be required starting in August in order to be able to
upload to the Google app store. This is equivalent to targeting Android
8.0. Google plans to bump this target API level every year.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Changed .pro file to supress warnings
clang does not allow all of the issued warnings to be
supressed with -Wno-foo, so instead doing -w
Signed-off-by: Jan Iversen <jani@apache.org>
The Qt libraries are compiled as iOS 10.0, we link
as iOS 8.0, this is a problem waiting to happen. First
time we use a Qt function that uses a iOS 10.0 specific
function the app will crash.
Bumping iOS minimum version from 8.0 to 10.0
Removing the 76x icon, which are not valid from 10.0 and forward
Signed-off-by: Jan Iversen <jani@apache.org>
1) Fix the English of a comment.
2) Remove a number of int-to-double compares:
Make "steps" an integer variable (the number of steps).
Rename the old double "steps" variable to "stepsInRange". This gives
a non-integer number of steps and is necessary to calculate the
correct step size
3) Replace a "x = x/y" by a "x /= y" construct.
4) Remove an unnecessary if clause.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
If animDelete() was called with prefs.animation_speed == 0, the
object would not be marked for deletion, as opposed to calling
with prefs.animation_speed != 0. This would leak the objects.
Therefore delete the objects if called with prefs.animation_speed == 0.
The caller doesn't keep a reference to the objects. Therefore,
a plain delete is fine, as opposed to a deleteLater().
While touching this function, use the function-pointer version
of connect().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Android build uses wget and not curl.
Currently android uses older versions of some libs, due to that
a new switch is added temporary.
Old version tested for curl and if not found set the different versions,
however this is not a stable method for obvious reasons
Signed-off-by: Jan Iversen <jani@apache.org>
on iOS it is practically impossible to copy the App log
to e.g. a mail! in iOS 11 the log file is stored within
the subsurface container and you first need to copy (actually
using the clipboard) out from there to the "normal" document
shared space, before it can be used.
At least iOS users (and I believe Android users) are not really
used to work with files, so the process is not easy to document
in an understandable way.
The alternative is to provide a button, which simply puts the
log on the general clipboard, allowing it to be pasted in a
multitud of applications.
Signed-off-by: Jan Iversen <jani@apache.org>
PictureEntry was defined as class in imagedownloader.h and
as struct in divepicturemodel.h
A class has a vptr in front, so the difference is real at least
for the clang compiler.
Signed-off-by: Jan Iversen <jani@apache.org>
interpolate, rel_mbar_to_depth, gas_mod and
gas_mnd returns int but uses
a function that returns long, causing clang to
warn about conversion loss due to implicit conversion.
Adding a cast, shows that it is correct.
Signed-off-by: Jan Iversen <jani@apache.org>
lbs_to_grams and to_feet returns int but uses
a function that returns long, causing clang to
warn about conversion loss due to implicit conversion.
Adding a cast, shows that it is correct.
Signed-off-by: Jan Iversen <jani@apache.org>
When creating the ICD-notes the membuffer was not '\0'-terminated,
leading to output of stale data.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
get-dep-lib has been integrated into build.sh, which
ensures different platforms use the same versions etc.
travis is a frequent user of build.sh, but on a mac it runs
without -build-deps and instead used cached versions of the
library. This setup is alo supported
Signed-off-by: Jan Iversen <jani@apache.org>
Secured git work only happens when cloning a dir.
There is a version for hidapi, but scripts/build.sh
(which are the source for that part of depend) has a
line:
# there is no good tag, so just build master
and then continues with master, so it should be good
enough for get-dep-lib as well.
Signed-off-by: Jan Iversen <jani@apache.org>
And replace it with something that works on a modern cmake.
The upside with using the right linker, we get the symbols resolved
correctly so we don't need to regex the code.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Since about a year ago qt-android-cmake shifted to using gradle instead
of ant, and the android sdk's stopped supporting ant to.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
This simplifies the code and uses correct quoting for variables.
This also fixes the sha1-stampfile handling so that we don't build
libdivecomputer every time.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
This reworks the googlemaps build to be more like the other builds, with
the same pattern and way of detecting what we need to do, and when we
need to rebuild it.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
We already have a variable pointing to the source dir for subsurface, so
use it.
This way we can build out of tree, in any directory.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
There is a space character missing in the xml generated by the
present code. Insert a space character.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Update the text pertaining to CCR and pSCR dive logs to include the
changes with respect to:
1) Colour of CCR setpoint graph and pSCR OC-equivalen pO2 graph.
2) Display of bailout information on dive logs.
3) Preferences tab allowing setting pertaining to the above.
This is the first of a few PRs with updates to the user manual
relating to CCR and pSCR dives.
Correct some typos.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Info.plist is no longer generated by qmake but by build.sh,
and it is more interesting to highlight the fact that it is
open software
Signed-off-by: Jan Iversen <jani@apache.org>