aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-09-05Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-05Update CHANGELOGGravatar Dirk Hohndel
A couple of updates that hadn't made it into the CHANGELOG. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-05Update libdivecomputerGravatar Dirk Hohndel
Dirk Hohndel (4): garmin: ignore FIT files that aren't dives garmin: extract the devinfo from the first FIT file we parse garmin: adjust the model to reflect the FIT product code Garmin: don't assume that the first device index is 0 Linus Torvalds (5): Add support for DC_SAMPLE_TTS - time to surface in seconds Garmin: add DC_SAMPLE_CNS reporting garmin: don't suppress the time sample at zero time garmin: start decoding notifications and gas change events garmin: improve on debug log output for unknown fields Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-04Update CHANGELOG for RFC 1587Gravatar Jan Mulder
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-04Desktop: buddies in the dive listGravatar Jan Mulder
As proposed in RFC #1587, now also alllow buddies to be shown in the divelist. Fixes: #1587 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-03Build: suppress inconsistent-missing-override warnings on clangGravatar Berthold Stoeger
In a previous commit all override-modifiers were thrown out owing to warning floods caused by the inconsistent-missing-override flag on clang. Re-adding overrides is now very painful because it's an all-or-nothing thing. Let's disable the warning for now. If we reastablished good coverage with override, we might think about re-enabling the warning. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-03libdivecomputer: allow a "zero depth" deco stop depthGravatar Linus Torvalds
That just means that we're not in deco, the same way as giving a nonzero NDL value does. But if you don't have NDL, this is a much more convenient way of saying "not in deco". The Garmin Descent gives us stop information, but not necessarily NDL, and really wants this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-03libdivecomputer: add support for DC_SAMPLE_TTS if it existsGravatar Linus Torvalds
libdivecomputer didn't use to have a TTS sample value, but we're adding one, so add conditional support for it if it exists. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-03CHANGELOG.md: update with the latest Win32 log files changeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-09-03core/windows.c: write logs to the user pathGravatar Lubomir I. Ivanov
Writing logs to the path where the executable is located, might not be possible if the current user doesn't have permissions to write there. Obtain the user path and write the log files to the user path instead - e.g.: c:\users\myuser\appdata\roaming\subsurface\subsurface_*.log Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-09-03code/windows.c: add method for converting from utf16 to utf8Gravatar Lubomir I. Ivanov
Modify the funcion system_default_path_append() to both receive and return wchar_t types. Remove fallback in system_default_path_append() as this is now redundant. Add a function utf16_to_utf8() and use that in places where system_default_path_append() needs to be converted to utf8. Move both utf16_to_utf8*() and utf8_to_utf16*() near the top of the file. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-09-01Desktop: allow using a file dialog to find Garmin folderGravatar Dirk Hohndel
If we don't auto-detect where the Garmin Descent is mounted, the user can either just type in the correct path, or can use a file diealog to specify it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-01Update to latest libdivecomputerGravatar Dirk Hohndel
This adds support for the Garmin Descent, among other changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-01Cleanup: silence clang missing braces warning in core/color.cppGravatar Berthold Stoeger
C++11 initializer lists should be passed via {{ ... }}. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-01Desktop: fix warnings when building preferences UIGravatar Dirk Hohndel
Fixes #1618 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-01Cleanup: make DiveTripModel a global objectGravatar Berthold Stoeger
DiveTripModel (the model describing the dive-list) was destroyed and recreated on every reset of the list. This seems excessive. Instead - in analogy to most other models - make it a single global object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-31Filter: sort filter items in FilterModelBase::updateList()Gravatar Berthold Stoeger
All callers of FilterModelBase::updateList() sorted the items (except the last one). Thus we can do the sorting inside the function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-31Filter: Make FilterModelBase a proper Qt model (mostly)Gravatar Berthold Stoeger
Since FilterModelBase now contains complex data (counts and checked), we might just as well make it a full model and keep track of the name as well. I.e. do not derive from QStringListModel but from QAbstractListModel and add the name to the item structure. Implement proper reset / add / rename semantics. This is overkill at the moment, as after all any modification the model will be reset, but ultimately it will allow us to be smarter and only update rows when needed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-31Filter: remove diveSiteAdded signal of MainTabGravatar Berthold Stoeger
Signals can be useful. In this case, a simple function call does it. Thus, remove the signal. It can be readded later at an more appropriate place. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-31Zero initialize deco state structGravatar Robert C. Helling
Valgrind found use of some uninitialized variable (probably ds->gf_low_pressure_this_dive ), see #1614. Zero is the correct value to start with. Lacking a working version of valgrind I cannot check this actually fixes the problem. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-08-31Travis: show performance test resultsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-31Travis: put large test data in place for TestParsePerformanceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-31Add performance test caseGravatar Dirk Hohndel
This requires the user to manually copy the large test file into the dives directory (because I really don't want to add this to the repo); instructions how to do that are displayed if the file is missing. Next it uses the git version of that same file (but prefetches it to try and remove the network speed from what is being measured). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-30Parser: split out name-comparison from match() functionGravatar Berthold Stoeger
The match() function in parse-xml.c calls a very specific callback, which doesn't take a context-parameter. To be able to call other callbacks, split out the actual name-comparison. Moreover, remove the "plen" parameter, as this was called with strlen(pattern) in all cases anyway. Replace the old logic which potentially accessed a byte beyond the end of name with a simply classical C-style loop. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-30Parser: move match() into core/parse-xml.cGravatar Berthold Stoeger
The match() function compares a pattern with a name with a twist: The name may either end in '\0' or '.'. If pattern and name match, a parsing function is called on a buffer and a destination value. The result of the parsing is not checked. This seems awfully XML-specific and therefore move the function from the general parse.c to the specialized parse-xml.c unit and make it of local linkage. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-30core/settings: add missing load_* call in qPrefDisplayGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-30core/settings: add READMEGravatar jan Iversen
Add simple explanation of how the program flow is. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-29parse "GPS" string fields and turn them into dive sites when downloadingGravatar Linus Torvalds
Dive computers that do GPS can report their GPS data as one or more string fields, and if the first tree letters of the description is "GPS", then we'll take the string and turn it into a dive site for that dive. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-29Dive trips: don't crash on repeated trip-removalGravatar Berthold Stoeger
In the UI it is possible to remove a dive from a trip twice, which leads to a crash, because trip is NULL (obviously). Instead of doing a proper fix (don't show the "remove from trip" entry in the first place), ignore dives without a trip, since a rewrite of the undo-code is planned for the medium future anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-29Revert "desktop-widgets: remove QSettings from desktop-widgets"Gravatar Dirk Hohndel
This reverts commit 321a920a9873a3828a24c1b28cf8eb5fe1bff2cb. It appears that the load_xxx functions aren't called, so while the correct values are stored to the settings, they aren't retrieved. Let's revert while this gets fixed. Fixes #1609 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-28core: fix typo in preference nameGravatar Dirk Hohndel
In commit 1bc361b2ea ("core/tests: add uuidString to qPrefUpdateManager") a typo was introduced for the preference name. Reported-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-28Cleanup: we don't support configuring a Uemis SDAGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-28Filter: cache number of dives fulfilling filter rulesGravatar Berthold Stoeger
Currently, in FilterModelBase::data() the number of dives is recalculated. This happens for every mouse-over event! Calculate the number of dives only on recalculation and store the count in the items-struct. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-28Whitespace: make range based for loops consistent in filtermodels.cppGravatar Berthold Stoeger
Consistently use "for(item: items)" instead if "for(item : items)". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-28Filter: replace checked-state by structGravatar Berthold Stoeger
In the future, we might be smarter about the dive-counts and calculate them only once and incrementally (if e.g. new dives are added). Prepare for more complex caching by turning the checked boolean into a struct, which can then be extended by a count and other things (e.g. the name). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-27Add support for opening a DC_TRANSPORT_USBSTORAGE streamGravatar Linus Torvalds
This is part of the whole "let's support the notion of dive computers being exported as USB storage devices" push. With an older libdivecomputer, we'll just fall back on failing the operation, but we still want to support the generic notion of DC_TRANSPORT_USBSTORAGE since we have our own internal Uemis downloader. That one won't ever get to the open phase, since it's caught earlier. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-27Make device enumeration use the device transport dataGravatar Linus Torvalds
This removes some special-case code for Uemis, replacing it with simply passing in the device transport information. This makes device enumeration work for the Garmin Descent (if it is listed by libdivecomputer as a USB storage device, that is). I don't actually do any of the libdivecomputer parsing yet, and only have a stub for the Garmin Descent, but now the directory selection works with that stub. The actual download obviously does not. [Dirk Hohndel: removed obsolete FIXME from code] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-27Treat the "GARMIN" mount point exactly like the "UEMISSDA" oneGravatar Linus Torvalds
The logic for finding a mount point for the Garmin FIT devices is basically exactly the same as for the UEMISSDA, even if the rest of the sequence is not the same. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-27Show new firmware notice for OSTC PlusGravatar Jan Mulder
Also show a new firmware notice for a HW OSTC Plus. This appeared to be broken (as can be verified on the current master from today, as HW just released version 2.98 of the firmware). Notice that there is some confusion in both Subsurface and Libdivecomputer with respect to types of OSTCs. Physcically, there exist 2 type of OSTC3's. The first edition with only DC_TRANSPORT_SERIAL (and an USB connector), and a second version that lacks the connector but supports both BT and BLE. Confusingly, the second version is marked OSTC3 on the device, but the user needs to select OSTC Plus (which is basically a 3rd version of the OSTC3, combined with a successor of the OSTC Sport) to download dives using BT/BLE. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-08-26CHANGELOG.md: update with the latest divelist columns fixGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-08-26divelistview: always show at least one columnGravatar Lubomir I. Ivanov
Currently it is possible to hide all columns by unchecking them in the context menu that appears by right clicking the header of the divelist. But once all are hidden the header disappears. This can cause a situation where the user cannot show any columns and the only fix for that is to edit the application configuration. To avoid this sutuation prevent the last column from being hidden. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-08-26CHANGELOG.md: add note for the latest dive list row height changeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-08-26modeldelegates: use font metrics for dive list row heightGravatar Lubomir I. Ivanov
Include font metrics as part of the height in DiveListDelegate::sizeHint(). When 22px is hardcoded, this handles small fonts, but for larger fonts it seem that the bottom of the dive list row text is cut on Windows. Keep 22px as the minimum size hint, but for larger fonts use QFontMetric::height(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-08-25Merge branch 'filter8' of https://github.com/bstoeger/subsurfaceGravatar Dirk Hohndel
2018-08-25desktop-widgets: remove QSettings from desktop-widgetsGravatar jan Iversen
The variables referenced are moved into qPref in earlier commits so in general all QSettings calls are replaced by qPref*:: calls Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core/tests: add class var to qPrefGeneralGravatar jan Iversen
Add static class variables to qPrefGeneral (and remove QSettings from desktop-widgets) Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25mobile-widgets: remove QSettingsGravatar jan Iversen
update qmlprefs and qmlmanager to use qPref Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core/tests: add loadFromCloud var to qPrefCloudStorageGravatar jan Iversen
Add special property loadFromCloud + mail to qPrefCloudStorage this variable is used by qmlmanager.cpp Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25core/tests: remove QSettings from testgitstorageGravatar jan Iversen
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>
2018-08-25core: remove QSettings from qPrefDivePlannerGravatar jan Iversen
remove not needed include from qPrefDivePlanner Signed-off-by: Jan Iversen <jani@apache.org>