aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-20Travis: don't fail Linux build when .zsync is missingGravatar Dirk Hohndel
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>
2018-05-20build-system: libgit2 depends on libcurl and libssh2Gravatar jan Iversen
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>
2018-05-20build-system: corrected -build-deps problemGravatar jan Iversen
Missed a "cd $SRC" so when building with -build-deps the script broke Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-20core: marked unused parameterGravatar jan Iversen
Add Q_UNUSED to unused parameter Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19Mac: don't try to copy libraries we got from HomebrewGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19build-system: change the logic when to build whatGravatar Dirk Hohndel
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>
2018-05-19Travis: add secondary Linux build targetGravatar Dirk Hohndel
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>
2018-05-19build-system: don't always build qtserialbluetooth.cppGravatar Dirk Hohndel
This should only be built if we have BT support enabled. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19build-system: updated OpenSSL and libusb for AndroidGravatar Dirk Hohndel
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>
2018-05-19Android: set target API level to 26Gravatar Dirk Hohndel
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>
2018-05-19Mac: support running Subsurface-mobileGravatar Dirk Hohndel
Copy the required QML modules into the app bundle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19iOS, supress warnings.Gravatar jan Iversen
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>
2018-05-19iOS, remove linker warnings (version mismatch).Gravatar jan Iversen
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>
2018-05-19Profile: minor coding style issues concerning axis-ticksGravatar Berthold Stoeger
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>
2018-05-19Profile: Fix leak in animationGravatar Berthold Stoeger
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>
2018-05-18build-system: added get-dep-lib to android/build.shGravatar jan Iversen
Integrated get-dep-lib in android/build.sh Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-18build-system: update get-dep-lib with Android fix.Gravatar jan Iversen
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>
2018-05-18mobile: add "Copy log to clipboard" buttonGravatar jan Iversen
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>
2018-05-18core: solved PictureEntry defined as class and struct.Gravatar jan Iversen
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>
2018-05-18core: removed clang warnings from dive.hGravatar jan Iversen
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>
2018-05-18core: removed clang warnings from units.hGravatar jan Iversen
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>
2018-05-18Plannernotes: '\0'-terminate ICD-bufferGravatar Berthold Stoeger
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>
2018-05-17core: corrected wrong default emailGravatar jan Iversen
Typo in email. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17build-system: changed build.sh to use get-dep-libGravatar jan Iversen
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>
2018-05-17build-system: enhanced get-dep-lib with "single"Gravatar jan Iversen
Added the posibility to fetch a single third lib. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17build-system: made get-dep-lib faster and more robust.Gravatar jan Iversen
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>
2018-05-17iOS: added get-dep-lib to build.shGravatar jan Iversen
Removed all 3rd party download/clone, and used common get-dep-lib instead Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17android-build: Build on ubuntu bionic on travisGravatar Anton Lundin
This way we ensure we can build on the latest LTS, and not just a old lts. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Remove old libgit2 special handlingGravatar Anton Lundin
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>
2018-05-17android-build: Stop installing ant, we're using gradeGravatar Anton Lundin
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>
2018-05-17android-build: Simplify and correctGravatar Anton Lundin
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>
2018-05-17android-build: Build googlemaps plugin same way as othersGravatar Anton Lundin
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>
2018-05-17android-build: Use sed -i instead of home rolled variantGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Use subsurface source variableGravatar Anton Lundin
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>
2018-05-17Bugfix: Saving divemode to xml and to gitGravatar Willem Ferguson
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>
2018-05-17Update user manual for CCR and pSCR dive logsGravatar Willem Ferguson
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>
2018-05-17iOS, update Info.plist.in noteGravatar jan Iversen
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>
2018-05-17mobile: fix wrong coords when saving new locationGravatar Murillo Bernardes
This one place it was not being multiplied by 1000000, as expected for degrees_t. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-17Dive pictures: Don't plot pictures twice when changing current diveGravatar Berthold Stoeger
In MainWindow::current_dive_changed() first plotDive() is called, which replots all the pictures by calling plotPictures(). This is pointess, because it plots the pictures of the previous dive. Then, updateDiveInfo() is called, which resets the dive pictures and automatically replots them. Thus, switching between dives both with hundreds of pictures is way slower than necessary. Switching the plotDive() and updateDiveInfo() calls doesn't work. The reason is not 100% clear, but it doesn't make sense to plot pictures of the new dive as long as the profile still shows the old dive anyway. As a quick-fix, add a flag to plotDive(), which tells the function to clear the pictures list instead of redrawing it. Ultimately, plotDive() should probably be split in two functions. One for the callers who update the pictures themselves and one for the others. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-17Dive pictures: Fix crash on picture deleteGravatar Berthold Stoeger
The recent simplification of the close button code introduced a crash: Deletion of pictures caused an invalid memory access, because the CloseButtonItem was deleted with the parent DivePicture item. For some (not fully understood!) reason, a reference to this button was stored in the depths of Qt. Empirically, it was found out that removing the first line of the pair QGraphicsItem::mousePressEvent(event); emit clicked(); fixed the crash. It seemed therefore prudent to remove the whole questionable signal/slot mechanism and directly call the removePicture() function of the parent. Thus, the intermediate DiveButtonItem class became unnecessary and was removed, leading to a shallower class hierarchy. Unfortunately, CloseButtonItem must still be derived from QObject owing to the Q_PROPERTY machinery, which is in turn needed for animation. To make this compile on mobile, the conditional compilation of removePicture() (#ifndef SUBSURFACE_MOBILE) was removed. After all, if DivePixmapItem is used, there are pictures, so removePicture() should be functional. Conditional compilation should concern the whole class, not only this function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-16Dive pictures: don't attempt reading the same image twiceGravatar Berthold Stoeger
If loading of an image failed, we tried to see if we find a canonical filename in the cache. There's no point in rereading the picture if the canonical and the original filename are the same. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-16Dive pictures: Don't enter infinity loop on invalid picturesGravatar Berthold Stoeger
The recently committed refactoring of the dive-picture code introduced a severe bug: If an image couldn't be loaded from disk owing to an invalid file, the filename was interpreted as an url and loaded in the background. This succeeded, because the file actually exists. After download, the file would then still be invalid and the whole thing restarted, leading to an infinity loop. To fix this, do two things: 1) Don't even try to download local files. 2) If interpreting a downloaded file fails, don't try the downloading business again. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-14Mention bailout in ChangelogGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Planner: Add combo box for dive mode selectionGravatar Robert C. Helling
I am not really sure what I am doing here but I copied code from the gas selection. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Rename enum dive_comp_type to divemode_tGravatar Robert C. Helling
...as the usuage is not anymore about a computer but a momentary dive mode. Rename the end indicator as well. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Planner: Make use divemode for consumed gas calculationGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Planner: Honor last manual divemodeGravatar Robert C. Helling
Start the decompression schedule in the divemode of the last manual section. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Fix divemode detection in plannerGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-14Fix a bug where the bailout events are not saved correctly.Gravatar Willem Ferguson
The bailout events in the planner are not saved correctly. My oversight. This commits corrects the bug Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
2018-05-14Adapt the dive planner to do bailoutGravatar Willem Ferguson
Ensure that calls to add_segment() all have a appropriate divemode for that part of the dive plan. In the case of plan(), the existing variable 'divemode' was directly passed to add_segment. For the functions interpolate_transition() and trial_ascent(), the divemode was obtained by including it in the parameter list of the function and divemode supplied by the calling function. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>