aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-11-20android: avoid crash with failed font loadGravatar Dirk Hohndel
Check that we found font families before accessing them. But the larger issue is likely that bundling the font failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19Adjust translations based on completenessGravatar Dirk Hohndel
Dropping Latvian and Turkish as they fell way too low. Adding Croation which is long overdue (can't believe I missed this for so many releases). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19Update translations from TransifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: ensure that gradle can handle UTF8 filesGravatar Dirk Hohndel
This should be the case automatically, but appears to fail when run as part of the GitHub Action. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system: update GitHub Action to use current android containerGravatar Dirk Hohndel
This brings the scripts and the container in use back into sync. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system: update Android builder docker containerGravatar Dirk Hohndel
This adjusts the docker setup to create a container with the correct NDK, SDK, tools, Qt version, etc, and updates the helper scripts that are needed in order to do that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: ensure all required pieces are in place for the buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: move the build of googleaps pluginGravatar Dirk Hohndel
We want to build the googlemaps plugin once we know with architectures we are building for. So let's do that right before we build Subsurface-mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19iOS: adjust GitHub Action to new build formatGravatar Dirk Hohndel
It's frustrating that I can't get the translation.qrc support the translation files to be created in the build directory. Having them as part of the sources just feels wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system: fix tests in mobile buildsGravatar Dirk Hohndel
We can no longer build TestPictures in mobile builds. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19mobile: update version to 3.1.0Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system/iOS: no longer build in packaging/iosGravatar Dirk Hohndel
That always was such a weird choice. This also adjusts to a minor change in the layout of libgit2 sources. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system: combine iOS and Android Subsurface-mobile.proGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: add qmake based build for Subsurface-mobileGravatar Dirk Hohndel
Several features that are needed to create Android bundles with the current NDK and QT 5.15 aren't easily available when using cmake. Given that we already do a qmake based build for iOS, I decided to simply switch Android to that as well. An added complication is that some of the magic that qmake uses to do the right things fails if the .pro file isn't in the root directory of your project. So this is right now somewhat inconsistent with the way we build for iOS. Something that should get cleaned up in the near future as it makes no sense to maintain two separate .pro files. This commits also adds a new build shell script to drive the assembly of all the dependencies. Once again this is a new file with the old one left in place for now (but to be removed fairly soon). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: add new build setup scriptGravatar Dirk Hohndel
This installs the required versions for most components, switches us to Qt 5.15, current SDK, NDK, and the current OpenSSL version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19android: update Subsurface-mobile manifest for Qt 5.15Gravatar Dirk Hohndel
With the switch to the bundle build (introduced at Qt 5.14) a couple of the settings in the manifest had to change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19mobile: hack around error with readonly propertiesGravatar Dirk Hohndel
This used to work, and still works with Qt 5.15 on the desktop, but on Android we get a fatal error trying to open the app. So let's just add another hack on top of all the other hacks we already have. Eventually we need to bite the bullet and update Kirigami. I just wish that wasn't such a pain. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19core/picture: don't compile all on mobileGravatar Dirk Hohndel
We don't support adding pictures and videos on mobile, so let's not referernce the infrastrutcture that's needed for that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19build-system: use libgit2 1.0.1 if building from sourceGravatar Dirk Hohndel
We still only require v0.26 from an API perspective, but it seems backwards to build that version when building from source as we do for macOS or Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-19ios: correct capitalization of filenameGravatar Dirk Hohndel
This was changed in commit 9ed886e4be ("Cleanup: lower-case filenames in core/subsurface-qt/") but since iOS builds happen on a case-insensitive file system, no one ever noticed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-17core: fix incorrect QString::asprintf/vasprintf usageGravatar Dirk Hohndel
These are static functions, they cannot be used as a method on an object to construct that object. commit aa5f2e7c73 ("cleanup: replace deprecated sprintf()/vsprintf() calls") introduced this bug in an ill-advised attempt to deal with a deprecation warning. This caused us to not print GPS coordinates in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-14cleanup: remove empty function MainTab::reload()Gravatar Berthold Stoeger
This used to reload the completion models. Moreover, remove two obsolete member-function declarations. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-14desktop: automatically reload completion-modelsGravatar Berthold Stoeger
Instead of programatically reload the completion models, listen to the relevant signals in the models. To that goal, derive all the models from a base class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-14undo: add a general dives-imported signalGravatar Berthold Stoeger
Add a general dives-imported signal for those cases where we want to fully rebuild models, notably, the completion models. The divesAdded signals are too fine, because they are sent per trip and we don't want to reload these models multiple times per import. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-14cleanup: remove macros from qt-models/completionmodels.cppGravatar Berthold Stoeger
There were macros to auto-generate functions to reload the models. One was only used once and therefore is pointless. The other can be replaced by a function with a pointer-to-member-variable argument. While doing this, adapt the coding style. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-13Gracefully handle infinite MND for oxygenGravatar Robert C. Helling
When breathing pure oxygen and considering it not narcotic, there is not maximal narcotic depth and the formula divides by zero. So better, handle this case separately. Fixes #3080 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-11-12Update README and ReleaseNotesv4.9.9Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-12desktop: update completion models if dive was editedGravatar Berthold Stoeger
In the main-tab, when changing tag, buddy or divemaster, update the corresponding completion model. This is a quick-fix and the wrong thing to do. It works only if the currently shown dive is changed, which is not a given. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-12printing: properly initialize DPI valueGravatar Berthold Stoeger
The DPI value in the print_options structure was never initialized. This could lead to random DPI values and crashes. How this ever worked is a mystery. Therefore, read and write the DPI value from the settings just as the other print-options. And initialize the corresponding dialog widget to this value. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-12build-system: giving up on TestGitStorageGravatar Dirk Hohndel
It is completely incomprehensible why these fail. And why randomly restarting sometimes fixes them, and often doesn't. At this point there is no incremental value in having this test. If it were to ever catch a real bug, we wouldn't realize it because we are too well trained to ignore the problem. Very disappointing, but IMHO the right thing to do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-12build-system: allow building only a 64bit Windows installerGravatar Dirk Hohndel
This is simply a time optimization that is sometimes useful Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-12filter: avoid Windows crashGravatar Dirk Hohndel
The scope confusion between s (the for loop variable) and s (the function argument) caused a crash in the s.split() on Windows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-10Update latest translations from Transifexv4.9.8Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-09Update Supported Divecomputers listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08Update ReleaseNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08Update to latest libdivecomputerGravatar Dirk Hohndel
Merge git://github.com/libdivecomputer/libdivecomputer into Subsurface-DS9 Merge upstream libdivecomputer from Jef: - support the Scubapro Aladin A2 - improve Cressi Goa support - parse and report Oceanic firmware versions Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08Latest translations from TransifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08translations: brute force adjustment of tranlated textGravatar Dirk Hohndel
Thanks to commit 299ba20364 ("Update translation source strings") all the translated terms in the Command classes are now part of the base class. So remove the references to the subclasses in the translation sources as well. Fixes: #3068 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-08desktop: fix translation implementationGravatar Dirk Hohndel
We need to always call the tr() function of the base class. This will have consequences for our translations. See: #3068 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>