aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-12-03Desktop: handle environmental states in Information tabGravatar willemferguson
Create a preference setting on the General Settings page. The setting is saved with the other preferences. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28Add current GF to infoboxGravatar Robert C. Helling
As per request from users on scubaforum.com, this adds the current gradient factor to the deco information of the infobox. Up to now, this information was only graphically represented in the pressure bar graph and the heatmap. This gives a numerical value. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-28Desktop: Improve speed of selecting multiple (or all) divesGravatar Berthold Stoeger
When selecting all dives via CTRL-A or manually and the trips were not expanded, the QSelectionModel sends a single selectionChanged signal per trip. We are reloading the map in every call, making this very slow. I couldn't figure out how to make QSelectionModel behave more nicely, therefore I chose the nuclear option: Remove the map reloading from selectionChanged() and hook into all functions that do selection changes. In these functions, first call the original code and then do the selection-changed operations. This will certainly need some tuning. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-28GitHub Actions: work around bug in Ubuntu 14.04 docker base imageGravatar Dirk Hohndel
Right now in the Ubuntu 14.04 base image for Docker the file /etc/apt/preferences.d/ubuntu-esm-infra-trusty doesn't exist. Subsequently, apt-get update enables ESM, but since we don't have a license to use that upgrades / installs from ESM fail. This workaround simply ensure that there is such a file pinning ESM to never be used. With that, the creation of our image should succeed again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: add branch name to docker image nameGravatar Dirk Hohndel
Unless we're on master. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: better names for the docker workflowsGravatar Dirk Hohndel
This way it's much easier to see on the GitHub website which one is which. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: set new version numbers for the docker imagesGravatar Dirk Hohndel
These are of course arbitrary. The Android container image for some reason based its version number on the Qt version. Which may or may not be a good idea. The other two had 0.x version numbers, so let's move them to 1.0 for the first release that gets pushed to the subsurface account on docker hub. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: build stage 2 of MXE image for correct branchGravatar Dirk Hohndel
When triggered by a push event, the checkout action checks out the correct branch. But without this change, the stage 2 action would always run on master. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: trigger docker builds on more pathsGravatar Dirk Hohndel
Not only a change to the docker file, also changes to the yaml files should trigger rebuilds. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: push Linux and Android containers to docker hubGravatar Dirk Hohndel
For now simply using the existing version numbers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: add two stage MXE container buildGravatar Dirk Hohndel
Based on ideas from Anton - both the basic building of containers in the first place as well as the workaround for the 6h build limit. Because GitHub Actions are limited to 6 hours we split the creation of the MXE container into two steps and push the intermediary container after stage 1 to docker hub. Right now each of the steps takes about 3.5 hours, so hopefully even with changes in the future this will continue to work. This commit also introduces use of docker hub instead of GitHub's own registry (since strangely right now GitHub actions cannot run containers from GitHub's private registry). In order for this to work, we need to have the docker credentials in secrets in GitHub. As a result, only people who can create branches in our repository can easily test changes to the container images. Others can modify the code to use a different docker hub account and provide those secrets in their own GitHub account. Not ideal, but of course we cannot allow every pull request to potentially overwrite docker images in our "official" docker hub account. Suggested-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: split the container build action into twoGravatar Dirk Hohndel
And remove the Windows/MXE one that doesn't work because of the 6h time limit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-28GitHub Actions: let CI build docker imagesGravatar Anton Lundin
This create a GitHub Actions workflow to build the docker images we use in our CI workflows. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2019-11-27Bugfix: inconsistent groupbox sizes in Iformation tabGravatar willemferguson
This is a bugfix for an error that slipped through. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-11-26mac: create Xcode project for mobile (on a desktop)Gravatar jan Iversen
Create Xcode project, allowing easy editing of all sources. the project uses "make mobile" and "make desktop" to generate the project, so all CMake changes are automatically updated the project uses folder references, so adding/removing a source is automatically updated The project expect build-mobile and build to be existing as well as external libraries, so after cloning do a normal build before using the project. Signed-off-by: Jan Iversen <jani@apache.org>
2019-11-26Cylinders: Fix crash when removing cylindersGravatar Berthold Stoeger
Change the remove() function of the cylinder and weight models to take the index by value. The code used to take it by reference and the reference would be invalidated when removing rows from the model! Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-26mobile-widgets/qml: add qmldir to include map-widgetGravatar jan Iversen
qml demands all qml files to be in 1 directory, but allows a "qmldir" file to reference qml files in other directories. Add qmldir to reference map-widget. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26release doc: add feature to CHANGELOG.mdGravatar jan Iversen
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26startup mobile: test for --testqml when loading qml engine.Gravatar jan Iversen
the command line option --testqml selects if running using resources or files on disk. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26core: add --testqml flag to mobileExecutableGravatar jan Iversen
Add flag to subsurface_mobile (only when compiling for desktop) to allow using qml files from disk instead of resources. This allows testing qml changes with just restarting subsurface_mobile. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26build-system: add CMake SUBSURFACE_MOBILE_DESKTOP as new build typeGravatar jan Iversen
Add -DSUBSURFACE_MOBILE_DESKTOP to CMake, allowing the C++ part to be different when compiling for a device or for the desktop. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-22Mobile: make it clear that 'all BT devices' setting is temporaryGravatar Dirk Hohndel
Making this persistant creates a very unpleasant user experience. And if a dive computer needs this setting, we really want people to report this to us so we can fix it. Fixes: #2358 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-22Core: don't prevent some OSTC models from being recognizedGravatar Dirk Hohndel
The code seemed to do something really reasonable by picking one of the supported OSTC versions - except that the one it picked didn't support BT/BLE and therefore our logic of recognizing dive computers on iOS failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-22GitHub Actions: don't add macOS artifacts to releaseGravatar Dirk Hohndel
We now get a working macOS DMG for each CICD release via the webhook - and the GitHub built .app.zip only worked on the latest macOS and was near-unusable there. We still make it available as an artifact of that macIS GitHub action in case there is some value, but we no longer push it into the GitHub release artifacts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20Translations: try to be smarter when picking the right localeGravatar Dirk Hohndel
I was reminded to do this when a user in French speaking Switzerland reasonably suggested that fr_FR would be a much better fallback than en_US in their situation. Fixes: #2388 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20Android: update README to mention build containerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20macOS: with Qt 5.13 we need QtDBus againGravatar Dirk Hohndel
So don't remove it from the build before signing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-20macOS: update make package script for Grantlee 5.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-19Cleanup: remove MainWindow::recreateDiveList() functionGravatar Berthold Stoeger
The function had only one line and had only one caller. We might just as well fold that line into the caller. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Desktop: don't reload dive list model after clearing the modelGravatar Berthold Stoeger
By clearing the model, its contents are removed. There is no point in reloading the model. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Dive list: clear internal data when clearing modelGravatar Berthold Stoeger
The DiveListModelBase::clear() implementation was flawed: It cleared the data in the core, but left the data in the model untouched. The code was relying on the fact that the caller would reset the model manually. Not a good idea. Therefore, clear the internal data to keep the model consistent at all times. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Dive list: update selection after clearing modelGravatar Berthold Stoeger
When clearing the model the selection is cleared. Send the according signal. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Cleanup: remove ProfileWidget2::refreshDisplay signalGravatar Berthold Stoeger
It was not used anywhere. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: don't reload filter after reloading dive listGravatar Berthold Stoeger
The hidden_by_filter items are set on reload of the dive list. No point in reloading the filter again. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: move recalculation of filter from FilterModel to TripModelGravatar Berthold Stoeger
The way this was accessed via Qt's model semantics was horrible. This gives arguably more readable code, since we don't have to shoehorn things through QVariants. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: move num_shown logic from model to coreGravatar Berthold Stoeger
Since the number of shown dives is stored in the core, let's also keep it updated there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: split out filter from modelGravatar Berthold Stoeger
Split out the actual filtering from the MultiFilterSortModel. Create a DiveFilter class that does the actual filtering. Currently, mobile and desktop have their own version of this class, though ultimately we may want to merge them. The idea here is that the trip-model and undo-commands have direct access to the filter-function and thus can take care of keeping track of the number of shown dives, etc. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: move calculation of shown dives to undo commandGravatar Berthold Stoeger
The filter-model was catching dives-added / dives-deleted signals from the models to keep track of the number of shown dives. To simplify the data flow, do this directly in the undo-command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Filter: move number of shown dives to coreGravatar Berthold Stoeger
We mark hidden/shown dives in the core but store the number of shown dives in the MultiFilterSortModel. Move this datum to the core for improved locality. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Cleanup: remove MultiFilterSortModel::filterChanged()Gravatar Berthold Stoeger
Nobody was calling this function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19Cleanup: remove MultiFilterSortModel::clearFilterGravatar Berthold Stoeger
Nobody was using that function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19CHANGELOG.md updateGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-18GitHub actions: fix macOS artifact uploadGravatar Dirk Hohndel
Previously this created a bogus Subsurface.app.zip.zip file and then failed to upload it to the release. The upload / download pair of default actions is happier with just the folder. And then the creation of the zip file needs the '-r' switch. Oops. Finally, the pull-request specific uploads as build artifact are completely redundant since we already do this to move the data from the macOS build to the container that runs our own publish action in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-16Check if all required bytes were readGravatar Robert C. Helling
Fixes CID 350077 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Initialize modified memberGravatar Robert C. Helling
Fixes CID 350111 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Don't acces null dive computerGravatar Robert C. Helling
Fixes CID 350111 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Use the actual error numberGravatar Robert C. Helling
According to the man page, fopen and fclose return the error number in the global variable errno. Fixes CID 350115 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Initialize cylider field properlyGravatar Robert C. Helling
This fixes another thing Coverty found. I am not 100% sure I understand the semantics of cylinder_t.manually_added but looking at other instance I guess true is the correct value for a cylinder from a csv file for a Poseidon rebreather. Fixes CID 350734 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Don't access uninitialized deco_structureGravatar Robert C. Helling
Coverty found that in the export functions, we initialize the planner deco state with NULL and then possibly later access its content. This makes sure, we don't do that. Let's see if this makes Coverty happy or I missed somehting else. Fixes CID 350736 Fixes CID 350735 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-16Remove setStyleSheet for "Dive mode" boxGravatar Stefan Fuchs
Remove modification of style sheet for "Dive mode" box in info tab. This fixes a broken UI layout under Windows. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>