aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-11-07Update README, ReleaseNotes and CHANGELOGGravatar Dirk Hohndel
This is the first step towards the 4.9.8 release. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-07desktop: minor tweak for dark modesGravatar Dirk Hohndel
This ensures that the BT/BLE devices are legible, regardless of light or dark mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-07filter: don't escape '&' in filter-preset menuGravatar Berthold Stoeger
When constructing an action, '&' is used as the keyboard shortcut marker. Since this mangles preset names, use the setIconText() function of the action instead. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-07filter: don't render filter preset name as HTML textGravatar Berthold Stoeger
QLabels must be explicitly set to not accept HTML input. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-07desktop: fix saving of column-widths of device and site tablesGravatar Berthold Stoeger
Qt's memory management scheme is completely broken and messes with common expectations. QObjects are organized as a tree. The children are destroyed in the destructor of QObject. This means that they are destructed after the destructor of the parent object has run and its sub-object were destructed. Obviously, this makes no sense as the child objects should be able to access their parent at any time. To restore the commonly expected deterministic order of construction and destruction, one might simply do away with Qt's silly object tree and organise things using classical subobjects. However, that breaks with the Qt-generated UI classes: The objects generated by these classes are *not* destructed with the UI class. Instead, they are attached to the widget's QObject tree. Thus these are again destructed *after* the widget! Who comes up with such a scheme? In our case this means that we cannot have models used for TableViews as subobjects, because the TableView needs the model to save the column widths in the destructor. Which, as detailed above is called *after* the desctructor of the widget! Thus, turn these models into heap-allocated objects and add them to the QObject tree. Funilly, this exposes another insanity of Qt's QObject tree: Children are destructed in order of construction! One would expect that if objects are constructed in the sequence A, B, C one can expect that C can, at any time, access B and A. Not so in Qt: The destruction order is likewise A, B, C! Thus, take care to init the widgets before the model. Jeez. Finally, print a warning in the column-saving code of TableWidget, so that these kind of subtleties are caught in the future. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-07desktop: rename table widget in DiveComputerTab to "devices"Gravatar Berthold Stoeger
The custom TableView widget saves the table width on destruction. For that, it uses the "objectName()". Since the table of the DiveComputerTab was simply called "table" in the UI file, the widths were saved in that generic section. To avoid future name-conflicts, rename the widget to "devices". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-07desktop: maximize size of last column in filter-preset tableGravatar Berthold Stoeger
This was just ugly: the column with the "trash" symbol and the name had the same size. On creation of the object, make the last column expand and adapt the size of the "trash" column according to its content. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-05mobile: add missing word to location warningGravatar Dirk Hohndel
Thanks to Johan, one of our Swedish translators for noticing this oversight. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-04Update translation source stringsGravatar Dirk Hohndel
This removes a few unnecessary strings from the recent desktop changes that were reverted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-04core: don't construct std::string from null in device.cppGravatar Berthold Stoeger
Recently the QStrings were replaced by std::strings in device.cpp so that they can be accessed from C-code. However, libstd being modelled after C, constructing a std::string from a NULL pointer leads to a crash. Fix one case where this was overlooked. Moreover, replace a null-pointer check by empty_string(), to treat NULL and "" equally. Reported-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-04revert preference settings for title colorGravatar Dirk Hohndel
Because of subsequent changes there is no clean way to just revert the changes introduced in commit 8b36cf1051 ("desktop: offer different colors for info tab titles"), so this manually removes the parts we don't need anymore. This also restores a tooltip value that was inadvertantly removed in that commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-04desktop: automatically pick a good theme title colorGravatar Dirk Hohndel
The preference setting seemed far too strange to do this. And not very user friendly. So instead we figure out if this is a dark theme or not by looking at text and background colors in the palette, and make sure we get notified if that changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-04Update translations from TransifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-04Reorganise the current statistics tabGravatar willemferguson
As the title above says.... Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2020-11-04Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-03update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-03desktop: generalize the colorization of the tab widgetGravatar Dirk Hohndel
Instead of doing it just for the Information tab, do it for all of the tabs. There's still room for improvement. But this certainly feels more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-03desktop: allow update of tab widget colors at run timeGravatar Dirk Hohndel
Adding a new virtual function to all of these classes may seem like overkill, but of course the idea is that likely we'd allow similar changes to all of them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-03cleanup: random small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-03desktop: offer different colors for info tab titlesGravatar willemferguson
Add a preference option to set the color of the text on the information tab to either MediumBlue, LightBlue or Black. The last two of these colors are meant to enable areadable font contrast on displays with dark mode. The choice is saved with the other preferences. [Dirk Hohndel: this isn't really about dark mode, so changed many of the types and variable names, changed the user visible texts, and addressed some whitespace issues] Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-01smtk-import: Add support for new devices modelGravatar Salvador Cuñat
Include devices Ids in the DC data. Ensure we always set a DC model string for manual dives or unsupported devices. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2020-11-01build-systsem: move back to Xcode 11Gravatar Dirk Hohndel
It appears that Xcode 12 applies some rather self defeating logic when picking build architectures in release builds for the simulator. It adds aarch64 by default and I can't find a way to turn that off from the command line. At the same time, you can't link against the simulator if you have build with aarch64 as the aarch64 simulator doesn't exist, yet. Since I couldn't get any of the claimed workarounds to work, I'm forcing Xcode 11 to be used in the Action. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-01parser: don't crash when parsing <weight> tagsGravatar Berthold Stoeger
When encountering a <weight> tag, we would parse into the last weightsystem. However, we only create weightsystems when encountering <weightsystem> tag. Therefore, this code would either crash or overwrite the previous weightsystem. Instead, create a new weightsystem for each <weight> tag. Moreover, make sure that inside a <weightsystem> tag a weightsystem actually exists. This should be the case, but who knows...? Reported-by: Nihal Gabr <gabr.nihal@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-31core: on import remove merged dives from trip/divesiteGravatar Berthold Stoeger
When dives were merged on import, they were not unregistered from their dive site and trip before being deleted. Thus, these tables had stale pointers, which would ultimate lead to crashes. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-31build-system: build libmtp for macOS if requestedGravatar Dirk Hohndel
If we are building our own dependencies (usually only for release builds), we now also need to build libmtp. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-31cleanup: fix stupid hack for MXE build scriptGravatar Dirk Hohndel
This is much easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-31Update libdivecomputerGravatar Dirk Hohndel
Fix two Coverity issues. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30Update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30Update to latest libdivecomputerGravatar Dirk Hohndel
- Garmin Descent Mk2i: add initial support for parsing cylinder pressure data Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: enable both 32 & 64 bit Windows buildsGravatar Dirk Hohndel
The 32bit build won't include libmtp and therefore won't support the Garmin Descent Mk2/Mk2i. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: switch to the 32/64bit MXE build containerGravatar Dirk Hohndel
This doesn't actually build 32 bit binaries, yet. One step at a time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: create an MXE docker container for both 32 & 64 bitGravatar Dirk Hohndel
This should allow us to then do both 32 and 64 bit Windows builds in our CI/CD and of course for our releases. In order to still be able to use this container in a GitHub action, aggressively remove things that we won't need during the build. Since we use the experimental -squash argument during docker build, this should get us a much smaller container image in the end. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: switch GitHub Action Windows build to 64 bitGravatar Dirk Hohndel
This is using the new build container with a 64bit MXE system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: Docker build for 64bit MXEGravatar Dirk Hohndel
We previously tried to build the MXE Docker container on GitHub using an Action, but that really didn't work well and was a lot more trouble than it was worth. So this goes back to an offline build mechanism where I simply create an updated Docker image when needed and push that to Docker Hub. But this nearly hides the most interesting change here - we are finally switching to using 64bit binaries on Windows. It's 2020 and fewer than 1% of our users use 32bit Windows machines. We'll need to expand this to be able to have both a 32bit and a 64bit version of Subsurface for Windows. But for now, this solves the problem for 99% of our users. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: adapt the smtk2ssrf script for 64bit WindowsGravatar Dirk Hohndel
Quite analogous to the Subsurface Windows build script. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: first steps towards a 64bit Windows buildGravatar Dirk Hohndel
This is barely scratching the surface (no put intended), and of course the container needs to be updated, first, to have a 64bit version of MXE installed, but this seems to help make libmtp build correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: add libmtp for our Windows buildsGravatar Dirk Hohndel
This uses latest master (as that's the only one that has the explicit Descent Mk2i support in it). Right now, unfortunately the MXE build fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: add libmtp for Linux and macOSGravatar Dirk Hohndel
Since MXE doesn't offer libmtp I'll need to add code to manually build libmtp there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30add initial support for the Garmin Descent Mk2iGravatar Dirk Hohndel
This brings in the needed libdivecomputer updates and builds Subsurface against libmtp in order to support downloading dive data via MTP (since the Mk2/Mk2i no longer provide a FAT filesystem via USB). In order for this to work you need to have libmtp installed on your system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-29desktop: make edit icon non-transparentGravatar Doug Junkins
Switched the edit icon to one that has the pencil color set to white instead of transparent so that it remains visible when switching to Mac OSX dark mode. Signed-off-by: Doug Junkins <junkins@foghead.com>
2020-10-29desktop: add label to dive computer tableGravatar Doug Junkins
There was no "title" property on the dive computer table which was causing an default label of "GroupBox" to appear above the table. Added a title property to clean up the UI. Signed-off-by: Doug Junkins <junkins@foghead.com>
2020-10-29desktop: use default colors for dive info labelsGravatar Doug Junkins
Removed the style change to force a style change for the labels on the dive information page to Medium Blue. This makes labels more readable in MacOSX dark mode since the default style changes colors when the mode is shifted from light to dark or vice versa. Signed-off-by: Doug Junkins <junkins@foghead.com>
2020-10-28cleanup: remove unnecessary includes from maintabGravatar Berthold Stoeger
These are artifacts from when the maintab contained more stuff. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-27cleanup: refactor subsurfacesysinfo.cppGravatar Berthold Stoeger
This used to be a copy of QSysInfo. However, once the requirement was raised to Qt5.4, this was replaced by a subclass of the original QSysInfo - which made the whole file mostly obsolete. Just use QSysInfo directly where needed. Only for windows.c, which can't call directly into Qt, keep the isWin7Or8() helper function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-26desktop: move MinMaxAvgWidget to TabDiveStatisticsGravatar Berthold Stoeger
This is its only user and the widget is scheduled for removal. Let's move it there temporarilly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-26cleanup: remove dive.h include in simplewidgets.hGravatar Berthold Stoeger
Let's simply forward declare the needed structures. Also removes removes two more unnecessary includes. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-26tests: don't fail if TestGitStorage can reach the serverGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-26build-system: use openSUSE Tumbleweed latestGravatar Dirk Hohndel
Without a distro update, Leap 15.2 appears to only give us Qt 5.12. Since the upgrade takes forever and causes problems as it requests a senseless 'reboot' of the container, let's try using Tumbleweed instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-26documentation: remove mention of Grantlee in INSTALL fileGravatar Dirk Hohndel
We don't use Grantlee anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-26cleanup: fix deprecated QVector constructorGravatar Dirk Hohndel
Annoyingly, the replacement has only been available since Qt 5.14. To make the code less messy, implement our own stdToQt conversion helper. Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>