aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-12-17build-system/Android: we need to collect the ABIs earlierGravatar Dirk Hohndel
That's what happens if you develop a script like this sequentially. We need to have the ABIs picked in order to build googlemaps, otherwise this fails with the build container as that only includes the ARM libraries and tools. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17build-system/mobile: force using our own ECM buildGravatar Dirk Hohndel
If the OS has an older one installed, that is found first and the build fails. This way we know that ours is used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17build-system: configure git when running GitHub ActionGravatar Dirk Hohndel
In order to apply the patches for Kirigami, git insists on having a valid user name and email. Also, don't build the mobile app when preparing the AppImage. That build already takes way too long and we test this in a few other actions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17build-system/Android: handle resource issuesGravatar Dirk Hohndel
It appears that the Kirigami shaders aren't bundled with the app. They should be part of the plugin, but somehow they aren't. This way things at least 'mostly work'. We also need the icons. And to make this a bit more structured, move those resource declarations into the Android part of the qmake file until we know how all this works out on iOS. The Android app is still fairly unusable with all kinds of weird font problems and many other issues, but at least it once again starts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: more build hackeryGravatar Dirk Hohndel
So while the documentation explicitly says that you need to have the getInstance()registerTypes() call, that clearly is not supported if you build kirigami as a library. Even the required include file doesn't exist in the install-root. So let's try some other way to make this work. Heck if I know what the correct way of doing this might be. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17android/build-system: build kirigami as libraryGravatar Dirk Hohndel
Doing it this way using the cmake build system at least gets us to the point where everything links and appears to fit together. It still doesn't work at all, but hey, progress. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/qmake: use correct Kirigami filesGravatar Dirk Hohndel
And don't try to build kirigami in the same qmake run. The inclusion of the .pri file doesn't appear to lead to a build that works. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17build-system/mobile: remove old scriptGravatar Dirk Hohndel
This was just kept around for reference. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17kirigami: maintain our patches relative to upstreamGravatar Dirk Hohndel
Having them as commits like this should make it easier to migrate them as we update the underlying Kirigami version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: add the shaders as resourceGravatar Dirk Hohndel
These should already be part of the kirigami plugin, but without explicitly adding them here they appear to not get found at runtime. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: fix implementation of menu back featureGravatar Dirk Hohndel
With the updates to Kirigami I slightly modified the hack that we use to implement that, as a result we call pop() directly on the globalDrawer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: install our own copy of ECMGravatar Dirk Hohndel
Instead of relying on this being available as a system resource, treat it the same way as we treat Kirigami and the Breeze icons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: re-add breeze iconsGravatar Dirk Hohndel
This time from the cloned repo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: add yet another import path to find Kirigami QML moduleGravatar Dirk Hohndel
This needs some careful testing across the different OSs we are trying to support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: avoid warning in QML codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: don't use reserved wordGravatar Dirk Hohndel
This used to work, but with current QML/Kirigami it throws an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: silly whitespace cleanupGravatar Dirk Hohndel
Simply because it bugged me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/Android: register the Kirigami pluginGravatar Dirk Hohndel
According to the Kirigami documentation, this is only required on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: use 3rdparty build of KirigamiGravatar Dirk Hohndel
This should allow us to use the kirigami version that was built as 3rdparty component. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: first steps to switching to Kirigami 5.76Gravatar Dirk Hohndel
Our half-assed manual build of Kirigami was becoming completely unmaintainable. So let's try to use the build method that the Kirigami team recommends. Which unfortunately requires us to have access to the KDE extra cmake modules (ECM). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17core: correct AL* tankinfo sizes.Gravatar Berthold Stoeger
Recently (d16a9f118a) the tankinfo table was made dynamic, which means that the default tankinfos are added programatically. Thereby, the wrong function was used for AL* type of cylinders: metric instead of imperial. Fix those. Reported-by: Michael Andreen <harv@ruin.nu> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13cleanup: remove MainWindow::stateBeforeEdit memberGravatar Berthold Stoeger
The last user was removed in accf1fcc8f6ad. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13cleanup: remove unused typedefsGravatar Berthold Stoeger
Last users removed in ca6aa3813956b5e8be68b86ed36a5786b3ee746f. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13prefs: add option to display only actually used tanksGravatar Berthold Stoeger
A user complained about the default cylinders list. Provide a preferences option to turn this off. When changing the preferences, the tank-info model will be completely rebuilt. Currently, this is a bit crude as this will be done for any preferences change. Suggested-by: Adolph Weidanz <weidanz.adolph@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13core: remove the "no-name" tank infoGravatar Berthold Stoeger
There was a tank info with an empty name. According to a comment, this is needed for the "no cylinder" case. However, we now support empty cylinder tables, so this is not needed anymore. Therefore, remove it. Make sure that the user can still enter the empty name, just in case. But don't save the size and pressure in that case. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13desktop: don't save data to the "no-name" tankGravatar Berthold Stoeger
There seems to be no point to saving data to the tank with the empty name. Don't save tank-pressure and size to that tank info. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13core: free tank info table on exitGravatar Berthold Stoeger
This is obviously a pure code-hygiene thing. But with the new dynamic tank info table, this becomes trivial, so let's do it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-13core: keep tank infos in a dynamic tableGravatar Berthold Stoeger
The list of known tank types were kept in a fixed size table. Instead, use a dynamic table with our horrendous table macros. This is more flexible and sensible. While doing this, clean up the TankInfoModel, which was leaking memory. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12cleanup: remove unused #undefs in mainwindow.cppGravatar Berthold Stoeger
These macros were removed 2016-ish. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12profile: move connect() calls to profileGravatar Berthold Stoeger
The mainwindow was connecting preferences changes to the profile. Do this directly in the profile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12cleanup: remove unused signal ProfileWidget2::updateDiveInfoGravatar Berthold Stoeger
Last user was remove in 0bd821183d. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12profile: move DiveHandler to profile-widget folderGravatar Berthold Stoeger
These are the small dots that describe dragable points on the profile when in the planner. It makes no sense to have them in desktop's planner-widget code. They belong to the profile. Therefore, move the code there and compile on mobile. Not everything can be compiled on mobile for now, but it is a start. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12cleanup: remove unused macros in diveplanner.cppGravatar Berthold Stoeger
Clearly, these are artifacts. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12profile: call clearHandlers() in setPlanState()Gravatar Berthold Stoeger
This function, which removes the handlers from the profile, was called in setAddState() but not in setPlanState(). In the latter case it was called explicitly by the caller. Move the call from the caller into the function. This allows us to make clearHandlers() private in to the profile widget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12desktop: move planner-code to diveplanner.cppGravatar Berthold Stoeger
Around 2015 there was a push to move planner UI code from mainwindow.cpp to diveplanner.cpp. That never was completed, presumably because the planner is actually three widgets. Collect these widgets in one PlannerWidgets class and move the code there. This is not a full dis-entanglement, as the plannerwidgets have to access the profile via the mainwindow. But at least it collects the planner UI code at a single place. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12desktop: use getDiveSelection to access selected divesGravatar Berthold Stoeger
In the list view two functions were still manually collecting the selected dives. Use getDiveSelection() there as well. Careful: that means that the check for dives that are already outside of a trip now has to be done in the RemoveDivesFromTrip command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12desktop: init dive list header actions in constructorGravatar Berthold Stoeger
The main window called a function to init the header actions (i.e. the context menu) of the dive-list. There is no reason why this shouldn't be done in the constructor of the dive list, since it only accesses the QSettings, which are available at application startup. This improves modularity of the code (by a tiny, tiny bit). Moreover, the initialization function was at the same time the header-reloading function. That function can now be folded into the settings-changed function, since that is the only remaining user. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12preferences: connect() dialog page only onceGravatar Berthold Stoeger
Weirdly, the settingsChanged() signal of the dialog-pages was connected() to the settingsChanged() signal of the dialog every time the settings were accepted. Do it only once in the constructor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12preferences: don't remove/add pages in refreshPages()Gravatar Berthold Stoeger
This function was called when opening the preferences dialog to update all the pages with the current preferences. For unknown reasons it also removed / readded all the pages. Remove that code and use the now leaner function when refreshing the pages. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12preferences: sort pages only onceGravatar Berthold Stoeger
After each addition of a page in the constructor, the list was resorted. This appears pointless. Instead, sort the list only after all pages were added. Since the add-page function is now a single line, remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12preferences: create global settingsChanged signalGravatar Berthold Stoeger
So far, the PreferencesDialog emitted a settingsChanged signal. This meant that models that listened to that signal had to conditionally compile out the code for mobile or the connection had to be made in MainWindow. Instead, introduce a global signal that does this and move the connects to the listeners to remove inter-dependencies. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12cleanup: remove unused PreferencesDialog::emitSettingsChanged()Gravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12Add surge etc to printing template variablesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-08Fix cylinders in printing templatesGravatar Robert C. Helling
These did not appear in our templates. With this commit, there are two lists to iterate over, cylinders and cylinderObjects: cylinders has just one property: description which is a string summarizing cylinder information cylinderObjects has the individual properties addresable This also fixes a bug when the iterator variable did not have the singular name of the list it iterates over. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03Shorten the packages listGravatar Robert C. Helling
I compared the packages to those that come with a fresh Raspian install and also removed those that are dependencies of others. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03downloader: set default logfile nameGravatar Dirk Hohndel
This way we always get a libdivecomputer log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-03downloader: filter possible devices and add mounts, remember last choicesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03downloader: make cgi-script functional and add documentationGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03downloader: save downloaded divesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03downloader: wait for download threadGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>