aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-07-04Add build variables fileGravatar Joakim Bygdell
This adds a file that contains the variables used in the android-build-wrapper and build scripts. This gives a single location for setting which versions of Qt, NDK and SDK we use when building the mobile app on linux. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-04Latest translationsGravatar Dirk Hohndel
Because of the code cleanup in commit 57c01f7a66 ("Translations: unify gettextFromC::tr() and QObject::tr()") a lot of text has moved to new context. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03Update CHANGELOG.mdGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03Bump Subsurface-mobile versionGravatar Dirk Hohndel
Otherwise the Apple app store doesn't let me upload new test binaries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03iOS: find translations againGravatar Dirk Hohndel
commit ec0511e824 ("ios: concentrate build dirs") moved the translations around without updating the way they are accessed, causing our release 2.1.0 on iOS to not be localized. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03macOS: we don't need to bundle QtDBusGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03macOS: we no longer need libssh2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03Allow to split dives with more than one dive computerGravatar Robert C. Helling
Only the first computer is taken into account to find surface intervals. All further dive computers are split according to time. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-07-03CHANGELOG entryGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-07-03Profile context menu entry to split a diveGravatar Robert C. Helling
Allow the user to manually split a dive in two. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-07-03Include cylinder pressures upon force_fixup()Gravatar Robert C. Helling
Try to recompute cylinder start and end pressures from sample data. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-07-04Translations: unify gettextFromC::tr() and QObject::tr()Gravatar Berthold Stoeger
There were two catch-all classes for translations outside of class context. gettextFromC was used exclusively from C, but C++ used both, gettextFromC and QObject. Some of the string were even present in both. Therefore, unify to gettextFromC throughout the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04core: remove double definition of enum cloud_storage_statusGravatar jan Iversen
Remove cloud_storage_status from qmlprefs.h. usage to qPref:: enum cloud_storage_status is not used from C, but only from C++, and having the same structure defined multiple times is a maintenance challenge. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04core: add qPref.h_and qPrefprivate.hGravatar jan Iversen
add 2 header files and 1 cpp file (qPrefPrivate does not have an implementation) The rewrite/consoliadation of SettingsObjectWrapper, qmlmanager, qmlpref and planner needs a place to put common private parts (qPrefPrivate) and 1 common class (qPref). Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04core: sort CMakeLists.txtGravatar jan Iversen
sort .c and .cpp files in CMakeLists.txt The .c and .cpp files in CMakeLists.txt had no obvious sequence, sorting it at least gives one understandable sequence Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04core/profile: move PP_GRAPHS_ENABLED from pref.hGravatar jan Iversen
PP_GRAPHS_ENABLED is only used in profilewidget2.cpp make local to profilewidget.cpp Signed-off-by: Jan Iversen <jani@apache.org>core/profile: move PP_GRAPHS_ENABLED from pref.h
2018-07-04core: sort struct preferencesGravatar jan Iversen
sort prefs, making it possible to find variables add a few missing variables Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-03Codingstyle: fix typoGravatar Dirk Hohndel
Reported-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03build-system: tell Travis to wait longer for downloadsGravatar Dirk Hohndel
But simply ignore when building outside of Travis. Of course since we are building Android in a container, we need to first pass the environment variable to the container... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03build-system: add travis_wait shell functionsGravatar Dirk Hohndel
These come originally from https://github.com/travis-ci/travis-build and are available when running on Travis, but not when running inside a Docker container on Travis as we do in order to build for Android. The goal is to provide a quasi heart-beat on STDOUT during very long running commands - without this the wget to download Qt often times out, so that's where we are going to use this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-04Codingstyle: add comment on "auto".Gravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Update CHANGELOG.mdGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Manual: Adapt description of "find moved images" functionalityGravatar Berthold Stoeger
Adapt description and add example image. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Dive pictures: implement FindMovedImagesDialogGravatar Berthold Stoeger
Move the find-moved-images functions into a new translation unit and present the user with the identified matches before applying them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Dive pictures: remove hashesGravatar Berthold Stoeger
In the last commits, the canonical-to-local filename map was made independent from the image hashes and the location of moved images was based on filename not hashes. The hashes are now in principle unused (except for conversion of old-style local filename lookups). Therefore, remove the hashes in this commit. This makes addition of images distinctly faster. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Dive pictures: find moved pictures based on filenameGravatar Berthold Stoeger
Users might have edited their pictures. Therefore, instead of identifying pictures by the hash of the file-content, use the file path. The match between original and new filename is graded by a score. Currently, this is the number of path components that match, starting from the filename. Camparison is case-insensitive. After having identified the matching images, write the caches so that they are saved even if the user doesn't cleanly quit the application. Since the new code uses significantly less resources, it can be run in a single background thread. Thus, the multi-threading can be simplified. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-04Dive pictures: index local file name by canonical filnameGravatar Berthold Stoeger
The connection canonical filename to local filename was done via two maps: 1) canonical filename -> hash 2) hash -> local filename But the local filename was always queried from the canonical filename. Therefore, directly index the former with the latter. On startup, convert the old map to the new one. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-02Add CHANGELOG.md entryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03Dive pictures: remove unnecessary check for no divesGravatar Berthold Stoeger
This fixes a bug introduced in fbe1144eaf7e800a014c7a97b846835ba9f3bc7f: For an empty log, in DivePictureModel::updateDivePictures() beginResetModel() would be called without a corresponding endResetModel(). It is unclear whether this can ever be hit, because in the no-dives case, at least in the desktop version no profile is shown. Note, that this makes the check double-unnecessary. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-02Correctly recognize more OSTC variants as BLEGravatar Dirk Hohndel
Some OSTC 2 and OSTC Plus variants show 'OSTC+ xxxxx' as BLE name and we recognized this as OSTC 3 (but that one doesn't support BLE). With this we recognize these models as OSTC 2 (which is identical from a download perspective to the OSTC Plus) and both of those support BLE. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-02Use (and update) dive computer times when merging and splitting divesGravatar Linus Torvalds
When we split a dive in two, we keep the dive computer ID for the dive, but we should update the actual _time_ of the split dive to match the split. And when we look for "are these the exact same dives", we should check not only that the dive computer dive ID matches, but also that the dive computer time matches, so that we don't consider two parts of a dive that has been split to be obviously the same dive. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-02Use proper sample pointer when deciding to split divesGravatar Linus Torvalds
The dive splitting was completely wrong, because we checked the time of the previous sample by doing sample[i - 1].time.seconds which is entirely wrong. The 'sample' variable is the *current* sample, so the time of the previous sample is simply sample[-1].time.seconds Alternatively, we could have started from the first sample, and done dc->sample[i - 1].time.seconds but mixing the two concepts up just gets you a random sample pointer that is likely not a valid sample at all, and obviously does not have the right time at all. As a result, dive splitting was pretty much random. Sometimes it worked purely by mistake, because the rest of the logic was right (ie we _had_ found the right point where we reached the surface in the dive etc, the "previous sample time" was simply used to decide if the surface interval was sufficient to split the dive up). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-02List Ubuntu 18.04 packages needed for build.Gravatar Martin Měřinský
Closes #1229 [Dirk Hohndel: minor white space adjustment] Signed-off-by: Martin Měřinský <mermar@centrum.cz> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-01core: remove prefs-macros.h where unusedGravatar jan Iversen
move #include prefs-macros from SettingsObjectWrapper.h to SettingsObjectWrapper.cpp include dive.h directly (only part of prefs-macros.h used) in preference classes Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-29Dive pictures: adjust rowDDEnd and rowDDStart on picture deletionv4.8.0Gravatar Berthold Stoeger
In DivePictureModel, rowDDEnd and rowDDStart specify the range of pictures in the profile plot. Obviously, these have to be adjusted when pictures are deleted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-28Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-29Dive pictures: connect DivePictureModel signals in constructorGravatar Berthold Stoeger
The DivePictureModel signals were connected int the setProfileState() function of ProfileWidget2. If this function was called repeatedly (e.g. after adding a dive), multiple connections were made, which led to multiply delivered signals. This in turn led to confusion, when deleting pictures (i.e. multiple pictures were deleted). Instead, connect once in ProfileWidget2's constructor. It is unclear whether these signals should be disconnected temporarily if no pictures are shown. In any case, the weren't, so this shouldn't introduce any regression. Fixes #1441 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-28Dive pictures: render icons with white instead of transparent backgroundGravatar Berthold Stoeger
The SVG icons for failed / still-loading pictures were rendered with an alpha channel. This lead to strange behavior when hovering over the icon in the profile plot: When hitting a "hole" the icon would be minimized again. Therefore, render the SVGs onto a white background. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-28Android: limit the amount of data copied to clipboardGravatar Dirk Hohndel
The clipboard fails if we attempt to copy more than 1MB of data. But the data buffer used is shared between all transactions 'in flight' and we cannot tell what else is currently using that buffer. Limiting ourselves to 500k of text for the logfiles seems reasonable and hopefully makes it more likely that the transaction will succeed (sadly, Qt doesn't tell us if it failed). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-28iOS and Android: try more logfile locationsGravatar Dirk Hohndel
On some devices (e.g., a Sony Xperia phone) the GenericDataLocation is not app writeable. Instead of just giving app, try a few other default locations as well (and since all of these are actually string lists, try all of the options that Qt gives us). Reasonably, we should only set the libdivecomputer logfile name if we found a writeable location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-28QML UI: provide information why logfile couldn't be writtenGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-28Add Cressi Giotto, Newton and Drake to list of devicesGravatar Stephen Goodall
Adding Cressi Giotto, Newton and Drake to the list of devices that can be selected on Android devices. Signed-off-by: Stephen Goodall <stephen.goodall88@googlemail.com>
2018-06-27QML UI: fix layout of Download pageGravatar Dirk Hohndel
The info text from the download process wasn't rendered correctly. maximumWidth ended being a recursive reference and as a result the text would render as very narrow and super-tall field. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-27QML UI: remove unused propertyGravatar Dirk Hohndel
We always save the libdivecomputer log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-27QML UI: go back to always saving libdivecomputer logfileGravatar Dirk Hohndel
This got disabled as unintended (I hope) side effect of commit 807571a588 ("core: update deviceData default from qml"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-27Update list of supported dive computersGravatar Dirk Hohndel
This is simply extracted from libdivecomputer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-27Update libdivecomputer submoduleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-27Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-28Add Cressi Leonardo to list of devicesGravatar Stephen Goodall
Adding Cressi Leonardo to the list of devices that can be selected on Android devices. Signed-off-by: Stephen Goodall <stephen.goodall88@googlemail.com>