Commit graph

13708 commits

Author SHA1 Message Date
Berthold Stoeger
8b0055d15c Cleanup: remove unused function get_selected_dives_text()
The only caller was removed in commit c3f07b9f81.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-10 08:16:33 -07:00
Berthold Stoeger
bbacdf94e3 Cleanup: Slightly shorten code in vqasprintf_loc()
Move duplicate code, which reads '*' arguments from va_list into
parse_fmt_int() function. To pass pointers-to-va_list, the va_list
has to be copied first.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 11:29:43 -07:00
Berthold Stoeger
5afe1a53d8 Cleanup: Move *_loc formatting functions into new format.cpp file
qthelper.cpp is already quite voluminous. Move the recently
introduced localized versions of (v)snprintf() and put_format()
into their own translation unit.

Moreover, adopt C-style semantics for asprintf_loc(). This function
will be used to remove fixed-size buffers in core/plannernotes.c.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 11:29:43 -07:00
Berthold Stoeger
36249f2780 Profile: Conditionally compile pictures-vector on mobile.
This vector is not used on mobile and cause iOS compilation to fail.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 11:29:14 -07:00
Dirk Hohndel
e5162f81d6 Fix typo
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-09 09:34:52 -07:00
Jeremie Guichard
7753352e62 Change taglist_get_tagstring to support 'unlimited' tag list size
Previous taglist_get_tagstring signature/implementation did not allow
handling of cases where inputted buffer could not contain all tags.
New implementation allocates buffer based on pre-computed size allowing to
insert all tags in the returned string.

Added get_taglist_string in qthelper to handle conversion to QString
Added TestTagList with tests for taglist_get_tagstring

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-09 07:59:51 -07:00
Berthold Stoeger
f1830cd44e Profile: On dataChanged() only update pictures that actually changed
Only update those pictures of the DivePictureModel that actually changed.
This will be useful once pictures are loaded incrementally.

To do so, replace the pictures array by an array with stable ids. Before
this commit, not-shown pictures are left out of the pictures array, which
makes the mapping from DivePictureModel-ids to the picture array index
non-trivial.

Replace the QList<DivePictureItem *> by a std::vector<std::unique_ptr<DivePictureItem>>
to ease memory management. Sadly, owing to COW semantics, QVector is incompatible
with QScopedPointer.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 07:50:21 -07:00
Jeremie Guichard
f633cb81ae Fix minor typos and spelling mistakes in README.md and related
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-09 07:48:01 -07:00
Jeremie Guichard
d64c48855d Add section describing use of CHANGELOG.md in CONTRIBUTING.md
Add description about file format
Add list of Areas that can be used

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-07 11:36:41 -07:00
Miika Turkia
68ef735bde Update DM5 test data
Now that we read the temperatures properly, the test comparison must
also include them.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
cfafbd1b37 changelog.md update
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
b28e3db7f1 Temperature 0x7F appears to mean no reading
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
6cfbe10bc3 Handle int and float temperatures
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
e04dadc378 Explicitly mark DM4 conversion
Same as default branch, but as 0x01 appears to be converted from DM4 to
DM5, let's just be explicit about it.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
06a2f36a62 Start to describe DM5 sampleBlob
Currently the best guess of sampleBlob format. Unfortunately there seems
to be some version of DM that stores the temperature in different
location that I have not been able to figure out yet. Note that some
version of DM does not utilize sampleBlob but specific blobs for each
value (temperature, pressure, ...).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Murillo Bernardes
b257b7a027 ios: Link to static googlemaps library
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
ef5d4a123e ios: manually import google maps plugin
qmlimportscanner for some reason does not include
the googlemaps plugin in the generated file.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
882120ba65 ios: remove googlemaps unecessary multiple builds
googlemaps archive is a fat file already, containing
armv7, arm64 and x86-64, so no need to build it
multiple times.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Dirk Hohndel
07366daea5 Update README and ReleaseNotes for 4.7.8
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-05 08:24:35 -07:00
Dirk Hohndel
d90f272cb1 Update a few more translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-05 08:21:35 -07:00
Jeremie Guichard
12dc1889c7 Add "Tags" column in Desktop app's dive list view
Add DiveItem::displayTags helper method to return Tags as a QString
New Tags column is
 by default inserted before "Photos" column
 by default disabled

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-04 14:10:45 +03:00
Dirk Hohndel
78986589f0 Update CHANGELOG
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:55:48 -07:00
Dirk Hohndel
7e73b30e97 Revert "GPS: use applyGpsLocation::applyLocations from core"
This reverts commit 70e0e80de5.

This caused the GPS workflow to break for Linus. Let's revert
for 4.7.8 and figure out how to do this cleanup correctly, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:52:46 -07:00
Dirk Hohndel
ceaf26d198 Revert "cleanup: localize global variable"
This reverts commit fc7729eb78.

This caused the GPS workflow to break for Linus. Let's revert
for 4.7.8 and figure out how to do this cleanup correctly, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:52:19 -07:00
Dirk Hohndel
b4ddcbfb63 Add new dive computers to CHANGELOG
I think some of those were already supported in 4.7.7.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:30:33 -07:00
Dirk Hohndel
29185cb8ff Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:17:58 -07:00
Lubomir I. Ivanov
167db8fc18 mapwidget-mobile: initialize the map to [0,0]
Instead of showing the map zoomed over London by default,
initialize the center at [0,0] and show the whole globe.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-02 13:47:43 -07:00
Lubomir I. Ivanov
48c032bb8e mapwidget-mobile: do not animate the first selection
centerOnLocationHard() is added in MapPage.qml so that
on `firstRun` the map is hard panned to the desired location
without animation.

This affects the selection of a new "Dive details" -> "Map it" or
when opening a GPS location in the map.

The idea behind this change is to avoid starting the map animation
from an arbitrary location such as [0,0] or London. Also, to not
start the map zoomed out completely and then zoom in on a selected
dive.

For this change to work, add the helper getCoordinatesForUUID()
to qmlmapwidgethelper.cpp/.h and use it to obtain the
QGeoCoordinates for a dive site UUID.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-02 13:47:43 -07:00
Dirk Hohndel
2700f02dcd Android: add Atomics Aquatics Cobalt as device
This way plugging in a Cobalt should pop up a question if the
user wants to open Subsurface-mobile.

Unfortunately, this, too, fails on my Android devices, so I can't test
it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 13:37:38 -07:00
Dirk Hohndel
5467b5349e Update list of supported dive computers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 12:25:16 -07:00
Dirk Hohndel
9ed40f0a22 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 09:21:38 -07:00
Dirk Hohndel
3fa4d9bdd7 Update libdivecomputer submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-01 10:54:30 -07:00
Berthold Stoeger
b01c9328b4 Dive pictures: extract timestamp from MP4 and related formats
Parse MP4s and related video files and extract the creation timestamp
from the "mdhd" (media header) atom.

Introduce helper function templates to extract arbitrary-length
unsigned integers in big-endian format from file or memory.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
66b71c60a0 Dive pictures: use get_metadata() in dive_create_picture()
Thus, metadata has to be only read once and the picture_load_exif_data()
function can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
9b2482aca9 Dive pictures: Move metadata functions into own translation unit
Move all metadata function into new core/metadata.cpp file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
d9df8c3f47 Debug: Error reporting for SHashedImage loading
Overwrite QImage::load() in SHashedImage so that we can perform better
error reporting.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 15:59:46 +03:00
Berthold Stoeger
376b737891 Debug: sprinkle debug messages in thumbnailing code
To ease trouble-shooting of the picture thumbnailer add a number
of debug- and info-messages.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-01 15:59:46 +03:00
Dirk Hohndel
028f53c63b Update libdivecomputer submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-31 11:50:42 -07:00
Stefan Fuchs
02dcd219cf MXE Windows build script: Chance MXE make call in comment
In the comment/instruction how to build MXE add "libssh2" and "curl"
to the make call. This seems to be needed in newer versions of MXE.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-26 05:34:00 +03:00
Stefan Fuchs
bb922e8db2 MXE Windows build script: Do right build flavor also for googlemaps
Do the right build flavor also for the googlemaps plugin.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-26 05:34:00 +03:00
Dirk Hohndel
bca7f8ed61 Travis: test build against Qt 5.5
We do this in a docker environment to make things fast and easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:58:04 -07:00
Dirk Hohndel
99bc940551 Use older API to remove dependency on Qt 5.8 or newer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:40:32 -07:00
Dirk Hohndel
9e457e092c iOS: add MapLocationModel and corresponding helper
Thanks to Murillo Bernardes for reminding me to add the .h files as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:34:46 -07:00
Dirk Hohndel
ce8cad615a iOS: build googlemaps
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:54 -07:00
Dirk Hohndel
5edcf2aea2 cmake: move maplocationmodel to generic models
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:41 -07:00
Dirk Hohndel
78937ce572 iOS: build fix
Otherwise the moc build fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:33 -07:00
Stefan Fuchs
cfd4c42829 Profile heatmap/heartrate: Only enable max one of these at same time
Only allow to enable maximum one of both items tissue heatmap or
heartrate in profile.
This is done by always switching off the other one at the moment you
turn on one of the two items (heatmap or heartrate).

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-19 15:44:02 -07:00
Stefan Fuchs
b38eb45b29 Profile heartrate: Nicer min/max values and tic distance
Correct a bug in finding the minimum heartrate.

Use the minimum and maximum heartrate value to set min/max and
tic distance for the heartrate axis in the profile.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-19 15:44:02 -07:00
Dirk Hohndel
ea7f49031d Fix non-interactive Qt installation for Android
We need to wait before clicking Next on the WelcomePage.
We really only want the Android armv7 packages.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 15:22:46 -07:00
Berthold Stoeger
b8f45d0ec9 Update CHANGELOG.md
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 13:15:00 -07:00